diff --git a/.gitattributes b/.gitattributes index df6e6a3d3af02b32cb3eca4c21e986ca7c0d07b8..e97c89babdb901d83b980059edce649461594abe 100644 --- a/.gitattributes +++ b/.gitattributes @@ -617,3 +617,4 @@ valley/lib/python3.10/site-packages/PIL/__pycache__/Image.cpython-310.pyc filter valley/lib/python3.10/site-packages/gradio/templates/frontend/static/img/Duck.glb filter=lfs diff=lfs merge=lfs -text valley/lib/python3.10/site-packages/tokenizers.libs/libgssapi_krb5-bb73e344.so.2.2 filter=lfs diff=lfs merge=lfs -text valley/lib/python3.10/site-packages/tokenizers.libs/libssl-09014658.so.1.0.1e filter=lfs diff=lfs merge=lfs -text +valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/Duck.glb filter=lfs diff=lfs merge=lfs -text diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/__init__.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..de07bdca0b1cf716c4fa8266bacb210d569a7f36 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/__init__.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/blocks.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/blocks.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fbf200cb1b0f22cce195062b708c63f3b64beecc Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/blocks.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/context.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/context.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d455bdcac3ce46a38046686fe9aea983ab796763 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/context.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/events.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/events.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b08dad60bb19bc4f1f3aebb8f4ab41d09aff8bb4 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/events.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/exceptions.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/exceptions.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5f2ac468f935df015979336e5e7a107355347754 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/exceptions.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/external.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/external.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8c8f866c840a26588fb77a6177741d0601838251 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/external.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/external_utils.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/external_utils.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..912525d5af99325def354fb6559a45320043626f Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/external_utils.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/flagging.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/flagging.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a3eef185d974fee79e569ce2d1678b7aeb6ce2de Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/flagging.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/helpers.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/helpers.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1df2661d401eb9891202abf4cb58e67dde69afdb Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/helpers.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/inputs.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/inputs.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..168221d78cc6439d03125c51d6e3428122c67bde Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/inputs.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/interface.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/interface.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6af4112222315585f9fe9c662abcd4aa0743b748 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/interface.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/ipython_ext.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/ipython_ext.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a691ea42251f6d24352c69f16738af0cdc2a6837 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/ipython_ext.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/layouts.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/layouts.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..624ee1678f0a9ba6c76c1c144226d1005de8f322 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/layouts.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/mix.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/mix.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6133122e1270314ee09dc900e634e77919900e80 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/mix.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/networking.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/networking.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3a074659670afc26f78423f3f0783b51150450a9 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/networking.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/outputs.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/outputs.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ff955a65d6b36da8f3a338c64f206c6fe2bed372 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/outputs.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/pipelines.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/pipelines.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4ed708acb18d7ae9e9957c53b993b29b42df443b Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/pipelines.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/reload.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/reload.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..196b8beefba2b931589e0a487551fd2533d4a4bf Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/reload.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/serializing.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/serializing.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..125c06e202db2c6a13545abbc5e97f62c99fc494 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/serializing.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/strings.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/strings.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1b624be862c4fadfb7f6613a26bd790451a9f531 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/strings.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/templates.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/templates.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..848a1d8a0a52b82b1fe8977e60a9b0da6701f0eb Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/templates.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/tunneling.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/tunneling.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ede84288eed2ddd9328cb9a0e07876ee2705e88f Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/tunneling.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/__pycache__/utils.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/__pycache__/utils.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..356882a1e7c7eb9a628e0a0959e5a8a997f8cac8 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/__pycache__/utils.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/Info.4b69e77f.js.map b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/Info.4b69e77f.js.map new file mode 100644 index 0000000000000000000000000000000000000000..212bb3907a9fe51871282c286c43deadb15b97ea --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/Info.4b69e77f.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Info.4b69e77f.js","sources":["../../../../ui/packages/atoms/src/Info.svelte"],"sourcesContent":["
\n\t\n
\n\n\n"],"names":[],"mappings":"wTAAA"} \ No newline at end of file diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/Textbox.563734b0.js b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/Textbox.563734b0.js new file mode 100644 index 0000000000000000000000000000000000000000..047e0444b230ca1fff7d26049a93b1e1dfa6d3b5 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/Textbox.563734b0.js @@ -0,0 +1,2 @@ +import{S as Z,i as x,s as $,F as D,c as S,G as R,B as b,f as y,m as z,D as re,k as J,t as p,n as M,o as m,p as w,l as L,q as _e,H as ce,J as be,V as U,b as j,e as ee,M as C,a1 as he,I as d,L as de,a2 as V,E as I,a3 as me,a4 as ge,a5 as ke,a6 as k,g as pe,h as ye,a as we,j as ve,x as G,v as Te,a7 as Ee}from"./index.7a68216a.js";/* empty css */import{a as Be}from"./Empty.svelte_svelte_type_style_lang.d7a3af78.js";/* empty css */import{B as Ce}from"./BlockTitle.39fa370e.js";import{C as De,a as He}from"./Copy.fa9f7398.js";function Ne(n){let e;return{c(){e=ce(n[3])},m(t,a){y(t,e,a)},p(t,a){a&8&&be(e,t[3])},d(t){t&&w(e)}}}function Se(n){let e,t,a,i,l,o,c=n[6]&&n[9].show_copy_button&&W(n);return{c(){c&&c.c(),e=R(),t=D("textarea"),b(t,"data-testid","textbox"),b(t,"class","scroll-hide svelte-4xt1ch"),b(t,"placeholder",n[2]),b(t,"rows",n[1]),t.disabled=n[5]},m(s,r){c&&c.m(s,r),y(s,e,r),y(s,t,r),C(t,n[0]),n[24](t),i=!0,l||(o=[he(a=n[16].call(null,t,n[0])),d(t,"input",n[23]),d(t,"keypress",n[15]),d(t,"blur",n[12]),d(t,"select",n[14])],l=!0)},p(s,r){s[6]&&s[9].show_copy_button?c?(c.p(s,r),r&576&&m(c,1)):(c=W(s),c.c(),m(c,1),c.m(e.parentNode,e)):c&&(J(),p(c,1,1,()=>{c=null}),M()),(!i||r&4)&&b(t,"placeholder",s[2]),(!i||r&2)&&b(t,"rows",s[1]),(!i||r&32)&&(t.disabled=s[5]),a&&de(a.update)&&r&1&&a.update.call(null,s[0]),r&1&&C(t,s[0])},i(s){i||(m(c),i=!0)},o(s){p(c),i=!1},d(s){c&&c.d(s),s&&w(e),s&&w(t),n[24](null),l=!1,V(o)}}}function ze(n){let e;function t(l,o){if(l[8]==="text")return Fe;if(l[8]==="password")return Ke;if(l[8]==="email")return qe}let a=t(n),i=a&&a(n);return{c(){i&&i.c(),e=ee()},m(l,o){i&&i.m(l,o),y(l,e,o)},p(l,o){a===(a=t(l))&&i?i.p(l,o):(i&&i.d(1),i=a&&a(l),i&&(i.c(),i.m(e.parentNode,e)))},i:I,o:I,d(l){i&&i.d(l),l&&w(e)}}}function W(n){let e,t,a,i;const l=[je,Le],o=[];function c(s,r){return s[11]?0:1}return e=c(n),t=o[e]=l[e](n),{c(){t.c(),a=ee()},m(s,r){o[e].m(s,r),y(s,a,r),i=!0},p(s,r){let f=e;e=c(s),e===f?o[e].p(s,r):(J(),p(o[f],1,1,()=>{o[f]=null}),M(),t=o[e],t?t.p(s,r):(t=o[e]=l[e](s),t.c()),m(t,1),t.m(a.parentNode,a))},i(s){i||(m(t),i=!0)},o(s){p(t),i=!1},d(s){o[e].d(s),s&&w(a)}}}function Le(n){let e,t,a,i,l;return t=new De({}),{c(){e=D("button"),S(t.$$.fragment),b(e,"class","copy-text svelte-4xt1ch")},m(o,c){y(o,e,c),z(t,e,null),a=!0,i||(l=d(e,"click",n[13]),i=!0)},p:I,i(o){a||(m(t.$$.fragment,o),a=!0)},o(o){p(t.$$.fragment,o),a=!1},d(o){o&&w(e),L(t),i=!1,l()}}}function je(n){let e,t,a,i;return t=new He({}),{c(){e=D("button"),S(t.$$.fragment),b(e,"class","svelte-4xt1ch")},m(l,o){y(l,e,o),z(t,e,null),i=!0},p:I,i(l){i||(m(t.$$.fragment,l),a||me(()=>{a=ge(e,ke,{duration:300}),a.start()}),i=!0)},o(l){p(t.$$.fragment,l),i=!1},d(l){l&&w(e),L(t)}}}function qe(n){let e,t,a;return{c(){e=D("input"),b(e,"data-testid","textbox"),b(e,"type","email"),b(e,"class","scroll-hide svelte-4xt1ch"),b(e,"placeholder",n[2]),e.disabled=n[5],b(e,"autocomplete","email")},m(i,l){y(i,e,l),C(e,n[0]),n[22](e),t||(a=[d(e,"input",n[21]),d(e,"keypress",n[15]),d(e,"blur",n[12]),d(e,"select",n[14])],t=!0)},p(i,l){l&4&&b(e,"placeholder",i[2]),l&32&&(e.disabled=i[5]),l&1&&e.value!==i[0]&&C(e,i[0])},d(i){i&&w(e),n[22](null),t=!1,V(a)}}}function Ke(n){let e,t,a;return{c(){e=D("input"),b(e,"data-testid","password"),b(e,"type","password"),b(e,"class","scroll-hide svelte-4xt1ch"),b(e,"placeholder",n[2]),e.disabled=n[5],b(e,"autocomplete","")},m(i,l){y(i,e,l),C(e,n[0]),n[20](e),t||(a=[d(e,"input",n[19]),d(e,"keypress",n[15]),d(e,"blur",n[12]),d(e,"select",n[14])],t=!0)},p(i,l){l&4&&b(e,"placeholder",i[2]),l&32&&(e.disabled=i[5]),l&1&&e.value!==i[0]&&C(e,i[0])},d(i){i&&w(e),n[20](null),t=!1,V(a)}}}function Fe(n){let e,t,a;return{c(){e=D("input"),b(e,"data-testid","textbox"),b(e,"type","text"),b(e,"class","scroll-hide svelte-4xt1ch"),b(e,"placeholder",n[2]),e.disabled=n[5]},m(i,l){y(i,e,l),C(e,n[0]),n[18](e),t||(a=[d(e,"input",n[17]),d(e,"keypress",n[15]),d(e,"blur",n[12]),d(e,"select",n[14])],t=!0)},p(i,l){l&4&&b(e,"placeholder",i[2]),l&32&&(e.disabled=i[5]),l&1&&e.value!==i[0]&&C(e,i[0])},d(i){i&&w(e),n[18](null),t=!1,V(a)}}}function Ge(n){let e,t,a,i,l,o;t=new Ce({props:{show_label:n[6],info:n[4],$$slots:{default:[Ne]},$$scope:{ctx:n}}});const c=[ze,Se],s=[];function r(f,g){return f[1]===1&&f[7]===1?0:1}return i=r(n),l=s[i]=c[i](n),{c(){e=D("label"),S(t.$$.fragment),a=R(),l.c(),b(e,"class","svelte-4xt1ch")},m(f,g){y(f,e,g),z(t,e,null),re(e,a),s[i].m(e,null),o=!0},p(f,[g]){const v={};g&64&&(v.show_label=f[6]),g&16&&(v.info=f[4]),g&1073741832&&(v.$$scope={dirty:g,ctx:f}),t.$set(v);let h=i;i=r(f),i===h?s[i].p(f,g):(J(),p(s[h],1,1,()=>{s[h]=null}),M(),l=s[i],l?l.p(f,g):(l=s[i]=c[i](f),l.c()),m(l,1),l.m(e,null))},i(f){o||(m(t.$$.fragment,f),m(l),o=!0)},o(f){p(t.$$.fragment,f),p(l),o=!1},d(f){f&&w(e),L(t),s[i].d()}}}function Ie(n,e,t){let{value:a=""}=e,{lines:i=1}=e,{placeholder:l="Type here..."}=e,{label:o}=e,{info:c=void 0}=e,{disabled:s=!1}=e,{show_label:r=!0}=e,{max_lines:f}=e,{type:g="text"}=e,{style:v={}}=e,h,H=!1,N;const E=_e();function Y(u){E("change",u)}function A(){E("blur")}async function O(){"clipboard"in navigator&&(await navigator.clipboard.writeText(a),P())}function P(){t(11,H=!0),N&&clearTimeout(N),N=setTimeout(()=>{t(11,H=!1)},1e3)}function Q(u){const T=u.target,K=T.value,B=[T.selectionStart,T.selectionEnd];E("select",{value:K.substring(...B),index:B})}async function _(u){await U(),(u.key==="Enter"&&u.shiftKey&&i>1||u.key==="Enter"&&!u.shiftKey&&i===1&&f>=1)&&(u.preventDefault(),E("submit"))}async function q(u){if(await U(),i===f)return;let T=f===!1?!1:f===void 0?21*11:21*(f+1),K=21*(i+1);const B=u.target;B.style.height="1px";let F;T&&B.scrollHeight>T?F=T:B.scrollHeightu.removeEventListener("input",q)}}function le(){a=this.value,t(0,a)}function ne(u){j[u?"unshift":"push"](()=>{h=u,t(10,h)})}function ie(){a=this.value,t(0,a)}function se(u){j[u?"unshift":"push"](()=>{h=u,t(10,h)})}function ae(){a=this.value,t(0,a)}function ue(u){j[u?"unshift":"push"](()=>{h=u,t(10,h)})}function fe(){a=this.value,t(0,a)}function oe(u){j[u?"unshift":"push"](()=>{h=u,t(10,h)})}return n.$$set=u=>{"value"in u&&t(0,a=u.value),"lines"in u&&t(1,i=u.lines),"placeholder"in u&&t(2,l=u.placeholder),"label"in u&&t(3,o=u.label),"info"in u&&t(4,c=u.info),"disabled"in u&&t(5,s=u.disabled),"show_label"in u&&t(6,r=u.show_label),"max_lines"in u&&t(7,f=u.max_lines),"type"in u&&t(8,g=u.type),"style"in u&&t(9,v=u.style)},n.$$.update=()=>{n.$$.dirty&1155&&h&&i!==f&&q({target:h}),n.$$.dirty&1&&Y(a)},[a,i,l,o,c,s,r,f,g,v,h,H,A,O,Q,_,te,le,ne,ie,se,ae,ue,fe,oe]}class Je extends Z{constructor(e){super(),x(this,e,Ie,Ge,$,{value:0,lines:1,placeholder:2,label:3,info:4,disabled:5,show_label:6,max_lines:7,type:8,style:9})}}function X(n){let e,t;const a=[n[12]];let i={};for(let l=0;lwe(t,"value",o)),t.$on("change",n[15]),t.$on("submit",n[16]),t.$on("blur",n[17]),t.$on("select",n[18]),{c(){l&&l.c(),e=R(),S(t.$$.fragment)},m(s,r){l&&l.m(s,r),y(s,e,r),z(t,s,r),i=!0},p(s,r){s[12]?l?(l.p(s,r),r&4096&&m(l,1)):(l=X(s),l.c(),m(l,1),l.m(e.parentNode,e)):l&&(J(),p(l,1,1,()=>{l=null}),M());const f={};r&2&&(f.label=s[1]),r&4&&(f.info=s[2]),r&256&&(f.show_label=s[8]),r&64&&(f.lines=s[6]),r&1024&&(f.type=s[10]),r&8768&&(f.max_lines=!s[9]&&s[13]==="static"?s[6]+1:s[9]),r&128&&(f.placeholder=s[7]),r&2048&&(f.style=s[11]),r&8192&&(f.disabled=s[13]==="static"),!a&&r&1&&(a=!0,f.value=s[0],ve(()=>a=!1)),t.$set(f)},i(s){i||(m(l),m(t.$$.fragment,s),i=!0)},o(s){p(l),p(t.$$.fragment,s),i=!1},d(s){l&&l.d(s),s&&w(e),L(t,s)}}}function Ve(n){let e,t;return e=new Be({props:{visible:n[5],elem_id:n[3],elem_classes:n[4],disable:typeof n[11].container=="boolean"&&!n[11].container,$$slots:{default:[Me]},$$scope:{ctx:n}}}),{c(){S(e.$$.fragment)},m(a,i){z(e,a,i),t=!0},p(a,[i]){const l={};i&32&&(l.visible=a[5]),i&8&&(l.elem_id=a[3]),i&16&&(l.elem_classes=a[4]),i&2048&&(l.disable=typeof a[11].container=="boolean"&&!a[11].container),i&540615&&(l.$$scope={dirty:i,ctx:a}),e.$set(l)},i(a){t||(m(e.$$.fragment,a),t=!0)},o(a){p(e.$$.fragment,a),t=!1},d(a){L(e,a)}}}function Ye(n,e,t){let{label:a="Textbox"}=e,{info:i=void 0}=e,{elem_id:l=""}=e,{elem_classes:o=[]}=e,{visible:c=!0}=e,{value:s=""}=e,{lines:r}=e,{placeholder:f=""}=e,{show_label:g}=e,{max_lines:v}=e,{type:h="text"}=e,{style:H={}}=e,{loading_status:N=void 0}=e,{mode:E}=e;function Y(_){s=_,t(0,s)}function A(_){G.call(this,n,_)}function O(_){G.call(this,n,_)}function P(_){G.call(this,n,_)}function Q(_){G.call(this,n,_)}return n.$$set=_=>{"label"in _&&t(1,a=_.label),"info"in _&&t(2,i=_.info),"elem_id"in _&&t(3,l=_.elem_id),"elem_classes"in _&&t(4,o=_.elem_classes),"visible"in _&&t(5,c=_.visible),"value"in _&&t(0,s=_.value),"lines"in _&&t(6,r=_.lines),"placeholder"in _&&t(7,f=_.placeholder),"show_label"in _&&t(8,g=_.show_label),"max_lines"in _&&t(9,v=_.max_lines),"type"in _&&t(10,h=_.type),"style"in _&&t(11,H=_.style),"loading_status"in _&&t(12,N=_.loading_status),"mode"in _&&t(13,E=_.mode)},[s,a,i,l,o,c,r,f,g,v,h,H,N,E,Y,A,O,P,Q]}class We extends Z{constructor(e){super(),x(this,e,Ye,Ve,$,{label:1,info:2,elem_id:3,elem_classes:4,visible:5,value:0,lines:6,placeholder:7,show_label:8,max_lines:9,type:10,style:11,loading_status:12,mode:13})}get label(){return this.$$.ctx[1]}set label(e){this.$$set({label:e}),k()}get info(){return this.$$.ctx[2]}set info(e){this.$$set({info:e}),k()}get elem_id(){return this.$$.ctx[3]}set elem_id(e){this.$$set({elem_id:e}),k()}get elem_classes(){return this.$$.ctx[4]}set elem_classes(e){this.$$set({elem_classes:e}),k()}get visible(){return this.$$.ctx[5]}set visible(e){this.$$set({visible:e}),k()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),k()}get lines(){return this.$$.ctx[6]}set lines(e){this.$$set({lines:e}),k()}get placeholder(){return this.$$.ctx[7]}set placeholder(e){this.$$set({placeholder:e}),k()}get show_label(){return this.$$.ctx[8]}set show_label(e){this.$$set({show_label:e}),k()}get max_lines(){return this.$$.ctx[9]}set max_lines(e){this.$$set({max_lines:e}),k()}get type(){return this.$$.ctx[10]}set type(e){this.$$set({type:e}),k()}get style(){return this.$$.ctx[11]}set style(e){this.$$set({style:e}),k()}get loading_status(){return this.$$.ctx[12]}set loading_status(e){this.$$set({loading_status:e}),k()}get mode(){return this.$$.ctx[13]}set mode(e){this.$$set({mode:e}),k()}}export{We as T}; +//# sourceMappingURL=Textbox.563734b0.js.map diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.06965fd8.js.map b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.06965fd8.js.map new file mode 100644 index 0000000000000000000000000000000000000000..f5ba57f33fc26c96a373160cfad8cc70925015c4 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.06965fd8.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.06965fd8.js","sources":["../../../../ui/packages/app/src/components/Interpretation/utils.ts","../../../../ui/packages/app/src/components/Interpretation/InterpretationComponents/Number.svelte","../../../../ui/packages/app/src/components/Interpretation/InterpretationComponents/Dropdown.svelte","../../../../ui/packages/app/src/components/Interpretation/InterpretationComponents/Checkbox.svelte","../../../../ui/packages/app/src/components/Interpretation/InterpretationComponents/CheckboxGroup.svelte","../../../../ui/packages/app/src/components/Interpretation/InterpretationComponents/Slider.svelte","../../../../ui/packages/app/src/components/Interpretation/InterpretationComponents/Radio.svelte","../../../../ui/packages/app/src/components/Interpretation/InterpretationComponents/Image.svelte","../../../../ui/packages/app/src/components/Interpretation/InterpretationComponents/Audio.svelte","../../../../ui/packages/app/src/components/Interpretation/InterpretationComponents/Textbox.svelte","../../../../ui/packages/app/src/components/Interpretation/directory.ts","../../../../ui/packages/app/src/components/Interpretation/Interpretation.svelte","../../../../ui/packages/app/src/components/Interpretation/index.ts"],"sourcesContent":["export const getSaliencyColor = (value: number): string => {\n\tvar color: [number, number, number] | null = null;\n\tif (value < 0) {\n\t\tcolor = [52, 152, 219];\n\t} else {\n\t\tcolor = [231, 76, 60];\n\t}\n\treturn colorToString(interpolate(Math.abs(value), [255, 255, 255], color));\n};\n\nconst interpolate = (\n\tval: number,\n\trgb1: [number, number, number],\n\trgb2: [number, number, number]\n): [number, number, number] => {\n\tif (val > 1) {\n\t\tval = 1;\n\t}\n\tval = Math.sqrt(val);\n\tvar rgb: [number, number, number] = [0, 0, 0];\n\tvar i;\n\tfor (i = 0; i < 3; i++) {\n\t\trgb[i] = Math.round(rgb1[i] * (1.0 - val) + rgb2[i] * val);\n\t}\n\treturn rgb;\n};\n\nconst colorToString = (rgb: [number, number, number]): string => {\n\treturn \"rgb(\" + rgb[0] + \", \" + rgb[1] + \", \" + rgb[2] + \")\";\n};\n\nexport const getObjectFitSize = (\n\tcontains: boolean /* true = contain, false = cover */,\n\tcontainerWidth: number,\n\tcontainerHeight: number,\n\twidth: number,\n\theight: number\n) => {\n\tvar doRatio = width / height;\n\tvar cRatio = containerWidth / containerHeight;\n\tvar targetWidth = 0;\n\tvar targetHeight = 0;\n\tvar test = contains ? doRatio > cRatio : doRatio < cRatio;\n\n\tif (test) {\n\t\ttargetWidth = containerWidth;\n\t\ttargetHeight = targetWidth / doRatio;\n\t} else {\n\t\ttargetHeight = containerHeight;\n\t\ttargetWidth = targetHeight * doRatio;\n\t}\n\n\treturn {\n\t\twidth: targetWidth,\n\t\theight: targetHeight,\n\t\tx: (containerWidth - targetWidth) / 2,\n\t\ty: (containerHeight - targetHeight) / 2\n\t};\n};\n","\n\n
\n\t{label}\n\t
\n\t\t{#each interpretation as interpret_value}\n\t\t\t\n\t\t\t\t{interpret_value[0]}\n\t\t\t
\n\t\t{/each}\n\t
\n\n\n\n","\n\n
\n\t{label}\n\t
    \n\t\t{#each choices as choice, i}\n\t\t\t\n\t\t\t\t{choice}\n\t\t\t\n\t\t{/each}\n\t
\n
\n\n\n","\n\n
\n\t{label}\n\t
\n\t\n\n\n\n","\n\n
\n\t{label}\n\t{#each choices as choice, i}\n\t\t
\n\t\t\t{choice}\n\t\t\n\t{/each}\n\n\n\n","\n\n
\n\t{label}\n\t\n\t
\n\t\t{#each interpretation as interpret_value}\n\t\t\t
\n\t\t{/each}\n\t
\n\t
\n\t\t{original}\n\t
\n
\n\n\n","\n\n
\n\t{label}\n\t{#each choices as choice, i}\n\t\t\n\t{/each}\n
\n\n\n","\n\n
\n\t{label}\n\t
\n\t\t\n\t\t
\n\t\t\t\n\t\t
\n\t\t\n\t\t\n\t
\n
\n\n\n","\n\n
\n\t{label}\n\t
\n\t\t{#each interpretation as interpret_value}\n\t\t\t\n\t\t{/each}\n\t
\n
\n\n\n","\n\n
\n\t{label}\n\t{#each interpretation as [text, saliency]}\n\t\t\n\t\t\t{text}\n\t\t\n\t{/each}\n
\n\n\n","import InterpretationNumber from \"./InterpretationComponents/Number.svelte\";\nimport InterpretationDropdown from \"./InterpretationComponents/Dropdown.svelte\";\nimport InterpretationCheckbox from \"./InterpretationComponents/Checkbox.svelte\";\nimport InterpretationCheckboxGroup from \"./InterpretationComponents/CheckboxGroup.svelte\";\nimport InterpretationSlider from \"./InterpretationComponents/Slider.svelte\";\nimport InterpretationRadio from \"./InterpretationComponents/Radio.svelte\";\nimport InterpretationImage from \"./InterpretationComponents/Image.svelte\";\nimport InterpretationAudio from \"./InterpretationComponents/Audio.svelte\";\nimport InterpretationTextbox from \"./InterpretationComponents/Textbox.svelte\";\n\nexport const component_map = {\n\taudio: InterpretationAudio,\n\tdropdown: InterpretationDropdown,\n\tcheckbox: InterpretationCheckbox,\n\tcheckboxgroup: InterpretationCheckboxGroup,\n\tnumber: InterpretationNumber,\n\tslider: InterpretationSlider,\n\tradio: InterpretationRadio,\n\timage: InterpretationImage,\n\ttextbox: InterpretationTextbox\n};\n","\n\n{#if value}\n\t\n{/if}\n","export { default as Component } from \"./Interpretation.svelte\";\nexport const modes = [\"dynamic\"];\n"],"names":["InterpretationAudio","InterpretationDropdown","InterpretationCheckbox","InterpretationCheckboxGroup","InterpretationNumber","InterpretationSlider","InterpretationRadio","InterpretationImage","InterpretationTextbox"],"mappings":"oXAAa,GAAmB,AAAC,GAA0B,IACtD,GAAyC,WACzC,GAAQ,IACH,CAAC,GAAI,IAAK,GAAG,IAEb,CAAC,IAAK,GAAI,EAAE,EAEd,GAAc,GAAY,KAAK,IAAI,CAAK,EAAG,CAAC,IAAK,IAAK,GAAG,EAAG,CAAK,CAAC,CAC1E,EAEM,GAAc,CACnB,EACA,EACA,IAC8B,CAC1B,EAAM,MACH,KAED,KAAK,KAAK,CAAG,KACf,GAAgC,CAAC,EAAG,EAAG,CAAC,EACxC,MACC,EAAI,EAAG,EAAI,EAAG,MACd,GAAK,KAAK,MAAM,EAAK,MAAY,GAAO,EAAK,GAAK,CAAG,QAEnD,EACR,EAEM,GAAgB,AAAC,GACf,OAAS,EAAI,GAAK,KAAO,EAAI,GAAK,KAAO,EAAI,GAAK,IAG7C,EAAmB,CAC/B,EACA,EACA,EACA,EACA,IACI,IACA,GAAU,EAAQ,EAClB,EAAS,EAAiB,EAC1B,EAAc,EACd,EAAe,EACf,EAAO,EAAW,EAAU,EAAS,EAAU,QAE/C,MACW,IACC,EAAc,MAEd,IACD,EAAe,GAGvB,CACN,MAAO,EACP,OAAQ,EACR,KAAqB,GAAe,EACpC,KAAsB,GAAgB,EAExC,6FCjDc,wCAAA,4CAOT,KAAgB,+FAFV,qBAAuB,EAAiB,KAAgB,aAFhE,2CAIE,KAAgB,2BAFV,qBAAuB,EAAiB,KAAgB,kIAH1D,0BAAL,+MAHJ,4BAEC,kIACQ,uBAAL,6HAAA,4HAPQ,qBACA,QAAgB,oSCKd,wCAAA,4CAOT,0GAFM,qBAAuB,EAAiB,KAAe,gBAF/D,2CAIE,6BAFM,qBAAuB,EAAiB,KAAe,qIAHzD,0BAAL,6KAHJ,4BAEC,kIACQ,uBAAL,6HAAA,4HARQ,qBACA,cACA,QAAgB,kRCId,wCAAA,6SAIJ,qBAAuB,EAAiB,KAAe,6YAIvD,qBAAuB,EAAiB,KAAe,gEAPlB,2DAF/C,4BAEC,OACC,cAIA,OAIC,OACC,OASA,6FAhBM,qBAAuB,EAAiB,KAAe,uCAIvD,qBAAuB,EAAiB,KAAe,0CAPlB,mHAPnC,QAAgB,OAChB,eACA,iWCKE,wCAAA,8DAgCV,4KA3BO,qBAAuB,EAAiB,KAAe,MAAG,6YAI1D,qBAAuB,EAAiB,KAAe,MAAG,iEAPpB,KAAS,SAAS,eAAjE,SACC,cAIA,OAIC,OACC,OASA,gDAhBM,qBAAuB,EAAiB,KAAe,MAAG,iCAI1D,qBAAuB,EAAiB,KAAe,MAAG,iCAuBjE,qCA9B6C,KAAS,SAAS,kHAD3D,0BAAL,0KAFH,wJAEQ,uBAAL,6HAAA,4HARS,eACA,qBACA,cACA,QAAgB,wXCMd,yCAAA,gFAIC,qBAAuB,EAAiB,6CAApD,6BAAY,qBAAuB,EAAiB,8IAD9C,0BAAL,kKAKD,kDAPgC,gBAAc,oLAFjD,4BAEC,cACA,yDAKA,6GANkC,2BAAc,0CAExC,uBAAL,6HAAA,sBAKD,0HAjBS,eACA,qBACA,cACA,cACA,WACA,QAAgB,8cCEd,wCAAA,kDAOV,4HAFO,qBAAuB,EAAiB,KAAe,gEAHrB,OAAa,cAAxD,SACC,gDAEQ,qBAAuB,EAAiB,KAAe,oCAE9D,qCALyC,OAAa,iHADlD,0BAAL,iKAFH,wJAEQ,uBAAL,6HAAA,4HARS,eACA,qBACA,cACA,QAAgB,iUCyDd,wCAAA,gRAOgB,+HAR9B,4BAEC,OAEC,OACC,sBAGD,2GAA4B,wJAlElB,eACA,qBACA,YACA,QAAgB,MAEvB,EACA,OAEE,IACL,EACA,EACA,EACA,QAEI,GAAa,EAAQ,EAAK,GAAG,OAC7B,EAAc,EAAS,EAAK,OAC5B,EAAI,EACR,EAAK,iBAAkB,OAClB,GAAI,EACR,GAAI,iBAAkB,IACrB,EAAI,UAAY,EAAiB,EAAI,EACrC,EAAI,SAAS,EAAI,EAAY,EAAI,EAAa,EAAY,CAAW,EACrE,MAED,OAIF,WACK,GAAO,EACV,GACA,EAAM,MACN,EAAM,OACN,EAAM,aACN,EAAM,aAAa,EAEhB,GACH,GAAO,EACN,GACA,EAAK,MACL,EAAK,OACL,EAAM,GACN,EAAM,QAGJ,GAAQ,EAAK,MACb,EAAS,EAAK,OAClB,EAAe,aAAa,YAAa,KACzC,EAAe,aAAa,WAAY,KACxC,EACC,EACA,EAAe,WAAW,IAAI,EAC9B,EACA,CAAM,6CAUa,sDAGJ,kYC/DJ,wCAAA,oHAKH,qBAAuB,EAAiB,eAFhD,6BAEQ,qBAAuB,EAAiB,oIAH1C,0BAAL,wKAHJ,4BAEC,kIACQ,uBAAL,+HAAA,4HAPQ,qBACA,QAAgB,8SCId,wCAAA,6CAMV,wGAFM,qBAAuB,EAAiB,eAFhD,2CAIE,6BAFM,qBAAuB,EAAiB,kIAH1C,0BAAL,kKAFH,uJAEQ,uBAAL,+HAAA,4HANS,QAAgB,OAChB,qNCMC,IAAgB,CAC5B,MAAOA,GACP,SAAUC,GACV,SAAUC,GACV,cAAeC,GACf,OAAQC,GACR,OAAQC,GACR,MAAOC,GACP,MAAOC,GACP,QAASC,EACV,oCCLM,eACM,KAAM,0BACA,KAAM,uBAHhB,kNACF,qBACM,KAAM,+BACA,KAAM,+BAHhB,+RAFH,mFAAA,uMAPO,gBACA,sBACA,kLAER,EAAa,GAAc,mICRlB,IAAQ,CAAC,SAAS"} \ No newline at end of file diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.39c24762.js b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.39c24762.js new file mode 100644 index 0000000000000000000000000000000000000000..3dffdf30e7935d7395404dba2519256d346cdfa3 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.39c24762.js @@ -0,0 +1,2 @@ +import{S,i as q,s as C,F as E,H as O,G as N,B as F,O as V,f as U,D as z,I as fe,J as X,p as j,E as P,N as oe,q as L,c as v,e as R,m as A,k as W,t as g,n as H,o as h,l as y,x as M,V as ue,b as _e,a as ce,j as me,W as be,X as de,Y as ge,Z as he,aj as ke,v as we,a7 as pe,g as ve,h as Ae}from"./index.7a68216a.js";import{a as ye}from"./Empty.svelte_svelte_type_style_lang.d7a3af78.js";import{B as ee}from"./BlockLabel.fd555cfa.js";import{E as Fe}from"./Empty.092ff864.js";/* empty css */import{F as J}from"./File.7698c472.js";import{U as Be}from"./Upload.c051b7dd.js";import{M as ze}from"./ModifyUpload.06b7f9d9.js";import{n as Y,b as Ue}from"./ModifyUpload.svelte_svelte_type_style_lang.e946db2d.js";import{U as je}from"./UploadText.e78ad6f6.js";import"./Blocks.1c8a32b7.js";const Ee=t=>{let l=["B","KB","MB","GB","PB"],a=0;for(;t>1024;)t/=1024,a++;let e=l[a];return t.toFixed(1)+" "+e},Z=t=>{var l;return l=t.orig_name||t.name,l.length>30?`${l.substr(0,30)}...`:l},Q=t=>{var l=0;if(Array.isArray(t))for(var a of t)a.size!==void 0&&(l+=a.size);else l=t.size||0;return Ee(l)};function $(t,l,a){const e=t.slice();return e[4]=l[a],e[6]=a,e}function Te(t){let l;return{c(){l=O("Uploading...")},m(a,e){U(a,l,e)},p:P,d(a){a&&j(l)}}}function Ne(t){let l,a,e,n;return{c(){l=E("a"),a=O("Download"),F(l,"href",e=t[4].data),F(l,"target","_blank"),F(l,"download",n=window.__is_colab__?null:t[4].orig_name||t[4].name),F(l,"class","svelte-xrr240")},m(s,i){U(s,l,i),z(l,a)},p(s,i){i&1&&e!==(e=s[4].data)&&F(l,"href",e),i&1&&n!==(n=window.__is_colab__?null:s[4].orig_name||s[4].name)&&F(l,"download",n)},d(s){s&&j(l)}}}function x(t){let l,a,e=Z(t[4])+"",n,s,i,o=Q(t[4])+"",f,d,r,m,u,b;function B(c,p){return c[4].data?Ne:Te}let k=B(t),w=k(t);function D(){return t[3](t[4],t[6])}return{c(){l=E("tr"),a=E("td"),n=O(e),s=N(),i=E("td"),f=O(o),d=N(),r=E("td"),w.c(),m=N(),F(a,"class","svelte-xrr240"),F(i,"class","svelte-xrr240"),F(r,"class","download svelte-xrr240"),F(l,"class","file svelte-xrr240"),V(l,"selectable",t[1])},m(c,p){U(c,l,p),z(l,a),z(a,n),z(l,s),z(l,i),z(i,f),z(l,d),z(l,r),w.m(r,null),z(l,m),u||(b=fe(l,"click",D),u=!0)},p(c,p){t=c,p&1&&e!==(e=Z(t[4])+"")&&X(n,e),p&1&&o!==(o=Q(t[4])+"")&&X(f,o),k===(k=B(t))&&w?w.p(t,p):(w.d(1),w=k(t),w&&(w.c(),w.m(r,null))),p&2&&V(l,"selectable",t[1])},d(c){c&&j(l),w.d(),u=!1,b()}}}function De(t){let l,a,e,n=Array.isArray(t[0])?t[0]:[t[0]],s=[];for(let i=0;ie("select",{value:o.orig_name||o.name,index:f});return t.$$set=o=>{"value"in o&&a(0,n=o.value),"selectable"in o&&a(1,s=o.selectable)},[n,s,e,i]}class le extends S{constructor(l){super(),q(this,l,Ie,De,C,{value:0,selectable:1})}}function Me(t){let l,a;return l=new Fe({props:{size:"large",unpadded_box:!0,$$slots:{default:[Pe]},$$scope:{ctx:t}}}),{c(){v(l.$$.fragment)},m(e,n){A(l,e,n),a=!0},p(e,n){const s={};n&32&&(s.$$scope={dirty:n,ctx:e}),l.$set(s)},i(e){a||(h(l.$$.fragment,e),a=!0)},o(e){g(l.$$.fragment,e),a=!1},d(e){y(l,e)}}}function Oe(t){let l,a;return l=new le({props:{selectable:t[3],value:t[0]}}),l.$on("select",t[4]),{c(){v(l.$$.fragment)},m(e,n){A(l,e,n),a=!0},p(e,n){const s={};n&8&&(s.selectable=e[3]),n&1&&(s.value=e[0]),l.$set(s)},i(e){a||(h(l.$$.fragment,e),a=!0)},o(e){g(l.$$.fragment,e),a=!1},d(e){y(l,e)}}}function Pe(t){let l,a;return l=new J({}),{c(){v(l.$$.fragment)},m(e,n){A(l,e,n),a=!0},i(e){a||(h(l.$$.fragment,e),a=!0)},o(e){g(l.$$.fragment,e),a=!1},d(e){y(l,e)}}}function Se(t){let l,a,e,n,s,i;l=new ee({props:{show_label:t[2],float:t[0]===null,Icon:J,label:t[1]||"File"}});const o=[Oe,Me],f=[];function d(r,m){return r[0]?0:1}return e=d(t),n=f[e]=o[e](t),{c(){v(l.$$.fragment),a=N(),n.c(),s=R()},m(r,m){A(l,r,m),U(r,a,m),f[e].m(r,m),U(r,s,m),i=!0},p(r,[m]){const u={};m&4&&(u.show_label=r[2]),m&1&&(u.float=r[0]===null),m&2&&(u.label=r[1]||"File"),l.$set(u);let b=e;e=d(r),e===b?f[e].p(r,m):(W(),g(f[b],1,1,()=>{f[b]=null}),H(),n=f[e],n?n.p(r,m):(n=f[e]=o[e](r),n.c()),h(n,1),n.m(s.parentNode,s))},i(r){i||(h(l.$$.fragment,r),h(n),i=!0)},o(r){g(l.$$.fragment,r),g(n),i=!1},d(r){y(l,r),r&&j(a),f[e].d(r),r&&j(s)}}}function qe(t,l,a){let{value:e=null}=l,{label:n}=l,{show_label:s=!0}=l,{selectable:i=!1}=l;function o(f){M.call(this,t,f)}return t.$$set=f=>{"value"in f&&a(0,e=f.value),"label"in f&&a(1,n=f.label),"show_label"in f&&a(2,s=f.show_label),"selectable"in f&&a(3,i=f.selectable)},[e,n,s,i,o]}class Ce extends S{constructor(l){super(),q(this,l,qe,Se,C,{value:0,label:1,show_label:2,selectable:3})}}function Ge(t){let l,a,e;function n(i){t[12](i)}let s={filetype:t[6],parse_to_data_url:!1,file_count:t[3],$$slots:{default:[Re]},$$scope:{ctx:t}};return t[5]!==void 0&&(s.dragging=t[5]),l=new Be({props:s}),_e.push(()=>ce(l,"dragging",n)),l.$on("load",t[7]),{c(){v(l.$$.fragment)},m(i,o){A(l,i,o),e=!0},p(i,o){const f={};o&64&&(f.filetype=i[6]),o&8&&(f.file_count=i[3]),o&8192&&(f.$$scope={dirty:o,ctx:i}),!a&&o&32&&(a=!0,f.dragging=i[5],me(()=>a=!1)),l.$set(f)},i(i){e||(h(l.$$.fragment,i),e=!0)},o(i){g(l.$$.fragment,i),e=!1},d(i){y(l,i)}}}function Le(t){let l,a,e,n;return l=new ze({props:{absolute:!0}}),l.$on("clear",t[8]),e=new le({props:{selectable:t[4],value:t[0]}}),e.$on("select",t[11]),{c(){v(l.$$.fragment),a=N(),v(e.$$.fragment)},m(s,i){A(l,s,i),U(s,a,i),A(e,s,i),n=!0},p(s,i){const o={};i&16&&(o.selectable=s[4]),i&1&&(o.value=s[0]),e.$set(o)},i(s){n||(h(l.$$.fragment,s),h(e.$$.fragment,s),n=!0)},o(s){g(l.$$.fragment,s),g(e.$$.fragment,s),n=!1},d(s){y(l,s),s&&j(a),y(e,s)}}}function Re(t){let l;const a=t[10].default,e=be(a,t,t[13],null);return{c(){e&&e.c()},m(n,s){e&&e.m(n,s),l=!0},p(n,s){e&&e.p&&(!l||s&8192)&&de(e,a,n,n[13],l?he(a,n[13],s,null):ge(n[13]),null)},i(n){l||(h(e,n),l=!0)},o(n){g(e,n),l=!1},d(n){e&&e.d(n)}}}function We(t){let l,a,e,n,s,i;l=new ee({props:{show_label:t[2],Icon:J,float:t[0]===null,label:t[1]||"File"}});const o=[Le,Ge],f=[];function d(r,m){return r[0]?0:1}return e=d(t),n=f[e]=o[e](t),{c(){v(l.$$.fragment),a=N(),n.c(),s=R()},m(r,m){A(l,r,m),U(r,a,m),f[e].m(r,m),U(r,s,m),i=!0},p(r,[m]){const u={};m&4&&(u.show_label=r[2]),m&1&&(u.float=r[0]===null),m&2&&(u.label=r[1]||"File"),l.$set(u);let b=e;e=d(r),e===b?f[e].p(r,m):(W(),g(f[b],1,1,()=>{f[b]=null}),H(),n=f[e],n?n.p(r,m):(n=f[e]=o[e](r),n.c()),h(n,1),n.m(s.parentNode,s))},i(r){i||(h(l.$$.fragment,r),h(n),i=!0)},o(r){g(l.$$.fragment,r),g(n),i=!1},d(r){y(l,r),r&&j(a),f[e].d(r),r&&j(s)}}}function He(t,l,a){let{$$slots:e={},$$scope:n}=l,{value:s}=l,{label:i}=l,{show_label:o=!0}=l,{file_count:f="single"}=l,{file_types:d=null}=l,{selectable:r=!1}=l;async function m({detail:c}){a(0,s=c),await ue(),b("change",s),b("upload",c)}function u({detail:c}){a(0,s=null),b("change",s),b("clear")}const b=L();let B;d==null?B=null:(d=d.map(c=>c.startsWith(".")?c:c+"/*"),B=d.join(", "));let k=!1;function w(c){M.call(this,t,c)}function D(c){k=c,a(5,k)}return t.$$set=c=>{"value"in c&&a(0,s=c.value),"label"in c&&a(1,i=c.label),"show_label"in c&&a(2,o=c.show_label),"file_count"in c&&a(3,f=c.file_count),"file_types"in c&&a(9,d=c.file_types),"selectable"in c&&a(4,r=c.selectable),"$$scope"in c&&a(13,n=c.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&b("drag",k)},[s,i,o,f,r,k,B,m,u,d,e,w,D,n]}class Je extends S{constructor(l){super(),q(this,l,He,We,C,{value:0,label:1,show_label:2,file_count:3,file_types:9,selectable:4})}}function Ke(t){let l,a;return l=new Ce({props:{selectable:t[9],value:t[11],label:t[5],show_label:t[6]}}),l.$on("select",t[21]),{c(){v(l.$$.fragment)},m(e,n){A(l,e,n),a=!0},p(e,n){const s={};n&512&&(s.selectable=e[9]),n&2048&&(s.value=e[11]),n&32&&(s.label=e[5]),n&64&&(s.show_label=e[6]),l.$set(s)},i(e){a||(h(l.$$.fragment,e),a=!0)},o(e){g(l.$$.fragment,e),a=!1},d(e){y(l,e)}}}function Ve(t){let l,a;return l=new Je({props:{label:t[5],show_label:t[6],value:t[11],file_count:t[7],file_types:t[8],selectable:t[9],$$slots:{default:[Xe]},$$scope:{ctx:t}}}),l.$on("change",t[17]),l.$on("drag",t[18]),l.$on("clear",t[19]),l.$on("select",t[20]),{c(){v(l.$$.fragment)},m(e,n){A(l,e,n),a=!0},p(e,n){const s={};n&32&&(s.label=e[5]),n&64&&(s.show_label=e[6]),n&2048&&(s.value=e[11]),n&128&&(s.file_count=e[7]),n&256&&(s.file_types=e[8]),n&512&&(s.selectable=e[9]),n&8388608&&(s.$$scope={dirty:n,ctx:e}),l.$set(s)},i(e){a||(h(l.$$.fragment,e),a=!0)},o(e){g(l.$$.fragment,e),a=!1},d(e){y(l,e)}}}function Xe(t){let l,a;return l=new je({props:{type:"file"}}),{c(){v(l.$$.fragment)},m(e,n){A(l,e,n),a=!0},p:P,i(e){a||(h(l.$$.fragment,e),a=!0)},o(e){g(l.$$.fragment,e),a=!1},d(e){y(l,e)}}}function Ye(t){let l,a,e,n,s,i;const o=[t[10],{status:t[13]?"generating":t[10]?.status||"complete"}];let f={};for(let u=0;u{r[k]=null}),H(),n=r[e],n?n.p(u,b):(n=r[e]=d[e](u),n.c()),h(n,1),n.m(s.parentNode,s))},i(u){i||(h(l.$$.fragment,u),h(n),i=!0)},o(u){g(l.$$.fragment,u),g(n),i=!1},d(u){y(l,u),u&&j(a),r[e].d(u),u&&j(s)}}}function Ze(t){let l,a;return l=new ye({props:{visible:t[3],variant:t[4]==="dynamic"&&t[0]===null?"dashed":"solid",border_mode:t[12]?"focus":"base",padding:!1,elem_id:t[1],elem_classes:t[2],$$slots:{default:[Ye]},$$scope:{ctx:t}}}),{c(){v(l.$$.fragment)},m(e,n){A(l,e,n),a=!0},p(e,[n]){const s={};n&8&&(s.visible=e[3]),n&17&&(s.variant=e[4]==="dynamic"&&e[0]===null?"dashed":"solid"),n&4096&&(s.border_mode=e[12]?"focus":"base"),n&2&&(s.elem_id=e[1]),n&4&&(s.elem_classes=e[2]),n&8404977&&(s.$$scope={dirty:n,ctx:e}),l.$set(s)},i(e){a||(h(l.$$.fragment,e),a=!0)},o(e){g(l.$$.fragment,e),a=!1},d(e){y(l,e)}}}function Qe(t,l,a){let e,{elem_id:n=""}=l,{elem_classes:s=[]}=l,{visible:i=!0}=l,{value:o}=l,f,{mode:d}=l,{root:r}=l,{label:m}=l,{show_label:u}=l,{file_count:b}=l,{file_types:B=["file"]}=l,{root_url:k}=l,{selectable:w=!1}=l,{loading_status:D}=l,c=!1,p=!1;const G=L(),te=({detail:_})=>a(0,o=_),ae=({detail:_})=>a(12,c=_);function ne(_){M.call(this,t,_)}function se(_){M.call(this,t,_)}function ie(_){M.call(this,t,_)}return t.$$set=_=>{"elem_id"in _&&a(1,n=_.elem_id),"elem_classes"in _&&a(2,s=_.elem_classes),"visible"in _&&a(3,i=_.visible),"value"in _&&a(0,o=_.value),"mode"in _&&a(4,d=_.mode),"root"in _&&a(14,r=_.root),"label"in _&&a(5,m=_.label),"show_label"in _&&a(6,u=_.show_label),"file_count"in _&&a(7,b=_.file_count),"file_types"in _&&a(8,B=_.file_types),"root_url"in _&&a(15,k=_.root_url),"selectable"in _&&a(9,w=_.selectable),"loading_status"in _&&a(10,D=_.loading_status)},t.$$.update=()=>{if(t.$$.dirty&49153&&a(11,e=Y(o,r,k)),t.$$.dirty&116753&&e!==f){if(a(16,f=e),e===null)G("change"),a(13,p=!1);else if(!(Array.isArray(e)?e:[e]).every(_=>_.blob))a(13,p=!1);else if(d==="dynamic"){let _=(Array.isArray(e)?e:[e]).map(I=>I.blob),re=e;a(13,p=!0),ke(r,_).then(I=>{re===e&&(a(13,p=!1),I.error?(Array.isArray(e)?e:[e]).forEach(async(T,K)=>{T.data=await Ue(T.blob)}):((Array.isArray(e)?e:[e]).forEach((T,K)=>{I.files&&(T.orig_name=T.name,T.name=I.files[K],T.is_file=!0)}),a(11,e=Y(o,r,k))),G("change"),G("upload"))})}}},[o,n,s,i,d,m,u,b,B,w,D,e,c,p,r,k,f,te,ae,ne,se,ie]}class $e extends S{constructor(l){super(),q(this,l,Qe,Ze,C,{elem_id:1,elem_classes:2,visible:3,value:0,mode:4,root:14,label:5,show_label:6,file_count:7,file_types:8,root_url:15,selectable:9,loading_status:10})}}var ul=$e;const _l=["static","dynamic"],cl=t=>({type:{input_payload:"{ name: string; data: string }",response_object:"{ orig_name: string; name: string, size: number, data: string, is_file: boolean}"},description:{input_payload:"object with file name and base64 data",response_object:"object that includes path to file. The URL: {ROOT}file={name} contains the data"},example_data:{name:"zip.zip",data:"data:@file/octet-stream;base64,UEsFBgAAAAAAAAAAAAAAAAAAAAAAAA=="}});export{ul as Component,cl as document,_l as modes}; +//# sourceMappingURL=index.39c24762.js.map diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.3c2bfbb6.js b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.3c2bfbb6.js new file mode 100644 index 0000000000000000000000000000000000000000..7c9d2ff22b2256e679a0cc8c9c88b59ec92808b1 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.3c2bfbb6.js @@ -0,0 +1,3744 @@ +import{S as _y,i as wy,s as ky,A as Np,B as Ma,f as Yf,D as Oh,E as Mu,p as Xf,F as y0,q as AG,ac as ND,b as mA,a as MG,c as Rd,m as Fd,j as SG,o as Uf,t as Vf,l as Nd,x as J4,e as EG,k as CG,n as OG,af as LG,al as S5,K as _C,H as PG,J as DG,G as K4,v as IG,a7 as zG,g as RG,h as FG}from"./index.7a68216a.js";import{c as Ro,a as Kx,b as NG}from"./_commonjsHelpers.a5007c1f.js";/* empty css */import{g as BG}from"./color.f2fbe15a.js";import{a as qv,n as jG,b as UG,c as q2,t as x0,f as Q4,p as VG,d as qG,e as HG,g as BD,h as $G,i as GG,j as Yo,k as Nm,l as WG,_ as jD,m as UD,x as YG,y as XG,o as Yh,R as H2,r as VD,q as vA,s as yA,C as xA,u as wC,v as kC,w as $2,z as Zp,A as ek,B as zl,D as Ty,E as ZG,F as JG,G as KG,H as QG,I as eW,J as tW,K as G2,L as nW,M as rW,N as iW,O as aW,P as TC,Q as Bm,S as bA,T as W2,U as AC,V as Md,W as Y2,X as oW,Y as fp,Z as sW,$ as tk,a0 as lW,a1 as f_,a2 as uW}from"./linear.955f0731.js";import{d as cW}from"./dsv.7fe76a93.js";import{a as fW}from"./Empty.svelte_svelte_type_style_lang.d7a3af78.js";import{E as hW}from"./Empty.092ff864.js";import{B as dW}from"./BlockLabel.fd555cfa.js";import"./Blocks.1c8a32b7.js";function pW(t){let n,e,o,f,r,a,l;return{c(){n=Np("svg"),e=Np("circle"),o=Np("circle"),f=Np("circle"),r=Np("circle"),a=Np("circle"),l=Np("path"),Ma(e,"cx","20"),Ma(e,"cy","4"),Ma(e,"r","2"),Ma(e,"fill","currentColor"),Ma(o,"cx","8"),Ma(o,"cy","16"),Ma(o,"r","2"),Ma(o,"fill","currentColor"),Ma(f,"cx","28"),Ma(f,"cy","12"),Ma(f,"r","2"),Ma(f,"fill","currentColor"),Ma(r,"cx","11"),Ma(r,"cy","7"),Ma(r,"r","2"),Ma(r,"fill","currentColor"),Ma(a,"cx","16"),Ma(a,"cy","24"),Ma(a,"r","2"),Ma(a,"fill","currentColor"),Ma(l,"fill","currentColor"),Ma(l,"d","M30 3.413L28.586 2L4 26.585V2H2v26a2 2 0 0 0 2 2h26v-2H5.413Z"),Ma(n,"xmlns","http://www.w3.org/2000/svg"),Ma(n,"xmlns:xlink","http://www.w3.org/1999/xlink"),Ma(n,"aria-hidden","true"),Ma(n,"role","img"),Ma(n,"class","iconify iconify--carbon"),Ma(n,"width","100%"),Ma(n,"height","100%"),Ma(n,"preserveAspectRatio","xMidYMid meet"),Ma(n,"viewBox","0 0 32 32")},m(c,i){Yf(c,n,i),Oh(n,e),Oh(n,o),Oh(n,f),Oh(n,r),Oh(n,a),Oh(n,l)},p:Mu,i:Mu,o:Mu,d(c){c&&Xf(n)}}}class qD extends _y{constructor(n){super(),wy(this,n,null,pW,ky,{})}}var HD={exports:{}};(function(t,n){(function(e){t.exports=e()})(function(){return function e(o,f,r){function a(i,s){if(!f[i]){if(!o[i]){var u=typeof Kx=="function"&&Kx;if(!s&&u)return u(i,!0);if(l)return l(i,!0);var d=new Error("Cannot find module '"+i+"'");throw d.code="MODULE_NOT_FOUND",d}var h=f[i]={exports:{}};o[i][0].call(h.exports,function(m){return a(o[i][1][m]||m)},h,h.exports,e,o,f,r)}return f[i].exports}for(var l=typeof Kx=="function"&&Kx,c=0;c: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 .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","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:transparent;border:6px solid transparent;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 transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .select-outline":"fill:none;stroke-width:1;shape-rendering:crispEdges;","X .select-outline-1":"stroke:#fff;","X .select-outline-2":"stroke:#000;stroke-dasharray:2px 2px;",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(var l in a){var c=l.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");r.addStyleRule(c,a[l])}},{"../src/lib":503}],2:[function(e,o,f){o.exports=e("../src/transforms/aggregate")},{"../src/transforms/aggregate":1118}],3:[function(e,o,f){o.exports=e("../src/traces/bar")},{"../src/traces/bar":656}],4:[function(e,o,f){o.exports=e("../src/traces/barpolar")},{"../src/traces/barpolar":669}],5:[function(e,o,f){o.exports=e("../src/traces/box")},{"../src/traces/box":679}],6:[function(e,o,f){o.exports=e("../src/components/calendars")},{"../src/components/calendars":364}],7:[function(e,o,f){o.exports=e("../src/traces/candlestick")},{"../src/traces/candlestick":688}],8:[function(e,o,f){o.exports=e("../src/traces/carpet")},{"../src/traces/carpet":707}],9:[function(e,o,f){o.exports=e("../src/traces/choropleth")},{"../src/traces/choropleth":721}],10:[function(e,o,f){o.exports=e("../src/traces/choroplethmapbox")},{"../src/traces/choroplethmapbox":728}],11:[function(e,o,f){o.exports=e("../src/traces/cone")},{"../src/traces/cone":734}],12:[function(e,o,f){o.exports=e("../src/traces/contour")},{"../src/traces/contour":749}],13:[function(e,o,f){o.exports=e("../src/traces/contourcarpet")},{"../src/traces/contourcarpet":760}],14:[function(e,o,f){o.exports=e("../src/core")},{"../src/core":481}],15:[function(e,o,f){o.exports=e("../src/traces/densitymapbox")},{"../src/traces/densitymapbox":768}],16:[function(e,o,f){o.exports=e("../src/transforms/filter")},{"../src/transforms/filter":1119}],17:[function(e,o,f){o.exports=e("../src/traces/funnel")},{"../src/traces/funnel":778}],18:[function(e,o,f){o.exports=e("../src/traces/funnelarea")},{"../src/traces/funnelarea":787}],19:[function(e,o,f){o.exports=e("../src/transforms/groupby")},{"../src/transforms/groupby":1120}],20:[function(e,o,f){o.exports=e("../src/traces/heatmap")},{"../src/traces/heatmap":800}],21:[function(e,o,f){o.exports=e("../src/traces/heatmapgl")},{"../src/traces/heatmapgl":811}],22:[function(e,o,f){o.exports=e("../src/traces/histogram")},{"../src/traces/histogram":823}],23:[function(e,o,f){o.exports=e("../src/traces/histogram2d")},{"../src/traces/histogram2d":829}],24:[function(e,o,f){o.exports=e("../src/traces/histogram2dcontour")},{"../src/traces/histogram2dcontour":833}],25:[function(e,o,f){o.exports=e("../src/traces/icicle")},{"../src/traces/icicle":839}],26:[function(e,o,f){o.exports=e("../src/traces/image")},{"../src/traces/image":852}],27:[function(e,o,f){var r=e("./core");r.register([e("./bar"),e("./box"),e("./heatmap"),e("./histogram"),e("./histogram2d"),e("./histogram2dcontour"),e("./contour"),e("./scatterternary"),e("./violin"),e("./funnel"),e("./waterfall"),e("./image"),e("./pie"),e("./sunburst"),e("./treemap"),e("./icicle"),e("./funnelarea"),e("./scatter3d"),e("./surface"),e("./isosurface"),e("./volume"),e("./mesh3d"),e("./cone"),e("./streamtube"),e("./scattergeo"),e("./choropleth"),e("./scattergl"),e("./splom"),e("./pointcloud"),e("./heatmapgl"),e("./parcoords"),e("./parcats"),e("./scattermapbox"),e("./choroplethmapbox"),e("./densitymapbox"),e("./sankey"),e("./indicator"),e("./table"),e("./carpet"),e("./scattercarpet"),e("./contourcarpet"),e("./ohlc"),e("./candlestick"),e("./scatterpolar"),e("./scatterpolargl"),e("./barpolar"),e("./scattersmith"),e("./aggregate"),e("./filter"),e("./groupby"),e("./sort"),e("./calendars")]),o.exports=r},{"./aggregate":2,"./bar":3,"./barpolar":4,"./box":5,"./calendars":6,"./candlestick":7,"./carpet":8,"./choropleth":9,"./choroplethmapbox":10,"./cone":11,"./contour":12,"./contourcarpet":13,"./core":14,"./densitymapbox":15,"./filter":16,"./funnel":17,"./funnelarea":18,"./groupby":19,"./heatmap":20,"./heatmapgl":21,"./histogram":22,"./histogram2d":23,"./histogram2dcontour":24,"./icicle":25,"./image":26,"./indicator":28,"./isosurface":29,"./mesh3d":30,"./ohlc":31,"./parcats":32,"./parcoords":33,"./pie":34,"./pointcloud":35,"./sankey":36,"./scatter3d":37,"./scattercarpet":38,"./scattergeo":39,"./scattergl":40,"./scattermapbox":41,"./scatterpolar":42,"./scatterpolargl":43,"./scattersmith":44,"./scatterternary":45,"./sort":46,"./splom":47,"./streamtube":48,"./sunburst":49,"./surface":50,"./table":51,"./treemap":52,"./violin":53,"./volume":54,"./waterfall":55}],28:[function(e,o,f){o.exports=e("../src/traces/indicator")},{"../src/traces/indicator":860}],29:[function(e,o,f){o.exports=e("../src/traces/isosurface")},{"../src/traces/isosurface":866}],30:[function(e,o,f){o.exports=e("../src/traces/mesh3d")},{"../src/traces/mesh3d":871}],31:[function(e,o,f){o.exports=e("../src/traces/ohlc")},{"../src/traces/ohlc":876}],32:[function(e,o,f){o.exports=e("../src/traces/parcats")},{"../src/traces/parcats":885}],33:[function(e,o,f){o.exports=e("../src/traces/parcoords")},{"../src/traces/parcoords":896}],34:[function(e,o,f){o.exports=e("../src/traces/pie")},{"../src/traces/pie":907}],35:[function(e,o,f){o.exports=e("../src/traces/pointcloud")},{"../src/traces/pointcloud":916}],36:[function(e,o,f){o.exports=e("../src/traces/sankey")},{"../src/traces/sankey":922}],37:[function(e,o,f){o.exports=e("../src/traces/scatter3d")},{"../src/traces/scatter3d":960}],38:[function(e,o,f){o.exports=e("../src/traces/scattercarpet")},{"../src/traces/scattercarpet":967}],39:[function(e,o,f){o.exports=e("../src/traces/scattergeo")},{"../src/traces/scattergeo":975}],40:[function(e,o,f){o.exports=e("../src/traces/scattergl")},{"../src/traces/scattergl":989}],41:[function(e,o,f){o.exports=e("../src/traces/scattermapbox")},{"../src/traces/scattermapbox":999}],42:[function(e,o,f){o.exports=e("../src/traces/scatterpolar")},{"../src/traces/scatterpolar":1007}],43:[function(e,o,f){o.exports=e("../src/traces/scatterpolargl")},{"../src/traces/scatterpolargl":1015}],44:[function(e,o,f){o.exports=e("../src/traces/scattersmith")},{"../src/traces/scattersmith":1022}],45:[function(e,o,f){o.exports=e("../src/traces/scatterternary")},{"../src/traces/scatterternary":1030}],46:[function(e,o,f){o.exports=e("../src/transforms/sort")},{"../src/transforms/sort":1122}],47:[function(e,o,f){o.exports=e("../src/traces/splom")},{"../src/traces/splom":1040}],48:[function(e,o,f){o.exports=e("../src/traces/streamtube")},{"../src/traces/streamtube":1048}],49:[function(e,o,f){o.exports=e("../src/traces/sunburst")},{"../src/traces/sunburst":1056}],50:[function(e,o,f){o.exports=e("../src/traces/surface")},{"../src/traces/surface":1065}],51:[function(e,o,f){o.exports=e("../src/traces/table")},{"../src/traces/table":1073}],52:[function(e,o,f){o.exports=e("../src/traces/treemap")},{"../src/traces/treemap":1084}],53:[function(e,o,f){o.exports=e("../src/traces/violin")},{"../src/traces/violin":1097}],54:[function(e,o,f){o.exports=e("../src/traces/volume")},{"../src/traces/volume":1105}],55:[function(e,o,f){o.exports=e("../src/traces/waterfall")},{"../src/traces/waterfall":1113}],56:[function(e,o,f){(function(r,a){typeof f=="object"&&o!==void 0?a(f,e("d3-array"),e("d3-collection"),e("d3-shape"),e("elementary-circuits-directed-graph")):a(r.d3=r.d3||{},r.d3,r.d3,r.d3,null)})(this,function(r,a,l,c,i){function s(ie){return ie.target.depth}function u(ie,ae){return ie.sourceLinks.length?ie.depth:ae-1}function d(ie){return function(){return ie}}i=i&&i.hasOwnProperty("default")?i.default:i;var h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ie){return typeof ie}:function(ie){return ie&&typeof Symbol=="function"&&ie.constructor===Symbol&&ie!==Symbol.prototype?"symbol":typeof ie};function m(ie,ae){return p(ie.source,ae.source)||ie.index-ae.index}function g(ie,ae){return p(ie.target,ae.target)||ie.index-ae.index}function p(ie,ae){return ie.partOfCycle===ae.partOfCycle?ie.y0-ae.y0:ie.circularLinkType==="top"||ae.circularLinkType==="bottom"?-1:1}function v(ie){return ie.value}function y(ie){return(ie.y0+ie.y1)/2}function x(ie){return y(ie.source)}function w(ie){return y(ie.target)}function k(ie){return ie.index}function b(ie){return ie.nodes}function T(ie){return ie.links}function _(ie,ae){var ue=ie.get(ae);if(!ue)throw new Error("missing: "+ae);return ue}function S(ie,ae){return ae(ie)}function A(ie,ae,ue){var le=0;if(ue===null){for(var ge=[],fe=0;fe1||ge>1)}function R(ie,ae,ue){return ie.sort(L),ie.forEach(function(le,ge){var fe,me,_e=0;if(Q(le,ue)&&O(le))le.circularPathData.verticalBuffer=_e+le.width/2;else{for(var we=0;weme.source.column)){var Te=ie[we].circularPathData.verticalBuffer+ie[we].width/2+ae;_e=Te>_e?Te:_e}le.circularPathData.verticalBuffer=_e+le.width/2}}),ie}function z(ie,ae,ue,le){var ge=a.min(ie.links,function(fe){return fe.source.y0});ie.links.forEach(function(fe){fe.circular&&(fe.circularPathData={})}),R(ie.links.filter(function(fe){return fe.circularLinkType=="top"}),ae,le),R(ie.links.filter(function(fe){return fe.circularLinkType=="bottom"}),ae,le),ie.links.forEach(function(fe){if(fe.circular){if(fe.circularPathData.arcRadius=fe.width+10,fe.circularPathData.leftNodeBuffer=5,fe.circularPathData.rightNodeBuffer=5,fe.circularPathData.sourceWidth=fe.source.x1-fe.source.x0,fe.circularPathData.sourceX=fe.source.x0+fe.circularPathData.sourceWidth,fe.circularPathData.targetX=fe.target.x0,fe.circularPathData.sourceY=fe.y0,fe.circularPathData.targetY=fe.y1,Q(fe,le)&&O(fe))fe.circularPathData.leftSmallArcRadius=10+fe.width/2,fe.circularPathData.leftLargeArcRadius=10+fe.width/2,fe.circularPathData.rightSmallArcRadius=10+fe.width/2,fe.circularPathData.rightLargeArcRadius=10+fe.width/2,fe.circularLinkType=="bottom"?(fe.circularPathData.verticalFullExtent=fe.source.y1+25+fe.circularPathData.verticalBuffer,fe.circularPathData.verticalLeftInnerExtent=fe.circularPathData.verticalFullExtent-fe.circularPathData.leftLargeArcRadius,fe.circularPathData.verticalRightInnerExtent=fe.circularPathData.verticalFullExtent-fe.circularPathData.rightLargeArcRadius):(fe.circularPathData.verticalFullExtent=fe.source.y0-25-fe.circularPathData.verticalBuffer,fe.circularPathData.verticalLeftInnerExtent=fe.circularPathData.verticalFullExtent+fe.circularPathData.leftLargeArcRadius,fe.circularPathData.verticalRightInnerExtent=fe.circularPathData.verticalFullExtent+fe.circularPathData.rightLargeArcRadius);else{var me=fe.source.column,_e=fe.circularLinkType,we=ie.links.filter(function(de){return de.source.column==me&&de.circularLinkType==_e});fe.circularLinkType=="bottom"?we.sort(N):we.sort(P);var Te=0;we.forEach(function(de,ye){de.circularLinkID==fe.circularLinkID&&(fe.circularPathData.leftSmallArcRadius=10+fe.width/2+Te,fe.circularPathData.leftLargeArcRadius=10+fe.width/2+ye*ae+Te),Te+=de.width}),me=fe.target.column,we=ie.links.filter(function(de){return de.target.column==me&&de.circularLinkType==_e}),fe.circularLinkType=="bottom"?we.sort(G):we.sort(B),Te=0,we.forEach(function(de,ye){de.circularLinkID==fe.circularLinkID&&(fe.circularPathData.rightSmallArcRadius=10+fe.width/2+Te,fe.circularPathData.rightLargeArcRadius=10+fe.width/2+ye*ae+Te),Te+=de.width}),fe.circularLinkType=="bottom"?(fe.circularPathData.verticalFullExtent=Math.max(ue,fe.source.y1,fe.target.y1)+25+fe.circularPathData.verticalBuffer,fe.circularPathData.verticalLeftInnerExtent=fe.circularPathData.verticalFullExtent-fe.circularPathData.leftLargeArcRadius,fe.circularPathData.verticalRightInnerExtent=fe.circularPathData.verticalFullExtent-fe.circularPathData.rightLargeArcRadius):(fe.circularPathData.verticalFullExtent=ge-25-fe.circularPathData.verticalBuffer,fe.circularPathData.verticalLeftInnerExtent=fe.circularPathData.verticalFullExtent+fe.circularPathData.leftLargeArcRadius,fe.circularPathData.verticalRightInnerExtent=fe.circularPathData.verticalFullExtent+fe.circularPathData.rightLargeArcRadius)}fe.circularPathData.leftInnerExtent=fe.circularPathData.sourceX+fe.circularPathData.leftNodeBuffer,fe.circularPathData.rightInnerExtent=fe.circularPathData.targetX-fe.circularPathData.rightNodeBuffer,fe.circularPathData.leftFullExtent=fe.circularPathData.sourceX+fe.circularPathData.leftLargeArcRadius+fe.circularPathData.leftNodeBuffer,fe.circularPathData.rightFullExtent=fe.circularPathData.targetX-fe.circularPathData.rightLargeArcRadius-fe.circularPathData.rightNodeBuffer}if(fe.circular)fe.path=function(de){var ye="";return ye=de.circularLinkType=="top"?"M"+de.circularPathData.sourceX+" "+de.circularPathData.sourceY+" L"+de.circularPathData.leftInnerExtent+" "+de.circularPathData.sourceY+" A"+de.circularPathData.leftLargeArcRadius+" "+de.circularPathData.leftSmallArcRadius+" 0 0 0 "+de.circularPathData.leftFullExtent+" "+(de.circularPathData.sourceY-de.circularPathData.leftSmallArcRadius)+" L"+de.circularPathData.leftFullExtent+" "+de.circularPathData.verticalLeftInnerExtent+" A"+de.circularPathData.leftLargeArcRadius+" "+de.circularPathData.leftLargeArcRadius+" 0 0 0 "+de.circularPathData.leftInnerExtent+" "+de.circularPathData.verticalFullExtent+" L"+de.circularPathData.rightInnerExtent+" "+de.circularPathData.verticalFullExtent+" A"+de.circularPathData.rightLargeArcRadius+" "+de.circularPathData.rightLargeArcRadius+" 0 0 0 "+de.circularPathData.rightFullExtent+" "+de.circularPathData.verticalRightInnerExtent+" L"+de.circularPathData.rightFullExtent+" "+(de.circularPathData.targetY-de.circularPathData.rightSmallArcRadius)+" A"+de.circularPathData.rightLargeArcRadius+" "+de.circularPathData.rightSmallArcRadius+" 0 0 0 "+de.circularPathData.rightInnerExtent+" "+de.circularPathData.targetY+" L"+de.circularPathData.targetX+" "+de.circularPathData.targetY:"M"+de.circularPathData.sourceX+" "+de.circularPathData.sourceY+" L"+de.circularPathData.leftInnerExtent+" "+de.circularPathData.sourceY+" A"+de.circularPathData.leftLargeArcRadius+" "+de.circularPathData.leftSmallArcRadius+" 0 0 1 "+de.circularPathData.leftFullExtent+" "+(de.circularPathData.sourceY+de.circularPathData.leftSmallArcRadius)+" L"+de.circularPathData.leftFullExtent+" "+de.circularPathData.verticalLeftInnerExtent+" A"+de.circularPathData.leftLargeArcRadius+" "+de.circularPathData.leftLargeArcRadius+" 0 0 1 "+de.circularPathData.leftInnerExtent+" "+de.circularPathData.verticalFullExtent+" L"+de.circularPathData.rightInnerExtent+" "+de.circularPathData.verticalFullExtent+" A"+de.circularPathData.rightLargeArcRadius+" "+de.circularPathData.rightLargeArcRadius+" 0 0 1 "+de.circularPathData.rightFullExtent+" "+de.circularPathData.verticalRightInnerExtent+" L"+de.circularPathData.rightFullExtent+" "+(de.circularPathData.targetY+de.circularPathData.rightSmallArcRadius)+" A"+de.circularPathData.rightLargeArcRadius+" "+de.circularPathData.rightSmallArcRadius+" 0 0 1 "+de.circularPathData.rightInnerExtent+" "+de.circularPathData.targetY+" L"+de.circularPathData.targetX+" "+de.circularPathData.targetY,ye}(fe);else{var Oe=c.linkHorizontal().source(function(de){return[de.source.x0+(de.source.x1-de.source.x0),de.y0]}).target(function(de){return[de.target.x0,de.y1]});fe.path=Oe(fe)}})}function L(ie,ae){return W(ie)==W(ae)?ie.circularLinkType=="bottom"?N(ie,ae):P(ie,ae):W(ae)-W(ie)}function P(ie,ae){return ie.y0-ae.y0}function N(ie,ae){return ae.y0-ie.y0}function B(ie,ae){return ie.y1-ae.y1}function G(ie,ae){return ae.y1-ie.y1}function W(ie){return ie.target.column-ie.source.column}function K(ie){return ie.target.x0-ie.source.x1}function te(ie,ae){var ue=E(ie),le=K(ae)/Math.tan(ue);return H(ie)=="up"?ie.y1+le:ie.y1-le}function Y(ie,ae){var ue=E(ie),le=K(ae)/Math.tan(ue);return H(ie)=="up"?ie.y1-le:ie.y1+le}function Z(ie,ae,ue,le){ie.links.forEach(function(ge){if(!ge.circular&&ge.target.column-ge.source.column>1){var fe=ge.source.column+1,me=ge.target.column-1,_e=1,we=me-fe+1;for(_e=1;fe<=me;fe++,_e++)ie.nodes.forEach(function(Te){if(Te.column==fe){var Oe,de=_e/(we+1),ye=Math.pow(1-de,3),Me=3*de*Math.pow(1-de,2),ke=3*Math.pow(de,2)*(1-de),Ee=Math.pow(de,3),ze=ye*ge.y0+Me*ge.y0+ke*ge.y1+Ee*ge.y1,Fe=ze-ge.width/2,Ve=ze+ge.width/2;Fe>Te.y0&&FeTe.y0&&VeTe.y1)&&(Oe=Ve-Te.y0+10,Te=U(Te,Oe,ae,ue),ie.nodes.forEach(function(Ke){S(Ke,le)!=S(Te,le)&&Ke.column==Te.column&&Ke.y0Te.y1&&U(Ke,Oe,ae,ue)}))}})}})}function re(ie,ae){return ie.y0>ae.y0&&ie.y0ae.y0&&ie.y1ae.y1}function U(ie,ae,ue,le){return ie.y0+ae>=ue&&ie.y1+ae<=le&&(ie.y0=ie.y0+ae,ie.y1=ie.y1+ae,ie.targetLinks.forEach(function(ge){ge.y1=ge.y1+ae}),ie.sourceLinks.forEach(function(ge){ge.y0=ge.y0+ae})),ie}function q(ie,ae,ue,le){ie.nodes.forEach(function(ge){le&&ge.y+(ge.y1-ge.y0)>ae&&(ge.y=ge.y-(ge.y+(ge.y1-ge.y0)-ae));var fe=ie.links.filter(function(we){return S(we.source,ue)==S(ge,ue)}),me=fe.length;me>1&&fe.sort(function(we,Te){if(!we.circular&&!Te.circular){if(we.target.column==Te.target.column||!ne(we,Te))return we.y1-Te.y1;if(we.target.column>Te.target.column){var Oe=Y(Te,we);return we.y1-Oe}if(Te.target.column>we.target.column)return Y(we,Te)-Te.y1}return we.circular&&!Te.circular?we.circularLinkType=="top"?-1:1:Te.circular&&!we.circular?Te.circularLinkType=="top"?1:-1:we.circular&&Te.circular?we.circularLinkType===Te.circularLinkType&&we.circularLinkType=="top"?we.target.column===Te.target.column?we.target.y1-Te.target.y1:Te.target.column-we.target.column:we.circularLinkType===Te.circularLinkType&&we.circularLinkType=="bottom"?we.target.column===Te.target.column?Te.target.y1-we.target.y1:we.target.column-Te.target.column:we.circularLinkType=="top"?-1:1:void 0});var _e=ge.y0;fe.forEach(function(we){we.y0=_e+we.width/2,_e+=we.width}),fe.forEach(function(we,Te){if(we.circularLinkType=="bottom"){for(var Oe=Te+1,de=0;Oe1&&ge.sort(function(_e,we){if(!_e.circular&&!we.circular){if(_e.source.column==we.source.column||!ne(_e,we))return _e.y0-we.y0;if(we.source.column<_e.source.column){var Te=te(we,_e);return _e.y0-Te}if(_e.source.column0?"up":"down"}function Q(ie,ae){return S(ie.source,ae)==S(ie.target,ae)}function ee(ie,ae,ue){var le=ie.nodes,ge=ie.links,fe=!1,me=!1;if(ge.forEach(function(Te){Te.circularLinkType=="top"?fe=!0:Te.circularLinkType=="bottom"&&(me=!0)}),fe==0||me==0){var _e=a.min(le,function(Te){return Te.y0}),we=(ue-ae)/(a.max(le,function(Te){return Te.y1})-_e);le.forEach(function(Te){var Oe=(Te.y1-Te.y0)*we;Te.y0=(Te.y0-_e)*we,Te.y1=Te.y0+Oe}),ge.forEach(function(Te){Te.y0=(Te.y0-_e)*we,Te.y1=(Te.y1-_e)*we,Te.width=Te.width*we})}}r.sankeyCircular=function(){var ie,ae,ue=0,le=0,ge=1,fe=1,me=24,_e=k,we=u,Te=b,Oe=T,de=32,ye=2,Me=null;function ke(){var Re={nodes:Te.apply(null,arguments),links:Oe.apply(null,arguments)};Ee(Re),A(Re,_e,Me),ze(Re),Fe(Re),M(Re,_e),Ve(Re,de,_e),Ke(Re);for(var qe=4,We=0;We0?Be+25+10:Be,bottom:Ge=Ge>0?Ge+25+10:Ge,left:dt=dt>0?dt+25+10:dt,right:Tt=Tt>0?Tt+25+10:Tt}}(Re),Wt=function(Jt,Be){var Ge=a.max(Jt.nodes,function(Ae){return Ae.column}),Tt=ge-ue,dt=fe-le,Pe=Tt/(Tt+Be.right+Be.left),Ie=dt/(dt+Be.top+Be.bottom);return ue=ue*Pe+Be.left,ge=Be.right==0?ge:ge*Pe,le=le*Ie+Be.top,fe*=Ie,Jt.nodes.forEach(function(Ae){Ae.x0=ue+Ae.column*((ge-ue-me)/Ge),Ae.x1=Ae.x0+me}),Ie}(Re,Ot);et*=Wt,Re.links.forEach(function(Jt){Jt.width=Jt.value*et}),Ye.forEach(function(Jt){var Be=Jt.length;Jt.forEach(function(Ge,Tt){Ge.depth==Ye.length-1&&Be==1||Ge.depth==0&&Be==1?(Ge.y0=fe/2-Ge.value*et,Ge.y1=Ge.y0+Ge.value*et):Ge.partOfCycle?D(Ge,At)==0?(Ge.y0=fe/2+Tt,Ge.y1=Ge.y0+Ge.value*et):Ge.circularLinkType=="top"?(Ge.y0=le+Tt,Ge.y1=Ge.y0+Ge.value*et):(Ge.y0=fe-Ge.value*et-Tt,Ge.y1=Ge.y0+Ge.value*et):Ot.top==0||Ot.bottom==0?(Ge.y0=(fe-le)/Be*Tt,Ge.y1=Ge.y0+Ge.value*et):(Ge.y0=(fe-le)/2-Be/2+Tt,Ge.y1=Ge.y0+Ge.value*et)})})})(We),Pt();for(var nt=1,ft=qe;ft>0;--ft)vt(nt*=.99,We),Pt();function vt(At,at){var et=Ye.length;Ye.forEach(function(Ot){var Wt=Ot.length,Jt=Ot[0].depth;Ot.forEach(function(Be){var Ge;if((Be.sourceLinks.length||Be.targetLinks.length)&&!(Be.partOfCycle&&D(Be,at)>0))if(Jt==0&&Wt==1)Ge=Be.y1-Be.y0,Be.y0=fe/2-Ge/2,Be.y1=fe/2+Ge/2;else if(Jt==et-1&&Wt==1)Ge=Be.y1-Be.y0,Be.y0=fe/2-Ge/2,Be.y1=fe/2+Ge/2;else{var Tt=a.mean(Be.sourceLinks,w),dt=a.mean(Be.targetLinks,x),Pe=((Tt&&dt?(Tt+dt)/2:Tt||dt)-y(Be))*At;Be.y0+=Pe,Be.y1+=Pe}})})}function Pt(){Ye.forEach(function(At){var at,et,Ot,Wt=le,Jt=At.length;for(At.sort(p),Ot=0;Ot0&&(at.y0+=et,at.y1+=et),Wt=at.y1+ie;if((et=Wt-ie-fe)>0)for(Wt=at.y0-=et,at.y1-=et,Ot=Jt-2;Ot>=0;--Ot)(et=(at=At[Ot]).y1+ie-Wt)>0&&(at.y0-=et,at.y1-=et),Wt=at.y0})}}function Ke(Re){Re.nodes.forEach(function(qe){qe.sourceLinks.sort(g),qe.targetLinks.sort(m)}),Re.nodes.forEach(function(qe){var We=qe.y0,Ye=We,nt=qe.y1,ft=nt;qe.sourceLinks.forEach(function(vt){vt.circular?(vt.y0=nt-vt.width/2,nt-=vt.width):(vt.y0=We+vt.width/2,We+=vt.width)}),qe.targetLinks.forEach(function(vt){vt.circular?(vt.y1=ft-vt.width/2,ft-=vt.width):(vt.y1=Ye+vt.width/2,Ye+=vt.width)})})}return ke.nodeId=function(Re){return arguments.length?(_e=typeof Re=="function"?Re:d(Re),ke):_e},ke.nodeAlign=function(Re){return arguments.length?(we=typeof Re=="function"?Re:d(Re),ke):we},ke.nodeWidth=function(Re){return arguments.length?(me=+Re,ke):me},ke.nodePadding=function(Re){return arguments.length?(ie=+Re,ke):ie},ke.nodes=function(Re){return arguments.length?(Te=typeof Re=="function"?Re:d(Re),ke):Te},ke.links=function(Re){return arguments.length?(Oe=typeof Re=="function"?Re:d(Re),ke):Oe},ke.size=function(Re){return arguments.length?(ue=le=0,ge=+Re[0],fe=+Re[1],ke):[ge-ue,fe-le]},ke.extent=function(Re){return arguments.length?(ue=+Re[0][0],ge=+Re[1][0],le=+Re[0][1],fe=+Re[1][1],ke):[[ue,le],[ge,fe]]},ke.iterations=function(Re){return arguments.length?(de=+Re,ke):de},ke.circularLinkGap=function(Re){return arguments.length?(ye=+Re,ke):ye},ke.nodePaddingRatio=function(Re){return arguments.length?(ae=+Re,ke):ae},ke.sortNodes=function(Re){return arguments.length?(Me=Re,ke):Me},ke.update=function(Re){return M(Re,_e),Ke(Re),Re.links.forEach(function(qe){qe.circular&&(qe.circularLinkType=qe.y0+qe.y1ee&&(O=ee);var ie=a.min(re,function(ae){return(E-A-(ae.length-1)*O)/a.sum(ae,g)});re.forEach(function(ae){ae.forEach(function(ue,le){ue.y1=(ue.y0=le)+ue.value*ie})}),Z.links.forEach(function(ae){ae.width=ae.value*ie})})(),H();for(var U=1,q=N;q>0;--q)ne(U*=.99),H(),$(U),H();function $(Q){re.forEach(function(ee){ee.forEach(function(ie){if(ie.targetLinks.length){var ae=(a.sum(ie.targetLinks,v)/a.sum(ie.targetLinks,g)-p(ie))*Q;ie.y0+=ae,ie.y1+=ae}})})}function ne(Q){re.slice().reverse().forEach(function(ee){ee.forEach(function(ie){if(ie.sourceLinks.length){var ae=(a.sum(ie.sourceLinks,y)/a.sum(ie.sourceLinks,g)-p(ie))*Q;ie.y0+=ae,ie.y1+=ae}})})}function H(){re.forEach(function(Q){var ee,ie,ae,ue=A,le=Q.length;for(Q.sort(m),ae=0;ae0&&(ee.y0+=ie,ee.y1+=ie),ue=ee.y1+O;if((ie=ue-O-E)>0)for(ue=ee.y0-=ie,ee.y1-=ie,ae=le-2;ae>=0;--ae)(ie=(ee=Q[ae]).y1+O-ue)>0&&(ee.y0-=ie,ee.y1-=ie),ue=ee.y0})}}function Y(Z){Z.nodes.forEach(function(re){re.sourceLinks.sort(h),re.targetLinks.sort(d)}),Z.nodes.forEach(function(re){var U=re.y0,q=U;re.sourceLinks.forEach(function($){$.y0=U+$.width/2,U+=$.width}),re.targetLinks.forEach(function($){$.y1=q+$.width/2,q+=$.width})})}return B.update=function(Z){return Y(Z),Z},B.nodeId=function(Z){return arguments.length?(R=typeof Z=="function"?Z:u(Z),B):R},B.nodeAlign=function(Z){return arguments.length?(z=typeof Z=="function"?Z:u(Z),B):z},B.nodeWidth=function(Z){return arguments.length?(D=+Z,B):D},B.nodePadding=function(Z){return arguments.length?(O=+Z,B):O},B.nodes=function(Z){return arguments.length?(L=typeof Z=="function"?Z:u(Z),B):L},B.links=function(Z){return arguments.length?(P=typeof Z=="function"?Z:u(Z),B):P},B.size=function(Z){return arguments.length?(S=A=0,M=+Z[0],E=+Z[1],B):[M-S,E-A]},B.extent=function(Z){return arguments.length?(S=+Z[0][0],M=+Z[1][0],A=+Z[0][1],E=+Z[1][1],B):[[S,A],[M,E]]},B.iterations=function(Z){return arguments.length?(N=+Z,B):N},B},r.sankeyCenter=function(S){return S.targetLinks.length?S.depth:S.sourceLinks.length?a.min(S.sourceLinks,i)-1:0},r.sankeyLeft=function(S){return S.depth},r.sankeyRight=function(S,A){return A-1-S.height},r.sankeyJustify=s,r.sankeyLinkHorizontal=function(){return c.linkHorizontal().source(T).target(_)},Object.defineProperty(r,"__esModule",{value:!0})})},{"d3-array":107,"d3-collection":108,"d3-shape":119}],58:[function(e,o,f){(function(){var r={version:"3.8.0"},a=[].slice,l=function(ce){return a.call(ce)},c=self.document;function i(ce){return ce&&(ce.ownerDocument||ce.document||ce).documentElement}function s(ce){return ce&&(ce.ownerDocument&&ce.ownerDocument.defaultView||ce.document&&ce||ce.defaultView)}if(c)try{l(c.documentElement.childNodes)[0].nodeType}catch{l=function(I){for(var j=I.length,V=new Array(j);j--;)V[j]=I[j];return V}}if(Date.now||(Date.now=function(){return+new Date}),c)try{c.createElement("DIV").style.setProperty("opacity",0,"")}catch{var u=this.Element.prototype,d=u.setAttribute,h=u.setAttributeNS,m=this.CSSStyleDeclaration.prototype,g=m.setProperty;u.setAttribute=function(I,j){d.call(this,I,j+"")},u.setAttributeNS=function(I,j,V){h.call(this,I,j,V+"")},m.setProperty=function(I,j,V){g.call(this,I,j+"",V)}}function p(ce,I){return ceI?1:ce>=I?0:NaN}function v(ce){return ce===null?NaN:+ce}function y(ce){return!isNaN(ce)}function x(ce){return{left:function(I,j,V,X){for(arguments.length<3&&(V=0),arguments.length<4&&(X=I.length);V>>1;ce(I[se],j)<0?V=se+1:X=se}return V},right:function(I,j,V,X){for(arguments.length<3&&(V=0),arguments.length<4&&(X=I.length);V>>1;ce(I[se],j)>0?X=se:V=se+1}return V}}}r.ascending=p,r.descending=function(ce,I){return Ice?1:I>=ce?0:NaN},r.min=function(ce,I){var j,V,X=-1,se=ce.length;if(arguments.length===1){for(;++X=V){j=V;break}for(;++XV&&(j=V)}else{for(;++X=V){j=V;break}for(;++XV&&(j=V)}return j},r.max=function(ce,I){var j,V,X=-1,se=ce.length;if(arguments.length===1){for(;++X=V){j=V;break}for(;++Xj&&(j=V)}else{for(;++X=V){j=V;break}for(;++Xj&&(j=V)}return j},r.extent=function(ce,I){var j,V,X,se=-1,he=ce.length;if(arguments.length===1){for(;++se=V){j=X=V;break}for(;++seV&&(j=V),X=V){j=X=V;break}for(;++seV&&(j=V),X1)return he/(be-1)},r.deviation=function(){var ce=r.variance.apply(this,arguments);return ce&&Math.sqrt(ce)};var w=x(p);function k(ce){return ce.length}r.bisectLeft=w.left,r.bisect=r.bisectRight=w.right,r.bisector=function(ce){return x(ce.length===1?function(I,j){return p(ce(I),j)}:ce)},r.shuffle=function(ce,I,j){(se=arguments.length)<3&&(j=ce.length,se<2&&(I=0));for(var V,X,se=j-I;se;)X=Math.random()*se--|0,V=ce[se+I],ce[se+I]=ce[X+I],ce[X+I]=V;return ce},r.permute=function(ce,I){for(var j=I.length,V=new Array(j);j--;)V[j]=ce[I[j]];return V},r.pairs=function(ce){for(var I=0,j=ce.length-1,V=ce[0],X=new Array(j<0?0:j);I=0;)for(I=(V=ce[X]).length;--I>=0;)j[--he]=V[I];return j};var b=Math.abs;function T(ce){for(var I=1;ce*I%1;)I*=10;return I}function _(ce,I){for(var j in I)Object.defineProperty(ce.prototype,j,{value:I[j],enumerable:!1})}function S(){this._=Object.create(null)}r.range=function(ce,I,j){if(arguments.length<3&&(j=1,arguments.length<2&&(I=ce,ce=0)),(I-ce)/j==1/0)throw new Error("infinite range");var V,X=[],se=T(b(j)),he=-1;if(ce*=se,I*=se,(j*=se)<0)for(;(V=ce+j*++he)>I;)X.push(V/se);else for(;(V=ce+j*++he)=V.length)return I?I.call(j,ve):ce?ve.sort(ce):ve;for(var Se,Ue,Xe,it,xt=-1,Lt=ve.length,_t=V[be++],Mt=new S;++xt=V.length)return be;var Ue=[],Xe=X[Se++];return be.forEach(function(it,xt){Ue.push({key:it,values:ve(xt,Se)})}),Xe?Ue.sort(function(it,xt){return Xe(it.key,xt.key)}):Ue}(se(r.map,he,0),0)},j.key=function(he){return V.push(he),j},j.sortKeys=function(he){return X[V.length-1]=he,j},j.sortValues=function(he){return ce=he,j},j.rollup=function(he){return I=he,j},j},r.set=function(ce){var I=new L;if(ce)for(var j=0,V=ce.length;j=0&&(V=ce.slice(j+1),ce=ce.slice(0,j)),ce)return arguments.length<2?this[ce].on(V):this[ce].on(V,I);if(arguments.length===2){if(I==null)for(ce in this)this.hasOwnProperty(ce)&&this[ce].on(V,null);return this}},r.event=null,r.requote=function(ce){return ce.replace(U,"\\$&")};var U=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,q=function(ce,I){for(var j in I)ce[j]=I[j]};function $(ce){return q(ce,ee),ce}var ne=function(ce,I){return I.querySelector(ce)},H=function(ce,I){return I.querySelectorAll(ce)},Q=function(ce,I){var j=ce.matches||ce[B(ce,"matchesSelector")];return(Q=function(V,X){return j.call(V,X)})(ce,I)};typeof Sizzle=="function"&&(ne=function(ce,I){return Sizzle(ce,I)[0]||null},H=Sizzle,Q=Sizzle.matchesSelector),r.selection=function(){return r.select(c.documentElement)};var ee=r.selection.prototype=[];function ie(ce){return typeof ce=="function"?ce:function(){return ne(ce,this)}}function ae(ce){return typeof ce=="function"?ce:function(){return H(ce,this)}}ee.select=function(ce){var I,j,V,X,se=[];ce=ie(ce);for(var he=-1,ve=this.length;++he=0&&(j=ce.slice(0,I))!=="xmlns"&&(ce=ce.slice(I+1)),le.hasOwnProperty(j)?{space:le[j],local:ce}:ce}},ee.attr=function(ce,I){if(arguments.length<2){if(typeof ce=="string"){var j=this.node();return(ce=r.ns.qualify(ce)).local?j.getAttributeNS(ce.space,ce.local):j.getAttribute(ce)}for(I in ce)this.each(ge(I,ce[I]));return this}return this.each(ge(ce,I))},ee.classed=function(ce,I){if(arguments.length<2){if(typeof ce=="string"){var j=this.node(),V=(ce=_e(ce)).length,X=-1;if(I=j.classList){for(;++X=0;)(j=V[X])&&(se&&se!==j.nextSibling&&se.parentNode.insertBefore(j,se),se=j);return this},ee.sort=function(ce){ce=ze.apply(this,arguments);for(var I=-1,j=this.length;++I=I&&(I=X+1);!(he=ve[I])&&++I0&&(ce=ce.slice(0,X));var he=We.get(ce);function ve(){var be=this[V];be&&(this.removeEventListener(ce,be,be.$),delete this[V])}return he&&(ce=he,se=nt),X?I?function(){var be=se(I,l(arguments));ve.call(this),this.addEventListener(ce,this[V]=be,be.$=j),be._=I}:ve:I?W:function(){var be,Se=new RegExp("^__on([^.]+)"+r.requote(ce)+"$");for(var Ue in this)if(be=Ue.match(Se)){var Xe=this[Ue];this.removeEventListener(be[1],Xe,Xe.$),delete this[Ue]}}}r.selection.enter=Ve,r.selection.enter.prototype=Ke,Ke.append=ee.append,Ke.empty=ee.empty,Ke.node=ee.node,Ke.call=ee.call,Ke.size=ee.size,Ke.select=function(ce){for(var I,j,V,X,se,he=[],ve=-1,be=this.length;++ve1?Ge:ce<-1?-Ge:Math.asin(ce)}function Ie(ce){return((ce=Math.exp(ce))+1/ce)/2}var Ae=Math.SQRT2;r.interpolateZoom=function(ce,I){var j,V,X=ce[0],se=ce[1],he=ce[2],ve=I[0],be=I[1],Se=I[2],Ue=ve-X,Xe=be-se,it=Ue*Ue+Xe*Xe;if(it<1e-12)V=Math.log(Se/he)/Ae,j=function(Nt){return[X+Nt*Ue,se+Nt*Xe,he*Math.exp(Ae*Nt*V)]};else{var xt=Math.sqrt(it),Lt=(Se*Se-he*he+4*it)/(2*he*2*xt),_t=(Se*Se-he*he-4*it)/(2*Se*2*xt),Mt=Math.log(Math.sqrt(Lt*Lt+1)-Lt),yt=Math.log(Math.sqrt(_t*_t+1)-_t);V=(yt-Mt)/Ae,j=function(Nt){var Rt,qt=Nt*V,rn=Ie(Mt),dn=he/(2*xt)*(rn*(Rt=Ae*qt+Mt,((Rt=Math.exp(2*Rt))-1)/(Rt+1))-function(Sn){return((Sn=Math.exp(Sn))-1/Sn)/2}(Mt));return[X+dn*Ue,se+dn*Xe,he*rn/Ie(Ae*qt+Mt)]}}return j.duration=1e3*V,j},r.behavior.zoom=function(){var ce,I,j,V,X,se,he,ve,be,Se={x:0,y:0,k:1},Ue=[960,500],Xe=rt,it=250,xt=0,Lt="mousedown.zoom",_t="mousemove.zoom",Mt="mouseup.zoom",yt="touchstart.zoom",Nt=re(Rt,"zoomstart","zoom","zoomend");function Rt(Gn){Gn.on(Lt,cr).on(He+".zoom",ii).on("dblclick.zoom",Ti).on(yt,Yr)}function qt(Gn){return[(Gn[0]-Se.x)/Se.k,(Gn[1]-Se.y)/Se.k]}function rn(Gn){Se.k=Math.max(Xe[0],Math.min(Xe[1],Gn))}function dn(Gn,Mr){Mr=function(ai){return[ai[0]*Se.k+Se.x,ai[1]*Se.k+Se.y]}(Mr),Se.x+=Gn[0]-Mr[0],Se.y+=Gn[1]-Mr[1]}function Sn(Gn,Mr,ai,Qr){Gn.__chart__={x:Se.x,y:Se.y,k:Se.k},rn(Math.pow(2,Qr)),dn(I=Mr,ai),Gn=r.select(Gn),it>0&&(Gn=Gn.transition().duration(it)),Gn.call(Rt.event)}function An(){he&&he.domain(se.range().map(function(Gn){return(Gn-Se.x)/Se.k}).map(se.invert)),be&&be.domain(ve.range().map(function(Gn){return(Gn-Se.y)/Se.k}).map(ve.invert))}function tr(Gn){xt++||Gn({type:"zoomstart"})}function er(Gn){An(),Gn({type:"zoom",scale:Se.k,translate:[Se.x,Se.y]})}function gr(Gn){--xt||(Gn({type:"zoomend"}),I=null)}function cr(){var Gn=this,Mr=Nt.of(Gn,arguments),ai=0,Qr=r.select(s(Gn)).on(_t,Yi).on(Mt,ci),gi=qt(r.mouse(Gn)),Mi=Pt(Gn);function Yi(){ai=1,dn(r.mouse(Gn),gi),er(Mr)}function ci(){Qr.on(_t,null).on(Mt,null),Mi(ai),gr(Mr)}Oc.call(Gn),tr(Mr)}function Yr(){var Gn,Mr=this,ai=Nt.of(Mr,arguments),Qr={},gi=0,Mi=".zoom-"+r.event.changedTouches[0].identifier,Yi="touchmove"+Mi,ci="touchend"+Mi,zi=[],Li=r.select(Mr),Qi=Pt(Mr);function Ri(){var xo=r.touches(Mr);return Gn=Se.k,xo.forEach(function(bo){bo.identifier in Qr&&(Qr[bo.identifier]=qt(bo))}),xo}function ea(){var xo=r.event.target;r.select(xo).on(Yi,fa).on(ci,Ha),zi.push(xo);for(var bo=r.event.changedTouches,qa=0,co=bo.length;qa1){Uo=eo[0];var Js=eo[1],sc=Uo[0]-Js[0],kf=Uo[1]-Js[1];gi=sc*sc+kf*kf}}function fa(){var xo,bo,qa,co,eo=r.touches(Mr);Oc.call(Mr);for(var As=0,Uo=eo.length;As360?ve-=360:ve<0&&(ve+=360),ve<60?V+(X-V)*ve/60:ve<180?X:ve<240?V+(X-V)*(240-ve)/60:V}(he))}return ce=isNaN(ce)?0:(ce%=360)<0?ce+360:ce,I=isNaN(I)||I<0?0:I>1?1:I,V=2*(j=j<0?0:j>1?1:j)-(X=j<=.5?j*(1+I):j+I-j*I),new It(se(ce+120),se(ce),se(ce-120))}function Vt(ce,I,j){return this instanceof Vt?(this.h=+ce,this.c=+I,void(this.l=+j)):arguments.length<2?ce instanceof Vt?new Vt(ce.h,ce.c,ce.l):Le(ce instanceof bt?ce.l:(ce=tn((ce=r.rgb(ce)).r,ce.g,ce.b)).l,ce.a,ce.b):new Vt(ce,I,j)}kt.brighter=function(ce){return ce=Math.pow(.7,arguments.length?ce:1),new ot(this.h,this.s,this.l/ce)},kt.darker=function(ce){return ce=Math.pow(.7,arguments.length?ce:1),new ot(this.h,this.s,ce*this.l)},kt.rgb=function(){return wt(this.h,this.s,this.l)},r.hcl=Vt;var Ut=Vt.prototype=new lt;function tt(ce,I,j){return isNaN(ce)&&(ce=0),isNaN(I)&&(I=0),new bt(j,Math.cos(ce*=Tt)*I,Math.sin(ce)*I)}function bt(ce,I,j){return this instanceof bt?(this.l=+ce,this.a=+I,void(this.b=+j)):arguments.length<2?ce instanceof bt?new bt(ce.l,ce.a,ce.b):ce instanceof Vt?tt(ce.h,ce.c,ce.l):tn((ce=It(ce)).r,ce.g,ce.b):new bt(ce,I,j)}Ut.brighter=function(ce){return new Vt(this.h,this.c,Math.min(100,this.l+zt*(arguments.length?ce:1)))},Ut.darker=function(ce){return new Vt(this.h,this.c,Math.max(0,this.l-zt*(arguments.length?ce:1)))},Ut.rgb=function(){return tt(this.h,this.c,this.l).rgb()},r.lab=bt;var zt=18,St=bt.prototype=new lt;function Dt(ce,I,j){var V=(ce+16)/116,X=V+I/500,se=V-j/200;return new It(Et(3.2404542*(X=.95047*Je(X))-1.5371385*(V=1*Je(V))-.4985314*(se=1.08883*Je(se))),Et(-.969266*X+1.8760108*V+.041556*se),Et(.0556434*X-.2040259*V+1.0572252*se))}function Le(ce,I,j){return ce>0?new Vt(Math.atan2(j,I)*dt,Math.sqrt(I*I+j*j),ce):new Vt(NaN,NaN,ce)}function Je(ce){return ce>.206893034?ce*ce*ce:(ce-4/29)/7.787037}function st(ce){return ce>.008856?Math.pow(ce,1/3):7.787037*ce+4/29}function Et(ce){return Math.round(255*(ce<=.00304?12.92*ce:1.055*Math.pow(ce,1/2.4)-.055))}function It(ce,I,j){return this instanceof It?(this.r=~~ce,this.g=~~I,void(this.b=~~j)):arguments.length<2?ce instanceof It?new It(ce.r,ce.g,ce.b):zn(""+ce,It,wt):new It(ce,I,j)}function Zt(ce){return new It(ce>>16,ce>>8&255,255&ce)}function Kt(ce){return Zt(ce)+""}St.brighter=function(ce){return new bt(Math.min(100,this.l+zt*(arguments.length?ce:1)),this.a,this.b)},St.darker=function(ce){return new bt(Math.max(0,this.l-zt*(arguments.length?ce:1)),this.a,this.b)},St.rgb=function(){return Dt(this.l,this.a,this.b)},r.rgb=It;var Ht=It.prototype=new lt;function mn(ce){return ce<16?"0"+Math.max(0,ce).toString(16):Math.min(255,ce).toString(16)}function zn(ce,I,j){var V,X,se,he=0,ve=0,be=0;if(V=/([a-z]+)\((.*)\)/.exec(ce=ce.toLowerCase()))switch(X=V[2].split(","),V[1]){case"hsl":return j(parseFloat(X[0]),parseFloat(X[1])/100,parseFloat(X[2])/100);case"rgb":return I(sn(X[0]),sn(X[1]),sn(X[2]))}return(se=gn.get(ce))?I(se.r,se.g,se.b):(ce==null||ce.charAt(0)!=="#"||isNaN(se=parseInt(ce.slice(1),16))||(ce.length===4?(he=(3840&se)>>4,he|=he>>4,ve=240&se,ve|=ve>>4,be=15&se,be|=be<<4):ce.length===7&&(he=(16711680&se)>>16,ve=(65280&se)>>8,be=255&se)),I(he,ve,be))}function pn(ce,I,j){var V,X,se=Math.min(ce/=255,I/=255,j/=255),he=Math.max(ce,I,j),ve=he-se,be=(he+se)/2;return ve?(X=be<.5?ve/(he+se):ve/(2-he-se),V=ce==he?(I-j)/ve+(I0&&be<1?0:V),new ot(V,X,be)}function tn(ce,I,j){var V=st((.4124564*(ce=nn(ce))+.3575761*(I=nn(I))+.1804375*(j=nn(j)))/.95047),X=st((.2126729*ce+.7151522*I+.072175*j)/1);return bt(116*X-16,500*(V-X),200*(X-st((.0193339*ce+.119192*I+.9503041*j)/1.08883)))}function nn(ce){return(ce/=255)<=.04045?ce/12.92:Math.pow((ce+.055)/1.055,2.4)}function sn(ce){var I=parseFloat(ce);return ce.charAt(ce.length-1)==="%"?Math.round(2.55*I):I}Ht.brighter=function(ce){ce=Math.pow(.7,arguments.length?ce:1);var I=this.r,j=this.g,V=this.b,X=30;return I||j||V?(I&&I=200&&Xe<300||Xe===304){try{Ue=j.call(X,ve)}catch(it){return void se.error.call(X,it)}se.load.call(X,Ue)}else se.error.call(X,ve)}return self.XDomainRequest&&!("withCredentials"in ve)&&/^(http(s)?:)?\/\//.test(ce)&&(ve=new XDomainRequest),"onload"in ve?ve.onload=ve.onerror=Se:ve.onreadystatechange=function(){ve.readyState>3&&Se()},ve.onprogress=function(Ue){var Xe=r.event;r.event=Ue;try{se.progress.call(X,ve)}finally{r.event=Xe}},X.header=function(Ue,Xe){return Ue=(Ue+"").toLowerCase(),arguments.length<2?he[Ue]:(Xe==null?delete he[Ue]:he[Ue]=Xe+"",X)},X.mimeType=function(Ue){return arguments.length?(I=Ue==null?null:Ue+"",X):I},X.responseType=function(Ue){return arguments.length?(be=Ue,X):be},X.response=function(Ue){return j=Ue,X},["get","post"].forEach(function(Ue){X[Ue]=function(){return X.send.apply(X,[Ue].concat(l(arguments)))}}),X.send=function(Ue,Xe,it){if(arguments.length===2&&typeof Xe=="function"&&(it=Xe,Xe=null),ve.open(Ue,ce,!0),I==null||"accept"in he||(he.accept=I+",*/*"),ve.setRequestHeader)for(var xt in he)ve.setRequestHeader(xt,he[xt]);return I!=null&&ve.overrideMimeType&&ve.overrideMimeType(I),be!=null&&(ve.responseType=be),it!=null&&X.on("error",it).on("load",function(Lt){it(null,Lt)}),se.beforesend.call(X,ve),ve.send(Xe??null),X},X.abort=function(){return ve.abort(),X},r.rebind(X,se,"on"),V==null?X:X.get(function(Ue){return Ue.length===1?function(Xe,it){Ue(Xe==null?it:null)}:Ue}(V))}gn.forEach(function(ce,I){gn.set(ce,Zt(I))}),r.functor=bn,r.xhr=In(P),r.dsv=function(ce,I){var j=new RegExp('["'+ce+` +]`),V=ce.charCodeAt(0);function X(Se,Ue,Xe){arguments.length<3&&(Xe=Ue,Ue=null);var it=Hn(Se,I,Ue==null?se:he(Ue),Xe);return it.row=function(xt){return arguments.length?it.response((Ue=xt)==null?se:he(xt)):Ue},it}function se(Se){return X.parse(Se.responseText)}function he(Se){return function(Ue){return X.parse(Ue.responseText,Se)}}function ve(Se){return Se.map(be).join(ce)}function be(Se){return j.test(Se)?'"'+Se.replace(/\"/g,'""')+'"':Se}return X.parse=function(Se,Ue){var Xe;return X.parseRows(Se,function(it,xt){if(Xe)return Xe(it,xt-1);var Lt=function(_t){for(var Mt={},yt=it.length,Nt=0;Nt=Mt)return Lt;if(it)return it=!1,xt;var rn=yt;if(Se.charCodeAt(rn)===34){for(var dn=rn;dn++24?(isFinite(I)&&(clearTimeout(vr),vr=setTimeout(Ln,I)),Or=0):(Or=1,Er(Ln))}function lr(){for(var ce=Date.now(),I=Wn;I;)ce>=I.t&&I.c(ce-I.t)&&(I.c=null),I=I.n;return ce}function Wr(){for(var ce,I=Wn,j=1/0;I;)I.c?(I.t1&&(I=ce[se[he-2]],j=ce[se[he-1]],V=ce[ve],(j[0]-I[0])*(V[1]-I[1])-(j[1]-I[1])*(V[0]-I[0])<=0);)--he;se[he++]=ve}return se.slice(0,he)}function Bn(ce,I){return ce[0]-I[0]||ce[1]-I[1]}r.timer=function(){Kn.apply(this,arguments)},r.timer.flush=function(){lr(),Wr()},r.round=function(ce,I){return I?Math.round(ce*(I=Math.pow(10,I)))/I:Math.round(ce)},r.geom={},r.geom.hull=function(ce){var I=Mn,j=rr;if(arguments.length)return V(ce);function V(X){if(X.length<3)return[];var se,he=bn(I),ve=bn(j),be=X.length,Se=[],Ue=[];for(se=0;se=0;--se)_t.push(X[Se[Xe[se]][2]]);for(se=+xt;seOt)ve=ve.L;else{if(!((X=se-Dn(ve,he))>Ot)){V>-Ot?(I=ve.P,j=ve):X>-Ot?(I=ve,j=ve.N):I=j=ve;break}if(!ve.R){I=ve;break}ve=ve.R}var be=Nn(ce);if(jn.insert(I,be),I||j){if(I===j)return xr(I),j=Nn(I.site),jn.insert(be,j),be.edge=j.edge=Dr(I.site,be.site),or(I),void or(j);if(j){xr(I),xr(j);var Se=I.site,Ue=Se.x,Xe=Se.y,it=ce.x-Ue,xt=ce.y-Xe,Lt=j.site,_t=Lt.x-Ue,Mt=Lt.y-Xe,yt=2*(it*Mt-xt*_t),Nt=it*it+xt*xt,Rt=_t*_t+Mt*Mt,qt={x:(Mt*Nt-xt*Rt)/yt+Ue,y:(it*Rt-_t*Nt)/yt+Xe};ri(j.edge,Se,Lt,qt),be.edge=Dr(Se,ce,null,qt),j.edge=Dr(ce,Lt,null,qt),or(I),or(j)}else be.edge=Dr(I.site,be.site)}}function Tn(ce,I){var j=ce.site,V=j.x,X=j.y,se=X-I;if(!se)return V;var he=ce.P;if(!he)return-1/0;var ve=(j=he.site).x,be=j.y,Se=be-I;if(!Se)return ve;var Ue=ve-V,Xe=1/se-1/Se,it=Ue/Se;return Xe?(-it+Math.sqrt(it*it-2*Xe*(Ue*Ue/(-2*Se)-be+Se/2+X-se/2)))/Xe+V:(V+ve)/2}function Dn(ce,I){var j=ce.N;if(j)return Tn(j,I);var V=ce.site;return V.y===I?V.x:1/0}function Zn(ce){this.site=ce,this.edges=[]}function Yn(ce,I){return I.angle-ce.angle}function ir(){Sr(this),this.x=this.y=this.arc=this.site=this.cy=null}function or(ce){var I=ce.P,j=ce.N;if(I&&j){var V=I.site,X=ce.site,se=j.site;if(V!==se){var he=X.x,ve=X.y,be=V.x-he,Se=V.y-ve,Ue=se.x-he,Xe=2*(be*(Mt=se.y-ve)-Se*Ue);if(!(Xe>=-1e-12)){var it=be*be+Se*Se,xt=Ue*Ue+Mt*Mt,Lt=(Mt*it-Se*xt)/Xe,_t=(be*xt-Ue*it)/Xe,Mt=_t+ve,yt=$n.pop()||new ir;yt.arc=ce,yt.site=X,yt.x=Lt+he,yt.y=Mt+Math.sqrt(Lt*Lt+_t*_t),yt.cy=Mt,ce.circle=yt;for(var Nt=null,Rt=fn._;Rt;)if(yt.y=ve)return;if(it>Lt){if(se){if(se.y>=Se)return}else se={x:Mt,y:be};j={x:Mt,y:Se}}else{if(se){if(se.y1)if(it>Lt){if(se){if(se.y>=Se)return}else se={x:(be-X)/V,y:be};j={x:(Se-X)/V,y:Se}}else{if(se){if(se.y=ve)return}else se={x:he,y:V*he+X};j={x:ve,y:V*ve+X}}else{if(se){if(se.x0)){if(yt/=An,An<0){if(yt0){if(yt>Sn)return;yt>dn&&(dn=yt)}if(yt=Xe-qt,An||!(yt<0)){if(yt/=An,An<0){if(yt>Sn)return;yt>dn&&(dn=yt)}else if(An>0){if(yt0)){if(yt/=tr,tr<0){if(yt0){if(yt>Sn)return;yt>dn&&(dn=yt)}if(yt=it-rn,tr||!(yt<0)){if(yt/=tr,tr<0){if(yt>Sn)return;yt>dn&&(dn=yt)}else if(tr>0){if(yt0&&(Mt.a={x:qt+dn*An,y:rn+dn*tr}),Sn<1&&(Mt.b={x:qt+Sn*An,y:rn+Sn*tr}),Mt}}}}}),_t=xt.length;_t--;)(!wr(be=xt[_t],ve)||!Lt(be)||b(be.a.x-be.b.x)Ot||b(Xe-Se)>Ot)&&(Lt.splice(xt,0,new ji(Nr(it.site,yt,b(Ue-Nt)Ot?{x:Nt,y:b(be-Nt)Ot?{x:b(Se-rn)Ot?{x:Rt,y:b(be-Rt)Ot?{x:b(Se-qt)=Ue&&yt.x<=it&&yt.y>=Xe&&yt.y<=xt?[[Ue,xt],[it,xt],[it,Xe],[Ue,Xe]]:[]).point=be[_t]}),Se}function ve(be){return be.map(function(Se,Ue){return{x:Math.round(V(Se,Ue)/Ot)*Ot,y:Math.round(X(Se,Ue)/Ot)*Ot,i:Ue}})}return he.links=function(be){return Ja(ve(be)).edges.filter(function(Se){return Se.l&&Se.r}).map(function(Se){return{source:be[Se.l.i],target:be[Se.r.i]}})},he.triangles=function(be){var Se=[];return Ja(ve(be)).cells.forEach(function(Ue,Xe){for(var it,xt,Lt,_t,Mt=Ue.site,yt=Ue.edges.sort(Yn),Nt=-1,Rt=yt.length,qt=yt[Rt-1].edge,rn=qt.l===Mt?qt.r:qt.l;++Ntse||it>he||xt=dn)<<1|I>=rn,An=Sn+4;Snse&&(X=I.slice(se,X),ve[he]?ve[he]+=X:ve[++he]=X),(j=j[0])===(V=V[0])?ve[he]?ve[he]+=V:ve[++he]=V:(ve[++he]=null,be.push({i:he,x:so(j,V)})),se=Ls.lastIndex;return seyt&&(yt=Ue.x),Ue.y>Nt&&(Nt=Ue.y),Xe.push(Ue.x),it.push(Ue.y);else for(xt=0;xtyt&&(yt=rn),dn>Nt&&(Nt=dn),Xe.push(rn),it.push(dn)}var Sn=yt-_t,An=Nt-Mt;function tr(cr,Yr,ii,Ti,Gn,Mr,ai,Qr){if(!isNaN(ii)&&!isNaN(Ti))if(cr.leaf){var gi=cr.x,Mi=cr.y;if(gi!=null)if(b(gi-ii)+b(Mi-Ti)<.01)er(cr,Yr,ii,Ti,Gn,Mr,ai,Qr);else{var Yi=cr.point;cr.x=cr.y=cr.point=null,er(cr,Yi,gi,Mi,Gn,Mr,ai,Qr),er(cr,Yr,ii,Ti,Gn,Mr,ai,Qr)}else cr.x=ii,cr.y=Ti,cr.point=Yr}else er(cr,Yr,ii,Ti,Gn,Mr,ai,Qr)}function er(cr,Yr,ii,Ti,Gn,Mr,ai,Qr){var gi=.5*(Gn+ai),Mi=.5*(Mr+Qr),Yi=ii>=gi,ci=Ti>=Mi,zi=ci<<1|Yi;cr.leaf=!1,Yi?Gn=gi:ai=gi,ci?Mr=Mi:Qr=Mi,tr(cr=cr.nodes[zi]||(cr.nodes[zi]={leaf:!0,nodes:[],point:null,x:null,y:null}),Yr,ii,Ti,Gn,Mr,ai,Qr)}Sn>An?Nt=Mt+Sn:yt=_t+An;var gr={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(cr){tr(gr,cr,+Rt(cr,++xt),+qt(cr,xt),_t,Mt,yt,Nt)},visit:function(cr){Zo(cr,gr,_t,Mt,yt,Nt)},find:function(cr){return oa(gr,cr[0],cr[1],_t,Mt,yt,Nt)}};if(xt=-1,I==null){for(;++xt=0&&!(j=r.interpolators[V](ce,I)););return j}function Ka(ce,I){var j,V=[],X=[],se=ce.length,he=I.length,ve=Math.min(ce.length,I.length);for(j=0;j=1?1:ce(I)}}function ju(ce){return function(I){return 1-ce(1-I)}}function Wl(ce){return function(I){return .5*(I<.5?ce(2*I):2-ce(2-2*I))}}function Sc(ce){return ce*ce}function Ec(ce){return ce*ce*ce}function ac(ce){if(ce<=0)return 0;if(ce>=1)return 1;var I=ce*ce,j=I*ce;return 4*(ce<.5?j:3*(ce-I)+j-.75)}function Cc(ce){return 1-Math.cos(ce*Ge)}function Ns(ce){return Math.pow(2,10*(ce-1))}function Bs(ce){return 1-Math.sqrt(1-ce*ce)}function fl(ce){return ce<1/2.75?7.5625*ce*ce:ce<2/2.75?7.5625*(ce-=1.5/2.75)*ce+.75:ce<2.5/2.75?7.5625*(ce-=2.25/2.75)*ce+.9375:7.5625*(ce-=2.625/2.75)*ce+.984375}function hl(ce,I){return I-=ce,function(j){return Math.round(ce+I*j)}}function dl(ce){var I,j,V,X=[ce.a,ce.b],se=[ce.c,ce.d],he=ws(X),ve=Yl(X,se),be=ws(((I=se)[0]+=(V=-ve)*(j=X)[0],I[1]+=V*j[1],I))||0;X[0]*se[1]=0?ce.slice(0,I):ce,V=I>=0?ce.slice(I+1):"in";return j=ic.get(j)||$o,ba((V=Mc.get(V)||P)(j.apply(null,a.call(arguments,1))))},r.interpolateHcl=function(ce,I){ce=r.hcl(ce),I=r.hcl(I);var j=ce.h,V=ce.c,X=ce.l,se=I.h-j,he=I.c-V,ve=I.l-X;return isNaN(he)&&(he=0,V=isNaN(V)?I.c:V),isNaN(se)?(se=0,j=isNaN(j)?I.h:j):se>180?se-=360:se<-180&&(se+=360),function(be){return tt(j+se*be,V+he*be,X+ve*be)+""}},r.interpolateHsl=function(ce,I){ce=r.hsl(ce),I=r.hsl(I);var j=ce.h,V=ce.s,X=ce.l,se=I.h-j,he=I.s-V,ve=I.l-X;return isNaN(he)&&(he=0,V=isNaN(V)?I.s:V),isNaN(se)?(se=0,j=isNaN(j)?I.h:j):se>180?se-=360:se<-180&&(se+=360),function(be){return wt(j+se*be,V+he*be,X+ve*be)+""}},r.interpolateLab=function(ce,I){ce=r.lab(ce),I=r.lab(I);var j=ce.l,V=ce.a,X=ce.b,se=I.l-j,he=I.a-V,ve=I.b-X;return function(be){return Dt(j+se*be,V+he*be,X+ve*be)+""}},r.interpolateRound=hl,r.transform=function(ce){var I=c.createElementNS(r.ns.prefix.svg,"g");return(r.transform=function(j){if(j!=null){I.setAttribute("transform",j);var V=I.transform.baseVal.consolidate()}return new dl(V?V.matrix:Uu)})(ce)},dl.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Uu={a:1,b:0,c:0,d:1,e:0,f:0};function ds(ce){return ce.length?ce.pop()+",":""}function pl(ce,I){var j=[],V=[];return ce=r.transform(ce),I=r.transform(I),function(X,se,he,ve){if(X[0]!==se[0]||X[1]!==se[1]){var be=he.push("translate(",null,",",null,")");ve.push({i:be-4,x:so(X[0],se[0])},{i:be-2,x:so(X[1],se[1])})}else(se[0]||se[1])&&he.push("translate("+se+")")}(ce.translate,I.translate,j,V),function(X,se,he,ve){X!==se?(X-se>180?se+=360:se-X>180&&(X+=360),ve.push({i:he.push(ds(he)+"rotate(",null,")")-2,x:so(X,se)})):se&&he.push(ds(he)+"rotate("+se+")")}(ce.rotate,I.rotate,j,V),function(X,se,he,ve){X!==se?ve.push({i:he.push(ds(he)+"skewX(",null,")")-2,x:so(X,se)}):se&&he.push(ds(he)+"skewX("+se+")")}(ce.skew,I.skew,j,V),function(X,se,he,ve){if(X[0]!==se[0]||X[1]!==se[1]){var be=he.push(ds(he)+"scale(",null,",",null,")");ve.push({i:be-4,x:so(X[0],se[0])},{i:be-2,x:so(X[1],se[1])})}else se[0]===1&&se[1]===1||he.push(ds(he)+"scale("+se+")")}(ce.scale,I.scale,j,V),ce=I=null,function(X){for(var se,he=-1,ve=V.length;++he0?j=qt:(ce.c=null,ce.t=NaN,ce=null,ve.end({type:"end",alpha:j=0})):qt>0&&(ve.start({type:"start",alpha:j=qt}),ce=Kn(he.tick)),he):j},he.start=function(){var qt,rn,dn,Sn=Mt.length,An=yt.length,tr=be[0],er=be[1];for(qt=0;qt=0;)j.push(X[V])}function an(ce,I){for(var j=[ce],V=[];(ce=j.pop())!=null;)if(V.push(ce),(se=ce.children)&&(X=se.length))for(var X,se,he=-1;++he=0;)he.push(Ue=Se[be]),Ue.parent=se,Ue.depth=se.depth+1;j&&(se.value=0),se.children=Se}else j&&(se.value=+j.call(V,se,se.depth)||0),delete se.children;return an(X,function(Xe){var it,xt;ce&&(it=Xe.children)&&it.sort(ce),j&&(xt=Xe.parent)&&(xt.value+=Xe.value)}),ve}return V.sort=function(X){return arguments.length?(ce=X,V):ce},V.children=function(X){return arguments.length?(I=X,V):I},V.value=function(X){return arguments.length?(j=X,V):j},V.revalue=function(X){return j&&(Yt(X,function(se){se.children&&(se.value=0)}),an(X,function(se){var he;se.children||(se.value=+j.call(V,se,se.depth)||0),(he=se.parent)&&(he.value+=se.value)})),X},V},r.layout.partition=function(){var ce=r.layout.hierarchy(),I=[1,1];function j(V,X){var se=ce.call(this,V,X);return function he(ve,be,Se,Ue){var Xe=ve.children;if(ve.x=be,ve.y=ve.depth*Ue,ve.dx=Se,ve.dy=Ue,Xe&&(it=Xe.length)){var it,xt,Lt,_t=-1;for(Se=ve.value?Se/ve.value:0;++_tve&&(ve=V),he.push(V)}for(j=0;jX&&(V=j,X=I);return V}function sa(ce){return ce.reduce(ca,0)}function ca(ce,I){return ce+I[1]}function lo(ce,I){return io(ce,Math.ceil(Math.log(I.length)/Math.LN2+1))}function io(ce,I){for(var j=-1,V=+ce[0],X=(ce[1]-V)/I,se=[];++j<=I;)se[j]=X*j+V;return se}function za(ce){return[r.min(ce),r.max(ce)]}function Ra(ce,I){return ce.value-I.value}function ao(ce,I){var j=ce._pack_next;ce._pack_next=I,I._pack_prev=ce,I._pack_next=j,j._pack_prev=I}function Lo(ce,I){ce._pack_next=I,I._pack_prev=ce}function Ko(ce,I){var j=I.x-ce.x,V=I.y-ce.y,X=ce.r+I.r;return .999*X*X>j*j+V*V}function Qo(ce){if((I=ce.children)&&(be=I.length)){var I,j,V,X,se,he,ve,be,Se=1/0,Ue=-1/0,Xe=1/0,it=-1/0;if(I.forEach(es),(j=I[0]).x=-j.r,j.y=0,Rt(j),be>1&&((V=I[1]).x=V.r,V.y=0,Rt(V),be>2))for(na(j,V,X=I[2]),Rt(X),ao(j,X),j._pack_prev=X,ao(X,V),V=j._pack_next,se=3;se0)for(he=-1;++he=Xe[0]&&be<=Xe[1]&&((ve=Se[r.bisect(it,be,1,Lt)-1]).y+=_t,ve.push(se[he]));return Se}return X.value=function(se){return arguments.length?(I=se,X):I},X.range=function(se){return arguments.length?(j=bn(se),X):j},X.bins=function(se){return arguments.length?(V=typeof se=="number"?function(he){return io(he,se)}:bn(se),X):V},X.frequency=function(se){return arguments.length?(ce=!!se,X):ce},X},r.layout.pack=function(){var ce,I=r.layout.hierarchy().sort(Ra),j=0,V=[1,1];function X(se,he){var ve=I.call(this,se,he),be=ve[0],Se=V[0],Ue=V[1],Xe=ce==null?Math.sqrt:typeof ce=="function"?ce:function(){return ce};if(be.x=be.y=0,an(be,function(xt){xt.r=+Xe(xt.value)}),an(be,Qo),j){var it=j*(ce?1:Math.max(2*be.r/Se,2*be.r/Ue))/2;an(be,function(xt){xt.r+=it}),an(be,Qo),an(be,function(xt){xt.r-=it})}return function xt(Lt,_t,Mt,yt){var Nt=Lt.children;if(Lt.x=_t+=yt*Lt.x,Lt.y=Mt+=yt*Lt.y,Lt.r*=yt,Nt)for(var Rt=-1,qt=Nt.length;++RtLt.x&&(Lt=Rt),Rt.depth>_t.depth&&(_t=Rt)});var Mt=I(xt,Lt)/2-xt.x,yt=j[0]/(Lt.x+I(Lt,xt)/2+Mt),Nt=j[1]/(_t.depth||1);Yt(Xe,function(Rt){Rt.x=(Rt.x+Mt)*yt,Rt.y=Rt.depth*Nt})}return Ue}function se(be){var Se=be.children,Ue=be.parent.children,Xe=be.i?Ue[be.i-1]:null;if(Se.length){(function(xt){for(var Lt,_t=0,Mt=0,yt=xt.children,Nt=yt.length;--Nt>=0;)(Lt=yt[Nt]).z+=_t,Lt.m+=_t,_t+=Lt.s+(Mt+=Lt.c)})(be);var it=(Se[0].z+Se[Se.length-1].z)/2;Xe?(be.z=Xe.z+I(be._,Xe._),be.m=be.z-it):be.z=it}else Xe&&(be.z=Xe.z+I(be._,Xe._));be.parent.A=function(xt,Lt,_t){if(Lt){for(var Mt,yt=xt,Nt=xt,Rt=Lt,qt=yt.parent.children[0],rn=yt.m,dn=Nt.m,Sn=Rt.m,An=qt.m;Rt=ln(Rt),yt=Ft(yt),Rt&&yt;)qt=Ft(qt),(Nt=ln(Nt)).a=xt,(Mt=Rt.z+Sn-yt.z-rn+I(Rt._,yt._))>0&&($t(un(Rt,xt,_t),xt,Mt),rn+=Mt,dn+=Mt),Sn+=Rt.m,rn+=yt.m,An+=qt.m,dn+=Nt.m;Rt&&!ln(Nt)&&(Nt.t=Rt,Nt.m+=Sn-dn),yt&&!Ft(qt)&&(qt.t=yt,qt.m+=rn-An,_t=xt)}return _t}(be,Xe,be.parent.A||Ue[0])}function he(be){be._.x=be.z+be.parent.m,be.m+=be.parent.m}function ve(be){be.x*=j[0],be.y=be.depth*j[1]}return X.separation=function(be){return arguments.length?(I=be,X):I},X.size=function(be){return arguments.length?(V=(j=be)==null?ve:null,X):V?null:j},X.nodeSize=function(be){return arguments.length?(V=(j=be)==null?null:ve,X):V?j:null},en(X,ce)},r.layout.cluster=function(){var ce=r.layout.hierarchy().sort(null).value(null),I=ht,j=[1,1],V=!1;function X(se,he){var ve,be=ce.call(this,se,he),Se=be[0],Ue=0;an(Se,function(_t){var Mt=_t.children;Mt&&Mt.length?(_t.x=function(yt){return yt.reduce(function(Nt,Rt){return Nt+Rt.x},0)/yt.length}(Mt),_t.y=function(yt){return 1+r.max(yt,function(Nt){return Nt.y})}(Mt)):(_t.x=ve?Ue+=I(_t,ve):0,_t.y=0,ve=_t)});var Xe=function _t(Mt){var yt=Mt.children;return yt&&yt.length?_t(yt[0]):Mt}(Se),it=function _t(Mt){var yt,Nt=Mt.children;return Nt&&(yt=Nt.length)?_t(Nt[yt-1]):Mt}(Se),xt=Xe.x-I(Xe,it)/2,Lt=it.x+I(it,Xe)/2;return an(Se,V?function(_t){_t.x=(_t.x-Se.x)*j[0],_t.y=(Se.y-_t.y)*j[1]}:function(_t){_t.x=(_t.x-xt)/(Lt-xt)*j[0],_t.y=(1-(Se.y?_t.y/Se.y:1))*j[1]}),be}return X.separation=function(se){return arguments.length?(I=se,X):I},X.size=function(se){return arguments.length?(V=(j=se)==null,X):V?null:j},X.nodeSize=function(se){return arguments.length?(V=(j=se)!=null,X):V?j:null},en(X,ce)},r.layout.treemap=function(){var ce,I=r.layout.hierarchy(),j=Math.round,V=[1,1],X=null,se=On,he=!1,ve="squarify",be=.5*(1+Math.sqrt(5));function Se(_t,Mt){for(var yt,Nt,Rt=-1,qt=_t.length;++Rt0;)rn.push(yt=dn[Rt-1]),rn.area+=yt.area,ve!=="squarify"||(Nt=it(rn,An))<=Sn?(dn.pop(),Sn=Nt):(rn.area-=rn.pop().area,xt(rn,An,qt,!1),An=Math.min(qt.dx,qt.dy),rn.length=rn.area=0,Sn=1/0);rn.length&&(xt(rn,An,qt,!0),rn.length=rn.area=0),Mt.forEach(Ue)}}function Xe(_t){var Mt=_t.children;if(Mt&&Mt.length){var yt,Nt=se(_t),Rt=Mt.slice(),qt=[];for(Se(Rt,Nt.dx*Nt.dy/_t.value),qt.area=0;yt=Rt.pop();)qt.push(yt),qt.area+=yt.area,yt.z!=null&&(xt(qt,yt.z?Nt.dx:Nt.dy,Nt,!Rt.length),qt.length=qt.area=0);Mt.forEach(Xe)}}function it(_t,Mt){for(var yt,Nt=_t.area,Rt=0,qt=1/0,rn=-1,dn=_t.length;++rnRt&&(Rt=yt));return Mt*=Mt,(Nt*=Nt)?Math.max(Mt*Rt*be/Nt,Nt/(Mt*qt*be)):1/0}function xt(_t,Mt,yt,Nt){var Rt,qt=-1,rn=_t.length,dn=yt.x,Sn=yt.y,An=Mt?j(_t.area/Mt):0;if(Mt==yt.dx){for((Nt||An>yt.dy)&&(An=yt.dy);++qtyt.dx)&&(An=yt.dx);++qt1);return ce+I*V*Math.sqrt(-2*Math.log(se)/se)}},logNormal:function(){var ce=r.random.normal.apply(r,arguments);return function(){return Math.exp(ce())}},bates:function(ce){var I=r.random.irwinHall(ce);return function(){return I()/ce}},irwinHall:function(ce){return function(){for(var I=0,j=0;j2?Ar:ur,Ue=X?js:Vu;return se=Se(I,j,Ue,V),he=Se(j,I,Ue,Oo),be}function be(Se){return se(Se)}return be.invert=function(Se){return he(Se)},be.domain=function(Se){return arguments.length?(I=Se.map(Number),ve()):I},be.range=function(Se){return arguments.length?(j=Se,ve()):j},be.rangeRound=function(Se){return be.range(Se).interpolate(hl)},be.clamp=function(Se){return arguments.length?(X=Se,ve()):X},be.interpolate=function(Se){return arguments.length?(V=Se,ve()):V},be.ticks=function(Se){return Qn(I,Se)},be.tickFormat=function(Se,Ue){return d3_scale_linearTickFormat(I,Se,Ue)},be.nice=function(Se){return Zr(I,Se),ve()},be.copy=function(){return ce(I,j,V,X)},ve()}([0,1],[0,1],Oo,!1)},r.scale.log=function(){return function ce(I,j,V,X){function se(be){return(V?Math.log(be<0?0:be):-Math.log(be>0?0:-be))/Math.log(j)}function he(be){return V?Math.pow(j,be):-Math.pow(j,-be)}function ve(be){return I(se(be))}return ve.invert=function(be){return he(I.invert(be))},ve.domain=function(be){return arguments.length?(V=be[0]>=0,I.domain((X=be.map(Number)).map(se)),ve):X},ve.base=function(be){return arguments.length?(j=+be,I.domain(X.map(se)),ve):j},ve.nice=function(){var be=yr(X.map(se),V?Math:di);return I.domain(be),X=be.map(he),ve},ve.ticks=function(){var be=Jn(X),Se=[],Ue=be[0],Xe=be[1],it=Math.floor(se(Ue)),xt=Math.ceil(se(Xe)),Lt=j%1?2:j;if(isFinite(xt-it)){if(V){for(;it0;_t--)Se.push(he(it)*_t);for(it=0;Se[it]Xe;xt--);Se=Se.slice(it,xt)}return Se},ve.copy=function(){return ce(I.copy(),j,V,X)},Ur(ve,I)}(r.scale.linear().domain([0,1]),10,!0,[1,10])};var di={floor:function(ce){return-Math.ceil(-ce)},ceil:function(ce){return-Math.floor(-ce)}};function Rr(ce){return function(I){return I<0?-Math.pow(-I,ce):Math.pow(I,ce)}}r.scale.pow=function(){return function ce(I,j,V){var X=Rr(j),se=Rr(1/j);function he(ve){return I(X(ve))}return he.invert=function(ve){return se(I.invert(ve))},he.domain=function(ve){return arguments.length?(I.domain((V=ve.map(Number)).map(X)),he):V},he.ticks=function(ve){return Qn(V,ve)},he.tickFormat=function(ve,be){return d3_scale_linearTickFormat(V,ve,be)},he.nice=function(ve){return he.domain(Zr(V,ve))},he.exponent=function(ve){return arguments.length?(X=Rr(j=ve),se=Rr(1/j),I.domain(V.map(X)),he):j},he.copy=function(){return ce(I.copy(),j,V)},Ur(he,I)}(r.scale.linear(),1,[0,1])},r.scale.sqrt=function(){return r.scale.pow().exponent(.5)},r.scale.ordinal=function(){return function ce(I,j){var V,X,se;function he(be){return X[((V.get(be)||(j.t==="range"?V.set(be,I.push(be)):NaN))-1)%X.length]}function ve(be,Se){return r.range(I.length).map(function(Ue){return be+Se*Ue})}return he.domain=function(be){if(!arguments.length)return I;I=[],V=new S;for(var Se,Ue=-1,Xe=be.length;++Ue0?V[he-1]:I[0],heit?0:1;if(Ue=Be)return be(Ue,Lt)+(Se?be(Se,1-Lt):"")+"Z";var _t,Mt,yt,Nt,Rt,qt,rn,dn,Sn,An,tr,er,gr=0,cr=0,Yr=[];if((Nt=(+he.apply(this,arguments)||0)/2)&&(yt=V===ra?Math.sqrt(Se*Se+Ue*Ue):+V.apply(this,arguments),Lt||(cr*=-1),Ue&&(cr=Pe(yt/Ue*Math.sin(Nt))),Se&&(gr=Pe(yt/Se*Math.sin(Nt)))),Ue){Rt=Ue*Math.cos(Xe+cr),qt=Ue*Math.sin(Xe+cr),rn=Ue*Math.cos(it-cr),dn=Ue*Math.sin(it-cr);var ii=Math.abs(it-Xe-2*cr)<=Wt?0:1;if(cr&&pi(Rt,qt,rn,dn)===Lt^ii){var Ti=(Xe+it)/2;Rt=Ue*Math.cos(Ti),qt=Ue*Math.sin(Ti),rn=dn=null}}else Rt=qt=0;if(Se){Sn=Se*Math.cos(it-gr),An=Se*Math.sin(it-gr),tr=Se*Math.cos(Xe+gr),er=Se*Math.sin(Xe+gr);var Gn=Math.abs(Xe-it+2*gr)<=Wt?0:1;if(gr&&pi(Sn,An,tr,er)===1-Lt^Gn){var Mr=(Xe+it)/2;Sn=Se*Math.cos(Mr),An=Se*Math.sin(Mr),tr=er=null}}else Sn=An=0;if(xt>Ot&&(_t=Math.min(Math.abs(Ue-Se)/2,+j.apply(this,arguments)))>.001){Mt=Se0?0:1}function _a(ce,I,j,V,X){var se=ce[0]-I[0],he=ce[1]-I[1],ve=(X?V:-V)/Math.sqrt(se*se+he*he),be=ve*he,Se=-ve*se,Ue=ce[0]+be,Xe=ce[1]+Se,it=I[0]+be,xt=I[1]+Se,Lt=(Ue+it)/2,_t=(Xe+xt)/2,Mt=it-Ue,yt=xt-Xe,Nt=Mt*Mt+yt*yt,Rt=j-V,qt=Ue*xt-it*Xe,rn=(yt<0?-1:1)*Math.sqrt(Math.max(0,Rt*Rt*Nt-qt*qt)),dn=(qt*yt-Mt*rn)/Nt,Sn=(-qt*Mt-yt*rn)/Nt,An=(qt*yt+Mt*rn)/Nt,tr=(-qt*Mt+yt*rn)/Nt,er=dn-Lt,gr=Sn-_t,cr=An-Lt,Yr=tr-_t;return er*er+gr*gr>cr*cr+Yr*Yr&&(dn=An,Sn=tr),[[dn-be,Sn-Se],[dn*j/Rt,Sn*j/Rt]]}function Po(){return!0}function Al(ce){var I=Mn,j=rr,V=Po,X=ks,se=X.key,he=.7;function ve(be){var Se,Ue=[],Xe=[],it=-1,xt=be.length,Lt=bn(I),_t=bn(j);function Mt(){Ue.push("M",X(ce(Xe),he))}for(;++it1&&X.push("H",V[0]),X.join("")},"step-before":Qa,"step-after":Ts,basis:jo,"basis-open":function(ce){if(ce.length<4)return ks(ce);for(var I,j=[],V=-1,X=ce.length,se=[0],he=[0];++V<3;)I=ce[V],se.push(I[0]),he.push(I[1]);for(j.push(La(ns,se)+","+La(ns,he)),--V;++V9&&(se=3*j/Math.sqrt(se),ve[be]=se*V,ve[be+1]=se*X));for(be=-1;++be<=Se;)se=(I[Math.min(Se,be+1)][0]-I[Math.max(0,be-1)][0])/(6*(1+ve[be]*ve[be])),he.push([se||0,ve[be]*se||0]);return he}(ce))}});function ks(ce){return ce.length>1?ce.join("L"):ce+"Z"}function Pi(ce){return ce.join("L")+"Z"}function Qa(ce){for(var I=0,j=ce.length,V=ce[0],X=[V[0],",",V[1]];++I1){ve=I[1],se=ce[be],be++,V+="C"+(X[0]+he[0])+","+(X[1]+he[1])+","+(se[0]-ve[0])+","+(se[1]-ve[1])+","+se[0]+","+se[1];for(var Se=2;SeWt)+",1 "+Ue}function be(Se,Ue,Xe,it){return"Q 0,0 "+it}return se.radius=function(Se){return arguments.length?(j=bn(Se),se):j},se.source=function(Se){return arguments.length?(ce=bn(Se),se):ce},se.target=function(Se){return arguments.length?(I=bn(Se),se):I},se.startAngle=function(Se){return arguments.length?(V=bn(Se),se):V},se.endAngle=function(Se){return arguments.length?(X=bn(Se),se):X},se},r.svg.diagonal=function(){var ce=bf,I=So,j=wi;function V(X,se){var he=ce.call(this,X,se),ve=I.call(this,X,se),be=(he.y+ve.y)/2,Se=[he,{x:he.x,y:be},{x:ve.x,y:be},ve];return"M"+(Se=Se.map(j))[0]+"C"+Se[1]+" "+Se[2]+" "+Se[3]}return V.source=function(X){return arguments.length?(ce=bn(X),V):ce},V.target=function(X){return arguments.length?(I=bn(X),V):I},V.projection=function(X){return arguments.length?(j=X,V):j},V},r.svg.diagonal.radial=function(){var ce=r.svg.diagonal(),I=wi,j=ce.projection;return ce.projection=function(V){return arguments.length?j(Di(I=V)):I},ce},r.svg.symbol=function(){var ce=wf,I=_f;function j(V,X){return(Us.get(ce.call(this,V,X))||Jl)(I.call(this,V,X))}return j.type=function(V){return arguments.length?(ce=bn(V),j):ce},j.size=function(V){return arguments.length?(I=bn(V),j):I},j};var Us=r.map({circle:Jl,cross:function(ce){var I=Math.sqrt(ce/5)/2;return"M"+-3*I+","+-I+"H"+-I+"V"+-3*I+"H"+I+"V"+-I+"H"+3*I+"V"+I+"H"+I+"V"+3*I+"H"+-I+"V"+I+"H"+-3*I+"Z"},diamond:function(ce){var I=Math.sqrt(ce/(2*id)),j=I*id;return"M0,"+-I+"L"+j+",0 0,"+I+" "+-j+",0Z"},square:function(ce){var I=Math.sqrt(ce)/2;return"M"+-I+","+-I+"L"+I+","+-I+" "+I+","+I+" "+-I+","+I+"Z"},"triangle-down":function(ce){var I=Math.sqrt(ce/ml),j=I*ml/2;return"M0,"+j+"L"+I+","+-j+" "+-I+","+-j+"Z"},"triangle-up":function(ce){var I=Math.sqrt(ce/ml),j=I*ml/2;return"M0,"+-j+"L"+I+","+j+" "+-I+","+j+"Z"}});r.svg.symbolTypes=Us.keys();var ml=Math.sqrt(3),id=Math.tan(30*Tt);ee.transition=function(ce){for(var I,j,V=qu||++Hu,X=Pc(ce),se=[],he=vu||{time:Date.now(),ease:ac,delay:0,duration:250},ve=-1,be=this.length;++ve0;)Se[--yt].call(ce,Mt);if(_t>=1)return Xe.event&&Xe.event.end.call(ce,ce.__data__,I),--Ue.count?delete Ue[V]:delete ce[j],1}Xe||(se=X.time,he=Kn(function(Lt){var _t=Xe.delay;if(he.t=_t+se,_t<=Lt)return it(Lt-_t);he.c=it},0,se),Xe=Ue[V]={tween:new S,time:se,timer:he,delay:X.delay,duration:X.duration,ease:X.ease,index:I},X=null,++Ue.count)}yo.call=ee.call,yo.empty=ee.empty,yo.node=ee.node,yo.size=ee.size,r.transition=function(ce,I){return ce&&ce.transition?qu?ce.transition(I):ce:r.selection().transition(ce)},r.transition.prototype=yo,yo.select=function(ce){var I,j,V,X=this.id,se=this.namespace,he=[];ce=ie(ce);for(var ve=-1,be=this.length;++verect,.s>rect").attr("width",se[1]-se[0])}function xt(_t){_t.select(".extent").attr("y",he[0]),_t.selectAll(".extent,.e>rect,.w>rect").attr("height",he[1]-he[0])}function Lt(){var _t,Mt,yt=this,Nt=r.select(r.event.target),Rt=j.of(yt,arguments),qt=r.select(yt),rn=Nt.datum(),dn=!/^(n|s)$/.test(rn)&&V,Sn=!/^(e|w)$/.test(rn)&&X,An=Nt.classed("extent"),tr=Pt(yt),er=r.mouse(yt),gr=r.select(s(yt)).on("keydown.brush",ii).on("keyup.brush",Ti);if(r.event.changedTouches?gr.on("touchmove.brush",Gn).on("touchend.brush",ai):gr.on("mousemove.brush",Gn).on("mouseup.brush",ai),qt.interrupt().selectAll("*").interrupt(),An)er[0]=se[0]-er[0],er[1]=he[0]-er[1];else if(rn){var cr=+/w$/.test(rn),Yr=+/^n/.test(rn);Mt=[se[1-cr]-er[0],he[1-Yr]-er[1]],er[0]=se[cr],er[1]=he[Yr]}else r.event.altKey&&(_t=er.slice());function ii(){r.event.keyCode==32&&(An||(_t=null,er[0]-=se[1],er[1]-=he[1],An=2),Y())}function Ti(){r.event.keyCode==32&&An==2&&(er[0]+=se[1],er[1]+=he[1],An=0,Y())}function Gn(){var Qr=r.mouse(yt),gi=!1;Mt&&(Qr[0]+=Mt[0],Qr[1]+=Mt[1]),An||(r.event.altKey?(_t||(_t=[(se[0]+se[1])/2,(he[0]+he[1])/2]),er[0]=se[+(Qr[0]<_t[0])],er[1]=he[+(Qr[1]<_t[1])]):_t=null),dn&&Mr(Qr,V,0)&&(it(qt),gi=!0),Sn&&Mr(Qr,X,1)&&(xt(qt),gi=!0),gi&&(Xe(qt),Rt({type:"brush",mode:An?"move":"resize"}))}function Mr(Qr,gi,Mi){var Yi,ci,zi=fr(gi),Li=zi[0],Qi=zi[1],Ri=er[Mi],ea=Mi?he:se,fa=ea[1]-ea[0];if(An&&(Li-=Ri,Qi-=fa+Ri),Yi=(Mi?be:ve)?Math.max(Li,Math.min(Qi,Qr[Mi])):Qr[Mi],An?ci=(Yi+=Ri)+fa:(_t&&(Ri=Math.max(Li,Math.min(Qi,2*_t[Mi]-Yi))),Ri>>1;v.dtype||(v.dtype="array"),typeof v.dtype=="string"?w=new(h(v.dtype))(b):v.dtype&&(w=v.dtype,Array.isArray(w)&&(w.length=b));for(var T=0;Ty||Z>1073741824){for(var ne=0;nefe+_e||H>me+_e||Q=ie||Te===Oe)){var de=_[we];Oe===void 0&&(Oe=de.length);for(var ye=Te;ye=Z&&ke<=U&&Ee>=re&&Ee<=q&&ue.push(Me)}var ze=S[we],Fe=ze[4*Te+0],Ve=ze[4*Te+1],Ke=ze[4*Te+2],Re=ze[4*Te+3],qe=ge(ze,Te+1),We=.5*_e,Ye=we+1;le(fe,me,We,Ye,Fe,Ve||Ke||Re||qe),le(fe,me+We,We,Ye,Ve,Ke||Re||qe),le(fe+We,me,We,Ye,Ke,Re||qe),le(fe+We,me+We,We,Ye,Re,qe)}}function ge(fe,me){for(var _e=null,we=0;_e===null;)if(_e=fe[4*me+we],++we>fe.length)return null;return _e}return le(0,0,1,0,0,1),ue},w;function P(B,G,W,K,te){for(var Y=[],Z=0;Z0){s+=Math.abs(l(i[0]));for(var u=1;u2){for(g=0;g=0))throw new Error("precision must be a positive number");var x=Math.pow(10,y||0);return Math.round(v*x)/x},f.radiansToLength=h,f.lengthToRadians=m,f.lengthToDegrees=function(v,y){return g(m(v,y))},f.bearingToAzimuth=function(v){var y=v%360;return y<0&&(y+=360),y},f.radiansToDegrees=g,f.degreesToRadians=function(v){return v%360*Math.PI/180},f.convertLength=function(v,y,x){if(y===void 0&&(y="kilometers"),x===void 0&&(x="kilometers"),!(v>=0))throw new Error("length must be a positive number");return h(m(v,y),x)},f.convertArea=function(v,y,x){if(y===void 0&&(y="meters"),x===void 0&&(x="kilometers"),!(v>=0))throw new Error("area must be a positive number");var w=f.areaFactors[y];if(!w)throw new Error("invalid original units");var k=f.areaFactors[x];if(!k)throw new Error("invalid final units");return v/w*k},f.isNumber=p,f.isObject=function(v){return!!v&&v.constructor===Object},f.validateBBox=function(v){if(!v)throw new Error("bbox is required");if(!Array.isArray(v))throw new Error("bbox must be an Array");if(v.length!==4&&v.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");v.forEach(function(y){if(!p(y))throw new Error("bbox must only contain numbers")})},f.validateId=function(v){if(!v)throw new Error("id is required");if(["string","number"].indexOf(typeof v)===-1)throw new Error("id must be a number or a string")}},{}],63:[function(e,o,f){Object.defineProperty(f,"__esModule",{value:!0});var r=e("@turf/helpers");function a(h,m,g){if(h!==null)for(var p,v,y,x,w,k,b,T,_=0,S=0,A=h.type,M=A==="FeatureCollection",E=A==="Feature",D=M?h.features.length:1,O=0;Ok||M>b||E>T)return w=_,k=p,b=M,T=E,void(y=0);var D=r.lineString([w,_],g.properties);if(m(D,p,v,E,y)===!1)return!1;y++,w=_})!==!1&&void 0}}})}function d(h,m){if(!h)throw new Error("geojson is required");s(h,function(g,p,v){if(g.geometry!==null){var y=g.geometry.type,x=g.geometry.coordinates;switch(y){case"LineString":if(m(g,p,v,0,0)===!1)return!1;break;case"Polygon":for(var w=0;wi[0]&&(c[0]=i[0]),c[1]>i[1]&&(c[1]=i[1]),c[2]=0))throw new Error("precision must be a positive number");var x=Math.pow(10,y||0);return Math.round(v*x)/x},f.radiansToLength=h,f.lengthToRadians=m,f.lengthToDegrees=function(v,y){return g(m(v,y))},f.bearingToAzimuth=function(v){var y=v%360;return y<0&&(y+=360),y},f.radiansToDegrees=g,f.degreesToRadians=function(v){return v%360*Math.PI/180},f.convertLength=function(v,y,x){if(y===void 0&&(y="kilometers"),x===void 0&&(x="kilometers"),!(v>=0))throw new Error("length must be a positive number");return h(m(v,y),x)},f.convertArea=function(v,y,x){if(y===void 0&&(y="meters"),x===void 0&&(x="kilometers"),!(v>=0))throw new Error("area must be a positive number");var w=f.areaFactors[y];if(!w)throw new Error("invalid original units");var k=f.areaFactors[x];if(!k)throw new Error("invalid final units");return v/w*k},f.isNumber=p,f.isObject=function(v){return!!v&&v.constructor===Object},f.validateBBox=function(v){if(!v)throw new Error("bbox is required");if(!Array.isArray(v))throw new Error("bbox must be an Array");if(v.length!==4&&v.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");v.forEach(function(y){if(!p(y))throw new Error("bbox must only contain numbers")})},f.validateId=function(v){if(!v)throw new Error("id is required");if(["string","number"].indexOf(typeof v)===-1)throw new Error("id must be a number or a string")},f.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},f.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},f.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},f.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},f.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},f.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},f.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},{}],69:[function(e,o,f){Object.defineProperty(f,"__esModule",{value:!0});var r=e("@turf/helpers");function a(h,m,g){if(h!==null)for(var p,v,y,x,w,k,b,T,_=0,S=0,A=h.type,M=A==="FeatureCollection",E=A==="Feature",D=M?h.features.length:1,O=0;Ok||M>b||E>T)return w=_,k=p,b=M,T=E,void(y=0);var D=r.lineString([w,_],g.properties);if(m(D,p,v,E,y)===!1)return!1;y++,w=_})!==!1&&void 0}}})}function d(h,m){if(!h)throw new Error("geojson is required");s(h,function(g,p,v){if(g.geometry!==null){var y=g.geometry.type,x=g.geometry.coordinates;switch(y){case"LineString":if(m(g,p,v,0,0)===!1)return!1;break;case"Polygon":for(var w=0;wi&&(i=r[u]),r[u] + * @license MIT + */function l(M,E){if(M===E)return 0;for(var D=M.length,O=E.length,R=0,z=Math.min(D,O);R=0;K--)if(te[K]!==Y[K])return!1;for(K=te.length-1;K>=0;K--)if(W=te[K],!b(z[W],L[W],P,N))return!1;return!0}(M,E,D,O))}return D?M===E:M==E}function T(M){return Object.prototype.toString.call(M)=="[object Arguments]"}function _(M,E){if(!M||!E)return!1;if(Object.prototype.toString.call(E)=="[object RegExp]")return E.test(M);try{if(M instanceof E)return!0}catch{}return!Error.isPrototypeOf(E)&&E.call({},M)===!0}function S(M,E,D,O){var R;if(typeof E!="function")throw new TypeError('"block" argument must be a function');typeof D=="string"&&(O=D,D=null),R=function(P){var N;try{P()}catch(B){N=B}return N}(E),O=(D&&D.name?" ("+D.name+").":".")+(O?" "+O:"."),M&&!R&&w(R,D,"Missing expected exception"+O);var z=typeof O=="string",L=!M&&R&&!D;if((!M&&i.isError(R)&&z&&_(R,D)||L)&&w(R,D,"Got unwanted exception"+O),M&&R&&D&&!_(R,D)||!M&&R)throw R}g.AssertionError=function(M){this.name="AssertionError",this.actual=M.actual,this.expected=M.expected,this.operator=M.operator,M.message?(this.message=M.message,this.generatedMessage=!1):(this.message=function(P){return y(x(P.actual),128)+" "+P.operator+" "+y(x(P.expected),128)}(this),this.generatedMessage=!0);var E=M.stackStartFunction||w;if(Error.captureStackTrace)Error.captureStackTrace(this,E);else{var D=new Error;if(D.stack){var O=D.stack,R=v(E),z=O.indexOf(` +`+R);if(z>=0){var L=O.indexOf(` +`,z+1);O=O.substring(L+1)}this.stack=O}}},i.inherits(g.AssertionError,Error),g.fail=w,g.ok=k,g.equal=function(M,E,D){M!=E&&w(M,E,D,"==",g.equal)},g.notEqual=function(M,E,D){M==E&&w(M,E,D,"!=",g.notEqual)},g.deepEqual=function(M,E,D){b(M,E,!1)||w(M,E,D,"deepEqual",g.deepEqual)},g.deepStrictEqual=function(M,E,D){b(M,E,!0)||w(M,E,D,"deepStrictEqual",g.deepStrictEqual)},g.notDeepEqual=function(M,E,D){b(M,E,!1)&&w(M,E,D,"notDeepEqual",g.notDeepEqual)},g.notDeepStrictEqual=function M(E,D,O){b(E,D,!0)&&w(E,D,O,"notDeepStrictEqual",M)},g.strictEqual=function(M,E,D){M!==E&&w(M,E,D,"===",g.strictEqual)},g.notStrictEqual=function(M,E,D){M===E&&w(M,E,D,"!==",g.notStrictEqual)},g.throws=function(M,E,D){S(!0,M,E,D)},g.doesNotThrow=function(M,E,D){S(!1,M,E,D)},g.ifError=function(M){if(M)throw M},g.strict=a(function M(E,D){E||w(E,!0,D,"==",M)},g,{equal:g.strictEqual,deepEqual:g.deepStrictEqual,notEqual:g.notStrictEqual,notDeepEqual:g.notDeepStrictEqual}),g.strict.strict=g.strict;var A=Object.keys||function(M){var E=[];for(var D in M)s.call(M,D)&&E.push(D);return E}}).call(this)}).call(this,typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{})},{"object-assign":247,"util/":78}],76:[function(e,o,f){typeof Object.create=="function"?o.exports=function(r,a){r.super_=a,r.prototype=Object.create(a.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}})}:o.exports=function(r,a){r.super_=a;var l=function(){};l.prototype=a.prototype,r.prototype=new l,r.prototype.constructor=r}},{}],77:[function(e,o,f){o.exports=function(r){return r&&typeof r=="object"&&typeof r.copy=="function"&&typeof r.fill=="function"&&typeof r.readUInt8=="function"}},{}],78:[function(e,o,f){(function(r,a){(function(){var l=/%[sdj%]/g;f.format=function(z){if(!w(z)){for(var L=[],P=0;P=B)return K;switch(K){case"%s":return String(N[P++]);case"%d":return Number(N[P++]);case"%j":try{return JSON.stringify(N[P++])}catch{return"[Circular]"}default:return K}}),W=N[P];P=3&&(P.depth=arguments[2]),arguments.length>=4&&(P.colors=arguments[3]),v(L)?P.showHidden=L:L&&f._extend(P,L),k(P.showHidden)&&(P.showHidden=!1),k(P.depth)&&(P.depth=2),k(P.colors)&&(P.colors=!1),k(P.customInspect)&&(P.customInspect=!0),P.colors&&(P.stylize=u),h(P,z,P.depth)}function u(z,L){var P=s.styles[L];return P?"\x1B["+s.colors[P][0]+"m"+z+"\x1B["+s.colors[P][1]+"m":z}function d(z,L){return z}function h(z,L,P){if(z.customInspect&&L&&A(L.inspect)&&L.inspect!==f.inspect&&(!L.constructor||L.constructor.prototype!==L)){var N=L.inspect(P,z);return w(N)||(N=h(z,N,P)),N}var B=function(U,q){if(k(q))return U.stylize("undefined","undefined");if(w(q)){var $="'"+JSON.stringify(q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize($,"string")}if(x(q))return U.stylize(""+q,"number");if(v(q))return U.stylize(""+q,"boolean");if(y(q))return U.stylize("null","null")}(z,L);if(B)return B;var G=Object.keys(L),W=function(U){var q={};return U.forEach(function($,ne){q[$]=!0}),q}(G);if(z.showHidden&&(G=Object.getOwnPropertyNames(L)),S(L)&&(G.indexOf("message")>=0||G.indexOf("description")>=0))return m(L);if(G.length===0){if(A(L)){var K=L.name?": "+L.name:"";return z.stylize("[Function"+K+"]","special")}if(b(L))return z.stylize(RegExp.prototype.toString.call(L),"regexp");if(_(L))return z.stylize(Date.prototype.toString.call(L),"date");if(S(L))return m(L)}var te,Y="",Z=!1,re=["{","}"];return p(L)&&(Z=!0,re=["[","]"]),A(L)&&(Y=" [Function"+(L.name?": "+L.name:"")+"]"),b(L)&&(Y=" "+RegExp.prototype.toString.call(L)),_(L)&&(Y=" "+Date.prototype.toUTCString.call(L)),S(L)&&(Y=" "+m(L)),G.length!==0||Z&&L.length!=0?P<0?b(L)?z.stylize(RegExp.prototype.toString.call(L),"regexp"):z.stylize("[Object]","special"):(z.seen.push(L),te=Z?function(U,q,$,ne,H){for(var Q=[],ee=0,ie=q.length;ee=0,ne+H.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?$[0]+(q===""?"":q+` + `)+" "+U.join(`, + `)+" "+$[1]:$[0]+q+" "+U.join(", ")+" "+$[1]}(te,Y,re)):re[0]+Y+re[1]}function m(z){return"["+Error.prototype.toString.call(z)+"]"}function g(z,L,P,N,B,G){var W,K,te;if((te=Object.getOwnPropertyDescriptor(L,B)||{value:L[B]}).get?K=te.set?z.stylize("[Getter/Setter]","special"):z.stylize("[Getter]","special"):te.set&&(K=z.stylize("[Setter]","special")),R(N,B)||(W="["+B+"]"),K||(z.seen.indexOf(te.value)<0?(K=y(P)?h(z,te.value,null):h(z,te.value,P-1)).indexOf(` +`)>-1&&(K=G?K.split(` +`).map(function(Y){return" "+Y}).join(` +`).substr(2):` +`+K.split(` +`).map(function(Y){return" "+Y}).join(` +`)):K=z.stylize("[Circular]","special")),k(W)){if(G&&B.match(/^\d+$/))return K;(W=JSON.stringify(""+B)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(W=W.substr(1,W.length-2),W=z.stylize(W,"name")):(W=W.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),W=z.stylize(W,"string"))}return W+": "+K}function p(z){return Array.isArray(z)}function v(z){return typeof z=="boolean"}function y(z){return z===null}function x(z){return typeof z=="number"}function w(z){return typeof z=="string"}function k(z){return z===void 0}function b(z){return T(z)&&M(z)==="[object RegExp]"}function T(z){return typeof z=="object"&&z!==null}function _(z){return T(z)&&M(z)==="[object Date]"}function S(z){return T(z)&&(M(z)==="[object Error]"||z instanceof Error)}function A(z){return typeof z=="function"}function M(z){return Object.prototype.toString.call(z)}function E(z){return z<10?"0"+z.toString(10):z.toString(10)}f.debuglog=function(z){if(k(c)&&(c=r.env.NODE_DEBUG||""),z=z.toUpperCase(),!i[z])if(new RegExp("\\b"+z+"\\b","i").test(c)){var L=r.pid;i[z]=function(){var P=f.format.apply(f,arguments);console.error("%s %d: %s",z,L,P)}}else i[z]=function(){};return i[z]},f.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},f.isArray=p,f.isBoolean=v,f.isNull=y,f.isNullOrUndefined=function(z){return z==null},f.isNumber=x,f.isString=w,f.isSymbol=function(z){return typeof z=="symbol"},f.isUndefined=k,f.isRegExp=b,f.isObject=T,f.isDate=_,f.isError=S,f.isFunction=A,f.isPrimitive=function(z){return z===null||typeof z=="boolean"||typeof z=="number"||typeof z=="string"||typeof z=="symbol"||z===void 0},f.isBuffer=e("./support/isBuffer");var D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var z=new Date,L=[E(z.getHours()),E(z.getMinutes()),E(z.getSeconds())].join(":");return[z.getDate(),D[z.getMonth()],L].join(" ")}function R(z,L){return Object.prototype.hasOwnProperty.call(z,L)}f.log=function(){console.log("%s - %s",O(),f.format.apply(f,arguments))},f.inherits=e("inherits"),f._extend=function(z,L){if(!L||!T(L))return z;for(var P=Object.keys(L),N=P.length;N--;)z[P[N]]=L[P[N]];return z}}).call(this)}).call(this,e("_process"),typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":77,_process:277,inherits:76}],79:[function(e,o,f){f.byteLength=function(h){var m=u(h),g=m[0],p=m[1];return 3*(g+p)/4-p},f.toByteArray=function(h){var m,g,p=u(h),v=p[0],y=p[1],x=new l(function(b,T,_){return 3*(T+_)/4-_}(0,v,y)),w=0,k=y>0?v-4:v;for(g=0;g>16&255,x[w++]=m>>8&255,x[w++]=255&m;return y===2&&(m=a[h.charCodeAt(g)]<<2|a[h.charCodeAt(g+1)]>>4,x[w++]=255&m),y===1&&(m=a[h.charCodeAt(g)]<<10|a[h.charCodeAt(g+1)]<<4|a[h.charCodeAt(g+2)]>>2,x[w++]=m>>8&255,x[w++]=255&m),x},f.fromByteArray=function(h){for(var m,g=h.length,p=g%3,v=[],y=0,x=g-p;yx?x:y+16383));return p===1?(m=h[g-1],v.push(r[m>>2]+r[m<<4&63]+"==")):p===2&&(m=(h[g-2]<<8)+h[g-1],v.push(r[m>>10]+r[m>>4&63]+r[m<<2&63]+"=")),v.join("")};for(var r=[],a=[],l=typeof Uint8Array<"u"?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=c.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var g=h.indexOf("=");return g===-1&&(g=m),[g,g===m?0:4-g%4]}function d(h,m,g){for(var p,v,y=[],x=m;x>18&63]+r[v>>12&63]+r[v>>6&63]+r[63&v]);return y.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],80:[function(e,o,f){function r(u,d,h,m,g){for(var p=g+1;m<=g;){var v=m+g>>>1,y=u[v];(h!==void 0?h(y,d):y-d)>=0?(p=v,g=v-1):m=v+1}return p}function a(u,d,h,m,g){for(var p=g+1;m<=g;){var v=m+g>>>1,y=u[v];(h!==void 0?h(y,d):y-d)>0?(p=v,g=v-1):m=v+1}return p}function l(u,d,h,m,g){for(var p=m-1;m<=g;){var v=m+g>>>1,y=u[v];(h!==void 0?h(y,d):y-d)<0?(p=v,m=v+1):g=v-1}return p}function c(u,d,h,m,g){for(var p=m-1;m<=g;){var v=m+g>>>1,y=u[v];(h!==void 0?h(y,d):y-d)<=0?(p=v,m=v+1):g=v-1}return p}function i(u,d,h,m,g){for(;m<=g;){var p=m+g>>>1,v=u[p],y=h!==void 0?h(v,d):v-d;if(y===0)return p;y<=0?m=p+1:g=p-1}return-1}function s(u,d,h,m,g,p){return typeof h=="function"?p(u,d,h,m===void 0?0:0|m,g===void 0?u.length-1:0|g):p(u,d,void 0,h===void 0?0:0|h,m===void 0?u.length-1:0|m)}o.exports={ge:function(u,d,h,m,g){return s(u,d,h,m,g,r)},gt:function(u,d,h,m,g){return s(u,d,h,m,g,a)},lt:function(u,d,h,m,g){return s(u,d,h,m,g,l)},le:function(u,d,h,m,g){return s(u,d,h,m,g,c)},eq:function(u,d,h,m,g){return s(u,d,h,m,g,i)}}},{}],81:[function(e,o,f){function r(l){var c=32;return(l&=-l)&&c--,65535&l&&(c-=16),16711935&l&&(c-=8),252645135&l&&(c-=4),858993459&l&&(c-=2),1431655765&l&&(c-=1),c}f.INT_BITS=32,f.INT_MAX=2147483647,f.INT_MIN=-1<<31,f.sign=function(l){return(l>0)-(l<0)},f.abs=function(l){var c=l>>31;return(l^c)-c},f.min=function(l,c){return c^(l^c)&-(l65535)<<4,c|=i=((l>>>=c)>255)<<3,c|=i=((l>>>=i)>15)<<2,(c|=i=((l>>>=i)>3)<<1)|(l>>>=i)>>1},f.log10=function(l){return l>=1e9?9:l>=1e8?8:l>=1e7?7:l>=1e6?6:l>=1e5?5:l>=1e4?4:l>=1e3?3:l>=100?2:l>=10?1:0},f.popCount=function(l){return 16843009*((l=(858993459&(l-=l>>>1&1431655765))+(l>>>2&858993459))+(l>>>4)&252645135)>>>24},f.countTrailingZeros=r,f.nextPow2=function(l){return l+=l===0,--l,l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,(l|=l>>>16)+1},f.prevPow2=function(l){return l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,(l|=l>>>16)-(l>>>1)},f.parity=function(l){return l^=l>>>16,l^=l>>>8,l^=l>>>4,27030>>>(l&=15)&1};var a=new Array(256);(function(l){for(var c=0;c<256;++c){var i=c,s=c,u=7;for(i>>>=1;i;i>>>=1)s<<=1,s|=1&i,--u;l[c]=s<>>8&255]<<16|a[l>>>16&255]<<8|a[l>>>24&255]},f.interleave2=function(l,c){return(l=1431655765&((l=858993459&((l=252645135&((l=16711935&((l&=65535)|l<<8))|l<<4))|l<<2))|l<<1))|(c=1431655765&((c=858993459&((c=252645135&((c=16711935&((c&=65535)|c<<8))|c<<4))|c<<2))|c<<1))<<1},f.deinterleave2=function(l,c){return(l=65535&((l=16711935&((l=252645135&((l=858993459&((l=l>>>c&1431655765)|l>>>1))|l>>>2))|l>>>4))|l>>>16))<<16>>16},f.interleave3=function(l,c,i){return l=1227133513&((l=3272356035&((l=251719695&((l=4278190335&((l&=1023)|l<<16))|l<<8))|l<<4))|l<<2),(l|=(c=1227133513&((c=3272356035&((c=251719695&((c=4278190335&((c&=1023)|c<<16))|c<<8))|c<<4))|c<<2))<<1)|(i=1227133513&((i=3272356035&((i=251719695&((i=4278190335&((i&=1023)|i<<16))|i<<8))|i<<4))|i<<2))<<2},f.deinterleave3=function(l,c){return(l=1023&((l=4278190335&((l=251719695&((l=3272356035&((l=l>>>c&1227133513)|l>>>2))|l>>>4))|l>>>8))|l>>>16))<<22>>22},f.nextCombination=function(l){var c=l|l-1;return c+1|(~c&-~c)-1>>>r(l)+1}},{}],82:[function(e,o,f){var r=e("clamp");o.exports=function(i,s){s||(s={});var u,d,h,m,g,p,v,y,x,w,k,b=s.cutoff==null?.25:s.cutoff,T=s.radius==null?8:s.radius,_=s.channel||0;if(ArrayBuffer.isView(i)||Array.isArray(i)){if(!s.width||!s.height)throw Error("For raw data width and height should be provided by options");u=s.width,d=s.height,m=i,p=s.stride?s.stride:Math.floor(i.length/u/d)}else window.HTMLCanvasElement&&i instanceof window.HTMLCanvasElement?(v=(y=i).getContext("2d"),u=y.width,d=y.height,x=v.getImageData(0,0,u,d),m=x.data,p=4):window.CanvasRenderingContext2D&&i instanceof window.CanvasRenderingContext2D?(y=i.canvas,v=i,u=y.width,d=y.height,x=v.getImageData(0,0,u,d),m=x.data,p=4):window.ImageData&&i instanceof window.ImageData&&(x=i,u=i.width,d=i.height,m=x.data,p=4);if(h=Math.max(u,d),window.Uint8ClampedArray&&m instanceof window.Uint8ClampedArray||window.Uint8Array&&m instanceof window.Uint8Array)for(g=m,m=Array(u*d),w=0,k=g.length;w0&&S.length>T&&!S.warned){S.warned=!0;var M=new Error("Possible EventEmitter memory leak detected. "+S.length+" "+String(w)+" listeners added. Use emitter.setMaxListeners() to increase limit");M.name="MaxListenersExceededWarning",M.emitter=x,M.type=w,M.count=S.length,A=M,console&&console.warn&&console.warn(A)}return x}function m(){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 g(x,w,k){var b={fired:!1,wrapFn:void 0,target:x,type:w,listener:k},T=m.bind(b);return T.listener=k,b.wrapFn=T,T}function p(x,w,k){var b=x._events;if(b===void 0)return[];var T=b[w];return T===void 0?[]:typeof T=="function"?k?[T.listener||T]:[T]:k?function(_){for(var S=new Array(_.length),A=0;A0&&(_=w[0]),_ instanceof Error)throw _;var S=new Error("Unhandled error."+(_?" ("+_.message+")":""));throw S.context=_,S}var A=T[x];if(A===void 0)return!1;if(typeof A=="function")l(A,this,w);else{var M=A.length,E=y(A,M);for(k=0;k=0;_--)if(k[_]===w||k[_].listener===w){S=k[_].listener,T=_;break}if(T<0)return this;T===0?k.shift():function(A,M){for(;M+1=0;b--)this.removeListener(x,w[b]);return this},i.prototype.listeners=function(x){return p(this,x,!0)},i.prototype.rawListeners=function(x){return p(this,x,!1)},i.listenerCount=function(x,w){return typeof x.listenerCount=="function"?x.listenerCount(w):v.call(x,w)},i.prototype.listenerCount=v,i.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},{}],85:[function(e,o,f){(function(r){(function(){var a=e("base64-js"),l=e("ieee754");f.Buffer=i,f.SlowBuffer=function(U){return+U!=U&&(U=0),i.alloc(+U)},f.INSPECT_MAX_BYTES=50;function c(U){if(U>2147483647)throw new RangeError('The value "'+U+'" is invalid for option "size"');var q=new Uint8Array(U);return q.__proto__=i.prototype,q}function i(U,q,$){if(typeof U=="number"){if(typeof q=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(U)}return s(U,q,$)}function s(U,q,$){if(typeof U=="string")return function(Q,ee){if(typeof ee=="string"&&ee!==""||(ee="utf8"),!i.isEncoding(ee))throw new TypeError("Unknown encoding: "+ee);var ie=0|g(Q,ee),ae=c(ie),ue=ae.write(Q,ee);return ue!==ie&&(ae=ae.slice(0,ue)),ae}(U,q);if(ArrayBuffer.isView(U))return h(U);if(U==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U);if(Z(U,ArrayBuffer)||U&&Z(U.buffer,ArrayBuffer))return function(Q,ee,ie){if(ee<0||Q.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|U}function g(U,q){if(i.isBuffer(U))return U.length;if(ArrayBuffer.isView(U)||Z(U,ArrayBuffer))return U.byteLength;if(typeof U!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof U);var $=U.length,ne=arguments.length>2&&arguments[2]===!0;if(!ne&&$===0)return 0;for(var H=!1;;)switch(q){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":return K(U).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*$;case"hex":return $>>>1;case"base64":return te(U).length;default:if(H)return ne?-1:K(U).length;q=(""+q).toLowerCase(),H=!0}}function p(U,q,$){var ne=!1;if((q===void 0||q<0)&&(q=0),q>this.length||(($===void 0||$>this.length)&&($=this.length),$<=0)||($>>>=0)<=(q>>>=0))return"";for(U||(U="utf8");;)switch(U){case"hex":return O(this,q,$);case"utf8":case"utf-8":return M(this,q,$);case"ascii":return E(this,q,$);case"latin1":case"binary":return D(this,q,$);case"base64":return A(this,q,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,q,$);default:if(ne)throw new TypeError("Unknown encoding: "+U);U=(U+"").toLowerCase(),ne=!0}}function v(U,q,$){var ne=U[q];U[q]=U[$],U[$]=ne}function y(U,q,$,ne,H){if(U.length===0)return-1;if(typeof $=="string"?(ne=$,$=0):$>2147483647?$=2147483647:$<-2147483648&&($=-2147483648),re($=+$)&&($=H?0:U.length-1),$<0&&($=U.length+$),$>=U.length){if(H)return-1;$=U.length-1}else if($<0){if(!H)return-1;$=0}if(typeof q=="string"&&(q=i.from(q,ne)),i.isBuffer(q))return q.length===0?-1:x(U,q,$,ne,H);if(typeof q=="number")return q&=255,typeof Uint8Array.prototype.indexOf=="function"?H?Uint8Array.prototype.indexOf.call(U,q,$):Uint8Array.prototype.lastIndexOf.call(U,q,$):x(U,[q],$,ne,H);throw new TypeError("val must be string, number or Buffer")}function x(U,q,$,ne,H){var Q,ee=1,ie=U.length,ae=q.length;if(ne!==void 0&&((ne=String(ne).toLowerCase())==="ucs2"||ne==="ucs-2"||ne==="utf16le"||ne==="utf-16le")){if(U.length<2||q.length<2)return-1;ee=2,ie/=2,ae/=2,$/=2}function ue(me,_e){return ee===1?me[_e]:me.readUInt16BE(_e*ee)}if(H){var le=-1;for(Q=$;Qie&&($=ie-ae),Q=$;Q>=0;Q--){for(var ge=!0,fe=0;feH&&(ne=H):ne=H;var Q=q.length;ne>Q/2&&(ne=Q/2);for(var ee=0;ee>8,ae=ee%256,ue.push(ae),ue.push(ie);return ue}(q,U.length-$),U,$,ne)}function A(U,q,$){return q===0&&$===U.length?a.fromByteArray(U):a.fromByteArray(U.slice(q,$))}function M(U,q,$){$=Math.min(U.length,$);for(var ne=[],H=q;H<$;){var Q,ee,ie,ae,ue=U[H],le=null,ge=ue>239?4:ue>223?3:ue>191?2:1;if(H+ge<=$)switch(ge){case 1:ue<128&&(le=ue);break;case 2:(192&(Q=U[H+1]))==128&&(ae=(31&ue)<<6|63&Q)>127&&(le=ae);break;case 3:Q=U[H+1],ee=U[H+2],(192&Q)==128&&(192&ee)==128&&(ae=(15&ue)<<12|(63&Q)<<6|63&ee)>2047&&(ae<55296||ae>57343)&&(le=ae);break;case 4:Q=U[H+1],ee=U[H+2],ie=U[H+3],(192&Q)==128&&(192&ee)==128&&(192&ie)==128&&(ae=(15&ue)<<18|(63&Q)<<12|(63&ee)<<6|63&ie)>65535&&ae<1114112&&(le=ae)}le===null?(le=65533,ge=1):le>65535&&(le-=65536,ne.push(le>>>10&1023|55296),le=56320|1023&le),ne.push(le),H+=ge}return function(fe){var me=fe.length;if(me<=4096)return String.fromCharCode.apply(String,fe);for(var _e="",we=0;we"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."),Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(U,q,$){return s(U,q,$)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(U,q,$){return function(ne,H,Q){return u(ne),ne<=0?c(ne):H!==void 0?typeof Q=="string"?c(ne).fill(H,Q):c(ne).fill(H):c(ne)}(U,q,$)},i.allocUnsafe=function(U){return d(U)},i.allocUnsafeSlow=function(U){return d(U)},i.isBuffer=function(U){return U!=null&&U._isBuffer===!0&&U!==i.prototype},i.compare=function(U,q){if(Z(U,Uint8Array)&&(U=i.from(U,U.offset,U.byteLength)),Z(q,Uint8Array)&&(q=i.from(q,q.offset,q.byteLength)),!i.isBuffer(U)||!i.isBuffer(q))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(U===q)return 0;for(var $=U.length,ne=q.length,H=0,Q=Math.min($,ne);Hq&&(U+=" ... "),""},i.prototype.compare=function(U,q,$,ne,H){if(Z(U,Uint8Array)&&(U=i.from(U,U.offset,U.byteLength)),!i.isBuffer(U))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof U);if(q===void 0&&(q=0),$===void 0&&($=U?U.length:0),ne===void 0&&(ne=0),H===void 0&&(H=this.length),q<0||$>U.length||ne<0||H>this.length)throw new RangeError("out of range index");if(ne>=H&&q>=$)return 0;if(ne>=H)return-1;if(q>=$)return 1;if(this===U)return 0;for(var Q=(H>>>=0)-(ne>>>=0),ee=($>>>=0)-(q>>>=0),ie=Math.min(Q,ee),ae=this.slice(ne,H),ue=U.slice(q,$),le=0;le>>=0,isFinite($)?($>>>=0,ne===void 0&&(ne="utf8")):(ne=$,$=void 0)}var H=this.length-q;if(($===void 0||$>H)&&($=H),U.length>0&&($<0||q<0)||q>this.length)throw new RangeError("Attempt to write outside buffer bounds");ne||(ne="utf8");for(var Q=!1;;)switch(ne){case"hex":return w(this,U,q,$);case"utf8":case"utf-8":return k(this,U,q,$);case"ascii":return b(this,U,q,$);case"latin1":case"binary":return T(this,U,q,$);case"base64":return _(this,U,q,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,U,q,$);default:if(Q)throw new TypeError("Unknown encoding: "+ne);ne=(""+ne).toLowerCase(),Q=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function E(U,q,$){var ne="";$=Math.min(U.length,$);for(var H=q;H<$;++H)ne+=String.fromCharCode(127&U[H]);return ne}function D(U,q,$){var ne="";$=Math.min(U.length,$);for(var H=q;H<$;++H)ne+=String.fromCharCode(U[H]);return ne}function O(U,q,$){var ne=U.length;(!q||q<0)&&(q=0),(!$||$<0||$>ne)&&($=ne);for(var H="",Q=q;Q<$;++Q)H+=W(U[Q]);return H}function R(U,q,$){for(var ne=U.slice(q,$),H="",Q=0;Q$)throw new RangeError("Trying to access beyond buffer length")}function L(U,q,$,ne,H,Q){if(!i.isBuffer(U))throw new TypeError('"buffer" argument must be a Buffer instance');if(q>H||qU.length)throw new RangeError("Index out of range")}function P(U,q,$,ne,H,Q){if($+ne>U.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function N(U,q,$,ne,H){return q=+q,$>>>=0,H||P(U,0,$,4),l.write(U,q,$,ne,23,4),$+4}function B(U,q,$,ne,H){return q=+q,$>>>=0,H||P(U,0,$,8),l.write(U,q,$,ne,52,8),$+8}i.prototype.slice=function(U,q){var $=this.length;(U=~~U)<0?(U+=$)<0&&(U=0):U>$&&(U=$),(q=q===void 0?$:~~q)<0?(q+=$)<0&&(q=0):q>$&&(q=$),q>>=0,q>>>=0,$||z(U,q,this.length);for(var ne=this[U],H=1,Q=0;++Q>>=0,q>>>=0,$||z(U,q,this.length);for(var ne=this[U+--q],H=1;q>0&&(H*=256);)ne+=this[U+--q]*H;return ne},i.prototype.readUInt8=function(U,q){return U>>>=0,q||z(U,1,this.length),this[U]},i.prototype.readUInt16LE=function(U,q){return U>>>=0,q||z(U,2,this.length),this[U]|this[U+1]<<8},i.prototype.readUInt16BE=function(U,q){return U>>>=0,q||z(U,2,this.length),this[U]<<8|this[U+1]},i.prototype.readUInt32LE=function(U,q){return U>>>=0,q||z(U,4,this.length),(this[U]|this[U+1]<<8|this[U+2]<<16)+16777216*this[U+3]},i.prototype.readUInt32BE=function(U,q){return U>>>=0,q||z(U,4,this.length),16777216*this[U]+(this[U+1]<<16|this[U+2]<<8|this[U+3])},i.prototype.readIntLE=function(U,q,$){U>>>=0,q>>>=0,$||z(U,q,this.length);for(var ne=this[U],H=1,Q=0;++Q=(H*=128)&&(ne-=Math.pow(2,8*q)),ne},i.prototype.readIntBE=function(U,q,$){U>>>=0,q>>>=0,$||z(U,q,this.length);for(var ne=q,H=1,Q=this[U+--ne];ne>0&&(H*=256);)Q+=this[U+--ne]*H;return Q>=(H*=128)&&(Q-=Math.pow(2,8*q)),Q},i.prototype.readInt8=function(U,q){return U>>>=0,q||z(U,1,this.length),128&this[U]?-1*(255-this[U]+1):this[U]},i.prototype.readInt16LE=function(U,q){U>>>=0,q||z(U,2,this.length);var $=this[U]|this[U+1]<<8;return 32768&$?4294901760|$:$},i.prototype.readInt16BE=function(U,q){U>>>=0,q||z(U,2,this.length);var $=this[U+1]|this[U]<<8;return 32768&$?4294901760|$:$},i.prototype.readInt32LE=function(U,q){return U>>>=0,q||z(U,4,this.length),this[U]|this[U+1]<<8|this[U+2]<<16|this[U+3]<<24},i.prototype.readInt32BE=function(U,q){return U>>>=0,q||z(U,4,this.length),this[U]<<24|this[U+1]<<16|this[U+2]<<8|this[U+3]},i.prototype.readFloatLE=function(U,q){return U>>>=0,q||z(U,4,this.length),l.read(this,U,!0,23,4)},i.prototype.readFloatBE=function(U,q){return U>>>=0,q||z(U,4,this.length),l.read(this,U,!1,23,4)},i.prototype.readDoubleLE=function(U,q){return U>>>=0,q||z(U,8,this.length),l.read(this,U,!0,52,8)},i.prototype.readDoubleBE=function(U,q){return U>>>=0,q||z(U,8,this.length),l.read(this,U,!1,52,8)},i.prototype.writeUIntLE=function(U,q,$,ne){U=+U,q>>>=0,$>>>=0,ne||L(this,U,q,$,Math.pow(2,8*$)-1,0);var H=1,Q=0;for(this[q]=255&U;++Q<$&&(H*=256);)this[q+Q]=U/H&255;return q+$},i.prototype.writeUIntBE=function(U,q,$,ne){U=+U,q>>>=0,$>>>=0,ne||L(this,U,q,$,Math.pow(2,8*$)-1,0);var H=$-1,Q=1;for(this[q+H]=255&U;--H>=0&&(Q*=256);)this[q+H]=U/Q&255;return q+$},i.prototype.writeUInt8=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,1,255,0),this[q]=255&U,q+1},i.prototype.writeUInt16LE=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,2,65535,0),this[q]=255&U,this[q+1]=U>>>8,q+2},i.prototype.writeUInt16BE=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,2,65535,0),this[q]=U>>>8,this[q+1]=255&U,q+2},i.prototype.writeUInt32LE=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,4,4294967295,0),this[q+3]=U>>>24,this[q+2]=U>>>16,this[q+1]=U>>>8,this[q]=255&U,q+4},i.prototype.writeUInt32BE=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,4,4294967295,0),this[q]=U>>>24,this[q+1]=U>>>16,this[q+2]=U>>>8,this[q+3]=255&U,q+4},i.prototype.writeIntLE=function(U,q,$,ne){if(U=+U,q>>>=0,!ne){var H=Math.pow(2,8*$-1);L(this,U,q,$,H-1,-H)}var Q=0,ee=1,ie=0;for(this[q]=255&U;++Q<$&&(ee*=256);)U<0&&ie===0&&this[q+Q-1]!==0&&(ie=1),this[q+Q]=(U/ee>>0)-ie&255;return q+$},i.prototype.writeIntBE=function(U,q,$,ne){if(U=+U,q>>>=0,!ne){var H=Math.pow(2,8*$-1);L(this,U,q,$,H-1,-H)}var Q=$-1,ee=1,ie=0;for(this[q+Q]=255&U;--Q>=0&&(ee*=256);)U<0&&ie===0&&this[q+Q+1]!==0&&(ie=1),this[q+Q]=(U/ee>>0)-ie&255;return q+$},i.prototype.writeInt8=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,1,127,-128),U<0&&(U=255+U+1),this[q]=255&U,q+1},i.prototype.writeInt16LE=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,2,32767,-32768),this[q]=255&U,this[q+1]=U>>>8,q+2},i.prototype.writeInt16BE=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,2,32767,-32768),this[q]=U>>>8,this[q+1]=255&U,q+2},i.prototype.writeInt32LE=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,4,2147483647,-2147483648),this[q]=255&U,this[q+1]=U>>>8,this[q+2]=U>>>16,this[q+3]=U>>>24,q+4},i.prototype.writeInt32BE=function(U,q,$){return U=+U,q>>>=0,$||L(this,U,q,4,2147483647,-2147483648),U<0&&(U=4294967295+U+1),this[q]=U>>>24,this[q+1]=U>>>16,this[q+2]=U>>>8,this[q+3]=255&U,q+4},i.prototype.writeFloatLE=function(U,q,$){return N(this,U,q,!0,$)},i.prototype.writeFloatBE=function(U,q,$){return N(this,U,q,!1,$)},i.prototype.writeDoubleLE=function(U,q,$){return B(this,U,q,!0,$)},i.prototype.writeDoubleBE=function(U,q,$){return B(this,U,q,!1,$)},i.prototype.copy=function(U,q,$,ne){if(!i.isBuffer(U))throw new TypeError("argument should be a Buffer");if($||($=0),ne||ne===0||(ne=this.length),q>=U.length&&(q=U.length),q||(q=0),ne>0&&ne<$&&(ne=$),ne===$||U.length===0||this.length===0)return 0;if(q<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("Index out of range");if(ne<0)throw new RangeError("sourceEnd out of bounds");ne>this.length&&(ne=this.length),U.length-q=0;--Q)U[Q+q]=this[Q+$];else Uint8Array.prototype.set.call(U,this.subarray($,ne),q);return H},i.prototype.fill=function(U,q,$,ne){if(typeof U=="string"){if(typeof q=="string"?(ne=q,q=0,$=this.length):typeof $=="string"&&(ne=$,$=this.length),ne!==void 0&&typeof ne!="string")throw new TypeError("encoding must be a string");if(typeof ne=="string"&&!i.isEncoding(ne))throw new TypeError("Unknown encoding: "+ne);if(U.length===1){var H=U.charCodeAt(0);(ne==="utf8"&&H<128||ne==="latin1")&&(U=H)}}else typeof U=="number"&&(U&=255);if(q<0||this.length>>=0,$=$===void 0?this.length:$>>>0,U||(U=0),typeof U=="number")for(Q=q;Q<$;++Q)this[Q]=U;else{var ee=i.isBuffer(U)?U:i.from(U,ne),ie=ee.length;if(ie===0)throw new TypeError('The value "'+U+'" is invalid for argument "value"');for(Q=0;Q<$-q;++Q)this[Q+q]=ee[Q%ie]}return this};var G=/[^+/0-9A-Za-z-_]/g;function W(U){return U<16?"0"+U.toString(16):U.toString(16)}function K(U,q){var $;q=q||1/0;for(var ne=U.length,H=null,Q=[],ee=0;ee55295&&$<57344){if(!H){if($>56319){(q-=3)>-1&&Q.push(239,191,189);continue}if(ee+1===ne){(q-=3)>-1&&Q.push(239,191,189);continue}H=$;continue}if($<56320){(q-=3)>-1&&Q.push(239,191,189),H=$;continue}$=65536+(H-55296<<10|$-56320)}else H&&(q-=3)>-1&&Q.push(239,191,189);if(H=null,$<128){if((q-=1)<0)break;Q.push($)}else if($<2048){if((q-=2)<0)break;Q.push($>>6|192,63&$|128)}else if($<65536){if((q-=3)<0)break;Q.push($>>12|224,$>>6&63|128,63&$|128)}else{if(!($<1114112))throw new Error("Invalid code point");if((q-=4)<0)break;Q.push($>>18|240,$>>12&63|128,$>>6&63|128,63&$|128)}}return Q}function te(U){return a.toByteArray(function(q){if((q=(q=q.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;q.length%4!=0;)q+="=";return q}(U))}function Y(U,q,$,ne){for(var H=0;H=q.length||H>=U.length);++H)q[H+$]=U[H];return H}function Z(U,q){return U instanceof q||U!=null&&U.constructor!=null&&U.constructor.name!=null&&U.constructor.name===q.name}function re(U){return U!=U}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":79,buffer:85,ieee754:230}],86:[function(e,o,f){o.exports=function(r,a,l){return al?l:r:ra?a:r}},{}],87:[function(e,o,f){var r=e("clamp");function a(l,c){c==null&&(c=!0);var i=l[0],s=l[1],u=l[2],d=l[3];return d==null&&(d=c?1:255),c&&(i*=255,s*=255,u*=255,d*=255),16777216*(i=255&r(i,0,255))+((s=255&r(s,0,255))<<16)+((u=255&r(u,0,255))<<8)+(d=255&r(d,0,255))}o.exports=a,o.exports.to=a,o.exports.from=function(l,c){var i=(l=+l)>>>24,s=(16711680&l)>>>16,u=(65280&l)>>>8,d=255&l;return c===!1?[i,s,u,d]:[i/255,s/255,u/255,d/255]}},{clamp:86}],88:[function(e,o,f){o.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]}},{}],89:[function(e,o,f){var r=e("color-rgba"),a=e("clamp"),l=e("dtype");o.exports=function(c,i){i!=="float"&&i||(i="array"),i==="uint"&&(i="uint8"),i==="uint_clamped"&&(i="uint8_clamped");var s=new(l(i))(4),u=i!=="uint8"&&i!=="uint8_clamped";return c.length&&typeof c!="string"||((c=r(c))[0]/=255,c[1]/=255,c[2]/=255),function(d){return d instanceof Uint8Array||d instanceof Uint8ClampedArray||!!(Array.isArray(d)&&(d[0]>1||d[0]===0)&&(d[1]>1||d[1]===0)&&(d[2]>1||d[2]===0)&&(!d[3]||d[3]>1))}(c)?(s[0]=c[0],s[1]=c[1],s[2]=c[2],s[3]=c[3]!=null?c[3]:255,u&&(s[0]/=255,s[1]/=255,s[2]/=255,s[3]/=255),s):(u?(s[0]=c[0],s[1]=c[1],s[2]=c[2],s[3]=c[3]!=null?c[3]:1):(s[0]=a(Math.floor(255*c[0]),0,255),s[1]=a(Math.floor(255*c[1]),0,255),s[2]=a(Math.floor(255*c[2]),0,255),s[3]=c[3]==null?255:a(Math.floor(255*c[3]),0,255)),s)}},{clamp:86,"color-rgba":91,dtype:127}],90:[function(e,o,f){(function(r){(function(){var a=e("color-name"),l=e("is-plain-obj"),c=e("defined");o.exports=function(s){var u,d,h=[],m=1;if(typeof s=="string")if(a[s])h=a[s].slice(),d="rgb";else if(s==="transparent")m=0,d="rgb",h=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(s)){var g=(y=s.slice(1)).length;m=1,g<=4?(h=[parseInt(y[0]+y[0],16),parseInt(y[1]+y[1],16),parseInt(y[2]+y[2],16)],g===4&&(m=parseInt(y[3]+y[3],16)/255)):(h=[parseInt(y[0]+y[1],16),parseInt(y[2]+y[3],16),parseInt(y[4]+y[5],16)],g===8&&(m=parseInt(y[6]+y[7],16)/255)),h[0]||(h[0]=0),h[1]||(h[1]=0),h[2]||(h[2]=0),d="rgb"}else if(u=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(s)){var p=u[1],v=p==="rgb",y=p.replace(/a$/,"");d=y,g=y==="cmyk"?4:y==="gray"?1:3,h=u[2].trim().split(/\s*,\s*/).map(function(w,k){if(/%$/.test(w))return k===g?parseFloat(w)/100:y==="rgb"?255*parseFloat(w)/100:parseFloat(w);if(y[k]==="h"){if(/deg$/.test(w))return parseFloat(w);if(i[w]!==void 0)return i[w]}return parseFloat(w)}),p===y&&h.push(1),m=v||h[g]===void 0?1:h[g],h=h.slice(0,g)}else s.length>10&&/[0-9](?:\s|\/)/.test(s)&&(h=s.match(/([0-9]+)/g).map(function(w){return parseFloat(w)}),d=s.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(s))if(l(s)){var x=c(s.r,s.red,s.R,null);x!==null?(d="rgb",h=[x,c(s.g,s.green,s.G),c(s.b,s.blue,s.B)]):(d="hsl",h=[c(s.h,s.hue,s.H),c(s.s,s.saturation,s.S),c(s.l,s.lightness,s.L,s.b,s.brightness)]),m=c(s.a,s.alpha,s.opacity,1),s.opacity!=null&&(m/=100)}else(Array.isArray(s)||r.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(s))&&(h=[s[0],s[1],s[2]],d="rgb",m=s.length===4?s[3]:1);else d="rgb",h=[s>>>16,(65280&s)>>>8,255&s];return{space:d,values:h,alpha:m}};var i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this)}).call(this,typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{})},{"color-name":88,defined:124,"is-plain-obj":236}],91:[function(e,o,f){var r=e("color-parse"),a=e("color-space/hsl"),l=e("clamp");o.exports=function(c){var i,s=r(c);return s.space?((i=Array(3))[0]=l(s.values[0],0,255),i[1]=l(s.values[1],0,255),i[2]=l(s.values[2],0,255),s.space[0]==="h"&&(i=a.rgb(i)),i.push(l(s.alpha,0,1)),i):[]}},{clamp:86,"color-parse":90,"color-space/hsl":92}],92:[function(e,o,f){var r=e("./rgb");o.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(a){var l,c,i,s,u,d=a[0]/360,h=a[1]/100,m=a[2]/100;if(h===0)return[u=255*m,u,u];l=2*m-(c=m<.5?m*(1+h):m+h-m*h),s=[0,0,0];for(var g=0;g<3;g++)(i=d+1/3*-(g-1))<0?i++:i>1&&i--,u=6*i<1?l+6*(c-l)*i:2*i<1?c:3*i<2?l+(c-l)*(2/3-i)*6:l,s[g]=255*u;return s}},r.hsl=function(a){var l,c,i=a[0]/255,s=a[1]/255,u=a[2]/255,d=Math.min(i,s,u),h=Math.max(i,s,u),m=h-d;return h===d?l=0:i===h?l=(s-u)/m:s===h?l=2+(u-i)/m:u===h&&(l=4+(i-s)/m),(l=Math.min(60*l,360))<0&&(l+=360),c=(d+h)/2,[l,100*(h===d?0:c<=.5?m/(h+d):m/(2-h-d)),100*c]}},{"./rgb":93}],93:[function(e,o,f){o.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],94:[function(e,o,f){o.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|\xE7)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|\xE9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xE9)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|\xE3)o.?tom(e|\xE9)",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"}},{}],95:[function(e,o,f){o.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]},{}],96:[function(e,o,f){o.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]},{}],97:[function(e,o,f){o.exports=["normal","italic","oblique"]},{}],98:[function(e,o,f){o.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]},{}],99:[function(e,o,f){o.exports={parse:e("./parse"),stringify:e("./stringify")}},{"./parse":101,"./stringify":102}],100:[function(e,o,f){var r=e("css-font-size-keywords");o.exports={isSize:function(a){return/^[\d\.]/.test(a)||a.indexOf("/")!==-1||r.indexOf(a)!==-1}}},{"css-font-size-keywords":95}],101:[function(e,o,f){var r=e("unquote"),a=e("css-global-keywords"),l=e("css-system-font-keywords"),c=e("css-font-weight-keywords"),i=e("css-font-style-keywords"),s=e("css-font-stretch-keywords"),u=e("string-split-by"),d=e("./lib/util").isSize;o.exports=m;var h=m.cache={};function m(p){if(typeof p!="string")throw new Error("Font argument must be a string.");if(h[p])return h[p];if(p==="")throw new Error("Cannot parse an empty string.");if(l.indexOf(p)!==-1)return h[p]={system:p};for(var v,y={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},x=u(p,/\s+/);v=x.shift();){if(a.indexOf(v)!==-1)return["style","variant","weight","stretch"].forEach(function(k){y[k]=v}),h[p]=y;if(i.indexOf(v)===-1)if(v!=="normal"&&v!=="small-caps")if(s.indexOf(v)===-1){if(c.indexOf(v)===-1){if(d(v)){var w=u(v,"/");if(y.size=w[0],w[1]!=null?y.lineHeight=g(w[1]):x[0]==="/"&&(x.shift(),y.lineHeight=g(x.shift())),!x.length)throw new Error("Missing required font-family.");return y.family=u(x.join(" "),/\s*,\s*/).map(r),h[p]=y}throw new Error("Unknown or unsupported font token: "+v)}y.weight=v}else y.stretch=v;else y.variant=v;else y.style=v}throw new Error("Missing required font-size.")}function g(p){var v=parseFloat(p);return v.toString()===p?v:p}},{"./lib/util":100,"css-font-stretch-keywords":96,"css-font-style-keywords":97,"css-font-weight-keywords":98,"css-global-keywords":103,"css-system-font-keywords":104,"string-split-by":305,unquote:328}],102:[function(e,o,f){var r=e("pick-by-alias"),a=e("./lib/util").isSize,l=v(e("css-global-keywords")),c=v(e("css-system-font-keywords")),i=v(e("css-font-weight-keywords")),s=v(e("css-font-style-keywords")),u=v(e("css-font-stretch-keywords")),d={normal:1,"small-caps":1},h={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},m="1rem",g="serif";function p(y,x){if(y&&!x[y]&&!l[y])throw Error("Unknown keyword `"+y+"`");return y}function v(y){for(var x={},w=0;wL?1:z>=L?0:NaN}function l(z){var L;return z.length===1&&(L=z,z=function(P,N){return a(L(P),N)}),{left:function(P,N,B,G){for(B==null&&(B=0),G==null&&(G=P.length);B>>1;z(P[W],N)<0?B=W+1:G=W}return B},right:function(P,N,B,G){for(B==null&&(B=0),G==null&&(G=P.length);B>>1;z(P[W],N)>0?G=W:B=W+1}return B}}}var c=l(a),i=c.right,s=c.left;function u(z,L){return[z,L]}function d(z){return z===null?NaN:+z}function h(z,L){var P,N,B=z.length,G=0,W=-1,K=0,te=0;if(L==null)for(;++W1)return te/(G-1)}function m(z,L){var P=h(z,L);return P&&Math.sqrt(P)}function g(z,L){var P,N,B,G=z.length,W=-1;if(L==null){for(;++W=P)for(N=B=P;++WP&&(N=P),B=P)for(N=B=P;++WP&&(N=P),B=0?(G>=b?10:G>=T?5:G>=_?2:1)*Math.pow(10,B):-Math.pow(10,-B)/(G>=b?10:G>=T?5:G>=_?2:1)}function A(z,L,P){var N=Math.abs(L-z)/Math.max(0,P),B=Math.pow(10,Math.floor(Math.log(N)/Math.LN10)),G=N/B;return G>=b?B*=10:G>=T?B*=5:G>=_&&(B*=2),L=1)return+P(z[N-1],N-1,z);var N,B=(N-1)*L,G=Math.floor(B),W=+P(z[G],G,z);return W+(+P(z[G+1],G+1,z)-W)*(B-G)}}function D(z,L){var P,N,B=z.length,G=-1;if(L==null){for(;++G=P)for(N=P;++GP&&(N=P)}else for(;++G=P)for(N=P;++GP&&(N=P);return N}function O(z){if(!(B=z.length))return[];for(var L=-1,P=D(z,R),N=new Array(P);++Lz?1:L>=z?0:NaN},r.deviation=m,r.extent=g,r.histogram=function(){var z=w,L=g,P=M;function N(B){var G,W,K=B.length,te=new Array(K);for(G=0;Gre;)U.pop(),--q;var $,ne=new Array(q+1);for(G=0;G<=q;++G)($=ne[G]=[]).x0=G>0?U[G-1]:Z,$.x1=G=P)for(N=P;++GN&&(N=P)}else for(;++G=P)for(N=P;++GN&&(N=P);return N},r.mean=function(z,L){var P,N=z.length,B=N,G=-1,W=0;if(L==null)for(;++G=0;)for(L=(N=z[B]).length;--L>=0;)P[--W]=N[L];return P},r.min=D,r.pairs=function(z,L){L==null&&(L=u);for(var P=0,N=z.length-1,B=z[0],G=new Array(N<0?0:N);P0)return[z];if((N=L0)for(z=Math.ceil(z/W),L=Math.floor(L/W),G=new Array(B=Math.ceil(L-z+1));++K=y.length)return g!=null&&k.sort(g),p!=null?p(k):k;for(var S,A,M,E=-1,D=k.length,O=y[b++],R=l(),z=T();++Ey.length)return T;var S,A=x[_-1];return p!=null&&_>=y.length?S=T.entries():(S=[],T.each(function(M,E){S.push({key:E,values:b(M,_)})})),A!=null?S.sort(function(M,E){return A(M.key,E.key)}):S}(w(k,0,s,u),0)},key:function(k){return y.push(k),v},sortKeys:function(k){return x[y.length-1]=k,v},sortValues:function(k){return g=k,v},rollup:function(k){return p=k,v}}},r.set=m,r.map=l,r.keys=function(g){var p=[];for(var v in g)p.push(v);return p},r.values=function(g){var p=[];for(var v in g)p.push(g[v]);return p},r.entries=function(g){var p=[];for(var v in g)p.push({key:v,value:g[v]});return p},Object.defineProperty(r,"__esModule",{value:!0})})},{}],109:[function(e,o,f){(function(r,a){a(typeof f=="object"&&o!==void 0?f:(r=r||self).d3=r.d3||{})})(this,function(r){function a(de,ye,Me){de.prototype=ye.prototype=Me,Me.constructor=de}function l(de,ye){var Me=Object.create(de.prototype);for(var ke in ye)Me[ke]=ye[ke];return Me}function c(){}var i="\\s*([+-]?\\d+)\\s*",s="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",u="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",d=/^#([0-9a-f]{3,8})$/,h=new RegExp("^rgb\\("+[i,i,i]+"\\)$"),m=new RegExp("^rgb\\("+[u,u,u]+"\\)$"),g=new RegExp("^rgba\\("+[i,i,i,s]+"\\)$"),p=new RegExp("^rgba\\("+[u,u,u,s]+"\\)$"),v=new RegExp("^hsl\\("+[s,u,u]+"\\)$"),y=new RegExp("^hsla\\("+[s,u,u,s]+"\\)$"),x={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};function w(){return this.rgb().formatHex()}function k(){return this.rgb().formatRgb()}function b(de){var ye,Me;return de=(de+"").trim().toLowerCase(),(ye=d.exec(de))?(Me=ye[1].length,ye=parseInt(ye[1],16),Me===6?T(ye):Me===3?new M(ye>>8&15|ye>>4&240,ye>>4&15|240&ye,(15&ye)<<4|15&ye,1):Me===8?_(ye>>24&255,ye>>16&255,ye>>8&255,(255&ye)/255):Me===4?_(ye>>12&15|ye>>8&240,ye>>8&15|ye>>4&240,ye>>4&15|240&ye,((15&ye)<<4|15&ye)/255):null):(ye=h.exec(de))?new M(ye[1],ye[2],ye[3],1):(ye=m.exec(de))?new M(255*ye[1]/100,255*ye[2]/100,255*ye[3]/100,1):(ye=g.exec(de))?_(ye[1],ye[2],ye[3],ye[4]):(ye=p.exec(de))?_(255*ye[1]/100,255*ye[2]/100,255*ye[3]/100,ye[4]):(ye=v.exec(de))?R(ye[1],ye[2]/100,ye[3]/100,1):(ye=y.exec(de))?R(ye[1],ye[2]/100,ye[3]/100,ye[4]):x.hasOwnProperty(de)?T(x[de]):de==="transparent"?new M(NaN,NaN,NaN,0):null}function T(de){return new M(de>>16&255,de>>8&255,255&de,1)}function _(de,ye,Me,ke){return ke<=0&&(de=ye=Me=NaN),new M(de,ye,Me,ke)}function S(de){return de instanceof c||(de=b(de)),de?new M((de=de.rgb()).r,de.g,de.b,de.opacity):new M}function A(de,ye,Me,ke){return arguments.length===1?S(de):new M(de,ye,Me,ke??1)}function M(de,ye,Me,ke){this.r=+de,this.g=+ye,this.b=+Me,this.opacity=+ke}function E(){return"#"+O(this.r)+O(this.g)+O(this.b)}function D(){var de=this.opacity;return((de=isNaN(de)?1:Math.max(0,Math.min(1,de)))===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(de===1?")":", "+de+")")}function O(de){return((de=Math.max(0,Math.min(255,Math.round(de)||0)))<16?"0":"")+de.toString(16)}function R(de,ye,Me,ke){return ke<=0?de=ye=Me=NaN:Me<=0||Me>=1?de=ye=NaN:ye<=0&&(de=NaN),new P(de,ye,Me,ke)}function z(de){if(de instanceof P)return new P(de.h,de.s,de.l,de.opacity);if(de instanceof c||(de=b(de)),!de)return new P;if(de instanceof P)return de;var ye=(de=de.rgb()).r/255,Me=de.g/255,ke=de.b/255,Ee=Math.min(ye,Me,ke),ze=Math.max(ye,Me,ke),Fe=NaN,Ve=ze-Ee,Ke=(ze+Ee)/2;return Ve?(Fe=ye===ze?(Me-ke)/Ve+6*(Me0&&Ke<1?0:Fe,new P(Fe,Ve,Ke,de.opacity)}function L(de,ye,Me,ke){return arguments.length===1?z(de):new P(de,ye,Me,ke??1)}function P(de,ye,Me,ke){this.h=+de,this.s=+ye,this.l=+Me,this.opacity=+ke}function N(de,ye,Me){return 255*(de<60?ye+(Me-ye)*de/60:de<180?Me:de<240?ye+(Me-ye)*(240-de)/60:ye)}a(c,b,{copy:function(de){return Object.assign(new this.constructor,this,de)},displayable:function(){return this.rgb().displayable()},hex:w,formatHex:w,formatHsl:function(){return z(this).formatHsl()},formatRgb:k,toString:k}),a(M,A,l(c,{brighter:function(de){return de=de==null?1/.7:Math.pow(1/.7,de),new M(this.r*de,this.g*de,this.b*de,this.opacity)},darker:function(de){return de=de==null?.7:Math.pow(.7,de),new M(this.r*de,this.g*de,this.b*de,this.opacity)},rgb:function(){return this},displayable:function(){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:E,formatHex:E,formatRgb:D,toString:D})),a(P,L,l(c,{brighter:function(de){return de=de==null?1/.7:Math.pow(1/.7,de),new P(this.h,this.s,this.l*de,this.opacity)},darker:function(de){return de=de==null?.7:Math.pow(.7,de),new P(this.h,this.s,this.l*de,this.opacity)},rgb:function(){var de=this.h%360+360*(this.h<0),ye=isNaN(de)||isNaN(this.s)?0:this.s,Me=this.l,ke=Me+(Me<.5?Me:1-Me)*ye,Ee=2*Me-ke;return new M(N(de>=240?de-240:de+120,Ee,ke),N(de,Ee,ke),N(de<120?de+240:de-120,Ee,ke),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var de=this.opacity;return((de=isNaN(de)?1:Math.max(0,Math.min(1,de)))===1?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(de===1?")":", "+de+")")}}));var B=Math.PI/180,G=180/Math.PI,W=6/29,K=3*W*W;function te(de){if(de instanceof Z)return new Z(de.l,de.a,de.b,de.opacity);if(de instanceof Q)return ee(de);de instanceof M||(de=S(de));var ye,Me,ke=$(de.r),Ee=$(de.g),ze=$(de.b),Fe=re((.2225045*ke+.7168786*Ee+.0606169*ze)/1);return ke===Ee&&Ee===ze?ye=Me=Fe:(ye=re((.4360747*ke+.3850649*Ee+.1430804*ze)/.96422),Me=re((.0139322*ke+.0971045*Ee+.7141733*ze)/.82521)),new Z(116*Fe-16,500*(ye-Fe),200*(Fe-Me),de.opacity)}function Y(de,ye,Me,ke){return arguments.length===1?te(de):new Z(de,ye,Me,ke??1)}function Z(de,ye,Me,ke){this.l=+de,this.a=+ye,this.b=+Me,this.opacity=+ke}function re(de){return de>.008856451679035631?Math.pow(de,1/3):de/K+4/29}function U(de){return de>W?de*de*de:K*(de-4/29)}function q(de){return 255*(de<=.0031308?12.92*de:1.055*Math.pow(de,1/2.4)-.055)}function $(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function ne(de){if(de instanceof Q)return new Q(de.h,de.c,de.l,de.opacity);if(de instanceof Z||(de=te(de)),de.a===0&&de.b===0)return new Q(NaN,0=0&&(g=m.slice(p+1),m=m.slice(0,p)),m&&!h.hasOwnProperty(m))throw new Error("unknown type: "+m);return{type:m,name:g}})}function s(d,h){for(var m,g=0,p=d.length;g0)for(var m,g,p=new Array(m),v=0;vO+U||teR+U||YD.index){var q=O-Z.x-Z.vx,$=R-Z.y-Z.vy,ne=q*q+$*$;neM.r&&(M.r=M[E].r)}function A(){if(w){var M,E,D=w.length;for(k=new Array(D),M=0;M=S)){(R.data!==w||R.next)&&(N===0&&(W+=(N=u())*N),B===0&&(W+=(B=u())*B),W<_&&(W=Math.sqrt(_*W)));do R.data!==w&&(G=b[R.data.index]*k/W,w.vx+=N*G,w.vy+=B*G);while(R=R.next)}}return M.initialize=function(R){x=R,E()},M.strength=function(R){return arguments.length?(T=typeof R=="function"?R:s(+R),E(),M):T},M.distanceMin=function(R){return arguments.length?(_=R*R,M):Math.sqrt(_)},M.distanceMax=function(R){return arguments.length?(S=R*R,M):Math.sqrt(S)},M.theta=function(R){return arguments.length?(A=R*R,M):Math.sqrt(A)},M},r.forceRadial=function(x,w,k){var b,T,_,S=s(.1);function A(E){for(var D=0,O=b.length;D1?(P==null?A.remove(L):A.set(L,z(P)),w):A.get(L)},find:function(L,P,N){var B,G,W,K,te,Y=0,Z=x.length;for(N==null?N=1/0:N*=N,Y=0;Y1?(E.on(L,P),w):E.on(L)}}},r.forceX=function(x){var w,k,b,T=s(.1);function _(A){for(var M,E=0,D=w.length;E1?T[0]+T.slice(2):T,+w.slice(b+1)]}function l(w){return(w=a(Math.abs(w)))?w[1]:NaN}var c,i=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s(w){if(!(k=i.exec(w)))throw new Error("invalid format: "+w);var k;return new u({fill:k[1],align:k[2],sign:k[3],symbol:k[4],zero:k[5],width:k[6],comma:k[7],precision:k[8]&&k[8].slice(1),trim:k[9],type:k[10]})}function u(w){this.fill=w.fill===void 0?" ":w.fill+"",this.align=w.align===void 0?">":w.align+"",this.sign=w.sign===void 0?"-":w.sign+"",this.symbol=w.symbol===void 0?"":w.symbol+"",this.zero=!!w.zero,this.width=w.width===void 0?void 0:+w.width,this.comma=!!w.comma,this.precision=w.precision===void 0?void 0:+w.precision,this.trim=!!w.trim,this.type=w.type===void 0?"":w.type+""}function d(w,k){var b=a(w,k);if(!b)return w+"";var T=b[0],_=b[1];return _<0?"0."+new Array(-_).join("0")+T:T.length>_+1?T.slice(0,_+1)+"."+T.slice(_+1):T+new Array(_-T.length+2).join("0")}s.prototype=u.prototype,u.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,0|this.width))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var h={"%":function(w,k){return(100*w).toFixed(k)},b:function(w){return Math.round(w).toString(2)},c:function(w){return w+""},d:function(w){return Math.abs(w=Math.round(w))>=1e21?w.toLocaleString("en").replace(/,/g,""):w.toString(10)},e:function(w,k){return w.toExponential(k)},f:function(w,k){return w.toFixed(k)},g:function(w,k){return w.toPrecision(k)},o:function(w){return Math.round(w).toString(8)},p:function(w,k){return d(100*w,k)},r:d,s:function(w,k){var b=a(w,k);if(!b)return w+"";var T=b[0],_=b[1],S=_-(c=3*Math.max(-8,Math.min(8,Math.floor(_/3))))+1,A=T.length;return S===A?T:S>A?T+new Array(S-A+1).join("0"):S>0?T.slice(0,S)+"."+T.slice(S):"0."+new Array(1-S).join("0")+a(w,Math.max(0,k+S-1))[0]},X:function(w){return Math.round(w).toString(16).toUpperCase()},x:function(w){return Math.round(w).toString(16)}};function m(w){return w}var g,p=Array.prototype.map,v=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function y(w){var k,b,T=w.grouping===void 0||w.thousands===void 0?m:(k=p.call(w.grouping,Number),b=w.thousands+"",function(z,L){for(var P=z.length,N=[],B=0,G=k[0],W=0;P>0&&G>0&&(W+G+1>L&&(G=Math.max(1,L-W)),N.push(z.substring(P-=G,P+G)),!((W+=G+1)>L));)G=k[B=(B+1)%k.length];return N.reverse().join(b)}),_=w.currency===void 0?"":w.currency[0]+"",S=w.currency===void 0?"":w.currency[1]+"",A=w.decimal===void 0?".":w.decimal+"",M=w.numerals===void 0?m:function(z){return function(L){return L.replace(/[0-9]/g,function(P){return z[+P]})}}(p.call(w.numerals,String)),E=w.percent===void 0?"%":w.percent+"",D=w.minus===void 0?"-":w.minus+"",O=w.nan===void 0?"NaN":w.nan+"";function R(z){var L=(z=s(z)).fill,P=z.align,N=z.sign,B=z.symbol,G=z.zero,W=z.width,K=z.comma,te=z.precision,Y=z.trim,Z=z.type;Z==="n"?(K=!0,Z="g"):h[Z]||(te===void 0&&(te=12),Y=!0,Z="g"),(G||L==="0"&&P==="=")&&(G=!0,L="0",P="=");var re=B==="$"?_:B==="#"&&/[boxX]/.test(Z)?"0"+Z.toLowerCase():"",U=B==="$"?S:/[%p]/.test(Z)?E:"",q=h[Z],$=/[defgprs%]/.test(Z);function ne(H){var Q,ee,ie,ae=re,ue=U;if(Z==="c")ue=q(H)+ue,H="";else{var le=(H=+H)<0||1/H<0;if(H=isNaN(H)?O:q(Math.abs(H),te),Y&&(H=function(me){e:for(var _e,we=me.length,Te=1,Oe=-1;Te0&&(Oe=0)}return Oe>0?me.slice(0,Oe)+me.slice(_e+1):me}(H)),le&&+H==0&&N!=="+"&&(le=!1),ae=(le?N==="("?N:D:N==="-"||N==="("?"":N)+ae,ue=(Z==="s"?v[8+c/3]:"")+ue+(le&&N==="("?")":""),$){for(Q=-1,ee=H.length;++Q(ie=H.charCodeAt(Q))||ie>57){ue=(ie===46?A+H.slice(Q+1):H.slice(Q))+ue,H=H.slice(0,Q);break}}}K&&!G&&(H=T(H,1/0));var ge=ae.length+H.length+ue.length,fe=ge>1)+ae+H+ue+fe.slice(ge);break;default:H=fe+ae+H+ue}return M(H)}return te=te===void 0?6:/[gprs]/.test(Z)?Math.max(1,Math.min(21,te)):Math.max(0,Math.min(20,te)),ne.toString=function(){return z+""},ne}return{format:R,formatPrefix:function(z,L){var P=R(((z=s(z)).type="f",z)),N=3*Math.max(-8,Math.min(8,Math.floor(l(L)/3))),B=Math.pow(10,-N),G=v[8+N/3];return function(W){return P(B*W)+G}}}}function x(w){return g=y(w),r.format=g.format,r.formatPrefix=g.formatPrefix,g}x({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),r.FormatSpecifier=u,r.formatDefaultLocale=x,r.formatLocale=y,r.formatSpecifier=s,r.precisionFixed=function(w){return Math.max(0,-l(Math.abs(w)))},r.precisionPrefix=function(w,k){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(l(k)/3)))-l(Math.abs(w)))},r.precisionRound=function(w,k){return w=Math.abs(w),k=Math.abs(k)-w,Math.max(0,l(k)-l(w))+1},Object.defineProperty(r,"__esModule",{value:!0})})},{}],113:[function(e,o,f){(function(r,a){typeof f=="object"&&o!==void 0?a(f,e("d3-geo"),e("d3-array")):a(r.d3=r.d3||{},r.d3,r.d3)})(this,function(r,a,l){var c=Math.abs,i=Math.atan,s=Math.atan2,u=Math.cos,d=Math.exp,h=Math.floor,m=Math.log,g=Math.max,p=Math.min,v=Math.pow,y=Math.round,x=Math.sign||function(je){return je>0?1:je<0?-1:0},w=Math.sin,k=Math.tan,b=1e-6,T=Math.PI,_=T/2,S=T/4,A=Math.SQRT1_2,M=P(2),E=P(T),D=2*T,O=180/T,R=T/180;function z(je){return je>1?_:je<-1?-_:Math.asin(je)}function L(je){return je>1?0:je<-1?T:Math.acos(je)}function P(je){return je>0?Math.sqrt(je):0}function N(je){return(d(je)-d(-je))/2}function B(je){return(d(je)+d(-je))/2}function G(je){var $e=k(je/2),Qe=2*m(u(je/2))/($e*$e);function ut(mt,pt){var Ct=u(mt),Qt=u(pt),en=w(pt),Yt=Qt*Ct,an=-((1-Yt?m((1+Yt)/2)/(1-Yt):-.5)+Qe/(1+Yt));return[an*Qt*w(mt),an*en]}return ut.invert=function(mt,pt){var Ct,Qt=P(mt*mt+pt*pt),en=-je/2,Yt=50;if(!Qt)return[0,0];do{var an=en/2,hn=u(an),xn=w(an),_n=xn/hn,Pn=-m(c(hn));en-=Ct=(2/_n*Pn-Qe*_n-Qt)/(-Pn/(xn*xn)+1-Qe/(2*hn*hn))*(hn<0?.7:1)}while(c(Ct)>b&&--Yt>0);var sr=w(en);return[s(mt*sr,Qt*u(en)),z(pt*sr/Qt)]},ut}function W(je,$e){var Qe=u($e),ut=function(mt){return mt?mt/Math.sin(mt):1}(L(Qe*u(je/=2)));return[2*Qe*w(je)*ut,w($e)*ut]}function K(je){var $e=w(je),Qe=u(je),ut=je>=0?1:-1,mt=k(ut*je),pt=(1+$e-Qe)/2;function Ct(Qt,en){var Yt=u(en),an=u(Qt/=2);return[(1+Yt)*w(Qt),(ut*en>-s(an,mt)-.001?0:10*-ut)+pt+w(en)*Qe-(1+Yt)*$e*an]}return Ct.invert=function(Qt,en){var Yt=0,an=0,hn=50;do{var xn=u(Yt),_n=w(Yt),Pn=u(an),sr=w(an),mr=1+Pn,zr=mr*_n-Qt,Br=pt+sr*Qe-mr*$e*xn-en,Jr=mr*xn/2,jr=-_n*sr,Oi=$e*mr*_n/2,Ui=Qe*Pn+$e*xn*sr,ua=jr*Oi-Ui*Jr,sa=(Br*jr-zr*Ui)/ua/2,ca=(zr*Oi-Br*Jr)/ua;c(ca)>2&&(ca/=2),Yt-=sa,an-=ca}while((c(sa)>b||c(ca)>b)&&--hn>0);return ut*an>-s(u(Yt),mt)-.001?[2*Yt,an]:null},Ct}function te(je,$e){var Qe=k($e/2),ut=P(1-Qe*Qe),mt=1+ut*u(je/=2),pt=w(je)*ut/mt,Ct=Qe/mt,Qt=pt*pt,en=Ct*Ct;return[4/3*pt*(3+Qt-3*en),4/3*Ct*(3+3*Qt-en)]}W.invert=function(je,$e){if(!(je*je+4*$e*$e>T*T+b)){var Qe=je,ut=$e,mt=25;do{var pt,Ct=w(Qe),Qt=w(Qe/2),en=u(Qe/2),Yt=w(ut),an=u(ut),hn=w(2*ut),xn=Yt*Yt,_n=an*an,Pn=Qt*Qt,sr=1-_n*en*en,mr=sr?L(an*en)*P(pt=1/sr):pt=0,zr=2*mr*an*Qt-je,Br=mr*Yt-$e,Jr=pt*(_n*Pn+mr*an*en*xn),jr=pt*(.5*Ct*hn-2*mr*Yt*Qt),Oi=.25*pt*(hn*Qt-mr*Yt*_n*Ct),Ui=pt*(xn*en+mr*Pn*an),ua=jr*Oi-Ui*Jr;if(!ua)break;var sa=(Br*jr-zr*Ui)/ua,ca=(zr*Oi-Br*Jr)/ua;Qe-=sa,ut-=ca}while((c(sa)>b||c(ca)>b)&&--mt>0);return[Qe,ut]}},te.invert=function(je,$e){if($e*=3/8,!(je*=3/8)&&c($e)>1)return null;var Qe=1+je*je+$e*$e,ut=P((Qe-P(Qe*Qe-4*$e*$e))/2),mt=z(ut)/3,pt=ut?function(Yt){return m(Yt+P(Yt*Yt-1))}(c($e/ut))/3:function(Yt){return m(Yt+P(Yt*Yt+1))}(c(je))/3,Ct=u(mt),Qt=B(pt),en=Qt*Qt-Ct*Ct;return[2*x(je)*s(N(pt)*Ct,.25-en),2*x($e)*s(Qt*w(mt),.25+en)]};var Y=P(8),Z=m(1+M);function re(je,$e){var Qe=c($e);return Qe_){var Ct=s(pt[1],pt[0]),Qt=P(pt[0]*pt[0]+pt[1]*pt[1]),en=$e*y((Ct-_)/$e)+_,Yt=s(w(Ct-=en),2-u(Ct));Ct=en+z(T/Qt*w(Yt))-Yt,pt[0]=Qt*u(Ct),pt[1]=Qt*w(Ct)}return pt}return Qe.invert=function(ut,mt){var pt=P(ut*ut+mt*mt);if(pt>_){var Ct=s(mt,ut),Qt=$e*y((Ct-_)/$e)+_,en=Ct>Qt?-1:1,Yt=pt*u(Qt-Ct),an=1/k(en*L((Yt-T)/P(T*(T-2*Yt)+pt*pt)));Ct=Qt+2*i((an+en*P(an*an-3))/3),ut=pt*u(Ct),mt=pt*w(Ct)}return a.geoAzimuthalEquidistantRaw.invert(ut,mt)},Qe}function q(je,$e){if(arguments.length<2&&($e=je),$e===1)return a.geoAzimuthalEqualAreaRaw;if($e===1/0)return $;function Qe(ut,mt){var pt=a.geoAzimuthalEqualAreaRaw(ut/$e,mt);return pt[0]*=je,pt}return Qe.invert=function(ut,mt){var pt=a.geoAzimuthalEqualAreaRaw.invert(ut/je,mt);return pt[0]*=$e,pt},Qe}function $(je,$e){return[je*u($e)/u($e/=2),2*w($e)]}function ne(je,$e,Qe){var ut,mt,pt,Ct=100;Qe=Qe===void 0?0:+Qe,$e=+$e;do(mt=je(Qe))===(pt=je(Qe+b))&&(pt=mt+b),Qe-=ut=-1*b*(mt-$e)/(mt-pt);while(Ct-- >0&&c(ut)>b);return Ct<0?NaN:Qe}function H(je,$e,Qe){return $e===void 0&&($e=40),Qe===void 0&&(Qe=1e-12),function(ut,mt,pt,Ct){var Qt,en,Yt;pt=pt===void 0?0:+pt,Ct=Ct===void 0?0:+Ct;for(var an=0;an<$e;an++){var hn=je(pt,Ct),xn=hn[0]-ut,_n=hn[1]-mt;if(c(xn)Qt)pt-=en/=2,Ct-=Yt/=2;else{Qt=Pn;var sr=(pt>0?-1:1)*Qe,mr=(Ct>0?-1:1)*Qe,zr=je(pt+sr,Ct),Br=je(pt,Ct+mr),Jr=(zr[0]-hn[0])/sr,jr=(zr[1]-hn[1])/sr,Oi=(Br[0]-hn[0])/mr,Ui=(Br[1]-hn[1])/mr,ua=Ui*Jr-jr*Oi,sa=(c(ua)<.5?.5:1)/ua;if(pt+=en=(_n*Oi-xn*Ui)*sa,Ct+=Yt=(xn*jr-_n*Jr)*sa,c(en)0&&(pt[1]*=1+Ct/1.5*pt[0]*pt[0]),pt}return $e.invert=H($e),$e}function ee(je,$e){var Qe,ut=je*w($e),mt=30;do $e-=Qe=($e+w($e)-ut)/(1+u($e));while(c(Qe)>b&&--mt>0);return $e/2}function ie(je,$e,Qe){function ut(mt,pt){return[je*mt*u(pt=ee(Qe,pt)),$e*w(pt)]}return ut.invert=function(mt,pt){return pt=z(pt/$e),[mt/(je*u(pt)),z((2*pt+w(2*pt))/Qe)]},ut}re.invert=function(je,$e){if((ut=c($e))1e-12&&--pt>0);return[je/(u(mt)*(Y-1/w(mt))),x($e)*mt]},$.invert=function(je,$e){var Qe=2*z($e/2);return[je*u(Qe/2)/u(Qe),Qe]};var ae=ie(M/_,M,T),ue=2.00276,le=1.11072;function ge(je,$e){var Qe=ee(T,$e);return[ue*je/(1/u($e)+le/u(Qe)),($e+M*w(Qe))/ue]}function fe(je){var $e=0,Qe=a.geoProjectionMutator(je),ut=Qe($e);return ut.parallel=function(mt){return arguments.length?Qe($e=mt*R):$e*O},ut}function me(je,$e){return[je*u($e),$e]}function _e(je){if(!je)return me;var $e=1/k(je);function Qe(ut,mt){var pt=$e+je-mt,Ct=pt&&ut*u(mt)/pt;return[pt*w(Ct),$e-pt*u(Ct)]}return Qe.invert=function(ut,mt){var pt=P(ut*ut+(mt=$e-mt)*mt),Ct=$e+je-pt;return[pt/u(Ct)*s(ut,mt),Ct]},Qe}function we(je){function $e(Qe,ut){var mt=_-ut,pt=mt&&Qe*je*w(mt)/mt;return[mt*w(pt)/je,_-mt*u(pt)]}return $e.invert=function(Qe,ut){var mt=Qe*je,pt=_-ut,Ct=P(mt*mt+pt*pt),Qt=s(mt,pt);return[(Ct?Ct/w(Ct):1)*Qt/je,_-Ct]},$e}ge.invert=function(je,$e){var Qe,ut,mt=ue*$e,pt=$e<0?-S:S,Ct=25;do ut=mt-M*w(pt),pt-=Qe=(w(2*pt)+2*pt-T*w(ut))/(2*u(2*pt)+2+T*u(ut)*M*u(pt));while(c(Qe)>b&&--Ct>0);return ut=mt-M*w(pt),[je*(1/u(ut)+le/u(pt))/ue,ut]},me.invert=function(je,$e){return[je/u($e),$e]};var Te=ie(1,4/T,T);function Oe(je,$e,Qe,ut,mt,pt){var Ct,Qt=u(pt);if(c(je)>1||c(pt)>1)Ct=L(Qe*mt+$e*ut*Qt);else{var en=w(je/2),Yt=w(pt/2);Ct=2*z(P(en*en+$e*ut*Yt*Yt))}return c(Ct)>b?[Ct,s(ut*w(pt),$e*mt-Qe*ut*Qt)]:[0,0]}function de(je,$e,Qe){return L((je*je+$e*$e-Qe*Qe)/(2*je*$e))}function ye(je){return je-2*T*h((je+T)/(2*T))}function Me(je,$e,Qe){for(var ut,mt=[[je[0],je[1],w(je[1]),u(je[1])],[$e[0],$e[1],w($e[1]),u($e[1])],[Qe[0],Qe[1],w(Qe[1]),u(Qe[1])]],pt=mt[2],Ct=0;Ct<3;++Ct,pt=ut)ut=mt[Ct],pt.v=Oe(ut[1]-pt[1],pt[3],pt[2],ut[3],ut[2],ut[0]-pt[0]),pt.point=[0,0];var Qt=de(mt[0].v[0],mt[2].v[0],mt[1].v[0]),en=de(mt[0].v[0],mt[1].v[0],mt[2].v[0]),Yt=T-Qt;mt[2].point[1]=0,mt[0].point[0]=-(mt[1].point[0]=mt[0].v[0]/2);var an=[mt[2].point[0]=mt[0].point[0]+mt[2].v[0]*u(Qt),2*(mt[0].point[1]=mt[1].point[1]=mt[2].v[0]*w(Qt))];return function(hn,xn){var _n,Pn=w(xn),sr=u(xn),mr=new Array(3);for(_n=0;_n<3;++_n){var zr=mt[_n];if(mr[_n]=Oe(xn-zr[1],zr[3],zr[2],sr,Pn,hn-zr[0]),!mr[_n][0])return zr.point;mr[_n][1]=ye(mr[_n][1]-zr.v[1])}var Br=an.slice();for(_n=0;_n<3;++_n){var Jr=_n==2?0:_n+1,jr=de(mt[_n].v[0],mr[_n][0],mr[Jr][0]);mr[_n][1]<0&&(jr=-jr),_n?_n==1?(jr=en-jr,Br[0]-=mr[_n][0]*u(jr),Br[1]-=mr[_n][0]*w(jr)):(jr=Yt-jr,Br[0]+=mr[_n][0]*u(jr),Br[1]+=mr[_n][0]*w(jr)):(Br[0]+=mr[_n][0]*u(jr),Br[1]-=mr[_n][0]*w(jr))}return Br[0]/=3,Br[1]/=3,Br}}function ke(je){return je[0]*=R,je[1]*=R,je}function Ee(je,$e,Qe){var ut=a.geoCentroid({type:"MultiPoint",coordinates:[je,$e,Qe]}),mt=[-ut[0],-ut[1]],pt=a.geoRotation(mt),Ct=Me(ke(pt(je)),ke(pt($e)),ke(pt(Qe)));Ct.invert=H(Ct);var Qt=a.geoProjection(Ct).rotate(mt),en=Qt.center;return delete Qt.rotate,Qt.center=function(Yt){return arguments.length?en(pt(Yt)):pt.invert(en())},Qt.clipAngle(90)}function ze(je,$e){var Qe=P(1-w($e));return[2/E*je*Qe,E*(1-Qe)]}function Fe(je){var $e=k(je);function Qe(ut,mt){return[ut,(ut?ut/w(ut):1)*(w(mt)*u(ut)-$e*u(mt))]}return Qe.invert=$e?function(ut,mt){ut&&(mt*=w(ut)/ut);var pt=u(ut);return[ut,2*s(P(pt*pt+$e*$e-mt*mt)-pt,$e-mt)]}:function(ut,mt){return[ut,z(ut?mt*k(ut)/ut:mt)]},Qe}ze.invert=function(je,$e){var Qe=(Qe=$e/E-1)*Qe;return[Qe>0?je*P(T/Qe)/2:0,z(1-Qe)]};var Ve=P(3);function Ke(je,$e){return[Ve*je*(2*u(2*$e/3)-1)/E,Ve*E*w($e/3)]}function Re(je){var $e=u(je);function Qe(ut,mt){return[ut*$e,w(mt)/$e]}return Qe.invert=function(ut,mt){return[ut/$e,z(mt*$e)]},Qe}function qe(je){var $e=u(je);function Qe(ut,mt){return[ut*$e,(1+$e)*k(mt/2)]}return Qe.invert=function(ut,mt){return[ut/$e,2*i(mt/(1+$e))]},Qe}function We(je,$e){var Qe=P(8/(3*T));return[Qe*je*(1-c($e)/T),Qe*$e]}function Ye(je,$e){var Qe=P(4-3*w(c($e)));return[2/P(6*T)*je*Qe,x($e)*P(2*T/3)*(2-Qe)]}function nt(je,$e){var Qe=P(T*(4+T));return[2/Qe*je*(1+P(1-4*$e*$e/(T*T))),4/Qe*$e]}function ft(je,$e){var Qe=(2+_)*w($e);$e/=2;for(var ut=0,mt=1/0;ut<10&&c(mt)>b;ut++){var pt=u($e);$e-=mt=($e+w($e)*(pt+2)-Qe)/(2*pt*(1+pt))}return[2/P(T*(4+T))*je*(1+u($e)),2*P(T/(4+T))*w($e)]}function vt(je,$e){return[je*(1+u($e))/P(2+T),2*$e/P(2+T)]}function Pt(je,$e){for(var Qe=(1+_)*w($e),ut=0,mt=1/0;ut<10&&c(mt)>b;ut++)$e-=mt=($e+w($e)-Qe)/(1+u($e));return Qe=P(2+T),[je*(1+u($e))/Qe,2*$e/Qe]}Ke.invert=function(je,$e){var Qe=3*z($e/(Ve*E));return[E*je/(Ve*(2*u(2*Qe/3)-1)),Qe]},We.invert=function(je,$e){var Qe=P(8/(3*T)),ut=$e/Qe;return[je/(Qe*(1-c(ut)/T)),ut]},Ye.invert=function(je,$e){var Qe=2-c($e)/P(2*T/3);return[je*P(6*T)/(2*Qe),x($e)*z((4-Qe*Qe)/3)]},nt.invert=function(je,$e){var Qe=P(T*(4+T))/2;return[je*Qe/(1+P(1-$e*$e*(4+T)/(4*T))),$e*Qe/2]},ft.invert=function(je,$e){var Qe=$e*P((4+T)/T)/2,ut=z(Qe),mt=u(ut);return[je/(2/P(T*(4+T))*(1+mt)),z((ut+Qe*(mt+2))/(2+_))]},vt.invert=function(je,$e){var Qe=P(2+T),ut=$e*Qe/2;return[Qe*je/(1+u(ut)),ut]},Pt.invert=function(je,$e){var Qe=1+_,ut=P(Qe/2);return[2*je*ut/(1+u($e*=ut)),z(($e+w($e))/Qe)]};var At=3+2*M;function at(je,$e){var Qe=w(je/=2),ut=u(je),mt=P(u($e)),pt=u($e/=2),Ct=w($e)/(pt+M*ut*mt),Qt=P(2/(1+Ct*Ct)),en=P((M*pt+(ut+Qe)*mt)/(M*pt+(ut-Qe)*mt));return[At*(Qt*(en-1/en)-2*m(en)),At*(Qt*Ct*(en+1/en)-2*i(Ct))]}at.invert=function(je,$e){if(!(Qe=te.invert(je/1.2,1.065*$e)))return null;var Qe,ut=Qe[0],mt=Qe[1],pt=20;je/=At,$e/=At;do{var Ct=ut/2,Qt=mt/2,en=w(Ct),Yt=u(Ct),an=w(Qt),hn=u(Qt),xn=u(mt),_n=P(xn),Pn=an/(hn+M*Yt*_n),sr=Pn*Pn,mr=P(2/(1+sr)),zr=(M*hn+(Yt+en)*_n)/(M*hn+(Yt-en)*_n),Br=P(zr),Jr=Br-1/Br,jr=Br+1/Br,Oi=mr*Jr-2*m(Br)-je,Ui=mr*Pn*jr-2*i(Pn)-$e,ua=an&&A*_n*en*sr/an,sa=(M*Yt*hn+_n)/(2*(hn+M*Yt*_n)*(hn+M*Yt*_n)*_n),ca=-.5*Pn*mr*mr*mr,lo=ca*ua,io=ca*sa,za=(za=2*hn+M*_n*(Yt-en))*za*Br,Ra=(M*Yt*hn*_n+xn)/za,ao=-M*en*an/(_n*za),Lo=Jr*lo-2*Ra/Br+mr*(Ra+Ra/zr),Ko=Jr*io-2*ao/Br+mr*(ao+ao/zr),Qo=Pn*jr*lo-2*ua/(1+sr)+mr*jr*ua+mr*Pn*(Ra-Ra/zr),es=Pn*jr*io-2*sa/(1+sr)+mr*jr*sa+mr*Pn*(ao-ao/zr),ts=Ko*Qo-es*Lo;if(!ts)break;var na=(Ui*Ko-Oi*es)/ts,ht=(Oi*Qo-Ui*Lo)/ts;ut-=na,mt=g(-_,p(_,mt-ht))}while((c(na)>b||c(ht)>b)&&--pt>0);return c(c(mt)-_)ut){var hn=P(an),xn=s(Yt,en),_n=Qe*y(xn/Qe),Pn=xn-_n,sr=je*u(Pn),mr=(je*w(Pn)-Pn*w(sr))/(_-sr),zr=dt(Pn,mr),Br=(T-je)/Pe(zr,sr,T);en=hn;var Jr,jr=50;do en-=Jr=(je+Pe(zr,sr,en)*Br-hn)/(zr(en)*Br);while(c(Jr)>b&&--jr>0);Yt=Pn*w(en),en<_&&(Yt-=mr*(en-_));var Oi=w(_n),Ui=u(_n);Qt[0]=en*Ui-Yt*Oi,Qt[1]=en*Oi+Yt*Ui}return Qt}return mt.invert=function(pt,Ct){var Qt=pt*pt+Ct*Ct;if(Qt>ut){var en=P(Qt),Yt=s(Ct,pt),an=Qe*y(Yt/Qe),hn=Yt-an;pt=en*u(hn),Ct=en*w(hn);for(var xn=pt-_,_n=w(pt),Pn=Ct/_n,sr=pt<_?1/0:0,mr=10;;){var zr=je*w(Pn),Br=je*u(Pn),Jr=w(Br),jr=_-Br,Oi=(zr-Pn*Jr)/jr,Ui=dt(Pn,Oi);if(c(sr)<1e-12||!--mr)break;Pn-=sr=(Pn*_n-Oi*xn-Ct)/(_n-2*xn*(jr*(Br+Pn*zr*u(Br)-Jr)-zr*(zr-Pn*Jr))/(jr*jr))}pt=(en=je+Pe(Ui,Br,pt)*(T-je)/Pe(Ui,Br,T))*u(Yt=an+Pn),Ct=en*w(Yt)}return a.geoAzimuthalEquidistantRaw.invert(pt,Ct)},mt}function dt(je,$e){return function(Qe){var ut=je*u(Qe);return Qe<_&&(ut-=$e),P(1+ut*ut)}}function Pe(je,$e,Qe){for(var ut=(Qe-$e)/50,mt=je($e)+je(Qe),pt=1,Ct=$e;pt<50;++pt)mt+=2*je(Ct+=ut);return .5*mt*ut}function Ie(je,$e,Qe,ut,mt,pt,Ct,Qt){function en(Yt,an){if(!an)return[je*Yt/T,0];var hn=an*an,xn=je+hn*($e+hn*(Qe+hn*ut)),_n=an*(mt-1+hn*(pt-Qt+hn*Ct)),Pn=(xn*xn+_n*_n)/(2*_n),sr=Yt*z(xn/Pn)/T;return[Pn*w(sr),an*(1+hn*Qt)+Pn*(1-u(sr))]}return arguments.length<8&&(Qt=0),en.invert=function(Yt,an){var hn,xn,_n=T*Yt/je,Pn=an,sr=50;do{var mr=Pn*Pn,zr=je+mr*($e+mr*(Qe+mr*ut)),Br=Pn*(mt-1+mr*(pt-Qt+mr*Ct)),Jr=zr*zr+Br*Br,jr=2*Br,Oi=Jr/jr,Ui=Oi*Oi,ua=z(zr/Oi)/T,sa=_n*ua,ca=zr*zr,lo=(2*$e+mr*(4*Qe+6*mr*ut))*Pn,io=mt+mr*(3*pt+5*mr*Ct),za=(2*(zr*lo+Br*(io-1))*jr-Jr*(2*(io-1)))/(jr*jr),Ra=u(sa),ao=w(sa),Lo=Oi*Ra,Ko=Oi*ao,Qo=_n/T*(1/P(1-ca/Ui))*(lo*Oi-zr*za)/Ui,es=Ko-Yt,ts=Pn*(1+mr*Qt)+Oi-Lo-an,na=za*ao+Lo*Qo,ht=Lo*ua,Ft=1+za-(za*Ra-Ko*Qo),ln=Ko*ua,$t=na*ln-Ft*ht;if(!$t)break;_n-=hn=(ts*na-es*Ft)/$t,Pn-=xn=(es*ln-ts*ht)/$t}while((c(hn)>b||c(xn)>b)&&--sr>0);return[_n,Pn]},en}Ot.invert=function(je,$e){var Qe=$e/(1+et);return[je&&je/(et*P(1-Qe*Qe)),2*i(Qe)]},Wt.invert=function(je,$e){var Qe=i($e/E),ut=u(Qe),mt=2*Qe;return[je*E/2/(u(mt)*ut*ut),mt]};var Ae=Ie(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555),De=Ie(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742),He=Ie(5/6*T,-.62636,-.0344,0,1.3493,-.05524,0,.045);function rt(je,$e){var Qe=je*je,ut=$e*$e;return[je*(1-.162388*ut)*(.87-952426e-9*Qe*Qe),$e*(1+ut/12)]}rt.invert=function(je,$e){var Qe,ut=je,mt=$e,pt=50;do{var Ct=mt*mt;mt-=Qe=(mt*(1+Ct/12)-$e)/(1+Ct/4)}while(c(Qe)>b&&--pt>0);pt=50,je/=1-.162388*Ct;do{var Qt=(Qt=ut*ut)*Qt;ut-=Qe=(ut*(.87-952426e-9*Qt)-je)/(.87-.00476213*Qt)}while(c(Qe)>b&&--pt>0);return[ut,mt]};var lt=Ie(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function ot(je){var $e=je(_,0)[0]-je(-_,0)[0];function Qe(ut,mt){var pt=ut>0?-.5:.5,Ct=je(ut+pt*T,mt);return Ct[0]-=pt*$e,Ct}return je.invert&&(Qe.invert=function(ut,mt){var pt=ut>0?-.5:.5,Ct=je.invert(ut+pt*$e,mt),Qt=Ct[0]-pt*T;return Qt<-T?Qt+=2*T:Qt>T&&(Qt-=2*T),Ct[0]=Qt,Ct}),Qe}function kt(je,$e){var Qe=x(je),ut=x($e),mt=u($e),pt=u(je)*mt,Ct=w(je)*mt,Qt=w(ut*$e);je=c(s(Ct,Qt)),$e=z(pt),c(je-_)>b&&(je%=_);var en=function(Yt,an){if(an===_)return[0,0];var hn,xn,_n=w(an),Pn=_n*_n,sr=Pn*Pn,mr=1+sr,zr=1+3*sr,Br=1-sr,Jr=z(1/P(mr)),jr=Br+Pn*mr*Jr,Oi=(1-_n)/jr,Ui=P(Oi),ua=Oi*mr,sa=P(ua),ca=Ui*Br;if(Yt===0)return[0,-(ca+Pn*sa)];var lo,io=u(an),za=1/io,Ra=2*_n*io,ao=(-jr*io-(-3*Pn+Jr*zr)*Ra*(1-_n))/(jr*jr),Lo=-za*Ra,Ko=-za*(Pn*mr*ao+Oi*zr*Ra),Qo=-2*za*(Br*(.5*ao/Ui)-2*Pn*Ui*Ra),es=4*Yt/T;if(Yt>.222*T||an.175*T){if(hn=(ca+Pn*P(ua*(1+sr)-ca*ca))/(1+sr),Yt>T/4)return[hn,hn];var ts=hn,na=.5*hn;hn=.5*(na+ts),xn=50;do{var ht=P(ua-hn*hn),Ft=hn*(Qo+Lo*ht)+Ko*z(hn/sa)-es;if(!Ft)break;Ft<0?na=hn:ts=hn,hn=.5*(na+ts)}while(c(ts-na)>b&&--xn>0)}else{hn=b,xn=25;do{var ln=hn*hn,$t=P(ua-ln),un=Qo+Lo*$t,On=hn*un+Ko*z(hn/sa)-es,Fn=un+(Ko-Lo*ln)/$t;hn-=lo=$t?On/Fn:0}while(c(lo)>b&&--xn>0)}return[hn,-ca-Pn*P(ua-hn*hn)]}(je>T/4?_-je:je,$e);return je>T/4&&(Qt=en[0],en[0]=-en[1],en[1]=-Qt),en[0]*=Qe,en[1]*=-ut,en}function wt(je,$e){var Qe,ut,mt,pt,Ct,Qt;if($e=1-b)return Qe=(1-$e)/4,mt=1/(ut=B(je)),[(pt=((Qt=d(2*(Qt=je)))-1)/(Qt+1))+Qe*((Ct=ut*N(je))-je)/(ut*ut),mt-Qe*pt*mt*(Ct-je),mt+Qe*pt*mt*(Ct+je),2*i(d(je))-_+Qe*(Ct-je)/ut];var en=[1,0,0,0,0,0,0,0,0],Yt=[P($e),0,0,0,0,0,0,0,0],an=0;for(ut=P(1-$e),Ct=1;c(Yt[an]/en[an])>b&&an<8;)Qe=en[an++],Yt[an]=(Qe-ut)/2,en[an]=(Qe+ut)/2,ut=P(Qe*ut),Ct*=2;mt=Ct*en[an]*je;do mt=(z(pt=Yt[an]*w(ut=mt)/en[an])+mt)/2;while(--an);return[w(mt),pt=u(mt),pt/u(mt-ut),mt]}function Vt(je,$e){if(!$e)return je;if($e===1)return m(k(je/2+S));for(var Qe=1,ut=P(1-$e),mt=P($e),pt=0;c(mt)>b;pt++){if(je%T){var Ct=i(ut*k(je)/Qe);Ct<0&&(Ct+=T),je+=Ct+~~(je/T)*T}else je+=je;mt=(Qe+ut)/2,ut=P(Qe*ut),mt=((Qe=mt)-ut)/2}return je/(v(2,pt)*Qe)}function Ut(je,$e){var Qe=(M-1)/(M+1),ut=P(1-Qe*Qe),mt=Vt(_,ut*ut),pt=m(k(T/4+c($e)/2)),Ct=d(-1*pt)/P(Qe),Qt=function(Yt,an){var hn=Yt*Yt,xn=an+1,_n=1-hn-an*an;return[.5*((Yt>=0?_:-_)-s(_n,2*Yt)),-.25*m(_n*_n+4*hn)+.5*m(xn*xn+hn)]}(Ct*u(-1*je),Ct*w(-1*je)),en=function(Yt,an,hn){var xn=c(Yt),_n=N(c(an));if(xn){var Pn=1/w(xn),sr=1/(k(xn)*k(xn)),mr=-(sr+hn*(_n*_n*Pn*Pn)-1+hn),zr=(-mr+P(mr*mr-4*((hn-1)*sr)))/2;return[Vt(i(1/P(zr)),hn)*x(Yt),Vt(i(P((zr/sr-1)/hn)),1-hn)*x(an)]}return[0,Vt(i(_n),1-hn)*x(an)]}(Qt[0],Qt[1],ut*ut);return[-en[1],($e>=0?1:-1)*(.5*mt-en[0])]}function tt(je){var $e=w(je),Qe=u(je),ut=bt(je);function mt(pt,Ct){var Qt=ut(pt,Ct);pt=Qt[0],Ct=Qt[1];var en=w(Ct),Yt=u(Ct),an=u(pt),hn=L($e*en+Qe*Yt*an),xn=w(hn),_n=c(xn)>b?hn/xn:1;return[_n*Qe*w(pt),(c(pt)>_?_n:-_n)*($e*Yt-Qe*en*an)]}return ut.invert=bt(-je),mt.invert=function(pt,Ct){var Qt=P(pt*pt+Ct*Ct),en=-w(Qt),Yt=u(Qt),an=Qt*Yt,hn=-Ct*en,xn=Qt*$e,_n=P(an*an+hn*hn-xn*xn),Pn=s(an*xn+hn*_n,hn*xn-an*_n),sr=(Qt>_?-1:1)*s(pt*en,Qt*u(Pn)*Yt+Ct*w(Pn)*en);return ut.invert(sr,Pn)},mt}function bt(je){var $e=w(je),Qe=u(je);return function(ut,mt){var pt=u(mt),Ct=u(ut)*pt,Qt=w(ut)*pt,en=w(mt);return[s(Qt,Ct*Qe-en*$e),z(en*Qe+Ct*$e)]}}kt.invert=function(je,$e){c(je)>1&&(je=2*x(je)-je),c($e)>1&&($e=2*x($e)-$e);var Qe=x(je),ut=x($e),mt=-Qe*je,pt=-ut*$e,Ct=pt/mt<1,Qt=function(hn,xn){for(var _n=0,Pn=1,sr=.5,mr=50;;){var zr=sr*sr,Br=P(sr),Jr=z(1/P(1+zr)),jr=1-zr+sr*(1+zr)*Jr,Oi=(1-Br)/jr,Ui=P(Oi),ua=Oi*(1+zr),sa=Ui*(1-zr),ca=P(ua-hn*hn),lo=xn+sa+sr*ca;if(c(Pn-_n)<1e-12||--mr==0||lo===0)break;lo>0?_n=sr:Pn=sr,sr=.5*(_n+Pn)}if(!mr)return null;var io=z(Br),za=u(io),Ra=1/za,ao=2*Br*za,Lo=(-jr*za-(-3*sr+Jr*(1+3*zr))*ao*(1-Br))/(jr*jr);return[T/4*(hn*(-2*Ra*(.5*Lo/Ui*(1-zr)-2*sr*Ui*ao)+-Ra*ao*ca)+-Ra*(sr*(1+zr)*Lo+Oi*(1+3*zr)*ao)*z(hn/P(ua))),io]}(Ct?pt:mt,Ct?mt:pt),en=Qt[0],Yt=Qt[1],an=u(Yt);return Ct&&(en=-_-en),[Qe*(s(w(en)*an,-w(Yt))+T),ut*z(u(en)*an)]},Ut.invert=function(je,$e){var Qe,ut,mt,pt,Ct,Qt,en=(M-1)/(M+1),Yt=P(1-en*en),an=Vt(_,Yt*Yt),hn=(ut=-je,mt=Yt*Yt,(Qe=.5*an-$e)?(pt=wt(Qe,mt),ut?(Qt=(Ct=wt(ut,1-mt))[1]*Ct[1]+mt*pt[0]*pt[0]*Ct[0]*Ct[0],[[pt[0]*Ct[2]/Qt,pt[1]*pt[2]*Ct[0]*Ct[1]/Qt],[pt[1]*Ct[1]/Qt,-pt[0]*pt[2]*Ct[0]*Ct[2]/Qt],[pt[2]*Ct[1]*Ct[2]/Qt,-mt*pt[0]*pt[1]*Ct[0]/Qt]]):[[pt[0],0],[pt[1],0],[pt[2],0]]):[[0,(Ct=wt(ut,1-mt))[0]/Ct[1]],[1/Ct[1],0],[Ct[2]/Ct[1],0]]),xn=function(_n,Pn){var sr=Pn[0]*Pn[0]+Pn[1]*Pn[1];return[(_n[0]*Pn[0]+_n[1]*Pn[1])/sr,(_n[1]*Pn[0]-_n[0]*Pn[1])/sr]}(hn[0],hn[1]);return[s(xn[1],xn[0])/-1,2*i(d(-.5*m(en*xn[0]*xn[0]+en*xn[1]*xn[1])))-_]};var zt=z(1-1/3)*O,St=Re(0);function Dt(je){var $e=zt*R,Qe=ze(T,$e)[0]-ze(-T,$e)[0],ut=St(0,$e)[1],mt=ze(0,$e)[1],pt=E-mt,Ct=D/je,Qt=4/D,en=ut+pt*pt*4/D;function Yt(an,hn){var xn,_n=c(hn);if(_n>$e){var Pn=p(je-1,g(0,h((an+T)/Ct)));(xn=ze(an+=T*(je-1)/je-Pn*Ct,_n))[0]=xn[0]*D/Qe-D*(je-1)/(2*je)+Pn*D/je,xn[1]=ut+4*(xn[1]-mt)*pt/D,hn<0&&(xn[1]=-xn[1])}else xn=St(an,hn);return xn[0]*=Qt,xn[1]/=en,xn}return Yt.invert=function(an,hn){an/=Qt;var xn=c(hn*=en);if(xn>ut){var _n=p(je-1,g(0,h((an+T)/Ct)));an=(an+T*(je-1)/je-_n*Ct)*Qe/D;var Pn=ze.invert(an,.25*(xn-ut)*D/pt+mt);return Pn[0]-=T*(je-1)/je-_n*Ct,hn<0&&(Pn[1]=-Pn[1]),Pn}return St.invert(an,hn)},Yt}function Le(je,$e){return[je,1&$e?90-b:zt]}function Je(je,$e){return[je,1&$e?-90+b:-zt]}function st(je){return[je[0]*(1-b),je[1]]}function Et(je){var $e,Qe=1+je,ut=z(w(1/Qe)),mt=2*P(T/($e=T+4*ut*Qe)),pt=.5*mt*(Qe+P(je*(2+je))),Ct=je*je,Qt=Qe*Qe;function en(Yt,an){var hn,xn,_n=1-w(an);if(_n&&_n<2){var Pn,sr=_-an,mr=25;do{var zr=w(sr),Br=u(sr),Jr=ut+s(zr,Qe-Br),jr=1+Qt-2*Qe*Br;sr-=Pn=(sr-Ct*ut-Qe*zr+jr*Jr-.5*_n*$e)/(2*Qe*zr*Jr)}while(c(Pn)>1e-12&&--mr>0);hn=mt*P(jr),xn=Yt*Jr/T}else hn=mt*(je+_n),xn=Yt*ut/T;return[hn*w(xn),pt-hn*u(xn)]}return en.invert=function(Yt,an){var hn=Yt*Yt+(an-=pt)*an,xn=(1+Qt-hn/(mt*mt))/(2*Qe),_n=L(xn),Pn=w(_n),sr=ut+s(Pn,Qe-xn);return[z(Yt/P(hn))*T/sr,z(1-2*(_n-Ct*ut-Qe*Pn+(1+Qt-2*Qe*xn)*sr)/$e)]},en}function It(je,$e){return $e>-.7109889596207567?((je=ae(je,$e))[1]+=.0528035274542,je):me(je,$e)}function Zt(je,$e){return c($e)>.7109889596207567?((je=ae(je,$e))[1]-=$e>0?.0528035274542:-.0528035274542,je):me(je,$e)}function Kt(je,$e,Qe,ut){var mt=P(4*T/(2*Qe+(1+je-$e/2)*w(2*Qe)+(je+$e)/2*w(4*Qe)+$e/2*w(6*Qe))),pt=P(ut*w(Qe)*P((1+je*u(2*Qe)+$e*u(4*Qe))/(1+je+$e))),Ct=Qe*en(1);function Qt(hn){return P(1+je*u(2*hn)+$e*u(4*hn))}function en(hn){var xn=hn*Qe;return(2*xn+(1+je-$e/2)*w(2*xn)+(je+$e)/2*w(4*xn)+$e/2*w(6*xn))/Qe}function Yt(hn){return Qt(hn)*w(hn)}var an=function(hn,xn){var _n=Qe*ne(en,Ct*w(xn)/Qe,xn/T);isNaN(_n)&&(_n=Qe*x(xn));var Pn=mt*Qt(_n);return[Pn*pt*hn/T*u(_n),Pn/pt*w(_n)]};return an.invert=function(hn,xn){var _n=ne(Yt,xn*pt/mt);return[hn*T/(u(_n)*mt*pt*Qt(_n)),z(Qe*en(_n/Qe)/Ct)]},Qe===0&&(mt=P(ut/T),(an=function(hn,xn){return[hn*mt,w(xn)/mt]}).invert=function(hn,xn){return[hn/mt,z(xn*mt)]}),an}function Ht(je,$e,Qe,ut,mt){ut===void 0&&(ut=1e-8),mt===void 0&&(mt=20);var pt=je($e),Ct=je(.5*($e+Qe)),Qt=je(Qe);return function en(Yt,an,hn,xn,_n,Pn,sr,mr,zr,Br,Jr){if(Jr.nanEncountered)return NaN;var jr,Oi,Ui,ua,sa,ca,lo,io,za,Ra;if(Oi=Yt(an+.25*(jr=hn-an)),Ui=Yt(hn-.25*jr),isNaN(Oi))Jr.nanEncountered=!0;else{if(!isNaN(Ui))return Ra=((ca=(ua=jr*(xn+4*Oi+_n)/12)+(sa=jr*(_n+4*Ui+Pn)/12))-sr)/15,Br>zr?(Jr.maxDepthCount++,ca+Ra):Math.abs(Ra)_n?sr=mr:Pn=mr,mr=Pn+sr>>1;while(mr>Pn);var zr=en[mr+1]-en[mr];return zr&&(zr=(_n-en[mr+1])/zr),(mr+1+zr)/Ct}var hn=2*an(1)/T*pt/Qe,xn=function(_n,Pn){var sr=an(c(w(Pn))),mr=ut(sr)*_n;return sr/=hn,[mr,Pn>=0?sr:-sr]};return xn.invert=function(_n,Pn){var sr;return c(Pn*=hn)<1&&(sr=x(Pn)*z(mt(c(Pn))*pt)),[_n/ut(c(Pn)),sr]},xn}function zn(je,$e){return c(je[0]-$e[0])=0;--Qt)Qe=($e=je[1][Qt])[0][0],ut=$e[0][1],mt=$e[1][1],pt=$e[2][0],Ct=$e[2][1],en.push(pn([[pt-b,Ct-b],[pt-b,mt+b],[Qe+b,mt+b],[Qe+b,ut-b]],30));return{type:"Polygon",coordinates:[l.merge(en)]}}function nn(je,$e,Qe){var ut,mt;function pt(en,Yt){for(var an=Yt<0?-1:1,hn=$e[+(Yt<0)],xn=0,_n=hn.length-1;xn<_n&&en>hn[xn][2][0];++xn);var Pn=je(en-hn[xn][1][0],Yt);return Pn[0]+=je(hn[xn][1][0],an*Yt>an*hn[xn][0][1]?hn[xn][0][1]:Yt)[0],Pn}Qe?pt.invert=Qe(pt):je.invert&&(pt.invert=function(en,Yt){for(var an=mt[+(Yt<0)],hn=$e[+(Yt<0)],xn=0,_n=an.length;xn<_n;++xn){var Pn=an[xn];if(Pn[0][0]<=en&&ensr&&(hn=Pn,Pn=sr,sr=hn),[[xn,Pn],[_n,sr]]})}),Ct):$e.map(function(Yt){return Yt.map(function(an){return[[an[0][0]*O,an[0][1]*O],[an[1][0]*O,an[1][1]*O],[an[2][0]*O,an[2][1]*O]]})})},$e!=null&&Ct.lobes($e),Ct}It.invert=function(je,$e){return $e>-.7109889596207567?ae.invert(je,$e-.0528035274542):me.invert(je,$e)},Zt.invert=function(je,$e){return c($e)>.7109889596207567?ae.invert(je,$e+($e>0?.0528035274542:-.0528035274542)):me.invert(je,$e)};var sn=[[[[-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]]]],gn=[[[[-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]]]],bn=[[[[-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]]]],In=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]],Hn=[[[[-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]]]],Wn=[[[[-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 ar(je,$e){return[3/D*je*P(T*T/3-$e*$e),$e]}function Or(je){function $e(Qe,ut){if(c(c(ut)-_)2)return null;var pt=(Qe/=2)*Qe,Ct=(ut/=2)*ut,Qt=2*ut/(1+pt+Ct);return Qt=v((1+Qt)/(1-Qt),1/je),[s(2*Qe,1-pt-Ct)/je,z((Qt-1)/(Qt+1))]},$e}ar.invert=function(je,$e){return[D/3*je/P(T*T/3-$e*$e),$e]};var vr=T/M;function Er(je,$e){return[je*(1+P(u($e)))/2,$e/(u($e/2)*u(je/6))]}function Kn(je,$e){var Qe=je*je,ut=$e*$e;return[je*(.975534+ut*(-.0143059*Qe-.119161+-.0547009*ut)),$e*(1.00384+Qe*(.0802894+-.02855*ut+199025e-9*Qe)+ut*(.0998909+-.0491032*ut))]}function Ln(je,$e){return[w(je)/u($e),k($e)*u(je)]}function lr(je){var $e=u(je),Qe=k(S+je/2);function ut(mt,pt){var Ct=pt-je,Qt=c(Ct)=0;)xn=(hn=je[an])[0]+en*(pt=xn)-Yt*_n,_n=hn[1]+en*_n+Yt*pt;return[xn=en*(pt=xn)-Yt*_n,_n=en*_n+Yt*pt]}return Qe.invert=function(ut,mt){var pt=20,Ct=ut,Qt=mt;do{for(var en,Yt=$e,an=je[Yt],hn=an[0],xn=an[1],_n=0,Pn=0;--Yt>=0;)_n=hn+Ct*(en=_n)-Qt*Pn,Pn=xn+Ct*Pn+Qt*en,hn=(an=je[Yt])[0]+Ct*(en=hn)-Qt*xn,xn=an[1]+Ct*xn+Qt*en;var sr,mr,zr=(_n=hn+Ct*(en=_n)-Qt*Pn)*_n+(Pn=xn+Ct*Pn+Qt*en)*Pn;Ct-=sr=((hn=Ct*(en=hn)-Qt*xn-ut)*_n+(xn=Ct*xn+Qt*en-mt)*Pn)/zr,Qt-=mr=(xn*_n-hn*Pn)/zr}while(c(sr)+c(mr)>1e-12&&--pt>0);if(pt){var Br=P(Ct*Ct+Qt*Qt),Jr=2*i(.5*Br),jr=w(Jr);return[s(Ct*jr,Br*u(Jr)),Br?z(Qt*jr/Br):0]}},Qe}Er.invert=function(je,$e){var Qe=c(je),ut=c($e),mt=b,pt=_;utb||c(mr)>b)&&--mt>0);return mt&&[Qe,ut]},Ln.invert=function(je,$e){var Qe=je*je,ut=$e*$e+1,mt=Qe+ut,pt=je?A*P((mt-P(mt*mt-4*Qe))/Qe):1/P(ut);return[z(je*pt),x($e)*L(pt)]},Wr.invert=function(je,$e){return[je,2.5*i(d(.8*$e))-.625*T]};var rr=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],nr=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Bn=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Fr=[[.9245,0],[0,0],[.01943,0]],$r=[[.721316,0],[0,0],[-.00881625,-.00617325]];function pr(je,$e){var Qe=a.geoProjection(Mn(je)).rotate($e).clipAngle(90),ut=a.geoRotation($e),mt=Qe.center;return delete Qe.rotate,Qe.center=function(pt){return arguments.length?mt(ut(pt)):ut.invert(mt())},Qe}var qr=P(6),_i=P(7);function cn(je,$e){var Qe=z(7*w($e)/(3*qr));return[qr*je*(2*u(2*Qe/3)-1)/_i,9*w(Qe/3)/_i]}function jn(je,$e){for(var Qe,ut=(1+A)*w($e),mt=$e,pt=0;pt<25&&(mt-=Qe=(w(mt/2)+w(mt)-ut)/(.5*u(mt/2)+u(mt)),!(c(Qe)1e-12&&--Qt>0);return[je/(.84719-.13063*(ut=Ct*Ct)+(pt=ut*(mt=ut*ut))*pt*(.05494*ut-.04515-.02326*mt+.00331*pt)),Ct]},yn.invert=function(je,$e){for(var Qe=$e/2,ut=0,mt=1/0;ut<10&&c(mt)>b;++ut){var pt=u($e/2);$e-=mt=($e-k($e/2)-Qe)/(1-.5/(pt*pt))}return[2*je/(1+u($e)),$e]};var $n=[[[[-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 Un(je,$e){var Qe=w($e),ut=u($e),mt=x(je);if(je===0||c($e)===_)return[0,$e];if($e===0)return[je,0];if(c(je)===_)return[je*ut,_*Qe];var pt=T/(2*je)-2*je/T,Ct=2*$e/T,Qt=(1-Ct*Ct)/(Qe-Ct),en=pt*pt,Yt=Qt*Qt,an=1+en/Yt,hn=1+Yt/en,xn=(pt*Qe/Qt-pt/2)/an,_n=(Yt*Qe/en+Qt/2)/hn,Pn=_n*_n-(Yt*Qe*Qe/en+Qt*Qe-1)/hn;return[_*(xn+P(xn*xn+ut*ut/an)*mt),_*(_n+P(Pn<0?0:Pn)*x(-$e*pt)*mt)]}Un.invert=function(je,$e){var Qe=(je/=_)*je,ut=Qe+($e/=_)*$e,mt=T*T;return[je?(ut-1+P((1-ut)*(1-ut)+4*Qe))/(2*je)*_:0,ne(function(pt){return ut*(T*w(pt)-2*pt)*T+4*pt*pt*($e-w(pt))+2*T*pt-mt*$e},0)]};function Nn(je,$e){var Qe=$e*$e;return[je,$e*(1.0148+Qe*Qe*(.23185+Qe*(.02406*Qe-.14499)))]}function Rn(je,$e){if(c($e)=0;)if(zr=sr[Oi],mr[0]===zr[0]&&mr[1]===zr[1]){if(Jr)return[Jr,mr];Jr=mr}}}(Qt.face,en.face),an=wn(Yt.map(en.project),Yt.map(Qt.project));Qt.transform=en.transform?kn(en.transform,an):an;for(var hn=en.edges,xn=0,_n=hn.length;xn<_n;++xn)Yn(Yt[0],hn[xn][1])&&Yn(Yt[1],hn[xn][0])&&(hn[xn]=Qt),Yn(Yt[0],hn[xn][0])&&Yn(Yt[1],hn[xn][1])&&(hn[xn]=Qt);for(hn=Qt.edges,xn=0,_n=hn.length;xn<_n;++xn)Yn(Yt[0],hn[xn][0])&&Yn(Yt[1],hn[xn][1])&&(hn[xn]=en),Yn(Yt[0],hn[xn][1])&&Yn(Yt[1],hn[xn][0])&&(hn[xn]=en)}else Qt.transform=en.transform;return Qt.children&&Qt.children.forEach(function(Pn){Ct(Pn,Qt)}),Qt})(je,{transform:null}),ir(je)&&(ut.invert=function(Ct,Qt){var en=function Yt(an,hn){var xn=an.project.invert,_n=an.transform,Pn=hn;if(_n&&(_n=function(Jr){var jr=1/(Jr[0]*Jr[4]-Jr[1]*Jr[3]);return[jr*Jr[4],-jr*Jr[1],jr*(Jr[1]*Jr[5]-Jr[2]*Jr[4]),-jr*Jr[3],jr*Jr[0],jr*(Jr[2]*Jr[3]-Jr[0]*Jr[5])]}(_n),Pn=[_n[0]*Pn[0]+_n[1]*Pn[1]+_n[2],_n[3]*Pn[0]+_n[4]*Pn[1]+_n[5]]),xn&&an===function(Jr){return $e(Jr[0]*R,Jr[1]*R)}(sr=xn(Pn)))return sr;for(var sr,mr=an.children,zr=0,Br=mr&&mr.length;zr1.790857183?$e=1.790857183:$e<-1.790857183&&($e=-1.790857183);var Qe,ut=$e;do{var mt=ut*ut;ut-=Qe=(ut*(1.0148+mt*mt*(.23185+mt*(.02406*mt-.14499)))-$e)/(1.0148+mt*mt*(5*.23185+mt*(.21654*mt-1.01493)))}while(c(Qe)>b);return[je,ut]},Rn.invert=function(je,$e){if(c($e)b&&--pt>0);return Ct=k(mt),[(c($e)en^Br>en&&Qt<(zr-Pn)*(en-sr)/(Br-sr)+Pn&&(Yt=!Yt)}return Yt}(mt[0],ut))return mt.push(Qe),!0})||je.push([Qe])}),ta=[],je.length?je.length>1?{type:"MultiPolygon",coordinates:je}:{type:"Polygon",coordinates:je[0]}:null}};function ya(je){var $e=je(_,0)[0]-je(-_,0)[0];function Qe(ut,mt){var pt=c(ut)<_,Ct=je(pt?ut:ut>0?ut-T:ut+T,mt),Qt=(Ct[0]-Ct[1])*A,en=(Ct[0]+Ct[1])*A;if(pt)return[Qt,en];var Yt=$e*A,an=Qt>0^en>0?-1:1;return[an*Qt-x(en)*Yt,an*en-x(Qt)*Yt]}return je.invert&&(Qe.invert=function(ut,mt){var pt=(ut+mt)*A,Ct=(mt-ut)*A,Qt=c(pt)<.5*$e&&c(Ct)<.5*$e;if(!Qt){var en=$e*A,Yt=pt>0^Ct>0?-1:1,an=-Yt*ut+(Ct>0?1:-1)*en,hn=-Yt*mt+(pt>0?1:-1)*en;pt=(-an-hn)*A,Ct=(an-hn)*A}var xn=je.invert(pt,Ct);return Qt||(xn[0]+=pt>0?T:-T),xn}),a.geoProjection(Qe).rotate([-90,-90,45]).clipAngle(179.999)}function xa(){return ya(Ut).scale(111.48)}function Zo(je){var $e=w(je);function Qe(ut,mt){var pt=$e?k(ut*$e/2)/$e:ut/2;if(!mt)return[2*pt,-je];var Ct=2*i(pt*w(mt)),Qt=1/k(mt);return[w(Ct)*Qt,mt+(1-u(Ct))*Qt-je]}return Qe.invert=function(ut,mt){if(c(mt+=je)b&&--en>0);var xn=ut*(Yt=k(Qt)),_n=k(c(mt)0?_:-_)*(Yt+pt*(hn-Qt)/2+pt*pt*(hn-2*Yt+Qt)/2)]}function bs(je,$e){var Qe=function(Ct){function Qt(en,Yt){var an=u(Yt),hn=(Ct-1)/(Ct-an*u(en));return[hn*an*w(en),hn*w(Yt)]}return Qt.invert=function(en,Yt){var an=en*en+Yt*Yt,hn=P(an),xn=(Ct-P(1-an*(Ct+1)/(Ct-1)))/((Ct-1)/hn+hn/(Ct-1));return[s(en*xn,hn*P(1-xn*xn)),hn?z(Yt*xn/hn):0]},Qt}(je);if(!$e)return Qe;var ut=u($e),mt=w($e);function pt(Ct,Qt){var en=Qe(Ct,Qt),Yt=en[1],an=Yt*mt/(je-1)+ut;return[en[0]*ut/an,Yt/an]}return pt.invert=function(Ct,Qt){var en=(je-1)/(je-1-Qt*mt);return Qe.invert(en*Ct,en*Qt*ut)},pt}oa.forEach(function(je){je[1]*=1.0144}),hs.invert=function(je,$e){var Qe=$e/_,ut=90*Qe,mt=p(18,c(ut/5)),pt=g(0,h(mt));do{var Ct=oa[pt][1],Qt=oa[pt+1][1],en=oa[p(19,pt+2)][1],Yt=en-Ct,an=en-2*Qt+Ct,hn=2*(c(Qe)-Qt)/Yt,xn=an/Yt,_n=hn*(1-xn*hn*(1-2*xn*hn));if(_n>=0||pt===1){ut=($e>=0?5:-5)*(_n+mt);var Pn,sr=50;do _n=(mt=p(18,c(ut)/5))-(pt=h(mt)),Ct=oa[pt][1],Qt=oa[pt+1][1],en=oa[p(19,pt+2)][1],ut-=(Pn=($e>=0?_:-_)*(Qt+_n*(en-Ct)/2+_n*_n*(en-2*Qt+Ct)/2)-$e)*O;while(c(Pn)>1e-12&&--sr>0);break}}while(--pt>=0);var mr=oa[pt][0],zr=oa[pt+1][0],Br=oa[p(19,pt+2)][0];return[je/(zr+_n*(Br-mr)/2+_n*_n*(Br-2*zr+mr)/2),ut*R]};var so=-179.9999,Jo=179.9999,_s=-89.9999;function Ls(je){return je.length>0}function Oo(je){return je===-90||je===90?[0,je]:[-180,($e=je,Math.floor(1e4*$e)/1e4)];var $e}function Ka(je){var $e=je[0],Qe=je[1],ut=!1;return $e<=so?($e=-180,ut=!0):$e>=Jo&&($e=180,ut=!0),Qe<=_s?(Qe=-90,ut=!0):Qe>=89.9999&&(Qe=90,ut=!0),ut?[$e,Qe]:je}function $o(je){return je.map(Ka)}function ic(je,$e,Qe){for(var ut=0,mt=je.length;ut=Jo||an<=_s||an>=89.9999){pt[Ct]=Ka(en);for(var hn=Ct+1;hnso&&_n_s&&Pn<89.9999)break}if(hn===Ct+1)continue;if(Ct){var sr={index:-1,polygon:$e,ring:pt.slice(0,Ct+1)};sr.ring[sr.ring.length-1]=Oo(an),Qe[Qe.length-1]=sr}else Qe.pop();if(hn>=Qt)break;Qe.push({index:-1,polygon:$e,ring:pt=pt.slice(hn-1)}),pt[0]=Oo(pt[0][1]),Ct=-1,Qt=pt.length}}}}function Mc(je){var $e,Qe,ut,mt,pt,Ct,Qt=je.length,en={},Yt={};for($e=0;$e0?T-Qt:Qt)*O],Yt=a.geoProjection(je(Ct)).rotate(en),an=a.geoRotation(en),hn=Yt.center;return delete Yt.rotate,Yt.center=function(xn){return arguments.length?hn(an(xn)):an.invert(hn())},Yt.clipAngle(90)}function Ec(je){var $e=u(je);function Qe(ut,mt){var pt=a.geoGnomonicRaw(ut,mt);return pt[0]*=$e,pt}return Qe.invert=function(ut,mt){return a.geoGnomonicRaw.invert(ut/$e,mt)},Qe}function ac(je,$e){return Sc(Ec,je,$e)}function Cc(je){if(!(je*=2))return a.geoAzimuthalEquidistantRaw;var $e=-je/2,Qe=-$e,ut=je*je,mt=k(Qe),pt=.5/w(Qe);function Ct(Qt,en){var Yt=L(u(en)*u(Qt-$e)),an=L(u(en)*u(Qt-Qe));return[((Yt*=Yt)-(an*=an))/(2*je),(en<0?-1:1)*P(4*ut*an-(ut-Yt+an)*(ut-Yt+an))/(2*je)]}return Ct.invert=function(Qt,en){var Yt,an,hn=en*en,xn=u(P(hn+(Yt=Qt+$e)*Yt)),_n=u(P(hn+(Yt=Qt+Qe)*Yt));return[s(an=xn-_n,Yt=(xn+_n)*mt),(en<0?-1:1)*L(P(Yt*Yt+an*an)*pt)]},Ct}function Ns(je,$e){return Sc(Cc,je,$e)}function Bs(je,$e){if(c($e)b&&--Qt>0);return[x(je)*(P(mt*mt+4)+mt)*T/4,_*Ct]};var Uu=4*T+3*P(3),ds=2*P(2*T*P(3)/Uu),pl=ie(ds*P(3)/T,ds,Uu/6);function Vu(je,$e){return[je*P(1-3*$e*$e/(T*T)),$e]}function js(je,$e){var Qe=u($e),ut=u(je)*Qe,mt=1-ut,pt=u(je=s(w(je)*Qe,-w($e))),Ct=w(je);return[Ct*(Qe=P(1-ut*ut))-pt*mt,-pt*Qe-Ct*mt]}function ma(je,$e){var Qe=W(je,$e);return[(Qe[0]+je/_)/2,(Qe[1]+$e)/2]}Vu.invert=function(je,$e){return[je/P(1-3*$e*$e/(T*T)),$e]},js.invert=function(je,$e){var Qe=(je*je+$e*$e)/-2,ut=P(-Qe*(2+Qe)),mt=$e*Qe+je*ut,pt=je*Qe-$e*ut,Ct=P(pt*pt+mt*mt);return[s(ut*mt,Ct*(1+Qe)),Ct?-z(ut*pt/Ct):0]},ma.invert=function(je,$e){var Qe=je,ut=$e,mt=25;do{var pt,Ct=u(ut),Qt=w(ut),en=w(2*ut),Yt=Qt*Qt,an=Ct*Ct,hn=w(Qe),xn=u(Qe/2),_n=w(Qe/2),Pn=_n*_n,sr=1-an*xn*xn,mr=sr?L(Ct*xn)*P(pt=1/sr):pt=0,zr=.5*(2*mr*Ct*_n+Qe/_)-je,Br=.5*(mr*Qt+ut)-$e,Jr=.5*pt*(an*Pn+mr*Ct*xn*Yt)+.5/_,jr=pt*(hn*en/4-mr*Qt*_n),Oi=.125*pt*(en*_n-mr*Qt*an*hn),Ui=.5*pt*(Yt*xn+mr*Pn*Ct)+.5,ua=jr*Oi-Ui*Jr,sa=(Br*jr-zr*Ui)/ua,ca=(zr*Oi-Br*Jr)/ua;Qe-=sa,ut-=ca}while((c(sa)>b||c(ca)>b)&&--mt>0);return[Qe,ut]},r.geoNaturalEarth=a.geoNaturalEarth1,r.geoNaturalEarthRaw=a.geoNaturalEarth1Raw,r.geoAiry=function(){var je=_,$e=a.geoProjectionMutator(G),Qe=$e(je);return Qe.radius=function(ut){return arguments.length?$e(je=ut*R):je*O},Qe.scale(179.976).clipAngle(147)},r.geoAiryRaw=G,r.geoAitoff=function(){return a.geoProjection(W).scale(152.63)},r.geoAitoffRaw=W,r.geoArmadillo=function(){var je=20*R,$e=je>=0?1:-1,Qe=k($e*je),ut=a.geoProjectionMutator(K),mt=ut(je),pt=mt.stream;return mt.parallel=function(Ct){return arguments.length?(Qe=k(($e=(je=Ct*R)>=0?1:-1)*je),ut(je)):je*O},mt.stream=function(Ct){var Qt=mt.rotate(),en=pt(Ct),Yt=(mt.rotate([0,0]),pt(Ct)),an=mt.precision();return mt.rotate(Qt),en.sphere=function(){Yt.polygonStart(),Yt.lineStart();for(var hn=-180*$e;$e*hn<180;hn+=90*$e)Yt.point(hn,90*$e);if(je)for(;$e*(hn-=3*$e*an)>=-180;)Yt.point(hn,$e*-s(u(hn*R/2),Qe)*O);Yt.lineEnd(),Yt.polygonEnd()},en},mt.scale(218.695).center([0,28.0974])},r.geoArmadilloRaw=K,r.geoAugust=function(){return a.geoProjection(te).scale(66.1603)},r.geoAugustRaw=te,r.geoBaker=function(){return a.geoProjection(re).scale(112.314)},r.geoBakerRaw=re,r.geoBerghaus=function(){var je=5,$e=a.geoProjectionMutator(U),Qe=$e(je),ut=Qe.stream,mt=-u(.01*R),pt=w(.01*R);return Qe.lobes=function(Ct){return arguments.length?$e(je=+Ct):je},Qe.stream=function(Ct){var Qt=Qe.rotate(),en=ut(Ct),Yt=(Qe.rotate([0,0]),ut(Ct));return Qe.rotate(Qt),en.sphere=function(){Yt.polygonStart(),Yt.lineStart();for(var an=0,hn=360/je,xn=2*T/je,_n=90-180/je,Pn=_;an=0;)Ct.point((Qt=en[an])[0],Qt[1]);Ct.lineEnd(),Ct.polygonEnd()},Ct},Qe.scale(79.4187).parallel(45).clipAngle(179.999)},r.geoHammerRetroazimuthalRaw=tt,r.geoHealpix=function(){var je=4,$e=a.geoProjectionMutator(Dt),Qe=$e(je),ut=Qe.stream;return Qe.lobes=function(mt){return arguments.length?$e(je=+mt):je},Qe.stream=function(mt){var pt=Qe.rotate(),Ct=ut(mt),Qt=(Qe.rotate([0,0]),ut(mt));return Qe.rotate(pt),Ct.sphere=function(){var en,Yt;a.geoStream((en=180/je,Yt=[].concat(l.range(-180,180+en/2,en).map(Le),l.range(180,-180-en/2,-en).map(Je)),{type:"Polygon",coordinates:[en===180?Yt.map(st):Yt]}),Qt)},Ct},Qe.scale(239.75)},r.geoHealpixRaw=Dt,r.geoHill=function(){var je=1,$e=a.geoProjectionMutator(Et),Qe=$e(je);return Qe.ratio=function(ut){return arguments.length?$e(je=+ut):je},Qe.scale(167.774).center([0,18.67])},r.geoHillRaw=Et,r.geoHomolosine=function(){return a.geoProjection(Zt).scale(152.63)},r.geoHomolosineRaw=Zt,r.geoHufnagel=function(){var je=1,$e=0,Qe=45*R,ut=2,mt=a.geoProjectionMutator(Kt),pt=mt(je,$e,Qe,ut);return pt.a=function(Ct){return arguments.length?mt(je=+Ct,$e,Qe,ut):je},pt.b=function(Ct){return arguments.length?mt(je,$e=+Ct,Qe,ut):$e},pt.psiMax=function(Ct){return arguments.length?mt(je,$e,Qe=+Ct*R,ut):Qe*O},pt.ratio=function(Ct){return arguments.length?mt(je,$e,Qe,ut=+Ct):ut},pt.scale(180.739)},r.geoHufnagelRaw=Kt,r.geoHyperelliptical=function(){var je=0,$e=2.5,Qe=1.183136,ut=a.geoProjectionMutator(mn),mt=ut(je,$e,Qe);return mt.alpha=function(pt){return arguments.length?ut(je=+pt,$e,Qe):je},mt.k=function(pt){return arguments.length?ut(je,$e=+pt,Qe):$e},mt.gamma=function(pt){return arguments.length?ut(je,$e,Qe=+pt):Qe},mt.scale(152.63)},r.geoHyperellipticalRaw=mn,r.geoInterrupt=nn,r.geoInterruptedBoggs=function(){return nn(ge,sn).scale(160.857)},r.geoInterruptedHomolosine=function(){return nn(Zt,gn).scale(152.63)},r.geoInterruptedMollweide=function(){return nn(ae,bn).scale(169.529)},r.geoInterruptedMollweideHemispheres=function(){return nn(ae,In).scale(169.529).rotate([20,0])},r.geoInterruptedSinuMollweide=function(){return nn(It,Hn,H).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},r.geoInterruptedSinusoidal=function(){return nn(me,Wn).scale(152.63).rotate([-20,0])},r.geoKavrayskiy7=function(){return a.geoProjection(ar).scale(158.837)},r.geoKavrayskiy7Raw=ar,r.geoLagrange=function(){var je=.5,$e=a.geoProjectionMutator(Or),Qe=$e(je);return Qe.spacing=function(ut){return arguments.length?$e(je=+ut):je},Qe.scale(124.75)},r.geoLagrangeRaw=Or,r.geoLarrivee=function(){return a.geoProjection(Er).scale(97.2672)},r.geoLarriveeRaw=Er,r.geoLaskowski=function(){return a.geoProjection(Kn).scale(139.98)},r.geoLaskowskiRaw=Kn,r.geoLittrow=function(){return a.geoProjection(Ln).scale(144.049).clipAngle(89.999)},r.geoLittrowRaw=Ln,r.geoLoximuthal=function(){return fe(lr).parallel(40).scale(158.837)},r.geoLoximuthalRaw=lr,r.geoMiller=function(){return a.geoProjection(Wr).scale(108.318)},r.geoMillerRaw=Wr,r.geoModifiedStereographic=pr,r.geoModifiedStereographicRaw=Mn,r.geoModifiedStereographicAlaska=function(){return pr(rr,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},r.geoModifiedStereographicGs48=function(){return pr(nr,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},r.geoModifiedStereographicGs50=function(){return pr(Bn,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},r.geoModifiedStereographicMiller=function(){return pr(Fr,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},r.geoModifiedStereographicLee=function(){return pr($r,[165,10]).scale(250).clipAngle(130).center([-165,-10])},r.geoMollweide=function(){return a.geoProjection(ae).scale(169.529)},r.geoMollweideRaw=ae,r.geoMtFlatPolarParabolic=function(){return a.geoProjection(cn).scale(164.859)},r.geoMtFlatPolarParabolicRaw=cn,r.geoMtFlatPolarQuartic=function(){return a.geoProjection(jn).scale(188.209)},r.geoMtFlatPolarQuarticRaw=jn,r.geoMtFlatPolarSinusoidal=function(){return a.geoProjection(jt).scale(166.518)},r.geoMtFlatPolarSinusoidalRaw=jt,r.geoNaturalEarth2=function(){return a.geoProjection(fn).scale(175.295)},r.geoNaturalEarth2Raw=fn,r.geoNellHammer=function(){return a.geoProjection(yn).scale(152.63)},r.geoNellHammerRaw=yn,r.geoInterruptedQuarticAuthalic=function(){return nn(q(1/0),$n).rotate([20,0]).scale(152.63)},r.geoNicolosi=function(){return a.geoProjection(Un).scale(127.267)},r.geoNicolosiRaw=Un,r.geoPatterson=function(){return a.geoProjection(Nn).scale(139.319)},r.geoPattersonRaw=Nn,r.geoPolyconic=function(){return a.geoProjection(Rn).scale(103.74)},r.geoPolyconicRaw=Rn,r.geoPolyhedral=Zn,r.geoPolyhedralButterfly=function(je){je=je||function(Qe){var ut=a.geoCentroid({type:"MultiPoint",coordinates:Qe});return a.geoGnomonic().scale(1).translate([0,0]).rotate([-ut[0],-ut[1]])};var $e=xr.map(function(Qe){return{face:Qe,project:je(Qe)}});return[-1,0,0,1,0,1,4,5].forEach(function(Qe,ut){var mt=$e[Qe];mt&&(mt.children||(mt.children=[])).push($e[ut])}),Zn($e[0],function(Qe,ut){return $e[Qe<-T/2?ut<0?6:4:Qe<0?ut<0?2:0:Qe0?[-ut[0],0]:[180-ut[0],180])};var $e=xr.map(function(Qe){return{face:Qe,project:je(Qe)}});return[-1,0,0,1,0,1,4,5].forEach(function(Qe,ut){var mt=$e[Qe];mt&&(mt.children||(mt.children=[])).push($e[ut])}),Zn($e[0],function(Qe,ut){return $e[Qe<-T/2?ut<0?6:4:Qe<0?ut<0?2:0:Qe2||_n[0]!=an[0]||_n[1]!=an[1])&&(hn.push(_n),an=_n)}return hn.length===1&&Yt.length>1&&hn.push(Qe(Yt[Yt.length-1])),hn}function pt(Yt){return Yt.map(mt)}function Ct(Yt){if(Yt==null)return Yt;var an;switch(Yt.type){case"GeometryCollection":an={type:"GeometryCollection",geometries:Yt.geometries.map(Ct)};break;case"Point":an={type:"Point",coordinates:Qe(Yt.coordinates)};break;case"MultiPoint":an={type:Yt.type,coordinates:ut(Yt.coordinates)};break;case"LineString":an={type:Yt.type,coordinates:mt(Yt.coordinates)};break;case"MultiLineString":case"Polygon":an={type:Yt.type,coordinates:pt(Yt.coordinates)};break;case"MultiPolygon":an={type:"MultiPolygon",coordinates:Yt.coordinates.map(pt)};break;default:return Yt}return Yt.bbox!=null&&(an.bbox=Yt.bbox),an}function Qt(Yt){var an={type:"Feature",properties:Yt.properties,geometry:Ct(Yt.geometry)};return Yt.id!=null&&(an.id=Yt.id),Yt.bbox!=null&&(an.bbox=Yt.bbox),an}if(je!=null)switch(je.type){case"Feature":return Qt(je);case"FeatureCollection":var en={type:"FeatureCollection",features:je.features.map(Qt)};return je.bbox!=null&&(en.bbox=je.bbox),en;default:return Ct(je)}return je},r.geoQuincuncial=ya,r.geoRectangularPolyconic=function(){return fe(Zo).scale(131.215)},r.geoRectangularPolyconicRaw=Zo,r.geoRobinson=function(){return a.geoProjection(hs).scale(152.63)},r.geoRobinsonRaw=hs,r.geoSatellite=function(){var je=2,$e=0,Qe=a.geoProjectionMutator(bs),ut=Qe(je,$e);return ut.distance=function(mt){return arguments.length?Qe(je=+mt,$e):je},ut.tilt=function(mt){return arguments.length?Qe(je,$e=mt*R):$e*O},ut.scale(432.147).clipAngle(L(1/je)*O-1e-6)},r.geoSatelliteRaw=bs,r.geoSinuMollweide=function(){return a.geoProjection(It).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},r.geoSinuMollweideRaw=It,r.geoSinusoidal=function(){return a.geoProjection(me).scale(152.63)},r.geoSinusoidalRaw=me,r.geoStitch=function(je){if(je==null)return je;switch(je.type){case"Feature":return ba(je);case"FeatureCollection":var $e={type:"FeatureCollection",features:je.features.map(ba)};return je.bbox!=null&&($e.bbox=je.bbox),$e;default:return ju(je)}},r.geoTimes=function(){return a.geoProjection(Wl).scale(146.153)},r.geoTimesRaw=Wl,r.geoTwoPointAzimuthal=ac,r.geoTwoPointAzimuthalRaw=Ec,r.geoTwoPointAzimuthalUsa=function(){return ac([-158,21.5],[-77,39]).clipAngle(60).scale(400)},r.geoTwoPointEquidistant=Ns,r.geoTwoPointEquidistantRaw=Cc,r.geoTwoPointEquidistantUsa=function(){return Ns([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},r.geoVanDerGrinten=function(){return a.geoProjection(Bs).scale(79.4183)},r.geoVanDerGrintenRaw=Bs,r.geoVanDerGrinten2=function(){return a.geoProjection(fl).scale(79.4183)},r.geoVanDerGrinten2Raw=fl,r.geoVanDerGrinten3=function(){return a.geoProjection(hl).scale(79.4183)},r.geoVanDerGrinten3Raw=hl,r.geoVanDerGrinten4=function(){return a.geoProjection(dl).scale(127.16)},r.geoVanDerGrinten4Raw=dl,r.geoWagner=ws,r.geoWagner7=function(){return ws().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},r.geoWagnerRaw=Yl,r.geoWagner4=function(){return a.geoProjection(pl).scale(176.84)},r.geoWagner4Raw=pl,r.geoWagner6=function(){return a.geoProjection(Vu).scale(152.63)},r.geoWagner6Raw=Vu,r.geoWiechel=function(){return a.geoProjection(js).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},r.geoWiechelRaw=js,r.geoWinkel3=function(){return a.geoProjection(ma).scale(158.837)},r.geoWinkel3Raw=ma,Object.defineProperty(r,"__esModule",{value:!0})})},{"d3-array":107,"d3-geo":114}],114:[function(e,o,f){(function(r,a){typeof f=="object"&&o!==void 0?a(f,e("d3-array")):a((r=r||self).d3=r.d3||{},r.d3)})(this,function(r,a){function l(){return new c}function c(){this.reset()}c.prototype={constructor:c,reset:function(){this.s=this.t=0},add:function(ht){s(i,ht,this.t),s(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new c;function s(ht,Ft,ln){var $t=ht.s=Ft+ln,un=$t-Ft,On=$t-un;ht.t=Ft-On+(ln-un)}var u=1e-6,d=Math.PI,h=d/2,m=d/4,g=2*d,p=180/d,v=d/180,y=Math.abs,x=Math.atan,w=Math.atan2,k=Math.cos,b=Math.ceil,T=Math.exp,_=Math.log,S=Math.pow,A=Math.sin,M=Math.sign||function(ht){return ht>0?1:ht<0?-1:0},E=Math.sqrt,D=Math.tan;function O(ht){return ht>1?0:ht<-1?d:Math.acos(ht)}function R(ht){return ht>1?h:ht<-1?-h:Math.asin(ht)}function z(ht){return(ht=A(ht/2))*ht}function L(){}function P(ht,Ft){ht&&B.hasOwnProperty(ht.type)&&B[ht.type](ht,Ft)}var N={Feature:function(ht,Ft){P(ht.geometry,Ft)},FeatureCollection:function(ht,Ft){for(var ln=ht.features,$t=-1,un=ln.length;++$t=0?1:-1,un=$t*ln,On=k(Ft=(Ft*=v)/2+m),Fn=A(Ft),Jn=U*Fn,fr=re*On+Jn*k(un),ur=Jn*$t*A(un);q.add(w(ur,fr)),Z=ht,re=On,U=Fn}function ae(ht){return[w(ht[1],ht[0]),R(ht[2])]}function ue(ht){var Ft=ht[0],ln=ht[1],$t=k(ln);return[$t*k(Ft),$t*A(Ft),A(ln)]}function le(ht,Ft){return ht[0]*Ft[0]+ht[1]*Ft[1]+ht[2]*Ft[2]}function ge(ht,Ft){return[ht[1]*Ft[2]-ht[2]*Ft[1],ht[2]*Ft[0]-ht[0]*Ft[2],ht[0]*Ft[1]-ht[1]*Ft[0]]}function fe(ht,Ft){ht[0]+=Ft[0],ht[1]+=Ft[1],ht[2]+=Ft[2]}function me(ht,Ft){return[ht[0]*Ft,ht[1]*Ft,ht[2]*Ft]}function _e(ht){var Ft=E(ht[0]*ht[0]+ht[1]*ht[1]+ht[2]*ht[2]);ht[0]/=Ft,ht[1]/=Ft,ht[2]/=Ft}var we,Te,Oe,de,ye,Me,ke,Ee,ze,Fe,Ve,Ke,Re,qe,We,Ye,nt,ft,vt,Pt,At,at,et,Ot,Wt,Jt,Be=l(),Ge={point:Tt,lineStart:Pe,lineEnd:Ie,polygonStart:function(){Ge.point=Ae,Ge.lineStart=De,Ge.lineEnd=He,Be.reset(),ne.polygonStart()},polygonEnd:function(){ne.polygonEnd(),Ge.point=Tt,Ge.lineStart=Pe,Ge.lineEnd=Ie,q<0?(we=-(Oe=180),Te=-(de=90)):Be>u?de=90:Be<-u&&(Te=-90),Fe[0]=we,Fe[1]=Oe},sphere:function(){we=-(Oe=180),Te=-(de=90)}};function Tt(ht,Ft){ze.push(Fe=[we=ht,Oe=ht]),Ftde&&(de=Ft)}function dt(ht,Ft){var ln=ue([ht*v,Ft*v]);if(Ee){var $t=ge(Ee,ln),un=ge([$t[1],-$t[0],0],$t);_e(un),un=ae(un);var On,Fn=ht-ye,Jn=Fn>0?1:-1,fr=un[0]*p*Jn,ur=y(Fn)>180;ur^(Jn*yede&&(de=On):ur^(Jn*ye<(fr=(fr+360)%360-180)&&frde&&(de=Ft)),ur?htrt(we,Oe)&&(Oe=ht):rt(ht,Oe)>rt(we,Oe)&&(we=ht):Oe>=we?(htOe&&(Oe=ht)):ht>ye?rt(we,ht)>rt(we,Oe)&&(Oe=ht):rt(ht,Oe)>rt(we,Oe)&&(we=ht)}else ze.push(Fe=[we=ht,Oe=ht]);Ftde&&(de=Ft),Ee=ln,ye=ht}function Pe(){Ge.point=dt}function Ie(){Fe[0]=we,Fe[1]=Oe,Ge.point=Tt,Ee=null}function Ae(ht,Ft){if(Ee){var ln=ht-ye;Be.add(y(ln)>180?ln+(ln>0?360:-360):ln)}else Me=ht,ke=Ft;ne.point(ht,Ft),dt(ht,Ft)}function De(){ne.lineStart()}function He(){Ae(Me,ke),ne.lineEnd(),y(Be)>u&&(we=-(Oe=180)),Fe[0]=we,Fe[1]=Oe,Ee=null}function rt(ht,Ft){return(Ft-=ht)<0?Ft+360:Ft}function lt(ht,Ft){return ht[0]-Ft[0]}function ot(ht,Ft){return ht[0]<=ht[1]?ht[0]<=Ft&&Ft<=ht[1]:Ftd?ht+Math.round(-ht/g)*g:ht,Ft]}function Zt(ht,Ft,ln){return(ht%=g)?Ft||ln?Et(Ht(ht),mn(Ft,ln)):Ht(ht):Ft||ln?mn(Ft,ln):It}function Kt(ht){return function(Ft,ln){return[(Ft+=ht)>d?Ft-g:Ft<-d?Ft+g:Ft,ln]}}function Ht(ht){var Ft=Kt(ht);return Ft.invert=Kt(-ht),Ft}function mn(ht,Ft){var ln=k(ht),$t=A(ht),un=k(Ft),On=A(Ft);function Fn(Jn,fr){var ur=k(fr),yr=k(Jn)*ur,Tr=A(Jn)*ur,hr=A(fr),Ar=hr*ln+yr*$t;return[w(Tr*un-Ar*On,yr*ln-hr*$t),R(Ar*un+Tr*On)]}return Fn.invert=function(Jn,fr){var ur=k(fr),yr=k(Jn)*ur,Tr=A(Jn)*ur,hr=A(fr),Ar=hr*un-Tr*On;return[w(Tr*un+hr*On,yr*ln+Ar*$t),R(Ar*ln-yr*$t)]},Fn}function zn(ht){function Ft(ln){return(ln=ht(ln[0]*v,ln[1]*v))[0]*=p,ln[1]*=p,ln}return ht=Zt(ht[0]*v,ht[1]*v,ht.length>2?ht[2]*v:0),Ft.invert=function(ln){return(ln=ht.invert(ln[0]*v,ln[1]*v))[0]*=p,ln[1]*=p,ln},Ft}function pn(ht,Ft,ln,$t,un,On){if(ln){var Fn=k(Ft),Jn=A(Ft),fr=$t*ln;un==null?(un=Ft+$t*g,On=Ft-fr/2):(un=tn(Fn,un),On=tn(Fn,On),($t>0?unOn)&&(un+=$t*g));for(var ur,yr=un;$t>0?yr>On:yr1&&Ft.push(Ft.pop().concat(Ft.shift()))},result:function(){var ln=Ft;return Ft=[],ht=null,ln}}}function sn(ht,Ft){return y(ht[0]-Ft[0])=0;--On)un.point((yr=ur[On])[0],yr[1]);else $t(hr.x,hr.p.x,-1,un);hr=hr.p}ur=(hr=hr.o).z,Ar=!Ar}while(!hr.v);un.lineEnd()}}}function In(ht){if(Ft=ht.length){for(var Ft,ln,$t=0,un=ht[0];++$t=0?1:-1,ra=Lr*Ki,Ji=ra>d,Ci=Zr*fi;if(Hn.add(w(Ci*Lr*A(ra),mi*Ni+Ci*k(ra))),Fn+=Ji?Ki+Lr*g:Ki,Ji^Ar>=ln^Rr>=ln){var ia=ge(ue(hr),ue(di));_e(ia);var Wi=ge(On,ia);_e(Wi);var Ca=(Ji^Ki>=0?-1:1)*R(Wi[2]);($t>Ca||$t===Ca&&(ia[0]||ia[1]))&&(Jn+=Ji^Ki>=0?1:-1)}}return(Fn<-u||Fn0){for(Tr||(un.polygonStart(),Tr=!0),un.lineStart(),Gr=0;Gr1&&2&Lr&&ra.push(ra.pop().concat(ra.shift())),Fn.push(ra.filter(vr))}return hr}}function vr(ht){return ht.length>1}function Er(ht,Ft){return((ht=ht.x)[0]<0?ht[1]-h-u:h-ht[1])-((Ft=Ft.x)[0]<0?Ft[1]-h-u:h-Ft[1])}var Kn=Or(function(){return!0},function(ht){var Ft,ln=NaN,$t=NaN,un=NaN;return{lineStart:function(){ht.lineStart(),Ft=1},point:function(On,Fn){var Jn=On>0?d:-d,fr=y(On-ln);y(fr-d)0?h:-h),ht.point(un,$t),ht.lineEnd(),ht.lineStart(),ht.point(Jn,$t),ht.point(On,$t),Ft=0):un!==Jn&&fr>=d&&(y(ln-un)u?x((A(yr)*(Ur=k(hr))*A(Tr)-A(hr)*(Ar=k(yr))*A(ur))/(Ar*Ur*Zr)):(yr+hr)/2}(ln,$t,On,Fn),ht.point(un,$t),ht.lineEnd(),ht.lineStart(),ht.point(Jn,$t),Ft=0),ht.point(ln=On,$t=Fn),un=Jn},lineEnd:function(){ht.lineEnd(),ln=$t=NaN},clean:function(){return 2-Ft}}},function(ht,Ft,ln,$t){var un;if(ht==null)un=ln*h,$t.point(-d,un),$t.point(0,un),$t.point(d,un),$t.point(d,0),$t.point(d,-un),$t.point(0,-un),$t.point(-d,-un),$t.point(-d,0),$t.point(-d,un);else if(y(ht[0]-Ft[0])>u){var On=ht[0]0,un=y(Ft)>u;function On(fr,ur){return k(fr)*k(ur)>Ft}function Fn(fr,ur,yr){var Tr=[1,0,0],hr=ge(ue(fr),ue(ur)),Ar=le(hr,hr),Ur=hr[0],Zr=Ar-Ur*Ur;if(!Zr)return!yr&&fr;var mi=Ft*Ar/Zr,Qn=-Ft*Ur/Zr,di=ge(Tr,hr),Rr=me(Tr,mi);fe(Rr,me(hr,Qn));var Gr=di,fi=le(Rr,Gr),Ni=le(Gr,Gr),Ki=fi*fi-Ni*(le(Rr,Rr)-1);if(!(Ki<0)){var Lr=E(Ki),ra=me(Gr,(-fi-Lr)/Ni);if(fe(ra,Rr),ra=ae(ra),!yr)return ra;var Ji,Ci=fr[0],ia=ur[0],Wi=fr[1],Ca=ur[1];ia0^ra[1]<(y(ra[0]-Ci)d^(Ci<=ra[0]&&ra[0]<=ia)){var Po=me(Gr,(-fi+Lr)/Ni);return fe(Po,Rr),[ra,ae(Po)]}}}function Jn(fr,ur){var yr=$t?ht:d-ht,Tr=0;return fr<-yr?Tr|=1:fr>yr&&(Tr|=2),ur<-yr?Tr|=4:ur>yr&&(Tr|=8),Tr}return Or(On,function(fr){var ur,yr,Tr,hr,Ar;return{lineStart:function(){hr=Tr=!1,Ar=1},point:function(Ur,Zr){var mi,Qn=[Ur,Zr],di=On(Ur,Zr),Rr=$t?di?0:Jn(Ur,Zr):di?Jn(Ur+(Ur<0?d:-d),Zr):0;if(!ur&&(hr=Tr=di)&&fr.lineStart(),di!==Tr&&(!(mi=Fn(ur,Qn))||sn(ur,mi)||sn(Qn,mi))&&(Qn[2]=1),di!==Tr)Ar=0,di?(fr.lineStart(),mi=Fn(Qn,ur),fr.point(mi[0],mi[1])):(mi=Fn(ur,Qn),fr.point(mi[0],mi[1],2),fr.lineEnd()),ur=mi;else if(un&&ur&&$t^di){var Gr;Rr&yr||!(Gr=Fn(Qn,ur,!0))||(Ar=0,$t?(fr.lineStart(),fr.point(Gr[0][0],Gr[0][1]),fr.point(Gr[1][0],Gr[1][1]),fr.lineEnd()):(fr.point(Gr[1][0],Gr[1][1]),fr.lineEnd(),fr.lineStart(),fr.point(Gr[0][0],Gr[0][1],3)))}!di||ur&&sn(ur,Qn)||fr.point(Qn[0],Qn[1]),ur=Qn,Tr=di,yr=Rr},lineEnd:function(){Tr&&fr.lineEnd(),ur=null},clean:function(){return Ar|(hr&&Tr)<<1}}},function(fr,ur,yr,Tr){pn(Tr,ht,ln,yr,fr,ur)},$t?[0,-ht]:[-d,ht-d])}function lr(ht,Ft,ln,$t){function un(ur,yr){return ht<=ur&&ur<=ln&&Ft<=yr&&yr<=$t}function On(ur,yr,Tr,hr){var Ar=0,Ur=0;if(ur==null||(Ar=Fn(ur,Tr))!==(Ur=Fn(yr,Tr))||fr(ur,yr)<0^Tr>0)do hr.point(Ar===0||Ar===3?ht:ln,Ar>1?$t:Ft);while((Ar=(Ar+Tr+4)%4)!==Ur);else hr.point(yr[0],yr[1])}function Fn(ur,yr){return y(ur[0]-ht)0?0:3:y(ur[0]-ln)0?2:1:y(ur[1]-Ft)0?1:0:yr>0?3:2}function Jn(ur,yr){return fr(ur.x,yr.x)}function fr(ur,yr){var Tr=Fn(ur,1),hr=Fn(yr,1);return Tr!==hr?Tr-hr:Tr===0?yr[1]-ur[1]:Tr===1?ur[0]-yr[0]:Tr===2?ur[1]-yr[1]:yr[0]-ur[0]}return function(ur){var yr,Tr,hr,Ar,Ur,Zr,mi,Qn,di,Rr,Gr,fi=ur,Ni=nn(),Ki={point:Lr,lineStart:function(){Ki.point=ra,Tr&&Tr.push(hr=[]),Rr=!0,di=!1,mi=Qn=NaN},lineEnd:function(){yr&&(ra(Ar,Ur),Zr&&di&&Ni.rejoin(),yr.push(Ni.result())),Ki.point=Lr,di&&fi.lineEnd()},polygonStart:function(){fi=Ni,yr=[],Tr=[],Gr=!0},polygonEnd:function(){var Ji=function(){for(var Wi=0,Ca=0,pi=Tr.length;Ca$t&&(Qa-_a)*($t-Po)>(Ts-Po)*(ht-_a)&&++Wi:Ts<=$t&&(Qa-_a)*($t-Po)<(Ts-Po)*(ht-_a)&&--Wi;return Wi}(),Ci=Gr&&Ji,ia=(yr=a.merge(yr)).length;(Ci||ia)&&(ur.polygonStart(),Ci&&(ur.lineStart(),On(null,null,1,ur),ur.lineEnd()),ia&&bn(yr,Jn,Ji,On,ur),ur.polygonEnd()),fi=ur,yr=Tr=hr=null}};function Lr(Ji,Ci){un(Ji,Ci)&&fi.point(Ji,Ci)}function ra(Ji,Ci){var ia=un(Ji,Ci);if(Tr&&hr.push([Ji,Ci]),Rr)Ar=Ji,Ur=Ci,Zr=ia,Rr=!1,ia&&(fi.lineStart(),fi.point(Ji,Ci));else if(ia&&di)fi.point(Ji,Ci);else{var Wi=[mi=Math.max(-1e9,Math.min(1e9,mi)),Qn=Math.max(-1e9,Math.min(1e9,Qn))],Ca=[Ji=Math.max(-1e9,Math.min(1e9,Ji)),Ci=Math.max(-1e9,Math.min(1e9,Ci))];(function(pi,_a,Po,Al,Zs,ks){var Pi,Qa=pi[0],Ts=pi[1],wa=0,uo=1,jo=_a[0]-Qa,La=_a[1]-Ts;if(Pi=Po-Qa,jo||!(Pi>0)){if(Pi/=jo,jo<0){if(Pi0){if(Pi>uo)return;Pi>wa&&(wa=Pi)}if(Pi=Zs-Qa,jo||!(Pi<0)){if(Pi/=jo,jo<0){if(Pi>uo)return;Pi>wa&&(wa=Pi)}else if(jo>0){if(Pi0)){if(Pi/=La,La<0){if(Pi0){if(Pi>uo)return;Pi>wa&&(wa=Pi)}if(Pi=ks-Ts,La||!(Pi<0)){if(Pi/=La,La<0){if(Pi>uo)return;Pi>wa&&(wa=Pi)}else if(La>0){if(Pi0&&(pi[0]=Qa+wa*jo,pi[1]=Ts+wa*La),uo<1&&(_a[0]=Qa+uo*jo,_a[1]=Ts+uo*La),!0}}}}})(Wi,Ca,ht,Ft,ln,$t)?(di||(fi.lineStart(),fi.point(Wi[0],Wi[1])),fi.point(Ca[0],Ca[1]),ia||fi.lineEnd(),Gr=!1):ia&&(fi.lineStart(),fi.point(Ji,Ci),Gr=!1)}mi=Ji,Qn=Ci,di=ia}return Ki}}var Wr,Mn,rr,nr=l(),Bn={sphere:L,point:L,lineStart:function(){Bn.point=$r,Bn.lineEnd=Fr},lineEnd:L,polygonStart:L,polygonEnd:L};function Fr(){Bn.point=Bn.lineEnd=L}function $r(ht,Ft){Wr=ht*=v,Mn=A(Ft*=v),rr=k(Ft),Bn.point=pr}function pr(ht,Ft){ht*=v;var ln=A(Ft*=v),$t=k(Ft),un=y(ht-Wr),On=k(un),Fn=$t*A(un),Jn=rr*ln-Mn*$t*On,fr=Mn*ln+rr*$t*On;nr.add(w(E(Fn*Fn+Jn*Jn),fr)),Wr=ht,Mn=ln,rr=$t}function qr(ht){return nr.reset(),K(ht,Bn),+nr}var _i=[null,null],cn={type:"LineString",coordinates:_i};function jn(ht,Ft){return _i[0]=ht,_i[1]=Ft,qr(cn)}var jt={Feature:function(ht,Ft){return yn(ht.geometry,Ft)},FeatureCollection:function(ht,Ft){for(var ln=ht.features,$t=-1,un=ln.length;++$t0&&(un=jn(ht[On],ht[On-1]))>0&&ln<=un&&$t<=un&&(ln+$t-un)*(1-Math.pow((ln-$t)/un,2))<1e-12*un)return!0;ln=$t}return!1}function Nn(ht,Ft){return!!ar(ht.map(Rn),wn(Ft))}function Rn(ht){return(ht=ht.map(wn)).pop(),ht}function wn(ht){return[ht[0]*v,ht[1]*v]}function kn(ht,Ft,ln){var $t=a.range(ht,Ft-u,ln).concat(Ft);return function(un){return $t.map(function(On){return[un,On]})}}function Tn(ht,Ft,ln){var $t=a.range(ht,Ft-u,ln).concat(Ft);return function(un){return $t.map(function(On){return[On,un]})}}function Dn(){var ht,Ft,ln,$t,un,On,Fn,Jn,fr,ur,yr,Tr,hr=10,Ar=hr,Ur=90,Zr=360,mi=2.5;function Qn(){return{type:"MultiLineString",coordinates:di()}}function di(){return a.range(b($t/Ur)*Ur,ln,Ur).map(yr).concat(a.range(b(Jn/Zr)*Zr,Fn,Zr).map(Tr)).concat(a.range(b(Ft/hr)*hr,ht,hr).filter(function(Rr){return y(Rr%Ur)>u}).map(fr)).concat(a.range(b(On/Ar)*Ar,un,Ar).filter(function(Rr){return y(Rr%Zr)>u}).map(ur))}return Qn.lines=function(){return di().map(function(Rr){return{type:"LineString",coordinates:Rr}})},Qn.outline=function(){return{type:"Polygon",coordinates:[yr($t).concat(Tr(Fn).slice(1),yr(ln).reverse().slice(1),Tr(Jn).reverse().slice(1))]}},Qn.extent=function(Rr){return arguments.length?Qn.extentMajor(Rr).extentMinor(Rr):Qn.extentMinor()},Qn.extentMajor=function(Rr){return arguments.length?($t=+Rr[0][0],ln=+Rr[1][0],Jn=+Rr[0][1],Fn=+Rr[1][1],$t>ln&&(Rr=$t,$t=ln,ln=Rr),Jn>Fn&&(Rr=Jn,Jn=Fn,Fn=Rr),Qn.precision(mi)):[[$t,Jn],[ln,Fn]]},Qn.extentMinor=function(Rr){return arguments.length?(Ft=+Rr[0][0],ht=+Rr[1][0],On=+Rr[0][1],un=+Rr[1][1],Ft>ht&&(Rr=Ft,Ft=ht,ht=Rr),On>un&&(Rr=On,On=un,un=Rr),Qn.precision(mi)):[[Ft,On],[ht,un]]},Qn.step=function(Rr){return arguments.length?Qn.stepMajor(Rr).stepMinor(Rr):Qn.stepMinor()},Qn.stepMajor=function(Rr){return arguments.length?(Ur=+Rr[0],Zr=+Rr[1],Qn):[Ur,Zr]},Qn.stepMinor=function(Rr){return arguments.length?(hr=+Rr[0],Ar=+Rr[1],Qn):[hr,Ar]},Qn.precision=function(Rr){return arguments.length?(mi=+Rr,fr=kn(On,un,90),ur=Tn(Ft,ht,mi),yr=kn(Jn,Fn,90),Tr=Tn($t,ln,mi),Qn):mi},Qn.extentMajor([[-180,-90+u],[180,90-u]]).extentMinor([[-180,-80-u],[180,80+u]])}function Zn(ht){return ht}var Yn,ir,or,xr,wr=l(),kr=l(),Dr={point:L,lineStart:L,lineEnd:L,polygonStart:function(){Dr.lineStart=Nr,Dr.lineEnd=Bi},polygonEnd:function(){Dr.lineStart=Dr.lineEnd=Dr.point=L,wr.add(y(kr)),kr.reset()},result:function(){var ht=wr/2;return wr.reset(),ht}};function Nr(){Dr.point=ri}function ri(ht,Ft){Dr.point=ji,Yn=or=ht,ir=xr=Ft}function ji(ht,Ft){kr.add(xr*ht-or*Ft),or=ht,xr=Ft}function Bi(){ji(Yn,ir)}var Sr=1/0,ui=Sr,si=-Sr,ta=si,Ja={point:function(ht,Ft){htsi&&(si=ht),Ftta&&(ta=Ft)},lineStart:L,lineEnd:L,polygonStart:L,polygonEnd:L,result:function(){var ht=[[Sr,ui],[si,ta]];return si=ta=-(ui=Sr=1/0),ht}},Ao,fs,ya,xa,Zo=0,oa=0,hs=0,bs=0,so=0,Jo=0,_s=0,Ls=0,Oo=0,Ka={point:$o,lineStart:ic,lineEnd:ju,polygonStart:function(){Ka.lineStart=Wl,Ka.lineEnd=Sc},polygonEnd:function(){Ka.point=$o,Ka.lineStart=ic,Ka.lineEnd=ju},result:function(){var ht=Oo?[_s/Oo,Ls/Oo]:Jo?[bs/Jo,so/Jo]:hs?[Zo/hs,oa/hs]:[NaN,NaN];return Zo=oa=hs=bs=so=Jo=_s=Ls=Oo=0,ht}};function $o(ht,Ft){Zo+=ht,oa+=Ft,++hs}function ic(){Ka.point=Mc}function Mc(ht,Ft){Ka.point=ba,$o(ya=ht,xa=Ft)}function ba(ht,Ft){var ln=ht-ya,$t=Ft-xa,un=E(ln*ln+$t*$t);bs+=un*(ya+ht)/2,so+=un*(xa+Ft)/2,Jo+=un,$o(ya=ht,xa=Ft)}function ju(){Ka.point=$o}function Wl(){Ka.point=Ec}function Sc(){ac(Ao,fs)}function Ec(ht,Ft){Ka.point=ac,$o(Ao=ya=ht,fs=xa=Ft)}function ac(ht,Ft){var ln=ht-ya,$t=Ft-xa,un=E(ln*ln+$t*$t);bs+=un*(ya+ht)/2,so+=un*(xa+Ft)/2,Jo+=un,_s+=(un=xa*ht-ya*Ft)*(ya+ht),Ls+=un*(xa+Ft),Oo+=3*un,$o(ya=ht,xa=Ft)}function Cc(ht){this._context=ht}Cc.prototype={_radius:4.5,pointRadius:function(ht){return this._radius=ht,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(ht,Ft){switch(this._point){case 0:this._context.moveTo(ht,Ft),this._point=1;break;case 1:this._context.lineTo(ht,Ft);break;default:this._context.moveTo(ht+this._radius,Ft),this._context.arc(ht,Ft,this._radius,0,g)}},result:L};var Ns,Bs,fl,hl,dl,Yl=l(),ws={point:L,lineStart:function(){ws.point=Uu},lineEnd:function(){Ns&&ds(Bs,fl),ws.point=L},polygonStart:function(){Ns=!0},polygonEnd:function(){Ns=null},result:function(){var ht=+Yl;return Yl.reset(),ht}};function Uu(ht,Ft){ws.point=ds,Bs=hl=ht,fl=dl=Ft}function ds(ht,Ft){hl-=ht,dl-=Ft,Yl.add(E(hl*hl+dl*dl)),hl=ht,dl=Ft}function pl(){this._string=[]}function Vu(ht){return"m0,"+ht+"a"+ht+","+ht+" 0 1,1 0,"+-2*ht+"a"+ht+","+ht+" 0 1,1 0,"+2*ht+"z"}function js(ht){return function(Ft){var ln=new ma;for(var $t in ht)ln[$t]=ht[$t];return ln.stream=Ft,ln}}function ma(){}function je(ht,Ft,ln){var $t=ht.clipExtent&&ht.clipExtent();return ht.scale(150).translate([0,0]),$t!=null&&ht.clipExtent(null),K(ln,ht.stream(Ja)),Ft(Ja.result()),$t!=null&&ht.clipExtent($t),ht}function $e(ht,Ft,ln){return je(ht,function($t){var un=Ft[1][0]-Ft[0][0],On=Ft[1][1]-Ft[0][1],Fn=Math.min(un/($t[1][0]-$t[0][0]),On/($t[1][1]-$t[0][1])),Jn=+Ft[0][0]+(un-Fn*($t[1][0]+$t[0][0]))/2,fr=+Ft[0][1]+(On-Fn*($t[1][1]+$t[0][1]))/2;ht.scale(150*Fn).translate([Jn,fr])},ln)}function Qe(ht,Ft,ln){return $e(ht,[[0,0],Ft],ln)}function ut(ht,Ft,ln){return je(ht,function($t){var un=+Ft,On=un/($t[1][0]-$t[0][0]),Fn=(un-On*($t[1][0]+$t[0][0]))/2,Jn=-On*$t[0][1];ht.scale(150*On).translate([Fn,Jn])},ln)}function mt(ht,Ft,ln){return je(ht,function($t){var un=+Ft,On=un/($t[1][1]-$t[0][1]),Fn=-On*$t[0][0],Jn=(un-On*($t[1][1]+$t[0][1]))/2;ht.scale(150*On).translate([Fn,Jn])},ln)}pl.prototype={_radius:4.5,_circle:Vu(4.5),pointRadius:function(ht){return(ht=+ht)!==this._radius&&(this._radius=ht,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(ht,Ft){switch(this._point){case 0:this._string.push("M",ht,",",Ft),this._point=1;break;case 1:this._string.push("L",ht,",",Ft);break;default:this._circle==null&&(this._circle=Vu(this._radius)),this._string.push("M",ht,",",Ft,this._circle)}},result:function(){if(this._string.length){var ht=this._string.join("");return this._string=[],ht}return null}},ma.prototype={constructor:ma,point:function(ht,Ft){this.stream.point(ht,Ft)},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()}};var pt=k(30*v);function Ct(ht,Ft){return+Ft?function(ln,$t){function un(On,Fn,Jn,fr,ur,yr,Tr,hr,Ar,Ur,Zr,mi,Qn,di){var Rr=Tr-On,Gr=hr-Fn,fi=Rr*Rr+Gr*Gr;if(fi>4*$t&&Qn--){var Ni=fr+Ur,Ki=ur+Zr,Lr=yr+mi,ra=E(Ni*Ni+Ki*Ki+Lr*Lr),Ji=R(Lr/=ra),Ci=y(y(Lr)-1)$t||y((Rr*pi+Gr*_a)/fi-.5)>.3||fr*Ur+ur*Zr+yr*mi2?pi[2]%360*v:0,Wi()):[mi*p,Qn*p,di*p]},Ci.angle=function(pi){return arguments.length?(Rr=pi%360*v,Wi()):Rr*p},Ci.reflectX=function(pi){return arguments.length?(Gr=pi?-1:1,Wi()):Gr<0},Ci.reflectY=function(pi){return arguments.length?(fi=pi?-1:1,Wi()):fi<0},Ci.precision=function(pi){return arguments.length?(Fn=Ct(Jn,Ji=pi*pi),Ca()):E(Ji)},Ci.fitExtent=function(pi,_a){return $e(Ci,pi,_a)},Ci.fitSize=function(pi,_a){return Qe(Ci,pi,_a)},Ci.fitWidth=function(pi,_a){return ut(Ci,pi,_a)},Ci.fitHeight=function(pi,_a){return mt(Ci,pi,_a)},function(){return Ft=ht.apply(this,arguments),Ci.invert=Ft.invert&&ia,Wi()}}function xn(ht){var Ft=0,ln=d/3,$t=hn(ht),un=$t(Ft,ln);return un.parallels=function(On){return arguments.length?$t(Ft=On[0]*v,ln=On[1]*v):[Ft*p,ln*p]},un}function _n(ht,Ft){var ln=A(ht),$t=(ln+A(Ft))/2;if(y($t)0?Jn<-h+u&&(Jn=-h+u):Jn>h-u&&(Jn=h-u);var fr=un/S(Ui(Jn),$t);return[fr*A($t*Fn),un-fr*k($t*Fn)]}return On.invert=function(Fn,Jn){var fr=un-Jn,ur=M($t)*E(Fn*Fn+fr*fr),yr=w(Fn,y(fr))*M(fr);return fr*$t<0&&(yr-=d*M(Fn)*M(fr)),[yr/$t,2*x(S(un/ur,1/$t))-h]},On}function sa(ht,Ft){return[ht,Ft]}function ca(ht,Ft){var ln=k(ht),$t=ht===Ft?A(ht):(ln-k(Ft))/(Ft-ht),un=ln/$t+ht;if(y($t)u&&--un>0);return[ht/(.8707+(On=$t*$t)*(On*(On*On*On*(.003971-.001529*On)-.013791)-.131979)),$t]},es.invert=zr(R),ts.invert=zr(function(ht){return 2*x(ht)}),na.invert=function(ht,Ft){return[-Ft,2*x(T(ht))-h]},r.geoAlbers=sr,r.geoAlbersUsa=function(){var ht,Ft,ln,$t,un,On,Fn=sr(),Jn=Pn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),fr=Pn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),ur={point:function(hr,Ar){On=[hr,Ar]}};function yr(hr){var Ar=hr[0],Ur=hr[1];return On=null,ln.point(Ar,Ur),On||($t.point(Ar,Ur),On)||(un.point(Ar,Ur),On)}function Tr(){return ht=Ft=null,yr}return yr.invert=function(hr){var Ar=Fn.scale(),Ur=Fn.translate(),Zr=(hr[0]-Ur[0])/Ar,mi=(hr[1]-Ur[1])/Ar;return(mi>=.12&&mi<.234&&Zr>=-.425&&Zr<-.214?Jn:mi>=.166&&mi<.234&&Zr>=-.214&&Zr<-.115?fr:Fn).invert(hr)},yr.stream=function(hr){return ht&&Ft===hr?ht:(Ar=[Fn.stream(Ft=hr),Jn.stream(hr),fr.stream(hr)],Ur=Ar.length,ht={point:function(Zr,mi){for(var Qn=-1;++Qnrt($t[0],$t[1])&&($t[1]=un[1]),rt(un[0],$t[1])>rt($t[0],$t[1])&&($t[0]=un[0])):On.push($t=un);for(Fn=-1/0,Ft=0,$t=On[ln=On.length-1];Ft<=ln;$t=un,++Ft)un=On[Ft],(Jn=rt($t[1],un[0]))>Fn&&(Fn=Jn,we=un[0],Oe=$t[1])}return ze=Fe=null,we===1/0||Te===1/0?[[NaN,NaN],[NaN,NaN]]:[[we,Te],[Oe,de]]},r.geoCentroid=function(ht){Ve=Ke=Re=qe=We=Ye=nt=ft=vt=Pt=At=0,K(ht,kt);var Ft=vt,ln=Pt,$t=At,un=Ft*Ft+ln*ln+$t*$t;return un<1e-12&&(Ft=Ye,ln=nt,$t=ft,Ke2?$t[2]+90:90]):[($t=ln())[0],$t[1],$t[2]-90]},ln([0,0,90]).scale(159.155)},r.geoTransverseMercatorRaw=na,Object.defineProperty(r,"__esModule",{value:!0})})},{"d3-array":107}],115:[function(e,o,f){(function(r,a){a(typeof f=="object"&&o!==void 0?f:(r=r||self).d3=r.d3||{})})(this,function(r){function a(le,ge){return le.parent===ge.parent?1:2}function l(le,ge){return le+ge.x}function c(le,ge){return Math.max(le,ge.y)}function i(le){var ge=0,fe=le.children,me=fe&&fe.length;if(me)for(;--me>=0;)ge+=fe[me].value;else ge=1;le.value=ge}function s(le,ge){var fe,me,_e,we,Te,Oe=new m(le),de=+le.value&&(Oe.value=le.value),ye=[Oe];for(ge==null&&(ge=u);fe=ye.pop();)if(de&&(fe.value=+fe.data.value),(_e=ge(fe.data))&&(Te=_e.length))for(fe.children=new Array(Te),we=Te-1;we>=0;--we)ye.push(me=fe.children[we]=new m(_e[we])),me.parent=fe,me.depth=fe.depth+1;return Oe.eachBefore(h)}function u(le){return le.children}function d(le){le.data=le.data.data}function h(le){var ge=0;do le.height=ge;while((le=le.parent)&&le.height<++ge)}function m(le){this.data=le,this.depth=this.height=0,this.parent=null}m.prototype=s.prototype={constructor:m,count:function(){return this.eachAfter(i)},each:function(le){var ge,fe,me,_e,we=this,Te=[we];do for(ge=Te.reverse(),Te=[];we=ge.pop();)if(le(we),fe=we.children)for(me=0,_e=fe.length;me<_e;++me)Te.push(fe[me]);while(Te.length);return this},eachAfter:function(le){for(var ge,fe,me,_e=this,we=[_e],Te=[];_e=we.pop();)if(Te.push(_e),ge=_e.children)for(fe=0,me=ge.length;fe=0;--fe)_e.push(ge[fe]);return this},sum:function(le){return this.eachAfter(function(ge){for(var fe=+le(ge.data)||0,me=ge.children,_e=me&&me.length;--_e>=0;)fe+=me[_e].value;ge.value=fe})},sort:function(le){return this.eachBefore(function(ge){ge.children&&ge.children.sort(le)})},path:function(le){for(var ge=this,fe=function(we,Te){if(we===Te)return we;var Oe=we.ancestors(),de=Te.ancestors(),ye=null;for(we=Oe.pop(),Te=de.pop();we===Te;)ye=we,we=Oe.pop(),Te=de.pop();return ye}(ge,le),me=[ge];ge!==fe;)ge=ge.parent,me.push(ge);for(var _e=me.length;le!==fe;)me.splice(_e,0,le),le=le.parent;return me},ancestors:function(){for(var le=this,ge=[le];le=le.parent;)ge.push(le);return ge},descendants:function(){var le=[];return this.each(function(ge){le.push(ge)}),le},leaves:function(){var le=[];return this.eachBefore(function(ge){ge.children||le.push(ge)}),le},links:function(){var le=this,ge=[];return le.each(function(fe){fe!==le&&ge.push({source:fe.parent,target:fe})}),ge},copy:function(){return s(this).eachBefore(d)}};var g=Array.prototype.slice;function p(le){for(var ge,fe,me=0,_e=(le=function(Te){for(var Oe,de,ye=Te.length;ye;)de=Math.random()*ye--|0,Oe=Te[ye],Te[ye]=Te[de],Te[de]=Oe;return Te}(g.call(le))).length,we=[];me<_e;)ge=le[me],fe&&x(fe,ge)?++me:(fe=k(we=v(we,ge)),me=0);return fe}function v(le,ge){var fe,me;if(w(ge,le))return[ge];for(fe=0;fe0&&fe*fe>me*me+_e*_e}function w(le,ge){for(var fe=0;fe(Te*=Te)?(me=(ye+Te-_e)/(2*ye),we=Math.sqrt(Math.max(0,Te/ye-me*me)),fe.x=le.x-me*Oe-we*de,fe.y=le.y-me*de+we*Oe):(me=(ye+_e-Te)/(2*ye),we=Math.sqrt(Math.max(0,_e/ye-me*me)),fe.x=ge.x+me*Oe-we*de,fe.y=ge.y+me*de+we*Oe)):(fe.x=ge.x+fe.r,fe.y=ge.y)}function S(le,ge){var fe=le.r+ge.r-1e-6,me=ge.x-le.x,_e=ge.y-le.y;return fe>0&&fe*fe>me*me+_e*_e}function A(le){var ge=le._,fe=le.next._,me=ge.r+fe.r,_e=(ge.x*fe.r+fe.x*ge.r)/me,we=(ge.y*fe.r+fe.y*ge.r)/me;return _e*_e+we*we}function M(le){this._=le,this.next=null,this.previous=null}function E(le){if(!(_e=le.length))return 0;var ge,fe,me,_e,we,Te,Oe,de,ye,Me,ke;if((ge=le[0]).x=0,ge.y=0,!(_e>1))return ge.r;if(fe=le[1],ge.x=-fe.r,fe.x=ge.r,fe.y=0,!(_e>2))return ge.r+fe.r;_(fe,ge,me=le[2]),ge=new M(ge),fe=new M(fe),me=new M(me),ge.next=me.previous=fe,fe.next=ge.previous=me,me.next=fe.previous=ge;e:for(Oe=3;Oe<_e;++Oe){_(ge._,fe._,me=le[Oe]),me=new M(me),de=fe.next,ye=ge.previous,Me=fe._.r,ke=ge._.r;do if(Me<=ke){if(S(de._,me._)){fe=de,ge.next=fe,fe.previous=ge,--Oe;continue e}Me+=de._.r,de=de.next}else{if(S(ye._,me._)){(ge=ye).next=fe,fe.previous=ge,--Oe;continue e}ke+=ye._.r,ye=ye.previous}while(de!==ye.next);for(me.previous=ge,me.next=fe,ge.next=fe.previous=fe=me,we=A(ge);(me=me.next)!==fe;)(Te=A(me))Ee&&(Ee=Oe),Ke=Me*Me*Ve,(ze=Math.max(Ee/Ke,Ke/ke))>Fe){Me-=Oe;break}Fe=ze}Re.push(Te={value:Me,dice:de1?me:1)},fe}(ee),ue=function le(ge){function fe(me,_e,we,Te,Oe){if((de=me._squarify)&&de.ratio===ge)for(var de,ye,Me,ke,Ee,ze=-1,Fe=de.length,Ve=me.value;++ze1?me:1)},fe}(ee);r.cluster=function(){var le=a,ge=1,fe=1,me=!1;function _e(we){var Te,Oe=0;we.eachAfter(function(Ee){var ze=Ee.children;ze?(Ee.x=function(Fe){return Fe.reduce(l,0)/Fe.length}(ze),Ee.y=function(Fe){return 1+Fe.reduce(c,0)}(ze)):(Ee.x=Te?Oe+=le(Ee,Te):0,Ee.y=0,Te=Ee)});var de=function(Ee){for(var ze;ze=Ee.children;)Ee=ze[0];return Ee}(we),ye=function(Ee){for(var ze;ze=Ee.children;)Ee=ze[ze.length-1];return Ee}(we),Me=de.x-le(de,ye)/2,ke=ye.x+le(ye,de)/2;return we.eachAfter(me?function(Ee){Ee.x=(Ee.x-we.x)*ge,Ee.y=(we.y-Ee.y)*fe}:function(Ee){Ee.x=(Ee.x-Me)/(ke-Me)*ge,Ee.y=(1-(we.y?Ee.y/we.y:1))*fe})}return _e.separation=function(we){return arguments.length?(le=we,_e):le},_e.size=function(we){return arguments.length?(me=!1,ge=+we[0],fe=+we[1],_e):me?null:[ge,fe]},_e.nodeSize=function(we){return arguments.length?(me=!0,ge=+we[0],fe=+we[1],_e):me?[ge,fe]:null},_e},r.hierarchy=s,r.pack=function(){var le=null,ge=1,fe=1,me=R;function _e(we){return we.x=ge/2,we.y=fe/2,le?we.eachBefore(P(le)).eachAfter(N(me,.5)).eachBefore(B(1)):we.eachBefore(P(L)).eachAfter(N(R,1)).eachAfter(N(me,we.r/Math.min(ge,fe))).eachBefore(B(Math.min(ge,fe)/(2*we.r))),we}return _e.radius=function(we){return arguments.length?(le=D(we),_e):le},_e.size=function(we){return arguments.length?(ge=+we[0],fe=+we[1],_e):[ge,fe]},_e.padding=function(we){return arguments.length?(me=typeof we=="function"?we:z(+we),_e):me},_e},r.packEnclose=p,r.packSiblings=function(le){return E(le),le},r.partition=function(){var le=1,ge=1,fe=0,me=!1;function _e(we){var Te=we.height+1;return we.x0=we.y0=fe,we.x1=le,we.y1=ge/Te,we.eachBefore(function(Oe,de){return function(ye){ye.children&&W(ye,ye.x0,Oe*(ye.depth+1)/de,ye.x1,Oe*(ye.depth+2)/de);var Me=ye.x0,ke=ye.y0,Ee=ye.x1-fe,ze=ye.y1-fe;Ee0)throw new Error("cycle");return Te}return fe.id=function(me){return arguments.length?(le=O(me),fe):le},fe.parentId=function(me){return arguments.length?(ge=O(me),fe):ge},fe},r.tree=function(){var le=re,ge=1,fe=1,me=null;function _e(de){var ye=function(Re){for(var qe,We,Ye,nt,ft,vt=new H(Re,0),Pt=[vt];qe=Pt.pop();)if(Ye=qe._.children)for(qe.children=new Array(ft=Ye.length),nt=ft-1;nt>=0;--nt)Pt.push(We=qe.children[nt]=new H(Ye[nt],nt)),We.parent=qe;return(vt.parent=new H(null,0)).children=[vt],vt}(de);if(ye.eachAfter(we),ye.parent.m=-ye.z,ye.eachBefore(Te),me)de.eachBefore(Oe);else{var Me=de,ke=de,Ee=de;de.eachBefore(function(Re){Re.xke.x&&(ke=Re),Re.depth>Ee.depth&&(Ee=Re)});var ze=Me===ke?1:le(Me,ke)/2,Fe=ze-Me.x,Ve=ge/(ke.x+ze+Fe),Ke=fe/(Ee.depth||1);de.eachBefore(function(Re){Re.x=(Re.x+Fe)*Ve,Re.y=Re.depth*Ke})}return de}function we(de){var ye=de.children,Me=de.parent.children,ke=de.i?Me[de.i-1]:null;if(ye){(function(ze){for(var Fe,Ve=0,Ke=0,Re=ze.children,qe=Re.length;--qe>=0;)(Fe=Re[qe]).z+=Ve,Fe.m+=Ve,Ve+=Fe.s+(Ke+=Fe.c)})(de);var Ee=(ye[0].z+ye[ye.length-1].z)/2;ke?(de.z=ke.z+le(de._,ke._),de.m=de.z-Ee):de.z=Ee}else ke&&(de.z=ke.z+le(de._,ke._));de.parent.A=function(ze,Fe,Ve){if(Fe){for(var Ke,Re=ze,qe=ze,We=Fe,Ye=Re.parent.children[0],nt=Re.m,ft=qe.m,vt=We.m,Pt=Ye.m;We=q(We),Re=U(Re),We&ℜ)Ye=U(Ye),(qe=q(qe)).a=ze,(Ke=We.z+vt-Re.z-nt+le(We._,Re._))>0&&($(ne(We,ze,Ve),ze,Ke),nt+=Ke,ft+=Ke),vt+=We.m,nt+=Re.m,Pt+=Ye.m,ft+=qe.m;We&&!q(qe)&&(qe.t=We,qe.m+=vt-ft),Re&&!U(Ye)&&(Ye.t=Re,Ye.m+=nt-Pt,Ve=ze)}return Ve}(de,ke,de.parent.A||Me[0])}function Te(de){de._.x=de.z+de.parent.m,de.m+=de.parent.m}function Oe(de){de.x*=ge,de.y=de.depth*fe}return _e.separation=function(de){return arguments.length?(le=de,_e):le},_e.size=function(de){return arguments.length?(me=!1,ge=+de[0],fe=+de[1],_e):me?null:[ge,fe]},_e.nodeSize=function(de){return arguments.length?(me=!0,ge=+de[0],fe=+de[1],_e):me?[ge,fe]:null},_e},r.treemap=function(){var le=ae,ge=!1,fe=1,me=1,_e=[0],we=R,Te=R,Oe=R,de=R,ye=R;function Me(Ee){return Ee.x0=Ee.y0=0,Ee.x1=fe,Ee.y1=me,Ee.eachBefore(ke),_e=[0],ge&&Ee.eachBefore(G),Ee}function ke(Ee){var ze=_e[Ee.depth],Fe=Ee.x0+ze,Ve=Ee.y0+ze,Ke=Ee.x1-ze,Re=Ee.y1-ze;Ke=Ee-1){var qe=Oe[ke];return qe.x0=Fe,qe.y0=Ve,qe.x1=Ke,void(qe.y1=Re)}for(var We=ye[ke],Ye=ze/2+We,nt=ke+1,ft=Ee-1;nt>>1;ye[vt]Re-Ve){var at=(Fe*At+Ke*Pt)/ze;Me(ke,nt,Pt,Fe,Ve,at,Re),Me(nt,Ee,At,at,Ve,Ke,Re)}else{var et=(Ve*At+Re*Pt)/ze;Me(ke,nt,Pt,Fe,Ve,Ke,et),Me(nt,Ee,At,Fe,et,Ke,Re)}})(0,de,le.value,ge,fe,me,_e)},r.treemapDice=W,r.treemapResquarify=ue,r.treemapSlice=Q,r.treemapSliceDice=function(le,ge,fe,me,_e){(1&le.depth?Q:W)(le,ge,fe,me,_e)},r.treemapSquarify=ae,Object.defineProperty(r,"__esModule",{value:!0})})},{}],116:[function(e,o,f){(function(r,a){typeof f=="object"&&o!==void 0?a(f,e("d3-color")):a((r=r||self).d3=r.d3||{},r.d3)})(this,function(r,a){function l(ee,ie,ae,ue,le){var ge=ee*ee,fe=ge*ee;return((1-3*ee+3*ge-fe)*ie+(4-6*ge+3*fe)*ae+(1+3*ee+3*ge-3*fe)*ue+fe*le)/6}function c(ee){var ie=ee.length-1;return function(ae){var ue=ae<=0?ae=0:ae>=1?(ae=1,ie-1):Math.floor(ae*ie),le=ee[ue],ge=ee[ue+1],fe=ue>0?ee[ue-1]:2*le-ge,me=ue180||ae<-180?ae-360*Math.round(ae/360):ae):s(isNaN(ee)?ie:ee)}function h(ee){return(ee=+ee)==1?m:function(ie,ae){return ae-ie?function(ue,le,ge){return ue=Math.pow(ue,ge),le=Math.pow(le,ge)-ue,ge=1/ge,function(fe){return Math.pow(ue+fe*le,ge)}}(ie,ae,ee):s(isNaN(ie)?ae:ie)}}function m(ee,ie){var ae=ie-ee;return ae?u(ee,ae):s(isNaN(ee)?ie:ee)}var g=function ee(ie){var ae=h(ie);function ue(le,ge){var fe=ae((le=a.rgb(le)).r,(ge=a.rgb(ge)).r),me=ae(le.g,ge.g),_e=ae(le.b,ge.b),we=m(le.opacity,ge.opacity);return function(Te){return le.r=fe(Te),le.g=me(Te),le.b=_e(Te),le.opacity=we(Te),le+""}}return ue.gamma=ee,ue}(1);function p(ee){return function(ie){var ae,ue,le=ie.length,ge=new Array(le),fe=new Array(le),me=new Array(le);for(ae=0;aege&&(le=ie.slice(ge,le),me[fe]?me[fe]+=le:me[++fe]=le),(ae=ae[0])===(ue=ue[0])?me[fe]?me[fe]+=ue:me[++fe]=ue:(me[++fe]=null,_e.push({i:fe,x:T(ae,ue)})),ge=A.lastIndex;return ge180?Te+=360:Te-we>180&&(we+=360),de.push({i:Oe.push(le(Oe)+"rotate(",null,ue)-2,x:T(we,Te)})):Te&&Oe.push(le(Oe)+"rotate("+Te+ue)}(ge.rotate,fe.rotate,me,_e),function(we,Te,Oe,de){we!==Te?de.push({i:Oe.push(le(Oe)+"skewX(",null,ue)-2,x:T(we,Te)}):Te&&Oe.push(le(Oe)+"skewX("+Te+ue)}(ge.skewX,fe.skewX,me,_e),function(we,Te,Oe,de,ye,Me){if(we!==Oe||Te!==de){var ke=ye.push(le(ye)+"scale(",null,",",null,")");Me.push({i:ke-4,x:T(we,Oe)},{i:ke-2,x:T(Te,de)})}else Oe===1&&de===1||ye.push(le(ye)+"scale("+Oe+","+de+")")}(ge.scaleX,ge.scaleY,fe.scaleX,fe.scaleY,me,_e),ge=fe=null,function(we){for(var Te,Oe=-1,de=_e.length;++Oe1e-6)if(Math.abs(k*y-x*w)>1e-6&&g){var T=h-p,_=m-v,S=y*y+x*x,A=T*T+_*_,M=Math.sqrt(S),E=Math.sqrt(b),D=g*Math.tan((a-Math.acos((S+b-A)/(2*M*E)))/2),O=D/E,R=D/M;Math.abs(O-1)>1e-6&&(this._+="L"+(u+O*w)+","+(d+O*k)),this._+="A"+g+","+g+",0,0,"+ +(k*T>w*_)+","+(this._x1=u+R*y)+","+(this._y1=d+R*x)}else this._+="L"+(this._x1=u)+","+(this._y1=d)},arc:function(u,d,h,m,g,p){u=+u,d=+d,p=!!p;var v=(h=+h)*Math.cos(m),y=h*Math.sin(m),x=u+v,w=d+y,k=1^p,b=p?m-g:g-m;if(h<0)throw new Error("negative radius: "+h);this._x1===null?this._+="M"+x+","+w:(Math.abs(this._x1-x)>1e-6||Math.abs(this._y1-w)>1e-6)&&(this._+="L"+x+","+w),h&&(b<0&&(b=b%l+l),b>c?this._+="A"+h+","+h+",0,1,"+k+","+(u-v)+","+(d-y)+"A"+h+","+h+",0,1,"+k+","+(this._x1=x)+","+(this._y1=w):b>1e-6&&(this._+="A"+h+","+h+",0,"+ +(b>=a)+","+k+","+(this._x1=u+h*Math.cos(g))+","+(this._y1=d+h*Math.sin(g))))},rect:function(u,d,h,m){this._+="M"+(this._x0=this._x1=+u)+","+(this._y0=this._y1=+d)+"h"+ +h+"v"+ +m+"h"+-h+"Z"},toString:function(){return this._}},r.path=s,Object.defineProperty(r,"__esModule",{value:!0})})},{}],118:[function(e,o,f){(function(r,a){a(typeof f=="object"&&o!==void 0?f:(r=r||self).d3=r.d3||{})})(this,function(r){function a(m,g,p,v){if(isNaN(g)||isNaN(p))return m;var y,x,w,k,b,T,_,S,A,M=m._root,E={data:v},D=m._x0,O=m._y0,R=m._x1,z=m._y1;if(!M)return m._root=E,m;for(;M.length;)if((T=g>=(x=(D+R)/2))?D=x:R=x,(_=p>=(w=(O+z)/2))?O=w:z=w,y=M,!(M=M[S=_<<1|T]))return y[S]=E,m;if(k=+m._x.call(null,M.data),b=+m._y.call(null,M.data),g===k&&p===b)return E.next=M,y?y[S]=E:m._root=E,m;do y=y?y[S]=new Array(4):m._root=new Array(4),(T=g>=(x=(D+R)/2))?D=x:R=x,(_=p>=(w=(O+z)/2))?O=w:z=w;while((S=_<<1|T)==(A=(b>=w)<<1|k>=x));return y[A]=M,y[S]=E,m}function l(m,g,p,v,y){this.node=m,this.x0=g,this.y0=p,this.x1=v,this.y1=y}function c(m){return m[0]}function i(m){return m[1]}function s(m,g,p){var v=new u(g??c,p??i,NaN,NaN,NaN,NaN);return m==null?v:v.addAll(m)}function u(m,g,p,v,y,x){this._x=m,this._y=g,this._x0=p,this._y0=v,this._x1=y,this._y1=x,this._root=void 0}function d(m){for(var g={data:m.data},p=g;m=m.next;)p=p.next={data:m.data};return g}var h=s.prototype=u.prototype;h.copy=function(){var m,g,p=new u(this._x,this._y,this._x0,this._y0,this._x1,this._y1),v=this._root;if(!v)return p;if(!v.length)return p._root=d(v),p;for(m=[{source:v,target:p._root=new Array(4)}];v=m.pop();)for(var y=0;y<4;++y)(g=v.source[y])&&(g.length?m.push({source:g,target:v.target[y]=new Array(4)}):v.target[y]=d(g));return p},h.add=function(m){var g=+this._x.call(null,m),p=+this._y.call(null,m);return a(this.cover(g,p),g,p,m)},h.addAll=function(m){var g,p,v,y,x=m.length,w=new Array(x),k=new Array(x),b=1/0,T=1/0,_=-1/0,S=-1/0;for(p=0;p_&&(_=v),yS&&(S=y));if(b>_||T>S)return this;for(this.cover(b,T).cover(_,S),p=0;pm||m>=y||v>g||g>=x;)switch(k=(gA||(x=b.y0)>M||(w=b.x1)<_||(k=b.y1)=R)<<1|m>=O)&&(b=E[E.length-1],E[E.length-1]=E[E.length-1-T],E[E.length-1-T]=b)}else{var z=m-+this._x.call(null,D.data),L=g-+this._y.call(null,D.data),P=z*z+L*L;if(P=(k=(E+O)/2))?E=k:O=k,(_=w>=(b=(D+R)/2))?D=b:R=b,g=M,!(M=M[S=_<<1|T]))return this;if(!M.length)break;(g[S+1&3]||g[S+2&3]||g[S+3&3])&&(p=g,A=S)}for(;M.data!==m;)if(v=M,!(M=M.next))return this;return(y=M.next)&&delete M.next,v?(y?v.next=y:delete v.next,this):g?(y?g[S]=y:delete g[S],(M=g[0]||g[1]||g[2]||g[3])&&M===(g[3]||g[2]||g[1]||g[0])&&!M.length&&(p?p[A]=M:this._root=M),this):(this._root=y,this)},h.removeAll=function(m){for(var g=0,p=m.length;g1?0:Le<-1?g:Math.acos(Le)}function x(Le){return Le>=1?p:Le<=-1?-p:Math.asin(Le)}function w(Le){return Le.innerRadius}function k(Le){return Le.outerRadius}function b(Le){return Le.startAngle}function T(Le){return Le.endAngle}function _(Le){return Le&&Le.padAngle}function S(Le,Je,st,Et,It,Zt,Kt,Ht){var mn=st-Le,zn=Et-Je,pn=Kt-It,tn=Ht-Zt,nn=tn*mn-pn*zn;if(!(nn*nn<1e-12))return[Le+(nn=(pn*(Je-Zt)-tn*(Le-It))/nn)*mn,Je+nn*zn]}function A(Le,Je,st,Et,It,Zt,Kt){var Ht=Le-st,mn=Je-Et,zn=(Kt?Zt:-Zt)/m(Ht*Ht+mn*mn),pn=zn*mn,tn=-zn*Ht,nn=Le+pn,sn=Je+tn,gn=st+pn,bn=Et+tn,In=(nn+gn)/2,Hn=(sn+bn)/2,Wn=gn-nn,ar=bn-sn,Or=Wn*Wn+ar*ar,vr=It-Zt,Er=nn*bn-gn*sn,Kn=(ar<0?-1:1)*m(u(0,vr*vr*Or-Er*Er)),Ln=(Er*ar-Wn*Kn)/Or,lr=(-Er*Wn-ar*Kn)/Or,Wr=(Er*ar+Wn*Kn)/Or,Mn=(-Er*Wn+ar*Kn)/Or,rr=Ln-In,nr=lr-Hn,Bn=Wr-In,Fr=Mn-Hn;return rr*rr+nr*nr>Bn*Bn+Fr*Fr&&(Ln=Wr,lr=Mn),{cx:Ln,cy:lr,x01:-pn,y01:-tn,x11:Ln*(It/vr-1),y11:lr*(It/vr-1)}}function M(Le){this._context=Le}function E(Le){return new M(Le)}function D(Le){return Le[0]}function O(Le){return Le[1]}function R(){var Le=D,Je=O,st=l(!0),Et=null,It=E,Zt=null;function Kt(Ht){var mn,zn,pn,tn=Ht.length,nn=!1;for(Et==null&&(Zt=It(pn=a.path())),mn=0;mn<=tn;++mn)!(mn=nn;--sn)Ht.point(Wn[sn],ar[sn]);Ht.lineEnd(),Ht.areaEnd()}Hn&&(Wn[tn]=+Le(gn,tn,pn),ar[tn]=+st(gn,tn,pn),Ht.point(Je?+Je(gn,tn,pn):Wn[tn],Et?+Et(gn,tn,pn):ar[tn]))}if(bn)return Ht=null,bn+""||null}function zn(){return R().defined(It).curve(Kt).context(Zt)}return mn.x=function(pn){return arguments.length?(Le=typeof pn=="function"?pn:l(+pn),Je=null,mn):Le},mn.x0=function(pn){return arguments.length?(Le=typeof pn=="function"?pn:l(+pn),mn):Le},mn.x1=function(pn){return arguments.length?(Je=pn==null?null:typeof pn=="function"?pn:l(+pn),mn):Je},mn.y=function(pn){return arguments.length?(st=typeof pn=="function"?pn:l(+pn),Et=null,mn):st},mn.y0=function(pn){return arguments.length?(st=typeof pn=="function"?pn:l(+pn),mn):st},mn.y1=function(pn){return arguments.length?(Et=pn==null?null:typeof pn=="function"?pn:l(+pn),mn):Et},mn.lineX0=mn.lineY0=function(){return zn().x(Le).y(st)},mn.lineY1=function(){return zn().x(Le).y(Et)},mn.lineX1=function(){return zn().x(Je).y(st)},mn.defined=function(pn){return arguments.length?(It=typeof pn=="function"?pn:l(!!pn),mn):It},mn.curve=function(pn){return arguments.length?(Kt=pn,Zt!=null&&(Ht=Kt(Zt)),mn):Kt},mn.context=function(pn){return arguments.length?(pn==null?Zt=Ht=null:Ht=Kt(Zt=pn),mn):Zt},mn}function L(Le,Je){return JeLe?1:Je>=Le?0:NaN}function P(Le){return Le}M.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Le,Je){switch(Le=+Le,Je=+Je,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,Je):this._context.moveTo(Le,Je);break;case 1:this._point=2;default:this._context.lineTo(Le,Je)}}};var N=G(E);function B(Le){this._curve=Le}function G(Le){function Je(st){return new B(Le(st))}return Je._curve=Le,Je}function W(Le){var Je=Le.curve;return Le.angle=Le.x,delete Le.x,Le.radius=Le.y,delete Le.y,Le.curve=function(st){return arguments.length?Je(G(st)):Je()._curve},Le}function K(){return W(R().curve(N))}function te(){var Le=z().curve(N),Je=Le.curve,st=Le.lineX0,Et=Le.lineX1,It=Le.lineY0,Zt=Le.lineY1;return Le.angle=Le.x,delete Le.x,Le.startAngle=Le.x0,delete Le.x0,Le.endAngle=Le.x1,delete Le.x1,Le.radius=Le.y,delete Le.y,Le.innerRadius=Le.y0,delete Le.y0,Le.outerRadius=Le.y1,delete Le.y1,Le.lineStartAngle=function(){return W(st())},delete Le.lineX0,Le.lineEndAngle=function(){return W(Et())},delete Le.lineX1,Le.lineInnerRadius=function(){return W(It())},delete Le.lineY0,Le.lineOuterRadius=function(){return W(Zt())},delete Le.lineY1,Le.curve=function(Kt){return arguments.length?Je(G(Kt)):Je()._curve},Le}function Y(Le,Je){return[(Je=+Je)*Math.cos(Le-=Math.PI/2),Je*Math.sin(Le)]}B.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Le,Je){this._curve.point(Je*Math.sin(Le),Je*-Math.cos(Le))}};var Z=Array.prototype.slice;function re(Le){return Le.source}function U(Le){return Le.target}function q(Le){var Je=re,st=U,Et=D,It=O,Zt=null;function Kt(){var Ht,mn=Z.call(arguments),zn=Je.apply(this,mn),pn=st.apply(this,mn);if(Zt||(Zt=Ht=a.path()),Le(Zt,+Et.apply(this,(mn[0]=zn,mn)),+It.apply(this,mn),+Et.apply(this,(mn[0]=pn,mn)),+It.apply(this,mn)),Ht)return Zt=null,Ht+""||null}return Kt.source=function(Ht){return arguments.length?(Je=Ht,Kt):Je},Kt.target=function(Ht){return arguments.length?(st=Ht,Kt):st},Kt.x=function(Ht){return arguments.length?(Et=typeof Ht=="function"?Ht:l(+Ht),Kt):Et},Kt.y=function(Ht){return arguments.length?(It=typeof Ht=="function"?Ht:l(+Ht),Kt):It},Kt.context=function(Ht){return arguments.length?(Zt=Ht??null,Kt):Zt},Kt}function $(Le,Je,st,Et,It){Le.moveTo(Je,st),Le.bezierCurveTo(Je=(Je+Et)/2,st,Je,It,Et,It)}function ne(Le,Je,st,Et,It){Le.moveTo(Je,st),Le.bezierCurveTo(Je,st=(st+It)/2,Et,st,Et,It)}function H(Le,Je,st,Et,It){var Zt=Y(Je,st),Kt=Y(Je,st=(st+It)/2),Ht=Y(Et,st),mn=Y(Et,It);Le.moveTo(Zt[0],Zt[1]),Le.bezierCurveTo(Kt[0],Kt[1],Ht[0],Ht[1],mn[0],mn[1])}var Q={draw:function(Le,Je){var st=Math.sqrt(Je/g);Le.moveTo(st,0),Le.arc(0,0,st,0,v)}},ee={draw:function(Le,Je){var st=Math.sqrt(Je/5)/2;Le.moveTo(-3*st,-st),Le.lineTo(-st,-st),Le.lineTo(-st,-3*st),Le.lineTo(st,-3*st),Le.lineTo(st,-st),Le.lineTo(3*st,-st),Le.lineTo(3*st,st),Le.lineTo(st,st),Le.lineTo(st,3*st),Le.lineTo(-st,3*st),Le.lineTo(-st,st),Le.lineTo(-3*st,st),Le.closePath()}},ie=Math.sqrt(1/3),ae=2*ie,ue={draw:function(Le,Je){var st=Math.sqrt(Je/ae),Et=st*ie;Le.moveTo(0,-st),Le.lineTo(Et,0),Le.lineTo(0,st),Le.lineTo(-Et,0),Le.closePath()}},le=Math.sin(g/10)/Math.sin(7*g/10),ge=Math.sin(v/10)*le,fe=-Math.cos(v/10)*le,me={draw:function(Le,Je){var st=Math.sqrt(.8908130915292852*Je),Et=ge*st,It=fe*st;Le.moveTo(0,-st),Le.lineTo(Et,It);for(var Zt=1;Zt<5;++Zt){var Kt=v*Zt/5,Ht=Math.cos(Kt),mn=Math.sin(Kt);Le.lineTo(mn*st,-Ht*st),Le.lineTo(Ht*Et-mn*It,mn*Et+Ht*It)}Le.closePath()}},_e={draw:function(Le,Je){var st=Math.sqrt(Je),Et=-st/2;Le.rect(Et,Et,st,st)}},we=Math.sqrt(3),Te={draw:function(Le,Je){var st=-Math.sqrt(Je/(3*we));Le.moveTo(0,2*st),Le.lineTo(-we*st,-st),Le.lineTo(we*st,-st),Le.closePath()}},Oe=-.5,de=Math.sqrt(3)/2,ye=1/Math.sqrt(12),Me=3*(ye/2+1),ke={draw:function(Le,Je){var st=Math.sqrt(Je/Me),Et=st/2,It=st*ye,Zt=Et,Kt=st*ye+st,Ht=-Zt,mn=Kt;Le.moveTo(Et,It),Le.lineTo(Zt,Kt),Le.lineTo(Ht,mn),Le.lineTo(Oe*Et-de*It,de*Et+Oe*It),Le.lineTo(Oe*Zt-de*Kt,de*Zt+Oe*Kt),Le.lineTo(Oe*Ht-de*mn,de*Ht+Oe*mn),Le.lineTo(Oe*Et+de*It,Oe*It-de*Et),Le.lineTo(Oe*Zt+de*Kt,Oe*Kt-de*Zt),Le.lineTo(Oe*Ht+de*mn,Oe*mn-de*Ht),Le.closePath()}},Ee=[Q,ee,ue,_e,me,Te,ke];function ze(){}function Fe(Le,Je,st){Le._context.bezierCurveTo((2*Le._x0+Le._x1)/3,(2*Le._y0+Le._y1)/3,(Le._x0+2*Le._x1)/3,(Le._y0+2*Le._y1)/3,(Le._x0+4*Le._x1+Je)/6,(Le._y0+4*Le._y1+st)/6)}function Ve(Le){this._context=Le}function Ke(Le){this._context=Le}function Re(Le){this._context=Le}function qe(Le,Je){this._basis=new Ve(Le),this._beta=Je}Ve.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:Fe(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Le,Je){switch(Le=+Le,Je=+Je,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,Je):this._context.moveTo(Le,Je);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:Fe(this,Le,Je)}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=Je}},Ke.prototype={areaStart:ze,areaEnd:ze,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)}},point:function(Le,Je){switch(Le=+Le,Je=+Je,this._point){case 0:this._point=1,this._x2=Le,this._y2=Je;break;case 1:this._point=2,this._x3=Le,this._y3=Je;break;case 2:this._point=3,this._x4=Le,this._y4=Je,this._context.moveTo((this._x0+4*this._x1+Le)/6,(this._y0+4*this._y1+Je)/6);break;default:Fe(this,Le,Je)}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=Je}},Re.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(Le,Je){switch(Le=+Le,Je=+Je,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var st=(this._x0+4*this._x1+Le)/6,Et=(this._y0+4*this._y1+Je)/6;this._line?this._context.lineTo(st,Et):this._context.moveTo(st,Et);break;case 3:this._point=4;default:Fe(this,Le,Je)}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=Je}},qe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Le=this._x,Je=this._y,st=Le.length-1;if(st>0)for(var Et,It=Le[0],Zt=Je[0],Kt=Le[st]-It,Ht=Je[st]-Zt,mn=-1;++mn<=st;)Et=mn/st,this._basis.point(this._beta*Le[mn]+(1-this._beta)*(It+Et*Kt),this._beta*Je[mn]+(1-this._beta)*(Zt+Et*Ht));this._x=this._y=null,this._basis.lineEnd()},point:function(Le,Je){this._x.push(+Le),this._y.push(+Je)}};var We=function Le(Je){function st(Et){return Je===1?new Ve(Et):new qe(Et,Je)}return st.beta=function(Et){return Le(+Et)},st}(.85);function Ye(Le,Je,st){Le._context.bezierCurveTo(Le._x1+Le._k*(Le._x2-Le._x0),Le._y1+Le._k*(Le._y2-Le._y0),Le._x2+Le._k*(Le._x1-Je),Le._y2+Le._k*(Le._y1-st),Le._x2,Le._y2)}function nt(Le,Je){this._context=Le,this._k=(1-Je)/6}nt.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:Ye(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Le,Je){switch(Le=+Le,Je=+Je,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,Je):this._context.moveTo(Le,Je);break;case 1:this._point=2,this._x1=Le,this._y1=Je;break;case 2:this._point=3;default:Ye(this,Le,Je)}this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Je}};var ft=function Le(Je){function st(Et){return new nt(Et,Je)}return st.tension=function(Et){return Le(+Et)},st}(0);function vt(Le,Je){this._context=Le,this._k=(1-Je)/6}vt.prototype={areaStart:ze,areaEnd:ze,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)}},point:function(Le,Je){switch(Le=+Le,Je=+Je,this._point){case 0:this._point=1,this._x3=Le,this._y3=Je;break;case 1:this._point=2,this._context.moveTo(this._x4=Le,this._y4=Je);break;case 2:this._point=3,this._x5=Le,this._y5=Je;break;default:Ye(this,Le,Je)}this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Je}};var Pt=function Le(Je){function st(Et){return new vt(Et,Je)}return st.tension=function(Et){return Le(+Et)},st}(0);function At(Le,Je){this._context=Le,this._k=(1-Je)/6}At.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(Le,Je){switch(Le=+Le,Je=+Je,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:Ye(this,Le,Je)}this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Je}};var at=function Le(Je){function st(Et){return new At(Et,Je)}return st.tension=function(Et){return Le(+Et)},st}(0);function et(Le,Je,st){var Et=Le._x1,It=Le._y1,Zt=Le._x2,Kt=Le._y2;if(Le._l01_a>1e-12){var Ht=2*Le._l01_2a+3*Le._l01_a*Le._l12_a+Le._l12_2a,mn=3*Le._l01_a*(Le._l01_a+Le._l12_a);Et=(Et*Ht-Le._x0*Le._l12_2a+Le._x2*Le._l01_2a)/mn,It=(It*Ht-Le._y0*Le._l12_2a+Le._y2*Le._l01_2a)/mn}if(Le._l23_a>1e-12){var zn=2*Le._l23_2a+3*Le._l23_a*Le._l12_a+Le._l12_2a,pn=3*Le._l23_a*(Le._l23_a+Le._l12_a);Zt=(Zt*zn+Le._x1*Le._l23_2a-Je*Le._l12_2a)/pn,Kt=(Kt*zn+Le._y1*Le._l23_2a-st*Le._l12_2a)/pn}Le._context.bezierCurveTo(Et,It,Zt,Kt,Le._x2,Le._y2)}function Ot(Le,Je){this._context=Le,this._alpha=Je}Ot.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)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Le,Je){if(Le=+Le,Je=+Je,this._point){var st=this._x2-Le,Et=this._y2-Je;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(st*st+Et*Et,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,Je):this._context.moveTo(Le,Je);break;case 1:this._point=2;break;case 2:this._point=3;default:et(this,Le,Je)}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=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Je}};var Wt=function Le(Je){function st(Et){return Je?new Ot(Et,Je):new nt(Et,0)}return st.alpha=function(Et){return Le(+Et)},st}(.5);function Jt(Le,Je){this._context=Le,this._alpha=Je}Jt.prototype={areaStart:ze,areaEnd:ze,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)}},point:function(Le,Je){if(Le=+Le,Je=+Je,this._point){var st=this._x2-Le,Et=this._y2-Je;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(st*st+Et*Et,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Le,this._y3=Je;break;case 1:this._point=2,this._context.moveTo(this._x4=Le,this._y4=Je);break;case 2:this._point=3,this._x5=Le,this._y5=Je;break;default:et(this,Le,Je)}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=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Je}};var Be=function Le(Je){function st(Et){return Je?new Jt(Et,Je):new vt(Et,0)}return st.alpha=function(Et){return Le(+Et)},st}(.5);function Ge(Le,Je){this._context=Le,this._alpha=Je}Ge.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(Le,Je){if(Le=+Le,Je=+Je,this._point){var st=this._x2-Le,Et=this._y2-Je;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(st*st+Et*Et,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:et(this,Le,Je)}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=Le,this._y0=this._y1,this._y1=this._y2,this._y2=Je}};var Tt=function Le(Je){function st(Et){return Je?new Ge(Et,Je):new At(Et,0)}return st.alpha=function(Et){return Le(+Et)},st}(.5);function dt(Le){this._context=Le}function Pe(Le){return Le<0?-1:1}function Ie(Le,Je,st){var Et=Le._x1-Le._x0,It=Je-Le._x1,Zt=(Le._y1-Le._y0)/(Et||It<0&&-0),Kt=(st-Le._y1)/(It||Et<0&&-0),Ht=(Zt*It+Kt*Et)/(Et+It);return(Pe(Zt)+Pe(Kt))*Math.min(Math.abs(Zt),Math.abs(Kt),.5*Math.abs(Ht))||0}function Ae(Le,Je){var st=Le._x1-Le._x0;return st?(3*(Le._y1-Le._y0)/st-Je)/2:Je}function De(Le,Je,st){var Et=Le._x0,It=Le._y0,Zt=Le._x1,Kt=Le._y1,Ht=(Zt-Et)/3;Le._context.bezierCurveTo(Et+Ht,It+Ht*Je,Zt-Ht,Kt-Ht*st,Zt,Kt)}function He(Le){this._context=Le}function rt(Le){this._context=new lt(Le)}function lt(Le){this._context=Le}function ot(Le){this._context=Le}function kt(Le){var Je,st,Et=Le.length-1,It=new Array(Et),Zt=new Array(Et),Kt=new Array(Et);for(It[0]=0,Zt[0]=2,Kt[0]=Le[0]+2*Le[1],Je=1;Je=0;--Je)It[Je]=(Kt[Je]-It[Je+1])/Zt[Je];for(Zt[Et-1]=(Le[Et]+It[Et-1])/2,Je=0;Je1)for(var st,Et,It,Zt=1,Kt=Le[Je[0]],Ht=Kt.length;Zt=0;)st[Je]=Je;return st}function tt(Le,Je){return Le[Je]}function bt(Le){var Je=Le.map(zt);return Ut(Le).sort(function(st,Et){return Je[st]-Je[Et]})}function zt(Le){for(var Je,st=-1,Et=0,It=Le.length,Zt=-1/0;++stZt&&(Zt=Je,Et=st);return Et}function St(Le){var Je=Le.map(Dt);return Ut(Le).sort(function(st,Et){return Je[st]-Je[Et]})}function Dt(Le){for(var Je,st=0,Et=-1,It=Le.length;++Et=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Le,Je){switch(Le=+Le,Je=+Je,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,Je):this._context.moveTo(Le,Je);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,Je),this._context.lineTo(Le,Je);else{var st=this._x*(1-this._t)+Le*this._t;this._context.lineTo(st,this._y),this._context.lineTo(st,Je)}}this._x=Le,this._y=Je}},r.arc=function(){var Le=w,Je=k,st=l(0),Et=null,It=b,Zt=T,Kt=_,Ht=null;function mn(){var zn,pn,tn=+Le.apply(this,arguments),nn=+Je.apply(this,arguments),sn=It.apply(this,arguments)-p,gn=Zt.apply(this,arguments)-p,bn=c(gn-sn),In=gn>sn;if(Ht||(Ht=zn=a.path()),nn1e-12)if(bn>v-1e-12)Ht.moveTo(nn*s(sn),nn*h(sn)),Ht.arc(0,0,nn,sn,gn,!In),tn>1e-12&&(Ht.moveTo(tn*s(gn),tn*h(gn)),Ht.arc(0,0,tn,gn,sn,In));else{var Hn,Wn,ar=sn,Or=gn,vr=sn,Er=gn,Kn=bn,Ln=bn,lr=Kt.apply(this,arguments)/2,Wr=lr>1e-12&&(Et?+Et.apply(this,arguments):m(tn*tn+nn*nn)),Mn=d(c(nn-tn)/2,+st.apply(this,arguments)),rr=Mn,nr=Mn;if(Wr>1e-12){var Bn=x(Wr/tn*h(lr)),Fr=x(Wr/nn*h(lr));(Kn-=2*Bn)>1e-12?(vr+=Bn*=In?1:-1,Er-=Bn):(Kn=0,vr=Er=(sn+gn)/2),(Ln-=2*Fr)>1e-12?(ar+=Fr*=In?1:-1,Or-=Fr):(Ln=0,ar=Or=(sn+gn)/2)}var $r=nn*s(ar),pr=nn*h(ar),qr=tn*s(Er),_i=tn*h(Er);if(Mn>1e-12){var cn,jn=nn*s(Or),jt=nn*h(Or),fn=tn*s(vr),yn=tn*h(vr);if(bn1e-12?nr>1e-12?(Hn=A(fn,yn,$r,pr,nn,nr,In),Wn=A(jn,jt,qr,_i,nn,nr,In),Ht.moveTo(Hn.cx+Hn.x01,Hn.cy+Hn.y01),nr1e-12&&Kn>1e-12?rr>1e-12?(Hn=A(qr,_i,jn,jt,tn,-rr,In),Wn=A($r,pr,fn,yn,tn,-rr,In),Ht.lineTo(Hn.cx+Hn.x01,Hn.cy+Hn.y01),rr0&&(gn+=nn);for(Je!=null?bn.sort(function(vr,Er){return Je(In[vr],In[Er])}):st!=null&&bn.sort(function(vr,Er){return st(Ht[vr],Ht[Er])}),mn=0,pn=gn?(Wn-sn*Or)/gn:0;mn0?nn*pn:0)+Or,In[zn]={data:Ht[zn],index:mn,value:nn,startAngle:Hn,endAngle:tn,padAngle:ar};return In}return Kt.value=function(Ht){return arguments.length?(Le=typeof Ht=="function"?Ht:l(+Ht),Kt):Le},Kt.sortValues=function(Ht){return arguments.length?(Je=Ht,st=null,Kt):Je},Kt.sort=function(Ht){return arguments.length?(st=Ht,Je=null,Kt):st},Kt.startAngle=function(Ht){return arguments.length?(Et=typeof Ht=="function"?Ht:l(+Ht),Kt):Et},Kt.endAngle=function(Ht){return arguments.length?(It=typeof Ht=="function"?Ht:l(+Ht),Kt):It},Kt.padAngle=function(Ht){return arguments.length?(Zt=typeof Ht=="function"?Ht:l(+Ht),Kt):Zt},Kt},r.pointRadial=Y,r.radialArea=te,r.radialLine=K,r.stack=function(){var Le=l([]),Je=Ut,st=Vt,Et=tt;function It(Zt){var Kt,Ht,mn=Le.apply(this,arguments),zn=Zt.length,pn=mn.length,tn=new Array(pn);for(Kt=0;Kt0)for(var st,Et,It,Zt,Kt,Ht,mn=0,zn=Le[Je[0]].length;mn0?(Et[0]=Zt,Et[1]=Zt+=It):It<0?(Et[1]=Kt,Et[0]=Kt+=It):(Et[0]=0,Et[1]=It)},r.stackOffsetExpand=function(Le,Je){if((Et=Le.length)>0){for(var st,Et,It,Zt=0,Kt=Le[0].length;Zt0){for(var st,Et=0,It=Le[Je[0]],Zt=It.length;Et0&&(Et=(st=Le[Je[0]]).length)>0){for(var st,Et,It,Zt=0,Kt=1;Kt=12)]},q:function(Dt){return 1+~~(Dt.getMonth()/3)},Q:nt,s:ft,S:H,u:Q,U:ee,V:ie,w:ae,W:ue,x:null,X:null,y:le,Y:ge,Z:fe,"%":Ye},Ut={a:function(Dt){return Ge[Dt.getUTCDay()]},A:function(Dt){return Be[Dt.getUTCDay()]},b:function(Dt){return dt[Dt.getUTCMonth()]},B:function(Dt){return Tt[Dt.getUTCMonth()]},c:null,d:me,e:me,f:de,H:_e,I:we,j:Te,L:Oe,m:ye,M:Me,p:function(Dt){return Jt[+(Dt.getUTCHours()>=12)]},q:function(Dt){return 1+~~(Dt.getUTCMonth()/3)},Q:nt,s:ft,S:ke,u:Ee,U:ze,V:Fe,w:Ve,W:Ke,x:null,X:null,y:Re,Y:qe,Z:We,"%":Ye},tt={a:function(Dt,Le,Je){var st=He.exec(Le.slice(Je));return st?(Dt.w=rt[st[0].toLowerCase()],Je+st[0].length):-1},A:function(Dt,Le,Je){var st=Ae.exec(Le.slice(Je));return st?(Dt.w=De[st[0].toLowerCase()],Je+st[0].length):-1},b:function(Dt,Le,Je){var st=kt.exec(Le.slice(Je));return st?(Dt.m=wt[st[0].toLowerCase()],Je+st[0].length):-1},B:function(Dt,Le,Je){var st=lt.exec(Le.slice(Je));return st?(Dt.m=ot[st[0].toLowerCase()],Je+st[0].length):-1},c:function(Dt,Le,Je){return St(Dt,et,Le,Je)},d:O,e:O,f:B,H:z,I:z,j:R,L:N,m:D,M:L,p:function(Dt,Le,Je){var st=Pe.exec(Le.slice(Je));return st?(Dt.p=Ie[st[0].toLowerCase()],Je+st[0].length):-1},q:E,Q:W,s:K,S:P,u:k,U:b,V:T,w,W:_,x:function(Dt,Le,Je){return St(Dt,Ot,Le,Je)},X:function(Dt,Le,Je){return St(Dt,Wt,Le,Je)},y:A,Y:S,Z:M,"%":G};function bt(Dt,Le){return function(Je){var st,Et,It,Zt=[],Kt=-1,Ht=0,mn=Dt.length;for(Je instanceof Date||(Je=new Date(+Je));++Kt53)return null;"w"in It||(It.w=1),"Z"in It?(Et=(st=c(i(It.y,0,1))).getUTCDay(),st=Et>4||Et===0?a.utcMonday.ceil(st):a.utcMonday(st),st=a.utcDay.offset(st,7*(It.V-1)),It.y=st.getUTCFullYear(),It.m=st.getUTCMonth(),It.d=st.getUTCDate()+(It.w+6)%7):(Et=(st=l(i(It.y,0,1))).getDay(),st=Et>4||Et===0?a.timeMonday.ceil(st):a.timeMonday(st),st=a.timeDay.offset(st,7*(It.V-1)),It.y=st.getFullYear(),It.m=st.getMonth(),It.d=st.getDate()+(It.w+6)%7)}else("W"in It||"U"in It)&&("w"in It||(It.w="u"in It?It.u%7:"W"in It?1:0),Et="Z"in It?c(i(It.y,0,1)).getUTCDay():l(i(It.y,0,1)).getDay(),It.m=0,It.d="W"in It?(It.w+6)%7+7*It.W-(Et+5)%7:It.w+7*It.U-(Et+6)%7);return"Z"in It?(It.H+=It.Z/100|0,It.M+=It.Z%100,c(It)):l(It)}}function St(Dt,Le,Je,st){for(var Et,It,Zt=0,Kt=Le.length,Ht=Je.length;Zt=Ht)return-1;if((Et=Le.charCodeAt(Zt++))===37){if(Et=Le.charAt(Zt++),!(It=tt[Et in d?Le.charAt(Zt++):Et])||(st=It(Dt,Je,st))<0)return-1}else if(Et!=Je.charCodeAt(st++))return-1}return st}return Vt.x=bt(Ot,Vt),Vt.X=bt(Wt,Vt),Vt.c=bt(et,Vt),Ut.x=bt(Ot,Ut),Ut.X=bt(Wt,Ut),Ut.c=bt(et,Ut),{format:function(Dt){var Le=bt(Dt+="",Vt);return Le.toString=function(){return Dt},Le},parse:function(Dt){var Le=zt(Dt+="",!1);return Le.toString=function(){return Dt},Le},utcFormat:function(Dt){var Le=bt(Dt+="",Ut);return Le.toString=function(){return Dt},Le},utcParse:function(Dt){var Le=zt(Dt+="",!0);return Le.toString=function(){return Dt},Le}}}var u,d={"-":"",_:" ",0:"0"},h=/^\s*\d+/,m=/^%/,g=/[\\^$*+?|[\]().{}]/g;function p(at,et,Ot){var Wt=at<0?"-":"",Jt=(Wt?-at:at)+"",Be=Jt.length;return Wt+(Be68?1900:2e3),Ot+Wt[0].length):-1}function M(at,et,Ot){var Wt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(et.slice(Ot,Ot+6));return Wt?(at.Z=Wt[1]?0:-(Wt[2]+(Wt[3]||"00")),Ot+Wt[0].length):-1}function E(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+1));return Wt?(at.q=3*Wt[0]-3,Ot+Wt[0].length):-1}function D(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+2));return Wt?(at.m=Wt[0]-1,Ot+Wt[0].length):-1}function O(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+2));return Wt?(at.d=+Wt[0],Ot+Wt[0].length):-1}function R(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+3));return Wt?(at.m=0,at.d=+Wt[0],Ot+Wt[0].length):-1}function z(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+2));return Wt?(at.H=+Wt[0],Ot+Wt[0].length):-1}function L(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+2));return Wt?(at.M=+Wt[0],Ot+Wt[0].length):-1}function P(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+2));return Wt?(at.S=+Wt[0],Ot+Wt[0].length):-1}function N(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+3));return Wt?(at.L=+Wt[0],Ot+Wt[0].length):-1}function B(at,et,Ot){var Wt=h.exec(et.slice(Ot,Ot+6));return Wt?(at.L=Math.floor(Wt[0]/1e3),Ot+Wt[0].length):-1}function G(at,et,Ot){var Wt=m.exec(et.slice(Ot,Ot+1));return Wt?Ot+Wt[0].length:-1}function W(at,et,Ot){var Wt=h.exec(et.slice(Ot));return Wt?(at.Q=+Wt[0],Ot+Wt[0].length):-1}function K(at,et,Ot){var Wt=h.exec(et.slice(Ot));return Wt?(at.s=+Wt[0],Ot+Wt[0].length):-1}function te(at,et){return p(at.getDate(),et,2)}function Y(at,et){return p(at.getHours(),et,2)}function Z(at,et){return p(at.getHours()%12||12,et,2)}function re(at,et){return p(1+a.timeDay.count(a.timeYear(at),at),et,3)}function U(at,et){return p(at.getMilliseconds(),et,3)}function q(at,et){return U(at,et)+"000"}function $(at,et){return p(at.getMonth()+1,et,2)}function ne(at,et){return p(at.getMinutes(),et,2)}function H(at,et){return p(at.getSeconds(),et,2)}function Q(at){var et=at.getDay();return et===0?7:et}function ee(at,et){return p(a.timeSunday.count(a.timeYear(at)-1,at),et,2)}function ie(at,et){var Ot=at.getDay();return at=Ot>=4||Ot===0?a.timeThursday(at):a.timeThursday.ceil(at),p(a.timeThursday.count(a.timeYear(at),at)+(a.timeYear(at).getDay()===4),et,2)}function ae(at){return at.getDay()}function ue(at,et){return p(a.timeMonday.count(a.timeYear(at)-1,at),et,2)}function le(at,et){return p(at.getFullYear()%100,et,2)}function ge(at,et){return p(at.getFullYear()%1e4,et,4)}function fe(at){var et=at.getTimezoneOffset();return(et>0?"-":(et*=-1,"+"))+p(et/60|0,"0",2)+p(et%60,"0",2)}function me(at,et){return p(at.getUTCDate(),et,2)}function _e(at,et){return p(at.getUTCHours(),et,2)}function we(at,et){return p(at.getUTCHours()%12||12,et,2)}function Te(at,et){return p(1+a.utcDay.count(a.utcYear(at),at),et,3)}function Oe(at,et){return p(at.getUTCMilliseconds(),et,3)}function de(at,et){return Oe(at,et)+"000"}function ye(at,et){return p(at.getUTCMonth()+1,et,2)}function Me(at,et){return p(at.getUTCMinutes(),et,2)}function ke(at,et){return p(at.getUTCSeconds(),et,2)}function Ee(at){var et=at.getUTCDay();return et===0?7:et}function ze(at,et){return p(a.utcSunday.count(a.utcYear(at)-1,at),et,2)}function Fe(at,et){var Ot=at.getUTCDay();return at=Ot>=4||Ot===0?a.utcThursday(at):a.utcThursday.ceil(at),p(a.utcThursday.count(a.utcYear(at),at)+(a.utcYear(at).getUTCDay()===4),et,2)}function Ve(at){return at.getUTCDay()}function Ke(at,et){return p(a.utcMonday.count(a.utcYear(at)-1,at),et,2)}function Re(at,et){return p(at.getUTCFullYear()%100,et,2)}function qe(at,et){return p(at.getUTCFullYear()%1e4,et,4)}function We(){return"+0000"}function Ye(){return"%"}function nt(at){return+at}function ft(at){return Math.floor(+at/1e3)}function vt(at){return u=s(at),r.timeFormat=u.format,r.timeParse=u.parse,r.utcFormat=u.utcFormat,r.utcParse=u.utcParse,u}vt({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"]});var Pt=Date.prototype.toISOString?function(at){return at.toISOString()}:r.utcFormat("%Y-%m-%dT%H:%M:%S.%LZ"),At=+new Date("2000-01-01T00:00:00.000Z")?function(at){var et=new Date(at);return isNaN(et)?null:et}:r.utcParse("%Y-%m-%dT%H:%M:%S.%LZ");r.isoFormat=Pt,r.isoParse=At,r.timeFormatDefaultLocale=vt,r.timeFormatLocale=s,Object.defineProperty(r,"__esModule",{value:!0})})},{"d3-time":121}],121:[function(e,o,f){(function(r,a){a(typeof f=="object"&&o!==void 0?f:(r=r||self).d3=r.d3||{})})(this,function(r){var a=new Date,l=new Date;function c(ye,Me,ke,Ee){function ze(Fe){return ye(Fe=arguments.length===0?new Date:new Date(+Fe)),Fe}return ze.floor=function(Fe){return ye(Fe=new Date(+Fe)),Fe},ze.ceil=function(Fe){return ye(Fe=new Date(Fe-1)),Me(Fe,1),ye(Fe),Fe},ze.round=function(Fe){var Ve=ze(Fe),Ke=ze.ceil(Fe);return Fe-Ve0))return qe;do qe.push(Re=new Date(+Fe)),Me(Fe,Ke),ye(Fe);while(Re=Ve)for(;ye(Ve),!Fe(Ve);)Ve.setTime(Ve-1)},function(Ve,Ke){if(Ve>=Ve)if(Ke<0)for(;++Ke<=0;)for(;Me(Ve,-1),!Fe(Ve););else for(;--Ke>=0;)for(;Me(Ve,1),!Fe(Ve););})},ke&&(ze.count=function(Fe,Ve){return a.setTime(+Fe),l.setTime(+Ve),ye(a),ye(l),Math.floor(ke(a,l))},ze.every=function(Fe){return Fe=Math.floor(Fe),isFinite(Fe)&&Fe>0?Fe>1?ze.filter(Ee?function(Ve){return Ee(Ve)%Fe==0}:function(Ve){return ze.count(0,Ve)%Fe==0}):ze:null}),ze}var i=c(function(){},function(ye,Me){ye.setTime(+ye+Me)},function(ye,Me){return Me-ye});i.every=function(ye){return ye=Math.floor(ye),isFinite(ye)&&ye>0?ye>1?c(function(Me){Me.setTime(Math.floor(Me/ye)*ye)},function(Me,ke){Me.setTime(+Me+ke*ye)},function(Me,ke){return(ke-Me)/ye}):i:null};var s=i.range,u=c(function(ye){ye.setTime(ye-ye.getMilliseconds())},function(ye,Me){ye.setTime(+ye+1e3*Me)},function(ye,Me){return(Me-ye)/1e3},function(ye){return ye.getUTCSeconds()}),d=u.range,h=c(function(ye){ye.setTime(ye-ye.getMilliseconds()-1e3*ye.getSeconds())},function(ye,Me){ye.setTime(+ye+6e4*Me)},function(ye,Me){return(Me-ye)/6e4},function(ye){return ye.getMinutes()}),m=h.range,g=c(function(ye){ye.setTime(ye-ye.getMilliseconds()-1e3*ye.getSeconds()-6e4*ye.getMinutes())},function(ye,Me){ye.setTime(+ye+36e5*Me)},function(ye,Me){return(Me-ye)/36e5},function(ye){return ye.getHours()}),p=g.range,v=c(function(ye){ye.setHours(0,0,0,0)},function(ye,Me){ye.setDate(ye.getDate()+Me)},function(ye,Me){return(Me-ye-6e4*(Me.getTimezoneOffset()-ye.getTimezoneOffset()))/864e5},function(ye){return ye.getDate()-1}),y=v.range;function x(ye){return c(function(Me){Me.setDate(Me.getDate()-(Me.getDay()+7-ye)%7),Me.setHours(0,0,0,0)},function(Me,ke){Me.setDate(Me.getDate()+7*ke)},function(Me,ke){return(ke-Me-6e4*(ke.getTimezoneOffset()-Me.getTimezoneOffset()))/6048e5})}var w=x(0),k=x(1),b=x(2),T=x(3),_=x(4),S=x(5),A=x(6),M=w.range,E=k.range,D=b.range,O=T.range,R=_.range,z=S.range,L=A.range,P=c(function(ye){ye.setDate(1),ye.setHours(0,0,0,0)},function(ye,Me){ye.setMonth(ye.getMonth()+Me)},function(ye,Me){return Me.getMonth()-ye.getMonth()+12*(Me.getFullYear()-ye.getFullYear())},function(ye){return ye.getMonth()}),N=P.range,B=c(function(ye){ye.setMonth(0,1),ye.setHours(0,0,0,0)},function(ye,Me){ye.setFullYear(ye.getFullYear()+Me)},function(ye,Me){return Me.getFullYear()-ye.getFullYear()},function(ye){return ye.getFullYear()});B.every=function(ye){return isFinite(ye=Math.floor(ye))&&ye>0?c(function(Me){Me.setFullYear(Math.floor(Me.getFullYear()/ye)*ye),Me.setMonth(0,1),Me.setHours(0,0,0,0)},function(Me,ke){Me.setFullYear(Me.getFullYear()+ke*ye)}):null};var G=B.range,W=c(function(ye){ye.setUTCSeconds(0,0)},function(ye,Me){ye.setTime(+ye+6e4*Me)},function(ye,Me){return(Me-ye)/6e4},function(ye){return ye.getUTCMinutes()}),K=W.range,te=c(function(ye){ye.setUTCMinutes(0,0,0)},function(ye,Me){ye.setTime(+ye+36e5*Me)},function(ye,Me){return(Me-ye)/36e5},function(ye){return ye.getUTCHours()}),Y=te.range,Z=c(function(ye){ye.setUTCHours(0,0,0,0)},function(ye,Me){ye.setUTCDate(ye.getUTCDate()+Me)},function(ye,Me){return(Me-ye)/864e5},function(ye){return ye.getUTCDate()-1}),re=Z.range;function U(ye){return c(function(Me){Me.setUTCDate(Me.getUTCDate()-(Me.getUTCDay()+7-ye)%7),Me.setUTCHours(0,0,0,0)},function(Me,ke){Me.setUTCDate(Me.getUTCDate()+7*ke)},function(Me,ke){return(ke-Me)/6048e5})}var q=U(0),$=U(1),ne=U(2),H=U(3),Q=U(4),ee=U(5),ie=U(6),ae=q.range,ue=$.range,le=ne.range,ge=H.range,fe=Q.range,me=ee.range,_e=ie.range,we=c(function(ye){ye.setUTCDate(1),ye.setUTCHours(0,0,0,0)},function(ye,Me){ye.setUTCMonth(ye.getUTCMonth()+Me)},function(ye,Me){return Me.getUTCMonth()-ye.getUTCMonth()+12*(Me.getUTCFullYear()-ye.getUTCFullYear())},function(ye){return ye.getUTCMonth()}),Te=we.range,Oe=c(function(ye){ye.setUTCMonth(0,1),ye.setUTCHours(0,0,0,0)},function(ye,Me){ye.setUTCFullYear(ye.getUTCFullYear()+Me)},function(ye,Me){return Me.getUTCFullYear()-ye.getUTCFullYear()},function(ye){return ye.getUTCFullYear()});Oe.every=function(ye){return isFinite(ye=Math.floor(ye))&&ye>0?c(function(Me){Me.setUTCFullYear(Math.floor(Me.getUTCFullYear()/ye)*ye),Me.setUTCMonth(0,1),Me.setUTCHours(0,0,0,0)},function(Me,ke){Me.setUTCFullYear(Me.getUTCFullYear()+ke*ye)}):null};var de=Oe.range;r.timeDay=v,r.timeDays=y,r.timeFriday=S,r.timeFridays=z,r.timeHour=g,r.timeHours=p,r.timeInterval=c,r.timeMillisecond=i,r.timeMilliseconds=s,r.timeMinute=h,r.timeMinutes=m,r.timeMonday=k,r.timeMondays=E,r.timeMonth=P,r.timeMonths=N,r.timeSaturday=A,r.timeSaturdays=L,r.timeSecond=u,r.timeSeconds=d,r.timeSunday=w,r.timeSundays=M,r.timeThursday=_,r.timeThursdays=R,r.timeTuesday=b,r.timeTuesdays=D,r.timeWednesday=T,r.timeWednesdays=O,r.timeWeek=w,r.timeWeeks=M,r.timeYear=B,r.timeYears=G,r.utcDay=Z,r.utcDays=re,r.utcFriday=ee,r.utcFridays=me,r.utcHour=te,r.utcHours=Y,r.utcMillisecond=i,r.utcMilliseconds=s,r.utcMinute=W,r.utcMinutes=K,r.utcMonday=$,r.utcMondays=ue,r.utcMonth=we,r.utcMonths=Te,r.utcSaturday=ie,r.utcSaturdays=_e,r.utcSecond=u,r.utcSeconds=d,r.utcSunday=q,r.utcSundays=ae,r.utcThursday=Q,r.utcThursdays=fe,r.utcTuesday=ne,r.utcTuesdays=le,r.utcWednesday=H,r.utcWednesdays=ge,r.utcWeek=q,r.utcWeeks=ae,r.utcYear=Oe,r.utcYears=de,Object.defineProperty(r,"__esModule",{value:!0})})},{}],122:[function(e,o,f){arguments[4][121][0].apply(f,arguments)},{dup:121}],123:[function(e,o,f){(function(r,a){a(typeof f=="object"&&o!==void 0?f:(r=r||self).d3=r.d3||{})})(this,function(r){var a,l,c=0,i=0,s=0,u=0,d=0,h=0,m=typeof performance=="object"&&performance.now?performance:Date,g=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(_){setTimeout(_,17)};function p(){return d||(g(v),d=m.now()+h)}function v(){d=0}function y(){this._call=this._time=this._next=null}function x(_,S,A){var M=new y;return M.restart(_,S,A),M}function w(){p(),++c;for(var _,S=a;S;)(_=d-S._time)>=0&&S._call.call(null,_),S=S._next;--c}function k(){d=(u=m.now())+h,c=i=0;try{w()}finally{c=0,function(){for(var _,S,A=a,M=1/0;A;)A._call?(M>A._time&&(M=A._time),_=A,A=A._next):(S=A._next,A._next=null,A=_?_._next=S:a=S);l=_,T(M)}(),d=0}}function b(){var _=m.now(),S=_-u;S>1e3&&(h-=S,u=_)}function T(_){c||(i&&(i=clearTimeout(i)),_-d>24?(_<1/0&&(i=setTimeout(k,_-m.now()-h)),s&&(s=clearInterval(s))):(s||(u=m.now(),s=setInterval(b,1e3)),c=1,g(k)))}y.prototype=x.prototype={constructor:y,restart:function(_,S,A){if(typeof _!="function")throw new TypeError("callback is not a function");A=(A==null?p():+A)+(S==null?0:+S),this._next||l===this||(l?l._next=this:a=this,l=this),this._call=_,this._time=A,T()},stop:function(){this._call&&(this._call=null,this._time=1/0,T())}},r.interval=function(_,S,A){var M=new y,E=S;return S==null?(M.restart(_,S,A),M):(S=+S,A=A==null?p():+A,M.restart(function D(O){O+=E,M.restart(D,E+=S,A),_(O)},S,A),M)},r.now=p,r.timeout=function(_,S,A){var M=new y;return S=S==null?0:+S,M.restart(function(E){M.stop(),_(E+S)},S,A),M},r.timer=x,r.timerFlush=w,Object.defineProperty(r,"__esModule",{value:!0})})},{}],124:[function(e,o,f){o.exports=function(){for(var r=0;rh*m){var x=(y-v)/h;d[p]=1e3*x}}return d}function c(i){for(var s=[],u=i[0];u<=i[1];u++)for(var d=String.fromCharCode(u),h=i[0];h0)return function(l,c){var i,s;for(i=new Array(l),s=0;s80*L){P=B=R[0],N=G=R[1];for(var q=L;qB&&(B=W),K>G&&(G=K);te=(te=Math.max(B-P,G-N))!==0?1/te:0}return c(re,U,L,P,N,te),U}function a(R,z,L,P,N){var B,G;if(N===O(R,z,L,P)>0)for(B=z;B=z;B-=P)G=M(B,R[B],R[B+1],G);return G&&k(G,G.next)&&(E(G),G=G.next),G}function l(R,z){if(!R)return R;z||(z=R);var L,P=R;do if(L=!1,P.steiner||!k(P,P.next)&&w(P.prev,P,P.next)!==0)P=P.next;else{if(E(P),(P=z=P.prev)===P.next)break;L=!0}while(L||P!==z);return z}function c(R,z,L,P,N,B,G){if(R){!G&&B&&function(Y,Z,re,U){var q=Y;do q.z===null&&(q.z=p(q.x,q.y,Z,re,U)),q.prevZ=q.prev,q.nextZ=q.next,q=q.next;while(q!==Y);q.prevZ.nextZ=null,q.prevZ=null,function($){var ne,H,Q,ee,ie,ae,ue,le,ge=1;do{for(H=$,$=null,ie=null,ae=0;H;){for(ae++,Q=H,ue=0,ne=0;ne0||le>0&&Q;)ue!==0&&(le===0||!Q||H.z<=Q.z)?(ee=H,H=H.nextZ,ue--):(ee=Q,Q=Q.nextZ,le--),ie?ie.nextZ=ee:$=ee,ee.prevZ=ie,ie=ee;H=Q}ie.nextZ=null,ge*=2}while(ae>1)}(q)}(R,P,N,B);for(var W,K,te=R;R.prev!==R.next;)if(W=R.prev,K=R.next,B?s(R,P,N,B):i(R))z.push(W.i/L),z.push(R.i/L),z.push(K.i/L),E(R),R=K.next,te=K.next;else if((R=K)===te){G?G===1?c(R=u(l(R),z,L),z,L,P,N,B,2):G===2&&d(R,z,L,P,N,B):c(l(R),z,L,P,N,B,1);break}}}function i(R){var z=R.prev,L=R,P=R.next;if(w(z,L,P)>=0)return!1;for(var N=R.next.next;N!==R.prev;){if(y(z.x,z.y,L.x,L.y,P.x,P.y,N.x,N.y)&&w(N.prev,N,N.next)>=0)return!1;N=N.next}return!0}function s(R,z,L,P){var N=R.prev,B=R,G=R.next;if(w(N,B,G)>=0)return!1;for(var W=N.xB.x?N.x>G.x?N.x:G.x:B.x>G.x?B.x:G.x,Y=N.y>B.y?N.y>G.y?N.y:G.y:B.y>G.y?B.y:G.y,Z=p(W,K,z,L,P),re=p(te,Y,z,L,P),U=R.prevZ,q=R.nextZ;U&&U.z>=Z&&q&&q.z<=re;){if(U!==R.prev&&U!==R.next&&y(N.x,N.y,B.x,B.y,G.x,G.y,U.x,U.y)&&w(U.prev,U,U.next)>=0||(U=U.prevZ,q!==R.prev&&q!==R.next&&y(N.x,N.y,B.x,B.y,G.x,G.y,q.x,q.y)&&w(q.prev,q,q.next)>=0))return!1;q=q.nextZ}for(;U&&U.z>=Z;){if(U!==R.prev&&U!==R.next&&y(N.x,N.y,B.x,B.y,G.x,G.y,U.x,U.y)&&w(U.prev,U,U.next)>=0)return!1;U=U.prevZ}for(;q&&q.z<=re;){if(q!==R.prev&&q!==R.next&&y(N.x,N.y,B.x,B.y,G.x,G.y,q.x,q.y)&&w(q.prev,q,q.next)>=0)return!1;q=q.nextZ}return!0}function u(R,z,L){var P=R;do{var N=P.prev,B=P.next.next;!k(N,B)&&b(N,P,P.next,B)&&S(N,B)&&S(B,N)&&(z.push(N.i/L),z.push(P.i/L),z.push(B.i/L),E(P),E(P.next),P=R=B),P=P.next}while(P!==R);return l(P)}function d(R,z,L,P,N,B){var G=R;do{for(var W=G.next.next;W!==G.prev;){if(G.i!==W.i&&x(G,W)){var K=A(G,W);return G=l(G,G.next),K=l(K,K.next),c(G,z,L,P,N,B),void c(K,z,L,P,N,B)}W=W.next}G=G.next}while(G!==R)}function h(R,z){return R.x-z.x}function m(R,z){if(z=function(P,N){var B,G=N,W=P.x,K=P.y,te=-1/0;do{if(K<=G.y&&K>=G.next.y&&G.next.y!==G.y){var Y=G.x+(K-G.y)*(G.next.x-G.x)/(G.next.y-G.y);if(Y<=W&&Y>te){if(te=Y,Y===W){if(K===G.y)return G;if(K===G.next.y)return G.next}B=G.x=G.x&&G.x>=U&&W!==G.x&&y(KB.x||G.x===B.x&&g(B,G)))&&(B=G,$=Z)),G=G.next;while(G!==re);return B}(R,z)){var L=A(z,R);l(z,z.next),l(L,L.next)}}function g(R,z){return w(R.prev,R,z.prev)<0&&w(z.next,R,R.next)<0}function p(R,z,L,P,N){return(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=32767*(R-L)*N)|R<<8))|R<<4))|R<<2))|R<<1))|(z=1431655765&((z=858993459&((z=252645135&((z=16711935&((z=32767*(z-P)*N)|z<<8))|z<<4))|z<<2))|z<<1))<<1}function v(R){var z=R,L=R;do(z.x=0&&(R-G)*(P-W)-(L-G)*(z-W)>=0&&(L-G)*(B-W)-(N-G)*(P-W)>=0}function x(R,z){return R.next.i!==z.i&&R.prev.i!==z.i&&!function(L,P){var N=L;do{if(N.i!==L.i&&N.next.i!==L.i&&N.i!==P.i&&N.next.i!==P.i&&b(N,N.next,L,P))return!0;N=N.next}while(N!==L);return!1}(R,z)&&(S(R,z)&&S(z,R)&&function(L,P){var N=L,B=!1,G=(L.x+P.x)/2,W=(L.y+P.y)/2;do N.y>W!=N.next.y>W&&N.next.y!==N.y&&G<(N.next.x-N.x)*(W-N.y)/(N.next.y-N.y)+N.x&&(B=!B),N=N.next;while(N!==L);return B}(R,z)&&(w(R.prev,R,z.prev)||w(R,z.prev,z))||k(R,z)&&w(R.prev,R,R.next)>0&&w(z.prev,z,z.next)>0)}function w(R,z,L){return(z.y-R.y)*(L.x-z.x)-(z.x-R.x)*(L.y-z.y)}function k(R,z){return R.x===z.x&&R.y===z.y}function b(R,z,L,P){var N=_(w(R,z,L)),B=_(w(R,z,P)),G=_(w(L,P,R)),W=_(w(L,P,z));return N!==B&&G!==W||!(N!==0||!T(R,L,z))||!(B!==0||!T(R,P,z))||!(G!==0||!T(L,R,P))||!(W!==0||!T(L,z,P))}function T(R,z,L){return z.x<=Math.max(R.x,L.x)&&z.x>=Math.min(R.x,L.x)&&z.y<=Math.max(R.y,L.y)&&z.y>=Math.min(R.y,L.y)}function _(R){return R>0?1:R<0?-1:0}function S(R,z){return w(R.prev,R,R.next)<0?w(R,z,R.next)>=0&&w(R,R.prev,z)>=0:w(R,z,R.prev)<0||w(R,R.next,z)<0}function A(R,z){var L=new D(R.i,R.x,R.y),P=new D(z.i,z.x,z.y),N=R.next,B=z.prev;return R.next=z,z.prev=R,L.next=N,N.prev=L,P.next=L,L.prev=P,B.next=P,P.prev=B,P}function M(R,z,L,P){var N=new D(R,z,L);return P?(N.next=P.next,N.prev=P,P.next.prev=N,P.next=N):(N.prev=N,N.next=N),N}function E(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function D(R,z,L){this.i=R,this.x=z,this.y=L,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function O(R,z,L,P){for(var N=0,B=z,G=L-P;B0&&(P+=R[N-1].length,L.holes.push(P))}return L}},{}],130:[function(e,o,f){var r=e("strongly-connected-components");o.exports=function(a,l){var c,i=[],s=[],u=[],d={},h=[];function m(b){var T,_,S=!1;for(s.push(b),u[b]=!0,T=0;T=D})})(b);for(var T,_=r(a).components.filter(function(D){return D.length>1}),S=1/0,A=0;A<_.length;A++)for(var M=0;M<_[A].length;M++)_[A][M]=55296&&T<=56319&&(M+=v[++x]),M=E?m.call(E,D,M,w):M,y?(g.value=M,p(k,w,g)):k[w]=M,++w;b=w}}if(b===void 0)for(b=c(v.length),y&&(k=new y(b)),x=0;x0?1:-1}},{}],141:[function(e,o,f){var r=e("../math/sign"),a=Math.abs,l=Math.floor;o.exports=function(c){return isNaN(c)?0:(c=Number(c))!==0&&isFinite(c)?r(c)*l(a(c)):c}},{"../math/sign":138}],142:[function(e,o,f){var r=e("./to-integer"),a=Math.max;o.exports=function(l){return a(0,r(l))}},{"./to-integer":141}],143:[function(e,o,f){var r=e("./valid-callable"),a=e("./valid-value"),l=Function.prototype.bind,c=Function.prototype.call,i=Object.keys,s=Object.prototype.propertyIsEnumerable;o.exports=function(u,d){return function(h,m){var g,p=arguments[2],v=arguments[3];return h=Object(a(h)),r(m),g=i(h),v&&g.sort(typeof v=="function"?l.call(v,h):void 0),typeof u!="function"&&(u=g[u]),c.call(u,g,function(y,x){return s.call(h,y)?c.call(m,p,h[y],y,h,x):d})}}},{"./valid-callable":160,"./valid-value":162}],144:[function(e,o,f){o.exports=e("./is-implemented")()?Object.assign:e("./shim")},{"./is-implemented":145,"./shim":146}],145:[function(e,o,f){o.exports=function(){var r,a=Object.assign;return typeof a=="function"&&(a(r={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),r.foo+r.bar+r.trzy==="razdwatrzy")}},{}],146:[function(e,o,f){var r=e("../keys"),a=e("../valid-value"),l=Math.max;o.exports=function(c,i){var s,u,d,h=l(arguments.length,2);for(c=Object(a(c)),d=function(m){try{c[m]=i[m]}catch(g){s||(s=g)}},u=1;u-1}},{}],166:[function(e,o,f){var r=Object.prototype.toString,a=r.call("");o.exports=function(l){return typeof l=="string"||l&&typeof l=="object"&&(l instanceof String||r.call(l)===a)||!1}},{}],167:[function(e,o,f){var r=Object.create(null),a=Math.random;o.exports=function(){var l;do l=a().toString(36).slice(2);while(r[l]);return l}},{}],168:[function(e,o,f){var r,a=e("es5-ext/object/set-prototype-of"),l=e("es5-ext/string/#/contains"),c=e("d"),i=e("es6-symbol"),s=e("./"),u=Object.defineProperty;r=o.exports=function(d,h){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");s.call(this,d),h=h?l.call(h,"key+value")?"key+value":l.call(h,"key")?"key":"value":"value",u(this,"__kind__",c("",h))},a&&a(r,s),delete r.prototype.constructor,r.prototype=Object.create(s.prototype,{_resolve:c(function(d){return this.__kind__==="value"?this.__list__[d]:this.__kind__==="key+value"?[d,this.__list__[d]]:d})}),u(r.prototype,i.toStringTag,c("c","Array Iterator"))},{"./":171,d:106,"es5-ext/object/set-prototype-of":157,"es5-ext/string/#/contains":163,"es6-symbol":175}],169:[function(e,o,f){var r=e("es5-ext/function/is-arguments"),a=e("es5-ext/object/valid-callable"),l=e("es5-ext/string/is-string"),c=e("./get"),i=Array.isArray,s=Function.prototype.call,u=Array.prototype.some;o.exports=function(d,h){var m,g,p,v,y,x,w,k,b=arguments[2];if(i(d)||r(d)?m="array":l(d)?m="string":d=c(d),a(h),p=function(){v=!0},m!=="array")if(m!=="string")for(g=d.next();!g.done;){if(s.call(h,b,g.value,p),v)return;g=d.next()}else for(x=d.length,y=0;y=55296&&k<=56319&&(w+=d[++y]),s.call(h,b,w,p),!v);++y);else u.call(d,function(T){return s.call(h,b,T,p),v})}},{"./get":170,"es5-ext/function/is-arguments":135,"es5-ext/object/valid-callable":160,"es5-ext/string/is-string":166}],170:[function(e,o,f){var r=e("es5-ext/function/is-arguments"),a=e("es5-ext/string/is-string"),l=e("./array"),c=e("./string"),i=e("./valid-iterable"),s=e("es6-symbol").iterator;o.exports=function(u){return typeof i(u)[s]=="function"?u[s]():r(u)?new l(u):a(u)?new c(u):new l(u)}},{"./array":168,"./string":173,"./valid-iterable":174,"es5-ext/function/is-arguments":135,"es5-ext/string/is-string":166,"es6-symbol":175}],171:[function(e,o,f){var r,a=e("es5-ext/array/#/clear"),l=e("es5-ext/object/assign"),c=e("es5-ext/object/valid-callable"),i=e("es5-ext/object/valid-value"),s=e("d"),u=e("d/auto-bind"),d=e("es6-symbol"),h=Object.defineProperty,m=Object.defineProperties;o.exports=r=function(g,p){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");m(this,{__list__:s("w",i(g)),__context__:s("w",p),__nextIndex__:s("w",0)}),p&&(c(p.on),p.on("_add",this._onAdd),p.on("_delete",this._onDelete),p.on("_clear",this._onClear))},delete r.prototype.constructor,m(r.prototype,l({_next:s(function(){var g;if(this.__list__)return this.__redo__&&(g=this.__redo__.shift())!==void 0?g:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(p,v){p>=g&&(this.__redo__[v]=++p)},this),this.__redo__.push(g)):h(this,"__redo__",s("c",[g])))}),_onDelete:s(function(g){var p;g>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&((p=this.__redo__.indexOf(g))!==-1&&this.__redo__.splice(p,1),this.__redo__.forEach(function(v,y){v>g&&(this.__redo__[y]=--v)},this)))}),_onClear:s(function(){this.__redo__&&a.call(this.__redo__),this.__nextIndex__=0})}))),h(r.prototype,d.iterator,s(function(){return this}))},{d:106,"d/auto-bind":105,"es5-ext/array/#/clear":131,"es5-ext/object/assign":144,"es5-ext/object/valid-callable":160,"es5-ext/object/valid-value":162,"es6-symbol":175}],172:[function(e,o,f){var r=e("es5-ext/function/is-arguments"),a=e("es5-ext/object/is-value"),l=e("es5-ext/string/is-string"),c=e("es6-symbol").iterator,i=Array.isArray;o.exports=function(s){return!!a(s)&&(!!i(s)||!!l(s)||!!r(s)||typeof s[c]=="function")}},{"es5-ext/function/is-arguments":135,"es5-ext/object/is-value":151,"es5-ext/string/is-string":166,"es6-symbol":175}],173:[function(e,o,f){var r,a=e("es5-ext/object/set-prototype-of"),l=e("d"),c=e("es6-symbol"),i=e("./"),s=Object.defineProperty;r=o.exports=function(u){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");u=String(u),i.call(this,u),s(this,"__length__",l("",u.length))},a&&a(r,i),delete r.prototype.constructor,r.prototype=Object.create(i.prototype,{_next:l(function(){if(this.__list__)return this.__nextIndex__=55296&&d<=56319?h+this.__list__[this.__nextIndex__++]:h})}),s(r.prototype,c.toStringTag,l("c","String Iterator"))},{"./":171,d:106,"es5-ext/object/set-prototype-of":157,"es6-symbol":175}],174:[function(e,o,f){var r=e("./is-iterable");o.exports=function(a){if(!r(a))throw new TypeError(a+" is not iterable");return a}},{"./is-iterable":172}],175:[function(e,o,f){o.exports=e("./is-implemented")()?e("ext/global-this").Symbol:e("./polyfill")},{"./is-implemented":176,"./polyfill":181,"ext/global-this":188}],176:[function(e,o,f){var r=e("ext/global-this"),a={object:!0,symbol:!0};o.exports=function(){var l,c=r.Symbol;if(typeof c!="function")return!1;l=c("test symbol");try{String(l)}catch{return!1}return!!a[typeof c.iterator]&&!!a[typeof c.toPrimitive]&&!!a[typeof c.toStringTag]}},{"ext/global-this":188}],177:[function(e,o,f){o.exports=function(r){return!!r&&(typeof r=="symbol"||!!r.constructor&&r.constructor.name==="Symbol"&&r[r.constructor.toStringTag]==="Symbol")}},{}],178:[function(e,o,f){var r=e("d"),a=Object.create,l=Object.defineProperty,c=Object.prototype,i=a(null);o.exports=function(s){for(var u,d,h=0;i[s+(h||"")];)++h;return i[s+=h||""]=!0,l(c,u="@@"+s,r.gs(null,function(m){d||(d=!0,l(this,u,r(m)),d=!1)})),u}},{d:106}],179:[function(e,o,f){var r=e("d"),a=e("ext/global-this").Symbol;o.exports=function(l){return Object.defineProperties(l,{hasInstance:r("",a&&a.hasInstance||l("hasInstance")),isConcatSpreadable:r("",a&&a.isConcatSpreadable||l("isConcatSpreadable")),iterator:r("",a&&a.iterator||l("iterator")),match:r("",a&&a.match||l("match")),replace:r("",a&&a.replace||l("replace")),search:r("",a&&a.search||l("search")),species:r("",a&&a.species||l("species")),split:r("",a&&a.split||l("split")),toPrimitive:r("",a&&a.toPrimitive||l("toPrimitive")),toStringTag:r("",a&&a.toStringTag||l("toStringTag")),unscopables:r("",a&&a.unscopables||l("unscopables"))})}},{d:106,"ext/global-this":188}],180:[function(e,o,f){var r=e("d"),a=e("../../../validate-symbol"),l=Object.create(null);o.exports=function(c){return Object.defineProperties(c,{for:r(function(i){return l[i]?l[i]:l[i]=c(String(i))}),keyFor:r(function(i){var s;for(s in a(i),l)if(l[s]===i)return s})})}},{"../../../validate-symbol":182,d:106}],181:[function(e,o,f){var r,a,l,c=e("d"),i=e("./validate-symbol"),s=e("ext/global-this").Symbol,u=e("./lib/private/generate-name"),d=e("./lib/private/setup/standard-symbols"),h=e("./lib/private/setup/symbol-registry"),m=Object.create,g=Object.defineProperties,p=Object.defineProperty;if(typeof s=="function")try{String(s()),l=!0}catch{}else s=null;a=function(v){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return r(v)},o.exports=r=function v(y){var x;if(this instanceof v)throw new TypeError("Symbol is not a constructor");return l?s(y):(x=m(a.prototype),y=y===void 0?"":String(y),g(x,{__description__:c("",y),__name__:c("",u(y))}))},d(r),h(r),g(a.prototype,{constructor:c(r),toString:c("",function(){return this.__name__})}),g(r.prototype,{toString:c(function(){return"Symbol ("+i(this).__description__+")"}),valueOf:c(function(){return i(this)})}),p(r.prototype,r.toPrimitive,c("",function(){var v=i(this);return typeof v=="symbol"?v:v.toString()})),p(r.prototype,r.toStringTag,c("c","Symbol")),p(a.prototype,r.toStringTag,c("c",r.prototype[r.toStringTag])),p(a.prototype,r.toPrimitive,c("c",r.prototype[r.toPrimitive]))},{"./lib/private/generate-name":178,"./lib/private/setup/standard-symbols":179,"./lib/private/setup/symbol-registry":180,"./validate-symbol":182,d:106,"ext/global-this":188}],182:[function(e,o,f){var r=e("./is-symbol");o.exports=function(a){if(!r(a))throw new TypeError(a+" is not a symbol");return a}},{"./is-symbol":177}],183:[function(e,o,f){o.exports=e("./is-implemented")()?WeakMap:e("./polyfill")},{"./is-implemented":184,"./polyfill":186}],184:[function(e,o,f){o.exports=function(){var r,a;if(typeof WeakMap!="function")return!1;try{r=new WeakMap([[a={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return String(r)==="[object WeakMap]"&&typeof r.set=="function"&&r.set({},1)===r&&typeof r.delete=="function"&&typeof r.has=="function"&&r.get(a)==="one"}},{}],185:[function(e,o,f){o.exports=typeof WeakMap=="function"&&Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"},{}],186:[function(e,o,f){var r,a=e("es5-ext/object/is-value"),l=e("es5-ext/object/set-prototype-of"),c=e("es5-ext/object/valid-object"),i=e("es5-ext/object/valid-value"),s=e("es5-ext/string/random-uniq"),u=e("d"),d=e("es6-iterator/get"),h=e("es6-iterator/for-of"),m=e("es6-symbol").toStringTag,g=e("./is-native-implemented"),p=Array.isArray,v=Object.defineProperty,y=Object.prototype.hasOwnProperty,x=Object.getPrototypeOf;o.exports=r=function(){var w,k=arguments[0];if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");return w=g&&l&&WeakMap!==r?l(new WeakMap,x(this)):this,a(k)&&(p(k)||(k=d(k))),v(w,"__weakMapData__",u("c","$weakMap$"+s())),k&&h(k,function(b){i(b),w.set(b[0],b[1])}),w},g&&(l&&l(r,WeakMap),r.prototype=Object.create(WeakMap.prototype,{constructor:u(r)})),Object.defineProperties(r.prototype,{delete:u(function(w){return!!y.call(c(w),this.__weakMapData__)&&(delete w[this.__weakMapData__],!0)}),get:u(function(w){if(y.call(c(w),this.__weakMapData__))return w[this.__weakMapData__]}),has:u(function(w){return y.call(c(w),this.__weakMapData__)}),set:u(function(w,k){return v(c(w),this.__weakMapData__,u("c",k)),this}),toString:u(function(){return"[object WeakMap]"})}),v(r.prototype,m,u("c","WeakMap"))},{"./is-native-implemented":185,d:106,"es5-ext/object/is-value":151,"es5-ext/object/set-prototype-of":157,"es5-ext/object/valid-object":161,"es5-ext/object/valid-value":162,"es5-ext/string/random-uniq":167,"es6-iterator/for-of":169,"es6-iterator/get":170,"es6-symbol":175}],187:[function(e,o,f){var r=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};o.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return r()}try{return __global__||r()}finally{delete Object.prototype.__global__}}()},{}],188:[function(e,o,f){o.exports=e("./is-implemented")()?globalThis:e("./implementation")},{"./implementation":187,"./is-implemented":189}],189:[function(e,o,f){o.exports=function(){return typeof globalThis=="object"&&!!globalThis&&globalThis.Array===Array}},{}],190:[function(e,o,f){var r=e("is-string-blank");o.exports=function(a){var l=typeof a;if(l==="string"){var c=a;if((a=+a)==0&&r(c))return!1}else if(l!=="number")return!1;return a-a<1}},{"is-string-blank":237}],191:[function(e,o,f){var r=e("dtype");o.exports=function(a,l,c){if(!a)throw new TypeError("must specify data as first parameter");if(c=0|+(c||0),Array.isArray(a)&&a[0]&&typeof a[0][0]=="number"){var i,s,u,d,h=a[0].length,m=a.length*h;l&&typeof l!="string"||(l=new(r(l||"float32"))(m+c));var g=l.length-c;if(m!==g)throw new Error("source length "+m+" ("+h+"x"+a.length+") does not match destination length "+g);for(i=0,u=c;ic[0]-u[0]/2&&(v=u[0]/2,y+=u[1]);return i}},{"css-font/stringify":102}],193:[function(e,o,f){function r(i,s){s||(s={}),(typeof i=="string"||Array.isArray(i))&&(s.family=i);var u=Array.isArray(s.family)?s.family.join(", "):s.family;if(!u)throw Error("`family` must be defined");var d=s.size||s.fontSize||s.em||48,h=s.weight||s.fontWeight||"",m=(i=[s.style||s.fontStyle||"",h,d].join(" ")+"px "+u,s.origin||"top");if(r.cache[u]&&d<=r.cache[u].em)return a(r.cache[u],m);var g=s.canvas||r.canvas,p=g.getContext("2d"),v={upper:s.upper!==void 0?s.upper:"H",lower:s.lower!==void 0?s.lower:"x",descent:s.descent!==void 0?s.descent:"p",ascent:s.ascent!==void 0?s.ascent:"h",tittle:s.tittle!==void 0?s.tittle:"i",overshoot:s.overshoot!==void 0?s.overshoot:"O"},y=Math.ceil(1.5*d);g.height=y,g.width=.5*y,p.font=i;var x={top:0};p.clearRect(0,0,y,y),p.textBaseline="top",p.fillStyle="black",p.fillText("H",0,0);var w=l(p.getImageData(0,0,y,y));p.clearRect(0,0,y,y),p.textBaseline="bottom",p.fillText("H",0,y);var k=l(p.getImageData(0,0,y,y));x.lineHeight=x.bottom=y-k+w,p.clearRect(0,0,y,y),p.textBaseline="alphabetic",p.fillText("H",0,y);var b=y-l(p.getImageData(0,0,y,y))-1+w;x.baseline=x.alphabetic=b,p.clearRect(0,0,y,y),p.textBaseline="middle",p.fillText("H",0,.5*y);var T=l(p.getImageData(0,0,y,y));x.median=x.middle=y-T-1+w-.5*y,p.clearRect(0,0,y,y),p.textBaseline="hanging",p.fillText("H",0,.5*y);var _=l(p.getImageData(0,0,y,y));x.hanging=y-_-1+w-.5*y,p.clearRect(0,0,y,y),p.textBaseline="ideographic",p.fillText("H",0,y);var S=l(p.getImageData(0,0,y,y));if(x.ideographic=y-S-1+w,v.upper&&(p.clearRect(0,0,y,y),p.textBaseline="top",p.fillText(v.upper,0,0),x.upper=l(p.getImageData(0,0,y,y)),x.capHeight=x.baseline-x.upper),v.lower&&(p.clearRect(0,0,y,y),p.textBaseline="top",p.fillText(v.lower,0,0),x.lower=l(p.getImageData(0,0,y,y)),x.xHeight=x.baseline-x.lower),v.tittle&&(p.clearRect(0,0,y,y),p.textBaseline="top",p.fillText(v.tittle,0,0),x.tittle=l(p.getImageData(0,0,y,y))),v.ascent&&(p.clearRect(0,0,y,y),p.textBaseline="top",p.fillText(v.ascent,0,0),x.ascent=l(p.getImageData(0,0,y,y))),v.descent&&(p.clearRect(0,0,y,y),p.textBaseline="top",p.fillText(v.descent,0,0),x.descent=c(p.getImageData(0,0,y,y))),v.overshoot){p.clearRect(0,0,y,y),p.textBaseline="top",p.fillText(v.overshoot,0,0);var A=c(p.getImageData(0,0,y,y));x.overshoot=A-b}for(var M in x)x[M]/=d;return x.em=d,r.cache[u]=x,a(x,m)}function a(i,s){var u={};for(var d in typeof s=="string"&&(s=i[s]),i)d!=="em"&&(u[d]=i[d]-s);return u}function l(i){for(var s=i.height,u=i.data,d=3;d0;d-=4)if(u[d]!==0)return Math.floor(.25*(d-3)/s)}o.exports=r,r.canvas=document.createElement("canvas"),r.cache={}},{}],194:[function(e,o,f){o.exports=function(r,a){if(typeof r!="string")throw new TypeError("must specify type string");if(a=a||{},typeof document>"u"&&!a.canvas)return null;var l=a.canvas||document.createElement("canvas");typeof a.width=="number"&&(l.width=a.width),typeof a.height=="number"&&(l.height=a.height);var c,i=a;try{var s=[r];r.indexOf("webgl")===0&&s.push("experimental-"+r);for(var u=0;u halfCharStep + halfCharWidth || + floor(uv.x) < halfCharStep - halfCharWidth) return; + + uv += charId * charStep; + uv = uv / atlasSize; + + vec4 color = fontColor; + vec4 mask = texture2D(atlas, uv); + + float maskY = lightness(mask); + // float colorY = lightness(color); + color.a *= maskY; + color.a *= opacity; + + // color.a += .1; + + // antialiasing, see yiq color space y-channel formula + // color.rgb += (1. - color.rgb) * (1. - mask.rgb); + + gl_FragColor = color; + }`});return{regl:A,draw:M,atlas:{}}},S.prototype.update=function(A){var M=this;if(typeof A=="string")A={text:A};else if(!A)return;(A=a(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)).opacity!=null&&(Array.isArray(A.opacity)?this.opacity=A.opacity.map(function(ye){return parseFloat(ye)}):this.opacity=parseFloat(A.opacity)),A.viewport!=null&&(this.viewport=h(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=w(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=S.baseFontSize+"px sans-serif");var E,D=!1,O=!1;if(A.font&&(Array.isArray(A.font)?A.font:[A.font]).forEach(function(ye,Me){if(typeof ye=="string")try{ye=r.parse(ye)}catch{ye=r.parse(S.baseFontSize+"px "+ye)}else ye=r.parse(r.stringify(ye));var ke=r.stringify({size:S.baseFontSize,family:ye.family,stretch:T?ye.stretch:void 0,variant:ye.variant,weight:ye.weight,style:ye.style}),Ee=g(ye.size),ze=Math.round(Ee[0]*p(Ee[1]));if(ze!==M.fontSize[Me]&&(O=!0,M.fontSize[Me]=ze),!(M.font[Me]&&ke==M.font[Me].baseString||(D=!0,M.font[Me]=S.fonts[ke],M.font[Me]))){var Fe=ye.family.join(", "),Ve=[ye.style];ye.style!=ye.variant&&Ve.push(ye.variant),ye.variant!=ye.weight&&Ve.push(ye.weight),T&&ye.weight!=ye.stretch&&Ve.push(ye.stretch),M.font[Me]={baseString:ke,family:Fe,weight:ye.weight,stretch:ye.stretch,style:ye.style,variant:ye.variant,width:{},kerning:{},metrics:x(Fe,{origin:"top",fontSize:S.baseFontSize,fontStyle:Ve.join(" ")})},S.fonts[ke]=M.font[Me]}}),(D||O)&&this.font.forEach(function(ye,Me){var ke=r.stringify({size:M.fontSize[Me],family:ye.family,stretch:T?ye.stretch:void 0,variant:ye.variant,weight:ye.weight,style:ye.style});if(M.fontAtlas[Me]=M.shader.atlas[ke],!M.fontAtlas[Me]){var Ee=ye.metrics;M.shader.atlas[ke]=M.fontAtlas[Me]={fontString:ke,step:2*Math.ceil(M.fontSize[Me]*Ee.bottom*.5),em:M.fontSize[Me],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:M.regl.texture()}}A.text==null&&(A.text=M.text)}),typeof A.text=="string"&&A.position&&A.position.length>2){for(var R=Array(.5*A.position.length),z=0;z2){for(var P=!A.position[0].length,N=d.mallocFloat(2*this.count),B=0,G=0;B1?M.align[Me]:M.align[0]:M.align;if(typeof ke=="number")return ke;switch(ke){case"right":case"end":return-ye;case"center":case"centre":case"middle":return .5*-ye}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(ye,Me){var ke=(M.font[Me]||M.font[0]).metrics,Ee=0;return Ee+=.5*ke.bottom,Ee+=typeof ye=="number"?ye-ke.baseline:-ke[ye],Ee*=-1})),A.color!=null)if(A.color||(A.color="transparent"),typeof A.color!="string"&&isNaN(A.color)){var ge;if(typeof A.color[0]=="number"&&A.color.length>this.counts.length){var fe=A.color.length;ge=d.mallocUint8(fe);for(var me=(A.color.subarray||A.color.slice).bind(A.color),_e=0;_e4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var Oe=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(Oe);for(var de=0;de1?this.counts[de]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[de]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*de,4*de+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[de]:this.opacity,baseline:this.baselineOffset[de]!=null?this.baselineOffset[de]:this.baselineOffset[0],align:this.align?this.alignOffset[de]!=null?this.alignOffset[de]:this.alignOffset[0]:0,atlas:this.fontAtlas[de]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*de,2*de+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=[]},S.prototype.destroy=function(){},S.prototype.kerning=!0,S.prototype.position={constant:new Float32Array(2)},S.prototype.translate=null,S.prototype.scale=null,S.prototype.font=null,S.prototype.text="",S.prototype.positionOffset=[0,0],S.prototype.opacity=1,S.prototype.color=new Uint8Array([0,0,0,255]),S.prototype.alignOffset=[0,0],S.maxAtlasSize=1024,S.atlasCanvas=document.createElement("canvas"),S.atlasContext=S.atlasCanvas.getContext("2d",{alpha:!1}),S.baseFontSize=64,S.fonts={},o.exports=S},{"bit-twiddle":81,"color-normalize":89,"css-font":99,"detect-kerning":125,"es6-weak-map":183,"flatten-vertex-data":191,"font-atlas":192,"font-measure":193,"gl-util/context":226,"is-plain-obj":236,"object-assign":247,"parse-rect":249,"parse-unit":251,"pick-by-alias":253,regl:283,"to-px":314,"typedarray-pool":327}],226:[function(e,o,f){(function(r){(function(){var a=e("pick-by-alias");function l(s){if(s.container)if(s.container==document.body)document.body.style.width||(s.canvas.width=s.width||s.pixelRatio*r.innerWidth),document.body.style.height||(s.canvas.height=s.height||s.pixelRatio*r.innerHeight);else{var u=s.container.getBoundingClientRect();s.canvas.width=s.width||u.right-u.left,s.canvas.height=s.height||u.bottom-u.top}}function c(s){return typeof s.getContext=="function"&&"width"in s&&"height"in s}function i(){var s=document.createElement("canvas");return s.style.position="absolute",s.style.top=0,s.style.left=0,s}o.exports=function(s){var u;if(s?typeof s=="string"&&(s={container:s}):s={},c(s)?s={container:s}:s=typeof(u=s).nodeName=="string"&&typeof u.appendChild=="function"&&typeof u.getBoundingClientRect=="function"?{container:s}:function(h){return typeof h.drawArrays=="function"||typeof h.drawElements=="function"}(s)?{gl:s}:a(s,{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),s.pixelRatio||(s.pixelRatio=r.pixelRatio||1),s.gl)return s.gl;if(s.canvas&&(s.container=s.canvas.parentNode),s.container){if(typeof s.container=="string"){var d=document.querySelector(s.container);if(!d)throw Error("Element "+s.container+" is not found");s.container=d}c(s.container)?(s.canvas=s.container,s.container=s.canvas.parentNode):s.canvas||(s.canvas=i(),s.container.appendChild(s.canvas),l(s))}else if(!s.canvas){if(typeof document>"u")throw Error("Not DOM environment. Use headless-gl.");s.container=document.body||document.documentElement,s.canvas=i(),s.container.appendChild(s.canvas),l(s)}return s.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(h){try{s.gl=s.canvas.getContext(h,s.attrs)}catch{}return s.gl}),s.gl}}).call(this)}).call(this,typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{})},{"pick-by-alias":253}],227:[function(e,o,f){o.exports=function(r){typeof r=="string"&&(r=[r]);for(var a=[].slice.call(arguments,1),l=[],c=0;c>1,g=-7,p=l?i-1:0,v=l?-1:1,y=r[a+p];for(p+=v,s=y&(1<<-g)-1,y>>=-g,g+=d;g>0;s=256*s+r[a+p],p+=v,g-=8);for(u=s&(1<<-g)-1,s>>=-g,g+=c;g>0;u=256*u+r[a+p],p+=v,g-=8);if(s===0)s=1-m;else{if(s===h)return u?NaN:1/0*(y?-1:1);u+=Math.pow(2,c),s-=m}return(y?-1:1)*u*Math.pow(2,s-c)},f.write=function(r,a,l,c,i,s){var u,d,h,m=8*s-i-1,g=(1<>1,v=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=c?0:s-1,x=c?1:-1,w=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(d=isNaN(a)?1:0,u=g):(u=Math.floor(Math.log(a)/Math.LN2),a*(h=Math.pow(2,-u))<1&&(u--,h*=2),(a+=u+p>=1?v/h:v*Math.pow(2,1-p))*h>=2&&(u++,h/=2),u+p>=g?(d=0,u=g):u+p>=1?(d=(a*h-1)*Math.pow(2,i),u+=p):(d=a*Math.pow(2,p-1)*Math.pow(2,i),u=0));i>=8;r[l+y]=255&d,y+=x,d/=256,i-=8);for(u=u<0;r[l+y]=255&u,y+=x,u/=256,m-=8);r[l+y-x]|=128*w}},{}],231:[function(e,o,f){typeof Object.create=="function"?o.exports=function(r,a){a&&(r.super_=a,r.prototype=Object.create(a.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:o.exports=function(r,a){if(a){r.super_=a;var l=function(){};l.prototype=a.prototype,r.prototype=new l,r.prototype.constructor=r}}},{}],232:[function(e,o,f){o.exports=!0},{}],233:[function(e,o,f){o.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},{}],234:[function(e,o,f){o.exports=l,o.exports.isMobile=l,o.exports.default=l;var r=/(android|bb\d+|meego).+mobile|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|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,a=/(android|bb\d+|meego).+mobile|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|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function l(c){c||(c={});var i=c.ua;if(i||typeof navigator>"u"||(i=navigator.userAgent),i&&i.headers&&typeof i.headers["user-agent"]=="string"&&(i=i.headers["user-agent"]),typeof i!="string")return!1;var s=c.tablet?a.test(i):r.test(i);return!s&&c.tablet&&c.featureDetect&&navigator&&navigator.maxTouchPoints>1&&i.indexOf("Macintosh")!==-1&&i.indexOf("Safari")!==-1&&(s=!0),s}},{}],235:[function(e,o,f){o.exports=function(r){var a=typeof r;return r!==null&&(a==="object"||a==="function")}},{}],236:[function(e,o,f){var r=Object.prototype.toString;o.exports=function(a){var l;return r.call(a)==="[object Object]"&&((l=Object.getPrototypeOf(a))===null||l===Object.getPrototypeOf({}))}},{}],237:[function(e,o,f){o.exports=function(r){for(var a,l=r.length,c=0;c13)&&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}},{}],238:[function(e,o,f){o.exports=function(r){return typeof r=="string"&&(r=r.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(r)&&/[\dz]$/i.test(r)&&r.length>4))}},{}],239:[function(e,o,f){(function(r,a){typeof f=="object"&&o!==void 0?o.exports=a():(r=r||self).mapboxgl=a()})(this,function(){var r,a,l;function c(i,s){if(r)if(a){var u="var sharedChunk = {}; ("+r+")(sharedChunk); ("+a+")(sharedChunk);",d={};r(d),(l=s(d)).workerUrl=window.URL.createObjectURL(new Blob([u],{type:"text/javascript"}))}else a=s;else r=s}return c(0,function(i){function s(C,F){return C(F={exports:{}},F.exports),F.exports}var u=d;function d(C,F,J,oe){this.cx=3*C,this.bx=3*(J-C)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*F,this.by=3*(oe-F)-this.cy,this.ay=1-this.cy-this.by,this.p1x=C,this.p1y=oe,this.p2x=J,this.p2y=oe}d.prototype.sampleCurveX=function(C){return((this.ax*C+this.bx)*C+this.cx)*C},d.prototype.sampleCurveY=function(C){return((this.ay*C+this.by)*C+this.cy)*C},d.prototype.sampleCurveDerivativeX=function(C){return(3*this.ax*C+2*this.bx)*C+this.cx},d.prototype.solveCurveX=function(C,F){var J,oe,pe,xe,Ce;for(F===void 0&&(F=1e-6),pe=C,Ce=0;Ce<8;Ce++){if(xe=this.sampleCurveX(pe)-C,Math.abs(xe)(oe=1))return oe;for(;Jxe?J=pe:oe=pe,pe=.5*(oe-J)+J}return pe},d.prototype.solve=function(C,F){return this.sampleCurveY(this.solveCurveX(C,F))};var h=m;function m(C,F){this.x=C,this.y=F}function g(C,F,J,oe){var pe=new u(C,F,J,oe);return function(xe){return pe.solve(xe)}}m.prototype={clone:function(){return new m(this.x,this.y)},add:function(C){return this.clone()._add(C)},sub:function(C){return this.clone()._sub(C)},multByPoint:function(C){return this.clone()._multByPoint(C)},divByPoint:function(C){return this.clone()._divByPoint(C)},mult:function(C){return this.clone()._mult(C)},div:function(C){return this.clone()._div(C)},rotate:function(C){return this.clone()._rotate(C)},rotateAround:function(C,F){return this.clone()._rotateAround(C,F)},matMult:function(C){return this.clone()._matMult(C)},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(C){return this.x===C.x&&this.y===C.y},dist:function(C){return Math.sqrt(this.distSqr(C))},distSqr:function(C){var F=C.x-this.x,J=C.y-this.y;return F*F+J*J},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(C){return Math.atan2(this.y-C.y,this.x-C.x)},angleWith:function(C){return this.angleWithSep(C.x,C.y)},angleWithSep:function(C,F){return Math.atan2(this.x*F-this.y*C,this.x*C+this.y*F)},_matMult:function(C){var F=C[0]*this.x+C[1]*this.y,J=C[2]*this.x+C[3]*this.y;return this.x=F,this.y=J,this},_add:function(C){return this.x+=C.x,this.y+=C.y,this},_sub:function(C){return this.x-=C.x,this.y-=C.y,this},_mult:function(C){return this.x*=C,this.y*=C,this},_div:function(C){return this.x/=C,this.y/=C,this},_multByPoint:function(C){return this.x*=C.x,this.y*=C.y,this},_divByPoint:function(C){return this.x/=C.x,this.y/=C.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var C=this.y;return this.y=this.x,this.x=-C,this},_rotate:function(C){var F=Math.cos(C),J=Math.sin(C),oe=F*this.x-J*this.y,pe=J*this.x+F*this.y;return this.x=oe,this.y=pe,this},_rotateAround:function(C,F){var J=Math.cos(C),oe=Math.sin(C),pe=F.x+J*(this.x-F.x)-oe*(this.y-F.y),xe=F.y+oe*(this.x-F.x)+J*(this.y-F.y);return this.x=pe,this.y=xe,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},m.convert=function(C){return C instanceof m?C:Array.isArray(C)?new m(C[0],C[1]):C};var p=g(.25,.1,.25,1);function v(C,F,J){return Math.min(J,Math.max(F,C))}function y(C,F,J){var oe=J-F,pe=((C-F)%oe+oe)%oe+F;return pe===F?J:pe}function x(C){for(var F=[],J=arguments.length-1;J-- >0;)F[J]=arguments[J+1];for(var oe=0,pe=F;oe>F/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,C)}()}function T(C){return!!C&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(C)}function _(C,F){C.forEach(function(J){F[J]&&(F[J]=F[J].bind(F))})}function S(C,F){return C.indexOf(F,C.length-F.length)!==-1}function A(C,F,J){var oe={};for(var pe in C)oe[pe]=F.call(J||this,C[pe],pe,C);return oe}function M(C,F,J){var oe={};for(var pe in C)F.call(J||this,C[pe],pe,C)&&(oe[pe]=C[pe]);return oe}function E(C){return Array.isArray(C)?C.map(E):typeof C=="object"&&C?A(C,E):C}var D={};function O(C){D[C]||(typeof console<"u"&&console.warn(C),D[C]=!0)}function R(C,F,J){return(J.y-C.y)*(F.x-C.x)>(F.y-C.y)*(J.x-C.x)}function z(C){for(var F=0,J=0,oe=C.length,pe=oe-1,xe=void 0,Ce=void 0;J@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(oe,pe,xe,Ce){var Ne=xe||Ce;return F[pe]=!Ne||Ne.toLowerCase(),""}),F["max-age"]){var J=parseInt(F["max-age"],10);isNaN(J)?delete F["max-age"]:F["max-age"]=J}return F}var N=null;function B(C){if(N==null){var F=C.navigator?C.navigator.userAgent:null;N=!!C.safari||!(!F||!(/\b(iPad|iPhone|iPod)\b/.test(F)||F.match("Safari")&&!F.match("Chrome")))}return N}function G(C){try{var F=self[C];return F.setItem("_mapbox_test_",1),F.removeItem("_mapbox_test_"),!0}catch{return!1}}var W,K,te,Y,Z=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),re=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,U=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,q={now:Z,frame:function(C){var F=re(C);return{cancel:function(){return U(F)}}},getImageData:function(C,F){F===void 0&&(F=0);var J=self.document.createElement("canvas"),oe=J.getContext("2d");if(!oe)throw new Error("failed to create canvas 2d context");return J.width=C.width,J.height=C.height,oe.drawImage(C,0,0,C.width,C.height),oe.getImageData(-F,-F,C.width+2*F,C.height+2*F)},resolveURL:function(C){return W||(W=self.document.createElement("a")),W.href=C,W.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(K==null&&(K=self.matchMedia("(prefers-reduced-motion: reduce)")),K.matches)}},$={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},ne={supported:!1,testSupport:function(C){H||!Y||(Q?ee(C):te=C)}},H=!1,Q=!1;function ee(C){var F=C.createTexture();C.bindTexture(C.TEXTURE_2D,F);try{if(C.texImage2D(C.TEXTURE_2D,0,C.RGBA,C.RGBA,C.UNSIGNED_BYTE,Y),C.isContextLost())return;ne.supported=!0}catch{}C.deleteTexture(F),H=!0}self.document&&((Y=self.document.createElement("img")).onload=function(){te&&ee(te),te=null,Q=!0},Y.onerror=function(){H=!0,te=null},Y.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var ie="01",ae=function(C,F){this._transformRequestFn=C,this._customAccessToken=F,this._createSkuToken()};function ue(C){return C.indexOf("mapbox:")===0}ae.prototype._createSkuToken=function(){var C=function(){for(var F="",J=0;J<10;J++)F+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",ie,F].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=C.token,this._skuTokenExpiresAt=C.tokenExpiresAt},ae.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},ae.prototype.transformRequest=function(C,F){return this._transformRequestFn&&this._transformRequestFn(C,F)||{url:C}},ae.prototype.normalizeStyleURL=function(C,F){if(!ue(C))return C;var J=me(C);return J.path="/styles/v1"+J.path,this._makeAPIURL(J,this._customAccessToken||F)},ae.prototype.normalizeGlyphsURL=function(C,F){if(!ue(C))return C;var J=me(C);return J.path="/fonts/v1"+J.path,this._makeAPIURL(J,this._customAccessToken||F)},ae.prototype.normalizeSourceURL=function(C,F){if(!ue(C))return C;var J=me(C);return J.path="/v4/"+J.authority+".json",J.params.push("secure"),this._makeAPIURL(J,this._customAccessToken||F)},ae.prototype.normalizeSpriteURL=function(C,F,J,oe){var pe=me(C);return ue(C)?(pe.path="/styles/v1"+pe.path+"/sprite"+F+J,this._makeAPIURL(pe,this._customAccessToken||oe)):(pe.path+=""+F+J,_e(pe))},ae.prototype.normalizeTileURL=function(C,F){if(this._isSkuTokenExpired()&&this._createSkuToken(),C&&!ue(C))return C;var J=me(C),oe=q.devicePixelRatio>=2||F===512?"@2x":"",pe=ne.supported?".webp":"$1";J.path=J.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+oe+pe),J.path=J.path.replace(/^.+\/v4\//,"/"),J.path="/v4"+J.path;var xe=this._customAccessToken||function(Ce){for(var Ne=0,Ze=Ce;Ne=1&&self.localStorage.setItem(F,JSON.stringify(this.eventData))}catch{O("Unable to write to LocalStorage")}},Te.prototype.processRequests=function(C){},Te.prototype.postEvent=function(C,F,J,oe){var pe=this;if($.EVENTS_URL){var xe=me($.EVENTS_URL);xe.params.push("access_token="+(oe||$.ACCESS_TOKEN||""));var Ce={event:this.type,created:new Date(C).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.10.1",skuId:ie,userId:this.anonId},Ne=F?x(Ce,F):Ce,Ze={url:_e(xe),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Ne])};this.pendingRequest=Wt(Ze,function(ct){pe.pendingRequest=null,J(ct),pe.saveEventData(),pe.processRequests(oe)})}},Te.prototype.queueRequest=function(C,F){this.queue.push(C),this.processRequests(F)};var Oe,de,ye=function(C){function F(){C.call(this,"map.load"),this.success={},this.skuToken=""}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.postMapLoadEvent=function(J,oe,pe,xe){this.skuToken=pe,($.EVENTS_URL&&xe||$.ACCESS_TOKEN&&Array.isArray(J)&&J.some(function(Ce){return ue(Ce)||ge(Ce)}))&&this.queueRequest({id:oe,timestamp:Date.now()},xe)},F.prototype.processRequests=function(J){var oe=this;if(!this.pendingRequest&&this.queue.length!==0){var pe=this.queue.shift(),xe=pe.id,Ce=pe.timestamp;xe&&this.success[xe]||(this.anonId||this.fetchEventData(),T(this.anonId)||(this.anonId=b()),this.postEvent(Ce,{skuToken:this.skuToken},function(Ne){Ne||xe&&(oe.success[xe]=!0)},J))}},F}(Te),Me=new(function(C){function F(J){C.call(this,"appUserTurnstile"),this._customAccessToken=J}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.postTurnstileEvent=function(J,oe){$.EVENTS_URL&&$.ACCESS_TOKEN&&Array.isArray(J)&&J.some(function(pe){return ue(pe)||ge(pe)})&&this.queueRequest(Date.now(),oe)},F.prototype.processRequests=function(J){var oe=this;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var pe=we($.ACCESS_TOKEN),xe=pe?pe.u:$.ACCESS_TOKEN,Ce=xe!==this.eventData.tokenU;T(this.anonId)||(this.anonId=b(),Ce=!0);var Ne=this.queue.shift();if(this.eventData.lastSuccess){var Ze=new Date(this.eventData.lastSuccess),ct=new Date(Ne),gt=(Ne-this.eventData.lastSuccess)/864e5;Ce=Ce||gt>=1||gt<-1||Ze.getDate()!==ct.getDate()}else Ce=!0;if(!Ce)return this.processRequests();this.postEvent(Ne,{"enabled.telemetry":!1},function(Bt){Bt||(oe.eventData.lastSuccess=Ne,oe.eventData.tokenU=xe)},J)}},F}(Te)),ke=Me.postTurnstileEvent.bind(Me),Ee=new ye,ze=Ee.postMapLoadEvent.bind(Ee),Fe=500,Ve=50;function Ke(){self.caches&&!Oe&&(Oe=self.caches.open("mapbox-tiles"))}function Re(C,F,J){if(Ke(),Oe){var oe={status:F.status,statusText:F.statusText,headers:new self.Headers};F.headers.forEach(function(xe,Ce){return oe.headers.set(Ce,xe)});var pe=P(F.headers.get("Cache-Control")||"");pe["no-store"]||(pe["max-age"]&&oe.headers.set("Expires",new Date(J+1e3*pe["max-age"]).toUTCString()),new Date(oe.headers.get("Expires")).getTime()-J<42e4||function(xe,Ce){if(de===void 0)try{new Response(new ReadableStream),de=!0}catch{de=!1}de?Ce(xe.body):xe.blob().then(Ce)}(F,function(xe){var Ce=new self.Response(xe,oe);Ke(),Oe&&Oe.then(function(Ne){return Ne.put(qe(C.url),Ce)}).catch(function(Ne){return O(Ne.message)})}))}}function qe(C){var F=C.indexOf("?");return F<0?C:C.slice(0,F)}function We(C,F){if(Ke(),!Oe)return F(null);var J=qe(C.url);Oe.then(function(oe){oe.match(J).then(function(pe){var xe=function(Ce){if(!Ce)return!1;var Ne=new Date(Ce.headers.get("Expires")||0),Ze=P(Ce.headers.get("Cache-Control")||"");return Ne>Date.now()&&!Ze["no-cache"]}(pe);oe.delete(J),xe&&oe.put(J,pe.clone()),F(null,pe,xe)}).catch(F)}).catch(F)}var Ye,nt=1/0;function ft(){return Ye==null&&(Ye=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),Ye}var vt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(vt);var Pt=function(C){function F(J,oe,pe){oe===401&&ge(pe)&&(J+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),C.call(this,J),this.status=oe,this.url=pe,this.name=this.constructor.name,this.message=J}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},F}(Error),At=L()?function(){return self.worker&&self.worker.referrer}:function(){return(self.location.protocol==="blob:"?self.parent:self).location.href};function at(C,F){var J,oe=new self.AbortController,pe=new self.Request(C.url,{method:C.method||"GET",body:C.body,credentials:C.credentials,headers:C.headers,referrer:At(),signal:oe.signal}),xe=!1,Ce=!1,Ne=(J=pe.url).indexOf("sku=")>0&&ge(J);C.type==="json"&&pe.headers.set("Accept","application/json");var Ze=function(gt,Bt,Xt){if(!Ce){if(gt&>.message!=="SecurityError"&&O(gt),Bt&&Xt)return ct(Bt);var Gt=Date.now();self.fetch(pe).then(function(on){if(on.ok){var vn=Ne?on.clone():null;return ct(on,vn,Gt)}return F(new Pt(on.statusText,on.status,C.url))}).catch(function(on){on.code!==20&&F(new Error(on.message))})}},ct=function(gt,Bt,Xt){(C.type==="arrayBuffer"?gt.arrayBuffer():C.type==="json"?gt.json():gt.text()).then(function(Gt){Ce||(Bt&&Xt&&Re(pe,Bt,Xt),xe=!0,F(null,Gt,gt.headers.get("Cache-Control"),gt.headers.get("Expires")))}).catch(function(Gt){Ce||F(new Error(Gt.message))})};return Ne?We(pe,Ze):Ze(null,null),{cancel:function(){Ce=!0,xe||oe.abort()}}}var et=function(C,F){if(J=C.url,!(/^file:/.test(J)||/^file:/.test(At())&&!/^\w+:/.test(J))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return at(C,F);if(L()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",C,F,void 0,!0)}var J;return function(oe,pe){var xe=new self.XMLHttpRequest;for(var Ce in xe.open(oe.method||"GET",oe.url,!0),oe.type==="arrayBuffer"&&(xe.responseType="arraybuffer"),oe.headers)xe.setRequestHeader(Ce,oe.headers[Ce]);return oe.type==="json"&&(xe.responseType="text",xe.setRequestHeader("Accept","application/json")),xe.withCredentials=oe.credentials==="include",xe.onerror=function(){pe(new Error(xe.statusText))},xe.onload=function(){if((xe.status>=200&&xe.status<300||xe.status===0)&&xe.response!==null){var Ne=xe.response;if(oe.type==="json")try{Ne=JSON.parse(xe.response)}catch(Ze){return pe(Ze)}pe(null,Ne,xe.getResponseHeader("Cache-Control"),xe.getResponseHeader("Expires"))}else pe(new Pt(xe.statusText,xe.status,oe.url))},xe.send(oe.body),{cancel:function(){return xe.abort()}}}(C,F)},Ot=function(C,F){return et(x(C,{type:"arrayBuffer"}),F)},Wt=function(C,F){return et(x(C,{method:"POST"}),F)},Jt,Be;Jt=[],Be=0;var Ge=function(C,F){if(ne.supported&&(C.headers||(C.headers={}),C.headers.accept="image/webp,*/*"),Be>=$.MAX_PARALLEL_IMAGE_REQUESTS){var J={requestParameters:C,callback:F,cancelled:!1,cancel:function(){this.cancelled=!0}};return Jt.push(J),J}Be++;var oe=!1,pe=function(){if(!oe)for(oe=!0,Be--;Jt.length&&Be<$.MAX_PARALLEL_IMAGE_REQUESTS;){var Ce=Jt.shift(),Ne=Ce.requestParameters,Ze=Ce.callback;Ce.cancelled||(Ce.cancel=Ge(Ne,Ze).cancel)}},xe=Ot(C,function(Ce,Ne,Ze,ct){pe(),Ce?F(Ce):Ne&&(ft()?function(gt,Bt){var Xt=new self.Blob([new Uint8Array(gt)],{type:"image/png"});self.createImageBitmap(Xt).then(function(Gt){Bt(null,Gt)}).catch(function(Gt){Bt(new Error("Could not load image because of "+Gt.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}(Ne,F):function(gt,Bt,Xt,Gt){var on=new self.Image,vn=self.URL;on.onload=function(){Bt(null,on),vn.revokeObjectURL(on.src)},on.onerror=function(){return Bt(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 Cn=new self.Blob([new Uint8Array(gt)],{type:"image/png"});on.cacheControl=Xt,on.expires=Gt,on.src=gt.byteLength?vn.createObjectURL(Cn):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}(Ne,F,Ze,ct))});return{cancel:function(){xe.cancel(),pe()}}};function Tt(C,F,J){J[C]&&J[C].indexOf(F)!==-1||(J[C]=J[C]||[],J[C].push(F))}function dt(C,F,J){if(J&&J[C]){var oe=J[C].indexOf(F);oe!==-1&&J[C].splice(oe,1)}}var Pe=function(C,F){F===void 0&&(F={}),x(this,F),this.type=C},Ie=function(C){function F(J,oe){oe===void 0&&(oe={}),C.call(this,"error",x({error:J},oe))}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F}(Pe),Ae=function(){};Ae.prototype.on=function(C,F){return this._listeners=this._listeners||{},Tt(C,F,this._listeners),this},Ae.prototype.off=function(C,F){return dt(C,F,this._listeners),dt(C,F,this._oneTimeListeners),this},Ae.prototype.once=function(C,F){return this._oneTimeListeners=this._oneTimeListeners||{},Tt(C,F,this._oneTimeListeners),this},Ae.prototype.fire=function(C,F){typeof C=="string"&&(C=new Pe(C,F||{}));var J=C.type;if(this.listens(J)){C.target=this;for(var oe=0,pe=this._listeners&&this._listeners[J]?this._listeners[J].slice():[];oe0||this._oneTimeListeners&&this._oneTimeListeners[C]&&this._oneTimeListeners[C].length>0||this._eventedParent&&this._eventedParent.listens(C)},Ae.prototype.setEventedParent=function(C,F){return this._eventedParent=C,this._eventedParentData=F,this};var De={$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"},sources:{required:!0,type:"sources"},sprite:{type:"string"},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"},"*":{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"},"*":{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:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{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},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{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"],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"}},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":{},within:{}}},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},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},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}},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"}}},He=function(C,F,J,oe){this.message=(C?C+": ":"")+J,oe&&(this.identifier=oe),F!=null&&F.__line__&&(this.line=F.__line__)};function rt(C){var F=C.key,J=C.value;return J?[new He(F,J,"constants have been deprecated as of v8")]:[]}function lt(C){for(var F=[],J=arguments.length-1;J-- >0;)F[J]=arguments[J+1];for(var oe=0,pe=F;oe":C.itemType.kind==="value"?"array":"array<"+F+">"}return C.kind}var Kt=[Ut,tt,bt,zt,St,st,Dt,It(Le),Et];function Ht(C,F){if(F.kind==="error")return null;if(C.kind==="array"){if(F.kind==="array"&&(F.N===0&&F.itemType.kind==="value"||!Ht(C.itemType,F.itemType))&&(typeof C.N!="number"||C.N===F.N))return null}else{if(C.kind===F.kind)return null;if(C.kind==="value"){for(var J=0,oe=Kt;J255?255:Ze}function pe(Ze){return Ze<0?0:Ze>1?1:Ze}function xe(Ze){return Ze[Ze.length-1]==="%"?oe(parseFloat(Ze)/100*255):oe(parseInt(Ze))}function Ce(Ze){return Ze[Ze.length-1]==="%"?pe(parseFloat(Ze)/100):pe(parseFloat(Ze))}function Ne(Ze,ct,gt){return gt<0?gt+=1:gt>1&&(gt-=1),6*gt<1?Ze+(ct-Ze)*gt*6:2*gt<1?ct:3*gt<2?Ze+(ct-Ze)*(2/3-gt)*6:Ze}try{F.parseCSSColor=function(Ze){var ct,gt=Ze.replace(/ /g,"").toLowerCase();if(gt in J)return J[gt].slice();if(gt[0]==="#")return gt.length===4?(ct=parseInt(gt.substr(1),16))>=0&&ct<=4095?[(3840&ct)>>4|(3840&ct)>>8,240&ct|(240&ct)>>4,15&ct|(15&ct)<<4,1]:null:gt.length===7&&(ct=parseInt(gt.substr(1),16))>=0&&ct<=16777215?[(16711680&ct)>>16,(65280&ct)>>8,255&ct,1]:null;var Bt=gt.indexOf("("),Xt=gt.indexOf(")");if(Bt!==-1&&Xt+1===gt.length){var Gt=gt.substr(0,Bt),on=gt.substr(Bt+1,Xt-(Bt+1)).split(","),vn=1;switch(Gt){case"rgba":if(on.length!==4)return null;vn=Ce(on.pop());case"rgb":return on.length!==3?null:[xe(on[0]),xe(on[1]),xe(on[2]),vn];case"hsla":if(on.length!==4)return null;vn=Ce(on.pop());case"hsl":if(on.length!==3)return null;var Cn=(parseFloat(on[0])%360+360)%360/360,En=Ce(on[1]),Vn=Ce(on[2]),qn=Vn<=.5?Vn*(En+1):Vn+En-Vn*En,Xn=2*Vn-qn;return[oe(255*Ne(Xn,qn,Cn+1/3)),oe(255*Ne(Xn,qn,Cn)),oe(255*Ne(Xn,qn,Cn-1/3)),vn];default:return null}}return null}}catch{}}).parseCSSColor,tn=function(C,F,J,oe){oe===void 0&&(oe=1),this.r=C,this.g=F,this.b=J,this.a=oe};tn.parse=function(C){if(C){if(C instanceof tn)return C;if(typeof C=="string"){var F=pn(C);if(F)return new tn(F[0]/255*F[3],F[1]/255*F[3],F[2]/255*F[3],F[3])}}},tn.prototype.toString=function(){var C=this.toArray(),F=C[0],J=C[1],oe=C[2],pe=C[3];return"rgba("+Math.round(F)+","+Math.round(J)+","+Math.round(oe)+","+pe+")"},tn.prototype.toArray=function(){var C=this.r,F=this.g,J=this.b,oe=this.a;return oe===0?[0,0,0,0]:[255*C/oe,255*F/oe,255*J/oe,oe]},tn.black=new tn(0,0,0,1),tn.white=new tn(1,1,1,1),tn.transparent=new tn(0,0,0,0),tn.red=new tn(1,0,0,1);var nn=function(C,F,J){this.sensitivity=C?F?"variant":"case":F?"accent":"base",this.locale=J,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};nn.prototype.compare=function(C,F){return this.collator.compare(C,F)},nn.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var sn=function(C,F,J,oe,pe){this.text=C,this.image=F,this.scale=J,this.fontStack=oe,this.textColor=pe},gn=function(C){this.sections=C};gn.fromString=function(C){return new gn([new sn(C,null,null,null,null)])},gn.prototype.isEmpty=function(){return this.sections.length===0||!this.sections.some(function(C){return C.text.length!==0||C.image&&C.image.name.length!==0})},gn.factory=function(C){return C instanceof gn?C:gn.fromString(C)},gn.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(C){return C.text}).join("")},gn.prototype.serialize=function(){for(var C=["format"],F=0,J=this.sections;F=0&&C<=255&&typeof F=="number"&&F>=0&&F<=255&&typeof J=="number"&&J>=0&&J<=255?oe===void 0||typeof oe=="number"&&oe>=0&&oe<=1?null:"Invalid rgba value ["+[C,F,J,oe].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+(typeof oe=="number"?[C,F,J,oe]:[C,F,J]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Hn(C){if(C===null||typeof C=="string"||typeof C=="boolean"||typeof C=="number"||C instanceof tn||C instanceof nn||C instanceof gn||C instanceof bn)return!0;if(Array.isArray(C)){for(var F=0,J=C;F2){var Ne=C[1];if(typeof Ne!="string"||!(Ne in Er)||Ne==="object")return F.error('The item type argument of "array" must be one of string, number, boolean',1);xe=Er[Ne],oe++}else xe=Le;if(C.length>3){if(C[2]!==null&&(typeof C[2]!="number"||C[2]<0||C[2]!==Math.floor(C[2])))return F.error('The length argument to "array" must be a positive integer literal',2);Ce=C[2],oe++}J=It(xe,Ce)}else J=Er[pe];for(var Ze=[];oe1)&&F.push(oe)}}return F.concat(this.args.map(function(pe){return pe.serialize()}))};var Ln=function(C){this.type=st,this.sections=C};Ln.parse=function(C,F){if(C.length<2)return F.error("Expected at least one argument.");var J=C[1];if(!Array.isArray(J)&&typeof J=="object")return F.error("First argument must be an image or text section.");for(var oe=[],pe=!1,xe=1;xe<=C.length-1;++xe){var Ce=C[xe];if(pe&&typeof Ce=="object"&&!Array.isArray(Ce)){pe=!1;var Ne=null;if(Ce["font-scale"]&&!(Ne=F.parse(Ce["font-scale"],1,tt)))return null;var Ze=null;if(Ce["text-font"]&&!(Ze=F.parse(Ce["text-font"],1,It(bt))))return null;var ct=null;if(Ce["text-color"]&&!(ct=F.parse(Ce["text-color"],1,St)))return null;var gt=oe[oe.length-1];gt.scale=Ne,gt.font=Ze,gt.textColor=ct}else{var Bt=F.parse(C[xe],1,Le);if(!Bt)return null;var Xt=Bt.type.kind;if(Xt!=="string"&&Xt!=="value"&&Xt!=="null"&&Xt!=="resolvedImage")return F.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");pe=!0,oe.push({content:Bt,scale:null,font:null,textColor:null})}}return new Ln(oe)},Ln.prototype.evaluate=function(C){return new gn(this.sections.map(function(F){var J=F.content.evaluate(C);return Wn(J)===Et?new sn("",J,null,null,null):new sn(ar(J),null,F.scale?F.scale.evaluate(C):null,F.font?F.font.evaluate(C).join(","):null,F.textColor?F.textColor.evaluate(C):null)}))},Ln.prototype.eachChild=function(C){for(var F=0,J=this.sections;F-1),J},lr.prototype.eachChild=function(C){C(this.input)},lr.prototype.outputDefined=function(){return!1},lr.prototype.serialize=function(){return["image",this.input.serialize()]};var Wr={"to-boolean":zt,"to-color":St,"to-number":tt,"to-string":bt},Mn=function(C,F){this.type=C,this.args=F};Mn.parse=function(C,F){if(C.length<2)return F.error("Expected at least one argument.");var J=C[0];if((J==="to-boolean"||J==="to-string")&&C.length!==2)return F.error("Expected one argument.");for(var oe=Wr[J],pe=[],xe=1;xe4?"Invalid rbga value "+JSON.stringify(F)+": expected an array containing either three or four numeric values.":In(F[0],F[1],F[2],F[3])))return new tn(F[0]/255,F[1]/255,F[2]/255,F[3])}throw new vr(J||"Could not parse color from value '"+(typeof F=="string"?F:String(JSON.stringify(F)))+"'")}if(this.type.kind==="number"){for(var Ce=null,Ne=0,Ze=this.args;Ne=F[2])&&!(C[1]<=F[1])&&!(C[3]>=F[3])}function qr(C,F){var J,oe=(180+C[0])/360,pe=(J=C[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+J*Math.PI/360)))/360),xe=Math.pow(2,F.z);return[Math.round(oe*xe*8192),Math.round(pe*xe*8192)]}function _i(C,F,J){return F[1]>C[1]!=J[1]>C[1]&&C[0]<(J[0]-F[0])*(C[1]-F[1])/(J[1]-F[1])+F[0]}function cn(C,F){for(var J,oe,pe,xe,Ce,Ne,Ze,ct=!1,gt=0,Bt=F.length;gt0&&Bt<0||gt<0&&Bt>0}function fn(C,F,J){for(var oe=0,pe=J;oeJ[2]){var pe=.5*oe,xe=C[0]-J[0]>pe?-oe:J[0]-C[0]>pe?oe:0;xe===0&&(xe=C[0]-J[2]>pe?-oe:J[2]-C[0]>pe?oe:0),C[0]+=xe}$r(F,C)}function wn(C,F,J,oe){for(var pe=8192*Math.pow(2,oe.z),xe=[8192*oe.x,8192*oe.y],Ce=[],Ne=0,Ze=C;Ne=0)return!1;var J=!0;return C.eachChild(function(oe){J&&!Yn(oe,F)&&(J=!1)}),J}Tn.parse=function(C,F){if(C.length!==2)return F.error("'within' expression requires exactly one argument, but found "+(C.length-1)+" instead.");if(Hn(C[1])){var J=C[1];if(J.type==="FeatureCollection")for(var oe=0;oeF))throw new vr("Input is not a number.");Ce=Ne-1}return 0}or.prototype.parse=function(C,F,J,oe,pe){return pe===void 0&&(pe={}),F?this.concat(F,J,oe)._parse(C,pe):this._parse(C,pe)},or.prototype._parse=function(C,F){function J(ct,gt,Bt){return Bt==="assert"?new Kn(gt,[ct]):Bt==="coerce"?new Mn(gt,[ct]):ct}if(C!==null&&typeof C!="string"&&typeof C!="boolean"&&typeof C!="number"||(C=["literal",C]),Array.isArray(C)){if(C.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var oe=C[0];if(typeof oe!="string")return this.error("Expression name must be a string, but found "+typeof oe+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var pe=this.registry[oe];if(pe){var xe=pe.parse(C,this);if(!xe)return null;if(this.expectedType){var Ce=this.expectedType,Ne=xe.type;if(Ce.kind!=="string"&&Ce.kind!=="number"&&Ce.kind!=="boolean"&&Ce.kind!=="object"&&Ce.kind!=="array"||Ne.kind!=="value")if(Ce.kind!=="color"&&Ce.kind!=="formatted"&&Ce.kind!=="resolvedImage"||Ne.kind!=="value"&&Ne.kind!=="string"){if(this.checkSubtype(Ce,Ne))return null}else xe=J(xe,Ce,F.typeAnnotation||"coerce");else xe=J(xe,Ce,F.typeAnnotation||"assert")}if(!(xe instanceof Or)&&xe.type.kind!=="resolvedImage"&&function ct(gt){if(gt instanceof ir)return ct(gt.boundExpression);if(gt instanceof Bn&>.name==="error"||gt instanceof Fr||gt instanceof Tn)return!1;var Bt=gt instanceof Mn||gt instanceof Kn,Xt=!0;return gt.eachChild(function(Gt){Xt=Bt?Xt&&ct(Gt):Xt&&Gt instanceof Or}),Xt?Dn(gt)&&Yn(gt,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}(xe)){var Ze=new nr;try{xe=new Or(xe.type,xe.evaluate(Ze))}catch(ct){return this.error(ct.message),null}}return xe}return this.error('Unknown expression "'+oe+'". If you wanted a literal array, use ["literal", [...]].',0)}return C===void 0?this.error("'undefined' value invalid. Use null instead."):typeof C=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof C+" instead.")},or.prototype.concat=function(C,F,J){var oe=typeof C=="number"?this.path.concat(C):this.path,pe=J?this.scope.concat(J):this.scope;return new or(this.registry,oe,F||null,pe,this.errors)},or.prototype.error=function(C){for(var F=[],J=arguments.length-1;J-- >0;)F[J]=arguments[J+1];var oe=""+this.key+F.map(function(pe){return"["+pe+"]"}).join("");this.errors.push(new wt(oe,C))},or.prototype.checkSubtype=function(C,F){var J=Ht(C,F);return J&&this.error(J),J};var wr=function(C,F,J){this.type=C,this.input=F,this.labels=[],this.outputs=[];for(var oe=0,pe=J;oe=Ce)return F.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Ze);var gt=F.parse(Ne,ct,pe);if(!gt)return null;pe=pe||gt.type,oe.push([Ce,gt])}return new wr(pe,J,oe)},wr.prototype.evaluate=function(C){var F=this.labels,J=this.outputs;if(F.length===1)return J[0].evaluate(C);var oe=this.input.evaluate(C);if(oe<=F[0])return J[0].evaluate(C);var pe=F.length;return oe>=F[pe-1]?J[pe-1].evaluate(C):J[xr(F,oe)].evaluate(C)},wr.prototype.eachChild=function(C){C(this.input);for(var F=0,J=this.outputs;F0&&C.push(this.labels[F]),C.push(this.outputs[F].serialize());return C};var Dr=Object.freeze({__proto__:null,number:kr,color:function(C,F,J){return new tn(kr(C.r,F.r,J),kr(C.g,F.g,J),kr(C.b,F.b,J),kr(C.a,F.a,J))},array:function(C,F,J){return C.map(function(oe,pe){return kr(oe,F[pe],J)})}}),Nr=6/29,ri=3*Nr*Nr,ji=Math.PI/180,Bi=180/Math.PI;function Sr(C){return C>.008856451679035631?Math.pow(C,1/3):C/ri+4/29}function ui(C){return C>Nr?C*C*C:ri*(C-4/29)}function si(C){return 255*(C<=.0031308?12.92*C:1.055*Math.pow(C,1/2.4)-.055)}function ta(C){return(C/=255)<=.04045?C/12.92:Math.pow((C+.055)/1.055,2.4)}function Ja(C){var F=ta(C.r),J=ta(C.g),oe=ta(C.b),pe=Sr((.4124564*F+.3575761*J+.1804375*oe)/.95047),xe=Sr((.2126729*F+.7151522*J+.072175*oe)/1);return{l:116*xe-16,a:500*(pe-xe),b:200*(xe-Sr((.0193339*F+.119192*J+.9503041*oe)/1.08883)),alpha:C.a}}function Ao(C){var F=(C.l+16)/116,J=isNaN(C.a)?F:F+C.a/500,oe=isNaN(C.b)?F:F-C.b/200;return F=1*ui(F),J=.95047*ui(J),oe=1.08883*ui(oe),new tn(si(3.2404542*J-1.5371385*F-.4985314*oe),si(-.969266*J+1.8760108*F+.041556*oe),si(.0556434*J-.2040259*F+1.0572252*oe),C.alpha)}function fs(C,F,J){var oe=F-C;return C+J*(oe>180||oe<-180?oe-360*Math.round(oe/360):oe)}var ya={forward:Ja,reverse:Ao,interpolate:function(C,F,J){return{l:kr(C.l,F.l,J),a:kr(C.a,F.a,J),b:kr(C.b,F.b,J),alpha:kr(C.alpha,F.alpha,J)}}},xa={forward:function(C){var F=Ja(C),J=F.l,oe=F.a,pe=F.b,xe=Math.atan2(pe,oe)*Bi;return{h:xe<0?xe+360:xe,c:Math.sqrt(oe*oe+pe*pe),l:J,alpha:C.a}},reverse:function(C){var F=C.h*ji,J=C.c;return Ao({l:C.l,a:Math.cos(F)*J,b:Math.sin(F)*J,alpha:C.alpha})},interpolate:function(C,F,J){return{h:fs(C.h,F.h,J),c:kr(C.c,F.c,J),l:kr(C.l,F.l,J),alpha:kr(C.alpha,F.alpha,J)}}},Zo=Object.freeze({__proto__:null,lab:ya,hcl:xa}),oa=function(C,F,J,oe,pe){this.type=C,this.operator=F,this.interpolation=J,this.input=oe,this.labels=[],this.outputs=[];for(var xe=0,Ce=pe;xe1}))return F.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);oe={name:"cubic-bezier",controlPoints:Ne}}if(C.length-1<4)return F.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if((C.length-1)%2!=0)return F.error("Expected an even number of arguments.");if(!(pe=F.parse(pe,2,tt)))return null;var Ze=[],ct=null;J==="interpolate-hcl"||J==="interpolate-lab"?ct=St:F.expectedType&&F.expectedType.kind!=="value"&&(ct=F.expectedType);for(var gt=0;gt=Bt)return F.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Gt);var vn=F.parse(Xt,on,ct);if(!vn)return null;ct=ct||vn.type,Ze.push([Bt,vn])}return ct.kind==="number"||ct.kind==="color"||ct.kind==="array"&&ct.itemType.kind==="number"&&typeof ct.N=="number"?new oa(ct,J,oe,pe,Ze):F.error("Type "+Zt(ct)+" is not interpolatable.")},oa.prototype.evaluate=function(C){var F=this.labels,J=this.outputs;if(F.length===1)return J[0].evaluate(C);var oe=this.input.evaluate(C);if(oe<=F[0])return J[0].evaluate(C);var pe=F.length;if(oe>=F[pe-1])return J[pe-1].evaluate(C);var xe=xr(F,oe),Ce=F[xe],Ne=F[xe+1],Ze=oa.interpolationFactor(this.interpolation,oe,Ce,Ne),ct=J[xe].evaluate(C),gt=J[xe+1].evaluate(C);return this.operator==="interpolate"?Dr[this.type.kind.toLowerCase()](ct,gt,Ze):this.operator==="interpolate-hcl"?xa.reverse(xa.interpolate(xa.forward(ct),xa.forward(gt),Ze)):ya.reverse(ya.interpolate(ya.forward(ct),ya.forward(gt),Ze))},oa.prototype.eachChild=function(C){C(this.input);for(var F=0,J=this.outputs;F=J.length)throw new vr("Array index out of bounds: "+F+" > "+(J.length-1)+".");if(F!==Math.floor(F))throw new vr("Array index must be an integer, but found "+F+" instead.");return J[F]},Jo.prototype.eachChild=function(C){C(this.index),C(this.input)},Jo.prototype.outputDefined=function(){return!1},Jo.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var _s=function(C,F){this.type=zt,this.needle=C,this.haystack=F};_s.parse=function(C,F){if(C.length!==3)return F.error("Expected 2 arguments, but found "+(C.length-1)+" instead.");var J=F.parse(C[1],1,Le),oe=F.parse(C[2],2,Le);return J&&oe?mn(J.type,[zt,bt,tt,Ut,Le])?new _s(J,oe):F.error("Expected first argument to be of type boolean, string, number or null, but found "+Zt(J.type)+" instead"):null},_s.prototype.evaluate=function(C){var F=this.needle.evaluate(C),J=this.haystack.evaluate(C);if(!J)return!1;if(!zn(F,["boolean","string","number","null"]))throw new vr("Expected first argument to be of type boolean, string, number or null, but found "+Zt(Wn(F))+" instead.");if(!zn(J,["string","array"]))throw new vr("Expected second argument to be of type array or string, but found "+Zt(Wn(J))+" instead.");return J.indexOf(F)>=0},_s.prototype.eachChild=function(C){C(this.needle),C(this.haystack)},_s.prototype.outputDefined=function(){return!0},_s.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Ls=function(C,F,J){this.type=tt,this.needle=C,this.haystack=F,this.fromIndex=J};Ls.parse=function(C,F){if(C.length<=2||C.length>=5)return F.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var J=F.parse(C[1],1,Le),oe=F.parse(C[2],2,Le);if(!J||!oe)return null;if(!mn(J.type,[zt,bt,tt,Ut,Le]))return F.error("Expected first argument to be of type boolean, string, number or null, but found "+Zt(J.type)+" instead");if(C.length===4){var pe=F.parse(C[3],3,tt);return pe?new Ls(J,oe,pe):null}return new Ls(J,oe)},Ls.prototype.evaluate=function(C){var F=this.needle.evaluate(C),J=this.haystack.evaluate(C);if(!zn(F,["boolean","string","number","null"]))throw new vr("Expected first argument to be of type boolean, string, number or null, but found "+Zt(Wn(F))+" instead.");if(!zn(J,["string","array"]))throw new vr("Expected second argument to be of type array or string, but found "+Zt(Wn(J))+" instead.");if(this.fromIndex){var oe=this.fromIndex.evaluate(C);return J.indexOf(F,oe)}return J.indexOf(F)},Ls.prototype.eachChild=function(C){C(this.needle),C(this.haystack),this.fromIndex&&C(this.fromIndex)},Ls.prototype.outputDefined=function(){return!1},Ls.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var C=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),C]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Oo=function(C,F,J,oe,pe,xe){this.inputType=C,this.type=F,this.input=J,this.cases=oe,this.outputs=pe,this.otherwise=xe};Oo.parse=function(C,F){if(C.length<5)return F.error("Expected at least 4 arguments, but found only "+(C.length-1)+".");if(C.length%2!=1)return F.error("Expected an even number of arguments.");var J,oe;F.expectedType&&F.expectedType.kind!=="value"&&(oe=F.expectedType);for(var pe={},xe=[],Ce=2;CeNumber.MAX_SAFE_INTEGER)return ct.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Xt=="number"&&Math.floor(Xt)!==Xt)return ct.error("Numeric branch labels must be integer values.");if(J){if(ct.checkSubtype(J,Wn(Xt)))return null}else J=Wn(Xt);if(pe[String(Xt)]!==void 0)return ct.error("Branch labels must be unique.");pe[String(Xt)]=xe.length}var Gt=F.parse(Ze,Ce,oe);if(!Gt)return null;oe=oe||Gt.type,xe.push(Gt)}var on=F.parse(C[1],1,Le);if(!on)return null;var vn=F.parse(C[C.length-1],C.length-1,oe);return vn?on.type.kind!=="value"&&F.concat(1).checkSubtype(J,on.type)?null:new Oo(J,oe,on,pe,xe,vn):null},Oo.prototype.evaluate=function(C){var F=this.input.evaluate(C);return(Wn(F)===this.inputType&&this.outputs[this.cases[F]]||this.otherwise).evaluate(C)},Oo.prototype.eachChild=function(C){C(this.input),this.outputs.forEach(C),C(this.otherwise)},Oo.prototype.outputDefined=function(){return this.outputs.every(function(C){return C.outputDefined()})&&this.otherwise.outputDefined()},Oo.prototype.serialize=function(){for(var C=this,F=["match",this.input.serialize()],J=[],oe={},pe=0,xe=Object.keys(this.cases).sort();pe=5)return F.error("Expected 3 or 4 arguments, but found "+(C.length-1)+" instead.");var J=F.parse(C[1],1,Le),oe=F.parse(C[2],2,tt);if(!J||!oe)return null;if(!mn(J.type,[It(Le),bt,Le]))return F.error("Expected first argument to be of type array or string, but found "+Zt(J.type)+" instead");if(C.length===4){var pe=F.parse(C[3],3,tt);return pe?new $o(J.type,J,oe,pe):null}return new $o(J.type,J,oe)},$o.prototype.evaluate=function(C){var F=this.input.evaluate(C),J=this.beginIndex.evaluate(C);if(!zn(F,["string","array"]))throw new vr("Expected first argument to be of type array or string, but found "+Zt(Wn(F))+" instead.");if(this.endIndex){var oe=this.endIndex.evaluate(C);return F.slice(J,oe)}return F.slice(J)},$o.prototype.eachChild=function(C){C(this.input),C(this.beginIndex),this.endIndex&&C(this.endIndex)},$o.prototype.outputDefined=function(){return!1},$o.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var C=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),C]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var ju=ba("==",function(C,F,J){return F===J},Mc),Wl=ba("!=",function(C,F,J){return F!==J},function(C,F,J,oe){return!Mc(0,F,J,oe)}),Sc=ba("<",function(C,F,J){return F",function(C,F,J){return F>J},function(C,F,J,oe){return oe.compare(F,J)>0}),ac=ba("<=",function(C,F,J){return F<=J},function(C,F,J,oe){return oe.compare(F,J)<=0}),Cc=ba(">=",function(C,F,J){return F>=J},function(C,F,J,oe){return oe.compare(F,J)>=0}),Ns=function(C,F,J,oe,pe){this.type=bt,this.number=C,this.locale=F,this.currency=J,this.minFractionDigits=oe,this.maxFractionDigits=pe};Ns.parse=function(C,F){if(C.length!==3)return F.error("Expected two arguments.");var J=F.parse(C[1],1,tt);if(!J)return null;var oe=C[2];if(typeof oe!="object"||Array.isArray(oe))return F.error("NumberFormat options argument must be an object.");var pe=null;if(oe.locale&&!(pe=F.parse(oe.locale,1,bt)))return null;var xe=null;if(oe.currency&&!(xe=F.parse(oe.currency,1,bt)))return null;var Ce=null;if(oe["min-fraction-digits"]&&!(Ce=F.parse(oe["min-fraction-digits"],1,tt)))return null;var Ne=null;return oe["max-fraction-digits"]&&!(Ne=F.parse(oe["max-fraction-digits"],1,tt))?null:new Ns(J,pe,xe,Ce,Ne)},Ns.prototype.evaluate=function(C){return new Intl.NumberFormat(this.locale?this.locale.evaluate(C):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(C):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(C):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(C):void 0}).format(this.number.evaluate(C))},Ns.prototype.eachChild=function(C){C(this.number),this.locale&&C(this.locale),this.currency&&C(this.currency),this.minFractionDigits&&C(this.minFractionDigits),this.maxFractionDigits&&C(this.maxFractionDigits)},Ns.prototype.outputDefined=function(){return!1},Ns.prototype.serialize=function(){var C={};return this.locale&&(C.locale=this.locale.serialize()),this.currency&&(C.currency=this.currency.serialize()),this.minFractionDigits&&(C["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(C["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),C]};var Bs=function(C){this.type=tt,this.input=C};Bs.parse=function(C,F){if(C.length!==2)return F.error("Expected 1 argument, but found "+(C.length-1)+" instead.");var J=F.parse(C[1],1);return J?J.type.kind!=="array"&&J.type.kind!=="string"&&J.type.kind!=="value"?F.error("Expected argument of type string or array, but found "+Zt(J.type)+" instead."):new Bs(J):null},Bs.prototype.evaluate=function(C){var F=this.input.evaluate(C);if(typeof F=="string"||Array.isArray(F))return F.length;throw new vr("Expected value to be of type string or array, but found "+Zt(Wn(F))+" instead.")},Bs.prototype.eachChild=function(C){C(this.input)},Bs.prototype.outputDefined=function(){return!1},Bs.prototype.serialize=function(){var C=["length"];return this.eachChild(function(F){C.push(F.serialize())}),C};var fl={"==":ju,"!=":Wl,">":Ec,"<":Sc,">=":Cc,"<=":ac,array:Kn,at:Jo,boolean:Kn,case:Ka,coalesce:bs,collator:Fr,format:Ln,image:lr,in:_s,"index-of":Ls,interpolate:oa,"interpolate-hcl":oa,"interpolate-lab":oa,length:Bs,let:so,literal:Or,match:Oo,number:Kn,"number-format":Ns,object:Kn,slice:$o,step:wr,string:Kn,"to-boolean":Mn,"to-color":Mn,"to-number":Mn,"to-string":Mn,var:ir,within:Tn};function hl(C,F){var J=F[0],oe=F[1],pe=F[2],xe=F[3];J=J.evaluate(C),oe=oe.evaluate(C),pe=pe.evaluate(C);var Ce=xe?xe.evaluate(C):1,Ne=In(J,oe,pe,Ce);if(Ne)throw new vr(Ne);return new tn(J/255*Ce,oe/255*Ce,pe/255*Ce,Ce)}function dl(C,F){return C in F}function Yl(C,F){var J=F[C];return J===void 0?null:J}function ws(C){return{type:C}}function Uu(C){return{result:"success",value:C}}function ds(C){return{result:"error",value:C}}function pl(C){return C["property-type"]==="data-driven"||C["property-type"]==="cross-faded-data-driven"}function Vu(C){return!!C.expression&&C.expression.parameters.indexOf("zoom")>-1}function js(C){return!!C.expression&&C.expression.interpolated}function ma(C){return C instanceof Number?"number":C instanceof String?"string":C instanceof Boolean?"boolean":Array.isArray(C)?"array":C===null?"null":typeof C}function je(C){return typeof C=="object"&&C!==null&&!Array.isArray(C)}function $e(C){return C}function Qe(C,F,J){return C!==void 0?C:F!==void 0?F:J!==void 0?J:void 0}function ut(C,F,J,oe,pe){return Qe(typeof J===pe?oe[J]:void 0,C.default,F.default)}function mt(C,F,J){if(ma(J)!=="number")return Qe(C.default,F.default);var oe=C.stops.length;if(oe===1||J<=C.stops[0][0])return C.stops[0][1];if(J>=C.stops[oe-1][0])return C.stops[oe-1][1];var pe=xr(C.stops.map(function(xe){return xe[0]}),J);return C.stops[pe][1]}function pt(C,F,J){var oe=C.base!==void 0?C.base:1;if(ma(J)!=="number")return Qe(C.default,F.default);var pe=C.stops.length;if(pe===1||J<=C.stops[0][0])return C.stops[0][1];if(J>=C.stops[pe-1][0])return C.stops[pe-1][1];var xe=xr(C.stops.map(function(Bt){return Bt[0]}),J),Ce=function(Bt,Xt,Gt,on){var vn=on-Gt,Cn=Bt-Gt;return vn===0?0:Xt===1?Cn/vn:(Math.pow(Xt,Cn)-1)/(Math.pow(Xt,vn)-1)}(J,oe,C.stops[xe][0],C.stops[xe+1][0]),Ne=C.stops[xe][1],Ze=C.stops[xe+1][1],ct=Dr[F.type]||$e;if(C.colorSpace&&C.colorSpace!=="rgb"){var gt=Zo[C.colorSpace];ct=function(Bt,Xt){return gt.reverse(gt.interpolate(gt.forward(Bt),gt.forward(Xt),Ce))}}return typeof Ne.evaluate=="function"?{evaluate:function(){for(var Bt=[],Xt=arguments.length;Xt--;)Bt[Xt]=arguments[Xt];var Gt=Ne.evaluate.apply(void 0,Bt),on=Ze.evaluate.apply(void 0,Bt);if(Gt!==void 0&&on!==void 0)return ct(Gt,on,Ce)}}:ct(Ne,Ze,Ce)}function Ct(C,F,J){return F.type==="color"?J=tn.parse(J):F.type==="formatted"?J=gn.fromString(J.toString()):F.type==="resolvedImage"?J=bn.fromString(J.toString()):ma(J)===F.type||F.type==="enum"&&F.values[J]||(J=void 0),Qe(J,C.default,F.default)}Bn.register(fl,{error:[{kind:"error"},[bt],function(C,F){var J=F[0];throw new vr(J.evaluate(C))}],typeof:[bt,[Le],function(C,F){return Zt(Wn(F[0].evaluate(C)))}],"to-rgba":[It(tt,4),[St],function(C,F){return F[0].evaluate(C).toArray()}],rgb:[St,[tt,tt,tt],hl],rgba:[St,[tt,tt,tt,tt],hl],has:{type:zt,overloads:[[[bt],function(C,F){return dl(F[0].evaluate(C),C.properties())}],[[bt,Dt],function(C,F){var J=F[0],oe=F[1];return dl(J.evaluate(C),oe.evaluate(C))}]]},get:{type:Le,overloads:[[[bt],function(C,F){return Yl(F[0].evaluate(C),C.properties())}],[[bt,Dt],function(C,F){var J=F[0],oe=F[1];return Yl(J.evaluate(C),oe.evaluate(C))}]]},"feature-state":[Le,[bt],function(C,F){return Yl(F[0].evaluate(C),C.featureState||{})}],properties:[Dt,[],function(C){return C.properties()}],"geometry-type":[bt,[],function(C){return C.geometryType()}],id:[Le,[],function(C){return C.id()}],zoom:[tt,[],function(C){return C.globals.zoom}],"heatmap-density":[tt,[],function(C){return C.globals.heatmapDensity||0}],"line-progress":[tt,[],function(C){return C.globals.lineProgress||0}],accumulated:[Le,[],function(C){return C.globals.accumulated===void 0?null:C.globals.accumulated}],"+":[tt,ws(tt),function(C,F){for(var J=0,oe=0,pe=F;oe":[zt,[bt,Le],function(C,F){var J=F[0],oe=F[1],pe=C.properties()[J.value],xe=oe.value;return typeof pe==typeof xe&&pe>xe}],"filter-id->":[zt,[Le],function(C,F){var J=F[0],oe=C.id(),pe=J.value;return typeof oe==typeof pe&&oe>pe}],"filter-<=":[zt,[bt,Le],function(C,F){var J=F[0],oe=F[1],pe=C.properties()[J.value],xe=oe.value;return typeof pe==typeof xe&&pe<=xe}],"filter-id-<=":[zt,[Le],function(C,F){var J=F[0],oe=C.id(),pe=J.value;return typeof oe==typeof pe&&oe<=pe}],"filter->=":[zt,[bt,Le],function(C,F){var J=F[0],oe=F[1],pe=C.properties()[J.value],xe=oe.value;return typeof pe==typeof xe&&pe>=xe}],"filter-id->=":[zt,[Le],function(C,F){var J=F[0],oe=C.id(),pe=J.value;return typeof oe==typeof pe&&oe>=pe}],"filter-has":[zt,[Le],function(C,F){return F[0].value in C.properties()}],"filter-has-id":[zt,[],function(C){return C.id()!==null&&C.id()!==void 0}],"filter-type-in":[zt,[It(bt)],function(C,F){return F[0].value.indexOf(C.geometryType())>=0}],"filter-id-in":[zt,[It(Le)],function(C,F){return F[0].value.indexOf(C.id())>=0}],"filter-in-small":[zt,[bt,It(Le)],function(C,F){var J=F[0];return F[1].value.indexOf(C.properties()[J.value])>=0}],"filter-in-large":[zt,[bt,It(Le)],function(C,F){var J=F[0],oe=F[1];return function(pe,xe,Ce,Ne){for(;Ce<=Ne;){var Ze=Ce+Ne>>1;if(xe[Ze]===pe)return!0;xe[Ze]>pe?Ne=Ze-1:Ce=Ze+1}return!1}(C.properties()[J.value],oe.value,0,oe.value.length-1)}],all:{type:zt,overloads:[[[zt,zt],function(C,F){var J=F[0],oe=F[1];return J.evaluate(C)&&oe.evaluate(C)}],[ws(zt),function(C,F){for(var J=0,oe=F;J0&&typeof C[0]=="string"&&C[0]in fl}function Yt(C,F){var J=new or(fl,[],F?function(pe){var xe={color:St,string:bt,number:tt,enum:bt,boolean:zt,formatted:st,resolvedImage:Et};return pe.type==="array"?It(xe[pe.value]||Le,pe.length):xe[pe.type]}(F):void 0),oe=J.parse(C,void 0,void 0,void 0,F&&F.type==="string"?{typeAnnotation:"coerce"}:void 0);return oe?Uu(new Qt(oe,F)):ds(J.errors)}Qt.prototype.evaluateWithoutErrorHandling=function(C,F,J,oe,pe,xe){return this._evaluator.globals=C,this._evaluator.feature=F,this._evaluator.featureState=J,this._evaluator.canonical=oe,this._evaluator.availableImages=pe||null,this._evaluator.formattedSection=xe,this.expression.evaluate(this._evaluator)},Qt.prototype.evaluate=function(C,F,J,oe,pe,xe){this._evaluator.globals=C,this._evaluator.feature=F||null,this._evaluator.featureState=J||null,this._evaluator.canonical=oe,this._evaluator.availableImages=pe||null,this._evaluator.formattedSection=xe||null;try{var Ce=this.expression.evaluate(this._evaluator);if(Ce==null||typeof Ce=="number"&&Ce!=Ce)return this._defaultValue;if(this._enumValues&&!(Ce in this._enumValues))throw new vr("Expected value to be one of "+Object.keys(this._enumValues).map(function(Ne){return JSON.stringify(Ne)}).join(", ")+", but found "+JSON.stringify(Ce)+" instead.");return Ce}catch(Ne){return this._warningHistory[Ne.message]||(this._warningHistory[Ne.message]=!0,typeof console<"u"&&console.warn(Ne.message)),this._defaultValue}};var an=function(C,F){this.kind=C,this._styleExpression=F,this.isStateDependent=C!=="constant"&&!Zn(F.expression)};an.prototype.evaluateWithoutErrorHandling=function(C,F,J,oe,pe,xe){return this._styleExpression.evaluateWithoutErrorHandling(C,F,J,oe,pe,xe)},an.prototype.evaluate=function(C,F,J,oe,pe,xe){return this._styleExpression.evaluate(C,F,J,oe,pe,xe)};var hn=function(C,F,J,oe){this.kind=C,this.zoomStops=J,this._styleExpression=F,this.isStateDependent=C!=="camera"&&!Zn(F.expression),this.interpolationType=oe};function xn(C,F){if((C=Yt(C,F)).result==="error")return C;var J=C.value.expression,oe=Dn(J);if(!oe&&!pl(F))return ds([new wt("","data expressions not supported")]);var pe=Yn(J,["zoom"]);if(!pe&&!Vu(F))return ds([new wt("","zoom expressions not supported")]);var xe=function Ne(Ze){var ct=null;if(Ze instanceof so)ct=Ne(Ze.result);else if(Ze instanceof bs)for(var gt=0,Bt=Ze.args;gtoe.maximum?[new He(F,J,J+" is greater than the maximum value "+oe.maximum)]:[]}function zr(C){var F,J,oe,pe=C.valueSpec,xe=ot(C.value.type),Ce={},Ne=xe!=="categorical"&&C.value.property===void 0,Ze=!Ne,ct=ma(C.value.stops)==="array"&&ma(C.value.stops[0])==="array"&&ma(C.value.stops[0][0])==="object",gt=Pn({key:C.key,value:C.value,valueSpec:C.styleSpec.function,style:C.style,styleSpec:C.styleSpec,objectElementValidators:{stops:function(Gt){if(xe==="identity")return[new He(Gt.key,Gt.value,'identity function may not have a "stops" property')];var on=[],vn=Gt.value;return on=on.concat(sr({key:Gt.key,value:vn,valueSpec:Gt.valueSpec,style:Gt.style,styleSpec:Gt.styleSpec,arrayElementValidator:Bt})),ma(vn)==="array"&&vn.length===0&&on.push(new He(Gt.key,vn,"array must have at least one stop")),on},default:function(Gt){return ln({key:Gt.key,value:Gt.value,valueSpec:pe,style:Gt.style,styleSpec:Gt.styleSpec})}}});return xe==="identity"&&Ne&>.push(new He(C.key,C.value,'missing required property "property"')),xe==="identity"||C.value.stops||gt.push(new He(C.key,C.value,'missing required property "stops"')),xe==="exponential"&&C.valueSpec.expression&&!js(C.valueSpec)&>.push(new He(C.key,C.value,"exponential functions not supported")),C.styleSpec.$version>=8&&(Ze&&!pl(C.valueSpec)?gt.push(new He(C.key,C.value,"property functions not supported")):Ne&&!Vu(C.valueSpec)&>.push(new He(C.key,C.value,"zoom functions not supported"))),xe!=="categorical"&&!ct||C.value.property!==void 0||gt.push(new He(C.key,C.value,'"property" property is required')),gt;function Bt(Gt){var on=[],vn=Gt.value,Cn=Gt.key;if(ma(vn)!=="array")return[new He(Cn,vn,"array expected, "+ma(vn)+" found")];if(vn.length!==2)return[new He(Cn,vn,"array length 2 expected, length "+vn.length+" found")];if(ct){if(ma(vn[0])!=="object")return[new He(Cn,vn,"object expected, "+ma(vn[0])+" found")];if(vn[0].zoom===void 0)return[new He(Cn,vn,"object stop key must have zoom")];if(vn[0].value===void 0)return[new He(Cn,vn,"object stop key must have value")];if(oe&&oe>ot(vn[0].zoom))return[new He(Cn,vn[0].zoom,"stop zoom values must appear in ascending order")];ot(vn[0].zoom)!==oe&&(oe=ot(vn[0].zoom),J=void 0,Ce={}),on=on.concat(Pn({key:Cn+"[0]",value:vn[0],valueSpec:{zoom:{}},style:Gt.style,styleSpec:Gt.styleSpec,objectElementValidators:{zoom:mr,value:Xt}}))}else on=on.concat(Xt({key:Cn+"[0]",value:vn[0],valueSpec:{},style:Gt.style,styleSpec:Gt.styleSpec},vn));return en(kt(vn[1]))?on.concat([new He(Cn+"[1]",vn[1],"expressions are not allowed in function stops.")]):on.concat(ln({key:Cn+"[1]",value:vn[1],valueSpec:pe,style:Gt.style,styleSpec:Gt.styleSpec}))}function Xt(Gt,on){var vn=ma(Gt.value),Cn=ot(Gt.value),En=Gt.value!==null?Gt.value:on;if(F){if(vn!==F)return[new He(Gt.key,En,vn+" stop domain type must match previous stop domain type "+F)]}else F=vn;if(vn!=="number"&&vn!=="string"&&vn!=="boolean")return[new He(Gt.key,En,"stop domain value must be a number, string, or boolean")];if(vn!=="number"&&xe!=="categorical"){var Vn="number expected, "+vn+" found";return pl(pe)&&xe===void 0&&(Vn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new He(Gt.key,En,Vn)]}return xe!=="categorical"||vn!=="number"||isFinite(Cn)&&Math.floor(Cn)===Cn?xe!=="categorical"&&vn==="number"&&J!==void 0&&Cn=2&&C[1]!=="$id"&&C[1]!=="$type";case"in":return C.length>=3&&(typeof C[1]!="string"||Array.isArray(C[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return C.length!==3||Array.isArray(C[1])||Array.isArray(C[2]);case"any":case"all":for(var F=0,J=C.slice(1);FF?1:0}function sa(C){if(!C)return!0;var F,J=C[0];return C.length<=1?J!=="any":J==="=="?ca(C[1],C[2],"=="):J==="!="?za(ca(C[1],C[2],"==")):J==="<"||J===">"||J==="<="||J===">="?ca(C[1],C[2],J):J==="any"?(F=C.slice(1),["any"].concat(F.map(sa))):J==="all"?["all"].concat(C.slice(1).map(sa)):J==="none"?["all"].concat(C.slice(1).map(sa).map(za)):J==="in"?lo(C[1],C.slice(2)):J==="!in"?za(lo(C[1],C.slice(2))):J==="has"?io(C[1]):J==="!has"?za(io(C[1])):J!=="within"||C}function ca(C,F,J){switch(C){case"$type":return["filter-type-"+J,F];case"$id":return["filter-id-"+J,F];default:return["filter-"+J,C,F]}}function lo(C,F){if(F.length===0)return!1;switch(C){case"$type":return["filter-type-in",["literal",F]];case"$id":return["filter-id-in",["literal",F]];default:return F.length>200&&!F.some(function(J){return typeof J!=typeof F[0]})?["filter-in-large",C,["literal",F.sort(ua)]]:["filter-in-small",C,["literal",F]]}}function io(C){switch(C){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",C]}}function za(C){return["!",C]}function Ra(C){return jr(kt(C.value))?Br(lt({},C,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function F(J){var oe=J.value,pe=J.key;if(ma(oe)!=="array")return[new He(pe,oe,"array expected, "+ma(oe)+" found")];var xe,Ce=J.styleSpec,Ne=[];if(oe.length<1)return[new He(pe,oe,"filter array must have at least 1 element")];switch(Ne=Ne.concat(Jr({key:pe+"[0]",value:oe[0],valueSpec:Ce.filter_operator,style:J.style,styleSpec:J.styleSpec})),ot(oe[0])){case"<":case"<=":case">":case">=":oe.length>=2&&ot(oe[1])==="$type"&&Ne.push(new He(pe,oe,'"$type" cannot be use with operator "'+oe[0]+'"'));case"==":case"!=":oe.length!==3&&Ne.push(new He(pe,oe,'filter array for operator "'+oe[0]+'" must have 3 elements'));case"in":case"!in":oe.length>=2&&(xe=ma(oe[1]))!=="string"&&Ne.push(new He(pe+"[1]",oe[1],"string expected, "+xe+" found"));for(var Ze=2;Ze=gt[Gt+0]&&oe>=gt[Gt+1])?(Ce[Xt]=!0,xe.push(ct[Xt])):Ce[Xt]=!1}}},Ar.prototype._forEachCell=function(C,F,J,oe,pe,xe,Ce,Ne){for(var Ze=this._convertToCellCoord(C),ct=this._convertToCellCoord(F),gt=this._convertToCellCoord(J),Bt=this._convertToCellCoord(oe),Xt=Ze;Xt<=gt;Xt++)for(var Gt=ct;Gt<=Bt;Gt++){var on=this.d*Gt+Xt;if((!Ne||Ne(this._convertFromCellCoord(Xt),this._convertFromCellCoord(Gt),this._convertFromCellCoord(Xt+1),this._convertFromCellCoord(Gt+1)))&&pe.call(this,C,F,J,oe,on,xe,Ce,Ne))return}},Ar.prototype._convertFromCellCoord=function(C){return(C-this.padding)/this.scale},Ar.prototype._convertToCellCoord=function(C){return Math.max(0,Math.min(this.d-1,Math.floor(C*this.scale)+this.padding))},Ar.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var C=this.cells,F=3+this.cells.length+1+1,J=0,oe=0;oe=0)){var Bt=C[gt];ct[gt]=mi[Ze].shallow.indexOf(gt)>=0?Bt:fi(Bt,F)}C instanceof Error&&(ct.message=C.message)}if(ct.$name)throw new Error("$name property is reserved for worker serialization logic.");return Ze!=="Object"&&(ct.$name=Ze),ct}throw new Error("can't serialize object of type "+typeof C)}function Ni(C){if(C==null||typeof C=="boolean"||typeof C=="number"||typeof C=="string"||C instanceof Boolean||C instanceof Number||C instanceof String||C instanceof Date||C instanceof RegExp||Rr(C)||Gr(C)||ArrayBuffer.isView(C)||C instanceof Ur)return C;if(Array.isArray(C))return C.map(Ni);if(typeof C=="object"){var F=C.$name||"Object",J=mi[F].klass;if(!J)throw new Error("can't deserialize unregistered class "+F);if(J.deserialize)return J.deserialize(C);for(var oe=Object.create(J.prototype),pe=0,xe=Object.keys(C);pe=0?Ne:Ni(Ne)}}return oe}throw new Error("can't deserialize object of type "+typeof C)}var Ki=function(){this.first=!0};Ki.prototype.update=function(C,F){var J=Math.floor(C);return this.first?(this.first=!1,this.lastIntegerZoom=J,this.lastIntegerZoomTime=0,this.lastZoom=C,this.lastFloorZoom=J,!0):(this.lastFloorZoom>J?(this.lastIntegerZoom=J+1,this.lastIntegerZoomTime=F):this.lastFloorZoom=128&&C<=255},Arabic:function(C){return C>=1536&&C<=1791},"Arabic Supplement":function(C){return C>=1872&&C<=1919},"Arabic Extended-A":function(C){return C>=2208&&C<=2303},"Hangul Jamo":function(C){return C>=4352&&C<=4607},"Unified Canadian Aboriginal Syllabics":function(C){return C>=5120&&C<=5759},Khmer:function(C){return C>=6016&&C<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(C){return C>=6320&&C<=6399},"General Punctuation":function(C){return C>=8192&&C<=8303},"Letterlike Symbols":function(C){return C>=8448&&C<=8527},"Number Forms":function(C){return C>=8528&&C<=8591},"Miscellaneous Technical":function(C){return C>=8960&&C<=9215},"Control Pictures":function(C){return C>=9216&&C<=9279},"Optical Character Recognition":function(C){return C>=9280&&C<=9311},"Enclosed Alphanumerics":function(C){return C>=9312&&C<=9471},"Geometric Shapes":function(C){return C>=9632&&C<=9727},"Miscellaneous Symbols":function(C){return C>=9728&&C<=9983},"Miscellaneous Symbols and Arrows":function(C){return C>=11008&&C<=11263},"CJK Radicals Supplement":function(C){return C>=11904&&C<=12031},"Kangxi Radicals":function(C){return C>=12032&&C<=12255},"Ideographic Description Characters":function(C){return C>=12272&&C<=12287},"CJK Symbols and Punctuation":function(C){return C>=12288&&C<=12351},Hiragana:function(C){return C>=12352&&C<=12447},Katakana:function(C){return C>=12448&&C<=12543},Bopomofo:function(C){return C>=12544&&C<=12591},"Hangul Compatibility Jamo":function(C){return C>=12592&&C<=12687},Kanbun:function(C){return C>=12688&&C<=12703},"Bopomofo Extended":function(C){return C>=12704&&C<=12735},"CJK Strokes":function(C){return C>=12736&&C<=12783},"Katakana Phonetic Extensions":function(C){return C>=12784&&C<=12799},"Enclosed CJK Letters and Months":function(C){return C>=12800&&C<=13055},"CJK Compatibility":function(C){return C>=13056&&C<=13311},"CJK Unified Ideographs Extension A":function(C){return C>=13312&&C<=19903},"Yijing Hexagram Symbols":function(C){return C>=19904&&C<=19967},"CJK Unified Ideographs":function(C){return C>=19968&&C<=40959},"Yi Syllables":function(C){return C>=40960&&C<=42127},"Yi Radicals":function(C){return C>=42128&&C<=42191},"Hangul Jamo Extended-A":function(C){return C>=43360&&C<=43391},"Hangul Syllables":function(C){return C>=44032&&C<=55215},"Hangul Jamo Extended-B":function(C){return C>=55216&&C<=55295},"Private Use Area":function(C){return C>=57344&&C<=63743},"CJK Compatibility Ideographs":function(C){return C>=63744&&C<=64255},"Arabic Presentation Forms-A":function(C){return C>=64336&&C<=65023},"Vertical Forms":function(C){return C>=65040&&C<=65055},"CJK Compatibility Forms":function(C){return C>=65072&&C<=65103},"Small Form Variants":function(C){return C>=65104&&C<=65135},"Arabic Presentation Forms-B":function(C){return C>=65136&&C<=65279},"Halfwidth and Fullwidth Forms":function(C){return C>=65280&&C<=65519}};function ra(C){for(var F=0,J=C;F=65097&&C<=65103)||!!Lr["CJK Compatibility Ideographs"](C)||!!Lr["CJK Compatibility"](C)||!!Lr["CJK Radicals Supplement"](C)||!!Lr["CJK Strokes"](C)||!(!Lr["CJK Symbols and Punctuation"](C)||C>=12296&&C<=12305||C>=12308&&C<=12319||C===12336)||!!Lr["CJK Unified Ideographs Extension A"](C)||!!Lr["CJK Unified Ideographs"](C)||!!Lr["Enclosed CJK Letters and Months"](C)||!!Lr["Hangul Compatibility Jamo"](C)||!!Lr["Hangul Jamo Extended-A"](C)||!!Lr["Hangul Jamo Extended-B"](C)||!!Lr["Hangul Jamo"](C)||!!Lr["Hangul Syllables"](C)||!!Lr.Hiragana(C)||!!Lr["Ideographic Description Characters"](C)||!!Lr.Kanbun(C)||!!Lr["Kangxi Radicals"](C)||!!Lr["Katakana Phonetic Extensions"](C)||!(!Lr.Katakana(C)||C===12540)||!(!Lr["Halfwidth and Fullwidth Forms"](C)||C===65288||C===65289||C===65293||C>=65306&&C<=65310||C===65339||C===65341||C===65343||C>=65371&&C<=65503||C===65507||C>=65512&&C<=65519)||!(!Lr["Small Form Variants"](C)||C>=65112&&C<=65118||C>=65123&&C<=65126)||!!Lr["Unified Canadian Aboriginal Syllabics"](C)||!!Lr["Unified Canadian Aboriginal Syllabics Extended"](C)||!!Lr["Vertical Forms"](C)||!!Lr["Yijing Hexagram Symbols"](C)||!!Lr["Yi Syllables"](C)||!!Lr["Yi Radicals"](C))}function ia(C){return!(Ci(C)||function(F){return!(!Lr["Latin-1 Supplement"](F)||F!==167&&F!==169&&F!==174&&F!==177&&F!==188&&F!==189&&F!==190&&F!==215&&F!==247)||!(!Lr["General Punctuation"](F)||F!==8214&&F!==8224&&F!==8225&&F!==8240&&F!==8241&&F!==8251&&F!==8252&&F!==8258&&F!==8263&&F!==8264&&F!==8265&&F!==8273)||!!Lr["Letterlike Symbols"](F)||!!Lr["Number Forms"](F)||!(!Lr["Miscellaneous Technical"](F)||!(F>=8960&&F<=8967||F>=8972&&F<=8991||F>=8996&&F<=9e3||F===9003||F>=9085&&F<=9114||F>=9150&&F<=9165||F===9167||F>=9169&&F<=9179||F>=9186&&F<=9215))||!(!Lr["Control Pictures"](F)||F===9251)||!!Lr["Optical Character Recognition"](F)||!!Lr["Enclosed Alphanumerics"](F)||!!Lr["Geometric Shapes"](F)||!(!Lr["Miscellaneous Symbols"](F)||F>=9754&&F<=9759)||!(!Lr["Miscellaneous Symbols and Arrows"](F)||!(F>=11026&&F<=11055||F>=11088&&F<=11097||F>=11192&&F<=11243))||!!Lr["CJK Symbols and Punctuation"](F)||!!Lr.Katakana(F)||!!Lr["Private Use Area"](F)||!!Lr["CJK Compatibility Forms"](F)||!!Lr["Small Form Variants"](F)||!!Lr["Halfwidth and Fullwidth Forms"](F)||F===8734||F===8756||F===8757||F>=9984&&F<=10087||F>=10102&&F<=10131||F===65532||F===65533}(C))}function Wi(C){return C>=1424&&C<=2303||Lr["Arabic Presentation Forms-A"](C)||Lr["Arabic Presentation Forms-B"](C)}function Ca(C,F){return!(!F&&Wi(C))&&!(C>=2304&&C<=3583||C>=3840&&C<=4255||Lr.Khmer(C))}function pi(C){for(var F=0,J=C;F-1&&(Pi=Zs),ks&&ks(C)};function wa(){uo.fire(new Pe("pluginStateChange",{pluginStatus:Pi,pluginURL:Qa}))}var uo=new Ae,jo=function(){return Pi},La=function(){if(Pi!==_a||!Qa)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Pi=Po,wa(),Qa&&Ot({url:Qa},function(C){C?Ts(C):(Pi=Al,wa())})},ps={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Pi===Al||ps.applyArabicShaping!=null},isLoading:function(){return Pi===Po},setState:function(C){Pi=C.pluginStatus,Qa=C.pluginURL},isParsed:function(){return ps.applyArabicShaping!=null&&ps.processBidirectionalText!=null&&ps.processStyledBidirectionalText!=null},getPluginURL:function(){return Qa}},Pa=function(C,F){this.zoom=C,F?(this.now=F.now,this.fadeDuration=F.fadeDuration,this.zoomHistory=F.zoomHistory,this.transition=F.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ki,this.transition={})};Pa.prototype.isSupportedScript=function(C){return function(F,J){for(var oe=0,pe=F;oethis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:F+(1-F)*J}:{fromScale:.5,toScale:1,t:1-(1-J)*F}};var ns=function(C,F){this.property=C,this.value=F,this.expression=function(J,oe){if(je(J))return new _n(J,oe);if(en(J)){var pe=xn(J,oe);if(pe.result==="error")throw new Error(pe.value.map(function(Ce){return Ce.key+": "+Ce.message}).join(", "));return pe.value}var xe=J;return typeof J=="string"&&oe.type==="color"&&(xe=tn.parse(J)),{kind:"constant",evaluate:function(){return xe}}}(F===void 0?C.specification.default:F,C.specification)};ns.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},ns.prototype.possiblyEvaluate=function(C,F,J){return this.property.possiblyEvaluate(this,C,F,J)};var mu=function(C){this.property=C,this.value=new ns(C,void 0)};mu.prototype.transitioned=function(C,F){return new xf(this.property,this.value,F,x({},C.transition,this.transition),C.now)},mu.prototype.untransitioned=function(){return new xf(this.property,this.value,null,{},0)};var Xl=function(C){this._properties=C,this._values=Object.create(C.defaultTransitionablePropertyValues)};Xl.prototype.getValue=function(C){return E(this._values[C].value.value)},Xl.prototype.setValue=function(C,F){this._values.hasOwnProperty(C)||(this._values[C]=new mu(this._values[C].property)),this._values[C].value=new ns(this._values[C].property,F===null?void 0:E(F))},Xl.prototype.getTransition=function(C){return E(this._values[C].transition)},Xl.prototype.setTransition=function(C,F){this._values.hasOwnProperty(C)||(this._values[C]=new mu(this._values[C].property)),this._values[C].transition=E(F)||void 0},Xl.prototype.serialize=function(){for(var C={},F=0,J=Object.keys(this._values);Fthis.end)return this.prior=null,pe;if(this.value.isDataDriven())return this.prior=null,pe;if(oe=1)return 1;var Ze=Ne*Ne,ct=Ze*Ne;return 4*(Ne<.5?ct:3*(Ne-Ze)+ct-.75)}(Ce))}return pe};var Mo=function(C){this._properties=C,this._values=Object.create(C.defaultTransitioningPropertyValues)};Mo.prototype.possiblyEvaluate=function(C,F,J){for(var oe=new Zl(this._properties),pe=0,xe=Object.keys(this._values);pexe.zoomHistory.lastIntegerZoom?{from:J,to:oe}:{from:pe,to:oe}},F.prototype.interpolate=function(J){return J},F}(Di),wf=function(C){this.specification=C};wf.prototype.possiblyEvaluate=function(C,F,J,oe){if(C.value!==void 0){if(C.expression.kind==="constant"){var pe=C.expression.evaluate(F,null,{},J,oe);return this._calculate(pe,pe,pe,F)}return this._calculate(C.expression.evaluate(new Pa(Math.floor(F.zoom-1),F)),C.expression.evaluate(new Pa(Math.floor(F.zoom),F)),C.expression.evaluate(new Pa(Math.floor(F.zoom+1),F)),F)}},wf.prototype._calculate=function(C,F,J,oe){return oe.zoom>oe.zoomHistory.lastIntegerZoom?{from:C,to:F}:{from:J,to:F}},wf.prototype.interpolate=function(C){return C};var Jl=function(C){this.specification=C};Jl.prototype.possiblyEvaluate=function(C,F,J,oe){return!!C.expression.evaluate(F,null,{},J,oe)},Jl.prototype.interpolate=function(){return!1};var Us=function(C){for(var F in this.properties=C,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],C){var J=C[F];J.specification.overridable&&this.overridableProperties.push(F);var oe=this.defaultPropertyValues[F]=new ns(J,void 0),pe=this.defaultTransitionablePropertyValues[F]=new mu(J);this.defaultTransitioningPropertyValues[F]=pe.untransitioned(),this.defaultPossiblyEvaluatedValues[F]=oe.possiblyEvaluate({})}};Qn("DataDrivenProperty",Di),Qn("DataConstantProperty",wi),Qn("CrossFadedDataDrivenProperty",_f),Qn("CrossFadedProperty",wf),Qn("ColorRampProperty",Jl);var ml=function(C){function F(J,oe){if(C.call(this),this.id=J.id,this.type=J.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},J.type!=="custom"&&(J=J,this.metadata=J.metadata,this.minzoom=J.minzoom,this.maxzoom=J.maxzoom,J.type!=="background"&&(this.source=J.source,this.sourceLayer=J["source-layer"],this.filter=J.filter),oe.layout&&(this._unevaluatedLayout=new bf(oe.layout)),oe.paint)){for(var pe in this._transitionablePaint=new Xl(oe.paint),J.paint)this.setPaintProperty(pe,J.paint[pe],{validate:!1});for(var xe in J.layout)this.setLayoutProperty(xe,J.layout[xe],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Zl(oe.paint)}}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},F.prototype.getLayoutProperty=function(J){return J==="visibility"?this.visibility:this._unevaluatedLayout.getValue(J)},F.prototype.setLayoutProperty=function(J,oe,pe){if(pe===void 0&&(pe={}),oe!=null){var xe="layers."+this.id+".layout."+J;if(this._validate(yr,xe,J,oe,pe))return}J!=="visibility"?this._unevaluatedLayout.setValue(J,oe):this.visibility=oe},F.prototype.getPaintProperty=function(J){return S(J,"-transition")?this._transitionablePaint.getTransition(J.slice(0,-11)):this._transitionablePaint.getValue(J)},F.prototype.setPaintProperty=function(J,oe,pe){if(pe===void 0&&(pe={}),oe!=null){var xe="layers."+this.id+".paint."+J;if(this._validate(ur,xe,J,oe,pe))return!1}if(S(J,"-transition"))return this._transitionablePaint.setTransition(J.slice(0,-11),oe||void 0),!1;var Ce=this._transitionablePaint._values[J],Ne=Ce.property.specification["property-type"]==="cross-faded-data-driven",Ze=Ce.value.isDataDriven(),ct=Ce.value;this._transitionablePaint.setValue(J,oe),this._handleSpecialPaintPropertyUpdate(J);var gt=this._transitionablePaint._values[J].value;return gt.isDataDriven()||Ze||Ne||this._handleOverridablePaintPropertyUpdate(J,ct,gt)},F.prototype._handleSpecialPaintPropertyUpdate=function(J){},F.prototype._handleOverridablePaintPropertyUpdate=function(J,oe,pe){return!1},F.prototype.isHidden=function(J){return!!(this.minzoom&&J=this.maxzoom)||this.visibility==="none"},F.prototype.updateTransitions=function(J){this._transitioningPaint=this._transitionablePaint.transitioned(J,this._transitioningPaint)},F.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},F.prototype.recalculate=function(J,oe){J.getCrossfadeParameters&&(this._crossfadeParameters=J.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(J,void 0,oe)),this.paint=this._transitioningPaint.possiblyEvaluate(J,void 0,oe)},F.prototype.serialize=function(){var J={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&&(J.layout=J.layout||{},J.layout.visibility=this.visibility),M(J,function(oe,pe){return!(oe===void 0||pe==="layout"&&!Object.keys(oe).length||pe==="paint"&&!Object.keys(oe).length)})},F.prototype._validate=function(J,oe,pe,xe,Ce){return Ce===void 0&&(Ce={}),(!Ce||Ce.validate!==!1)&&Tr(this,J.call(Jn,{key:oe,layerType:this.type,objectKey:pe,value:xe,styleSpec:De,style:{glyphs:!0,sprite:!0}}))},F.prototype.is3D=function(){return!1},F.prototype.isTileClipped=function(){return!1},F.prototype.hasOffscreenPass=function(){return!1},F.prototype.resize=function(){},F.prototype.isStateDependent=function(){for(var J in this.paint._values){var oe=this.paint.get(J);if(oe instanceof So&&pl(oe.property.specification)&&(oe.value.kind==="source"||oe.value.kind==="composite")&&oe.value.isStateDependent)return!0}return!1},F}(Ae),id={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Oc=function(C,F){this._structArray=C,this._pos1=F*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},ka=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Da(C,F){F===void 0&&(F=1);var J=0,oe=0;return{members:C.map(function(pe){var xe,Ce=(xe=pe.type,id[xe].BYTES_PER_ELEMENT),Ne=J=qu(J,Math.max(F,Ce)),Ze=pe.components||1;return oe=Math.max(oe,Ce),J+=Ce*Ze,{name:pe.name,type:pe.type,components:Ze,offset:Ne}}),size:qu(J,Math.max(oe,F)),alignment:F}}function qu(C,F){return Math.ceil(C/F)*F}ka.serialize=function(C,F){return C._trim(),F&&(C.isTransferred=!0,F.push(C.arrayBuffer)),{length:C.length,arrayBuffer:C.arrayBuffer}},ka.deserialize=function(C){var F=Object.create(this.prototype);return F.arrayBuffer=C.arrayBuffer,F.length=C.length,F.capacity=C.arrayBuffer.byteLength/F.bytesPerElement,F._refreshViews(),F},ka.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ka.prototype.clear=function(){this.length=0},ka.prototype.resize=function(C){this.reserve(C),this.length=C},ka.prototype.reserve=function(C){if(C>this.capacity){this.capacity=Math.max(C,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var F=this.uint8;this._refreshViews(),F&&this.uint8.set(F)}},ka.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var vu=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe){var pe=this.length;return this.resize(pe+1),this.emplace(pe,J,oe)},F.prototype.emplace=function(J,oe,pe){var xe=2*J;return this.int16[xe+0]=oe,this.int16[xe+1]=pe,J},F}(ka);vu.prototype.bytesPerElement=4,Qn("StructArrayLayout2i4",vu);var yo=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe){var Ce=this.length;return this.resize(Ce+1),this.emplace(Ce,J,oe,pe,xe)},F.prototype.emplace=function(J,oe,pe,xe,Ce){var Ne=4*J;return this.int16[Ne+0]=oe,this.int16[Ne+1]=pe,this.int16[Ne+2]=xe,this.int16[Ne+3]=Ce,J},F}(ka);yo.prototype.bytesPerElement=8,Qn("StructArrayLayout4i8",yo);var Hu=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce,Ne){var Ze=this.length;return this.resize(Ze+1),this.emplace(Ze,J,oe,pe,xe,Ce,Ne)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne,Ze){var ct=6*J;return this.int16[ct+0]=oe,this.int16[ct+1]=pe,this.int16[ct+2]=xe,this.int16[ct+3]=Ce,this.int16[ct+4]=Ne,this.int16[ct+5]=Ze,J},F}(ka);Hu.prototype.bytesPerElement=12,Qn("StructArrayLayout2i4i12",Hu);var Lc=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce,Ne){var Ze=this.length;return this.resize(Ze+1),this.emplace(Ze,J,oe,pe,xe,Ce,Ne)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne,Ze){var ct=4*J,gt=8*J;return this.int16[ct+0]=oe,this.int16[ct+1]=pe,this.uint8[gt+4]=xe,this.uint8[gt+5]=Ce,this.uint8[gt+6]=Ne,this.uint8[gt+7]=Ze,J},F}(ka);Lc.prototype.bytesPerElement=8,Qn("StructArrayLayout2i4ub8",Lc);var oc=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt){var Xt=this.length;return this.resize(Xt+1),this.emplace(Xt,J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt){var Gt=9*J,on=18*J;return this.uint16[Gt+0]=oe,this.uint16[Gt+1]=pe,this.uint16[Gt+2]=xe,this.uint16[Gt+3]=Ce,this.uint16[Gt+4]=Ne,this.uint16[Gt+5]=Ze,this.uint16[Gt+6]=ct,this.uint16[Gt+7]=gt,this.uint8[on+16]=Bt,this.uint8[on+17]=Xt,J},F}(ka);oc.prototype.bytesPerElement=18,Qn("StructArrayLayout8ui2ub18",oc);var Pc=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt){var on=this.length;return this.resize(on+1),this.emplace(on,J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt,on){var vn=12*J;return this.int16[vn+0]=oe,this.int16[vn+1]=pe,this.int16[vn+2]=xe,this.int16[vn+3]=Ce,this.uint16[vn+4]=Ne,this.uint16[vn+5]=Ze,this.uint16[vn+6]=ct,this.uint16[vn+7]=gt,this.int16[vn+8]=Bt,this.int16[vn+9]=Xt,this.int16[vn+10]=Gt,this.int16[vn+11]=on,J},F}(ka);Pc.prototype.bytesPerElement=24,Qn("StructArrayLayout4i4ui4i24",Pc);var yu=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe){var xe=this.length;return this.resize(xe+1),this.emplace(xe,J,oe,pe)},F.prototype.emplace=function(J,oe,pe,xe){var Ce=3*J;return this.float32[Ce+0]=oe,this.float32[Ce+1]=pe,this.float32[Ce+2]=xe,J},F}(ka);yu.prototype.bytesPerElement=12,Qn("StructArrayLayout3f12",yu);var ad=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J){var oe=this.length;return this.resize(oe+1),this.emplace(oe,J)},F.prototype.emplace=function(J,oe){var pe=1*J;return this.uint32[pe+0]=oe,J},F}(ka);ad.prototype.bytesPerElement=4,Qn("StructArrayLayout1ul4",ad);var Ap=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.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)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt){var Bt=this.length;return this.resize(Bt+1),this.emplace(Bt,J,oe,pe,xe,Ce,Ne,Ze,ct,gt)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt){var Xt=10*J,Gt=5*J;return this.int16[Xt+0]=oe,this.int16[Xt+1]=pe,this.int16[Xt+2]=xe,this.int16[Xt+3]=Ce,this.int16[Xt+4]=Ne,this.int16[Xt+5]=Ze,this.uint32[Gt+3]=ct,this.uint16[Xt+8]=gt,this.uint16[Xt+9]=Bt,J},F}(ka);Ap.prototype.bytesPerElement=20,Qn("StructArrayLayout6i1ul2ui20",Ap);var $u=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce,Ne){var Ze=this.length;return this.resize(Ze+1),this.emplace(Ze,J,oe,pe,xe,Ce,Ne)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne,Ze){var ct=6*J;return this.int16[ct+0]=oe,this.int16[ct+1]=pe,this.int16[ct+2]=xe,this.int16[ct+3]=Ce,this.int16[ct+4]=Ne,this.int16[ct+5]=Ze,J},F}(ka);$u.prototype.bytesPerElement=12,Qn("StructArrayLayout2i2i2i12",$u);var od=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce){var Ne=this.length;return this.resize(Ne+1),this.emplace(Ne,J,oe,pe,xe,Ce)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne){var Ze=4*J,ct=8*J;return this.float32[Ze+0]=oe,this.float32[Ze+1]=pe,this.float32[Ze+2]=xe,this.int16[ct+6]=Ce,this.int16[ct+7]=Ne,J},F}(ka);od.prototype.bytesPerElement=16,Qn("StructArrayLayout2f1f2i16",od);var Dc=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe){var Ce=this.length;return this.resize(Ce+1),this.emplace(Ce,J,oe,pe,xe)},F.prototype.emplace=function(J,oe,pe,xe,Ce){var Ne=12*J,Ze=3*J;return this.uint8[Ne+0]=oe,this.uint8[Ne+1]=pe,this.float32[Ze+1]=xe,this.float32[Ze+2]=Ce,J},F}(ka);Dc.prototype.bytesPerElement=12,Qn("StructArrayLayout2ub2f12",Dc);var rs=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe){var xe=this.length;return this.resize(xe+1),this.emplace(xe,J,oe,pe)},F.prototype.emplace=function(J,oe,pe,xe){var Ce=3*J;return this.uint16[Ce+0]=oe,this.uint16[Ce+1]=pe,this.uint16[Ce+2]=xe,J},F}(ka);rs.prototype.bytesPerElement=6,Qn("StructArrayLayout3ui6",rs);var Mp=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.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)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt,on,vn,Cn,En,Vn){var qn=this.length;return this.resize(qn+1),this.emplace(qn,J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt,on,vn,Cn,En,Vn)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt,on,vn,Cn,En,Vn,qn){var Xn=24*J,dr=12*J,br=48*J;return this.int16[Xn+0]=oe,this.int16[Xn+1]=pe,this.uint16[Xn+2]=xe,this.uint16[Xn+3]=Ce,this.uint32[dr+2]=Ne,this.uint32[dr+3]=Ze,this.uint32[dr+4]=ct,this.uint16[Xn+10]=gt,this.uint16[Xn+11]=Bt,this.uint16[Xn+12]=Xt,this.float32[dr+7]=Gt,this.float32[dr+8]=on,this.uint8[br+36]=vn,this.uint8[br+37]=Cn,this.uint8[br+38]=En,this.uint32[dr+10]=Vn,this.int16[Xn+22]=qn,J},F}(ka);Mp.prototype.bytesPerElement=48,Qn("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Mp);var Sp=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.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)},F.prototype.emplaceBack=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt,on,vn,Cn,En,Vn,qn,Xn,dr,br,Hr,Vr,ei,vi,yi,li,Si){var Ai=this.length;return this.resize(Ai+1),this.emplace(Ai,J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt,on,vn,Cn,En,Vn,qn,Xn,dr,br,Hr,Vr,ei,vi,yi,li,Si)},F.prototype.emplace=function(J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt,on,vn,Cn,En,Vn,qn,Xn,dr,br,Hr,Vr,ei,vi,yi,li,Si,Ai){var xi=34*J,Ta=17*J;return this.int16[xi+0]=oe,this.int16[xi+1]=pe,this.int16[xi+2]=xe,this.int16[xi+3]=Ce,this.int16[xi+4]=Ne,this.int16[xi+5]=Ze,this.int16[xi+6]=ct,this.int16[xi+7]=gt,this.uint16[xi+8]=Bt,this.uint16[xi+9]=Xt,this.uint16[xi+10]=Gt,this.uint16[xi+11]=on,this.uint16[xi+12]=vn,this.uint16[xi+13]=Cn,this.uint16[xi+14]=En,this.uint16[xi+15]=Vn,this.uint16[xi+16]=qn,this.uint16[xi+17]=Xn,this.uint16[xi+18]=dr,this.uint16[xi+19]=br,this.uint16[xi+20]=Hr,this.uint16[xi+21]=Vr,this.uint16[xi+22]=ei,this.uint32[Ta+12]=vi,this.float32[Ta+13]=yi,this.float32[Ta+14]=li,this.float32[Ta+15]=Si,this.float32[Ta+16]=Ai,J},F}(ka);Sp.prototype.bytesPerElement=68,Qn("StructArrayLayout8i15ui1ul4f68",Sp);var ce=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J){var oe=this.length;return this.resize(oe+1),this.emplace(oe,J)},F.prototype.emplace=function(J,oe){var pe=1*J;return this.float32[pe+0]=oe,J},F}(ka);ce.prototype.bytesPerElement=4,Qn("StructArrayLayout1f4",ce);var I=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe){var xe=this.length;return this.resize(xe+1),this.emplace(xe,J,oe,pe)},F.prototype.emplace=function(J,oe,pe,xe){var Ce=3*J;return this.int16[Ce+0]=oe,this.int16[Ce+1]=pe,this.int16[Ce+2]=xe,J},F}(ka);I.prototype.bytesPerElement=6,Qn("StructArrayLayout3i6",I);var j=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe){var xe=this.length;return this.resize(xe+1),this.emplace(xe,J,oe,pe)},F.prototype.emplace=function(J,oe,pe,xe){var Ce=2*J,Ne=4*J;return this.uint32[Ce+0]=oe,this.uint16[Ne+2]=pe,this.uint16[Ne+3]=xe,J},F}(ka);j.prototype.bytesPerElement=8,Qn("StructArrayLayout1ul2ui8",j);var V=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe){var pe=this.length;return this.resize(pe+1),this.emplace(pe,J,oe)},F.prototype.emplace=function(J,oe,pe){var xe=2*J;return this.uint16[xe+0]=oe,this.uint16[xe+1]=pe,J},F}(ka);V.prototype.bytesPerElement=4,Qn("StructArrayLayout2ui4",V);var X=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J){var oe=this.length;return this.resize(oe+1),this.emplace(oe,J)},F.prototype.emplace=function(J,oe){var pe=1*J;return this.uint16[pe+0]=oe,J},F}(ka);X.prototype.bytesPerElement=2,Qn("StructArrayLayout1ui2",X);var se=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe){var pe=this.length;return this.resize(pe+1),this.emplace(pe,J,oe)},F.prototype.emplace=function(J,oe,pe){var xe=2*J;return this.float32[xe+0]=oe,this.float32[xe+1]=pe,J},F}(ka);se.prototype.bytesPerElement=8,Qn("StructArrayLayout2f8",se);var he=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},F.prototype.emplaceBack=function(J,oe,pe,xe){var Ce=this.length;return this.resize(Ce+1),this.emplace(Ce,J,oe,pe,xe)},F.prototype.emplace=function(J,oe,pe,xe,Ce){var Ne=4*J;return this.float32[Ne+0]=oe,this.float32[Ne+1]=pe,this.float32[Ne+2]=xe,this.float32[Ne+3]=Ce,J},F}(ka);he.prototype.bytesPerElement=16,Qn("StructArrayLayout4f16",he);var ve=function(C){function F(){C.apply(this,arguments)}C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F;var J={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 J.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},J.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},J.x1.get=function(){return this._structArray.int16[this._pos2+2]},J.y1.get=function(){return this._structArray.int16[this._pos2+3]},J.x2.get=function(){return this._structArray.int16[this._pos2+4]},J.y2.get=function(){return this._structArray.int16[this._pos2+5]},J.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},J.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},J.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},J.anchorPoint.get=function(){return new h(this.anchorPointX,this.anchorPointY)},Object.defineProperties(F.prototype,J),F}(Oc);ve.prototype.size=20;var be=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.get=function(J){return new ve(this,J)},F}(Ap);Qn("CollisionBoxArray",be);var Se=function(C){function F(){C.apply(this,arguments)}C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F;var J={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 J.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},J.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},J.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},J.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},J.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},J.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},J.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},J.segment.get=function(){return this._structArray.uint16[this._pos2+10]},J.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},J.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},J.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},J.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},J.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},J.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},J.placedOrientation.set=function(oe){this._structArray.uint8[this._pos1+37]=oe},J.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},J.hidden.set=function(oe){this._structArray.uint8[this._pos1+38]=oe},J.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},J.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+10]=oe},J.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(F.prototype,J),F}(Oc);Se.prototype.size=48;var Ue=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.get=function(J){return new Se(this,J)},F}(Mp);Qn("PlacedSymbolArray",Ue);var Xe=function(C){function F(){C.apply(this,arguments)}C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F;var J={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 J.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},J.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},J.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},J.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},J.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},J.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},J.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},J.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},J.key.get=function(){return this._structArray.uint16[this._pos2+8]},J.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},J.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},J.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},J.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},J.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},J.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},J.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},J.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},J.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},J.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},J.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},J.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},J.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},J.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},J.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},J.crossTileID.set=function(oe){this._structArray.uint32[this._pos4+12]=oe},J.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},J.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},J.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},J.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(F.prototype,J),F}(Oc);Xe.prototype.size=68;var it=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.get=function(J){return new Xe(this,J)},F}(Sp);Qn("SymbolInstanceArray",it);var xt=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.getoffsetX=function(J){return this.float32[1*J+0]},F}(ce);Qn("GlyphOffsetArray",xt);var Lt=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.getx=function(J){return this.int16[3*J+0]},F.prototype.gety=function(J){return this.int16[3*J+1]},F.prototype.gettileUnitDistanceFromAnchor=function(J){return this.int16[3*J+2]},F}(I);Qn("SymbolLineVertexArray",Lt);var _t=function(C){function F(){C.apply(this,arguments)}C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F;var J={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return J.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},J.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},J.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(F.prototype,J),F}(Oc);_t.prototype.size=8;var Mt=function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.get=function(J){return new _t(this,J)},F}(j);Qn("FeatureIndexArray",Mt);var yt=Da([{name:"a_pos",components:2,type:"Int16"}],4).members,Nt=function(C){C===void 0&&(C=[]),this.segments=C};function Rt(C,F){return 256*(C=v(Math.floor(C),0,255))+(F=v(Math.floor(F),0,255))}Nt.prototype.prepareSegment=function(C,F,J,oe){var pe=this.segments[this.segments.length-1];return C>Nt.MAX_VERTEX_ARRAY_LENGTH&&O("Max vertices per segment is "+Nt.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+C),(!pe||pe.vertexLength+C>Nt.MAX_VERTEX_ARRAY_LENGTH||pe.sortKey!==oe)&&(pe={vertexOffset:F.length,primitiveOffset:J.length,vertexLength:0,primitiveLength:0},oe!==void 0&&(pe.sortKey=oe),this.segments.push(pe)),pe},Nt.prototype.get=function(){return this.segments},Nt.prototype.destroy=function(){for(var C=0,F=this.segments;C>>16)*Ne&65535)<<16)&4294967295)<<15|ct>>>17))*Ze+(((ct>>>16)*Ze&65535)<<16)&4294967295)<<13|xe>>>19))+((5*(xe>>>16)&65535)<<16)&4294967295))+((58964+(Ce>>>16)&65535)<<16);switch(ct=0,oe){case 3:ct^=(255&F.charCodeAt(gt+2))<<16;case 2:ct^=(255&F.charCodeAt(gt+1))<<8;case 1:xe^=ct=(65535&(ct=(ct=(65535&(ct^=255&F.charCodeAt(gt)))*Ne+(((ct>>>16)*Ne&65535)<<16)&4294967295)<<15|ct>>>17))*Ze+(((ct>>>16)*Ze&65535)<<16)&4294967295}return xe^=F.length,xe=2246822507*(65535&(xe^=xe>>>16))+((2246822507*(xe>>>16)&65535)<<16)&4294967295,xe=3266489909*(65535&(xe^=xe>>>13))+((3266489909*(xe>>>16)&65535)<<16)&4294967295,(xe^=xe>>>16)>>>0}}),dn=s(function(C){C.exports=function(F,J){for(var oe,pe=F.length,xe=J^pe,Ce=0;pe>=4;)oe=1540483477*(65535&(oe=255&F.charCodeAt(Ce)|(255&F.charCodeAt(++Ce))<<8|(255&F.charCodeAt(++Ce))<<16|(255&F.charCodeAt(++Ce))<<24))+((1540483477*(oe>>>16)&65535)<<16),xe=1540483477*(65535&xe)+((1540483477*(xe>>>16)&65535)<<16)^(oe=1540483477*(65535&(oe^=oe>>>24))+((1540483477*(oe>>>16)&65535)<<16)),pe-=4,++Ce;switch(pe){case 3:xe^=(255&F.charCodeAt(Ce+2))<<16;case 2:xe^=(255&F.charCodeAt(Ce+1))<<8;case 1:xe=1540483477*(65535&(xe^=255&F.charCodeAt(Ce)))+((1540483477*(xe>>>16)&65535)<<16)}return xe=1540483477*(65535&(xe^=xe>>>13))+((1540483477*(xe>>>16)&65535)<<16),(xe^=xe>>>15)>>>0}}),Sn=rn,An=rn,tr=dn;Sn.murmur3=An,Sn.murmur2=tr;var er=function(){this.ids=[],this.positions=[],this.indexed=!1};er.prototype.add=function(C,F,J,oe){this.ids.push(cr(C)),this.positions.push(F,J,oe)},er.prototype.getPositions=function(C){for(var F=cr(C),J=0,oe=this.ids.length-1;J>1;this.ids[pe]>=F?oe=pe:J=pe+1}for(var xe=[];this.ids[J]===F;){var Ce=this.positions[3*J],Ne=this.positions[3*J+1],Ze=this.positions[3*J+2];xe.push({index:Ce,start:Ne,end:Ze}),J++}return xe},er.serialize=function(C,F){var J=new Float64Array(C.ids),oe=new Uint32Array(C.positions);return function pe(xe,Ce,Ne,Ze){for(;Ne>1],gt=Ne-1,Bt=Ze+1;;){do gt++;while(xe[gt]ct);if(gt>=Bt)break;Yr(xe,gt,Bt),Yr(Ce,3*gt,3*Bt),Yr(Ce,3*gt+1,3*Bt+1),Yr(Ce,3*gt+2,3*Bt+2)}Bt-Neco.max||Ce.yco.max)&&(O("Geometry exceeds allowed extent, reduce your vector tile buffer size"),Ce.x=v(Ce.x,co.min,co.max),Ce.y=v(Ce.y,co.min,co.max))}return J}function As(C,F,J,oe,pe){C.emplaceBack(2*F+(oe+1)/2,2*J+(pe+1)/2)}var Uo=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(F){return F.id}),this.index=C.index,this.hasPattern=!1,this.layoutVertexArray=new vu,this.indexArray=new rs,this.segments=new Nt,this.programConfigurations=new Ha(yt,C.layers,C.zoom),this.stateDependentLayerIds=this.layers.filter(function(F){return F.isStateDependent()}).map(function(F){return F.id})};function Js(C,F){for(var J=0;J1){if(sd(C,F))return!0;for(var oe=0;oe1?C.distSqr(J):C.distSqr(J.sub(F)._mult(pe)._add(F))}function Cp(C,F){for(var J,oe,pe,xe=!1,Ce=0;CeF.y!=pe.y>F.y&&F.x<(pe.x-oe.x)*(F.y-oe.y)/(pe.y-oe.y)+oe.x&&(xe=!xe);return xe}function Kl(C,F){for(var J=!1,oe=0,pe=C.length-1;oeF.y!=Ce.y>F.y&&F.x<(Ce.x-xe.x)*(F.y-xe.y)/(Ce.y-xe.y)+xe.x&&(J=!J)}return J}function Op(C,F,J){var oe=J[0],pe=J[2];if(C.xpe.x&&F.x>pe.x||C.ype.y&&F.y>pe.y)return!1;var xe=R(C,F,J[0]);return xe!==R(C,F,J[1])||xe!==R(C,F,J[2])||xe!==R(C,F,J[3])}function fo(C,F,J){var oe=F.paint.get(C).value;return oe.kind==="constant"?oe.value:J.programConfigurations.get(F.id).getMaxValue(C)}function Vs(C){return Math.sqrt(C[0]*C[0]+C[1]*C[1])}function qs(C,F,J,oe,pe){if(!F[0]&&!F[1])return C;var xe=h.convert(F)._mult(pe);J==="viewport"&&xe._rotate(-oe);for(var Ce=[],Ne=0;Ne=8192||gt<0||gt>=8192)){var Bt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,C.sortKey),Xt=Bt.vertexLength;As(this.layoutVertexArray,ct,gt,-1,-1),As(this.layoutVertexArray,ct,gt,1,-1),As(this.layoutVertexArray,ct,gt,1,1),As(this.layoutVertexArray,ct,gt,-1,1),this.indexArray.emplaceBack(Xt,Xt+1,Xt+2),this.indexArray.emplaceBack(Xt,Xt+3,Xt+2),Bt.vertexLength+=4,Bt.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,C,J,{},oe)},Qn("CircleBucket",Uo,{omit:["layers"]});var ng=new Us({"circle-sort-key":new Di(De.layout_circle["circle-sort-key"])}),q3={paint:new Us({"circle-radius":new Di(De.paint_circle["circle-radius"]),"circle-color":new Di(De.paint_circle["circle-color"]),"circle-blur":new Di(De.paint_circle["circle-blur"]),"circle-opacity":new Di(De.paint_circle["circle-opacity"]),"circle-translate":new wi(De.paint_circle["circle-translate"]),"circle-translate-anchor":new wi(De.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new wi(De.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new wi(De.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Di(De.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Di(De.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Di(De.paint_circle["circle-stroke-opacity"])}),layout:ng},Ml=typeof Float32Array<"u"?Float32Array:Array;function u1(C){return C[0]=1,C[1]=0,C[2]=0,C[3]=0,C[4]=0,C[5]=1,C[6]=0,C[7]=0,C[8]=0,C[9]=0,C[10]=1,C[11]=0,C[12]=0,C[13]=0,C[14]=0,C[15]=1,C}function Lp(C,F,J){var oe=F[0],pe=F[1],xe=F[2],Ce=F[3],Ne=F[4],Ze=F[5],ct=F[6],gt=F[7],Bt=F[8],Xt=F[9],Gt=F[10],on=F[11],vn=F[12],Cn=F[13],En=F[14],Vn=F[15],qn=J[0],Xn=J[1],dr=J[2],br=J[3];return C[0]=qn*oe+Xn*Ne+dr*Bt+br*vn,C[1]=qn*pe+Xn*Ze+dr*Xt+br*Cn,C[2]=qn*xe+Xn*ct+dr*Gt+br*En,C[3]=qn*Ce+Xn*gt+dr*on+br*Vn,qn=J[4],Xn=J[5],dr=J[6],br=J[7],C[4]=qn*oe+Xn*Ne+dr*Bt+br*vn,C[5]=qn*pe+Xn*Ze+dr*Xt+br*Cn,C[6]=qn*xe+Xn*ct+dr*Gt+br*En,C[7]=qn*Ce+Xn*gt+dr*on+br*Vn,qn=J[8],Xn=J[9],dr=J[10],br=J[11],C[8]=qn*oe+Xn*Ne+dr*Bt+br*vn,C[9]=qn*pe+Xn*Ze+dr*Xt+br*Cn,C[10]=qn*xe+Xn*ct+dr*Gt+br*En,C[11]=qn*Ce+Xn*gt+dr*on+br*Vn,qn=J[12],Xn=J[13],dr=J[14],br=J[15],C[12]=qn*oe+Xn*Ne+dr*Bt+br*vn,C[13]=qn*pe+Xn*Ze+dr*Xt+br*Cn,C[14]=qn*xe+Xn*ct+dr*Gt+br*En,C[15]=qn*Ce+Xn*gt+dr*on+br*Vn,C}Math.hypot||(Math.hypot=function(){for(var C=arguments,F=0,J=arguments.length;J--;)F+=C[J]*C[J];return Math.sqrt(F)});var H3=Lp,yh,$3=function(C,F,J){return C[0]=F[0]-J[0],C[1]=F[1]-J[1],C[2]=F[2]-J[2],C};yh=new Ml(3),Ml!=Float32Array&&(yh[0]=0,yh[1]=0,yh[2]=0);function rg(C,F,J){var oe=F[0],pe=F[1],xe=F[2],Ce=F[3];return C[0]=J[0]*oe+J[4]*pe+J[8]*xe+J[12]*Ce,C[1]=J[1]*oe+J[5]*pe+J[9]*xe+J[13]*Ce,C[2]=J[2]*oe+J[6]*pe+J[10]*xe+J[14]*Ce,C[3]=J[3]*oe+J[7]*pe+J[11]*xe+J[15]*Ce,C}(function(){(function(){var C=new Ml(4);return Ml!=Float32Array&&(C[0]=0,C[1]=0,C[2]=0,C[3]=0),C})()})();var c1=function(C){var F=C[0],J=C[1];return F*F+J*J},YH=(function(){(function(){var C=new Ml(2);return Ml!=Float32Array&&(C[0]=0,C[1]=0),C})()}(),function(C){function F(J){C.call(this,J,q3)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.createBucket=function(J){return new Uo(J)},F.prototype.queryRadius=function(J){var oe=J;return fo("circle-radius",this,oe)+fo("circle-stroke-width",this,oe)+Vs(this.paint.get("circle-translate"))},F.prototype.queryIntersectsFeature=function(J,oe,pe,xe,Ce,Ne,Ze,ct){for(var gt=qs(J,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),Ne.angle,Ze),Bt=this.paint.get("circle-radius").evaluate(oe,pe)+this.paint.get("circle-stroke-width").evaluate(oe,pe),Xt=this.paint.get("circle-pitch-alignment")==="map",Gt=Xt?gt:function(Hr,Vr){return Hr.map(function(ei){return X8(ei,Vr)})}(gt,ct),on=Xt?Bt*Ze:Bt,vn=0,Cn=xe;vnC.width||pe.height>C.height||J.x>C.width-pe.width||J.y>C.height-pe.height)throw new RangeError("out of range source coordinates for image copy");if(pe.width>F.width||pe.height>F.height||oe.x>F.width-pe.width||oe.y>F.height-pe.height)throw new RangeError("out of range destination coordinates for image copy");for(var Ce=C.data,Ne=F.data,Ze=0;Ze80*J){oe=xe=C[0],pe=Ce=C[1];for(var on=J;onxe&&(xe=Ne),Ze>Ce&&(Ce=Ze);ct=(ct=Math.max(xe-oe,Ce-pe))!==0?1/ct:0}return f1(Xt,Gt,J,oe,pe,ct),Gt}function e9(C,F,J,oe,pe){var xe,Ce;if(pe===J3(C,F,J,oe)>0)for(xe=F;xe=F;xe-=oe)Ce=r9(xe,C[xe],C[xe+1],Ce);return Ce&&mx(Ce,Ce.next)&&(d1(Ce),Ce=Ce.next),Ce}function ud(C,F){if(!C)return C;F||(F=C);var J,oe=C;do if(J=!1,oe.steiner||!mx(oe,oe.next)&&is(oe.prev,oe,oe.next)!==0)oe=oe.next;else{if(d1(oe),(oe=F=oe.prev)===oe.next)break;J=!0}while(J||oe!==F);return F}function f1(C,F,J,oe,pe,xe,Ce){if(C){!Ce&&xe&&function(gt,Bt,Xt,Gt){var on=gt;do on.z===null&&(on.z=X3(on.x,on.y,Bt,Xt,Gt)),on.prevZ=on.prev,on.nextZ=on.next,on=on.next;while(on!==gt);on.prevZ.nextZ=null,on.prevZ=null,function(vn){var Cn,En,Vn,qn,Xn,dr,br,Hr,Vr=1;do{for(En=vn,vn=null,Xn=null,dr=0;En;){for(dr++,Vn=En,br=0,Cn=0;Cn0||Hr>0&&Vn;)br!==0&&(Hr===0||!Vn||En.z<=Vn.z)?(qn=En,En=En.nextZ,br--):(qn=Vn,Vn=Vn.nextZ,Hr--),Xn?Xn.nextZ=qn:vn=qn,qn.prevZ=Xn,Xn=qn;En=Vn}Xn.nextZ=null,Vr*=2}while(dr>1)}(on)}(C,oe,pe,xe);for(var Ne,Ze,ct=C;C.prev!==C.next;)if(Ne=C.prev,Ze=C.next,xe?t$(C,oe,pe,xe):e$(C))F.push(Ne.i/J),F.push(C.i/J),F.push(Ze.i/J),d1(C),C=Ze.next,ct=Ze.next;else if((C=Ze)===ct){Ce?Ce===1?f1(C=n$(ud(C),F,J),F,J,oe,pe,xe,2):Ce===2&&r$(C,F,J,oe,pe,xe):f1(ud(C),F,J,oe,pe,xe,1);break}}}function e$(C){var F=C.prev,J=C,oe=C.next;if(is(F,J,oe)>=0)return!1;for(var pe=C.next.next;pe!==C.prev;){if(ig(F.x,F.y,J.x,J.y,oe.x,oe.y,pe.x,pe.y)&&is(pe.prev,pe,pe.next)>=0)return!1;pe=pe.next}return!0}function t$(C,F,J,oe){var pe=C.prev,xe=C,Ce=C.next;if(is(pe,xe,Ce)>=0)return!1;for(var Ne=pe.xxe.x?pe.x>Ce.x?pe.x:Ce.x:xe.x>Ce.x?xe.x:Ce.x,gt=pe.y>xe.y?pe.y>Ce.y?pe.y:Ce.y:xe.y>Ce.y?xe.y:Ce.y,Bt=X3(Ne,Ze,F,J,oe),Xt=X3(ct,gt,F,J,oe),Gt=C.prevZ,on=C.nextZ;Gt&&Gt.z>=Bt&&on&&on.z<=Xt;){if(Gt!==C.prev&&Gt!==C.next&&ig(pe.x,pe.y,xe.x,xe.y,Ce.x,Ce.y,Gt.x,Gt.y)&&is(Gt.prev,Gt,Gt.next)>=0||(Gt=Gt.prevZ,on!==C.prev&&on!==C.next&&ig(pe.x,pe.y,xe.x,xe.y,Ce.x,Ce.y,on.x,on.y)&&is(on.prev,on,on.next)>=0))return!1;on=on.nextZ}for(;Gt&&Gt.z>=Bt;){if(Gt!==C.prev&&Gt!==C.next&&ig(pe.x,pe.y,xe.x,xe.y,Ce.x,Ce.y,Gt.x,Gt.y)&&is(Gt.prev,Gt,Gt.next)>=0)return!1;Gt=Gt.prevZ}for(;on&&on.z<=Xt;){if(on!==C.prev&&on!==C.next&&ig(pe.x,pe.y,xe.x,xe.y,Ce.x,Ce.y,on.x,on.y)&&is(on.prev,on,on.next)>=0)return!1;on=on.nextZ}return!0}function n$(C,F,J){var oe=C;do{var pe=oe.prev,xe=oe.next.next;!mx(pe,xe)&&t9(pe,oe,oe.next,xe)&&h1(pe,xe)&&h1(xe,pe)&&(F.push(pe.i/J),F.push(oe.i/J),F.push(xe.i/J),d1(oe),d1(oe.next),oe=C=xe),oe=oe.next}while(oe!==C);return ud(oe)}function r$(C,F,J,oe,pe,xe){var Ce=C;do{for(var Ne=Ce.next.next;Ne!==Ce.prev;){if(Ce.i!==Ne.i&&l$(Ce,Ne)){var Ze=n9(Ce,Ne);return Ce=ud(Ce,Ce.next),Ze=ud(Ze,Ze.next),f1(Ce,F,J,oe,pe,xe),void f1(Ze,F,J,oe,pe,xe)}Ne=Ne.next}Ce=Ce.next}while(Ce!==C)}function i$(C,F){return C.x-F.x}function a$(C,F){if(F=function(oe,pe){var xe,Ce=pe,Ne=oe.x,Ze=oe.y,ct=-1/0;do{if(Ze<=Ce.y&&Ze>=Ce.next.y&&Ce.next.y!==Ce.y){var gt=Ce.x+(Ze-Ce.y)*(Ce.next.x-Ce.x)/(Ce.next.y-Ce.y);if(gt<=Ne&>>ct){if(ct=gt,gt===Ne){if(Ze===Ce.y)return Ce;if(Ze===Ce.next.y)return Ce.next}xe=Ce.x=Ce.x&&Ce.x>=Gt&&Ne!==Ce.x&&ig(Zexe.x||Ce.x===xe.x&&o$(xe,Ce)))&&(xe=Ce,vn=Bt)),Ce=Ce.next;while(Ce!==Xt);return xe}(C,F)){var J=n9(F,C);ud(F,F.next),ud(J,J.next)}}function o$(C,F){return is(C.prev,C,F.prev)<0&&is(F.next,C,C.next)<0}function X3(C,F,J,oe,pe){return(C=1431655765&((C=858993459&((C=252645135&((C=16711935&((C=32767*(C-J)*pe)|C<<8))|C<<4))|C<<2))|C<<1))|(F=1431655765&((F=858993459&((F=252645135&((F=16711935&((F=32767*(F-oe)*pe)|F<<8))|F<<4))|F<<2))|F<<1))<<1}function s$(C){var F=C,J=C;do(F.x=0&&(C-Ce)*(oe-Ne)-(J-Ce)*(F-Ne)>=0&&(J-Ce)*(xe-Ne)-(pe-Ce)*(oe-Ne)>=0}function l$(C,F){return C.next.i!==F.i&&C.prev.i!==F.i&&!function(J,oe){var pe=J;do{if(pe.i!==J.i&&pe.next.i!==J.i&&pe.i!==oe.i&&pe.next.i!==oe.i&&t9(pe,pe.next,J,oe))return!0;pe=pe.next}while(pe!==J);return!1}(C,F)&&(h1(C,F)&&h1(F,C)&&function(J,oe){var pe=J,xe=!1,Ce=(J.x+oe.x)/2,Ne=(J.y+oe.y)/2;do pe.y>Ne!=pe.next.y>Ne&&pe.next.y!==pe.y&&Ce<(pe.next.x-pe.x)*(Ne-pe.y)/(pe.next.y-pe.y)+pe.x&&(xe=!xe),pe=pe.next;while(pe!==J);return xe}(C,F)&&(is(C.prev,C,F.prev)||is(C,F.prev,F))||mx(C,F)&&is(C.prev,C,C.next)>0&&is(F.prev,F,F.next)>0)}function is(C,F,J){return(F.y-C.y)*(J.x-F.x)-(F.x-C.x)*(J.y-F.y)}function mx(C,F){return C.x===F.x&&C.y===F.y}function t9(C,F,J,oe){var pe=yx(is(C,F,J)),xe=yx(is(C,F,oe)),Ce=yx(is(J,oe,C)),Ne=yx(is(J,oe,F));return pe!==xe&&Ce!==Ne||!(pe!==0||!vx(C,J,F))||!(xe!==0||!vx(C,oe,F))||!(Ce!==0||!vx(J,C,oe))||!(Ne!==0||!vx(J,F,oe))}function vx(C,F,J){return F.x<=Math.max(C.x,J.x)&&F.x>=Math.min(C.x,J.x)&&F.y<=Math.max(C.y,J.y)&&F.y>=Math.min(C.y,J.y)}function yx(C){return C>0?1:C<0?-1:0}function h1(C,F){return is(C.prev,C,C.next)<0?is(C,F,C.next)>=0&&is(C,C.prev,F)>=0:is(C,F,C.prev)<0||is(C,C.next,F)<0}function n9(C,F){var J=new Z3(C.i,C.x,C.y),oe=new Z3(F.i,F.x,F.y),pe=C.next,xe=F.prev;return C.next=F,F.prev=C,J.next=pe,pe.prev=J,oe.next=J,J.prev=oe,xe.next=oe,oe.prev=xe,oe}function r9(C,F,J,oe){var pe=new Z3(C,F,J);return oe?(pe.next=oe.next,pe.prev=oe,oe.next.prev=pe,oe.next=pe):(pe.prev=pe,pe.next=pe),pe}function d1(C){C.next.prev=C.prev,C.prev.next=C.next,C.prevZ&&(C.prevZ.nextZ=C.nextZ),C.nextZ&&(C.nextZ.prevZ=C.prevZ)}function Z3(C,F,J){this.i=C,this.x=F,this.y=J,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function J3(C,F,J,oe){for(var pe=0,xe=F,Ce=J-oe;xeZe;){if(ct-Ze>600){var Bt=ct-Ze+1,Xt=Ne-Ze+1,Gt=Math.log(Bt),on=.5*Math.exp(2*Gt/3),vn=.5*Math.sqrt(Gt*on*(Bt-on)/Bt)*(Xt-Bt/2<0?-1:1),Cn=Math.max(Ze,Math.floor(Ne-Xt*on/Bt+vn)),En=Math.min(ct,Math.floor(Ne+(Bt-Xt)*on/Bt+vn));xe(Ce,Ne,Cn,En,gt)}var Vn=Ce[Ne],qn=Ze,Xn=ct;for(p1(Ce,Ze,Ne),gt(Ce[ct],Vn)>0&&p1(Ce,Ze,ct);qn0;)Xn--}gt(Ce[Ze],Vn)===0?p1(Ce,Ze,Xn):(Xn++,p1(Ce,Xn,ct)),Xn<=Ne&&(Ze=Xn+1),Ne<=Xn&&(ct=Xn-1)}})(C,F,J||0,oe||C.length-1,pe||c$)}function p1(C,F,J){var oe=C[F];C[F]=C[J],C[J]=oe}function c$(C,F){return CF?1:0}function K3(C,F){var J=C.length;if(J<=1)return[C];for(var oe,pe,xe=[],Ce=0;Ce1)for(var Ze=0;Ze0&&(oe+=C[pe-1].length,J.holes.push(oe))}return J},Y3.default=QH;var Ic=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(F){return F.id}),this.index=C.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new vu,this.indexArray=new rs,this.indexArray2=new V,this.programConfigurations=new Ha(Q8,C.layers,C.zoom),this.segments=new Nt,this.segments2=new Nt,this.stateDependentLayerIds=this.layers.filter(function(F){return F.isStateDependent()}).map(function(F){return F.id})};Ic.prototype.populate=function(C,F,J){this.hasPattern=Q3("fill",this.layers,F);for(var oe=this.layers[0].layout.get("fill-sort-key"),pe=[],xe=0,Ce=C;xe>3}if(pe--,oe===1||oe===2)xe+=C.readSVarint(),Ce+=C.readSVarint(),oe===1&&(F&&Ne.push(F),F=[]),F.push(new h(xe,Ce));else{if(oe!==7)throw new Error("unknown command "+oe);F&&F.push(F[0].clone())}}return F&&Ne.push(F),Ne},ag.prototype.bbox=function(){var C=this._pbf;C.pos=this._geometry;for(var F=C.readVarint()+C.pos,J=1,oe=0,pe=0,xe=0,Ce=1/0,Ne=-1/0,Ze=1/0,ct=-1/0;C.pos>3}if(oe--,J===1||J===2)(pe+=C.readSVarint())Ne&&(Ne=pe),(xe+=C.readSVarint())ct&&(ct=xe);else if(J!==7)throw new Error("unknown command "+J)}return[Ce,Ze,Ne,ct]},ag.prototype.toGeoJSON=function(C,F,J){var oe,pe,xe=this.extent*Math.pow(2,J),Ce=this.extent*C,Ne=this.extent*F,Ze=this.loadGeometry(),ct=ag.types[this.type];function gt(Gt){for(var on=0;on>3;pe=Ce===1?oe.readString():Ce===2?oe.readFloat():Ce===3?oe.readDouble():Ce===4?oe.readVarint64():Ce===5?oe.readVarint():Ce===6?oe.readSVarint():Ce===7?oe.readBoolean():null}return pe}(J))}function y$(C,F,J){if(C===3){var oe=new o9(J,J.readVarint()+J.pos);oe.length&&(F[oe.name]=oe)}}s9.prototype.feature=function(C){if(C<0||C>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[C];var F=this._pbf.readVarint()+this._pbf.pos;return new a9(this._pbf,F,this.extent,this._keys,this._values)};var og={VectorTile:function(C,F){this.layers=C.readFields(y$,{},F)},VectorTileFeature:a9,VectorTileLayer:o9},x$=og.VectorTileFeature.types,t5=Math.pow(2,13);function g1(C,F,J,oe,pe,xe,Ce,Ne){C.emplaceBack(F,J,2*Math.floor(oe*t5)+Ce,pe*t5*2,xe*t5*2,Math.round(Ne))}var zc=function(C){this.zoom=C.zoom,this.overscaling=C.overscaling,this.layers=C.layers,this.layerIds=this.layers.map(function(F){return F.id}),this.index=C.index,this.hasPattern=!1,this.layoutVertexArray=new Hu,this.indexArray=new rs,this.programConfigurations=new Ha(i9,C.layers,C.zoom),this.segments=new Nt,this.stateDependentLayerIds=this.layers.filter(function(F){return F.isStateDependent()}).map(function(F){return F.id})};function b$(C,F){return C.x===F.x&&(C.x<0||C.x>8192)||C.y===F.y&&(C.y<0||C.y>8192)}function _$(C){return C.every(function(F){return F.x<0})||C.every(function(F){return F.x>8192})||C.every(function(F){return F.y<0})||C.every(function(F){return F.y>8192})}zc.prototype.populate=function(C,F,J){this.features=[],this.hasPattern=Q3("fill-extrusion",this.layers,F);for(var oe=0,pe=C;oe=1){var Vn=on[Cn-1];if(!b$(En,Vn)){Bt.vertexLength+4>Nt.MAX_VERTEX_ARRAY_LENGTH&&(Bt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var qn=En.sub(Vn)._perp()._unit(),Xn=Vn.dist(En);vn+Xn>32768&&(vn=0),g1(this.layoutVertexArray,En.x,En.y,qn.x,qn.y,0,0,vn),g1(this.layoutVertexArray,En.x,En.y,qn.x,qn.y,0,1,vn),vn+=Xn,g1(this.layoutVertexArray,Vn.x,Vn.y,qn.x,qn.y,0,0,vn),g1(this.layoutVertexArray,Vn.x,Vn.y,qn.x,qn.y,0,1,vn);var dr=Bt.vertexLength;this.indexArray.emplaceBack(dr,dr+2,dr+1),this.indexArray.emplaceBack(dr+1,dr+2,dr+3),Bt.vertexLength+=4,Bt.primitiveLength+=2}}}}if(Bt.vertexLength+Ze>Nt.MAX_VERTEX_ARRAY_LENGTH&&(Bt=this.segments.prepareSegment(Ze,this.layoutVertexArray,this.indexArray)),x$[C.type]==="Polygon"){for(var br=[],Hr=[],Vr=Bt.vertexLength,ei=0,vi=Ne;ei=2&&C[Ze-1].equals(C[Ze-2]);)Ze--;for(var ct=0;ct0;if(Hr&&En>ct){var ei=gt.dist(Gt);if(ei>2*Bt){var vi=gt.sub(gt.sub(Gt)._mult(Bt/ei)._round());this.updateDistance(Gt,vi),this.addCurrentVertex(vi,vn,0,0,Xt),Gt=vi}}var yi=Gt&&on,li=yi?J:Ne?"butt":oe;if(yi&&li==="round"&&(drpe&&(li="bevel"),li==="bevel"&&(dr>2&&(li="flipbevel"),dr100)Vn=Cn.mult(-1);else{var Si=dr*vn.add(Cn).mag()/vn.sub(Cn).mag();Vn._perp()._mult(Si*(Vr?-1:1))}this.addCurrentVertex(gt,Vn,0,0,Xt),this.addCurrentVertex(gt,Vn.mult(-1),0,0,Xt)}else if(li==="bevel"||li==="fakeround"){var Ai=-Math.sqrt(dr*dr-1),xi=Vr?Ai:0,Ta=Vr?0:Ai;if(Gt&&this.addCurrentVertex(gt,vn,xi,Ta,Xt),li==="fakeround")for(var da=Math.round(180*br/Math.PI/20),Oa=1;Oa2*Bt){var Ga=gt.add(on.sub(gt)._mult(Bt/po)._round());this.updateDistance(gt,Ga),this.addCurrentVertex(Ga,Cn,0,0,Xt),gt=Ga}}}}},El.prototype.addCurrentVertex=function(C,F,J,oe,pe,xe){xe===void 0&&(xe=!1);var Ce=F.x+F.y*J,Ne=F.y-F.x*J,Ze=-F.x+F.y*oe,ct=-F.y-F.x*oe;this.addHalfVertex(C,Ce,Ne,xe,!1,J,pe),this.addHalfVertex(C,Ze,ct,xe,!0,-oe,pe),this.distance>c9/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(C,F,J,oe,pe,xe))},El.prototype.addHalfVertex=function(C,F,J,oe,pe,xe,Ce){var Ne=C.x,Ze=C.y,ct=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((Ne<<1)+(oe?1:0),(Ze<<1)+(pe?1:0),Math.round(63*F)+128,Math.round(63*J)+128,1+(xe===0?0:xe<0?-1:1)|(63&ct)<<2,ct>>6);var gt=Ce.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,gt),Ce.primitiveLength++),pe?this.e2=gt:this.e1=gt},El.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(c9-1):this.distance},El.prototype.updateDistance=function(C,F){this.distance+=C.dist(F),this.updateScaledDistance()},Qn("LineBucket",El,{omit:["layers","patternFeatures"]});var M$=new Us({"line-cap":new wi(De.layout_line["line-cap"]),"line-join":new Di(De.layout_line["line-join"]),"line-miter-limit":new wi(De.layout_line["line-miter-limit"]),"line-round-limit":new wi(De.layout_line["line-round-limit"]),"line-sort-key":new Di(De.layout_line["line-sort-key"])}),f9={paint:new Us({"line-opacity":new Di(De.paint_line["line-opacity"]),"line-color":new Di(De.paint_line["line-color"]),"line-translate":new wi(De.paint_line["line-translate"]),"line-translate-anchor":new wi(De.paint_line["line-translate-anchor"]),"line-width":new Di(De.paint_line["line-width"]),"line-gap-width":new Di(De.paint_line["line-gap-width"]),"line-offset":new Di(De.paint_line["line-offset"]),"line-blur":new Di(De.paint_line["line-blur"]),"line-dasharray":new wf(De.paint_line["line-dasharray"]),"line-pattern":new _f(De.paint_line["line-pattern"]),"line-gradient":new Jl(De.paint_line["line-gradient"])}),layout:M$},h9=new(function(C){function F(){C.apply(this,arguments)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.possiblyEvaluate=function(J,oe){return oe=new Pa(Math.floor(oe.zoom),{now:oe.now,fadeDuration:oe.fadeDuration,zoomHistory:oe.zoomHistory,transition:oe.transition}),C.prototype.possiblyEvaluate.call(this,J,oe)},F.prototype.evaluate=function(J,oe,pe,xe){return oe=x({},oe,{zoom:Math.floor(oe.zoom)}),C.prototype.evaluate.call(this,J,oe,pe,xe)},F}(Di))(f9.paint.properties["line-width"].specification);h9.useIntegerZoom=!0;var S$=function(C){function F(J){C.call(this,J,f9)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype._handleSpecialPaintPropertyUpdate=function(J){J==="line-gradient"&&this._updateGradient()},F.prototype._updateGradient=function(){var J=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=K8(J,"lineProgress"),this.gradientTexture=null},F.prototype.recalculate=function(J,oe){C.prototype.recalculate.call(this,J,oe),this.paint._values["line-floorwidth"]=h9.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,J)},F.prototype.createBucket=function(J){return new El(J)},F.prototype.queryRadius=function(J){var oe=J,pe=d9(fo("line-width",this,oe),fo("line-gap-width",this,oe)),xe=fo("line-offset",this,oe);return pe/2+Math.abs(xe)+Vs(this.paint.get("line-translate"))},F.prototype.queryIntersectsFeature=function(J,oe,pe,xe,Ce,Ne,Ze){var ct=qs(J,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Ne.angle,Ze),gt=Ze/2*d9(this.paint.get("line-width").evaluate(oe,pe),this.paint.get("line-gap-width").evaluate(oe,pe)),Bt=this.paint.get("line-offset").evaluate(oe,pe);return Bt&&(xe=function(Xt,Gt){for(var on=[],vn=new h(0,0),Cn=0;Cn=3){for(var En=0;En0?F+2*C:C}var n5=Da([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),E$=Da([{name:"a_projected_pos",components:3,type:"Float32"}],4),C$=(Da([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Da([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),p9=(Da([{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"}]),Da([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),O$=Da([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);Da([{name:"triangle",components:3,type:"Uint16"}]),Da([{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"}]),Da([{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",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Da([{type:"Float32",name:"offsetX"}]),Da([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function L$(C,F,J){return C.sections.forEach(function(oe){oe.text=function(pe,xe,Ce){var Ne=xe.layout.get("text-transform").evaluate(Ce,{});return Ne==="uppercase"?pe=pe.toLocaleUpperCase():Ne==="lowercase"&&(pe=pe.toLocaleLowerCase()),ps.applyArabicShaping&&(pe=ps.applyArabicShaping(pe)),pe}(oe.text,F,J)}),C}var v1={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"},g9=function(C,F,J,oe,pe){var xe,Ce,Ne=8*pe-oe-1,Ze=(1<>1,gt=-7,Bt=J?pe-1:0,Xt=J?-1:1,Gt=C[F+Bt];for(Bt+=Xt,xe=Gt&(1<<-gt)-1,Gt>>=-gt,gt+=Ne;gt>0;xe=256*xe+C[F+Bt],Bt+=Xt,gt-=8);for(Ce=xe&(1<<-gt)-1,xe>>=-gt,gt+=oe;gt>0;Ce=256*Ce+C[F+Bt],Bt+=Xt,gt-=8);if(xe===0)xe=1-ct;else{if(xe===Ze)return Ce?NaN:1/0*(Gt?-1:1);Ce+=Math.pow(2,oe),xe-=ct}return(Gt?-1:1)*Ce*Math.pow(2,xe-oe)},m9=function(C,F,J,oe,pe,xe){var Ce,Ne,Ze,ct=8*xe-pe-1,gt=(1<>1,Xt=pe===23?Math.pow(2,-24)-Math.pow(2,-77):0,Gt=oe?0:xe-1,on=oe?1:-1,vn=F<0||F===0&&1/F<0?1:0;for(F=Math.abs(F),isNaN(F)||F===1/0?(Ne=isNaN(F)?1:0,Ce=gt):(Ce=Math.floor(Math.log(F)/Math.LN2),F*(Ze=Math.pow(2,-Ce))<1&&(Ce--,Ze*=2),(F+=Ce+Bt>=1?Xt/Ze:Xt*Math.pow(2,1-Bt))*Ze>=2&&(Ce++,Ze/=2),Ce+Bt>=gt?(Ne=0,Ce=gt):Ce+Bt>=1?(Ne=(F*Ze-1)*Math.pow(2,pe),Ce+=Bt):(Ne=F*Math.pow(2,Bt-1)*Math.pow(2,pe),Ce=0));pe>=8;C[J+Gt]=255&Ne,Gt+=on,Ne/=256,pe-=8);for(Ce=Ce<0;C[J+Gt]=255&Ce,Gt+=on,Ce/=256,ct-=8);C[J+Gt-on]|=128*vn},xx=to;function to(C){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(C)?C:new Uint8Array(C||0),this.pos=0,this.type=0,this.length=this.buf.length}to.Varint=0,to.Fixed64=1,to.Bytes=2,to.Fixed32=5;var v9=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function xh(C){return C.type===to.Bytes?C.readVarint()+C.pos:C.pos+1}function sg(C,F,J){return J?4294967296*F+(C>>>0):4294967296*(F>>>0)+(C>>>0)}function y9(C,F,J){var oe=F<=16383?1:F<=2097151?2:F<=268435455?3:Math.floor(Math.log(F)/(7*Math.LN2));J.realloc(oe);for(var pe=J.pos-1;pe>=C;pe--)J.buf[pe+oe]=J.buf[pe]}function P$(C,F){for(var J=0;J>>8,C[J+2]=F>>>16,C[J+3]=F>>>24}function x9(C,F){return(C[F]|C[F+1]<<8|C[F+2]<<16)+(C[F+3]<<24)}to.prototype={destroy:function(){this.buf=null},readFields:function(C,F,J){for(J=J||this.length;this.pos>3,xe=this.pos;this.type=7&oe,C(pe,F,this),this.pos===xe&&this.skip(oe)}return F},readMessage:function(C,F){return this.readFields(C,F,this.readVarint()+this.pos)},readFixed32:function(){var C=bx(this.buf,this.pos);return this.pos+=4,C},readSFixed32:function(){var C=x9(this.buf,this.pos);return this.pos+=4,C},readFixed64:function(){var C=bx(this.buf,this.pos)+4294967296*bx(this.buf,this.pos+4);return this.pos+=8,C},readSFixed64:function(){var C=bx(this.buf,this.pos)+4294967296*x9(this.buf,this.pos+4);return this.pos+=8,C},readFloat:function(){var C=g9(this.buf,this.pos,!0,23,4);return this.pos+=4,C},readDouble:function(){var C=g9(this.buf,this.pos,!0,52,8);return this.pos+=8,C},readVarint:function(C){var F,J,oe=this.buf;return F=127&(J=oe[this.pos++]),J<128?F:(F|=(127&(J=oe[this.pos++]))<<7,J<128?F:(F|=(127&(J=oe[this.pos++]))<<14,J<128?F:(F|=(127&(J=oe[this.pos++]))<<21,J<128?F:function(pe,xe,Ce){var Ne,Ze,ct=Ce.buf;if(Ze=ct[Ce.pos++],Ne=(112&Ze)>>4,Ze<128||(Ze=ct[Ce.pos++],Ne|=(127&Ze)<<3,Ze<128)||(Ze=ct[Ce.pos++],Ne|=(127&Ze)<<10,Ze<128)||(Ze=ct[Ce.pos++],Ne|=(127&Ze)<<17,Ze<128)||(Ze=ct[Ce.pos++],Ne|=(127&Ze)<<24,Ze<128)||(Ze=ct[Ce.pos++],Ne|=(1&Ze)<<31,Ze<128))return sg(pe,Ne,xe);throw new Error("Expected varint not more than 10 bytes")}(F|=(15&(J=oe[this.pos]))<<28,C,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var C=this.readVarint();return C%2==1?(C+1)/-2:C/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var C=this.readVarint()+this.pos,F=this.pos;return this.pos=C,C-F>=12&&v9?function(J,oe,pe){return v9.decode(J.subarray(oe,pe))}(this.buf,F,C):function(J,oe,pe){for(var xe="",Ce=oe;Ce239?4:gt>223?3:gt>191?2:1;if(Ce+Xt>pe)break;Xt===1?gt<128&&(Bt=gt):Xt===2?(192&(Ne=J[Ce+1]))==128&&(Bt=(31>)<<6|63&Ne)<=127&&(Bt=null):Xt===3?(Ne=J[Ce+1],Ze=J[Ce+2],(192&Ne)==128&&(192&Ze)==128&&((Bt=(15>)<<12|(63&Ne)<<6|63&Ze)<=2047||Bt>=55296&&Bt<=57343)&&(Bt=null)):Xt===4&&(Ne=J[Ce+1],Ze=J[Ce+2],ct=J[Ce+3],(192&Ne)==128&&(192&Ze)==128&&(192&ct)==128&&((Bt=(15>)<<18|(63&Ne)<<12|(63&Ze)<<6|63&ct)<=65535||Bt>=1114112)&&(Bt=null)),Bt===null?(Bt=65533,Xt=1):Bt>65535&&(Bt-=65536,xe+=String.fromCharCode(Bt>>>10&1023|55296),Bt=56320|1023&Bt),xe+=String.fromCharCode(Bt),Ce+=Xt}return xe}(this.buf,F,C)},readBytes:function(){var C=this.readVarint()+this.pos,F=this.buf.subarray(this.pos,C);return this.pos=C,F},readPackedVarint:function(C,F){if(this.type!==to.Bytes)return C.push(this.readVarint(F));var J=xh(this);for(C=C||[];this.pos127;);else if(F===to.Bytes)this.pos=this.readVarint()+this.pos;else if(F===to.Fixed32)this.pos+=4;else{if(F!==to.Fixed64)throw new Error("Unimplemented type: "+F);this.pos+=8}},writeTag:function(C,F){this.writeVarint(C<<3|F)},realloc:function(C){for(var F=this.length||16;F268435455||C<0?function(F,J){var oe,pe;if(F>=0?(oe=F%4294967296|0,pe=F/4294967296|0):(pe=~(-F/4294967296),4294967295^(oe=~(-F%4294967296))?oe=oe+1|0:(oe=0,pe=pe+1|0)),F>=18446744073709552e3||F<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");J.realloc(10),function(xe,Ce,Ne){Ne.buf[Ne.pos++]=127&xe|128,xe>>>=7,Ne.buf[Ne.pos++]=127&xe|128,xe>>>=7,Ne.buf[Ne.pos++]=127&xe|128,xe>>>=7,Ne.buf[Ne.pos++]=127&xe|128,xe>>>=7,Ne.buf[Ne.pos]=127&xe}(oe,0,J),function(xe,Ce){var Ne=(7&xe)<<4;Ce.buf[Ce.pos++]|=Ne|((xe>>>=3)?128:0),xe&&(Ce.buf[Ce.pos++]=127&xe|((xe>>>=7)?128:0),xe&&(Ce.buf[Ce.pos++]=127&xe|((xe>>>=7)?128:0),xe&&(Ce.buf[Ce.pos++]=127&xe|((xe>>>=7)?128:0),xe&&(Ce.buf[Ce.pos++]=127&xe|((xe>>>=7)?128:0),xe&&(Ce.buf[Ce.pos++]=127&xe)))))}(pe,J)}(C,this):(this.realloc(4),this.buf[this.pos++]=127&C|(C>127?128:0),C<=127||(this.buf[this.pos++]=127&(C>>>=7)|(C>127?128:0),C<=127||(this.buf[this.pos++]=127&(C>>>=7)|(C>127?128:0),C<=127||(this.buf[this.pos++]=C>>>7&127))))},writeSVarint:function(C){this.writeVarint(C<0?2*-C-1:2*C)},writeBoolean:function(C){this.writeVarint(Boolean(C))},writeString:function(C){C=String(C),this.realloc(4*C.length),this.pos++;var F=this.pos;this.pos=function(oe,pe,xe){for(var Ce,Ne,Ze=0;Ze55295&&Ce<57344){if(!Ne){Ce>56319||Ze+1===pe.length?(oe[xe++]=239,oe[xe++]=191,oe[xe++]=189):Ne=Ce;continue}if(Ce<56320){oe[xe++]=239,oe[xe++]=191,oe[xe++]=189,Ne=Ce;continue}Ce=Ne-55296<<10|Ce-56320|65536,Ne=null}else Ne&&(oe[xe++]=239,oe[xe++]=191,oe[xe++]=189,Ne=null);Ce<128?oe[xe++]=Ce:(Ce<2048?oe[xe++]=Ce>>6|192:(Ce<65536?oe[xe++]=Ce>>12|224:(oe[xe++]=Ce>>18|240,oe[xe++]=Ce>>12&63|128),oe[xe++]=Ce>>6&63|128),oe[xe++]=63&Ce|128)}return xe}(this.buf,C,this.pos);var J=this.pos-F;J>=128&&y9(F,J,this),this.pos=F-1,this.writeVarint(J),this.pos+=J},writeFloat:function(C){this.realloc(4),m9(this.buf,C,this.pos,!0,23,4),this.pos+=4},writeDouble:function(C){this.realloc(8),m9(this.buf,C,this.pos,!0,52,8),this.pos+=8},writeBytes:function(C){var F=C.length;this.writeVarint(F),this.realloc(F);for(var J=0;J=128&&y9(J,oe,this),this.pos=J-1,this.writeVarint(oe),this.pos+=oe},writeMessage:function(C,F,J){this.writeTag(C,to.Bytes),this.writeRawMessage(F,J)},writePackedVarint:function(C,F){F.length&&this.writeMessage(C,P$,F)},writePackedSVarint:function(C,F){F.length&&this.writeMessage(C,D$,F)},writePackedBoolean:function(C,F){F.length&&this.writeMessage(C,R$,F)},writePackedFloat:function(C,F){F.length&&this.writeMessage(C,I$,F)},writePackedDouble:function(C,F){F.length&&this.writeMessage(C,z$,F)},writePackedFixed32:function(C,F){F.length&&this.writeMessage(C,F$,F)},writePackedSFixed32:function(C,F){F.length&&this.writeMessage(C,N$,F)},writePackedFixed64:function(C,F){F.length&&this.writeMessage(C,B$,F)},writePackedSFixed64:function(C,F){F.length&&this.writeMessage(C,j$,F)},writeBytesField:function(C,F){this.writeTag(C,to.Bytes),this.writeBytes(F)},writeFixed32Field:function(C,F){this.writeTag(C,to.Fixed32),this.writeFixed32(F)},writeSFixed32Field:function(C,F){this.writeTag(C,to.Fixed32),this.writeSFixed32(F)},writeFixed64Field:function(C,F){this.writeTag(C,to.Fixed64),this.writeFixed64(F)},writeSFixed64Field:function(C,F){this.writeTag(C,to.Fixed64),this.writeSFixed64(F)},writeVarintField:function(C,F){this.writeTag(C,to.Varint),this.writeVarint(F)},writeSVarintField:function(C,F){this.writeTag(C,to.Varint),this.writeSVarint(F)},writeStringField:function(C,F){this.writeTag(C,to.Bytes),this.writeString(F)},writeFloatField:function(C,F){this.writeTag(C,to.Fixed32),this.writeFloat(F)},writeDoubleField:function(C,F){this.writeTag(C,to.Fixed64),this.writeDouble(F)},writeBooleanField:function(C,F){this.writeVarintField(C,Boolean(F))}};function U$(C,F,J){C===1&&J.readMessage(V$,F)}function V$(C,F,J){if(C===3){var oe=J.readMessage(q$,{}),pe=oe.id,xe=oe.bitmap,Ce=oe.width,Ne=oe.height,Ze=oe.left,ct=oe.top,gt=oe.advance;F.push({id:pe,bitmap:new Pp({width:Ce+6,height:Ne+6},xe),metrics:{width:Ce,height:Ne,left:Ze,top:ct,advance:gt}})}}function q$(C,F,J){C===1?F.id=J.readVarint():C===2?F.bitmap=J.readBytes():C===3?F.width=J.readVarint():C===4?F.height=J.readVarint():C===5?F.left=J.readSVarint():C===6?F.top=J.readSVarint():C===7&&(F.advance=J.readVarint())}function b9(C){for(var F=0,J=0,oe=0,pe=C;oe=0;Xt--){var Gt=Ce[Xt];if(!(Bt.w>Gt.w||Bt.h>Gt.h)){if(Bt.x=Gt.x,Bt.y=Gt.y,Ze=Math.max(Ze,Bt.y+Bt.h),Ne=Math.max(Ne,Bt.x+Bt.w),Bt.w===Gt.w&&Bt.h===Gt.h){var on=Ce.pop();Xt0&&vg>Eo&&(Eo=vg)}else{var Px=da[Ia.fontStack],Rp=Px&&Px[yl];if(Rp&&Rp.rect)Rc=Rp.rect,el=Rp.metrics;else{var Dx=Ta[Ia.fontStack],Ix=Dx&&Dx[yl];if(!Ix)continue;el=Ix.metrics}eu=24*(aa-Ia.scale)}Fc?(xi.verticalizable=!0,Io.push({glyph:yl,imageName:wh,x:Hs,y:Es+eu,vertical:Fc,scale:Ia.scale,fontStack:Ia.fontStack,sectionIndex:zo,metrics:el,rect:Rc}),Hs+=Cs*Ia.scale+Ga):(Io.push({glyph:yl,imageName:wh,x:Hs,y:Es+eu,vertical:Fc,scale:Ia.scale,fontStack:Ia.fontStack,sectionIndex:zo,metrics:el,rect:Rc}),Hs+=el.advance*Ia.scale+Ga)}if(Io.length!==0){var zx=Hs-Ga;Ps=Math.max(zx,Ps),$$(Io,0,Io.length-1,Qs,Eo)}Hs=0;var Rx=va*aa+Eo;Do.lineOffset=Math.max(Eo,Aa),Es+=Rx,vl=Math.max(Rx,vl),++ls}else Es+=va,++ls}var fd,yg=Es- -17,Fx=i5(no),xg=Fx.horizontalAlign,hd=Fx.verticalAlign;(function(w1,Nx,Bx,jx,k1,Ux,T1,Vx,A1){var qx=(Nx-Bx)*k1,bg=0;bg=Ux!==T1?-Vx*jx- -17:(-jx*A1+.5)*T1;for(var _g=0,wg=w1;_g=0&&oe>=C&&kx[this.text.charCodeAt(oe)];oe--)J--;this.text=this.text.substring(C,J),this.sectionIndex=this.sectionIndex.slice(C,J)},Ks.prototype.substring=function(C,F){var J=new Ks;return J.text=this.text.substring(C,F),J.sectionIndex=this.sectionIndex.slice(C,F),J.sections=this.sections,J},Ks.prototype.toString=function(){return this.text},Ks.prototype.getMaxScale=function(){var C=this;return this.sectionIndex.reduce(function(F,J){return Math.max(F,C.sections[J].scale)},0)},Ks.prototype.addTextSection=function(C,F){this.text+=C.text,this.sections.push(ug.forText(C.scale,C.fontStack||F));for(var J=this.sections.length-1,oe=0;oe=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var kx={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Ql={};function _9(C,F,J,oe,pe,xe){if(F.imageName){var Ce=oe[F.imageName];return Ce?Ce.displaySize[0]*F.scale*24/xe+pe:0}var Ne=J[F.fontStack],Ze=Ne&&Ne[C];return Ze?Ze.metrics.advance*F.scale+pe:0}function w9(C,F,J,oe){var pe=Math.pow(C-F,2);return oe?C=0,Bt=0,Xt=0;Xt-J/2;){if(--Ce<0)return!1;Ne-=C[Ce].dist(xe),xe=C[Ce]}Ne+=C[Ce].dist(C[Ce+1]),Ce++;for(var Ze=[],ct=0;Neoe;)ct-=Ze.shift().angleDelta;if(ct>pe)return!1;Ce++,Ne+=Bt.dist(Xt)}return!0}function E9(C){for(var F=0,J=0;Jct){var on=(ct-Ze)/Gt,vn=kr(Bt.x,Xt.x,on),Cn=kr(Bt.y,Xt.y,on),En=new cg(vn,Cn,Xt.angleTo(Bt),gt);return En._round(),!Ce||S9(C,En,Ne,Ce,F)?En:void 0}Ze+=Gt}}function Y$(C,F,J,oe,pe,xe,Ce,Ne,Ze){var ct=C9(oe,xe,Ce),gt=O9(oe,pe),Bt=gt*Ce,Xt=C[0].x===0||C[0].x===Ze||C[0].y===0||C[0].y===Ze;return F-Bt=0&&Oa=0&&Fi=0&&vi+Hr<=Vr){var va=new cg(Oa,Fi,Ta,li);va._round(),En&&!S9(on,va,qn,En,Vn)||yi.push(va)}}ei+=xi}return dr||yi.length||Xn||(yi=Gt(on,ei/2,Cn,En,Vn,qn,Xn,!0,br)),yi}(C,Xt?F/2*Ne%F:(gt/2+2*xe)*Ce*Ne%F,F,ct,J,Bt,Xt,!1,Ze)}function L9(C,F,J,oe,pe){for(var xe=[],Ce=0;Ce=oe&&Bt.x>=oe||(gt.x>=oe?gt=new h(oe,gt.y+(Bt.y-gt.y)*((oe-gt.x)/(Bt.x-gt.x)))._round():Bt.x>=oe&&(Bt=new h(oe,gt.y+(Bt.y-gt.y)*((oe-gt.x)/(Bt.x-gt.x)))._round()),gt.y>=pe&&Bt.y>=pe||(gt.y>=pe?gt=new h(gt.x+(Bt.x-gt.x)*((pe-gt.y)/(Bt.y-gt.y)),pe)._round():Bt.y>=pe&&(Bt=new h(gt.x+(Bt.x-gt.x)*((pe-gt.y)/(Bt.y-gt.y)),pe)._round()),Ze&>.equals(Ze[Ze.length-1])||(Ze=[gt],xe.push(Ze)),Ze.push(Bt)))))}return xe}function P9(C,F,J,oe){var pe=[],xe=C.image,Ce=xe.pixelRatio,Ne=xe.paddedRect.w-2,Ze=xe.paddedRect.h-2,ct=C.right-C.left,gt=C.bottom-C.top,Bt=xe.stretchX||[[0,Ne]],Xt=xe.stretchY||[[0,Ze]],Gt=function(va,no){return va+no[1]-no[0]},on=Bt.reduce(Gt,0),vn=Xt.reduce(Gt,0),Cn=Ne-on,En=Ze-vn,Vn=0,qn=on,Xn=0,dr=vn,br=0,Hr=Cn,Vr=0,ei=En;if(xe.content&&oe){var vi=xe.content;Vn=Tx(Bt,0,vi[0]),Xn=Tx(Xt,0,vi[1]),qn=Tx(Bt,vi[0],vi[2]),dr=Tx(Xt,vi[1],vi[3]),br=vi[0]-Vn,Vr=vi[1]-Xn,Hr=vi[2]-vi[0]-qn,ei=vi[3]-vi[1]-dr}var yi=function(va,no,$a,po){var Ga=Ax(va.stretch-Vn,qn,ct,C.left),ss=Mx(va.fixed-br,Hr,va.stretch,on),go=Ax(no.stretch-Xn,dr,gt,C.top),Hs=Mx(no.fixed-Vr,ei,no.stretch,vn),Es=Ax($a.stretch-Vn,qn,ct,C.left),Ps=Mx($a.fixed-br,Hr,$a.stretch,on),vl=Ax(po.stretch-Xn,dr,gt,C.top),Qs=Mx(po.fixed-Vr,ei,po.stretch,vn),ls=new h(Ga,go),Ds=new h(Es,go),Go=new h(Es,vl),gs=new h(Ga,vl),aa=new h(ss/Ce,Hs/Ce),Aa=new h(Ps/Ce,Qs/Ce),Do=F*Math.PI/180;if(Do){var Io=Math.sin(Do),Eo=Math.cos(Do),mo=[Eo,-Io,Io,Eo];ls._matMult(mo),Ds._matMult(mo),gs._matMult(mo),Go._matMult(mo)}var Ia=va.stretch+va.fixed,zo=$a.stretch+$a.fixed,yl=no.stretch+no.fixed,eu=po.stretch+po.fixed;return{tl:ls,tr:Ds,bl:gs,br:Go,tex:{x:xe.paddedRect.x+1+Ia,y:xe.paddedRect.y+1+yl,w:zo-Ia,h:eu-yl},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:aa,pixelOffsetBR:Aa,minFontScaleX:Hr/Ce/ct,minFontScaleY:ei/Ce/gt,isSDF:J}};if(oe&&(xe.stretchX||xe.stretchY))for(var li=D9(Bt,Cn,on),Si=D9(Xt,En,vn),Ai=0;Ai0&&(Gt=Math.max(10,Gt),this.circleDiameter=Gt)}else{var on=xe.top*Ce-Ne,vn=xe.bottom*Ce+Ne,Cn=xe.left*Ce-Ne,En=xe.right*Ce+Ne,Vn=xe.collisionPadding;if(Vn&&(Cn-=Vn[0]*Ce,on-=Vn[1]*Ce,En+=Vn[2]*Ce,vn+=Vn[3]*Ce),ct){var qn=new h(Cn,on),Xn=new h(En,on),dr=new h(Cn,vn),br=new h(En,vn),Hr=ct*Math.PI/180;qn._rotate(Hr),Xn._rotate(Hr),dr._rotate(Hr),br._rotate(Hr),Cn=Math.min(qn.x,Xn.x,dr.x,br.x),En=Math.max(qn.x,Xn.x,dr.x,br.x),on=Math.min(qn.y,Xn.y,dr.y,br.y),vn=Math.max(qn.y,Xn.y,dr.y,br.y)}C.emplaceBack(F.x,F.y,Cn,on,En,vn,J,oe,pe)}this.boxEndIndex=C.length},fg=function(C,F){if(C===void 0&&(C=[]),F===void 0&&(F=X$),this.data=C,this.length=this.data.length,this.compare=F,this.length>0)for(var J=(this.length>>1)-1;J>=0;J--)this._down(J)};function X$(C,F){return CF?1:0}function Z$(C,F,J){F===void 0&&(F=1),J===void 0&&(J=!1);for(var oe=1/0,pe=1/0,xe=-1/0,Ce=-1/0,Ne=C[0],Ze=0;Zexe)&&(xe=ct.x),(!Ze||ct.y>Ce)&&(Ce=ct.y)}var gt=xe-oe,Bt=Ce-pe,Xt=Math.min(gt,Bt),Gt=Xt/2,on=new fg([],J$);if(Xt===0)return new h(oe,pe);for(var vn=oe;vnEn.d||!En.d)&&(En=qn,J&&console.log("found best %d after %d probes",Math.round(1e4*qn.d)/1e4,Vn)),qn.max-En.d<=F||(Gt=qn.h/2,on.push(new hg(qn.p.x-Gt,qn.p.y-Gt,Gt,C)),on.push(new hg(qn.p.x+Gt,qn.p.y-Gt,Gt,C)),on.push(new hg(qn.p.x-Gt,qn.p.y+Gt,Gt,C)),on.push(new hg(qn.p.x+Gt,qn.p.y+Gt,Gt,C)),Vn+=4)}return J&&(console.log("num probes: "+Vn),console.log("best distance: "+En.d)),En.p}function J$(C,F){return F.max-C.max}function hg(C,F,J,oe){this.p=new h(C,F),this.h=J,this.d=function(pe,xe){for(var Ce=!1,Ne=1/0,Ze=0;Zepe.y!=on.y>pe.y&&pe.x<(on.x-Gt.x)*(pe.y-Gt.y)/(on.y-Gt.y)+Gt.x&&(Ce=!Ce),Ne=Math.min(Ne,vh(pe,Gt,on))}return(Ce?1:-1)*Math.sqrt(Ne)}(this.p,oe),this.max=this.d+this.h*Math.SQRT2}fg.prototype.push=function(C){this.data.push(C),this.length++,this._up(this.length-1)},fg.prototype.pop=function(){if(this.length!==0){var C=this.data[0],F=this.data.pop();return this.length--,this.length>0&&(this.data[0]=F,this._down(0)),C}},fg.prototype.peek=function(){return this.data[0]},fg.prototype._up=function(C){for(var F=this.data,J=this.compare,oe=F[C];C>0;){var pe=C-1>>1,xe=F[pe];if(J(oe,xe)>=0)break;F[C]=xe,C=pe}F[C]=oe},fg.prototype._down=function(C){for(var F=this.data,J=this.compare,oe=this.length>>1,pe=F[C];C=0)break;F[C]=Ce,C=xe}F[C]=pe};var o5=Number.POSITIVE_INFINITY;function I9(C,F){return F[1]!==o5?function(J,oe,pe){var xe=0,Ce=0;switch(oe=Math.abs(oe),pe=Math.abs(pe),J){case"top-right":case"top-left":case"top":Ce=pe-7;break;case"bottom-right":case"bottom-left":case"bottom":Ce=7-pe}switch(J){case"top-right":case"bottom-right":case"right":xe=-oe;break;case"top-left":case"bottom-left":case"left":xe=oe}return[xe,Ce]}(C,F[0],F[1]):function(J,oe){var pe=0,xe=0;oe<0&&(oe=0);var Ce=oe/Math.sqrt(2);switch(J){case"top-right":case"top-left":xe=Ce-7;break;case"bottom-right":case"bottom-left":xe=7-Ce;break;case"bottom":xe=7-oe;break;case"top":xe=oe-7}switch(J){case"top-right":case"bottom-right":pe=-Ce;break;case"top-left":case"bottom-left":pe=Ce;break;case"left":pe=oe;break;case"right":pe=-oe}return[pe,xe]}(C,F[0])}function s5(C){switch(C){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function z9(C,F,J,oe,pe,xe,Ce,Ne,Ze,ct,gt,Bt,Xt,Gt,on){var vn=function(Xn,dr,br,Hr,Vr,ei,vi,yi){for(var li=Hr.layout.get("text-rotate").evaluate(ei,{})*Math.PI/180,Si=[],Ai=0,xi=dr.positionedLines;Ai32640&&O(C.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):Cn.kind==="composite"&&((En=[128*Gt.compositeTextSizes[0].evaluate(Ce,{},on),128*Gt.compositeTextSizes[1].evaluate(Ce,{},on)])[0]>32640||En[1]>32640)&&O(C.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),C.addSymbols(C.text,vn,En,Ne,xe,Ce,ct,F,Ze.lineStartIndex,Ze.lineLength,Xt,on);for(var Vn=0,qn=gt;Vn=0;Ce--)if(oe.dist(xe[Ce])0)&&(xe.value.kind!=="constant"||xe.value.value.length>0),ct=Ne.value.kind!=="constant"||!!Ne.value.value||Object.keys(Ne.parameters).length>0,gt=pe.get("symbol-sort-key");if(this.features=[],Ze||ct){for(var Bt=F.iconDependencies,Xt=F.glyphDependencies,Gt=F.availableImages,on=new Pa(this.zoom),vn=0,Cn=C;vn=0;for(var da=0,Oa=Vr.sections;da=0;Ne--)xe[Ne]={x:F[Ne].x,y:F[Ne].y,tileUnitDistanceFromAnchor:pe},Ne>0&&(pe+=F[Ne-1].dist(F[Ne]));for(var Ze=0;Ze0},ja.prototype.hasIconData=function(){return this.icon.segments.get().length>0},ja.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},ja.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},ja.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},ja.prototype.addIndicesForPlacedSymbol=function(C,F){for(var J=C.placedSymbolArray.get(F),oe=J.vertexStartIndex+4*J.numGlyphs,pe=J.vertexStartIndex;pe1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(C),this.sortedAngle=C,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var J=0,oe=this.symbolInstanceIndexes;J=0&&Ze.indexOf(Ce)===Ne&&F.addIndicesForPlacedSymbol(F.text,Ce)}),xe.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,xe.verticalPlacedTextSymbolIndex),xe.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,xe.placedIconSymbolIndex),xe.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,xe.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Qn("SymbolBucket",ja,{omit:["layers","collisionBoxArray","features","compareText"]}),ja.MAX_GLYPHS=65535,ja.addDynamicAttributes=l5;var nG=new Us({"symbol-placement":new wi(De.layout_symbol["symbol-placement"]),"symbol-spacing":new wi(De.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new wi(De.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Di(De.layout_symbol["symbol-sort-key"]),"symbol-z-order":new wi(De.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new wi(De.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new wi(De.layout_symbol["icon-ignore-placement"]),"icon-optional":new wi(De.layout_symbol["icon-optional"]),"icon-rotation-alignment":new wi(De.layout_symbol["icon-rotation-alignment"]),"icon-size":new Di(De.layout_symbol["icon-size"]),"icon-text-fit":new wi(De.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new wi(De.layout_symbol["icon-text-fit-padding"]),"icon-image":new Di(De.layout_symbol["icon-image"]),"icon-rotate":new Di(De.layout_symbol["icon-rotate"]),"icon-padding":new wi(De.layout_symbol["icon-padding"]),"icon-keep-upright":new wi(De.layout_symbol["icon-keep-upright"]),"icon-offset":new Di(De.layout_symbol["icon-offset"]),"icon-anchor":new Di(De.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new wi(De.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new wi(De.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new wi(De.layout_symbol["text-rotation-alignment"]),"text-field":new Di(De.layout_symbol["text-field"]),"text-font":new Di(De.layout_symbol["text-font"]),"text-size":new Di(De.layout_symbol["text-size"]),"text-max-width":new Di(De.layout_symbol["text-max-width"]),"text-line-height":new wi(De.layout_symbol["text-line-height"]),"text-letter-spacing":new Di(De.layout_symbol["text-letter-spacing"]),"text-justify":new Di(De.layout_symbol["text-justify"]),"text-radial-offset":new Di(De.layout_symbol["text-radial-offset"]),"text-variable-anchor":new wi(De.layout_symbol["text-variable-anchor"]),"text-anchor":new Di(De.layout_symbol["text-anchor"]),"text-max-angle":new wi(De.layout_symbol["text-max-angle"]),"text-writing-mode":new wi(De.layout_symbol["text-writing-mode"]),"text-rotate":new Di(De.layout_symbol["text-rotate"]),"text-padding":new wi(De.layout_symbol["text-padding"]),"text-keep-upright":new wi(De.layout_symbol["text-keep-upright"]),"text-transform":new Di(De.layout_symbol["text-transform"]),"text-offset":new Di(De.layout_symbol["text-offset"]),"text-allow-overlap":new wi(De.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new wi(De.layout_symbol["text-ignore-placement"]),"text-optional":new wi(De.layout_symbol["text-optional"])}),u5={paint:new Us({"icon-opacity":new Di(De.paint_symbol["icon-opacity"]),"icon-color":new Di(De.paint_symbol["icon-color"]),"icon-halo-color":new Di(De.paint_symbol["icon-halo-color"]),"icon-halo-width":new Di(De.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Di(De.paint_symbol["icon-halo-blur"]),"icon-translate":new wi(De.paint_symbol["icon-translate"]),"icon-translate-anchor":new wi(De.paint_symbol["icon-translate-anchor"]),"text-opacity":new Di(De.paint_symbol["text-opacity"]),"text-color":new Di(De.paint_symbol["text-color"],{runtimeType:St,getOverride:function(C){return C.textColor},hasOverride:function(C){return!!C.textColor}}),"text-halo-color":new Di(De.paint_symbol["text-halo-color"]),"text-halo-width":new Di(De.paint_symbol["text-halo-width"]),"text-halo-blur":new Di(De.paint_symbol["text-halo-blur"]),"text-translate":new wi(De.paint_symbol["text-translate"]),"text-translate-anchor":new wi(De.paint_symbol["text-translate-anchor"])}),layout:nG},pg=function(C){this.type=C.property.overrides?C.property.overrides.runtimeType:Ut,this.defaultValue=C};pg.prototype.evaluate=function(C){if(C.formattedSection){var F=this.defaultValue.property.overrides;if(F&&F.hasOverride(C.formattedSection))return F.getOverride(C.formattedSection)}return C.feature&&C.featureState?this.defaultValue.evaluate(C.feature,C.featureState):this.defaultValue.property.specification.default},pg.prototype.eachChild=function(C){this.defaultValue.isConstant()||C(this.defaultValue.value._styleExpression.expression)},pg.prototype.outputDefined=function(){return!1},pg.prototype.serialize=function(){return null},Qn("FormatSectionOverride",pg,{omit:["defaultValue"]});var rG=function(C){function F(J){C.call(this,J,u5)}return C&&(F.__proto__=C),F.prototype=Object.create(C&&C.prototype),F.prototype.constructor=F,F.prototype.recalculate=function(J,oe){if(C.prototype.recalculate.call(this,J,oe),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 pe=this.layout.get("text-writing-mode");if(pe){for(var xe=[],Ce=0,Ne=pe;Ce",targetMapId:oe,sourceMapId:xe.mapId})}}},gg.prototype.receive=function(C){var F=C.data,J=F.id;if(J&&(!F.targetMapId||this.mapId===F.targetMapId))if(F.type===""){delete this.tasks[J];var oe=this.cancelCallbacks[J];delete this.cancelCallbacks[J],oe&&oe()}else L()||F.mustQueue?(this.tasks[J]=F,this.taskQueue.push(J),this.invoker.trigger()):this.processTask(J,F)},gg.prototype.process=function(){if(this.taskQueue.length){var C=this.taskQueue.shift(),F=this.tasks[C];delete this.tasks[C],this.taskQueue.length&&this.invoker.trigger(),F&&this.processTask(C,F)}},gg.prototype.processTask=function(C,F){var J=this;if(F.type===""){var oe=this.callbacks[C];delete this.callbacks[C],oe&&(F.error?oe(Ni(F.error)):oe(null,Ni(F.data)))}else{var pe=!1,xe=B(this.globalScope)?void 0:[],Ce=F.hasCallback?function(gt,Bt){pe=!0,delete J.cancelCallbacks[C],J.target.postMessage({id:C,type:"",sourceMapId:J.mapId,error:gt?fi(gt):null,data:fi(Bt,xe)},xe)}:function(gt){pe=!0},Ne=null,Ze=Ni(F.data);if(this.parent[F.type])Ne=this.parent[F.type](F.sourceMapId,Ze,Ce);else if(this.parent.getWorkerSource){var ct=F.type.split(".");Ne=this.parent.getWorkerSource(F.sourceMapId,ct[0],Ze.source)[ct[1]](Ze,Ce)}else Ce(new Error("Could not find function "+F.type));!pe&&Ne&&Ne.cancel&&(this.cancelCallbacks[C]=Ne.cancel)}},gg.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var as=function(C,F){C&&(F?this.setSouthWest(C).setNorthEast(F):C.length===4?this.setSouthWest([C[0],C[1]]).setNorthEast([C[2],C[3]]):this.setSouthWest(C[0]).setNorthEast(C[1]))};as.prototype.setNorthEast=function(C){return this._ne=C instanceof ho?new ho(C.lng,C.lat):ho.convert(C),this},as.prototype.setSouthWest=function(C){return this._sw=C instanceof ho?new ho(C.lng,C.lat):ho.convert(C),this},as.prototype.extend=function(C){var F,J,oe=this._sw,pe=this._ne;if(C instanceof ho)F=C,J=C;else{if(!(C instanceof as)){if(Array.isArray(C)){if(C.length===4||C.every(Array.isArray)){var xe=C;return this.extend(as.convert(xe))}var Ce=C;return this.extend(ho.convert(Ce))}return this}if(F=C._sw,J=C._ne,!F||!J)return this}return oe||pe?(oe.lng=Math.min(F.lng,oe.lng),oe.lat=Math.min(F.lat,oe.lat),pe.lng=Math.max(J.lng,pe.lng),pe.lat=Math.max(J.lat,pe.lat)):(this._sw=new ho(F.lng,F.lat),this._ne=new ho(J.lng,J.lat)),this},as.prototype.getCenter=function(){return new ho((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},as.prototype.getSouthWest=function(){return this._sw},as.prototype.getNorthEast=function(){return this._ne},as.prototype.getNorthWest=function(){return new ho(this.getWest(),this.getNorth())},as.prototype.getSouthEast=function(){return new ho(this.getEast(),this.getSouth())},as.prototype.getWest=function(){return this._sw.lng},as.prototype.getSouth=function(){return this._sw.lat},as.prototype.getEast=function(){return this._ne.lng},as.prototype.getNorth=function(){return this._ne.lat},as.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},as.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},as.prototype.isEmpty=function(){return!(this._sw&&this._ne)},as.prototype.contains=function(C){var F=ho.convert(C),J=F.lng,oe=F.lat,pe=this._sw.lat<=oe&&oe<=this._ne.lat,xe=this._sw.lng<=J&&J<=this._ne.lng;return this._sw.lng>this._ne.lng&&(xe=this._sw.lng>=J&&J>=this._ne.lng),pe&&xe},as.convert=function(C){return!C||C instanceof as?C:new as(C)};var ho=function(C,F){if(isNaN(C)||isNaN(F))throw new Error("Invalid LngLat object: ("+C+", "+F+")");if(this.lng=+C,this.lat=+F,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};ho.prototype.wrap=function(){return new ho(y(this.lng,-180,180),this.lat)},ho.prototype.toArray=function(){return[this.lng,this.lat]},ho.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},ho.prototype.distanceTo=function(C){var F=Math.PI/180,J=this.lat*F,oe=C.lat*F,pe=Math.sin(J)*Math.sin(oe)+Math.cos(J)*Math.cos(oe)*Math.cos((C.lng-this.lng)*F);return 63710088e-1*Math.acos(Math.min(pe,1))},ho.prototype.toBounds=function(C){C===void 0&&(C=0);var F=360*C/40075017,J=F/Math.cos(Math.PI/180*this.lat);return new as(new ho(this.lng-J,this.lat-F),new ho(this.lng+J,this.lat+F))},ho.convert=function(C){if(C instanceof ho)return C;if(Array.isArray(C)&&(C.length===2||C.length===3))return new ho(Number(C[0]),Number(C[1]));if(!Array.isArray(C)&&typeof C=="object"&&C!==null)return new ho(Number("lng"in C?C.lng:C.lon),Number(C.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 V9=2*Math.PI*63710088e-1;function q9(C){return V9*Math.cos(C*Math.PI/180)}function H9(C){return(180+C)/360}function $9(C){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+C*Math.PI/360)))/360}function G9(C,F){return C/q9(F)}function f5(C){var F=180-360*C;return 360/Math.PI*Math.atan(Math.exp(F*Math.PI/180))-90}var Ip=function(C,F,J){J===void 0&&(J=0),this.x=+C,this.y=+F,this.z=+J};Ip.fromLngLat=function(C,F){F===void 0&&(F=0);var J=ho.convert(C);return new Ip(H9(J.lng),$9(J.lat),G9(F,J.lat))},Ip.prototype.toLngLat=function(){return new ho(360*this.x-180,f5(this.y))},Ip.prototype.toAltitude=function(){return C=this.z,F=this.y,C*q9(f5(F));var C,F},Ip.prototype.meterInMercatorCoordinateUnits=function(){return 1/V9*(C=f5(this.y),1/Math.cos(C*Math.PI/180));var C};var zp=function(C,F,J){this.z=C,this.x=F,this.y=J,this.key=_1(0,C,C,F,J)};zp.prototype.equals=function(C){return this.z===C.z&&this.x===C.x&&this.y===C.y},zp.prototype.url=function(C,F){var J,oe,pe,xe,Ce,Ne=(J=this.x,oe=this.y,pe=this.z,xe=U9(256*J,256*(oe=Math.pow(2,pe)-oe-1),pe),Ce=U9(256*(J+1),256*(oe+1),pe),xe[0]+","+xe[1]+","+Ce[0]+","+Ce[1]),Ze=function(ct,gt,Bt){for(var Xt,Gt="",on=ct;on>0;on--)Gt+=(gt&(Xt=1<this.canonical.z?new os(C,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new os(C,this.wrap,C,this.canonical.x>>F,this.canonical.y>>F)},os.prototype.calculateScaledKey=function(C,F){var J=this.canonical.z-C;return C>this.canonical.z?_1(this.wrap*+F,C,this.canonical.z,this.canonical.x,this.canonical.y):_1(this.wrap*+F,C,C,this.canonical.x>>J,this.canonical.y>>J)},os.prototype.isChildOf=function(C){if(C.wrap!==this.wrap)return!1;var F=this.canonical.z-C.canonical.z;return C.overscaledZ===0||C.overscaledZ>F&&C.canonical.y===this.canonical.y>>F},os.prototype.children=function(C){if(this.overscaledZ>=C)return[new os(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var F=this.canonical.z+1,J=2*this.canonical.x,oe=2*this.canonical.y;return[new os(F,this.wrap,F,J,oe),new os(F,this.wrap,F,J+1,oe),new os(F,this.wrap,F,J,oe+1),new os(F,this.wrap,F,J+1,oe+1)]},os.prototype.isLessThan=function(C){return this.wrapC.wrap)&&(this.overscaledZC.overscaledZ)&&(this.canonical.xC.canonical.x)&&this.canonical.y=this.dim+1||F<-1||F>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(F+1)*this.stride+(C+1)},bh.prototype._unpackMapbox=function(C,F,J){return(256*C*256+256*F+J)/10-1e4},bh.prototype._unpackTerrarium=function(C,F,J){return 256*C+F+J/256-32768},bh.prototype.getPixels=function(){return new Sl({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},bh.prototype.backfillBorder=function(C,F,J){if(this.dim!==C.dim)throw new Error("dem dimension mismatch");var oe=F*this.dim,pe=F*this.dim+this.dim,xe=J*this.dim,Ce=J*this.dim+this.dim;switch(F){case-1:oe=pe-1;break;case 1:pe=oe+1}switch(J){case-1:xe=Ce-1;break;case 1:Ce=xe+1}for(var Ne=-F*this.dim,Ze=-J*this.dim,ct=xe;ct=0&>[3]>=0&&Ne.insert(Ce,gt[0],gt[1],gt[2],gt[3])}},_h.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new og.VectorTile(new xx(this.rawTileData)).layers,this.sourceLayerCoder=new Ox(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},_h.prototype.query=function(C,F,J,oe){var pe=this;this.loadVTLayers();for(var xe=C.params||{},Ce=8192/C.tileSize/C.scale,Ne=Ui(xe.filter),Ze=C.queryGeometry,ct=C.queryPadding*Ce,gt=X9(Ze),Bt=this.grid.query(gt.minX-ct,gt.minY-ct,gt.maxX+ct,gt.maxY+ct),Xt=X9(C.cameraQueryGeometry),Gt=this.grid3D.query(Xt.minX-ct,Xt.minY-ct,Xt.maxX+ct,Xt.maxY+ct,function(dr,br,Hr,Vr){return function(ei,vi,yi,li,Si){for(var Ai=0,xi=ei;Ai=Ta.x&&Si>=Ta.y)return!0}var da=[new h(vi,yi),new h(vi,Si),new h(li,Si),new h(li,yi)];if(ei.length>2){for(var Oa=0,Fi=da;Oa=0)return!0;return!1}(xe,Bt)){var Xt=this.sourceLayerCoder.decode(J),Gt=this.vtLayers[Xt].feature(oe);if(pe.filter(new Pa(this.tileID.overscaledZ),Gt))for(var on=this.getId(Gt,Xt),vn=0;vnoe)pe=!1;else if(F)if(this.expirationTimeVe&&(C.getActor().send("enforceCacheSizeLimit",Fe),nt=0)},i.clamp=v,i.clearTileCache=function(C){var F=self.caches.delete("mapbox-tiles");C&&F.catch(C).then(function(){return C()})},i.clipLine=L9,i.clone=function(C){var F=new Ml(16);return F[0]=C[0],F[1]=C[1],F[2]=C[2],F[3]=C[3],F[4]=C[4],F[5]=C[5],F[6]=C[6],F[7]=C[7],F[8]=C[8],F[9]=C[9],F[10]=C[10],F[11]=C[11],F[12]=C[12],F[13]=C[13],F[14]=C[14],F[15]=C[15],F},i.clone$1=E,i.clone$2=function(C){var F=new Ml(3);return F[0]=C[0],F[1]=C[1],F[2]=C[2],F},i.collisionCircleLayout=O$,i.config=$,i.create=function(){var C=new Ml(16);return Ml!=Float32Array&&(C[1]=0,C[2]=0,C[3]=0,C[4]=0,C[6]=0,C[7]=0,C[8]=0,C[9]=0,C[11]=0,C[12]=0,C[13]=0,C[14]=0),C[0]=1,C[5]=1,C[10]=1,C[15]=1,C},i.create$1=function(){var C=new Ml(9);return Ml!=Float32Array&&(C[1]=0,C[2]=0,C[3]=0,C[5]=0,C[6]=0,C[7]=0),C[0]=1,C[4]=1,C[8]=1,C},i.create$2=function(){var C=new Ml(4);return Ml!=Float32Array&&(C[1]=0,C[2]=0),C[0]=1,C[3]=1,C},i.createCommonjsModule=s,i.createExpression=Yt,i.createLayout=Da,i.createStyleLayer=function(C){return C.type==="custom"?new lG(C):new uG[C.type](C)},i.cross=function(C,F,J){var oe=F[0],pe=F[1],xe=F[2],Ce=J[0],Ne=J[1],Ze=J[2];return C[0]=pe*Ze-xe*Ne,C[1]=xe*Ce-oe*Ze,C[2]=oe*Ne-pe*Ce,C},i.deepEqual=function C(F,J){if(Array.isArray(F)){if(!Array.isArray(J)||F.length!==J.length)return!1;for(var oe=0;oe0&&(xe=1/Math.sqrt(xe)),C[0]=F[0]*xe,C[1]=F[1]*xe,C[2]=F[2]*xe,C},i.number=kr,i.offscreenCanvasSupported=ft,i.ortho=function(C,F,J,oe,pe,xe,Ce){var Ne=1/(F-J),Ze=1/(oe-pe),ct=1/(xe-Ce);return C[0]=-2*Ne,C[1]=0,C[2]=0,C[3]=0,C[4]=0,C[5]=-2*Ze,C[6]=0,C[7]=0,C[8]=0,C[9]=0,C[10]=2*ct,C[11]=0,C[12]=(F+J)*Ne,C[13]=(pe+oe)*Ze,C[14]=(Ce+xe)*ct,C[15]=1,C},i.parseGlyphPBF=function(C){return new xx(C).readFields(U$,[])},i.pbf=xx,i.performSymbolLayout=function(C,F,J,oe,pe,xe,Ce){C.createArrays();var Ne=512*C.overscaling;C.tilePixelRatio=8192/Ne,C.compareText={},C.iconsNeedLinear=!1;var Ze=C.layers[0].layout,ct=C.layers[0]._unevaluatedLayout._values,gt={};if(C.textSizeData.kind==="composite"){var Bt=C.textSizeData,Xt=Bt.minZoom,Gt=Bt.maxZoom;gt.compositeTextSizes=[ct["text-size"].possiblyEvaluate(new Pa(Xt),Ce),ct["text-size"].possiblyEvaluate(new Pa(Gt),Ce)]}if(C.iconSizeData.kind==="composite"){var on=C.iconSizeData,vn=on.minZoom,Cn=on.maxZoom;gt.compositeIconSizes=[ct["icon-size"].possiblyEvaluate(new Pa(vn),Ce),ct["icon-size"].possiblyEvaluate(new Pa(Cn),Ce)]}gt.layoutTextSize=ct["text-size"].possiblyEvaluate(new Pa(C.zoom+1),Ce),gt.layoutIconSize=ct["icon-size"].possiblyEvaluate(new Pa(C.zoom+1),Ce),gt.textMaxSize=ct["text-size"].possiblyEvaluate(new Pa(18));for(var En=24*Ze.get("text-line-height"),Vn=Ze.get("text-rotation-alignment")==="map"&&Ze.get("symbol-placement")!=="point",qn=Ze.get("text-keep-upright"),Xn=Ze.get("text-size"),dr=function(){var Vr=Hr[br],ei=Ze.get("text-font").evaluate(Vr,{},Ce).join(","),vi=Xn.evaluate(Vr,{},Ce),yi=gt.layoutTextSize.evaluate(Vr,{},Ce),li=gt.layoutIconSize.evaluate(Vr,{},Ce),Si={horizontal:{},vertical:void 0},Ai=Vr.text,xi=[0,0];if(Ai){var Ta=Ai.toString(),da=24*Ze.get("text-letter-spacing").evaluate(Vr,{},Ce),Oa=function(aa){for(var Aa=0,Do=aa;Aa=8192||S1.y<0||S1.y>=8192||function(Vo,jc,dG,dd,y5,eC,$x,Tf,Gx,E1,Wx,Yx,x5,tC,C1,nC,rC,iC,aC,oC,bu,Xx,sC,Af,pG){var b5,Fp,Ag,Mg,Sg,Eg=Vo.addToLineVertexArray(jc,dG),lC=0,uC=0,cC=0,fC=0,_5=-1,w5=-1,kh={},hC=Sn(""),k5=0,T5=0;if(Tf._unevaluatedLayout.getValue("text-radial-offset")===void 0?(b5=Tf.layout.get("text-offset").evaluate(bu,{},Af).map(function(L1){return 24*L1}),k5=b5[0],T5=b5[1]):(k5=24*Tf.layout.get("text-radial-offset").evaluate(bu,{},Af),T5=o5),Vo.allowVerticalPlacement&&dd.vertical){var dC=Tf.layout.get("text-rotate").evaluate(bu,{},Af)+90,gG=dd.vertical;Mg=new Sx(Gx,jc,E1,Wx,Yx,gG,x5,tC,C1,dC),$x&&(Sg=new Sx(Gx,jc,E1,Wx,Yx,$x,rC,iC,C1,dC))}if(y5){var A5=Tf.layout.get("icon-rotate").evaluate(bu,{}),pC=Tf.layout.get("icon-text-fit")!=="none",gC=P9(y5,A5,sC,pC),M5=$x?P9($x,A5,sC,pC):void 0;Ag=new Sx(Gx,jc,E1,Wx,Yx,y5,rC,iC,!1,A5),lC=4*gC.length;var mC=Vo.iconSizeData,O1=null;mC.kind==="source"?(O1=[128*Tf.layout.get("icon-size").evaluate(bu,{})])[0]>32640&&O(Vo.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):mC.kind==="composite"&&((O1=[128*Xx.compositeIconSizes[0].evaluate(bu,{},Af),128*Xx.compositeIconSizes[1].evaluate(bu,{},Af)])[0]>32640||O1[1]>32640)&&O(Vo.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),Vo.addSymbols(Vo.icon,gC,O1,oC,aC,bu,!1,jc,Eg.lineStartIndex,Eg.lineLength,-1,Af),_5=Vo.icon.placedSymbolArray.length-1,M5&&(uC=4*M5.length,Vo.addSymbols(Vo.icon,M5,O1,oC,aC,bu,xu.vertical,jc,Eg.lineStartIndex,Eg.lineLength,-1,Af),w5=Vo.icon.placedSymbolArray.length-1)}for(var vC in dd.horizontal){var Zx=dd.horizontal[vC];if(!Fp){hC=Sn(Zx.text);var mG=Tf.layout.get("text-rotate").evaluate(bu,{},Af);Fp=new Sx(Gx,jc,E1,Wx,Yx,Zx,x5,tC,C1,mG)}var yC=Zx.positionedLines.length===1;if(cC+=z9(Vo,jc,Zx,eC,Tf,C1,bu,nC,Eg,dd.vertical?xu.horizontal:xu.horizontalOnly,yC?Object.keys(dd.horizontal):[vC],kh,_5,Xx,Af),yC)break}dd.vertical&&(fC+=z9(Vo,jc,dd.vertical,eC,Tf,C1,bu,nC,Eg,xu.vertical,["vertical"],kh,w5,Xx,Af));var vG=Fp?Fp.boxStartIndex:Vo.collisionBoxArray.length,yG=Fp?Fp.boxEndIndex:Vo.collisionBoxArray.length,xG=Mg?Mg.boxStartIndex:Vo.collisionBoxArray.length,bG=Mg?Mg.boxEndIndex:Vo.collisionBoxArray.length,_G=Ag?Ag.boxStartIndex:Vo.collisionBoxArray.length,wG=Ag?Ag.boxEndIndex:Vo.collisionBoxArray.length,kG=Sg?Sg.boxStartIndex:Vo.collisionBoxArray.length,TG=Sg?Sg.boxEndIndex:Vo.collisionBoxArray.length,Mf=-1,Jx=function(L1,bC){return L1&&L1.circleDiameter?Math.max(L1.circleDiameter,bC):bC};Mf=Jx(Fp,Mf),Mf=Jx(Mg,Mf),Mf=Jx(Ag,Mf);var xC=(Mf=Jx(Sg,Mf))>-1?1:0;xC&&(Mf*=pG/24),Vo.glyphOffsetArray.length>=ja.MAX_GLYPHS&&O("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),bu.sortKey!==void 0&&Vo.addToSortKeyRanges(Vo.symbolInstances.length,bu.sortKey),Vo.symbolInstances.emplaceBack(jc.x,jc.y,kh.right>=0?kh.right:-1,kh.center>=0?kh.center:-1,kh.left>=0?kh.left:-1,kh.vertical||-1,_5,w5,hC,vG,yG,xG,bG,_G,wG,kG,TG,E1,cC,fC,lC,uC,xC,0,x5,k5,T5,Mf)}(aa,S1,hG,Do,Io,Eo,wh,aa.layers[0],aa.collisionBoxArray,Aa.index,Aa.sourceLayerIndex,aa.index,d5,Dx,Rx,yl,Px,Ix,fd,Fc,Aa,mo,eu,el,Ia)};if(yg==="line")for(var w1=0,Nx=L9(Aa.geometry,0,0,8192,8192);w11){var _g=W$(bg,zx,Do.vertical||Nc,Io,24,vg);_g&&hd(bg,_g)}}else if(Aa.type==="Polygon")for(var wg=0,Hx=K3(Aa.geometry,0);wg=mn.maxzoom||mn.visibility!=="none"&&(g(Ht,this.zoom,Ae),(tt[mn.id]=mn.createBucket({index:ot.bucketLayerIDs.length,layers:Ht,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Le,sourceID:this.source})).populate(Je,bt,this.tileID.canonical),ot.bucketLayerIDs.push(Ht.map(function(sn){return sn.id})))}}}var zn=i.mapObject(bt.glyphDependencies,function(sn){return Object.keys(sn).map(Number)});Object.keys(zn).length?De.send("getGlyphs",{uid:this.uid,stacks:zn},function(sn,gn){kt||(kt=sn,wt=gn,nn.call(rt))}):wt={};var pn=Object.keys(bt.iconDependencies);pn.length?De.send("getImages",{icons:pn,source:this.source,tileID:this.tileID,type:"icons"},function(sn,gn){kt||(kt=sn,Vt=gn,nn.call(rt))}):Vt={};var tn=Object.keys(bt.patternDependencies);function nn(){if(kt)return He(kt);if(wt&&Vt&&Ut){var sn=new h(wt),gn=new i.ImageAtlas(Vt,Ut);for(var bn in tt){var In=tt[bn];In instanceof i.SymbolBucket?(g(In.layers,this.zoom,Ae),i.performSymbolLayout(In,wt,sn.positions,Vt,gn.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):In.hasPattern&&(In instanceof i.LineBucket||In instanceof i.FillBucket||In instanceof i.FillExtrusionBucket)&&(g(In.layers,this.zoom,Ae),In.addFeatures(bt,this.tileID.canonical,gn.patternPositions))}this.status="done",He(null,{buckets:i.values(tt).filter(function(Hn){return!Hn.isEmpty()}),featureIndex:ot,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:sn.image,imageAtlas:gn,glyphMap:this.returnDependencies?wt:null,iconMap:this.returnDependencies?Vt:null,glyphPositions:this.returnDependencies?sn.positions:null})}}tn.length?De.send("getImages",{icons:tn,source:this.source,tileID:this.tileID,type:"patterns"},function(sn,gn){kt||(kt=sn,Ut=gn,nn.call(rt))}):Ut={},nn.call(this)};var v=function(Pe,Ie,Ae,De){this.actor=Pe,this.layerIndex=Ie,this.availableImages=Ae,this.loadVectorData=De||p,this.loading={},this.loaded={}};v.prototype.loadTile=function(Pe,Ie){var Ae=this,De=Pe.uid;this.loading||(this.loading={});var He=!!(Pe&&Pe.request&&Pe.request.collectResourceTiming)&&new i.RequestPerformance(Pe.request),rt=this.loading[De]=new m(Pe);rt.abort=this.loadVectorData(Pe,function(lt,ot){if(delete Ae.loading[De],lt||!ot)return rt.status="done",Ae.loaded[De]=rt,Ie(lt);var kt=ot.rawData,wt={};ot.expires&&(wt.expires=ot.expires),ot.cacheControl&&(wt.cacheControl=ot.cacheControl);var Vt={};if(He){var Ut=He.finish();Ut&&(Vt.resourceTiming=JSON.parse(JSON.stringify(Ut)))}rt.vectorTile=ot.vectorTile,rt.parse(ot.vectorTile,Ae.layerIndex,Ae.availableImages,Ae.actor,function(tt,bt){if(tt||!bt)return Ie(tt);Ie(null,i.extend({rawTileData:kt.slice(0)},bt,wt,Vt))}),Ae.loaded=Ae.loaded||{},Ae.loaded[De]=rt})},v.prototype.reloadTile=function(Pe,Ie){var Ae=this,De=this.loaded,He=Pe.uid,rt=this;if(De&&De[He]){var lt=De[He];lt.showCollisionBoxes=Pe.showCollisionBoxes;var ot=function(kt,wt){var Vt=lt.reloadCallback;Vt&&(delete lt.reloadCallback,lt.parse(lt.vectorTile,rt.layerIndex,Ae.availableImages,rt.actor,Vt)),Ie(kt,wt)};lt.status==="parsing"?lt.reloadCallback=ot:lt.status==="done"&&(lt.vectorTile?lt.parse(lt.vectorTile,this.layerIndex,this.availableImages,this.actor,ot):ot())}},v.prototype.abortTile=function(Pe,Ie){var Ae=this.loading,De=Pe.uid;Ae&&Ae[De]&&Ae[De].abort&&(Ae[De].abort(),delete Ae[De]),Ie()},v.prototype.removeTile=function(Pe,Ie){var Ae=this.loaded,De=Pe.uid;Ae&&Ae[De]&&delete Ae[De],Ie()};var y=i.window.ImageBitmap,x=function(){this.loaded={}};x.prototype.loadTile=function(Pe,Ie){var Ae=Pe.uid,De=Pe.encoding,He=Pe.rawImageData,rt=y&&He instanceof y?this.getImageData(He):He,lt=new i.DEMData(Ae,rt,De);this.loaded=this.loaded||{},this.loaded[Ae]=lt,Ie(null,lt)},x.prototype.getImageData=function(Pe){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(Pe.width,Pe.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=Pe.width,this.offscreenCanvas.height=Pe.height,this.offscreenCanvasContext.drawImage(Pe,0,0,Pe.width,Pe.height);var Ie=this.offscreenCanvasContext.getImageData(-1,-1,Pe.width+2,Pe.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new i.RGBAImage({width:Ie.width,height:Ie.height},Ie.data)},x.prototype.removeTile=function(Pe){var Ie=this.loaded,Ae=Pe.uid;Ie&&Ie[Ae]&&delete Ie[Ae]};var w=function Pe(Ie,Ae){var De,He=Ie&&Ie.type;if(He==="FeatureCollection")for(De=0;De=0!=!!Ie&&Pe.reverse()}var T=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,_=function(Pe){this._feature=Pe,this.extent=i.EXTENT,this.type=Pe.type,this.properties=Pe.tags,"id"in Pe&&!isNaN(Pe.id)&&(this.id=parseInt(Pe.id,10))};_.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Pe=[],Ie=0,Ae=this._feature.geometry;Ie>31}function te(Pe,Ie){for(var Ae=Pe.loadGeometry(),De=Pe.type,He=0,rt=0,lt=Ae.length,ot=0;ot>1;(function ot(kt,wt,Vt,Ut,tt,bt){for(;tt>Ut;){if(tt-Ut>600){var zt=tt-Ut+1,St=Vt-Ut+1,Dt=Math.log(zt),Le=.5*Math.exp(2*Dt/3),Je=.5*Math.sqrt(Dt*Le*(zt-Le)/zt)*(St-zt/2<0?-1:1),st=Math.max(Ut,Math.floor(Vt-St*Le/zt+Je)),Et=Math.min(tt,Math.floor(Vt+(zt-St)*Le/zt+Je));ot(kt,wt,Vt,st,Et,bt)}var It=wt[2*Vt+bt],Zt=Ut,Kt=tt;for(re(kt,wt,Ut,Vt),wt[2*tt+bt]>It&&re(kt,wt,Ut,tt);ZtIt;)Kt--}wt[2*Ut+bt]===It?re(kt,wt,Ut,Kt):(Kt++,re(kt,wt,Kt,tt)),Kt<=Vt&&(Ut=Kt+1),Vt<=Kt&&(tt=Kt-1)}})(Pe,Ie,lt,De,He,rt%2),Z(Pe,Ie,Ae,De,lt-1,rt+1),Z(Pe,Ie,Ae,lt+1,He,rt+1)}}function re(Pe,Ie,Ae,De){U(Pe,Ae,De),U(Ie,2*Ae,2*De),U(Ie,2*Ae+1,2*De+1)}function U(Pe,Ie,Ae){var De=Pe[Ie];Pe[Ie]=Pe[Ae],Pe[Ae]=De}function q(Pe,Ie,Ae,De){var He=Pe-Ae,rt=Ie-De;return He*He+rt*rt}O.fromVectorTileJs=R,O.fromGeojsonVt=z,O.GeoJSONWrapper=L;var $=function(Pe){return Pe[0]},ne=function(Pe){return Pe[1]},H=function(Pe,Ie,Ae,De,He){Ie===void 0&&(Ie=$),Ae===void 0&&(Ae=ne),De===void 0&&(De=64),He===void 0&&(He=Float64Array),this.nodeSize=De,this.points=Pe;for(var rt=Pe.length<65536?Uint16Array:Uint32Array,lt=this.ids=new rt(Pe.length),ot=this.coords=new He(2*Pe.length),kt=0;kt=lt&&Ut<=kt&&tt>=ot&&tt<=wt&&zt.push(He[Je]);else{var st=Math.floor((Le+Dt)/2);Ut=rt[2*st],tt=rt[2*st+1],Ut>=lt&&Ut<=kt&&tt>=ot&&tt<=wt&&zt.push(He[st]);var Et=(St+1)%2;(St===0?lt<=Ut:ot<=tt)&&(bt.push(Le),bt.push(st-1),bt.push(Et)),(St===0?kt>=Ut:wt>=tt)&&(bt.push(st+1),bt.push(Dt),bt.push(Et))}}return zt}(this.ids,this.coords,Pe,Ie,Ae,De,this.nodeSize)},H.prototype.within=function(Pe,Ie,Ae){return function(De,He,rt,lt,ot,kt){for(var wt=[0,De.length-1,0],Vt=[],Ut=ot*ot;wt.length;){var tt=wt.pop(),bt=wt.pop(),zt=wt.pop();if(bt-zt<=kt)for(var St=zt;St<=bt;St++)q(He[2*St],He[2*St+1],rt,lt)<=Ut&&Vt.push(De[St]);else{var Dt=Math.floor((zt+bt)/2),Le=He[2*Dt],Je=He[2*Dt+1];q(Le,Je,rt,lt)<=Ut&&Vt.push(De[Dt]);var st=(tt+1)%2;(tt===0?rt-ot<=Le:lt-ot<=Je)&&(wt.push(zt),wt.push(Dt-1),wt.push(st)),(tt===0?rt+ot>=Le:lt+ot>=Je)&&(wt.push(Dt+1),wt.push(bt),wt.push(st))}}return Vt}(this.ids,this.coords,Pe,Ie,Ae,this.nodeSize)};var Q={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Pe){return Pe}},ee=function(Pe){this.options=me(Object.create(Q),Pe),this.trees=new Array(this.options.maxZoom+1)};function ie(Pe,Ie,Ae,De,He){return{x:Pe,y:Ie,zoom:1/0,id:Ae,parentId:-1,numPoints:De,properties:He}}function ae(Pe,Ie){var Ae=Pe.geometry.coordinates,De=Ae[0],He=Ae[1];return{x:ge(De),y:fe(He),zoom:1/0,index:Ie,parentId:-1}}function ue(Pe){return{type:"Feature",id:Pe.id,properties:le(Pe),geometry:{type:"Point",coordinates:[(De=Pe.x,360*(De-.5)),(Ie=Pe.y,Ae=(180-360*Ie)*Math.PI/180,360*Math.atan(Math.exp(Ae))/Math.PI-90)]}};var Ie,Ae,De}function le(Pe){var Ie=Pe.numPoints,Ae=Ie>=1e4?Math.round(Ie/1e3)+"k":Ie>=1e3?Math.round(Ie/100)/10+"k":Ie;return me(me({},Pe.properties),{cluster:!0,cluster_id:Pe.id,point_count:Ie,point_count_abbreviated:Ae})}function ge(Pe){return Pe/360+.5}function fe(Pe){var Ie=Math.sin(Pe*Math.PI/180),Ae=.5-.25*Math.log((1+Ie)/(1-Ie))/Math.PI;return Ae<0?0:Ae>1?1:Ae}function me(Pe,Ie){for(var Ae in Ie)Pe[Ae]=Ie[Ae];return Pe}function _e(Pe){return Pe.x}function we(Pe){return Pe.y}function Te(Pe,Ie,Ae,De,He,rt){var lt=He-Ae,ot=rt-De;if(lt!==0||ot!==0){var kt=((Pe-Ae)*lt+(Ie-De)*ot)/(lt*lt+ot*ot);kt>1?(Ae=He,De=rt):kt>0&&(Ae+=lt*kt,De+=ot*kt)}return(lt=Pe-Ae)*lt+(ot=Ie-De)*ot}function Oe(Pe,Ie,Ae,De){var He={id:Pe===void 0?null:Pe,type:Ie,geometry:Ae,tags:De,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(rt){var lt=rt.geometry,ot=rt.type;if(ot==="Point"||ot==="MultiPoint"||ot==="LineString")de(rt,lt);else if(ot==="Polygon"||ot==="MultiLineString")for(var kt=0;kt0&&(lt+=De?(He*wt-kt*rt)/2:Math.sqrt(Math.pow(kt-He,2)+Math.pow(wt-rt,2))),He=kt,rt=wt}var Vt=Ie.length-3;Ie[2]=1,function Ut(tt,bt,zt,St){for(var Dt,Le=St,Je=zt-bt>>1,st=zt-bt,Et=tt[bt],It=tt[bt+1],Zt=tt[zt],Kt=tt[zt+1],Ht=bt+3;HtLe)Dt=Ht,Le=mn;else if(mn===Le){var zn=Math.abs(Ht-Je);znSt&&(Dt-bt>3&&Ut(tt,bt,Dt,St),tt[Dt+2]=Le,zt-Dt>3&&Ut(tt,Dt,zt,St))}(Ie,0,Vt,Ae),Ie[Vt+2]=1,Ie.size=Math.abs(lt),Ie.start=0,Ie.end=Ie.size}function Ee(Pe,Ie,Ae,De){for(var He=0;He1?1:Ae}function Ve(Pe,Ie,Ae,De,He,rt,lt,ot){if(De/=Ie,rt>=(Ae/=Ie)&<=De)return null;for(var kt=[],wt=0;wt=Ae&&zt=De)){var St=[];if(tt==="Point"||tt==="MultiPoint")Ke(Ut,St,Ae,De,He);else if(tt==="LineString")Re(Ut,St,Ae,De,He,!1,ot.lineMetrics);else if(tt==="MultiLineString")We(Ut,St,Ae,De,He,!1);else if(tt==="Polygon")We(Ut,St,Ae,De,He,!0);else if(tt==="MultiPolygon")for(var Dt=0;Dt=Ae&<<=De&&(Ie.push(Pe[rt]),Ie.push(Pe[rt+1]),Ie.push(Pe[rt+2]))}}function Re(Pe,Ie,Ae,De,He,rt,lt){for(var ot,kt,wt=qe(Pe),Vt=He===0?nt:ft,Ut=Pe.start,tt=0;ttAe&&(kt=Vt(wt,bt,zt,Dt,Le,Ae),lt&&(wt.start=Ut+ot*kt)):Je>De?st=Ae&&(kt=Vt(wt,bt,zt,Dt,Le,Ae),Et=!0),st>De&&Je<=De&&(kt=Vt(wt,bt,zt,Dt,Le,De),Et=!0),!rt&&Et&&(lt&&(wt.end=Ut+ot*kt),Ie.push(wt),wt=qe(Pe)),lt&&(Ut+=ot)}var It=Pe.length-3;bt=Pe[It],zt=Pe[It+1],St=Pe[It+2],(Je=He===0?bt:zt)>=Ae&&Je<=De&&Ye(wt,bt,zt,St),It=wt.length-3,rt&&It>=3&&(wt[It]!==wt[0]||wt[It+1]!==wt[1])&&Ye(wt,wt[0],wt[1],wt[2]),wt.length&&Ie.push(wt)}function qe(Pe){var Ie=[];return Ie.size=Pe.size,Ie.start=Pe.start,Ie.end=Pe.end,Ie}function We(Pe,Ie,Ae,De,He,rt){for(var lt=0;ltlt.maxX&&(lt.maxX=Vt),Ut>lt.maxY&&(lt.maxY=Ut)}return lt}function Ot(Pe,Ie,Ae,De){var He=Ie.geometry,rt=Ie.type,lt=[];if(rt==="Point"||rt==="MultiPoint")for(var ot=0;ot0&&Ie.size<(He?lt:De))Ae.numPoints+=Ie.length/3;else{for(var ot=[],kt=0;ktlt)&&(Ae.numSimplified++,ot.push(Ie[kt]),ot.push(Ie[kt+1])),Ae.numPoints++;He&&function(wt,Vt){for(var Ut=0,tt=0,bt=wt.length,zt=bt-2;tt0===Vt)for(tt=0,bt=wt.length;tt24)throw new Error("maxZoom should be in the 0-24 range");if(Ie.promoteId&&Ie.generateId)throw new Error("promoteId and generateId cannot be used together.");var De=function(He,rt){var lt=[];if(He.type==="FeatureCollection")for(var ot=0;ot=De;wt--){var Vt=+Date.now();ot=this._cluster(ot,wt),this.trees[wt]=new H(ot,_e,we,rt,Float32Array),Ae&&console.log("z%d: %d clusters in %dms",wt,ot.length,+Date.now()-Vt)}return Ae&&console.timeEnd("total time"),this},ee.prototype.getClusters=function(Pe,Ie){var Ae=((Pe[0]+180)%360+360)%360-180,De=Math.max(-90,Math.min(90,Pe[1])),He=Pe[2]===180?180:((Pe[2]+180)%360+360)%360-180,rt=Math.max(-90,Math.min(90,Pe[3]));if(Pe[2]-Pe[0]>=360)Ae=-180,He=180;else if(Ae>He){var lt=this.getClusters([Ae,De,180,rt],Ie),ot=this.getClusters([-180,De,He,rt],Ie);return lt.concat(ot)}for(var kt=this.trees[this._limitZoom(Ie)],wt=[],Vt=0,Ut=kt.range(ge(Ae),fe(rt),ge(He),fe(De));Vt1?this._map(wt,!0):null,Dt=(kt<<5)+(Ie+1)+this.points.length,Le=0,Je=Ut;Le>5},ee.prototype._getOriginZoom=function(Pe){return(Pe-this.points.length)%32},ee.prototype._map=function(Pe,Ie){if(Pe.numPoints)return Ie?me({},Pe.properties):Pe.properties;var Ae=this.points[Pe.index].properties,De=this.options.map(Ae);return Ie&&De===Ae?me({},De):De},Jt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Jt.prototype.splitTile=function(Pe,Ie,Ae,De,He,rt,lt){for(var ot=[Pe,Ie,Ae,De],kt=this.options,wt=kt.debug;ot.length;){De=ot.pop(),Ae=ot.pop(),Ie=ot.pop(),Pe=ot.pop();var Vt=1<1&&console.time("creation"),tt=this.tiles[Ut]=et(Pe,Ie,Ae,De,kt),this.tileCoords.push({z:Ie,x:Ae,y:De}),wt)){wt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Ie,Ae,De,tt.numFeatures,tt.numPoints,tt.numSimplified),console.timeEnd("creation"));var bt="z"+Ie;this.stats[bt]=(this.stats[bt]||0)+1,this.total++}if(tt.source=Pe,He){if(Ie===kt.maxZoom||Ie===He)continue;var zt=1<1&&console.time("clipping");var St,Dt,Le,Je,st,Et,It=.5*kt.buffer/kt.extent,Zt=.5-It,Kt=.5+It,Ht=1+It;St=Dt=Le=Je=null,st=Ve(Pe,Vt,Ae-It,Ae+Kt,0,tt.minX,tt.maxX,kt),Et=Ve(Pe,Vt,Ae+Zt,Ae+Ht,0,tt.minX,tt.maxX,kt),Pe=null,st&&(St=Ve(st,Vt,De-It,De+Kt,1,tt.minY,tt.maxY,kt),Dt=Ve(st,Vt,De+Zt,De+Ht,1,tt.minY,tt.maxY,kt),st=null),Et&&(Le=Ve(Et,Vt,De-It,De+Kt,1,tt.minY,tt.maxY,kt),Je=Ve(Et,Vt,De+Zt,De+Ht,1,tt.minY,tt.maxY,kt),Et=null),wt>1&&console.timeEnd("clipping"),ot.push(St||[],Ie+1,2*Ae,2*De),ot.push(Dt||[],Ie+1,2*Ae,2*De+1),ot.push(Le||[],Ie+1,2*Ae+1,2*De),ot.push(Je||[],Ie+1,2*Ae+1,2*De+1)}}},Jt.prototype.getTile=function(Pe,Ie,Ae){var De=this.options,He=De.extent,rt=De.debug;if(Pe<0||Pe>24)return null;var lt=1<1&&console.log("drilling down to z%d-%d-%d",Pe,Ie,Ae);for(var kt,wt=Pe,Vt=Ie,Ut=Ae;!kt&&wt>0;)wt--,Vt=Math.floor(Vt/2),Ut=Math.floor(Ut/2),kt=this.tiles[Be(wt,Vt,Ut)];return kt&&kt.source?(rt>1&&console.log("found parent tile z%d-%d-%d",wt,Vt,Ut),rt>1&&console.time("drilling down"),this.splitTile(kt.source,wt,Vt,Ut,Pe,Ie,Ae),rt>1&&console.timeEnd("drilling down"),this.tiles[ot]?At(this.tiles[ot],He):null):null};var Tt=function(Pe){function Ie(Ae,De,He,rt){Pe.call(this,Ae,De,He,Ge),rt&&(this.loadGeoJSON=rt)}return Pe&&(Ie.__proto__=Pe),Ie.prototype=Object.create(Pe&&Pe.prototype),Ie.prototype.constructor=Ie,Ie.prototype.loadData=function(Ae,De){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=De,this._pendingLoadDataParams=Ae,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},Ie.prototype._loadData=function(){var Ae=this;if(this._pendingCallback&&this._pendingLoadDataParams){var De=this._pendingCallback,He=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var rt=!!(He&&He.request&&He.request.collectResourceTiming)&&new i.RequestPerformance(He.request);this.loadGeoJSON(He,function(lt,ot){if(lt||!ot)return De(lt);if(typeof ot!="object")return De(new Error("Input data given to '"+He.source+"' is not a valid GeoJSON object."));w(ot,!0);try{Ae._geoJSONIndex=He.cluster?new ee(function(Vt){var Ut=Vt.superclusterOptions,tt=Vt.clusterProperties;if(!tt||!Ut)return Ut;for(var bt={},zt={},St={accumulated:null,zoom:0},Dt={properties:null},Le=Object.keys(tt),Je=0,st=Le;Je"u"||typeof document>"u"?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var he,ve,be=new Blob([""],{type:"text/javascript"}),Se=URL.createObjectURL(be);try{ve=new Worker(Se),he=!0}catch{he=!1}return ve&&ve.terminate(),URL.revokeObjectURL(Se),he}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var he=document.createElement("canvas");he.width=he.height=1;var ve=he.getContext("2d");if(!ve)return!1;var be=ve.getImageData(0,0,1,1);return be&&be.width===he.width}()?function(he){return X[he]===void 0&&(X[he]=function(ve){var be=function(Ue){var Xe=document.createElement("canvas"),it=Object.create(j.webGLContextAttributes);return it.failIfMajorPerformanceCaveat=Ue,Xe.probablySupportsContext?Xe.probablySupportsContext("webgl",it)||Xe.probablySupportsContext("experimental-webgl",it):Xe.supportsContext?Xe.supportsContext("webgl",it)||Xe.supportsContext("experimental-webgl",it):Xe.getContext("webgl",it)||Xe.getContext("experimental-webgl",it)}(ve);if(!be)return!1;var Se=be.createShader(be.VERTEX_SHADER);return!Se||be.isContextLost()?!1:(be.shaderSource(Se,"void main() {}"),be.compileShader(Se),be.getShaderParameter(Se,be.COMPILE_STATUS)===!0)}(he)),X[he]}(se&&se.failIfMajorPerformanceCaveat)?void 0:"insufficient WebGL support":"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support"}I.exports?I.exports=j:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=j,window.mapboxgl.notSupportedReason=V);var X={};j.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),u={create:function(I,j,V){var X=i.window.document.createElement(I);return j!==void 0&&(X.className=j),V&&V.appendChild(X),X},createNS:function(I,j){return i.window.document.createElementNS(I,j)}},d=i.window.document.documentElement.style;function h(I){if(!d)return I[0];for(var j=0;j=0?0:I.button},u.remove=function(I){I.parentNode&&I.parentNode.removeChild(I)};var k=function(I){function j(){I.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.RGBAImage({width:1,height:1}),this.dirty=!0}return I&&(j.__proto__=I),j.prototype=Object.create(I&&I.prototype),j.prototype.constructor=j,j.prototype.isLoaded=function(){return this.loaded},j.prototype.setLoaded=function(V){if(this.loaded!==V&&(this.loaded=V,V)){for(var X=0,se=this.requestors;X=0?1.2:1))}function A(I,j,V,X,se,he,ve){for(var be=0;be65535)Ue(new Error("glyphs > 65535 not supported"));else if(xt.ranges[_t])Ue(null,{stack:Xe,id:it,glyph:Lt});else{var Mt=xt.requests[_t];Mt||(Mt=xt.requests[_t]=[],E.loadGlyphRange(Xe,_t,V.url,V.requestManager,function(yt,Nt){if(Nt){for(var Rt in Nt)V._doesCharSupportLocalGlyph(+Rt)||(xt.glyphs[+Rt]=Nt[+Rt]);xt.ranges[_t]=!0}for(var qt=0,rn=Mt;qt1&&(Se=I[++be]);var Xe=Math.abs(Ue-Se.left),it=Math.abs(Ue-Se.right),xt=Math.min(Xe,it),Lt=void 0,_t=se/V*(X+1);if(Se.isDash){var Mt=X-Math.abs(_t);Lt=Math.sqrt(xt*xt+Mt*Mt)}else Lt=X-Math.sqrt(xt*xt+_t*_t);this.data[ve+Ue]=Math.max(0,Math.min(255,Lt+128))}},z.prototype.addRegularDash=function(I){for(var j=I.length-1;j>=0;--j){var V=I[j],X=I[j+1];V.zeroLength?I.splice(j,1):X&&X.isDash===V.isDash&&(X.left=V.left,I.splice(j,1))}var se=I[0],he=I[I.length-1];se.isDash===he.isDash&&(se.left=he.left-this.width,he.right=se.right+this.width);for(var ve=this.width*this.nextRow,be=0,Se=I[be],Ue=0;Ue1&&(Se=I[++be]);var Xe=Math.abs(Ue-Se.left),it=Math.abs(Ue-Se.right),xt=Math.min(Xe,it),Lt=Se.isDash?xt:-xt;this.data[ve+Ue]=Math.max(0,Math.min(255,Lt+128))}},z.prototype.addDash=function(I,j){var V=j?7:0,X=2*V+1;if(this.nextRow+X>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var se=0,he=0;he=V&&I.x=X&&I.y0&&(Ue[new i.OverscaledTileID(V.overscaledZ,ve,X.z,he,X.y-1).key]={backfilled:!1},Ue[new i.OverscaledTileID(V.overscaledZ,V.wrap,X.z,X.x,X.y-1).key]={backfilled:!1},Ue[new i.OverscaledTileID(V.overscaledZ,Se,X.z,be,X.y-1).key]={backfilled:!1}),X.y+10&&(se.resourceTiming=V._resourceTiming,V._resourceTiming=[]),V.fire(new i.Event("data",se))}})},j.prototype.onAdd=function(V){this.map=V,this.load()},j.prototype.setData=function(V){var X=this;return this._data=V,this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(se){if(se)X.fire(new i.ErrorEvent(se));else{var he={dataType:"source",sourceDataType:"content"};X._collectResourceTiming&&X._resourceTiming&&X._resourceTiming.length>0&&(he.resourceTiming=X._resourceTiming,X._resourceTiming=[]),X.fire(new i.Event("data",he))}}),this},j.prototype.getClusterExpansionZoom=function(V,X){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:V,source:this.id},X),this},j.prototype.getClusterChildren=function(V,X){return this.actor.send("geojson.getClusterChildren",{clusterId:V,source:this.id},X),this},j.prototype.getClusterLeaves=function(V,X,se,he){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:V,limit:X,offset:se},he),this},j.prototype._updateWorkerData=function(V){var X=this;this._loaded=!1;var se=i.extend({},this.workerOptions),he=this._data;typeof he=="string"?(se.request=this.map._requestManager.transformRequest(i.browser.resolveURL(he),i.ResourceType.Source),se.request.collectResourceTiming=this._collectResourceTiming):se.data=JSON.stringify(he),this.actor.send(this.type+".loadData",se,function(ve,be){X._removed||be&&be.abandoned||(X._loaded=!0,be&&be.resourceTiming&&be.resourceTiming[X.id]&&(X._resourceTiming=be.resourceTiming[X.id].slice(0)),X.actor.send(X.type+".coalesce",{source:se.source},null),V(ve))})},j.prototype.loaded=function(){return this._loaded},j.prototype.loadTile=function(V,X){var se=this,he=V.actor?"reloadTile":"loadTile";V.actor=this.actor;var ve={type:this.type,uid:V.uid,tileID:V.tileID,zoom:V.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};V.request=this.actor.send(he,ve,function(be,Se){return delete V.request,V.unloadVectorData(),V.aborted?X(null):be?X(be):(V.loadVectorData(Se,se.map.painter,he==="reloadTile"),X(null))})},j.prototype.abortTile=function(V){V.request&&(V.request.cancel(),delete V.request),V.aborted=!0},j.prototype.unloadTile=function(V){V.unloadVectorData(),this.actor.send("removeTile",{uid:V.uid,type:this.type,source:this.id})},j.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},j.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},j.prototype.hasTransition=function(){return!1},j}(i.Evented),te=i.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Y=function(I){function j(V,X,se,he){I.call(this),this.id=V,this.dispatcher=se,this.coordinates=X.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(he),this.options=X}return I&&(j.__proto__=I),j.prototype=Object.create(I&&I.prototype),j.prototype.constructor=j,j.prototype.load=function(V,X){var se=this;this._loaded=!1,this.fire(new i.Event("dataloading",{dataType:"source"})),this.url=this.options.url,i.getImage(this.map._requestManager.transformRequest(this.url,i.ResourceType.Image),function(he,ve){se._loaded=!0,he?se.fire(new i.ErrorEvent(he)):ve&&(se.image=ve,V&&(se.coordinates=V),X&&X(),se._finishLoading())})},j.prototype.loaded=function(){return this._loaded},j.prototype.updateImage=function(V){var X=this;return this.image&&V.url?(this.options.url=V.url,this.load(V.coordinates,function(){X.texture=null}),this):this},j.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})))},j.prototype.onAdd=function(V){this.map=V,this.load()},j.prototype.setCoordinates=function(V){var X=this;this.coordinates=V;var se=V.map(i.MercatorCoordinate.fromLngLat);this.tileID=function(ve){for(var be=1/0,Se=1/0,Ue=-1/0,Xe=-1/0,it=0,xt=ve;itX.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+X.start(0)+" and "+X.end(0)+"-second mark."))):this.video.currentTime=V}},j.prototype.getVideo=function(){return this.video},j.prototype.onAdd=function(V){this.map||(this.map=V,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},j.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var V=this.map.painter.context,X=V.gl;for(var se in this.boundsBuffer||(this.boundsBuffer=V.createVertexBuffer(this._boundsArray,te.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(X.LINEAR,X.CLAMP_TO_EDGE),X.texSubImage2D(X.TEXTURE_2D,0,0,0,X.RGBA,X.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(V,this.video,X.RGBA),this.texture.bind(X.LINEAR,X.CLAMP_TO_EDGE)),this.tiles){var he=this.tiles[se];he.state!=="loaded"&&(he.state="loaded",he.texture=this.texture)}}},j.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},j.prototype.hasTransition=function(){return this.video&&!this.video.paused},j}(Y),re=function(I){function j(V,X,se,he){I.call(this,V,X,se,he),X.coordinates?Array.isArray(X.coordinates)&&X.coordinates.length===4&&!X.coordinates.some(function(ve){return!Array.isArray(ve)||ve.length!==2||ve.some(function(be){return typeof be!="number"})})||this.fire(new i.ErrorEvent(new i.ValidationError("sources."+V,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+V,null,'missing required property "coordinates"'))),X.animate&&typeof X.animate!="boolean"&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+V,null,'optional "animate" property must be a boolean value'))),X.canvas?typeof X.canvas=="string"||X.canvas instanceof i.window.HTMLCanvasElement||this.fire(new i.ErrorEvent(new i.ValidationError("sources."+V,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 i.ErrorEvent(new i.ValidationError("sources."+V,null,'missing required property "canvas"'))),this.options=X,this.animate=X.animate===void 0||X.animate}return I&&(j.__proto__=I),j.prototype=Object.create(I&&I.prototype),j.prototype.constructor=j,j.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof i.window.HTMLCanvasElement?this.options.canvas:i.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new i.ErrorEvent(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())},j.prototype.getCanvas=function(){return this.canvas},j.prototype.onAdd=function(V){this.map=V,this.load(),this.canvas&&this.animate&&this.play()},j.prototype.onRemove=function(){this.pause()},j.prototype.prepare=function(){var V=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,V=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,V=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var X=this.map.painter.context,se=X.gl;for(var he in this.boundsBuffer||(this.boundsBuffer=X.createVertexBuffer(this._boundsArray,te.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(V||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture(X,this.canvas,se.RGBA,{premultiply:!0}),this.tiles){var ve=this.tiles[he];ve.state!=="loaded"&&(ve.state="loaded",ve.texture=this.texture)}}},j.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},j.prototype.hasTransition=function(){return this._playing},j.prototype._hasInvalidDimensions=function(){for(var V=0,X=[this.canvas.width,this.canvas.height];Vthis.max){var ve=this._getAndRemoveByKey(this.order[0]);ve&&this.onRemove(ve)}return this},H.prototype.has=function(I){return I.wrapped().key in this.data},H.prototype.getAndRemove=function(I){return this.has(I)?this._getAndRemoveByKey(I.wrapped().key):null},H.prototype._getAndRemoveByKey=function(I){var j=this.data[I].shift();return j.timeout&&clearTimeout(j.timeout),this.data[I].length===0&&delete this.data[I],this.order.splice(this.order.indexOf(I),1),j.value},H.prototype.getByKey=function(I){var j=this.data[I];return j?j[0].value:null},H.prototype.get=function(I){return this.has(I)?this.data[I.wrapped().key][0].value:null},H.prototype.remove=function(I,j){if(!this.has(I))return this;var V=I.wrapped().key,X=j===void 0?0:this.data[V].indexOf(j),se=this.data[V][X];return this.data[V].splice(X,1),se.timeout&&clearTimeout(se.timeout),this.data[V].length===0&&delete this.data[V],this.onRemove(se.value),this.order.splice(this.order.indexOf(V),1),this},H.prototype.setMaxSize=function(I){for(this.max=I;this.order.length>this.max;){var j=this._getAndRemoveByKey(this.order[0]);j&&this.onRemove(j)}return this},H.prototype.filter=function(I){var j=[];for(var V in this.data)for(var X=0,se=this.data[V];X1||(Math.abs(Xe)>1&&(Math.abs(Xe+xt)===1?Xe+=xt:Math.abs(Xe-xt)===1&&(Xe-=xt)),Ue.dem&&Se.dem&&(Se.dem.backfillBorder(Ue.dem,Xe,it),Se.neighboringTiles&&Se.neighboringTiles[Lt]&&(Se.neighboringTiles[Lt].backfilled=!0)))}},j.prototype.getTile=function(V){return this.getTileByID(V.key)},j.prototype.getTileByID=function(V){return this._tiles[V]},j.prototype._retainLoadedChildren=function(V,X,se,he){for(var ve in this._tiles){var be=this._tiles[ve];if(!(he[ve]||!be.hasData()||be.tileID.overscaledZ<=X||be.tileID.overscaledZ>se)){for(var Se=be.tileID;be&&be.tileID.overscaledZ>X+1;){var Ue=be.tileID.scaledTo(be.tileID.overscaledZ-1);(be=this._tiles[Ue.key])&&be.hasData()&&(Se=Ue)}for(var Xe=Se;Xe.overscaledZ>X;)if(V[(Xe=Xe.scaledTo(Xe.overscaledZ-1)).key]){he[Se.key]=Se;break}}}},j.prototype.findLoadedParent=function(V,X){if(V.key in this._loadedParentTiles){var se=this._loadedParentTiles[V.key];return se&&se.tileID.overscaledZ>=X?se:null}for(var he=V.overscaledZ-1;he>=X;he--){var ve=V.scaledTo(he),be=this._getLoadedTile(ve);if(be)return be}},j.prototype._getLoadedTile=function(V){var X=this._tiles[V.key];return X&&X.hasData()?X:this._cache.getByKey(V.wrapped().key)},j.prototype.updateCacheSize=function(V){var X=(Math.ceil(V.width/this._source.tileSize)+1)*(Math.ceil(V.height/this._source.tileSize)+1),se=Math.floor(5*X),he=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,se):se;this._cache.setMaxSize(he)},j.prototype.handleWrapJump=function(V){var X=(V-(this._prevLng===void 0?V:this._prevLng))/360,se=Math.round(X);if(this._prevLng=V,se){var he={};for(var ve in this._tiles){var be=this._tiles[ve];be.tileID=be.tileID.unwrapTo(be.tileID.wrap+se),he[be.tileID.key]=be}for(var Se in this._tiles=he,this._timers)clearTimeout(this._timers[Se]),delete this._timers[Se];for(var Ue in this._tiles){var Xe=this._tiles[Ue];this._setTileReloadTimer(Ue,Xe)}}},j.prototype.update=function(V){var X=this;if(this.transform=V,this._sourceLoaded&&!this._paused){var se;this.updateCacheSize(V),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?se=V.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(An){return new i.OverscaledTileID(An.canonical.z,An.wrap,An.canonical.z,An.canonical.x,An.canonical.y)}):(se=V.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(se=se.filter(function(An){return X._source.hasTile(An)}))):se=[];var he=V.coveringZoomLevel(this._source),ve=Math.max(he-j.maxOverzooming,this._source.minzoom),be=Math.max(he+j.maxUnderzooming,this._source.minzoom),Se=this._updateRetainedTiles(se,he);if(lt(this._source.type)){for(var Ue={},Xe={},it=0,xt=Object.keys(Se);itthis._source.maxzoom){var Nt=Mt.children(this._source.maxzoom)[0],Rt=this.getTile(Nt);if(Rt&&Rt.hasData()){se[Nt.key]=Nt;continue}}else{var qt=Mt.children(this._source.maxzoom);if(se[qt[0].key]&&se[qt[1].key]&&se[qt[2].key]&&se[qt[3].key])continue}for(var rn=yt.wasRequested(),dn=Mt.overscaledZ-1;dn>=ve;--dn){var Sn=Mt.scaledTo(dn);if(he[Sn.key]||(he[Sn.key]=!0,!(yt=this.getTile(Sn))&&rn&&(yt=this._addTile(Sn)),yt&&(se[Sn.key]=Sn,rn=yt.wasRequested(),yt.hasData())))break}}}return se},j.prototype._updateLoadedParentTileCache=function(){for(var V in this._loadedParentTiles={},this._tiles){for(var X=[],se=void 0,he=this._tiles[V].tileID;he.overscaledZ>0;){if(he.key in this._loadedParentTiles){se=this._loadedParentTiles[he.key];break}X.push(he.key);var ve=he.scaledTo(he.overscaledZ-1);if(se=this._getLoadedTile(ve))break;he=ve}for(var be=0,Se=X;be0||(X.hasData()&&X.state!=="reloading"?this._cache.add(X.tileID,X,X.getExpiryTimeout()):(X.aborted=!0,this._abortTile(X),this._unloadTile(X))))},j.prototype.clearTiles=function(){for(var V in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(V);this._cache.reset()},j.prototype.tilesIn=function(V,X,se){var he=this,ve=[],be=this.transform;if(!be)return ve;for(var Se=se?be.getCameraQueryGeometry(V):V,Ue=V.map(function(dn){return be.pointCoordinate(dn)}),Xe=Se.map(function(dn){return be.pointCoordinate(dn)}),it=this.getIds(),xt=1/0,Lt=1/0,_t=-1/0,Mt=-1/0,yt=0,Nt=Xe;yt=0&&gr[1].y+er>=0){var cr=Ue.map(function(ii){return An.getTilePoint(ii)}),Yr=Xe.map(function(ii){return An.getTilePoint(ii)});ve.push({tile:Sn,tileID:An,queryGeometry:cr,cameraQueryGeometry:Yr,scale:tr})}}},rn=0;rn=i.browser.now())return!0}return!1},j.prototype.setFeatureState=function(V,X,se){V=V||"_geojsonTileLayer",this._state.updateState(V,X,se)},j.prototype.removeFeatureState=function(V,X,se){V=V||"_geojsonTileLayer",this._state.removeFeatureState(V,X,se)},j.prototype.getFeatureState=function(V,X){return V=V||"_geojsonTileLayer",this._state.getState(V,X)},j.prototype.setDependencies=function(V,X,se){var he=this._tiles[V];he&&he.setDependencies(X,se)},j.prototype.reloadTilesForDependencies=function(V,X){for(var se in this._tiles)this._tiles[se].hasDependency(V,X)&&this._reloadTile(se,"reloading");this._cache.filter(function(he){return!he.hasDependency(V,X)})},j}(i.Evented);function rt(I,j){var V=Math.abs(2*I.wrap)-+(I.wrap<0),X=Math.abs(2*j.wrap)-+(j.wrap<0);return I.overscaledZ-j.overscaledZ||X-V||j.canonical.y-I.canonical.y||j.canonical.x-I.canonical.x}function lt(I){return I==="raster"||I==="image"||I==="video"}function ot(){return new i.window.Worker(ce.workerUrl)}He.maxOverzooming=10,He.maxUnderzooming=3;var kt="mapboxgl_preloaded_worker_pool",wt=function(){this.active={}};wt.prototype.acquire=function(I){if(!this.workers)for(this.workers=[];this.workers.length0?(X-he)/ve:0;return this.points[se].mult(1-be).add(this.points[j].mult(be))};var mn=function(I,j,V){var X=this.boxCells=[],se=this.circleCells=[];this.xCellCount=Math.ceil(I/V),this.yCellCount=Math.ceil(j/V);for(var he=0;he=-j[0]&&V<=j[0]&&X>=-j[1]&&X<=j[1]}function gn(I,j,V,X,se,he,ve,be){var Se=X?I.textSizeData:I.iconSizeData,Ue=i.evaluateSizeForZoom(Se,V.transform.zoom),Xe=[256/V.width*2+1,256/V.height*2+1],it=X?I.text.dynamicLayoutVertexArray:I.icon.dynamicLayoutVertexArray;it.clear();for(var xt=I.lineVertexArray,Lt=X?I.text.placedSymbolArray:I.icon.placedSymbolArray,_t=V.transform.width/V.transform.height,Mt=!1,yt=0;ytMath.abs(V.x-j.x)*X?{useVertical:!0}:(I===i.WritingMode.vertical?j.yV.x)?{needsFlipping:!0}:null}function Hn(I,j,V,X,se,he,ve,be,Se,Ue,Xe,it,xt,Lt){var _t,Mt=j/24,yt=I.lineOffsetX*Mt,Nt=I.lineOffsetY*Mt;if(I.numGlyphs>1){var Rt=I.glyphStartIndex+I.numGlyphs,qt=I.lineStartIndex,rn=I.lineStartIndex+I.lineLength,dn=bn(Mt,be,yt,Nt,V,Xe,it,I,Se,he,xt);if(!dn)return{notEnoughRoom:!0};var Sn=tn(dn.first.point,ve).point,An=tn(dn.last.point,ve).point;if(X&&!V){var tr=In(I.writingMode,Sn,An,Lt);if(tr)return tr}_t=[dn.first];for(var er=I.glyphStartIndex+1;er0?ii.point:Wn(it,Yr,gr,1,se),Gn=In(I.writingMode,gr,Ti,Lt);if(Gn)return Gn}var Mr=ar(Mt*be.getoffsetX(I.glyphStartIndex),yt,Nt,V,Xe,it,I.segment,I.lineStartIndex,I.lineStartIndex+I.lineLength,Se,he,xt);if(!Mr)return{notEnoughRoom:!0};_t=[Mr]}for(var ai=0,Qr=_t;ai0?1:-1,_t=0;X&&(Lt*=-1,_t=Math.PI),Lt<0&&(_t+=Math.PI);for(var Mt=Lt>0?be+ve:be+ve+1,yt=se,Nt=se,Rt=0,qt=0,rn=Math.abs(xt),dn=[];Rt+qt<=rn;){if((Mt+=Lt)=Se)return null;if(Nt=yt,dn.push(yt),(yt=it[Mt])===void 0){var Sn=new i.Point(Ue.getx(Mt),Ue.gety(Mt)),An=tn(Sn,Xe);if(An.signedDistanceFromCamera>0)yt=it[Mt]=An.point;else{var tr=Mt-Lt;yt=Wn(Rt===0?he:new i.Point(Ue.getx(tr),Ue.gety(tr)),Sn,Nt,rn-Rt+1,Xe)}}Rt+=qt,qt=Nt.dist(yt)}var er=(rn-Rt)/qt,gr=yt.sub(Nt),cr=gr.mult(er)._add(Nt);cr._add(gr._unit()._perp()._mult(V*Lt));var Yr=_t+Math.atan2(yt.y-Nt.y,yt.x-Nt.x);return dn.push(cr),{point:cr,angle:Yr,path:dn}}mn.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},mn.prototype.insert=function(I,j,V,X,se){this._forEachCell(j,V,X,se,this._insertBoxCell,this.boxUid++),this.boxKeys.push(I),this.bboxes.push(j),this.bboxes.push(V),this.bboxes.push(X),this.bboxes.push(se)},mn.prototype.insertCircle=function(I,j,V,X){this._forEachCell(j-X,V-X,j+X,V+X,this._insertCircleCell,this.circleUid++),this.circleKeys.push(I),this.circles.push(j),this.circles.push(V),this.circles.push(X)},mn.prototype._insertBoxCell=function(I,j,V,X,se,he){this.boxCells[se].push(he)},mn.prototype._insertCircleCell=function(I,j,V,X,se,he){this.circleCells[se].push(he)},mn.prototype._query=function(I,j,V,X,se,he){if(V<0||I>this.width||X<0||j>this.height)return!se&&[];var ve=[];if(I<=0&&j<=0&&this.width<=V&&this.height<=X){if(se)return!0;for(var be=0;be0:ve},mn.prototype._queryCircle=function(I,j,V,X,se){var he=I-V,ve=I+V,be=j-V,Se=j+V;if(ve<0||he>this.width||Se<0||be>this.height)return!X&&[];var Ue=[],Xe={hitTest:X,circle:{x:I,y:j,radius:V},seenUids:{box:{},circle:{}}};return this._forEachCell(he,be,ve,Se,this._queryCellCircle,Ue,Xe,se),X?Ue.length>0:Ue},mn.prototype.query=function(I,j,V,X,se){return this._query(I,j,V,X,!1,se)},mn.prototype.hitTest=function(I,j,V,X,se){return this._query(I,j,V,X,!0,se)},mn.prototype.hitTestCircle=function(I,j,V,X){return this._queryCircle(I,j,V,!0,X)},mn.prototype._queryCell=function(I,j,V,X,se,he,ve,be){var Se=ve.seenUids,Ue=this.boxCells[se];if(Ue!==null)for(var Xe=this.bboxes,it=0,xt=Ue;it=Xe[_t+0]&&X>=Xe[_t+1]&&(!be||be(this.boxKeys[Lt]))){if(ve.hitTest)return he.push(!0),!0;he.push({key:this.boxKeys[Lt],x1:Xe[_t],y1:Xe[_t+1],x2:Xe[_t+2],y2:Xe[_t+3]})}}}var Mt=this.circleCells[se];if(Mt!==null)for(var yt=this.circles,Nt=0,Rt=Mt;Ntve*ve+be*be},mn.prototype._circleAndRectCollide=function(I,j,V,X,se,he,ve){var be=(he-X)/2,Se=Math.abs(I-(X+be));if(Se>be+V)return!1;var Ue=(ve-se)/2,Xe=Math.abs(j-(se+Ue));if(Xe>Ue+V)return!1;if(Se<=be||Xe<=Ue)return!0;var it=Se-be,xt=Xe-Ue;return it*it+xt*xt<=V*V};var Or=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function vr(I,j){for(var V=0;V=1;Ti--)ii.push(cr.path[Ti]);for(var Gn=1;Gn0){for(var gi=ii[0].clone(),Mi=ii[0].clone(),Yi=1;Yi=tr.x&&Mi.x<=er.x&&gi.y>=tr.y&&Mi.y<=er.y?[ii]:Mi.xer.x||Mi.yer.y?[]:i.clipLine([ii],tr.x,tr.y,er.x,er.y)}for(var ci=0,zi=Qr;ci=this.screenRightBoundary||X<100||j>this.screenBottomBoundary},Kn.prototype.isInsideGrid=function(I,j,V,X){return V>=0&&I=0&&j0)return this.prevPlacement&&this.prevPlacement.variableOffsets[it.crossTileID]&&this.prevPlacement.placements[it.crossTileID]&&this.prevPlacement.placements[it.crossTileID].text&&(Mt=this.prevPlacement.variableOffsets[it.crossTileID].anchor),this.variableOffsets[it.crossTileID]={textOffset:yt,width:V,height:X,anchor:I,textBoxScale:se,prevAnchor:Mt},this.markUsedJustification(xt,I,it,Lt),xt.allowVerticalPlacement&&(this.markUsedOrientation(xt,Lt,it),this.placedOrientations[it.crossTileID]=Lt),{shift:Nt,placedGlyphBoxes:Rt}},pr.prototype.placeLayerBucketPart=function(I,j,V){var X=this,se=I.parameters,he=se.bucket,ve=se.layout,be=se.posMatrix,Se=se.textLabelPlaneMatrix,Ue=se.labelToScreenMatrix,Xe=se.textPixelRatio,it=se.holdingForFade,xt=se.collisionBoxArray,Lt=se.partiallyEvaluatedTextSize,_t=se.collisionGroup,Mt=ve.get("text-optional"),yt=ve.get("icon-optional"),Nt=ve.get("text-allow-overlap"),Rt=ve.get("icon-allow-overlap"),qt=ve.get("text-rotation-alignment")==="map",rn=ve.get("text-pitch-alignment")==="map",dn=ve.get("icon-text-fit")!=="none",Sn=ve.get("symbol-z-order")==="viewport-y",An=Nt&&(Rt||!he.hasIconData()||yt),tr=Rt&&(Nt||!he.hasTextData()||Mt);!he.collisionArrays&&xt&&he.deserializeCollisionBoxes(xt);var er=function(Gn,Mr){if(!j[Gn.crossTileID])if(it)X.placements[Gn.crossTileID]=new Mn(!1,!1,!1);else{var ai,Qr=!1,gi=!1,Mi=!0,Yi=null,ci={box:null,offscreen:null},zi={box:null,offscreen:null},Li=null,Qi=null,Ri=0,ea=0,fa=0;Mr.textFeatureIndex?Ri=Mr.textFeatureIndex:Gn.useRuntimeCollisionCircles&&(Ri=Gn.featureIndex),Mr.verticalTextFeatureIndex&&(ea=Mr.verticalTextFeatureIndex);var Ha=Mr.textBox;if(Ha){var xo=function(fo){var Vs=i.WritingMode.horizontal;if(he.allowVerticalPlacement&&!fo&&X.prevPlacement){var qs=X.prevPlacement.placedOrientations[Gn.crossTileID];qs&&(X.placedOrientations[Gn.crossTileID]=qs,Vs=qs,X.markUsedOrientation(he,Vs,Gn))}return Vs},bo=function(fo,Vs){if(he.allowVerticalPlacement&&Gn.numVerticalGlyphVertices>0&&Mr.verticalTextBox)for(var qs=0,ng=he.writingModes;qs0&&(qa=qa.filter(function(fo){return fo!==co.anchor})).unshift(co.anchor)}var eo=function(fo,Vs,qs){for(var ng=fo.x2-fo.x1,q3=fo.y2-fo.y1,Ml=Gn.textBoxScale,u1=dn&&!Rt?Vs:null,Lp={box:[],offscreen:!1},H3=Nt?2*qa.length:qa.length,yh=0;yh=qa.length,c1=X.attemptAnchorPlacement($3,fo,ng,q3,Ml,qt,rn,Xe,be,_t,rg,Gn,he,qs,u1);if(c1&&(Lp=c1.placedGlyphBoxes)&&Lp.box&&Lp.box.length){Qr=!0,Yi=c1.shift;break}}return Lp};bo(function(){return eo(Ha,Mr.iconBox,i.WritingMode.horizontal)},function(){var fo=Mr.verticalTextBox,Vs=ci&&ci.box&&ci.box.length;return he.allowVerticalPlacement&&!Vs&&Gn.numVerticalGlyphVertices>0&&fo?eo(fo,Mr.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}}),ci&&(Qr=ci.box,Mi=ci.offscreen);var As=xo(ci&&ci.box);if(!Qr&&X.prevPlacement){var Uo=X.prevPlacement.variableOffsets[Gn.crossTileID];Uo&&(X.variableOffsets[Gn.crossTileID]=Uo,X.markUsedJustification(he,Uo.anchor,Gn,As))}}else{var Js=function(fo,Vs){var qs=X.collisionIndex.placeCollisionBox(fo,Nt,Xe,be,_t.predicate);return qs&&qs.box&&qs.box.length&&(X.markUsedOrientation(he,Vs,Gn),X.placedOrientations[Gn.crossTileID]=Vs),qs};bo(function(){return Js(Ha,i.WritingMode.horizontal)},function(){var fo=Mr.verticalTextBox;return he.allowVerticalPlacement&&Gn.numVerticalGlyphVertices>0&&fo?Js(fo,i.WritingMode.vertical):{box:null,offscreen:null}}),xo(ci&&ci.box&&ci.box.length)}}if(Qr=(ai=ci)&&ai.box&&ai.box.length>0,Mi=ai&&ai.offscreen,Gn.useRuntimeCollisionCircles){var sc=he.text.placedSymbolArray.get(Gn.centerJustifiedTextSymbolIndex),kf=i.evaluateSizeForFeature(he.textSizeData,Lt,sc),Ep=ve.get("text-padding"),sd=Gn.collisionCircleDiameter;Li=X.collisionIndex.placeCollisionCircles(Nt,sc,he.lineVertexArray,he.glyphOffsetArray,kf,be,Se,Ue,V,rn,_t.predicate,sd,Ep),Qr=Nt||Li.circles.length>0&&!Li.collisionDetected,Mi=Mi&&Li.offscreen}if(Mr.iconFeatureIndex&&(fa=Mr.iconFeatureIndex),Mr.iconBox){var ld=function(fo){var Vs=dn&&Yi?$r(fo,Yi.x,Yi.y,qt,rn,X.transform.angle):fo;return X.collisionIndex.placeCollisionBox(Vs,Rt,Xe,be,_t.predicate)};gi=zi&&zi.box&&zi.box.length&&Mr.verticalIconBox?(Qi=ld(Mr.verticalIconBox)).box.length>0:(Qi=ld(Mr.iconBox)).box.length>0,Mi=Mi&&Qi.offscreen}var Ms=Mt||Gn.numHorizontalGlyphVertices===0&&Gn.numVerticalGlyphVertices===0,vh=yt||Gn.numIconVertices===0;if(Ms||vh?vh?Ms||(gi=gi&&Qr):Qr=gi&&Qr:gi=Qr=gi&&Qr,Qr&&ai&&ai.box&&(zi&&zi.box&&ea?X.collisionIndex.insertCollisionBox(ai.box,ve.get("text-ignore-placement"),he.bucketInstanceId,ea,_t.ID):X.collisionIndex.insertCollisionBox(ai.box,ve.get("text-ignore-placement"),he.bucketInstanceId,Ri,_t.ID)),gi&&Qi&&X.collisionIndex.insertCollisionBox(Qi.box,ve.get("icon-ignore-placement"),he.bucketInstanceId,fa,_t.ID),Li&&(Qr&&X.collisionIndex.insertCollisionCircles(Li.circles,ve.get("text-ignore-placement"),he.bucketInstanceId,Ri,_t.ID),V)){var Cp=he.bucketInstanceId,Kl=X.collisionCircleArrays[Cp];Kl===void 0&&(Kl=X.collisionCircleArrays[Cp]=new rr);for(var Op=0;Op=0;--cr){var Yr=gr[cr];er(he.symbolInstances.get(Yr),he.collisionArrays[Yr])}else for(var ii=I.symbolInstanceStart;ii=0&&(I.text.placedSymbolArray.get(Se).crossTileID=se>=0&&Se!==se?0:V.crossTileID)}},pr.prototype.markUsedOrientation=function(I,j,V){for(var X=j===i.WritingMode.horizontal||j===i.WritingMode.horizontalOnly?j:0,se=j===i.WritingMode.vertical?j:0,he=0,ve=[V.leftJustifiedTextSymbolIndex,V.centerJustifiedTextSymbolIndex,V.rightJustifiedTextSymbolIndex];he0||rn>0,er=Rt.numIconVertices>0,gr=X.placedOrientations[Rt.crossTileID],cr=gr===i.WritingMode.vertical,Yr=gr===i.WritingMode.horizontal||gr===i.WritingMode.horizontalOnly;if(tr){var ii=Un(An.text),Ti=cr?Nn:ii;Lt(I.text,qt,Ti);var Gn=Yr?Nn:ii;Lt(I.text,rn,Gn);var Mr=An.text.isHidden();[Rt.rightJustifiedTextSymbolIndex,Rt.centerJustifiedTextSymbolIndex,Rt.leftJustifiedTextSymbolIndex].forEach(function(fa){fa>=0&&(I.text.placedSymbolArray.get(fa).hidden=Mr||cr?1:0)}),Rt.verticalPlacedTextSymbolIndex>=0&&(I.text.placedSymbolArray.get(Rt.verticalPlacedTextSymbolIndex).hidden=Mr||Yr?1:0);var ai=X.variableOffsets[Rt.crossTileID];ai&&X.markUsedJustification(I,ai.anchor,Rt,gr);var Qr=X.placedOrientations[Rt.crossTileID];Qr&&(X.markUsedJustification(I,"left",Rt,Qr),X.markUsedOrientation(I,Qr,Rt))}if(er){var gi=Un(An.icon),Mi=!(it&&Rt.verticalPlacedIconSymbolIndex&&cr);if(Rt.placedIconSymbolIndex>=0){var Yi=Mi?gi:Nn;Lt(I.icon,Rt.numIconVertices,Yi),I.icon.placedSymbolArray.get(Rt.placedIconSymbolIndex).hidden=An.icon.isHidden()}if(Rt.verticalPlacedIconSymbolIndex>=0){var ci=Mi?Nn:gi;Lt(I.icon,Rt.numVerticalIconVertices,ci),I.icon.placedSymbolArray.get(Rt.verticalPlacedIconSymbolIndex).hidden=An.icon.isHidden()}}if(I.hasIconCollisionBoxData()||I.hasTextCollisionBoxData()){var zi=I.collisionArrays[Nt];if(zi){var Li=new i.Point(0,0);if(zi.textBox||zi.verticalTextBox){var Qi=!0;if(Se){var Ri=X.variableOffsets[dn];Ri?(Li=Fr(Ri.anchor,Ri.width,Ri.height,Ri.textOffset,Ri.textBoxScale),Ue&&Li._rotate(Xe?X.transform.angle:-X.transform.angle)):Qi=!1}zi.textBox&&qr(I.textCollisionBox.collisionVertexArray,An.text.placed,!Qi||cr,Li.x,Li.y),zi.verticalTextBox&&qr(I.textCollisionBox.collisionVertexArray,An.text.placed,!Qi||Yr,Li.x,Li.y)}var ea=Boolean(!Yr&&zi.verticalIconBox);zi.iconBox&&qr(I.iconCollisionBox.collisionVertexArray,An.icon.placed,ea,it?Li.x:0,it?Li.y:0),zi.verticalIconBox&&qr(I.iconCollisionBox.collisionVertexArray,An.icon.placed,!ea,it?Li.x:0,it?Li.y:0)}}},Mt=0;MtI},pr.prototype.setStale=function(){this.stale=!0};var _i=Math.pow(2,25),cn=Math.pow(2,24),jn=Math.pow(2,17),jt=Math.pow(2,16),fn=Math.pow(2,9),yn=Math.pow(2,8),$n=Math.pow(2,1);function Un(I){if(I.opacity===0&&!I.placed)return 0;if(I.opacity===1&&I.placed)return 4294967295;var j=I.placed?1:0,V=Math.floor(127*I.opacity);return V*_i+j*cn+V*jn+j*jt+V*fn+j*yn+V*$n+j}var Nn=0,Rn=function(I){this._sortAcrossTiles=I.layout.get("symbol-z-order")!=="viewport-y"&&I.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Rn.prototype.continuePlacement=function(I,j,V,X,se){for(var he=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var ve=j[I[this._currentPlacementIndex]],be=this.placement.collisionIndex.transform.zoom;if(ve.type==="symbol"&&(!ve.minzoom||ve.minzoom<=be)&&(!ve.maxzoom||ve.maxzoom>be)){if(this._inProgressLayer||(this._inProgressLayer=new Rn(ve)),this._inProgressLayer.continuePlacement(V[ve.source],this.placement,this._showCollisionBoxes,ve,he))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},wn.prototype.commit=function(I){return this.placement.commit(I),this.placement};var kn=512/i.EXTENT/2,Tn=function(I,j,V){this.tileID=I,this.indexedSymbolInstances={},this.bucketInstanceId=V;for(var X=0;XI.overscaledZ)for(var be in ve){var Se=ve[be];Se.tileID.isChildOf(I)&&Se.findMatches(j.symbolInstances,I,se)}else{var Ue=ve[I.scaledTo(Number(he)).key];Ue&&Ue.findMatches(j.symbolInstances,I,se)}}for(var Xe=0;Xe1?"@2x":"",it=i.getJSON(he.transformRequest(he.normalizeSpriteURL(se,Xe,".json"),i.ResourceType.SpriteJSON),function(_t,Mt){it=null,Ue||(Ue=_t,be=Mt,Lt())}),xt=i.getImage(he.transformRequest(he.normalizeSpriteURL(se,Xe,".png"),i.ResourceType.SpriteImage),function(_t,Mt){xt=null,Ue||(Ue=_t,Se=Mt,Lt())});function Lt(){if(Ue)ve(Ue);else if(be&&Se){var _t=i.browser.getImageData(Se),Mt={};for(var yt in be){var Nt=be[yt],Rt=Nt.width,qt=Nt.height,rn=Nt.x,dn=Nt.y,Sn=Nt.sdf,An=Nt.pixelRatio,tr=Nt.stretchX,er=Nt.stretchY,gr=Nt.content,cr=new i.RGBAImage({width:Rt,height:qt});i.RGBAImage.copy(_t,cr,{x:rn,y:dn},{x:0,y:0},{width:Rt,height:qt}),Mt[yt]={data:cr,pixelRatio:An,sdf:Sn,stretchX:tr,stretchY:er,content:gr}}ve(null,Mt)}}return{cancel:function(){it&&(it.cancel(),it=null),xt&&(xt.cancel(),xt=null)}}}(V,this.map._requestManager,function(se,he){if(X._spriteRequest=null,se)X.fire(new i.ErrorEvent(se));else if(he)for(var ve in he)X.imageManager.addImage(ve,he[ve]);X.imageManager.setLoaded(!0),X._availableImages=X.imageManager.listImages(),X.dispatcher.broadcast("setImages",X._availableImages),X.fire(new i.Event("data",{dataType:"style"}))})},j.prototype._validateLayer=function(V){var X=this.sourceCaches[V.source];if(X){var se=V.sourceLayer;if(se){var he=X.getSource();(he.type==="geojson"||he.vectorLayerIds&&he.vectorLayerIds.indexOf(se)===-1)&&this.fire(new i.ErrorEvent(new Error('Source layer "'+se+'" does not exist on source "'+he.id+'" as specified by style layer "'+V.id+'"')))}}},j.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var V in this.sourceCaches)if(!this.sourceCaches[V].loaded())return!1;return!!this.imageManager.isLoaded()},j.prototype._serializeLayers=function(V){for(var X=[],se=0,he=V;se0)throw new Error("Unimplemented: "+he.map(function(ve){return ve.command}).join(", ")+".");return se.forEach(function(ve){ve.command!=="setTransition"&&X[ve.command].apply(X,ve.args)}),this.stylesheet=V,!0},j.prototype.addImage=function(V,X){if(this.getImage(V))return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(V,X),this._availableImages=this.imageManager.listImages(),this._changedImages[V]=!0,this._changed=!0,this.fire(new i.Event("data",{dataType:"style"}))},j.prototype.updateImage=function(V,X){this.imageManager.updateImage(V,X)},j.prototype.getImage=function(V){return this.imageManager.getImage(V)},j.prototype.removeImage=function(V){if(!this.getImage(V))return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(V),this._availableImages=this.imageManager.listImages(),this._changedImages[V]=!0,this._changed=!0,this.fire(new i.Event("data",{dataType:"style"}))},j.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},j.prototype.addSource=function(V,X,se){var he=this;if(se===void 0&&(se={}),this._checkLoaded(),this.sourceCaches[V]!==void 0)throw new Error("There is already a source with this ID");if(!X.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(X).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(X.type)>=0)||!this._validate(i.validateStyle.source,"sources."+V,X,null,se)){this.map&&this.map._collectResourceTiming&&(X.collectResourceTiming=!0);var ve=this.sourceCaches[V]=new He(V,X,this.dispatcher);ve.style=this,ve.setEventedParent(this,function(){return{isSourceLoaded:he.loaded(),source:ve.serialize(),sourceId:V}}),ve.onAdd(this.map),this._changed=!0}},j.prototype.removeSource=function(V){if(this._checkLoaded(),this.sourceCaches[V]===void 0)throw new Error("There is no source with this ID");for(var X in this._layers)if(this._layers[X].source===V)return this.fire(new i.ErrorEvent(new Error('Source "'+V+'" cannot be removed while layer "'+X+'" is using it.')));var se=this.sourceCaches[V];delete this.sourceCaches[V],delete this._updatedSources[V],se.fire(new i.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:V})),se.setEventedParent(null),se.clearTiles(),se.onRemove&&se.onRemove(this.map),this._changed=!0},j.prototype.setGeoJSONSourceData=function(V,X){this._checkLoaded(),this.sourceCaches[V].getSource().setData(X),this._changed=!0},j.prototype.getSource=function(V){return this.sourceCaches[V]&&this.sourceCaches[V].getSource()},j.prototype.addLayer=function(V,X,se){se===void 0&&(se={}),this._checkLoaded();var he=V.id;if(this.getLayer(he))this.fire(new i.ErrorEvent(new Error('Layer with id "'+he+'" already exists on this map')));else{var ve;if(V.type==="custom"){if(ir(this,i.validateCustomStyleLayer(V)))return;ve=i.createStyleLayer(V)}else{if(typeof V.source=="object"&&(this.addSource(he,V.source),V=i.clone$1(V),V=i.extend(V,{source:he})),this._validate(i.validateStyle.layer,"layers."+he,V,{arrayIndex:-1},se))return;ve=i.createStyleLayer(V),this._validateLayer(ve),ve.setEventedParent(this,{layer:{id:he}}),this._serializedLayers[ve.id]=ve.serialize()}var be=X?this._order.indexOf(X):this._order.length;if(X&&be===-1)this.fire(new i.ErrorEvent(new Error('Layer with id "'+X+'" does not exist on this map.')));else{if(this._order.splice(be,0,he),this._layerOrderChanged=!0,this._layers[he]=ve,this._removedLayers[he]&&ve.source&&ve.type!=="custom"){var Se=this._removedLayers[he];delete this._removedLayers[he],Se.type!==ve.type?this._updatedSources[ve.source]="clear":(this._updatedSources[ve.source]="reload",this.sourceCaches[ve.source].pause())}this._updateLayer(ve),ve.onAdd&&ve.onAdd(this.map)}}},j.prototype.moveLayer=function(V,X){if(this._checkLoaded(),this._changed=!0,this._layers[V]){if(V!==X){var se=this._order.indexOf(V);this._order.splice(se,1);var he=X?this._order.indexOf(X):this._order.length;X&&he===-1?this.fire(new i.ErrorEvent(new Error('Layer with id "'+X+'" does not exist on this map.'))):(this._order.splice(he,0,V),this._layerOrderChanged=!0)}}else this.fire(new i.ErrorEvent(new Error("The layer '"+V+"' does not exist in the map's style and cannot be moved.")))},j.prototype.removeLayer=function(V){this._checkLoaded();var X=this._layers[V];if(X){X.setEventedParent(null);var se=this._order.indexOf(V);this._order.splice(se,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[V]=X,delete this._layers[V],delete this._serializedLayers[V],delete this._updatedLayers[V],delete this._updatedPaintProps[V],X.onRemove&&X.onRemove(this.map)}else this.fire(new i.ErrorEvent(new Error("The layer '"+V+"' does not exist in the map's style and cannot be removed.")))},j.prototype.getLayer=function(V){return this._layers[V]},j.prototype.hasLayer=function(V){return V in this._layers},j.prototype.setLayerZoomRange=function(V,X,se){this._checkLoaded();var he=this.getLayer(V);he?he.minzoom===X&&he.maxzoom===se||(X!=null&&(he.minzoom=X),se!=null&&(he.maxzoom=se),this._updateLayer(he)):this.fire(new i.ErrorEvent(new Error("The layer '"+V+"' does not exist in the map's style and cannot have zoom extent.")))},j.prototype.setFilter=function(V,X,se){se===void 0&&(se={}),this._checkLoaded();var he=this.getLayer(V);if(he){if(!i.deepEqual(he.filter,X))return X==null?(he.filter=void 0,void this._updateLayer(he)):void(this._validate(i.validateStyle.filter,"layers."+he.id+".filter",X,null,se)||(he.filter=i.clone$1(X),this._updateLayer(he)))}else this.fire(new i.ErrorEvent(new Error("The layer '"+V+"' does not exist in the map's style and cannot be filtered.")))},j.prototype.getFilter=function(V){return i.clone$1(this.getLayer(V).filter)},j.prototype.setLayoutProperty=function(V,X,se,he){he===void 0&&(he={}),this._checkLoaded();var ve=this.getLayer(V);ve?i.deepEqual(ve.getLayoutProperty(X),se)||(ve.setLayoutProperty(X,se,he),this._updateLayer(ve)):this.fire(new i.ErrorEvent(new Error("The layer '"+V+"' does not exist in the map's style and cannot be styled.")))},j.prototype.getLayoutProperty=function(V,X){var se=this.getLayer(V);if(se)return se.getLayoutProperty(X);this.fire(new i.ErrorEvent(new Error("The layer '"+V+"' does not exist in the map's style.")))},j.prototype.setPaintProperty=function(V,X,se,he){he===void 0&&(he={}),this._checkLoaded();var ve=this.getLayer(V);ve?i.deepEqual(ve.getPaintProperty(X),se)||(ve.setPaintProperty(X,se,he)&&this._updateLayer(ve),this._changed=!0,this._updatedPaintProps[V]=!0):this.fire(new i.ErrorEvent(new Error("The layer '"+V+"' does not exist in the map's style and cannot be styled.")))},j.prototype.getPaintProperty=function(V,X){return this.getLayer(V).getPaintProperty(X)},j.prototype.setFeatureState=function(V,X){this._checkLoaded();var se=V.source,he=V.sourceLayer,ve=this.sourceCaches[se];if(ve!==void 0){var be=ve.getSource().type;be==="geojson"&&he?this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):be!=="vector"||he?(V.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),ve.setFeatureState(he,V.id,X)):this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new i.ErrorEvent(new Error("The source '"+se+"' does not exist in the map's style.")))},j.prototype.removeFeatureState=function(V,X){this._checkLoaded();var se=V.source,he=this.sourceCaches[se];if(he!==void 0){var ve=he.getSource().type,be=ve==="vector"?V.sourceLayer:void 0;ve!=="vector"||be?X&&typeof V.id!="string"&&typeof V.id!="number"?this.fire(new i.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):he.removeFeatureState(be,V.id,X):this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new i.ErrorEvent(new Error("The source '"+se+"' does not exist in the map's style.")))},j.prototype.getFeatureState=function(V){this._checkLoaded();var X=V.source,se=V.sourceLayer,he=this.sourceCaches[X];if(he!==void 0){if(he.getSource().type!=="vector"||se)return V.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),he.getFeatureState(se,V.id);this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new i.ErrorEvent(new Error("The source '"+X+"' does not exist in the map's style.")))},j.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},j.prototype.serialize=function(){return i.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:i.mapObject(this.sourceCaches,function(V){return V.serialize()}),layers:this._serializeLayers(this._order)},function(V){return V!==void 0})},j.prototype._updateLayer=function(V){this._updatedLayers[V.id]=!0,V.source&&!this._updatedSources[V.source]&&this.sourceCaches[V.source].getSource().type!=="raster"&&(this._updatedSources[V.source]="reload",this.sourceCaches[V.source].pause()),this._changed=!0},j.prototype._flattenAndSortRenderedFeatures=function(V){for(var X=this,se=function(gr){return X._layers[gr].type==="fill-extrusion"},he={},ve=[],be=this._order.length-1;be>=0;be--){var Se=this._order[be];if(se(Se)){he[Se]=be;for(var Ue=0,Xe=V;Ue=0;yt--){var Nt=this._order[yt];if(se(Nt))for(var Rt=ve.length-1;Rt>=0;Rt--){var qt=ve[Rt].feature;if(he[qt.layer.id] 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_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),Ja=ba("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);}"),Ao=ba("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,0,1);}"),fs=ba(`#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_FragColor=color*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec2 a_pos;uniform mat4 u_matrix; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_Position=u_matrix*vec4(a_pos,0,1);}`),ya=ba(`varying vec2 v_pos; +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +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;}`),xa=ba(`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 +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_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;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;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 +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#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;}`),Zo=ba(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_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;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#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);}`),oa=ba(`varying vec4 v_color;void main() {gl_FragColor=v_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color; +#pragma mapbox: define highp float base +#pragma mapbox: define highp float height +#pragma mapbox: define highp vec4 color +void main() { +#pragma mapbox: initialize highp float base +#pragma mapbox: initialize highp float height +#pragma mapbox: initialize highp vec4 color +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;}`),hs=ba(`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 +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#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;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`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 +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#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;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;}`),bs=ba(`#ifdef GL_ES +precision highp float; +#endif +uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;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 exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*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;}"),so=ba(`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;}"),Jo=ba(`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 +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#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 +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#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);}`),_s=ba(`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 float v_lineprogress; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define MAX_LINE_DISTANCE 32767.0 +#define scale 0.015873016 +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_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#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_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;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);}`),Ls=ba(`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; +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +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;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#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; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 pattern_from +#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;}`),Oo=ba(`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 +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#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; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#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);}`),Ka=ba(`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;}"),$o=ba(`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 +lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`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));}`),ic=ba(`#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 +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`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 +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#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;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*fontScale+a_pxoffset),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=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),Mc=ba(`#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; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`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 +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#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);}`);function ba(I,j){var V=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,X={};return{fragmentSource:I=I.replace(V,function(se,he,ve,be,Se){return X[Se]=!0,he==="define"?` +#ifndef HAS_UNIFORM_u_`+Se+` +varying `+ve+" "+be+" "+Se+`; +#else +uniform `+ve+" "+be+" u_"+Se+`; +#endif +`:` +#ifdef HAS_UNIFORM_u_`+Se+` + `+ve+" "+be+" "+Se+" = u_"+Se+`; +#endif +`}),vertexSource:j=j.replace(V,function(se,he,ve,be,Se){var Ue=be==="float"?"vec2":"vec4",Xe=Se.match(/color/)?"color":Ue;return X[Se]?he==="define"?` +#ifndef HAS_UNIFORM_u_`+Se+` +uniform lowp float u_`+Se+`_t; +attribute `+ve+" "+Ue+" a_"+Se+`; +varying `+ve+" "+be+" "+Se+`; +#else +uniform `+ve+" "+be+" u_"+Se+`; +#endif +`:Xe==="vec4"?` +#ifndef HAS_UNIFORM_u_`+Se+` + `+Se+" = a_"+Se+`; +#else + `+ve+" "+be+" "+Se+" = u_"+Se+`; +#endif +`:` +#ifndef HAS_UNIFORM_u_`+Se+` + `+Se+" = unpack_mix_"+Xe+"(a_"+Se+", u_"+Se+`_t); +#else + `+ve+" "+be+" "+Se+" = u_"+Se+`; +#endif +`:he==="define"?` +#ifndef HAS_UNIFORM_u_`+Se+` +uniform lowp float u_`+Se+`_t; +attribute `+ve+" "+Ue+" a_"+Se+`; +#else +uniform `+ve+" "+be+" u_"+Se+`; +#endif +`:Xe==="vec4"?` +#ifndef HAS_UNIFORM_u_`+Se+` + `+ve+" "+be+" "+Se+" = a_"+Se+`; +#else + `+ve+" "+be+" "+Se+" = u_"+Se+`; +#endif +`:` +#ifndef HAS_UNIFORM_u_`+Se+` + `+ve+" "+be+" "+Se+" = unpack_mix_"+Xe+"(a_"+Se+", u_"+Se+`_t); +#else + `+ve+" "+be+" "+Se+" = u_"+Se+`; +#endif +`})}}var ju=Object.freeze({__proto__:null,prelude:Nr,background:ri,backgroundPattern:ji,circle:Bi,clippingMask:Sr,heatmap:ui,heatmapTexture:si,collisionBox:ta,collisionCircle:Ja,debug:Ao,fill:fs,fillOutline:ya,fillOutlinePattern:xa,fillPattern:Zo,fillExtrusion:oa,fillExtrusionPattern:hs,hillshadePrepare:bs,hillshade:so,line:Jo,lineGradient:_s,linePattern:Ls,lineSDF:Oo,raster:Ka,symbolIcon:$o,symbolSDF:ic,symbolTextAndIcon:Mc}),Wl=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Wl.prototype.bind=function(I,j,V,X,se,he,ve,be){this.context=I;for(var Se=this.boundPaintVertexBuffers.length!==X.length,Ue=0;!Se&&Ue>16,be>>16],u_pixel_coord_lower:[65535&ve,65535&be]}}Sc.prototype.draw=function(I,j,V,X,se,he,ve,be,Se,Ue,Xe,it,xt,Lt,_t,Mt){var yt,Nt=I.gl;if(!this.failedToCreate){for(var Rt in I.program.set(this.program),I.setDepthMode(V),I.setStencilMode(X),I.setColorMode(se),I.setCullFace(he),this.fixedUniforms)this.fixedUniforms[Rt].set(ve[Rt]);Lt&&Lt.setUniforms(I,this.binderUniforms,it,{zoom:xt});for(var qt=(yt={},yt[Nt.LINES]=2,yt[Nt.TRIANGLES]=3,yt[Nt.LINE_STRIP]=1,yt)[j],rn=0,dn=Xe.get();rn0?1-1/(1.001-ve):-ve),u_contrast_factor:(he=se.paint.get("raster-contrast"),he>0?1/(1-he):1+he),u_spin_weights:pt(se.paint.get("raster-hue-rotate"))};var he,ve};function pt(I){I*=Math.PI/180;var j=Math.sin(I),V=Math.cos(I);return[(2*V+1)/3,(-Math.sqrt(3)*j-V+1)/3,(Math.sqrt(3)*j-V+1)/3]}var Ct,Qt=function(I,j,V,X,se,he,ve,be,Se,Ue){var Xe=se.transform;return{u_is_size_zoom_constant:+(I==="constant"||I==="source"),u_is_size_feature_constant:+(I==="constant"||I==="camera"),u_size_t:j?j.uSizeT:0,u_size:j?j.uSize:0,u_camera_to_center_distance:Xe.cameraToCenterDistance,u_pitch:Xe.pitch/360*2*Math.PI,u_rotate_symbol:+V,u_aspect_ratio:Xe.width/Xe.height,u_fade_change:se.options.fadeDuration?se.symbolFadeChange:1,u_matrix:he,u_label_plane_matrix:ve,u_coord_matrix:be,u_is_text:+Se,u_pitch_with_map:+X,u_texsize:Ue,u_texture:0}},en=function(I,j,V,X,se,he,ve,be,Se,Ue,Xe){var it=se.transform;return i.extend(Qt(I,j,V,X,se,he,ve,be,Se,Ue),{u_gamma_scale:X?Math.cos(it._pitch)*it.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+Xe})},Yt=function(I,j,V,X,se,he,ve,be,Se,Ue){return i.extend(en(I,j,V,X,se,he,ve,be,!0,Se,!0),{u_texsize_icon:Ue,u_texture_icon:1})},an=function(I,j,V){return{u_matrix:I,u_opacity:j,u_color:V}},hn=function(I,j,V,X,se,he){return i.extend(function(ve,be,Se,Ue){var Xe=Se.imageManager.getPattern(ve.from.toString()),it=Se.imageManager.getPattern(ve.to.toString()),xt=Se.imageManager.getPixelSize(),Lt=xt.width,_t=xt.height,Mt=Math.pow(2,Ue.tileID.overscaledZ),yt=Ue.tileSize*Math.pow(2,Se.transform.tileZoom)/Mt,Nt=yt*(Ue.tileID.canonical.x+Ue.tileID.wrap*Mt),Rt=yt*Ue.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Xe.tl,u_pattern_br_a:Xe.br,u_pattern_tl_b:it.tl,u_pattern_br_b:it.br,u_texsize:[Lt,_t],u_mix:be.t,u_pattern_size_a:Xe.displaySize,u_pattern_size_b:it.displaySize,u_scale_a:be.fromScale,u_scale_b:be.toScale,u_tile_units_to_pixels:1/Ln(Ue,1,Se.transform.tileZoom),u_pixel_coord_upper:[Nt>>16,Rt>>16],u_pixel_coord_lower:[65535&Nt,65535&Rt]}}(X,he,V,se),{u_matrix:I,u_opacity:j})},xn={fillExtrusion:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_lightpos:new i.Uniform3f(I,j.u_lightpos),u_lightintensity:new i.Uniform1f(I,j.u_lightintensity),u_lightcolor:new i.Uniform3f(I,j.u_lightcolor),u_vertical_gradient:new i.Uniform1f(I,j.u_vertical_gradient),u_opacity:new i.Uniform1f(I,j.u_opacity)}},fillExtrusionPattern:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_lightpos:new i.Uniform3f(I,j.u_lightpos),u_lightintensity:new i.Uniform1f(I,j.u_lightintensity),u_lightcolor:new i.Uniform3f(I,j.u_lightcolor),u_vertical_gradient:new i.Uniform1f(I,j.u_vertical_gradient),u_height_factor:new i.Uniform1f(I,j.u_height_factor),u_image:new i.Uniform1i(I,j.u_image),u_texsize:new i.Uniform2f(I,j.u_texsize),u_pixel_coord_upper:new i.Uniform2f(I,j.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(I,j.u_pixel_coord_lower),u_scale:new i.Uniform3f(I,j.u_scale),u_fade:new i.Uniform1f(I,j.u_fade),u_opacity:new i.Uniform1f(I,j.u_opacity)}},fill:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix)}},fillPattern:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_image:new i.Uniform1i(I,j.u_image),u_texsize:new i.Uniform2f(I,j.u_texsize),u_pixel_coord_upper:new i.Uniform2f(I,j.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(I,j.u_pixel_coord_lower),u_scale:new i.Uniform3f(I,j.u_scale),u_fade:new i.Uniform1f(I,j.u_fade)}},fillOutline:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_world:new i.Uniform2f(I,j.u_world)}},fillOutlinePattern:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_world:new i.Uniform2f(I,j.u_world),u_image:new i.Uniform1i(I,j.u_image),u_texsize:new i.Uniform2f(I,j.u_texsize),u_pixel_coord_upper:new i.Uniform2f(I,j.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(I,j.u_pixel_coord_lower),u_scale:new i.Uniform3f(I,j.u_scale),u_fade:new i.Uniform1f(I,j.u_fade)}},circle:function(I,j){return{u_camera_to_center_distance:new i.Uniform1f(I,j.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(I,j.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(I,j.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(I,j.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(I,j.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(I,j.u_matrix)}},collisionBox:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_camera_to_center_distance:new i.Uniform1f(I,j.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(I,j.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(I,j.u_extrude_scale),u_overscale_factor:new i.Uniform1f(I,j.u_overscale_factor)}},collisionCircle:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_inv_matrix:new i.UniformMatrix4f(I,j.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(I,j.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(I,j.u_viewport_size)}},debug:function(I,j){return{u_color:new i.UniformColor(I,j.u_color),u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_overlay:new i.Uniform1i(I,j.u_overlay),u_overlay_scale:new i.Uniform1f(I,j.u_overlay_scale)}},clippingMask:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix)}},heatmap:function(I,j){return{u_extrude_scale:new i.Uniform1f(I,j.u_extrude_scale),u_intensity:new i.Uniform1f(I,j.u_intensity),u_matrix:new i.UniformMatrix4f(I,j.u_matrix)}},heatmapTexture:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_world:new i.Uniform2f(I,j.u_world),u_image:new i.Uniform1i(I,j.u_image),u_color_ramp:new i.Uniform1i(I,j.u_color_ramp),u_opacity:new i.Uniform1f(I,j.u_opacity)}},hillshade:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_image:new i.Uniform1i(I,j.u_image),u_latrange:new i.Uniform2f(I,j.u_latrange),u_light:new i.Uniform2f(I,j.u_light),u_shadow:new i.UniformColor(I,j.u_shadow),u_highlight:new i.UniformColor(I,j.u_highlight),u_accent:new i.UniformColor(I,j.u_accent)}},hillshadePrepare:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_image:new i.Uniform1i(I,j.u_image),u_dimension:new i.Uniform2f(I,j.u_dimension),u_zoom:new i.Uniform1f(I,j.u_zoom),u_maxzoom:new i.Uniform1f(I,j.u_maxzoom),u_unpack:new i.Uniform4f(I,j.u_unpack)}},line:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_ratio:new i.Uniform1f(I,j.u_ratio),u_device_pixel_ratio:new i.Uniform1f(I,j.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(I,j.u_units_to_pixels)}},lineGradient:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_ratio:new i.Uniform1f(I,j.u_ratio),u_device_pixel_ratio:new i.Uniform1f(I,j.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(I,j.u_units_to_pixels),u_image:new i.Uniform1i(I,j.u_image)}},linePattern:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_texsize:new i.Uniform2f(I,j.u_texsize),u_ratio:new i.Uniform1f(I,j.u_ratio),u_device_pixel_ratio:new i.Uniform1f(I,j.u_device_pixel_ratio),u_image:new i.Uniform1i(I,j.u_image),u_units_to_pixels:new i.Uniform2f(I,j.u_units_to_pixels),u_scale:new i.Uniform3f(I,j.u_scale),u_fade:new i.Uniform1f(I,j.u_fade)}},lineSDF:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_ratio:new i.Uniform1f(I,j.u_ratio),u_device_pixel_ratio:new i.Uniform1f(I,j.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(I,j.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(I,j.u_patternscale_a),u_patternscale_b:new i.Uniform2f(I,j.u_patternscale_b),u_sdfgamma:new i.Uniform1f(I,j.u_sdfgamma),u_image:new i.Uniform1i(I,j.u_image),u_tex_y_a:new i.Uniform1f(I,j.u_tex_y_a),u_tex_y_b:new i.Uniform1f(I,j.u_tex_y_b),u_mix:new i.Uniform1f(I,j.u_mix)}},raster:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_tl_parent:new i.Uniform2f(I,j.u_tl_parent),u_scale_parent:new i.Uniform1f(I,j.u_scale_parent),u_buffer_scale:new i.Uniform1f(I,j.u_buffer_scale),u_fade_t:new i.Uniform1f(I,j.u_fade_t),u_opacity:new i.Uniform1f(I,j.u_opacity),u_image0:new i.Uniform1i(I,j.u_image0),u_image1:new i.Uniform1i(I,j.u_image1),u_brightness_low:new i.Uniform1f(I,j.u_brightness_low),u_brightness_high:new i.Uniform1f(I,j.u_brightness_high),u_saturation_factor:new i.Uniform1f(I,j.u_saturation_factor),u_contrast_factor:new i.Uniform1f(I,j.u_contrast_factor),u_spin_weights:new i.Uniform3f(I,j.u_spin_weights)}},symbolIcon:function(I,j){return{u_is_size_zoom_constant:new i.Uniform1i(I,j.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(I,j.u_is_size_feature_constant),u_size_t:new i.Uniform1f(I,j.u_size_t),u_size:new i.Uniform1f(I,j.u_size),u_camera_to_center_distance:new i.Uniform1f(I,j.u_camera_to_center_distance),u_pitch:new i.Uniform1f(I,j.u_pitch),u_rotate_symbol:new i.Uniform1i(I,j.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(I,j.u_aspect_ratio),u_fade_change:new i.Uniform1f(I,j.u_fade_change),u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(I,j.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(I,j.u_coord_matrix),u_is_text:new i.Uniform1i(I,j.u_is_text),u_pitch_with_map:new i.Uniform1i(I,j.u_pitch_with_map),u_texsize:new i.Uniform2f(I,j.u_texsize),u_texture:new i.Uniform1i(I,j.u_texture)}},symbolSDF:function(I,j){return{u_is_size_zoom_constant:new i.Uniform1i(I,j.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(I,j.u_is_size_feature_constant),u_size_t:new i.Uniform1f(I,j.u_size_t),u_size:new i.Uniform1f(I,j.u_size),u_camera_to_center_distance:new i.Uniform1f(I,j.u_camera_to_center_distance),u_pitch:new i.Uniform1f(I,j.u_pitch),u_rotate_symbol:new i.Uniform1i(I,j.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(I,j.u_aspect_ratio),u_fade_change:new i.Uniform1f(I,j.u_fade_change),u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(I,j.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(I,j.u_coord_matrix),u_is_text:new i.Uniform1i(I,j.u_is_text),u_pitch_with_map:new i.Uniform1i(I,j.u_pitch_with_map),u_texsize:new i.Uniform2f(I,j.u_texsize),u_texture:new i.Uniform1i(I,j.u_texture),u_gamma_scale:new i.Uniform1f(I,j.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(I,j.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(I,j.u_is_halo)}},symbolTextAndIcon:function(I,j){return{u_is_size_zoom_constant:new i.Uniform1i(I,j.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(I,j.u_is_size_feature_constant),u_size_t:new i.Uniform1f(I,j.u_size_t),u_size:new i.Uniform1f(I,j.u_size),u_camera_to_center_distance:new i.Uniform1f(I,j.u_camera_to_center_distance),u_pitch:new i.Uniform1f(I,j.u_pitch),u_rotate_symbol:new i.Uniform1i(I,j.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(I,j.u_aspect_ratio),u_fade_change:new i.Uniform1f(I,j.u_fade_change),u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(I,j.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(I,j.u_coord_matrix),u_is_text:new i.Uniform1i(I,j.u_is_text),u_pitch_with_map:new i.Uniform1i(I,j.u_pitch_with_map),u_texsize:new i.Uniform2f(I,j.u_texsize),u_texsize_icon:new i.Uniform2f(I,j.u_texsize_icon),u_texture:new i.Uniform1i(I,j.u_texture),u_texture_icon:new i.Uniform1i(I,j.u_texture_icon),u_gamma_scale:new i.Uniform1f(I,j.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(I,j.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(I,j.u_is_halo)}},background:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_opacity:new i.Uniform1f(I,j.u_opacity),u_color:new i.UniformColor(I,j.u_color)}},backgroundPattern:function(I,j){return{u_matrix:new i.UniformMatrix4f(I,j.u_matrix),u_opacity:new i.Uniform1f(I,j.u_opacity),u_image:new i.Uniform1i(I,j.u_image),u_pattern_tl_a:new i.Uniform2f(I,j.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(I,j.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(I,j.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(I,j.u_pattern_br_b),u_texsize:new i.Uniform2f(I,j.u_texsize),u_mix:new i.Uniform1f(I,j.u_mix),u_pattern_size_a:new i.Uniform2f(I,j.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(I,j.u_pattern_size_b),u_scale_a:new i.Uniform1f(I,j.u_scale_a),u_scale_b:new i.Uniform1f(I,j.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(I,j.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(I,j.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(I,j.u_tile_units_to_pixels)}}};function _n(I,j,V,X,se,he,ve){for(var be=I.context,Se=be.gl,Ue=I.useProgram("collisionBox"),Xe=[],it=0,xt=0,Lt=0;Lt0){var rn=i.create(),dn=Nt;i.mul(rn,yt.placementInvProjMatrix,I.transform.glCoordMatrix),i.mul(rn,rn,yt.placementViewportMatrix),Xe.push({circleArray:qt,circleOffset:xt,transform:dn,invTransform:rn}),xt=it+=qt.length/4}Rt&&Ue.draw(be,Se.LINES,dt.disabled,Pe.disabled,I.colorModeForRenderPass(),Ae.disabled,Yl(Nt,I.transform,Mt),V.id,Rt.layoutVertexBuffer,Rt.indexBuffer,Rt.segments,null,I.transform.zoom,null,null,Rt.collisionVertexBuffer)}}if(ve&&Xe.length){var Sn=I.useProgram("collisionCircle"),An=new i.StructArrayLayout2f1f2i16;An.resize(4*it),An._trim();for(var tr=0,er=0,gr=Xe;er=0&&(_t[yt.associatedIconIndex]={shiftedAnchor:gr,angle:cr})}else vr(yt.numGlyphs,xt)}if(Xe){Lt.clear();for(var ii=I.icon.placedSymbolArray,Ti=0;Ti0){var ve=i.browser.now(),be=(ve-I.timeAdded)/he,Se=j?(ve-j.timeAdded)/he:-1,Ue=V.getSource(),Xe=se.coveringZoomLevel({tileSize:Ue.tileSize,roundZoom:Ue.roundZoom}),it=!j||Math.abs(j.tileID.overscaledZ-Xe)>Math.abs(I.tileID.overscaledZ-Xe),xt=it&&I.refreshedUponExpiration?1:i.clamp(it?be:1-Se,0,1);return I.refreshedUponExpiration&&be>=1&&(I.refreshedUponExpiration=!1),j?{opacity:1,mix:1-xt}:{opacity:xt,mix:0}}return{opacity:1,mix:0}}var ca=new i.Color(1,0,0,1),lo=new i.Color(0,1,0,1),io=new i.Color(0,0,1,1),za=new i.Color(1,0,1,1),Ra=new i.Color(0,1,1,1);function ao(I){var j=I.transform.padding;Lo(I,I.transform.height-(j.top||0),3,ca),Lo(I,j.bottom||0,3,lo),Ko(I,j.left||0,3,io),Ko(I,I.transform.width-(j.right||0),3,za);var V=I.transform.centerPoint;(function(X,se,he,ve){Qo(X,se-1,he-10,2,20,ve),Qo(X,se-10,he-1,20,2,ve)})(I,V.x,I.transform.height-V.y,Ra)}function Lo(I,j,V,X){Qo(I,0,j+V/2,I.transform.width,V,X)}function Ko(I,j,V,X){Qo(I,j-V/2,0,V,I.transform.height,X)}function Qo(I,j,V,X,se,he){var ve=I.context,be=ve.gl;be.enable(be.SCISSOR_TEST),be.scissor(j*i.browser.devicePixelRatio,V*i.browser.devicePixelRatio,X*i.browser.devicePixelRatio,se*i.browser.devicePixelRatio),ve.clear({color:he}),be.disable(be.SCISSOR_TEST)}function es(I,j,V){var X=I.context,se=X.gl,he=V.posMatrix,ve=I.useProgram("debug"),be=dt.disabled,Se=Pe.disabled,Ue=I.colorModeForRenderPass();X.activeTexture.set(se.TEXTURE0),I.emptyTexture.bind(se.LINEAR,se.CLAMP_TO_EDGE),ve.draw(X,se.LINE_STRIP,be,Se,Ue,Ae.disabled,Uu(he,i.Color.red),"$debug",I.debugBuffer,I.tileBorderIndexBuffer,I.debugSegments);var Xe=j.getTileByID(V.key).latestRawTileData,it=Xe&&Xe.byteLength||0,xt=Math.floor(it/1024),Lt=j.getTile(V).tileSize,_t=512/Math.min(Lt,512)*(V.overscaledZ/I.transform.zoom)*.5,Mt=V.canonical.toString();V.overscaledZ!==V.canonical.z&&(Mt+=" => "+V.overscaledZ),function(yt,Nt){yt.initDebugOverlayCanvas();var Rt=yt.debugOverlayCanvas,qt=yt.context.gl,rn=yt.debugOverlayCanvas.getContext("2d");rn.clearRect(0,0,Rt.width,Rt.height),rn.shadowColor="white",rn.shadowBlur=2,rn.lineWidth=1.5,rn.strokeStyle="white",rn.textBaseline="top",rn.font="bold 36px Open Sans, sans-serif",rn.fillText(Nt,5,5),rn.strokeText(Nt,5,5),yt.debugOverlayTexture.update(Rt),yt.debugOverlayTexture.bind(qt.LINEAR,qt.CLAMP_TO_EDGE)}(I,Mt+" "+xt+"kb"),ve.draw(X,se.TRIANGLES,be,Se,Ie.alphaBlended,Ae.disabled,Uu(he,i.Color.transparent,_t),"$debug",I.debugBuffer,I.quadTriangleIndexBuffer,I.debugSegments)}var ts={symbol:function(I,j,V,X,se){if(I.renderPass==="translucent"){var he=Pe.disabled,ve=I.colorModeForRenderPass();V.layout.get("text-variable-anchor")&&function(be,Se,Ue,Xe,it,xt,Lt){for(var _t=Se.transform,Mt=it==="map",yt=xt==="map",Nt=0,Rt=be;Nt256&&this.clearStencil(),V.setColorMode(Ie.disabled),V.setDepthMode(dt.disabled);var se=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var he=0,ve=j;he256&&this.clearStencil();var I=this.nextStencilID++,j=this.context.gl;return new Pe({func:j.NOTEQUAL,mask:255},I,255,j.KEEP,j.KEEP,j.REPLACE)},na.prototype.stencilModeForClipping=function(I){var j=this.context.gl;return new Pe({func:j.EQUAL,mask:255},this._tileClippingMaskIDs[I.key],0,j.KEEP,j.KEEP,j.REPLACE)},na.prototype.stencilConfigForOverlap=function(I){var j,V=this.context.gl,X=I.sort(function(Se,Ue){return Ue.overscaledZ-Se.overscaledZ}),se=X[X.length-1].overscaledZ,he=X[0].overscaledZ-se+1;if(he>1){this.currentStencilSource=void 0,this.nextStencilID+he>256&&this.clearStencil();for(var ve={},be=0;be=0;this.currentLayer--){var dn=this.style._layers[X[this.currentLayer]],Sn=se[dn.source],An=Ue[dn.source];this._renderTileClippingMasks(dn,An),this.renderLayer(this,Sn,dn,An)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?j.pop():null},na.prototype.isPatternMissing=function(I){if(!I)return!1;if(!I.from||!I.to)return!0;var j=this.imageManager.getPattern(I.from.toString()),V=this.imageManager.getPattern(I.to.toString());return!j||!V},na.prototype.useProgram=function(I,j){this.cache=this.cache||{};var V=""+I+(j?j.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[V]||(this.cache[V]=new Sc(this.context,ju[I],j,xn[I],this._showOverdrawInspector)),this.cache[V]},na.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()},na.prototype.setBaseState=function(){var 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)},na.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var I=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,I.RGBA)}},na.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var ht=function(I,j){this.points=I,this.planes=j};ht.fromInvProjectionMatrix=function(I,j,V){var X=Math.pow(2,V),se=[[-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(function(ve){return i.transformMat4([],ve,I)}).map(function(ve){return i.scale$1([],ve,1/ve[3]/j*X)}),he=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(ve){var be=i.sub([],se[ve[0]],se[ve[1]]),Se=i.sub([],se[ve[2]],se[ve[1]]),Ue=i.normalize([],i.cross([],be,Se)),Xe=-i.dot(Ue,se[ve[1]]);return Ue.concat(Xe)});return new ht(se,he)};var Ft=function(I,j){this.min=I,this.max=j,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};Ft.prototype.quadrant=function(I){for(var j=[I%2==0,I<2],V=i.clone$2(this.min),X=i.clone$2(this.max),se=0;se=0;if(he===0)return 0;he!==j.length&&(V=!1)}if(V)return 2;for(var be=0;be<3;be++){for(var Se=Number.MAX_VALUE,Ue=-Number.MAX_VALUE,Xe=0;Xethis.max[be]-this.min[be])return 0}return 1};var ln=function(I,j,V,X){if(I===void 0&&(I=0),j===void 0&&(j=0),V===void 0&&(V=0),X===void 0&&(X=0),isNaN(I)||I<0||isNaN(j)||j<0||isNaN(V)||V<0||isNaN(X)||X<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=I,this.bottom=j,this.left=V,this.right=X};ln.prototype.interpolate=function(I,j,V){return j.top!=null&&I.top!=null&&(this.top=i.number(I.top,j.top,V)),j.bottom!=null&&I.bottom!=null&&(this.bottom=i.number(I.bottom,j.bottom,V)),j.left!=null&&I.left!=null&&(this.left=i.number(I.left,j.left,V)),j.right!=null&&I.right!=null&&(this.right=i.number(I.right,j.right,V)),this},ln.prototype.getCenter=function(I,j){var V=i.clamp((this.left+I-this.right)/2,0,I),X=i.clamp((this.top+j-this.bottom)/2,0,j);return new i.Point(V,X)},ln.prototype.equals=function(I){return this.top===I.top&&this.bottom===I.bottom&&this.left===I.left&&this.right===I.right},ln.prototype.clone=function(){return new ln(this.top,this.bottom,this.left,this.right)},ln.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var $t=function(I,j,V,X,se){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=se===void 0||se,this._minZoom=I||0,this._maxZoom=j||22,this._minPitch=V??0,this._maxPitch=X??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new i.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ln,this._posMatrixCache={},this._alignedPosMatrixCache={}},un={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}};$t.prototype.clone=function(){var I=new $t(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return I.tileSize=this.tileSize,I.latRange=this.latRange,I.width=this.width,I.height=this.height,I._center=this._center,I.zoom=this.zoom,I.angle=this.angle,I._fov=this._fov,I._pitch=this._pitch,I._unmodified=this._unmodified,I._edgeInsets=this._edgeInsets.clone(),I._calcMatrices(),I},un.minZoom.get=function(){return this._minZoom},un.minZoom.set=function(I){this._minZoom!==I&&(this._minZoom=I,this.zoom=Math.max(this.zoom,I))},un.maxZoom.get=function(){return this._maxZoom},un.maxZoom.set=function(I){this._maxZoom!==I&&(this._maxZoom=I,this.zoom=Math.min(this.zoom,I))},un.minPitch.get=function(){return this._minPitch},un.minPitch.set=function(I){this._minPitch!==I&&(this._minPitch=I,this.pitch=Math.max(this.pitch,I))},un.maxPitch.get=function(){return this._maxPitch},un.maxPitch.set=function(I){this._maxPitch!==I&&(this._maxPitch=I,this.pitch=Math.min(this.pitch,I))},un.renderWorldCopies.get=function(){return this._renderWorldCopies},un.renderWorldCopies.set=function(I){I===void 0?I=!0:I===null&&(I=!1),this._renderWorldCopies=I},un.worldSize.get=function(){return this.tileSize*this.scale},un.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},un.size.get=function(){return new i.Point(this.width,this.height)},un.bearing.get=function(){return-this.angle/Math.PI*180},un.bearing.set=function(I){var j=-i.wrap(I,-180,180)*Math.PI/180;this.angle!==j&&(this._unmodified=!1,this.angle=j,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},un.pitch.get=function(){return this._pitch/Math.PI*180},un.pitch.set=function(I){var j=i.clamp(I,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==j&&(this._unmodified=!1,this._pitch=j,this._calcMatrices())},un.fov.get=function(){return this._fov/Math.PI*180},un.fov.set=function(I){I=Math.max(.01,Math.min(60,I)),this._fov!==I&&(this._unmodified=!1,this._fov=I/180*Math.PI,this._calcMatrices())},un.zoom.get=function(){return this._zoom},un.zoom.set=function(I){var j=Math.min(Math.max(I,this.minZoom),this.maxZoom);this._zoom!==j&&(this._unmodified=!1,this._zoom=j,this.scale=this.zoomScale(j),this.tileZoom=Math.floor(j),this.zoomFraction=j-this.tileZoom,this._constrain(),this._calcMatrices())},un.center.get=function(){return this._center},un.center.set=function(I){I.lat===this._center.lat&&I.lng===this._center.lng||(this._unmodified=!1,this._center=I,this._constrain(),this._calcMatrices())},un.padding.get=function(){return this._edgeInsets.toJSON()},un.padding.set=function(I){this._edgeInsets.equals(I)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,I,1),this._calcMatrices())},un.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},$t.prototype.isPaddingEqual=function(I){return this._edgeInsets.equals(I)},$t.prototype.interpolatePadding=function(I,j,V){this._unmodified=!1,this._edgeInsets.interpolate(I,j,V),this._constrain(),this._calcMatrices()},$t.prototype.coveringZoomLevel=function(I){var j=(I.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/I.tileSize));return Math.max(0,j)},$t.prototype.getVisibleUnwrappedCoordinates=function(I){var j=[new i.UnwrappedTileID(0,I)];if(this._renderWorldCopies)for(var V=this.pointCoordinate(new i.Point(0,0)),X=this.pointCoordinate(new i.Point(this.width,0)),se=this.pointCoordinate(new i.Point(this.width,this.height)),he=this.pointCoordinate(new i.Point(0,this.height)),ve=Math.floor(Math.min(V.x,X.x,se.x,he.x)),be=Math.floor(Math.max(V.x,X.x,se.x,he.x)),Se=ve-1;Se<=be+1;Se++)Se!==0&&j.push(new i.UnwrappedTileID(Se,I));return j},$t.prototype.coveringTiles=function(I){var j=this.coveringZoomLevel(I),V=j;if(I.minzoom!==void 0&&jI.maxzoom&&(j=I.maxzoom);var X=i.MercatorCoordinate.fromLngLat(this.center),se=Math.pow(2,j),he=[se*X.x,se*X.y,0],ve=ht.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,j),be=I.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(be=j);var Se=function(gr){return{aabb:new Ft([gr*se,0,0],[(gr+1)*se,se,0]),zoom:0,x:0,y:0,wrap:gr,fullyVisible:!1}},Ue=[],Xe=[],it=j,xt=I.reparseOverscaled?V:j;if(this._renderWorldCopies)for(var Lt=1;Lt<=3;Lt++)Ue.push(Se(-Lt)),Ue.push(Se(Lt));for(Ue.push(Se(0));Ue.length>0;){var _t=Ue.pop(),Mt=_t.x,yt=_t.y,Nt=_t.fullyVisible;if(!Nt){var Rt=_t.aabb.intersects(ve);if(Rt===0)continue;Nt=Rt===2}var qt=_t.aabb.distanceX(he),rn=_t.aabb.distanceY(he),dn=Math.max(Math.abs(qt),Math.abs(rn)),Sn=3+(1<Sn&&_t.zoom>=be)Xe.push({tileID:new i.OverscaledTileID(_t.zoom===it?xt:_t.zoom,_t.wrap,_t.zoom,Mt,yt),distanceSq:i.sqrLen([he[0]-.5-Mt,he[1]-.5-yt])});else for(var An=0;An<4;An++){var tr=(Mt<<1)+An%2,er=(yt<<1)+(An>>1);Ue.push({aabb:_t.aabb.quadrant(An),zoom:_t.zoom+1,x:tr,y:er,wrap:_t.wrap,fullyVisible:Nt})}}return Xe.sort(function(gr,cr){return gr.distanceSq-cr.distanceSq}).map(function(gr){return gr.tileID})},$t.prototype.resize=function(I,j){this.width=I,this.height=j,this.pixelsToGLUnits=[2/I,-2/j],this._constrain(),this._calcMatrices()},un.unmodified.get=function(){return this._unmodified},$t.prototype.zoomScale=function(I){return Math.pow(2,I)},$t.prototype.scaleZoom=function(I){return Math.log(I)/Math.LN2},$t.prototype.project=function(I){var j=i.clamp(I.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(I.lng)*this.worldSize,i.mercatorYfromLat(j)*this.worldSize)},$t.prototype.unproject=function(I){return new i.MercatorCoordinate(I.x/this.worldSize,I.y/this.worldSize).toLngLat()},un.point.get=function(){return this.project(this.center)},$t.prototype.setLocationAtPoint=function(I,j){var V=this.pointCoordinate(j),X=this.pointCoordinate(this.centerPoint),se=this.locationCoordinate(I),he=new i.MercatorCoordinate(se.x-(V.x-X.x),se.y-(V.y-X.y));this.center=this.coordinateLocation(he),this._renderWorldCopies&&(this.center=this.center.wrap())},$t.prototype.locationPoint=function(I){return this.coordinatePoint(this.locationCoordinate(I))},$t.prototype.pointLocation=function(I){return this.coordinateLocation(this.pointCoordinate(I))},$t.prototype.locationCoordinate=function(I){return i.MercatorCoordinate.fromLngLat(I)},$t.prototype.coordinateLocation=function(I){return I.toLngLat()},$t.prototype.pointCoordinate=function(I){var j=[I.x,I.y,0,1],V=[I.x,I.y,1,1];i.transformMat4(j,j,this.pixelMatrixInverse),i.transformMat4(V,V,this.pixelMatrixInverse);var X=j[3],se=V[3],he=j[0]/X,ve=V[0]/se,be=j[1]/X,Se=V[1]/se,Ue=j[2]/X,Xe=V[2]/se,it=Ue===Xe?0:(0-Ue)/(Xe-Ue);return new i.MercatorCoordinate(i.number(he,ve,it)/this.worldSize,i.number(be,Se,it)/this.worldSize)},$t.prototype.coordinatePoint=function(I){var j=[I.x*this.worldSize,I.y*this.worldSize,0,1];return i.transformMat4(j,j,this.pixelMatrix),new i.Point(j[0]/j[3],j[1]/j[3])},$t.prototype.getBounds=function(){return new i.LngLatBounds().extend(this.pointLocation(new i.Point(0,0))).extend(this.pointLocation(new i.Point(this.width,0))).extend(this.pointLocation(new i.Point(this.width,this.height))).extend(this.pointLocation(new i.Point(0,this.height)))},$t.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new i.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},$t.prototype.setMaxBounds=function(I){I?(this.lngRange=[I.getWest(),I.getEast()],this.latRange=[I.getSouth(),I.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},$t.prototype.calculatePosMatrix=function(I,j){j===void 0&&(j=!1);var V=I.key,X=j?this._alignedPosMatrixCache:this._posMatrixCache;if(X[V])return X[V];var se=I.canonical,he=this.worldSize/this.zoomScale(se.z),ve=se.x+Math.pow(2,se.z)*I.wrap,be=i.identity(new Float64Array(16));return i.translate(be,be,[ve*he,se.y*he,0]),i.scale(be,be,[he/i.EXTENT,he/i.EXTENT,1]),i.multiply(be,j?this.alignedProjMatrix:this.projMatrix,be),X[V]=new Float32Array(be),X[V]},$t.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},$t.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var I,j,V,X,se=-90,he=90,ve=-180,be=180,Se=this.size,Ue=this._unmodified;if(this.latRange){var Xe=this.latRange;se=i.mercatorYfromLat(Xe[1])*this.worldSize,I=(he=i.mercatorYfromLat(Xe[0])*this.worldSize)-sehe&&(X=he-Mt)}if(this.lngRange){var yt=xt.x,Nt=Se.x/2;yt-Ntbe&&(V=be-Nt)}V===void 0&&X===void 0||(this.center=this.unproject(new i.Point(V!==void 0?V:xt.x,X!==void 0?X:xt.y))),this._unmodified=Ue,this._constraining=!1}},$t.prototype._calcMatrices=function(){if(this.height){var I=this._fov/2,j=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(I)*this.height;var V=Math.PI/2+this._pitch,X=this._fov*(.5+j.y/this.height),se=Math.sin(X)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-V-X,.01,Math.PI-.01)),he=this.point,ve=he.x,be=he.y,Se=1.01*(Math.cos(Math.PI/2-this._pitch)*se+this.cameraToCenterDistance),Ue=this.height/50,Xe=new Float64Array(16);i.perspective(Xe,this._fov,this.width/this.height,Ue,Se),Xe[8]=2*-j.x/this.width,Xe[9]=2*j.y/this.height,i.scale(Xe,Xe,[1,-1,1]),i.translate(Xe,Xe,[0,0,-this.cameraToCenterDistance]),i.rotateX(Xe,Xe,this._pitch),i.rotateZ(Xe,Xe,this.angle),i.translate(Xe,Xe,[-ve,-be,0]),this.mercatorMatrix=i.scale([],Xe,[this.worldSize,this.worldSize,this.worldSize]),i.scale(Xe,Xe,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=Xe,this.invProjMatrix=i.invert([],this.projMatrix);var it=this.width%2/2,xt=this.height%2/2,Lt=Math.cos(this.angle),_t=Math.sin(this.angle),Mt=ve-Math.round(ve)+Lt*it+_t*xt,yt=be-Math.round(be)+Lt*xt+_t*it,Nt=new Float64Array(Xe);if(i.translate(Nt,Nt,[Mt>.5?Mt-1:Mt,yt>.5?yt-1:yt,0]),this.alignedProjMatrix=Nt,Xe=i.create(),i.scale(Xe,Xe,[this.width/2,-this.height/2,1]),i.translate(Xe,Xe,[1,-1,0]),this.labelPlaneMatrix=Xe,Xe=i.create(),i.scale(Xe,Xe,[1,-1,1]),i.translate(Xe,Xe,[-1,-1,0]),i.scale(Xe,Xe,[2/this.width,2/this.height,1]),this.glCoordMatrix=Xe,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(Xe=i.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=Xe,this._posMatrixCache={},this._alignedPosMatrixCache={}}},$t.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var I=this.pointCoordinate(new i.Point(0,0)),j=[I.x*this.worldSize,I.y*this.worldSize,0,1];return i.transformMat4(j,j,this.pixelMatrix)[3]/this.cameraToCenterDistance},$t.prototype.getCameraPoint=function(){var I=this._pitch,j=Math.tan(I)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,j))},$t.prototype.getCameraQueryGeometry=function(I){var j=this.getCameraPoint();if(I.length===1)return[I[0],j];for(var V=j.x,X=j.y,se=j.x,he=j.y,ve=0,be=I;ve=3&&!I.some(function(V){return isNaN(V)})){var j=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(I[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+I[2],+I[1]],zoom:+I[0],bearing:j,pitch:+(I[4]||0)}),!0}return!1},On.prototype._updateHashUnthrottled=function(){var I=this.getHashString();try{i.window.history.replaceState(i.window.history.state,"",I)}catch{}};var Fn={linearity:.3,easing:i.bezier(0,0,.3,1)},Jn=i.extend({deceleration:2500,maxSpeed:1400},Fn),fr=i.extend({deceleration:20,maxSpeed:1400},Fn),ur=i.extend({deceleration:1e3,maxSpeed:360},Fn),yr=i.extend({deceleration:1e3,maxSpeed:90},Fn),Tr=function(I){this._map=I,this.clear()};function hr(I,j){(!I.duration||I.duration0&&j-I[0].time>160;)I.shift()},Tr.prototype._onMoveEnd=function(I){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var j={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},V=0,X=this._inertiaBuffer;V=this._clickTolerance||this._map.fire(new Ur(I.type,this._map,I))},Qn.prototype.dblclick=function(I){return this._firePreventable(new Ur(I.type,this._map,I))},Qn.prototype.mouseover=function(I){this._map.fire(new Ur(I.type,this._map,I))},Qn.prototype.mouseout=function(I){this._map.fire(new Ur(I.type,this._map,I))},Qn.prototype.touchstart=function(I){return this._firePreventable(new Zr(I.type,this._map,I))},Qn.prototype.touchmove=function(I){this._map.fire(new Zr(I.type,this._map,I))},Qn.prototype.touchend=function(I){this._map.fire(new Zr(I.type,this._map,I))},Qn.prototype.touchcancel=function(I){this._map.fire(new Zr(I.type,this._map,I))},Qn.prototype._firePreventable=function(I){if(this._map.fire(I),I.defaultPrevented)return{}},Qn.prototype.isEnabled=function(){return!0},Qn.prototype.isActive=function(){return!1},Qn.prototype.enable=function(){},Qn.prototype.disable=function(){};var di=function(I){this._map=I};di.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},di.prototype.mousemove=function(I){this._map.fire(new Ur(I.type,this._map,I))},di.prototype.mousedown=function(){this._delayContextMenu=!0},di.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Ur("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},di.prototype.contextmenu=function(I){this._delayContextMenu?this._contextMenuEvent=I:this._map.fire(new Ur(I.type,this._map,I)),this._map.listens("contextmenu")&&I.preventDefault()},di.prototype.isEnabled=function(){return!0},di.prototype.isActive=function(){return!1},di.prototype.enable=function(){},di.prototype.disable=function(){};var Rr=function(I,j){this._map=I,this._el=I.getCanvasContainer(),this._container=I.getContainer(),this._clickTolerance=j.clickTolerance||1};function Gr(I,j){for(var V={},X=0;Xthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=I.timeStamp),V.length===this.numTouches&&(this.centroid=function(X){for(var se=new i.Point(0,0),he=0,ve=X;he30)&&(this.aborted=!0)}}},fi.prototype.touchend=function(I,j,V){if((!this.centroid||I.timeStamp-this.startTime>500)&&(this.aborted=!0),V.length===0){var X=!this.aborted&&this.centroid;if(this.reset(),X)return X}};var Ni=function(I){this.singleTap=new fi(I),this.numTaps=I.numTaps,this.reset()};Ni.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Ni.prototype.touchstart=function(I,j,V){this.singleTap.touchstart(I,j,V)},Ni.prototype.touchmove=function(I,j,V){this.singleTap.touchmove(I,j,V)},Ni.prototype.touchend=function(I,j,V){var X=this.singleTap.touchend(I,j,V);if(X){var se=I.timeStamp-this.lastTime<500,he=!this.lastTap||this.lastTap.dist(X)<30;if(se&&he||this.reset(),this.count++,this.lastTime=I.timeStamp,this.lastTap=X,this.count===this.numTaps)return this.reset(),X}};var Ki=function(){this._zoomIn=new Ni({numTouches:1,numTaps:2}),this._zoomOut=new Ni({numTouches:2,numTaps:1}),this.reset()};Ki.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Ki.prototype.touchstart=function(I,j,V){this._zoomIn.touchstart(I,j,V),this._zoomOut.touchstart(I,j,V)},Ki.prototype.touchmove=function(I,j,V){this._zoomIn.touchmove(I,j,V),this._zoomOut.touchmove(I,j,V)},Ki.prototype.touchend=function(I,j,V){var X=this,se=this._zoomIn.touchend(I,j,V),he=this._zoomOut.touchend(I,j,V);return se?(this._active=!0,I.preventDefault(),setTimeout(function(){return X.reset()},0),{cameraAnimation:function(ve){return ve.easeTo({duration:300,zoom:ve.getZoom()+1,around:ve.unproject(se)},{originalEvent:I})}}):he?(this._active=!0,I.preventDefault(),setTimeout(function(){return X.reset()},0),{cameraAnimation:function(ve){return ve.easeTo({duration:300,zoom:ve.getZoom()-1,around:ve.unproject(he)},{originalEvent:I})}}):void 0},Ki.prototype.touchcancel=function(){this.reset()},Ki.prototype.enable=function(){this._enabled=!0},Ki.prototype.disable=function(){this._enabled=!1,this.reset()},Ki.prototype.isEnabled=function(){return this._enabled},Ki.prototype.isActive=function(){return this._active};var Lr=function(I){this.reset(),this._clickTolerance=I.clickTolerance||1};Lr.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Lr.prototype._correctButton=function(I,j){return!1},Lr.prototype._move=function(I,j){return{}},Lr.prototype.mousedown=function(I,j){if(!this._lastPoint){var V=u.mouseButton(I);this._correctButton(I,V)&&(this._lastPoint=j,this._eventButton=V)}},Lr.prototype.mousemoveWindow=function(I,j){var V=this._lastPoint;if(V&&(I.preventDefault(),this._moved||!(j.dist(V)0&&(this._active=!0);var X=Gr(V,j),se=new i.Point(0,0),he=new i.Point(0,0),ve=0;for(var be in X){var Se=X[be],Ue=this._touches[be];Ue&&(se._add(Se),he._add(Se.sub(Ue)),ve++,X[be]=Se)}if(this._touches=X,!(veMath.abs(I.x)}var ks=function(I){function j(){I.apply(this,arguments)}return I&&(j.__proto__=I),j.prototype=Object.create(I&&I.prototype),j.prototype.constructor=j,j.prototype.reset=function(){I.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},j.prototype._start=function(V){this._lastPoints=V,Zs(V[0].sub(V[1]))&&(this._valid=!1)},j.prototype._move=function(V,X,se){var he=V[0].sub(this._lastPoints[0]),ve=V[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(he,ve,se.timeStamp),this._valid)return this._lastPoints=V,this._active=!0,{pitchDelta:-.5*((he.y+ve.y)/2)}},j.prototype.gestureBeginsVertically=function(V,X,se){if(this._valid!==void 0)return this._valid;var he=V.mag()>=2,ve=X.mag()>=2;if(he||ve){if(!he||!ve)return this._firstMove===void 0&&(this._firstMove=se),se-this._firstMove<100&&void 0;var be=V.y>0==X.y>0;return Zs(V)&&Zs(X)&&be}},j}(Wi),Pi={panStep:100,bearingStep:15,pitchStep:10},Qa=function(){var I=Pi;this._panStep=I.panStep,this._bearingStep=I.bearingStep,this._pitchStep=I.pitchStep};function Ts(I){return I*(2-I)}Qa.prototype.reset=function(){this._active=!1},Qa.prototype.keydown=function(I){var j=this;if(!(I.altKey||I.ctrlKey||I.metaKey)){var V=0,X=0,se=0,he=0,ve=0;switch(I.keyCode){case 61:case 107:case 171:case 187:V=1;break;case 189:case 109:case 173:V=-1;break;case 37:I.shiftKey?X=-1:(I.preventDefault(),he=-1);break;case 39:I.shiftKey?X=1:(I.preventDefault(),he=1);break;case 38:I.shiftKey?se=1:(I.preventDefault(),ve=-1);break;case 40:I.shiftKey?se=-1:(I.preventDefault(),ve=1);break;default:return}return{cameraAnimation:function(be){var Se=be.getZoom();be.easeTo({duration:300,easeId:"keyboardHandler",easing:Ts,zoom:V?Math.round(Se)+V*(I.shiftKey?2:1):Se,bearing:be.getBearing()+X*j._bearingStep,pitch:be.getPitch()+se*j._pitchStep,offset:[-he*j._panStep,-ve*j._panStep],center:be.getCenter()},{originalEvent:I})}}}},Qa.prototype.enable=function(){this._enabled=!0},Qa.prototype.disable=function(){this._enabled=!1,this.reset()},Qa.prototype.isEnabled=function(){return this._enabled},Qa.prototype.isActive=function(){return this._active};var wa=function(I,j){this._map=I,this._el=I.getCanvasContainer(),this._handler=j,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,i.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};wa.prototype.setZoomRate=function(I){this._defaultZoomRate=I},wa.prototype.setWheelZoomRate=function(I){this._wheelZoomRate=I},wa.prototype.isEnabled=function(){return!!this._enabled},wa.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},wa.prototype.isZooming=function(){return!!this._zooming},wa.prototype.enable=function(I){this.isEnabled()||(this._enabled=!0,this._aroundCenter=I&&I.around==="center")},wa.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},wa.prototype.wheel=function(I){if(this.isEnabled()){var j=I.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?40*I.deltaY:I.deltaY,V=i.browser.now(),X=V-(this._lastWheelEventTime||0);this._lastWheelEventTime=V,j!==0&&j%4.000244140625==0?this._type="wheel":j!==0&&Math.abs(j)<4?this._type="trackpad":X>400?(this._type=null,this._lastValue=j,this._timeout=setTimeout(this._onTimeout,40,I)):this._type||(this._type=Math.abs(X*j)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,j+=this._lastValue)),I.shiftKey&&j&&(j/=4),this._type&&(this._lastWheelEvent=I,this._delta-=j,this._active||this._start(I)),I.preventDefault()}},wa.prototype._onTimeout=function(I){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(I)},wa.prototype._start=function(I){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 j=u.mousePos(this._el,I);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(j)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},wa.prototype.renderFrame=function(){return this._onScrollFrame()},wa.prototype._onScrollFrame=function(){var I=this;if(this._frameId&&(this._frameId=null,this.isActive())){var j=this._map.transform;if(this._delta!==0){var V=this._type==="wheel"&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,X=2/(1+Math.exp(-Math.abs(this._delta*V)));this._delta<0&&X!==0&&(X=1/X);var se=typeof this._targetZoom=="number"?j.zoomScale(this._targetZoom):j.scale;this._targetZoom=Math.min(j.maxZoom,Math.max(j.minZoom,j.scaleZoom(se*X))),this._type==="wheel"&&(this._startZoom=j.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var he,ve=typeof this._targetZoom=="number"?this._targetZoom:j.zoom,be=this._startZoom,Se=this._easing,Ue=!1;if(this._type==="wheel"&&be&&Se){var Xe=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),it=Se(Xe);he=i.number(be,ve,it),Xe<1?this._frameId||(this._frameId=!0):Ue=!0}else he=ve,Ue=!0;return this._active=!0,Ue&&(this._active=!1,this._finishTimeout=setTimeout(function(){I._zooming=!1,I._handler._triggerRenderFrame(),delete I._targetZoom,delete I._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Ue,zoomDelta:he-j.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},wa.prototype._smoothOutEasing=function(I){var j=i.ease;if(this._prevEase){var V=this._prevEase,X=(i.browser.now()-V.start)/V.duration,se=V.easing(X+.01)-V.easing(X),he=.27/Math.sqrt(se*se+1e-4)*.01,ve=Math.sqrt(.0729-he*he);j=i.bezier(he,ve,.25,1)}return this._prevEase={start:i.browser.now(),duration:I,easing:j},j},wa.prototype.reset=function(){this._active=!1};var uo=function(I,j){this._clickZoom=I,this._tapZoom=j};uo.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},uo.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},uo.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},uo.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var jo=function(){this.reset()};jo.prototype.reset=function(){this._active=!1},jo.prototype.dblclick=function(I,j){return I.preventDefault(),{cameraAnimation:function(V){V.easeTo({duration:300,zoom:V.getZoom()+(I.shiftKey?-1:1),around:V.unproject(j)},{originalEvent:I})}}},jo.prototype.enable=function(){this._enabled=!0},jo.prototype.disable=function(){this._enabled=!1,this.reset()},jo.prototype.isEnabled=function(){return this._enabled},jo.prototype.isActive=function(){return this._active};var La=function(){this._tap=new Ni({numTouches:1,numTaps:1}),this.reset()};La.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},La.prototype.touchstart=function(I,j,V){this._swipePoint||(this._tapTime&&I.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?V.length>0&&(this._swipePoint=j[0],this._swipeTouch=V[0].identifier):this._tap.touchstart(I,j,V))},La.prototype.touchmove=function(I,j,V){if(this._tapTime){if(this._swipePoint){if(V[0].identifier!==this._swipeTouch)return;var X=j[0],se=X.y-this._swipePoint.y;return this._swipePoint=X,I.preventDefault(),this._active=!0,{zoomDelta:se/128}}}else this._tap.touchmove(I,j,V)},La.prototype.touchend=function(I,j,V){this._tapTime?this._swipePoint&&V.length===0&&this.reset():this._tap.touchend(I,j,V)&&(this._tapTime=I.timeStamp)},La.prototype.touchcancel=function(){this.reset()},La.prototype.enable=function(){this._enabled=!0},La.prototype.disable=function(){this._enabled=!1,this.reset()},La.prototype.isEnabled=function(){return this._enabled},La.prototype.isActive=function(){return this._active};var ps=function(I,j,V){this._el=I,this._mousePan=j,this._touchPan=V};ps.prototype.enable=function(I){this._inertiaOptions=I||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},ps.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},ps.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},ps.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Pa=function(I,j,V){this._pitchWithRotate=I.pitchWithRotate,this._mouseRotate=j,this._mousePitch=V};Pa.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Pa.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Pa.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Pa.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var ns=function(I,j,V,X){this._el=I,this._touchZoom=j,this._touchRotate=V,this._tapDragZoom=X,this._rotationDisabled=!1,this._enabled=!0};ns.prototype.enable=function(I){this._touchZoom.enable(I),this._rotationDisabled||this._touchRotate.enable(I),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},ns.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},ns.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},ns.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},ns.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},ns.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var mu=function(I){return I.zoom||I.drag||I.pitch||I.rotate},Xl=function(I){function j(){I.apply(this,arguments)}return I&&(j.__proto__=I),j.prototype=Object.create(I&&I.prototype),j.prototype.constructor=j,j}(i.Event);function xf(I){return I.panDelta&&I.panDelta.mag()||I.zoomDelta||I.bearingDelta||I.pitchDelta}var Mo=function(I,j){this._map=I,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Tr(I),this._bearingSnap=j.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(j),i.bindAll(["handleEvent","handleWindowEvent"],this);var V=this._el;this._listeners=[[V,"touchstart",{passive:!1}],[V,"touchmove",{passive:!1}],[V,"touchend",void 0],[V,"touchcancel",void 0],[V,"mousedown",void 0],[V,"mousemove",void 0],[V,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[V,"mouseover",void 0],[V,"mouseout",void 0],[V,"dblclick",void 0],[V,"click",void 0],[V,"keydown",{capture:!1}],[V,"keyup",void 0],[V,"wheel",{passive:!1}],[V,"contextmenu",void 0],[i.window,"blur",void 0]];for(var X=0,se=this._listeners;Xve?Math.min(2,Sn):Math.max(.5,Sn),cr=Math.pow(gr,1-tr),Yr=he.unproject(rn.add(dn.mult(tr*cr)).mult(er));he.setLocationAtPoint(he.renderWorldCopies?Yr.wrap():Yr,Mt)}se._fireMoveEvents(X)},function(tr){se._afterEase(X,tr)},V),this},j.prototype._prepareEase=function(V,X,se){se===void 0&&(se={}),this._moving=!0,X||se.moving||this.fire(new i.Event("movestart",V)),this._zooming&&!se.zooming&&this.fire(new i.Event("zoomstart",V)),this._rotating&&!se.rotating&&this.fire(new i.Event("rotatestart",V)),this._pitching&&!se.pitching&&this.fire(new i.Event("pitchstart",V))},j.prototype._fireMoveEvents=function(V){this.fire(new i.Event("move",V)),this._zooming&&this.fire(new i.Event("zoom",V)),this._rotating&&this.fire(new i.Event("rotate",V)),this._pitching&&this.fire(new i.Event("pitch",V))},j.prototype._afterEase=function(V,X){if(!this._easeId||!X||this._easeId!==X){delete this._easeId;var se=this._zooming,he=this._rotating,ve=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,se&&this.fire(new i.Event("zoomend",V)),he&&this.fire(new i.Event("rotateend",V)),ve&&this.fire(new i.Event("pitchend",V)),this.fire(new i.Event("moveend",V))}},j.prototype.flyTo=function(V,X){var se=this;if(!V.essential&&i.browser.prefersReducedMotion){var he=i.pick(V,["center","zoom","bearing","pitch","around"]);return this.jumpTo(he,X)}this.stop(),V=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},V);var ve=this.transform,be=this.getZoom(),Se=this.getBearing(),Ue=this.getPitch(),Xe=this.getPadding(),it="zoom"in V?i.clamp(+V.zoom,ve.minZoom,ve.maxZoom):be,xt="bearing"in V?this._normalizeBearing(V.bearing,Se):Se,Lt="pitch"in V?+V.pitch:Ue,_t="padding"in V?V.padding:ve.padding,Mt=ve.zoomScale(it-be),yt=i.Point.convert(V.offset),Nt=ve.centerPoint.add(yt),Rt=ve.pointLocation(Nt),qt=i.LngLat.convert(V.center||Rt);this._normalizeCenter(qt);var rn=ve.project(Rt),dn=ve.project(qt).sub(rn),Sn=V.curve,An=Math.max(ve.width,ve.height),tr=An/Mt,er=dn.mag();if("minZoom"in V){var gr=i.clamp(Math.min(V.minZoom,be,it),ve.minZoom,ve.maxZoom),cr=An/ve.zoomScale(gr-be);Sn=Math.sqrt(cr/er*2)}var Yr=Sn*Sn;function ii(ci){var zi=(tr*tr-An*An+(ci?-1:1)*Yr*Yr*er*er)/(2*(ci?tr:An)*Yr*er);return Math.log(Math.sqrt(zi*zi+1)-zi)}function Ti(ci){return(Math.exp(ci)-Math.exp(-ci))/2}function Gn(ci){return(Math.exp(ci)+Math.exp(-ci))/2}var Mr=ii(0),ai=function(ci){return Gn(Mr)/Gn(Mr+Sn*ci)},Qr=function(ci){return An*((Gn(Mr)*(Ti(zi=Mr+Sn*ci)/Gn(zi))-Ti(Mr))/Yr)/er;var zi},gi=(ii(1)-Mr)/Sn;if(Math.abs(er)<1e-6||!isFinite(gi)){if(Math.abs(An-tr)<1e-6)return this.easeTo(V,X);var Mi=trV.maxDuration&&(V.duration=0),this._zooming=!0,this._rotating=Se!==xt,this._pitching=Lt!==Ue,this._padding=!ve.isPaddingEqual(_t),this._prepareEase(X,!1),this._ease(function(ci){var zi=ci*gi,Li=1/ai(zi);ve.zoom=ci===1?it:be+ve.scaleZoom(Li),se._rotating&&(ve.bearing=i.number(Se,xt,ci)),se._pitching&&(ve.pitch=i.number(Ue,Lt,ci)),se._padding&&(ve.interpolatePadding(Xe,_t,ci),Nt=ve.centerPoint.add(yt));var Qi=ci===1?qt:ve.unproject(rn.add(dn.mult(Qr(zi))).mult(Li));ve.setLocationAtPoint(ve.renderWorldCopies?Qi.wrap():Qi,Nt),se._fireMoveEvents(X)},function(){return se._afterEase(X)},V),this},j.prototype.isEasing=function(){return!!this._easeFrameId},j.prototype.stop=function(){return this._stop()},j.prototype._stop=function(V,X){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var se=this._onEaseEnd;delete this._onEaseEnd,se.call(this,X)}if(!V){var he=this.handlers;he&&he.stop()}return this},j.prototype._ease=function(V,X,se){se.animate===!1||se.duration===0?(V(1),X()):(this._easeStart=i.browser.now(),this._easeOptions=se,this._onEaseFrame=V,this._onEaseEnd=X,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},j.prototype._renderFrameCallback=function(){var V=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(V)),V<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},j.prototype._normalizeBearing=function(V,X){V=i.wrap(V,-180,180);var se=Math.abs(V-X);return Math.abs(V-360-X)180?-360:se<-180?360:0}},j}(i.Evented),So=function(I){I===void 0&&(I={}),this.options=I,i.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};So.prototype.getDefaultPosition=function(){return"bottom-right"},So.prototype.onAdd=function(I){var j=this.options&&this.options.compact;return this._map=I,this._container=u.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=u.create("div","mapboxgl-ctrl-attrib-inner",this._container),j&&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),j===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},So.prototype.onRemove=function(){u.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},So.prototype._updateEditLink=function(){var I=this._editLink;I||(I=this._editLink=this._container.querySelector(".mapbox-improve-map"));var j=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(I){var V=j.reduce(function(X,se,he){return se.value&&(X+=se.key+"="+se.value+(he=0)return!1;return!0})).join(" | ");ve!==this._attribHTML&&(this._attribHTML=ve,I.length?(this._innerContainer.innerHTML=ve,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},So.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var Zl=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};Zl.prototype.onAdd=function(I){this._map=I,this._container=u.create("div","mapboxgl-ctrl");var j=u.create("a","mapboxgl-ctrl-logo");return j.target="_blank",j.rel="noopener nofollow",j.href="https://www.mapbox.com/",j.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),j.setAttribute("rel","noopener nofollow"),this._container.appendChild(j),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Zl.prototype.onRemove=function(){u.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Zl.prototype.getDefaultPosition=function(){return"bottom-left"},Zl.prototype._updateLogo=function(I){I&&I.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},Zl.prototype._logoRequired=function(){if(this._map.style){var I=this._map.style.sourceCaches;for(var j in I)if(I[j].getSource().mapbox_logo)return!0;return!1}},Zl.prototype._updateCompact=function(){var I=this._container.children;if(I.length){var j=I[0];this._map.getCanvasContainer().offsetWidth<250?j.classList.add("mapboxgl-compact"):j.classList.remove("mapboxgl-compact")}};var wi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};wi.prototype.add=function(I){var j=++this._id;return this._queue.push({callback:I,id:j,cancelled:!1}),j},wi.prototype.remove=function(I){for(var j=this._currentlyRunning,V=0,X=j?this._queue.concat(j):this._queue;VX.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(X.minPitch!=null&&X.maxPitch!=null&&X.minPitch>X.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(X.minPitch!=null&&X.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(X.maxPitch!=null&&X.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var he=new $t(X.minZoom,X.maxZoom,X.minPitch,X.maxPitch,X.renderWorldCopies);if(I.call(this,he,X),this._interactive=X.interactive,this._maxTileCacheSize=X.maxTileCacheSize,this._failIfMajorPerformanceCaveat=X.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=X.preserveDrawingBuffer,this._antialias=X.antialias,this._trackResize=X.trackResize,this._bearingSnap=X.bearingSnap,this._refreshExpiredTiles=X.refreshExpiredTiles,this._fadeDuration=X.fadeDuration,this._crossSourceCollisions=X.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=X.collectResourceTiming,this._renderTaskQueue=new wi,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},Di,X.locale),this._requestManager=new i.RequestManager(X.transformRequest,X.accessToken),typeof X.container=="string"){if(this._container=i.window.document.getElementById(X.container),!this._container)throw new Error("Container '"+X.container+"' not found.")}else{if(!(X.container instanceof wf))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=X.container}if(X.maxBounds&&this.setMaxBounds(X.maxBounds),i.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return se._update(!1)}),this.on("moveend",function(){return se._update(!1)}),this.on("zoom",function(){return se._update(!0)}),i.window!==void 0&&(i.window.addEventListener("online",this._onWindowOnline,!1),i.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new Mo(this,X);var ve=typeof X.hash=="string"&&X.hash||void 0;this._hash=X.hash&&new On(ve).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:X.center,zoom:X.zoom,bearing:X.bearing,pitch:X.pitch}),X.bounds&&(this.resize(),this.fitBounds(X.bounds,i.extend({},X.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=X.localIdeographFontFamily,X.style&&this.setStyle(X.style,{localIdeographFontFamily:X.localIdeographFontFamily}),X.attributionControl&&this.addControl(new So({customAttribution:X.customAttribution})),this.addControl(new Zl,X.logoPosition),this.on("style.load",function(){se.transform.unmodified&&se.jumpTo(se.style.stylesheet)}),this.on("data",function(be){se._update(be.dataType==="style"),se.fire(new i.Event(be.dataType+"data",be))}),this.on("dataloading",function(be){se.fire(new i.Event(be.dataType+"dataloading",be))})}I&&(j.__proto__=I),j.prototype=Object.create(I&&I.prototype),j.prototype.constructor=j;var V={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return j.prototype._getMapId=function(){return this._mapId},j.prototype.addControl=function(X,se){if(se===void 0&&X.getDefaultPosition&&(se=X.getDefaultPosition()),se===void 0&&(se="top-right"),!X||!X.onAdd)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var he=X.onAdd(this);this._controls.push(X);var ve=this._controlPositions[se];return se.indexOf("bottom")!==-1?ve.insertBefore(he,ve.firstChild):ve.appendChild(he),this},j.prototype.removeControl=function(X){if(!X||!X.onRemove)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var se=this._controls.indexOf(X);return se>-1&&this._controls.splice(se,1),X.onRemove(this),this},j.prototype.resize=function(X){var se=this._containerDimensions(),he=se[0],ve=se[1];this._resizeCanvas(he,ve),this.transform.resize(he,ve),this.painter.resize(he,ve);var be=!this._moving;return be&&(this.stop(),this.fire(new i.Event("movestart",X)).fire(new i.Event("move",X))),this.fire(new i.Event("resize",X)),be&&this.fire(new i.Event("moveend",X)),this},j.prototype.getBounds=function(){return this.transform.getBounds()},j.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},j.prototype.setMaxBounds=function(X){return this.transform.setMaxBounds(i.LngLatBounds.convert(X)),this._update()},j.prototype.setMinZoom=function(X){if((X=X??-2)>=-2&&X<=this.transform.maxZoom)return this.transform.minZoom=X,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=X,this._update(),this.getZoom()>X&&this.setZoom(X),this;throw new Error("maxZoom must be greater than the current minZoom")},j.prototype.getMaxZoom=function(){return this.transform.maxZoom},j.prototype.setMinPitch=function(X){if((X=X??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(X>=0&&X<=this.transform.maxPitch)return this.transform.minPitch=X,this._update(),this.getPitch()60)throw new Error("maxPitch must be less than or equal to 60");if(X>=this.transform.minPitch)return this.transform.maxPitch=X,this._update(),this.getPitch()>X&&this.setPitch(X),this;throw new Error("maxPitch must be greater than the current minPitch")},j.prototype.getMaxPitch=function(){return this.transform.maxPitch},j.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},j.prototype.setRenderWorldCopies=function(X){return this.transform.renderWorldCopies=X,this._update()},j.prototype.project=function(X){return this.transform.locationPoint(i.LngLat.convert(X))},j.prototype.unproject=function(X){return this.transform.pointLocation(i.Point.convert(X))},j.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},j.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},j.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},j.prototype._createDelegatedListener=function(X,se,he){var ve,be=this;if(X==="mouseenter"||X==="mouseover"){var Se=!1;return{layer:se,listener:he,delegates:{mousemove:function(Xe){var it=be.getLayer(se)?be.queryRenderedFeatures(Xe.point,{layers:[se]}):[];it.length?Se||(Se=!0,he.call(be,new Ur(X,be,Xe.originalEvent,{features:it}))):Se=!1},mouseout:function(){Se=!1}}}}if(X==="mouseleave"||X==="mouseout"){var Ue=!1;return{layer:se,listener:he,delegates:{mousemove:function(Xe){(be.getLayer(se)?be.queryRenderedFeatures(Xe.point,{layers:[se]}):[]).length?Ue=!0:Ue&&(Ue=!1,he.call(be,new Ur(X,be,Xe.originalEvent)))},mouseout:function(Xe){Ue&&(Ue=!1,he.call(be,new Ur(X,be,Xe.originalEvent)))}}}}return{layer:se,listener:he,delegates:(ve={},ve[X]=function(Xe){var it=be.getLayer(se)?be.queryRenderedFeatures(Xe.point,{layers:[se]}):[];it.length&&(Xe.features=it,he.call(be,Xe),delete Xe.features)},ve)}},j.prototype.on=function(X,se,he){if(he===void 0)return I.prototype.on.call(this,X,se);var ve=this._createDelegatedListener(X,se,he);for(var be in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[X]=this._delegatedListeners[X]||[],this._delegatedListeners[X].push(ve),ve.delegates)this.on(be,ve.delegates[be]);return this},j.prototype.once=function(X,se,he){if(he===void 0)return I.prototype.once.call(this,X,se);var ve=this._createDelegatedListener(X,se,he);for(var be in ve.delegates)this.once(be,ve.delegates[be]);return this},j.prototype.off=function(X,se,he){var ve=this;return he===void 0?I.prototype.off.call(this,X,se):(this._delegatedListeners&&this._delegatedListeners[X]&&function(be){for(var Se=be[X],Ue=0;Ue180;){var ve=V.locationPoint(I);if(ve.x>=0&&ve.y>=0&&ve.x<=V.width&&ve.y<=V.height)break;I.lng>V.center.lng?I.lng-=360:I.lng+=360}return I}Da.prototype.down=function(I,j){this.mouseRotate.mousedown(I,j),this.mousePitch&&this.mousePitch.mousedown(I,j),u.disableDrag()},Da.prototype.move=function(I,j){var V=this.map,X=this.mouseRotate.mousemoveWindow(I,j);if(X&&X.bearingDelta&&V.setBearing(V.getBearing()+X.bearingDelta),this.mousePitch){var se=this.mousePitch.mousemoveWindow(I,j);se&&se.pitchDelta&&V.setPitch(V.getPitch()+se.pitchDelta)}},Da.prototype.off=function(){var I=this.element;u.removeEventListener(I,"mousedown",this.mousedown),u.removeEventListener(I,"touchstart",this.touchstart,{passive:!1}),u.removeEventListener(I,"touchmove",this.touchmove),u.removeEventListener(I,"touchend",this.touchend),u.removeEventListener(I,"touchcancel",this.reset),this.offTemp()},Da.prototype.offTemp=function(){u.enableDrag(),u.removeEventListener(i.window,"mousemove",this.mousemove),u.removeEventListener(i.window,"mouseup",this.mouseup)},Da.prototype.mousedown=function(I){this.down(i.extend({},I,{ctrlKey:!0,preventDefault:function(){return I.preventDefault()}}),u.mousePos(this.element,I)),u.addEventListener(i.window,"mousemove",this.mousemove),u.addEventListener(i.window,"mouseup",this.mouseup)},Da.prototype.mousemove=function(I){this.move(I,u.mousePos(this.element,I))},Da.prototype.mouseup=function(I){this.mouseRotate.mouseupWindow(I),this.mousePitch&&this.mousePitch.mouseupWindow(I),this.offTemp()},Da.prototype.touchstart=function(I){I.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=u.touchPos(this.element,I.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return I.preventDefault()}},this._startPos))},Da.prototype.touchmove=function(I){I.targetTouches.length!==1?this.reset():(this._lastPos=u.touchPos(this.element,I.targetTouches)[0],this.move({preventDefault:function(){return I.preventDefault()}},this._lastPos))},Da.prototype.touchend=function(I){I.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)X.getEast()||se.latitudeX.getNorth())},j.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")}},j.prototype._onSuccess=function(V){if(this._map){if(this._isOutOfMapMaxBounds(V))return this._setErrorState(),this.fire(new i.Event("outofmaxbounds",V)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=V,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")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(V),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(V),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",V)),this._finish()}},j.prototype._updateCamera=function(V){var X=new i.LngLat(V.coords.longitude,V.coords.latitude),se=V.coords.accuracy,he=this._map.getBearing(),ve=i.extend({bearing:he},this.options.fitBoundsOptions);this._map.fitBounds(X.toBounds(se),ve,{geolocateSource:!0})},j.prototype._updateMarker=function(V){if(V){var X=new i.LngLat(V.coords.longitude,V.coords.latitude);this._accuracyCircleMarker.setLngLat(X).addTo(this._map),this._userLocationDotMarker.setLngLat(X).addTo(this._map),this._accuracy=V.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},j.prototype._updateCircleRadius=function(){var V=this._map._container.clientHeight/2,X=this._map.unproject([0,V]),se=this._map.unproject([1,V]),he=X.distanceTo(se),ve=Math.ceil(2*this._accuracy/he);this._circleElement.style.width=ve+"px",this._circleElement.style.height=ve+"px"},j.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},j.prototype._onError=function(V){if(this._map){if(this.options.trackUserLocation)if(V.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 X=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=X,this._geolocateButton.setAttribute("aria-label",X),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(V.code===3&&yu)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",V)),this._finish()}},j.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},j.prototype._setupUI=function(V){var X=this;if(this._container.addEventListener("contextmenu",function(ve){return ve.preventDefault()}),this._geolocateButton=u.create("button","mapboxgl-ctrl-geolocate",this._container),u.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",V===!1){i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var se=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=se,this._geolocateButton.setAttribute("aria-label",se)}else{var he=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=he,this._geolocateButton.setAttribute("aria-label",he)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=u.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Lc(this._dotElement),this._circleElement=u.create("div","mapboxgl-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.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(ve){var be=ve.originalEvent&&ve.originalEvent.type==="resize";ve.geolocateSource||X._watchState!=="ACTIVE_LOCK"||be||(X._watchState="BACKGROUND",X._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),X._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),X.fire(new i.Event("trackuserlocationend")))})},j.prototype.trigger=function(){if(!this._setup)return i.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 i.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Pc--,yu=!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 i.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 i.Event("trackuserlocationstart"))}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")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var V;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Pc>1?(V={maximumAge:6e5,timeout:0},yu=!0):(V=this.options.positionOptions,yu=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,V)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},j.prototype._clearWatch=function(){i.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)},j}(i.Evented),Ap={maxWidth:100,unit:"metric"},$u=function(I){this.options=i.extend({},Ap,I),i.bindAll(["_onMove","setUnit"],this)};function od(I,j,V){var X=V&&V.maxWidth||100,se=I._container.clientHeight/2,he=I.unproject([0,se]),ve=I.unproject([X,se]),be=he.distanceTo(ve);if(V&&V.unit==="imperial"){var Se=3.2808*be;Se>5280?Dc(j,X,Se/5280,I._getUIString("ScaleControl.Miles")):Dc(j,X,Se,I._getUIString("ScaleControl.Feet"))}else V&&V.unit==="nautical"?Dc(j,X,be/1852,I._getUIString("ScaleControl.NauticalMiles")):be>=1e3?Dc(j,X,be/1e3,I._getUIString("ScaleControl.Kilometers")):Dc(j,X,be,I._getUIString("ScaleControl.Meters"))}function Dc(I,j,V,X){var se,he,ve,be=(se=V,he=Math.pow(10,(""+Math.floor(se)).length-1),ve=(ve=se/he)>=10?10:ve>=5?5:ve>=3?3:ve>=2?2:ve>=1?1:function(Ue){var Xe=Math.pow(10,Math.ceil(-Math.log(Ue)/Math.LN10));return Math.round(Ue*Xe)/Xe}(ve),he*ve),Se=be/V;I.style.width=j*Se+"px",I.innerHTML=be+" "+X}$u.prototype.getDefaultPosition=function(){return"bottom-left"},$u.prototype._onMove=function(){od(this._map,this._container,this.options)},$u.prototype.onAdd=function(I){return this._map=I,this._container=u.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",I.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},$u.prototype.onRemove=function(){u.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},$u.prototype.setUnit=function(I){this.options.unit=I,od(this._map,this._container,this.options)};var rs=function(I){this._fullscreen=!1,I&&I.container&&(I.container instanceof i.window.HTMLElement?this._container=I.container:i.warnOnce("Full screen control 'container' must be a DOM element.")),i.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in i.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in i.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in i.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in i.window.document&&(this._fullscreenchange="MSFullscreenChange")};rs.prototype.onAdd=function(I){return this._map=I,this._container||(this._container=this._map.getContainer()),this._controlContainer=u.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",i.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},rs.prototype.onRemove=function(){u.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},rs.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},rs.prototype._setupUI=function(){var I=this._fullscreenButton=u.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);u.create("span","mapboxgl-ctrl-icon",I).setAttribute("aria-hidden",!0),I.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},rs.prototype._updateTitle=function(){var I=this._getTitle();this._fullscreenButton.setAttribute("aria-label",I),this._fullscreenButton.title=I},rs.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},rs.prototype._isFullscreen=function(){return this._fullscreen},rs.prototype._changeIcon=function(){(i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.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())},rs.prototype._onClickFullscreen=function(){this._isFullscreen()?i.window.document.exitFullscreen?i.window.document.exitFullscreen():i.window.document.mozCancelFullScreen?i.window.document.mozCancelFullScreen():i.window.document.msExitFullscreen?i.window.document.msExitFullscreen():i.window.document.webkitCancelFullScreen&&i.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 Mp={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Sp=function(I){function j(V){I.call(this),this.options=i.extend(Object.create(Mp),V),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return I&&(j.__proto__=I),j.prototype=Object.create(I&&I.prototype),j.prototype.constructor=j,j.prototype.addTo=function(V){return this._map&&this.remove(),this._map=V,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._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 i.Event("open")),this},j.prototype.isOpen=function(){return!!this._map},j.prototype.remove=function(){return this._content&&u.remove(this._content),this._container&&(u.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 i.Event("close")),this},j.prototype.getLngLat=function(){return this._lngLat},j.prototype.setLngLat=function(V){return this._lngLat=i.LngLat.convert(V),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},j.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},j.prototype.getElement=function(){return this._container},j.prototype.setText=function(V){return this.setDOMContent(i.window.document.createTextNode(V))},j.prototype.setHTML=function(V){var X,se=i.window.document.createDocumentFragment(),he=i.window.document.createElement("body");for(he.innerHTML=V;X=he.firstChild;)se.appendChild(X);return this.setDOMContent(se)},j.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},j.prototype.setMaxWidth=function(V){return this.options.maxWidth=V,this._update(),this},j.prototype.setDOMContent=function(V){return this._createContent(),this._content.appendChild(V),this._update(),this},j.prototype.addClassName=function(V){this._container&&this._container.classList.add(V)},j.prototype.removeClassName=function(V){this._container&&this._container.classList.remove(V)},j.prototype.toggleClassName=function(V){if(this._container)return this._container.classList.toggle(V)},j.prototype._createContent=function(){this._content&&u.remove(this._content),this._content=u.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=u.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))},j.prototype._onMouseUp=function(V){this._update(V.point)},j.prototype._onMouseMove=function(V){this._update(V.point)},j.prototype._onDrag=function(V){this._update(V.point)},j.prototype._update=function(V){var X=this,se=this._lngLat||this._trackPointer;if(this._map&&se&&this._content&&(this._container||(this._container=u.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=u.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(xt){return X._container.classList.add(xt)}),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=qu(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||V)){var he=this._pos=this._trackPointer&&V?V:this._map.project(this._lngLat),ve=this.options.anchor,be=function xt(Lt){if(Lt){if(typeof Lt=="number"){var _t=Math.round(Math.sqrt(.5*Math.pow(Lt,2)));return{center:new i.Point(0,0),top:new i.Point(0,Lt),"top-left":new i.Point(_t,_t),"top-right":new i.Point(-_t,_t),bottom:new i.Point(0,-Lt),"bottom-left":new i.Point(_t,-_t),"bottom-right":new i.Point(-_t,-_t),left:new i.Point(Lt,0),right:new i.Point(-Lt,0)}}if(Lt instanceof i.Point||Array.isArray(Lt)){var Mt=i.Point.convert(Lt);return{center:Mt,top:Mt,"top-left":Mt,"top-right":Mt,bottom:Mt,"bottom-left":Mt,"bottom-right":Mt,left:Mt,right:Mt}}return{center:i.Point.convert(Lt.center||[0,0]),top:i.Point.convert(Lt.top||[0,0]),"top-left":i.Point.convert(Lt["top-left"]||[0,0]),"top-right":i.Point.convert(Lt["top-right"]||[0,0]),bottom:i.Point.convert(Lt.bottom||[0,0]),"bottom-left":i.Point.convert(Lt["bottom-left"]||[0,0]),"bottom-right":i.Point.convert(Lt["bottom-right"]||[0,0]),left:i.Point.convert(Lt.left||[0,0]),right:i.Point.convert(Lt.right||[0,0])}}return xt(new i.Point(0,0))}(this.options.offset);if(!ve){var Se,Ue=this._container.offsetWidth,Xe=this._container.offsetHeight;Se=he.y+be.bottom.ythis._map.transform.height-Xe?["bottom"]:[],he.xthis._map.transform.width-Ue/2&&Se.push("right"),ve=Se.length===0?"bottom":Se.join("-")}var it=he.add(be[ve]).round();u.setTransform(this._container,vu[ve]+" translate("+it.x+"px,"+it.y+"px)"),yo(this._container,ve,"popup")}},j.prototype._onClose=function(){this.remove()},j}(i.Evented),ce={version:i.version,supported:s,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:ml,NavigationControl:ka,GeolocateControl:ad,AttributionControl:So,ScaleControl:$u,FullscreenControl:rs,Popup:Sp,Marker:Lc,Style:kr,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:function(){tt().acquire(kt)},clearPrewarmedResources:function(){var I=Vt;I&&(I.isPreloaded()&&I.numActive()===1?(I.release(kt),Vt=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()"))},get accessToken(){return i.config.ACCESS_TOKEN},set accessToken(I){i.config.ACCESS_TOKEN=I},get baseApiUrl(){return i.config.API_URL},set baseApiUrl(I){i.config.API_URL=I},get workerCount(){return wt.workerCount},set workerCount(I){wt.workerCount=I},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(I){i.config.MAX_PARALLEL_IMAGE_REQUESTS=I},clearStorage:function(I){i.clearTileCache(I)},workerUrl:""};return ce}),l})},{}],240:[function(e,o,f){o.exports=Math.log2||function(r){return Math.log(r)*Math.LOG2E}},{}],241:[function(e,o,f){o.exports=function(a,l){l||(l=a,a=window);var c=0,i=0,s=0,u={shift:!1,alt:!1,control:!1,meta:!1},d=!1;function h(T){var _=!1;return"altKey"in T&&(_=_||T.altKey!==u.alt,u.alt=!!T.altKey),"shiftKey"in T&&(_=_||T.shiftKey!==u.shift,u.shift=!!T.shiftKey),"ctrlKey"in T&&(_=_||T.ctrlKey!==u.control,u.control=!!T.ctrlKey),"metaKey"in T&&(_=_||T.metaKey!==u.meta,u.meta=!!T.metaKey),_}function m(T,_){var S=r.x(_),A=r.y(_);"buttons"in _&&(T=0|_.buttons),(T!==c||S!==i||A!==s||h(_))&&(c=0|T,i=S||0,s=A||0,l&&l(c,i,s,u))}function g(T){m(0,T)}function p(){(c||i||s||u.shift||u.alt||u.meta||u.control)&&(i=s=0,c=0,u.shift=u.alt=u.control=u.meta=!1,l&&l(0,0,0,u))}function v(T){h(T)&&l&&l(c,i,s,u)}function y(T){r.buttons(T)===0?m(0,T):m(c,T)}function x(T){m(c|r.buttons(T),T)}function w(T){m(c&~r.buttons(T),T)}function k(){d||(d=!0,a.addEventListener("mousemove",y),a.addEventListener("mousedown",x),a.addEventListener("mouseup",w),a.addEventListener("mouseleave",g),a.addEventListener("mouseenter",g),a.addEventListener("mouseout",g),a.addEventListener("mouseover",g),a.addEventListener("blur",p),a.addEventListener("keyup",v),a.addEventListener("keydown",v),a.addEventListener("keypress",v),a!==window&&(window.addEventListener("blur",p),window.addEventListener("keyup",v),window.addEventListener("keydown",v),window.addEventListener("keypress",v)))}k();var b={element:a};return Object.defineProperties(b,{enabled:{get:function(){return d},set:function(T){T?k():function(){!d||(d=!1,a.removeEventListener("mousemove",y),a.removeEventListener("mousedown",x),a.removeEventListener("mouseup",w),a.removeEventListener("mouseleave",g),a.removeEventListener("mouseenter",g),a.removeEventListener("mouseout",g),a.removeEventListener("mouseover",g),a.removeEventListener("blur",p),a.removeEventListener("keyup",v),a.removeEventListener("keydown",v),a.removeEventListener("keypress",v),a!==window&&(window.removeEventListener("blur",p),window.removeEventListener("keyup",v),window.removeEventListener("keydown",v),window.removeEventListener("keypress",v)))}()},enumerable:!0},buttons:{get:function(){return c},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return s},enumerable:!0},mods:{get:function(){return u},enumerable:!0}}),b};var r=e("mouse-event")},{"mouse-event":243}],242:[function(e,o,f){var r={left:0,top:0};o.exports=function(a,l,c){l=l||a.currentTarget||a.srcElement,Array.isArray(c)||(c=[0,0]);var i=a.clientX||0,s=a.clientY||0,u=(d=l,d===window||d===document||d===document.body?r:d.getBoundingClientRect()),d;return c[0]=i-u.left,c[1]=s-u.top,c}},{}],243:[function(e,o,f){function r(a){return a.target||a.srcElement||window}f.buttons=function(a){if(typeof a=="object"){if("buttons"in a)return a.buttons;if("which"in a){if((l=a.which)===2)return 4;if(l===3)return 2;if(l>0)return 1<=0)return 1<0&&d(m,S))}catch(A){v.call(new x(S),A)}}}function v(T){var _=this;_.triggered||(_.triggered=!0,_.def&&(_=_.def),_.msg=T,_.state=2,_.chain.length>0&&d(m,_))}function y(T,_,S,A){for(var M=0;M<_.length;M++)(function(E){T.resolve(_[E]).then(function(D){S(E,D)},A)})(M)}function x(T){this.def=T,this.triggered=!1}function w(T){this.promise=T,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function k(T){if(typeof T!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var _=new w(this);this.then=function(S,A){var M={success:typeof S!="function"||S,failure:typeof A=="function"&&A};return M.promise=new this.constructor(function(E,D){if(typeof E!="function"||typeof D!="function")throw TypeError("Not a function");M.resolve=E,M.reject=D}),_.chain.push(M),_.state!==0&&d(m,_),M.promise},this.catch=function(S){return this.then(void 0,S)};try{T.call(void 0,function(S){p.call(_,S)},function(S){v.call(_,S)})}catch(S){v.call(_,S)}}i=function(){var T,_,S;function A(M,E){this.fn=M,this.self=E,this.next=void 0}return{add:function(M,E){S=new A(M,E),_?_.next=S:T=S,_=S,S=void 0},drain:function(){var M=T;for(T=_=c=void 0;M;)M.fn.call(M.self),M=M.next}}}();var b=l({},"constructor",k,!1);return k.prototype=b,l(b,"__NPO__",0,!1),l(k,"resolve",function(T){return T&&typeof T=="object"&&T.__NPO__===1?T:new this(function(_,S){if(typeof _!="function"||typeof S!="function")throw TypeError("Not a function");_(T)})}),l(k,"reject",function(T){return new this(function(_,S){if(typeof _!="function"||typeof S!="function")throw TypeError("Not a function");S(T)})}),l(k,"all",function(T){var _=this;return s.call(T)!="[object Array]"?_.reject(TypeError("Not an array")):T.length===0?_.resolve([]):new _(function(S,A){if(typeof S!="function"||typeof A!="function")throw TypeError("Not a function");var M=T.length,E=Array(M),D=0;y(_,T,function(O,R){E[O]=R,++D===M&&S(E)},A)})}),l(k,"race",function(T){var _=this;return s.call(T)!="[object Array]"?_.reject(TypeError("Not an array")):new _(function(S,A){if(typeof S!="function"||typeof A!="function")throw TypeError("Not a function");y(_,T,function(M,E){S(E)},A)})}),k})}).call(this)}).call(this,typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{timers:311}],246:[function(e,o,f){var r=Math.PI,a=u(120);function l(d,h,m,g){return["C",d,h,m,g,m,g]}function c(d,h,m,g,p,v){return["C",d/3+2/3*m,h/3+2/3*g,p/3+2/3*m,v/3+2/3*g,p,v]}function i(d,h,m,g,p,v,y,x,w,k){if(k)R=k[0],z=k[1],D=k[2],O=k[3];else{var b=s(d,h,-p);d=b.x,h=b.y;var T=(d-(x=(b=s(x,w,-p)).x))/2,_=(h-(w=b.y))/2,S=T*T/(m*m)+_*_/(g*g);S>1&&(m*=S=Math.sqrt(S),g*=S);var A=m*m,M=g*g,E=(v==y?-1:1)*Math.sqrt(Math.abs((A*M-A*_*_-M*T*T)/(A*_*_+M*T*T)));E==1/0&&(E=1);var D=E*m*_/g+(d+x)/2,O=E*-g*T/m+(h+w)/2,R=Math.asin(((h-O)/g).toFixed(9)),z=Math.asin(((w-O)/g).toFixed(9));(R=dz&&(R-=2*r),!y&&z>R&&(z-=2*r)}if(Math.abs(z-R)>a){var L=z,P=x,N=w;z=R+a*(y&&z>R?1:-1);var B=i(x=D+m*Math.cos(z),w=O+g*Math.sin(z),m,g,p,0,y,P,N,[z,L,D,O])}var G=Math.tan((z-R)/4),W=4/3*m*G,K=4/3*g*G,te=[2*d-(d+W*Math.sin(R)),2*h-(h-K*Math.cos(R)),x+W*Math.sin(z),w-K*Math.cos(z),x,w];if(k)return te;B&&(te=te.concat(B));for(var Y=0;Y7&&(m.push(S.splice(0,7)),S.unshift("C"));break;case"S":var M=k,E=b;h!="C"&&h!="S"||(M+=M-g,E+=E-p),S=["C",M,E,S[1],S[2],S[3],S[4]];break;case"T":h=="Q"||h=="T"?(x=2*k-x,w=2*b-w):(x=k,w=b),S=c(k,b,x,w,S[1],S[2]);break;case"Q":x=S[1],w=S[2],S=c(k,b,S[1],S[2],S[3],S[4]);break;case"L":S=l(k,b,S[1],S[2]);break;case"H":S=l(k,b,S[1],b);break;case"V":S=l(k,b,k,S[1]);break;case"Z":S=l(k,b,v,y)}h=A,k=S[S.length-2],b=S[S.length-1],S.length>4?(g=S[S.length-4],p=S[S.length-3]):(g=k,p=b),m.push(S)}return m}},{}],247:[function(e,o,f){var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;function c(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}o.exports=function(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},u=0;u<10;u++)s["_"+String.fromCharCode(u)]=u;if(Object.getOwnPropertyNames(s).map(function(h){return s[h]}).join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(h){d[h]=h}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}()?Object.assign:function(i,s){for(var u,d,h=c(i),m=1;m1e4)throw Error("References have circular dependency. Please, check them.");s[w]=x}),v=v.reverse(),s=s.map(function(x){return v.forEach(function(w){x=x.replace(new RegExp("(\\"+d+w+"\\"+d+")","g"),g[0]+"$1"+g[1])}),x})});var m=new RegExp("\\"+d+"([0-9]+)\\"+d);return h?s:function g(p,v,y){for(var x,w=[],k=0;x=m.exec(p);){if(k++>1e4)throw Error("Circular references in parenthesis");w.push(p.slice(0,x.index)),w.push(g(v[x[1]],v)),p=p.slice(x.index+x[0].length)}return w.push(p),w}(s[0],s)}function a(c,i){if(i&&i.flat){var s,u=i&&i.escape||"___",d=c[0];if(!d)return"";for(var h=new RegExp("\\"+u+"([0-9]+)\\"+u),m=0;d!=s;){if(m++>1e4)throw Error("Circular references in "+c);s=d,d=d.replace(h,g)}return d}return c.reduce(function p(v,y){return Array.isArray(y)&&(y=y.reduce(p,"")),v+y},"");function g(p,v){if(c[v]==null)throw Error("Reference "+v+"is undefined");return c[v]}}function l(c,i){return Array.isArray(c)?a(c,i):r(c,i)}l.parse=r,l.stringify=a,o.exports=l},{}],249:[function(e,o,f){var r=e("pick-by-alias");o.exports=function(a){var l;return arguments.length>1&&(a=arguments),typeof a=="string"?a=a.split(/\s/).map(parseFloat):typeof a=="number"&&(a=[a]),a.length&&typeof a[0]=="number"?l=a.length===1?{width:a[0],height:a[0],x:0,y:0}:a.length===2?{width:a[0],height:a[1],x:0,y:0}:{x:a[0],y:a[1],width:a[2]-a[0]||0,height:a[3]-a[1]||0}:a&&(a=r(a,{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"}),l={x:a.left||0,y:a.top||0},a.width==null?a.right?l.width=a.right-l.x:l.width=0:l.width=a.width,a.height==null?a.bottom?l.height=a.bottom-l.y:l.height=0:l.height=a.height),l}},{"pick-by-alias":253}],250:[function(e,o,f){o.exports=function(c){var i=[];return c.replace(a,function(s,u,d){var h=u.toLowerCase();for(d=function(m){var g=m.match(l);return g?g.map(Number):[]}(d),h=="m"&&d.length>2&&(i.push([u].concat(d.splice(0,2))),h="l",u=u=="m"?"l":"L");;){if(d.length==r[h])return d.unshift(u),i.push(d);if(d.length=-r},pointBetween:function(l,c,i){var s=l[1]-c[1],u=i[0]-c[0],d=l[0]-c[0],h=i[1]-c[1],m=d*u+s*h;return!(m-r)},pointsSameX:function(l,c){return Math.abs(l[0]-c[0])r!=d-s>r&&(u-g)*(s-p)/(d-p)+g-i>r&&(h=!h),u=g,d=p}return h}};return a}},{}],257:[function(e,o,f){var r={toPolygon:function(a,l){function c(u){if(u.length<=0)return a.segments({inverted:!1,regions:[]});function d(g){var p=g.slice(0,g.length-1);return a.segments({inverted:!1,regions:[p]})}for(var h=d(u[0]),m=1;m0})}function x(O,R){var z=O.seg,L=R.seg,P=z.start,N=z.end,B=L.start,G=L.end;c&&c.checkIntersection(z,L);var W=l.linesIntersect(P,N,B,G);if(W===!1){if(!l.pointsCollinear(P,N,B)||l.pointsSame(P,G)||l.pointsSame(N,B))return!1;var K=l.pointsSame(P,B),te=l.pointsSame(N,G);if(K&&te)return R;var Y=!K&&l.pointBetween(P,B,G),Z=!te&&l.pointBetween(N,B,G);if(K)return Z?h(R,N):h(O,G),R;Y&&(te||(Z?h(R,N):h(O,G)),h(R,P))}else W.alongA===0&&(W.alongB===-1?h(O,B):W.alongB===0?h(O,W.pt):W.alongB===1&&h(O,G)),W.alongB===0&&(W.alongA===-1?h(R,P):W.alongA===0?h(R,W.pt):W.alongA===1&&h(R,N));return!1}for(var w=[];!s.isEmpty();){var k=s.getHead();if(c&&c.vert(k.pt[0]),k.isStart){let O=function(){if(T){var R=x(k,T);if(R)return R}return!!_&&x(k,_)};c&&c.segmentNew(k.seg,k.primary);var b=y(k),T=b.before?b.before.ev:null,_=b.after?b.after.ev:null;c&&c.tempStatus(k.seg,!!T&&T.seg,!!_&&_.seg);var S,A=O();if(A){var M;a?(M=k.seg.myFill.below===null||k.seg.myFill.above!==k.seg.myFill.below)&&(A.seg.myFill.above=!A.seg.myFill.above):A.seg.otherFill=k.seg.myFill,c&&c.segmentUpdate(A.seg),k.other.remove(),k.remove()}if(s.getHead()!==k){c&&c.rewind(k.seg);continue}a?(M=k.seg.myFill.below===null||k.seg.myFill.above!==k.seg.myFill.below,k.seg.myFill.below=_?_.seg.myFill.above:g,k.seg.myFill.above=M?!k.seg.myFill.below:k.seg.myFill.below):k.seg.otherFill===null&&(S=_?k.primary===_.primary?_.seg.otherFill.above:_.seg.myFill.above:k.primary?p:g,k.seg.otherFill={above:S,below:S}),c&&c.status(k.seg,!!T&&T.seg,!!_&&_.seg),k.other.status=b.insert(r.node({ev:k}))}else{var E=k.status;if(E===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(v.exists(E.prev)&&v.exists(E.next)&&x(E.prev.ev,E.next.ev),c&&c.statusRemove(E.ev.seg),E.remove(),!k.primary){var D=k.seg.myFill;k.seg.myFill=k.seg.otherFill,k.seg.otherFill=D}w.push(k.seg)}s.getHead().remove()}return c&&c.done(),w}return a?{addRegion:function(g){for(var p,v,y,x=g[g.length-1],w=0;w0&&!this.aborted;){var s=this.ifds_to_read.shift();s.offset&&this.scan_ifd(s.id,s.offset,c)}},l.prototype.read_uint16=function(c){var i=this.input;if(c+2>i.length)throw r("unexpected EOF","EBADDATA");return this.big_endian?256*i[c]+i[c+1]:i[c]+256*i[c+1]},l.prototype.read_uint32=function(c){var i=this.input;if(c+4>i.length)throw r("unexpected EOF","EBADDATA");return this.big_endian?16777216*i[c]+65536*i[c+1]+256*i[c+2]+i[c+3]:i[c]+256*i[c+1]+65536*i[c+2]+16777216*i[c+3]},l.prototype.is_subifd_link=function(c,i){return c===0&&i===34665||c===0&&i===34853||c===34665&&i===40965},l.prototype.exif_format_length=function(c){switch(c){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}},l.prototype.exif_format_read=function(c,i){var s;switch(c){case 1:case 2:return s=this.input[i];case 6:return(s=this.input[i])|33554430*(128&s);case 3:return s=this.read_uint16(i);case 8:return(s=this.read_uint16(i))|131070*(32768&s);case 4:return s=this.read_uint32(i);case 9:return 0|(s=this.read_uint32(i));case 5:case 10:case 11:case 12:case 7:default:return null}},l.prototype.scan_ifd=function(c,i,s){var u=this.read_uint16(i);i+=2;for(var d=0;dthis.input.length)throw r("unexpected EOF","EBADDATA");for(var w=[],k=y,b=0;b0&&(this.ifds_to_read.push({id:h,offset:w[0]}),x=!0),s({is_big_endian:this.big_endian,ifd:c,tag:h,format:m,count:g,entry_offset:i+this.start,data_length:v,data_offset:y+this.start,value:w,is_subifd_link:x})===!1)return void(this.aborted=!0);i+=12}c===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(i)})},o.exports.ExifParser=l,o.exports.get_orientation=function(c){var i=0;try{return new l(c,0,c.length).each(function(s){if(s.ifd===0&&s.tag===274&&Array.isArray(s.value))return i=s.value[0],!1}),i}catch{return-1}}},{}],264:[function(e,o,f){var r=e("./common").readUInt16BE,a=e("./common").readUInt32BE;function l(h,m){if(h.length<4+m)return null;var g=a(h,m);return h.length>4&15,p=15&h[4],v=h[5]>>4&15,y=r(h,6),x=8,w=0;wb.width||k.width===b.width&&k.height>b.height?k:b}),v=g.reduce(function(k,b){return k.height>b.height||k.height===b.height&&k.width>b.width?k:b}),p.width>v.height||p.width===v.height&&p.height>v.width?p:v),x=1;m.transforms.forEach(function(k){var b={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},T={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(k.type==="imir"&&(x=k.value===0?T[x]:b[x=b[x=T[x]]]),k.type==="irot")for(var _=0;_1&&(y.variants=v.variants),v.orientation&&(y.orientation=v.orientation),v.exif_location&&v.exif_location.offset+v.exif_location.length<=u.length){var x=l(u,v.exif_location.offset),w=u.slice(v.exif_location.offset+x+4,v.exif_location.offset+v.exif_location.length),k=i.get_orientation(w);k>0&&(y.orientation=k)}return y}}}}}}},{"../common":262,"../exif_utils":263,"../miaf_utils":264}],266:[function(e,o,f){var r=e("../common").str2arr,a=e("../common").sliceEq,l=e("../common").readUInt16LE,c=r("BM");o.exports=function(i){if(!(i.length<26)&&a(i,0,c))return{width:l(i,18),height:l(i,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},{"../common":262}],267:[function(e,o,f){var r=e("../common").str2arr,a=e("../common").sliceEq,l=e("../common").readUInt16LE,c=r("GIF87a"),i=r("GIF89a");o.exports=function(s){if(!(s.length<10)&&(a(s,0,c)||a(s,0,i)))return{width:l(s,6),height:l(s,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},{"../common":262}],268:[function(e,o,f){var r=e("../common").readUInt16LE;o.exports=function(a){var l=r(a,0),c=r(a,2),i=r(a,4);if(l===0&&c===1&&i){for(var s=[],u={width:0,height:0},d=0;du.width||m>u.height)&&(u=g)}return{width:u.width,height:u.height,variants:s,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},{"../common":262}],269:[function(e,o,f){var r=e("../common").readUInt16BE,a=e("../common").str2arr,l=e("../common").sliceEq,c=e("../exif_utils"),i=a("Exif\0\0");o.exports=function(s){if(!(s.length<2)&&s[0]===255&&s[1]===216&&s[2]===255)for(var u=2;;){for(;;){if(s.length-u<2)return;if(s[u++]===255)break}for(var d,h,m=s[u++];m===255;)m=s[u++];if(208<=m&&m<=217||m===1)d=0;else{if(!(192<=m&&m<=254)||s.length-u<2)return;d=r(s,u)-2,u+=2}if(m===217||m===218)return;if(m===225&&d>=10&&l(s,u,i)&&(h=c.get_orientation(s.slice(u+6,u+d))),d>=5&&192<=m&&m<=207&&m!==196&&m!==200&&m!==204){if(s.length-u0&&(g.orientation=h),g}u+=d}}},{"../common":262,"../exif_utils":263}],270:[function(e,o,f){var r=e("../common").str2arr,a=e("../common").sliceEq,l=e("../common").readUInt32BE,c=r(`\x89PNG\r + +`),i=r("IHDR");o.exports=function(s){if(!(s.length<24)&&a(s,0,c)&&a(s,12,i))return{width:l(s,16),height:l(s,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},{"../common":262}],271:[function(e,o,f){var r=e("../common").str2arr,a=e("../common").sliceEq,l=e("../common").readUInt32BE,c=r("8BPS\0");o.exports=function(i){if(!(i.length<22)&&a(i,0,c))return{width:l(i,18),height:l(i,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},{"../common":262}],272:[function(e,o,f){function r(h){return typeof h=="number"&&isFinite(h)&&h>0}var a=/<[-_.:a-zA-Z0-9][^>]*>/,l=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,c=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,i=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,s=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,u=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function d(h){return u.test(h)?h.match(u)[0]:"px"}o.exports=function(h){if(function(S){var A,M=0,E=S.length;for(S[0]===239&&S[1]===187&&S[2]===191&&(M=3);M>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function m(g,p){return{width:1+(g[p+6]<<16|g[p+5]<<8|g[p+4]),height:1+(g[p+9]<g.length)){for(;p+8=10?v=v||d(g,p+8):w==="VP8L"&&k>=9?v=v||h(g,p+8):w==="VP8X"&&k>=10?v=v||m(g,p+8):w==="EXIF"&&(y=i.get_orientation(g.slice(p+8,p+8+k)),p=1/0),p+=8+k}else p++;if(v)return y>0&&(v.orientation=y),v}}}},{"../common":262,"../exif_utils":263}],275:[function(e,o,f){o.exports={avif:e("./parse_sync/avif"),bmp:e("./parse_sync/bmp"),gif:e("./parse_sync/gif"),ico:e("./parse_sync/ico"),jpeg:e("./parse_sync/jpeg"),png:e("./parse_sync/png"),psd:e("./parse_sync/psd"),svg:e("./parse_sync/svg"),tiff:e("./parse_sync/tiff"),webp:e("./parse_sync/webp")}},{"./parse_sync/avif":265,"./parse_sync/bmp":266,"./parse_sync/gif":267,"./parse_sync/ico":268,"./parse_sync/jpeg":269,"./parse_sync/png":270,"./parse_sync/psd":271,"./parse_sync/svg":272,"./parse_sync/tiff":273,"./parse_sync/webp":274}],276:[function(e,o,f){var r=e("./lib/parsers_sync");o.exports=function(a){return function(l){for(var c=Object.keys(r),i=0;i1)for(var k=1;k"u"?r:window,c=["moz","webkit"],i="AnimationFrame",s=l["request"+i],u=l["cancel"+i]||l["cancelRequest"+i],d=0;!s&&d1&&(R.scaleRatio=[R.scale[0]*R.viewport.width,R.scale[1]*R.viewport.height],v(R),R.after&&R.after(R))}function D(R){if(R){R.length!=null?typeof R[0]=="number"&&(R=[{positions:R}]):Array.isArray(R)||(R=[R]);var z=0,L=0;if(A.groups=S=R.map(function(te,Y){var Z=S[Y];return te&&(typeof te=="function"?te={after:te}:typeof te[0]=="number"&&(te={positions:te}),te=c(te,{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"}),Z||(S[Y]=Z={id:Y,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},te=i({},_,te)),l(Z,te,[{lineWidth:function(re){return .5*+re},capSize:function(re){return .5*+re},opacity:parseFloat,errors:function(re){return re=s(re),L+=re.length,re},positions:function(re,U){return re=s(re,"float64"),U.count=Math.floor(re.length/2),U.bounds=r(re,2),U.offset=z,z+=U.count,re}},{color:function(re,U){var q=U.count;if(re||(re="transparent"),!Array.isArray(re)||typeof re[0]=="number"){var $=re;re=Array(q);for(var ne=0;ne 0. && baClipping < length(normalWidth * endBotJoin)) { + //handle miter clipping + bTopCoord -= normalWidth * endTopJoin; + bTopCoord += normalize(endTopJoin * normalWidth) * baClipping; + } + + if (nextReverse) { + //make join rectangular + vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5; + float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.); + bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; + bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; + } + else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) { + //handle miter clipping + aBotCoord -= normalWidth * startBotJoin; + aBotCoord += normalize(startBotJoin * normalWidth) * abClipping; + } + + vec2 aTopPosition = (aTopCoord) * adjustedScale + translate; + vec2 aBotPosition = (aBotCoord) * adjustedScale + translate; + + vec2 bTopPosition = (bTopCoord) * adjustedScale + translate; + vec2 bBotPosition = (bBotCoord) * adjustedScale + translate; + + //position is normalized 0..1 coord on the screen + vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd; + + startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy; + endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy; + + gl_Position = vec4(position * 2.0 - 1.0, depth, 1); + + enableStartMiter = step(dot(currTangent, prevTangent), .5); + enableEndMiter = step(dot(currTangent, nextTangent), .5); + + //bevel miter cutoffs + if (miterMode == 1.) { + if (enableStartMiter == 1.) { + vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5; + startCutoff = vec4(aCoord, aCoord); + startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; + startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + startCutoff += viewport.xyxy; + startCutoff += startMiterWidth.xyxy; + } + + if (enableEndMiter == 1.) { + vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5; + endCutoff = vec4(bCoord, bCoord); + endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; + endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + endCutoff += viewport.xyxy; + endCutoff += endMiterWidth.xyxy; + } + } + + //round miter cutoffs + else if (miterMode == 2.) { + if (enableStartMiter == 1.) { + vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5; + startCutoff = vec4(aCoord, aCoord); + startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; + startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + startCutoff += viewport.xyxy; + startCutoff += startMiterWidth.xyxy; + } + + if (enableEndMiter == 1.) { + vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5; + endCutoff = vec4(bCoord, bCoord); + endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; + endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + endCutoff += viewport.xyxy; + endCutoff += endMiterWidth.xyxy; + } + } +} +`]),frag:c([`precision highp float; +#define GLSLIFY 1 + +uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode; +uniform sampler2D dashTexture; + +varying vec4 fragColor; +varying vec2 tangent; +varying vec4 startCutoff, endCutoff; +varying vec2 startCoord, endCoord; +varying float enableStartMiter, enableEndMiter; + +float distToLine(vec2 p, vec2 a, vec2 b) { + vec2 diff = b - a; + vec2 perp = normalize(vec2(-diff.y, diff.x)); + return dot(p - a, perp); +} + +void main() { + float alpha = 1., distToStart, distToEnd; + float cutoff = thickness * .5; + + //bevel miter + if (miterMode == 1.) { + if (enableStartMiter == 1.) { + distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); + if (distToStart < -1.) { + discard; + return; + } + alpha *= min(max(distToStart + 1., 0.), 1.); + } + + if (enableEndMiter == 1.) { + distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); + if (distToEnd < -1.) { + discard; + return; + } + alpha *= min(max(distToEnd + 1., 0.), 1.); + } + } + + // round miter + else if (miterMode == 2.) { + if (enableStartMiter == 1.) { + distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); + if (distToStart < 0.) { + float radius = length(gl_FragCoord.xy - startCoord); + + if(radius > cutoff + .5) { + discard; + return; + } + + alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); + } + } + + if (enableEndMiter == 1.) { + distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); + if (distToEnd < 0.) { + float radius = length(gl_FragCoord.xy - endCoord); + + if(radius > cutoff + .5) { + discard; + return; + } + + alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); + } + } + } + + float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; + float dash = texture2D(dashTexture, vec2(t, .5)).r; + + gl_FragColor = fragColor; + gl_FragColor.a *= alpha * opacity * dash; +} +`]),attributes:{lineEnd:{buffer:b,divisor:0,stride:8,offset:0},lineTop:{buffer:b,divisor:0,stride:8,offset:4},aColor:{buffer:w.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:w.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:w.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},T))}catch{k=_}return{fill:w({primitive:"triangle",elements:function(S,A){return A.triangles},offset:0,vert:c([`precision highp float; +#define GLSLIFY 1 + +attribute vec2 position, positionFract; + +uniform vec4 color; +uniform vec2 scale, scaleFract, translate, translateFract; +uniform float pixelRatio, id; +uniform vec4 viewport; +uniform float opacity; + +varying vec4 fragColor; + +const float MAX_LINES = 256.; + +void main() { + float depth = (MAX_LINES - 4. - id) / (MAX_LINES); + + vec2 position = position * scale + translate + + positionFract * scale + translateFract + + position * scaleFract + + positionFract * scaleFract; + + gl_Position = vec4(position * 2.0 - 1.0, depth, 1); + + fragColor = color / 255.; + fragColor.a *= opacity; +} +`]),frag:c([`precision highp float; +#define GLSLIFY 1 + +varying vec4 fragColor; + +void main() { + gl_FragColor = fragColor; +} +`]),uniforms:{scale:w.prop("scale"),color:w.prop("fill"),scaleFract:w.prop("scaleFract"),translateFract:w.prop("translateFract"),translate:w.prop("translate"),opacity:w.prop("opacity"),pixelRatio:w.context("pixelRatio"),id:w.prop("id"),viewport:function(S,A){return[A.viewport.x,A.viewport.y,S.viewportWidth,S.viewportHeight]}},attributes:{position:{buffer:w.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:w.prop("positionFractBuffer"),stride:8,offset:8}},blend:T.blend,depth:{enable:!1},scissor:T.scissor,stencil:T.stencil,viewport:T.viewport}),rect:_,miter:k}},x.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},x.prototype.render=function(){for(var w,k=[],b=arguments.length;b--;)k[b]=arguments[b];k.length&&(w=this).update.apply(w,k),this.draw()},x.prototype.draw=function(){for(var w=this,k=[],b=arguments.length;b--;)k[b]=arguments[b];return(k.length?k:this.passes).forEach(function(T,_){var S;if(T&&Array.isArray(T))return(S=w).draw.apply(S,T);typeof T=="number"&&(T=w.passes[T]),T&&T.count>1&&T.opacity&&(w.regl._refresh(),T.fill&&T.triangles&&T.triangles.length>2&&w.shaders.fill(T),T.thickness&&(T.scale[0]*T.viewport.width>x.precisionThreshold||T.scale[1]*T.viewport.height>x.precisionThreshold||T.join==="rect"||!T.join&&(T.thickness<=2||T.count>=x.maxPoints)?w.shaders.rect(T):w.shaders.miter(T)))}),this},x.prototype.update=function(w){var k=this;if(w){w.length!=null?typeof w[0]=="number"&&(w=[{positions:w}]):Array.isArray(w)||(w=[w]);var b=this.regl,T=this.gl;if(w.forEach(function(E,D){var O=k.passes[D];if(E!==void 0)if(E!==null){if(typeof E[0]=="number"&&(E={positions:E}),E=i(E,{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"}),O||(k.passes[D]=O={id:D,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:b.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:b.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:b.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:b.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},E=l({},x.defaults,E)),E.thickness!=null&&(O.thickness=parseFloat(E.thickness)),E.opacity!=null&&(O.opacity=parseFloat(E.opacity)),E.miterLimit!=null&&(O.miterLimit=parseFloat(E.miterLimit)),E.overlay!=null&&(O.overlay=!!E.overlay,D=H});(q=q.slice(0,Q)).push(H)}for(var ee=function(Ot){var Wt=G.slice(2*ne,2*q[Ot]).concat(H?G.slice(2*H):[]),Jt=(O.hole||[]).map(function(Ge){return Ge-H+(q[Ot]-ne)}),Be=u(Wt,Jt);Be=Be.map(function(Ge){return Ge+ne+(Ge+ne_.length)&&(S=_.length);for(var A=0,M=new Array(S);A 1.0 + delta) { + discard; + } + + alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius); + + float borderRadius = fragBorderRadius; + float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius); + vec4 color = mix(fragColor, fragBorderColor, ratio); + color.a *= alpha * opacity; + gl_FragColor = color; +} +`]),z.vert=m([`precision highp float; +#define GLSLIFY 1 + +attribute float x, y, xFract, yFract; +attribute float size, borderSize; +attribute vec4 colorId, borderColorId; +attribute float isActive; + +uniform bool constPointSize; +uniform float pixelRatio; +uniform vec2 paletteSize, scale, scaleFract, translate, translateFract; +uniform sampler2D paletteTexture; + +const float maxSize = 100.; + +varying vec4 fragColor, fragBorderColor; +varying float fragBorderRadius, fragWidth; + +float pointSizeScale = (constPointSize) ? 2. : pixelRatio; + +bool isDirect = (paletteSize.x < 1.); + +vec4 getColor(vec4 id) { + return isDirect ? id / 255. : texture2D(paletteTexture, + vec2( + (id.x + .5) / paletteSize.x, + (id.y + .5) / paletteSize.y + ) + ); +} + +void main() { + // ignore inactive points + if (isActive == 0.) return; + + vec2 position = vec2(x, y); + vec2 positionFract = vec2(xFract, yFract); + + vec4 color = getColor(colorId); + vec4 borderColor = getColor(borderColorId); + + float size = size * maxSize / 255.; + float borderSize = borderSize * maxSize / 255.; + + gl_PointSize = (size + borderSize) * pointSizeScale; + + vec2 pos = (position + translate) * scale + + (positionFract + translateFract) * scale + + (position + translate) * scaleFract + + (positionFract + translateFract) * scaleFract; + + gl_Position = vec4(pos * 2. - 1., 0., 1.); + + fragBorderRadius = 1. - 2. * borderSize / (size + borderSize); + fragColor = color; + fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; + fragWidth = 1. / gl_PointSize; +} +`]),y&&(z.frag=z.frag.replace("smoothstep","smoothStep"),R.frag=R.frag.replace("smoothstep","smoothStep")),this.drawCircle=_(z)}b.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},b.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},b.prototype.draw=function(){for(var _=this,S=arguments.length,A=new Array(S),M=0;Mwe)?me.tree=d(fe,{bounds:Me}):we&&we.length&&(me.tree=we),me.tree){var ke={primitive:"points",usage:"static",data:me.tree,type:"uint32"};me.elements?me.elements(ke):me.elements=O.elements(ke)}var Ee=x.float32(fe);return Te({data:Ee,usage:"dynamic"}),Oe({data:x.fract32(fe,Ee),usage:"dynamic"}),de({data:new Uint8Array(ye),type:"uint8",usage:"stream"}),fe}},{marker:function(fe,me,_e){var we=me.activation;if(we.forEach(function(Ee){return Ee&&Ee.destroy&&Ee.destroy()}),we.length=0,fe&&typeof fe[0]!="number"){for(var Te=[],Oe=0,de=Math.min(fe.length,me.count);Oe=0)return D;if(_ instanceof Uint8Array||_ instanceof Uint8ClampedArray)S=_;else{S=new Uint8Array(_.length);for(var O=0,R=_.length;O4*M&&(this.tooManyColors=!0),this.updatePalette(A),E.length===1?E[0]:E},b.prototype.updatePalette=function(_){if(!this.tooManyColors){var S=this.maxColors,A=this.paletteTexture,M=Math.ceil(.25*_.length/S);if(M>1)for(var E=.25*(_=_.slice()).length%S;E2?(T[0],T[2],x=T[1],w=T[3]):T.length?(x=T[0],w=T[1]):(T.x,x=T.y,T.x+T.width,w=T.y+T.height),_.length>2?(k=_[0],b=_[2],_[1],_[3]):_.length?(k=_[0],b=_[1]):(k=_.x,_.y,b=_.x+_.width,_.y+_.height),[k,x,b,w]}function g(p){if(typeof p=="number")return[p,p,p,p];if(p.length===2)return[p[0],p[1],p[0],p[1]];var v=s(p);return[v.x,v.y,v.x+v.width,v.y+v.height]}o.exports=d,d.prototype.render=function(){for(var p,v=this,y=[],x=arguments.length;x--;)y[x]=arguments[x];return y.length&&(p=this).update.apply(p,y),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=c(function(){v.draw(),v.dirty=!0,v.planned=null})):(this.draw(),this.dirty=!0,c(function(){v.dirty=!1})),this)},d.prototype.update=function(){for(var p,v=[],y=arguments.length;y--;)v[y]=arguments[y];if(v.length){for(var x=0;xL))&&(k.lower||!(z"u"?1:window.devicePixelRatio,Ut=!1,tt={},bt=function(St){},zt=function(){};if(typeof ot=="string"?De=document.querySelector(ot):typeof ot=="object"&&(typeof ot.nodeName=="string"&&typeof ot.appendChild=="function"&&typeof ot.getBoundingClientRect=="function"?De=ot:typeof ot.drawArrays=="function"||typeof ot.drawElements=="function"?rt=(lt=ot).canvas:("gl"in ot?lt=ot.gl:"canvas"in ot?rt=c(ot.canvas):"container"in ot&&(He=c(ot.container)),"attributes"in ot&&(Ae=ot.attributes),"extensions"in ot&&(kt=l(ot.extensions)),"optionalExtensions"in ot&&(wt=l(ot.optionalExtensions)),"onDone"in ot&&(bt=ot.onDone),"profile"in ot&&(Ut=!!ot.profile),"pixelRatio"in ot&&(Vt=+ot.pixelRatio),"cachedCode"in ot&&(tt=ot.cachedCode))),De&&(De.nodeName.toLowerCase()==="canvas"?rt=De:He=De),!lt){if(!rt){if(!(De=function(St,Dt,Le){function Je(){var It=window.innerWidth,Zt=window.innerHeight;St!==document.body&&(It=(Zt=Et.getBoundingClientRect()).right-Zt.left,Zt=Zt.bottom-Zt.top),Et.width=Le*It,Et.height=Le*Zt}var st,Et=document.createElement("canvas");return H(Et.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),St.appendChild(Et),St===document.body&&(Et.style.position="absolute",H(St.style,{margin:0,padding:0})),St!==document.body&&typeof ResizeObserver=="function"?(st=new ResizeObserver(function(){setTimeout(Je)})).observe(St):window.addEventListener("resize",Je,!1),Je(),{canvas:Et,onDestroy:function(){st?st.disconnect():window.removeEventListener("resize",Je),St.removeChild(Et)}}}(He||document.body,0,Vt)))return null;rt=De.canvas,zt=De.onDestroy}Ae.premultipliedAlpha===void 0&&(Ae.premultipliedAlpha=!0),lt=function(St,Dt){function Le(Je){try{return St.getContext(Je,Dt)}catch{return null}}return Le("webgl")||Le("experimental-webgl")||Le("webgl-experimental")}(rt,Ae)}return lt?{gl:lt,canvas:rt,container:He,extensions:kt,optionalExtensions:wt,pixelRatio:Vt,profile:Ut,cachedCode:tt,onDone:bt,onDestroy:zt}:(zt(),bt("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function s(Ae,De){for(var He=Array(Ae),rt=0;rt>>=De))<<3,(De|=He=(15<(Ae>>>=He))<<2)|(He=(3<(Ae>>>=He))<<1)|Ae>>>He>>1}function d(){function Ae(rt){e:{for(var lt=16;268435456>=lt;lt*=16)if(rt<=lt){rt=lt;break e}rt=0}return 0<(lt=He[u(rt)>>2]).length?lt.pop():new ArrayBuffer(rt)}function De(rt){He[u(rt.byteLength)>>2].push(rt)}var He=s(8,function(){return[]});return{alloc:Ae,free:De,allocType:function(rt,lt){var ot=null;switch(rt){case 5120:ot=new Int8Array(Ae(lt),0,lt);break;case 5121:ot=new Uint8Array(Ae(lt),0,lt);break;case 5122:ot=new Int16Array(Ae(2*lt),0,lt);break;case 5123:ot=new Uint16Array(Ae(2*lt),0,lt);break;case 5124:ot=new Int32Array(Ae(4*lt),0,lt);break;case 5125:ot=new Uint32Array(Ae(4*lt),0,lt);break;case 5126:ot=new Float32Array(Ae(4*lt),0,lt);break;default:return null}return ot.length!==lt?ot.subarray(0,lt):ot},freeType:function(rt){De(rt.buffer)}}}function h(Ae){return!!Ae&&typeof Ae=="object"&&Array.isArray(Ae.shape)&&Array.isArray(Ae.stride)&&typeof Ae.offset=="number"&&Ae.shape.length===Ae.stride.length&&(Array.isArray(Ae.data)||ge(Ae.data))}function m(Ae,De,He,rt,lt,ot){for(var kt=0;kt(zt=Le)&&(zt=bt.buffer.byteLength,Et===5123?zt>>=1:Et===5125&&(zt>>=2)),bt.vertCount=zt,zt=Dt,0>Dt&&(zt=4,(Dt=bt.buffer.dimension)===1&&(zt=0),Dt===2&&(zt=1),Dt===3&&(zt=4)),bt.primType=zt}function kt(bt){rt.elementsCount--,delete wt[bt.id],bt.buffer.destroy(),bt.buffer=null}var wt={},Vt=0,Ut={uint8:5121,uint16:5123};De.oes_element_index_uint&&(Ut.uint32=5125),lt.prototype.bind=function(){this.buffer.bind()};var tt=[];return{create:function(bt,zt){function St(Je){if(Je)if(typeof Je=="number")Dt(Je),Le.primType=4,Le.vertCount=0|Je,Le.type=5121;else{var st=null,Et=35044,It=-1,Zt=-1,Kt=0,Ht=0;Array.isArray(Je)||ge(Je)||h(Je)?st=Je:("data"in Je&&(st=Je.data),"usage"in Je&&(Et=Te[Je.usage]),"primitive"in Je&&(It=Me[Je.primitive]),"count"in Je&&(Zt=0|Je.count),"type"in Je&&(Ht=Ut[Je.type]),"length"in Je?Kt=0|Je.length:(Kt=Zt,Ht===5123||Ht===5122?Kt*=2:Ht!==5125&&Ht!==5124||(Kt*=4))),ot(Le,st,Et,It,Zt,Kt,Ht)}else Dt(),Le.primType=4,Le.vertCount=0,Le.type=5121;return St}var Dt=He.create(null,34963,!0),Le=new lt(Dt._buffer);return rt.elementsCount++,St(bt),St._reglType="elements",St._elements=Le,St.subdata=function(Je,st){return Dt.subdata(Je,st),St},St.destroy=function(){kt(Le)},St},createStream:function(bt){var zt=tt.pop();return zt||(zt=new lt(He.create(null,34963,!0,!1)._buffer)),ot(zt,bt,35040,-1,-1,0,0),zt},destroyStream:function(bt){tt.push(bt)},getElements:function(bt){return typeof bt=="function"&&bt._elements instanceof lt?bt._elements:null},clear:function(){fe(wt).forEach(kt)}}}function w(Ae){for(var De=ue.allocType(5123,Ae.length),He=0;He>>31<<15,lt=(ot<<1>>>24)-127,ot=ot>>13&1023;De[He]=-24>lt?rt:-14>lt?rt+(ot+1024>>-14-lt):15>=yn,jt.height>>=yn,zt(jt,fn[yn]),cn.mipmask|=1<jn;++jn)cn.images[jn]=null;return cn}function Kt(cn){for(var jn=cn.images,jt=0;jtcn){for(var jn=0;jn=--this.refCount&&sn(this)}}),kt.profile&&(ot.getTotalTextureSize=function(){var cn=0;return Object.keys(pr).forEach(function(jn){cn+=pr[jn].stats.size}),cn}),{create2D:function(cn,jn){function jt(yn,$n){var Un=fn.texInfo;Ht.call(Un);var Nn=Zt();return typeof yn=="number"?st(Nn,0|yn,typeof $n=="number"?0|$n:0|yn):yn?(mn(Un,yn),Et(Nn,yn)):st(Nn,1,1),Un.genMipmaps&&(Nn.mipmask=(Nn.width<<1)-1),fn.mipmask=Nn.mipmask,Vt(fn,Nn),fn.internalformat=Nn.internalformat,jt.width=Nn.width,jt.height=Nn.height,tn(fn),It(Nn,3553),zn(Un,3553),nn(),Kt(Nn),kt.profile&&(fn.stats.size=E(fn.internalformat,fn.type,Nn.width,Nn.height,Un.genMipmaps,!1)),jt.format=Ln[fn.internalformat],jt.type=lr[fn.type],jt.mag=Wr[Un.magFilter],jt.min=Mn[Un.minFilter],jt.wrapS=rr[Un.wrapS],jt.wrapT=rr[Un.wrapT],jt}var fn=new pn(3553);return pr[fn.id]=fn,ot.textureCount++,jt(cn,jn),jt.subimage=function(yn,$n,Un,Nn){$n|=0,Un|=0,Nn|=0;var Rn=Dt();return Vt(Rn,fn),Rn.width=0,Rn.height=0,zt(Rn,yn),Rn.width=Rn.width||(fn.width>>Nn)-$n,Rn.height=Rn.height||(fn.height>>Nn)-Un,tn(fn),St(Rn,3553,$n,Un,Nn),nn(),Le(Rn),jt},jt.resize=function(yn,$n){var Un=0|yn,Nn=0|$n||Un;if(Un===fn.width&&Nn===fn.height)return jt;jt.width=fn.width=Un,jt.height=fn.height=Nn,tn(fn);for(var Rn=0;fn.mipmask>>Rn;++Rn){var wn=Un>>Rn,kn=Nn>>Rn;if(!wn||!kn)break;Ae.texImage2D(3553,Rn,fn.format,wn,kn,0,fn.format,fn.type,null)}return nn(),kt.profile&&(fn.stats.size=E(fn.internalformat,fn.type,Un,Nn,!1,!1)),jt},jt._reglType="texture2d",jt._texture=fn,kt.profile&&(jt.stats=fn.stats),jt.destroy=function(){fn.decRef()},jt},createCube:function(cn,jn,jt,fn,yn,$n){function Un(wn,kn,Tn,Dn,Zn,Yn){var ir,or=Nn.texInfo;for(Ht.call(or),ir=0;6>ir;++ir)Rn[ir]=Zt();if(typeof wn!="number"&&wn){if(typeof wn=="object")if(kn)Et(Rn[0],wn),Et(Rn[1],kn),Et(Rn[2],Tn),Et(Rn[3],Dn),Et(Rn[4],Zn),Et(Rn[5],Yn);else if(mn(or,wn),Ut(Nn,wn),"faces"in wn)for(wn=wn.faces,ir=0;6>ir;++ir)Vt(Rn[ir],Nn),Et(Rn[ir],wn[ir]);else for(ir=0;6>ir;++ir)Et(Rn[ir],wn)}else for(wn=0|wn||1,ir=0;6>ir;++ir)st(Rn[ir],wn,wn);for(Vt(Nn,Rn[0]),Nn.mipmask=or.genMipmaps?(Rn[0].width<<1)-1:Rn[0].mipmask,Nn.internalformat=Rn[0].internalformat,Un.width=Rn[0].width,Un.height=Rn[0].height,tn(Nn),ir=0;6>ir;++ir)It(Rn[ir],34069+ir);for(zn(or,34067),nn(),kt.profile&&(Nn.stats.size=E(Nn.internalformat,Nn.type,Un.width,Un.height,or.genMipmaps,!0)),Un.format=Ln[Nn.internalformat],Un.type=lr[Nn.type],Un.mag=Wr[or.magFilter],Un.min=Mn[or.minFilter],Un.wrapS=rr[or.wrapS],Un.wrapT=rr[or.wrapT],ir=0;6>ir;++ir)Kt(Rn[ir]);return Un}var Nn=new pn(34067);pr[Nn.id]=Nn,ot.cubeCount++;var Rn=Array(6);return Un(cn,jn,jt,fn,yn,$n),Un.subimage=function(wn,kn,Tn,Dn,Zn){Tn|=0,Dn|=0,Zn|=0;var Yn=Dt();return Vt(Yn,Nn),Yn.width=0,Yn.height=0,zt(Yn,kn),Yn.width=Yn.width||(Nn.width>>Zn)-Tn,Yn.height=Yn.height||(Nn.height>>Zn)-Dn,tn(Nn),St(Yn,34069+wn,Tn,Dn,Zn),nn(),Le(Yn),Un},Un.resize=function(wn){if((wn|=0)!==Nn.width){Un.width=Nn.width=wn,Un.height=Nn.height=wn,tn(Nn);for(var kn=0;6>kn;++kn)for(var Tn=0;Nn.mipmask>>Tn;++Tn)Ae.texImage2D(34069+kn,Tn,Nn.format,wn>>Tn,wn>>Tn,0,Nn.format,Nn.type,null);return nn(),kt.profile&&(Nn.stats.size=E(Nn.internalformat,Nn.type,Un.width,Un.height,!1,!0)),Un}},Un._reglType="textureCube",Un._texture=Nn,kt.profile&&(Un.stats=Nn.stats),Un.destroy=function(){Nn.decRef()},Un},clear:function(){for(var cn=0;cnfn;++fn)if((jt.mipmask&1<>fn,jt.height>>fn,0,jt.internalformat,jt.type,null);else for(var yn=0;6>yn;++yn)Ae.texImage2D(34069+yn,fn,jt.internalformat,jt.width>>fn,jt.height>>fn,0,jt.internalformat,jt.type,null);zn(jt.texInfo,jt.target)})},refresh:function(){for(var cn=0;cngn;++gn){for(ar=0;arsn;++sn)nn[sn].resize(gn);return tn.width=tn.height=gn,tn},_reglType:"framebufferCube",destroy:function(){nn.forEach(function(sn){sn.destroy()})}})},clear:function(){fe(zn).forEach(Je)},restore:function(){It.cur=null,It.next=null,It.dirty=!0,fe(zn).forEach(function(pn){pn.framebuffer=Ae.createFramebuffer(),st(pn)})}})}function R(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function z(Ae,De,He,rt,lt,ot,kt){function wt(){this.id=++tt,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var St=De.oes_vertex_array_object;this.vao=St?St.createVertexArrayOES():null,bt[this.id]=this,this.buffers=[]}var Vt=He.maxAttributes,Ut=Array(Vt);for(He=0;He=mn.byteLength?Zt.subdata(mn):(Zt.destroy(),Le.buffers[It]=null)),Le.buffers[It]||(Zt=Le.buffers[It]=lt.create(Kt,34962,!1,!0)),Ht.buffer=lt.getBuffer(Zt),Ht.size=0|Ht.buffer.dimension,Ht.normalized=!1,Ht.type=Ht.buffer.dtype,Ht.offset=0,Ht.stride=0,Ht.divisor=0,Ht.state=1,Je[It]=1):lt.getBuffer(Kt)?(Ht.buffer=lt.getBuffer(Kt),Ht.size=0|Ht.buffer.dimension,Ht.normalized=!1,Ht.type=Ht.buffer.dtype,Ht.offset=0,Ht.stride=0,Ht.divisor=0,Ht.state=1):lt.getBuffer(Kt.buffer)?(Ht.buffer=lt.getBuffer(Kt.buffer),Ht.size=0|(+Kt.size||Ht.buffer.dimension),Ht.normalized=!!Kt.normalized||!1,Ht.type="type"in Kt?we[Kt.type]:Ht.buffer.dtype,Ht.offset=0|(Kt.offset||0),Ht.stride=0|(Kt.stride||0),Ht.divisor=0|(Kt.divisor||0),Ht.state=1):"x"in Kt&&(Ht.x=+Kt.x||0,Ht.y=+Kt.y||0,Ht.z=+Kt.z||0,Ht.w=+Kt.w||0,Ht.state=2)}for(Zt=0;ZtDt&&(Dt=Le.stats.uniformsCount)}),Dt},He.getMaxAttributesCount=function(){var Dt=0;return zt.forEach(function(Le){Le.stats.attributesCount>Dt&&(Dt=Le.stats.attributesCount)}),Dt}),{clear:function(){var Dt=Ae.deleteShader.bind(Ae);fe(Ut).forEach(Dt),Ut={},fe(tt).forEach(Dt),tt={},zt.forEach(function(Le){Ae.deleteProgram(Le.program)}),zt.length=0,bt={},He.shaderCount=0},program:function(Dt,Le,Je,st){var Et=bt[Le];Et||(Et=bt[Le]={});var It=Et[Dt];if(It&&(It.refCount++,!st))return It;var Zt=new wt(Le,Dt);return He.shaderCount++,Vt(Zt,Je,st),It||(Et[Dt]=Zt),zt.push(Zt),H(Zt,{destroy:function(){if(Zt.refCount--,0>=Zt.refCount){Ae.deleteProgram(Zt.program);var Kt=zt.indexOf(Zt);zt.splice(Kt,1),He.shaderCount--}0>=Et[Zt.vertId].refCount&&(Ae.deleteShader(tt[Zt.vertId]),delete tt[Zt.vertId],delete bt[Zt.fragId][Zt.vertId]),Object.keys(bt[Zt.fragId]).length||(Ae.deleteShader(Ut[Zt.fragId]),delete Ut[Zt.fragId],delete bt[Zt.fragId])}})},restore:function(){Ut={},tt={};for(var Dt=0;Dt>>De|Ae<<32-De}function B(Ae,De){var He=(65535&Ae)+(65535&De);return(Ae>>16)+(De>>16)+(He>>16)<<16|65535&He}function G(Ae){return Array.prototype.slice.call(Ae)}function W(Ae){return G(Ae).join("")}function K(Ae){function De(){var tt=[],bt=[];return H(function(){tt.push.apply(tt,G(arguments))},{def:function(){var zt="v"+lt++;return bt.push(zt),0>>4&15)+"0123456789abcdef".charAt(15&Dt);return Le}(function(St){for(var Dt=Array(St.length>>2),Le=0;Le>5]|=(255&St.charCodeAt(Le/8))<<24-Le%32;var Je,st,Et,It,Zt,Kt,Ht,mn,zn,pn,tn,nn=8*St.length;for(St=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Le=Array(64),Dt[nn>>5]|=128<<24-nn%32,Dt[15+(nn+64>>9<<4)]=nn,mn=0;mnzn;zn++){var sn;16>zn?Le[zn]=Dt[zn+mn]:(pn=zn,tn=B(tn=N(tn=Le[zn-2],17)^N(tn,19)^tn>>>10,Le[zn-7]),sn=N(sn=Le[zn-15],7)^N(sn,18)^sn>>>3,Le[pn]=B(B(tn,sn),Le[zn-16])),pn=B(B(B(B(Ht,pn=N(pn=It,6)^N(pn,11)^N(pn,25)),It&Zt^~It&Kt),Wt[zn]),Le[zn]),tn=B(Ht=N(Ht=nn,2)^N(Ht,13)^N(Ht,22),nn&Je^nn&st^Je&st),Ht=Kt,Kt=Zt,Zt=It,It=B(Et,pn),Et=st,st=Je,Je=nn,nn=B(pn,tn)}St[0]=B(nn,St[0]),St[1]=B(Je,St[1]),St[2]=B(st,St[2]),St[3]=B(Et,St[3]),St[4]=B(It,St[4]),St[5]=B(Zt,St[5]),St[6]=B(Kt,St[6]),St[7]=B(Ht,St[7])}for(Dt="",Le=0;Le<32*St.length;Le+=8)Dt+=String.fromCharCode(St[Le>>5]>>>24-Le%32&255);return Dt}(function(St){for(var Dt,Le,Je="",st=-1;++st=Dt&&56320<=Le&&57343>=Le&&(Dt=65536+((1023&Dt)<<10)+(1023&Le),st++),127>=Dt?Je+=String.fromCharCode(Dt):2047>=Dt?Je+=String.fromCharCode(192|Dt>>>6&31,128|63&Dt):65535>=Dt?Je+=String.fromCharCode(224|Dt>>>12&15,128|Dt>>>6&63,128|63&Dt):2097151>=Dt&&(Je+=String.fromCharCode(240|Dt>>>18&7,128|Dt>>>12&63,128|Dt>>>6&63,128|63&Dt));return Je}(zt))),rt[bt])?rt[bt].apply(null,kt):(zt=Function.apply(null,ot.concat(zt)),rt&&(rt[bt]=zt),zt.apply(null,kt))}}}function te(Ae){return Array.isArray(Ae)||ge(Ae)||h(Ae)}function Y(Ae){return Ae.sort(function(De,He){return De==="viewport"?-1:He==="viewport"?1:De"+Nr+"?"+Dn+".constant["+Nr+"]:0;"}).join(""),"}}else{","if(",ir,"(",Dn,".buffer)){",wr,"=",Zn,".createStream(",34962,",",Dn,".buffer);","}else{",wr,"=",Zn,".getBuffer(",Dn,".buffer);","}",kr,'="type" in ',Dn,"?",Yn.glTypes,"[",Dn,".type]:",wr,".dtype;",or.normalized,"=!!",Dn,".normalized;"),Tn("size"),Tn("offset"),Tn("stride"),Tn("divisor"),kn("}}"),kn.exit("if(",or.isStream,"){",Zn,".destroyStream(",wr,");","}"),or})}),Un}function zn(jt,fn,yn,$n,Un){function Nn(xr){var wr=wn[xr];wr&&(Tn[xr]=wr)}var Rn=function(xr,wr){if(typeof(kr=xr.static).frag=="string"&&typeof kr.vert=="string"){if(0"u"?"Date.now()":"performance.now()"}function Rn(xr){xr(Tn=fn.def(),"=",Nn(),";"),typeof Un=="string"?xr(Yn,".count+=",Un,";"):xr(Yn,".count++;"),St&&($n?xr(Dn=fn.def(),"=",or,".getNumPendingQueries();"):xr(or,".beginQuery(",Yn,");"))}function wn(xr){xr(Yn,".cpuTime+=",Nn(),"-",Tn,";"),St&&($n?xr(or,".pushScopeStats(",Dn,",",or,".getNumPendingQueries(),",Yn,");"):xr(or,".endQuery();"))}function kn(xr){var wr=fn.def(ir,".profile");fn(ir,".profile=",xr,";"),fn.exit(ir,".profile=",wr,";")}var Tn,Dn,Zn=jt.shared,Yn=jt.stats,ir=Zn.current,or=Zn.timer;if(yn=yn.profile){if(re(yn))return void(yn.enable?(Rn(fn),wn(fn.exit),kn("true")):kn("false"));kn(yn=yn.append(jt,fn))}else yn=fn.def(ir,".profile");Rn(Zn=jt.block()),fn("if(",yn,"){",Zn,"}"),wn(jt=jt.block()),fn.exit("if(",yn,"){",jt,"}")}function In(jt,fn,yn,$n,Un){function Nn(wn,kn,Tn){function Dn(){fn("if(!",or,".buffer){",Yn,".enableVertexAttribArray(",ir,");}");var Dr,Nr=Tn.type;Dr=Tn.size?fn.def(Tn.size,"||",kn):kn,fn("if(",or,".type!==",Nr,"||",or,".size!==",Dr,"||",kr.map(function(ri){return or+"."+ri+"!=="+Tn[ri]}).join("||"),"){",Yn,".bindBuffer(",34962,",",xr,".buffer);",Yn,".vertexAttribPointer(",[ir,Dr,Nr,Tn.normalized,Tn.stride,Tn.offset],");",or,".type=",Nr,";",or,".size=",Dr,";",kr.map(function(ri){return or+"."+ri+"="+Tn[ri]+";"}).join(""),"}"),Mn&&(Nr=Tn.divisor,fn("if(",or,".divisor!==",Nr,"){",jt.instancing,".vertexAttribDivisorANGLE(",[ir,Nr],");",or,".divisor=",Nr,";}"))}function Zn(){fn("if(",or,".buffer){",Yn,".disableVertexAttribArray(",ir,");",or,".buffer=null;","}if(",Jt.map(function(Dr,Nr){return or+"."+Dr+"!=="+wr[Nr]}).join("||"),"){",Yn,".vertexAttrib4f(",ir,",",wr,");",Jt.map(function(Dr,Nr){return or+"."+Dr+"="+wr[Nr]+";"}).join(""),"}")}var Yn=Rn.gl,ir=fn.def(wn,".location"),or=fn.def(Rn.attributes,"[",ir,"]");wn=Tn.state;var xr=Tn.buffer,wr=[Tn.x,Tn.y,Tn.z,Tn.w],kr=["buffer","normalized","offset","stride"];wn===1?Dn():wn===2?Zn():(fn("if(",wn,"===",1,"){"),Dn(),fn("}else{"),Zn(),fn("}"))}var Rn=jt.shared;$n.forEach(function(wn){var kn,Tn=wn.name,Dn=yn.attributes[Tn];if(Dn){if(!Un(Dn))return;kn=Dn.append(jt,fn)}else{if(!Un(Ie))return;var Zn=jt.scopeAttrib(Tn);kn={},Object.keys(new lr).forEach(function(Yn){kn[Yn]=fn.def(Zn,".",Yn)})}Nn(jt.link(wn),function(Yn){switch(Yn){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(wn.info.type),kn)})}function Hn(jt,fn,yn,$n,Un,Nn){for(var Rn,wn=jt.shared,kn=wn.gl,Tn=0;Tn<$n.length;++Tn){var Dn,Zn=(or=$n[Tn]).name,Yn=or.info.type,ir=yn.uniforms[Zn],or=jt.link(or)+".location";if(ir){if(!Un(ir))continue;if(re(ir)){if(Zn=ir.value,Yn===35678||Yn===35680)fn(kn,".uniform1i(",or,",",(Yn=jt.link(Zn._texture||Zn.color[0]._texture))+".bind());"),fn.exit(Yn,".unbind();");else if(Yn===35674||Yn===35675||Yn===35676)ir=2,Yn===35675?ir=3:Yn===35676&&(ir=4),fn(kn,".uniformMatrix",ir,"fv(",or,",false,",Zn=jt.global.def("new Float32Array(["+Array.prototype.slice.call(Zn)+"])"),");");else{switch(Yn){case 5126:Rn="1f";break;case 35664:Rn="2f";break;case 35665:Rn="3f";break;case 35666:Rn="4f";break;case 35670:case 5124:Rn="1i";break;case 35671:case 35667:Rn="2i";break;case 35672:case 35668:Rn="3i";break;case 35673:Rn="4i";break;case 35669:Rn="4i"}fn(kn,".uniform",Rn,"(",or,",",k(Zn)?Array.prototype.slice.call(Zn):Zn,");")}continue}Dn=ir.append(jt,fn)}else{if(!Un(Ie))continue;Dn=fn.def(wn.uniforms,"[",De.id(Zn),"]")}switch(Yn===35678?fn("if(",Dn,"&&",Dn,'._reglType==="framebuffer"){',Dn,"=",Dn,".color[0];","}"):Yn===35680&&fn("if(",Dn,"&&",Dn,'._reglType==="framebufferCube"){',Dn,"=",Dn,".color[0];","}"),Zn=1,Yn){case 35678:case 35680:Yn=fn.def(Dn,"._texture"),fn(kn,".uniform1i(",or,",",Yn,".bind());"),fn.exit(Yn,".unbind();");continue;case 5124:case 35670:Rn="1i";break;case 35667:case 35671:Rn="2i",Zn=2;break;case 35668:case 35672:Rn="3i",Zn=3;break;case 35669:case 35673:Rn="4i",Zn=4;break;case 5126:Rn="1f";break;case 35664:Rn="2f",Zn=2;break;case 35665:Rn="3f",Zn=3;break;case 35666:Rn="4f",Zn=4;break;case 35674:Rn="Matrix2fv";break;case 35675:Rn="Matrix3fv";break;case 35676:Rn="Matrix4fv"}if(Rn.charAt(0)==="M"){fn(kn,".uniform",Rn,"(",or,","),or=Math.pow(Yn-35674+2,2);var xr=jt.global.def("new Float32Array(",or,")");Array.isArray(Dn)?fn("false,(",s(or,function(kr){return xr+"["+kr+"]="+Dn[kr]}),",",xr,")"):fn("false,(Array.isArray(",Dn,")||",Dn," instanceof Float32Array)?",Dn,":(",s(or,function(kr){return xr+"["+kr+"]="+Dn+"["+kr+"]"}),",",xr,")"),fn(");")}else{if(1>1)",wn],");")}function ri(){yn(kn,".drawArraysInstancedANGLE(",[or,xr,wr,wn],");")}ir&&ir!=="null"?Dr?Nr():(yn("if(",ir,"){"),Nr(),yn("}else{"),ri(),yn("}")):ri()}function Rn(){function Nr(){yn(Dn+".drawElements("+[or,wr,kr,xr+"<<(("+kr+"-5121)>>1)"]+");")}function ri(){yn(Dn+".drawArrays("+[or,xr,wr]+");")}ir&&ir!=="null"?Dr?Nr():(yn("if(",ir,"){"),Nr(),yn("}else{"),ri(),yn("}")):ri()}var wn,kn,Tn=jt.shared,Dn=Tn.gl,Zn=Tn.draw,Yn=$n.draw,ir=function(){var Nr=Yn.elements,ri=fn;return Nr?((Nr.contextDep&&$n.contextDynamic||Nr.propDep)&&(ri=yn),Nr=Nr.append(jt,ri),Yn.elementsActive&&ri("if("+Nr+")"+Dn+".bindBuffer(34963,"+Nr+".buffer.buffer);")):(Nr=ri.def(),ri(Nr,"=",Zn,".","elements",";","if(",Nr,"){",Dn,".bindBuffer(",34963,",",Nr,".buffer.buffer);}","else if(",Tn.vao,".currentVAO){",Nr,"=",jt.shared.elements+".getElements("+Tn.vao,".currentVAO.elements);",nr?"":"if("+Nr+")"+Dn+".bindBuffer(34963,"+Nr+".buffer.buffer);","}")),Nr}(),or=Un("primitive"),xr=Un("offset"),wr=function(){var Nr=Yn.count,ri=fn;return Nr?((Nr.contextDep&&$n.contextDynamic||Nr.propDep)&&(ri=yn),Nr=Nr.append(jt,ri)):Nr=ri.def(Zn,".","count"),Nr}();if(typeof wr=="number"){if(wr===0)return}else yn("if(",wr,"){"),yn.exit("}");Mn&&(wn=Un("instances"),kn=jt.instancing);var kr=ir+".type",Dr=Yn.elements&&re(Yn.elements)&&!Yn.vaoActive;Mn&&(typeof wn!="number"||0<=wn)?typeof wn=="string"?(yn("if(",wn,">0){"),Nn(),yn("}else if(",wn,"<0){"),Rn(),yn("}")):Nn():Rn()}function ar(jt,fn,yn,$n,Un){return Un=(fn=It()).proc("body",Un),Mn&&(fn.instancing=Un.def(fn.shared.extensions,".angle_instanced_arrays")),jt(fn,Un,yn,$n),fn.compile().body}function Or(jt,fn,yn,$n){gn(jt,fn),yn.useVAO?yn.drawVAO?fn(jt.shared.vao,".setVAO(",yn.drawVAO.append(jt,fn),");"):fn(jt.shared.vao,".setVAO(",jt.shared.vao,".targetVAO);"):(fn(jt.shared.vao,".setVAO(null);"),In(jt,fn,yn,$n.attributes,function(){return!0})),Hn(jt,fn,yn,$n.uniforms,function(){return!0},!1),Wn(jt,fn,fn,yn)}function vr(jt,fn,yn,$n){function Un(){return!0}jt.batchId="a1",gn(jt,fn),In(jt,fn,yn,$n.attributes,Un),Hn(jt,fn,yn,$n.uniforms,Un,!1),Wn(jt,fn,fn,yn)}function Er(jt,fn,yn,$n){function Un(Zn){return Zn.contextDep&&Rn||Zn.propDep}function Nn(Zn){return!Un(Zn)}gn(jt,fn);var Rn=yn.contextDep,wn=fn.def(),kn=fn.def();jt.shared.props=kn,jt.batchId=wn;var Tn=jt.scope(),Dn=jt.scope();fn(Tn.entry,"for(",wn,"=0;",wn,"<","a1",";++",wn,"){",kn,"=","a0","[",wn,"];",Dn,"}",Tn.exit),yn.needsContext&&pn(jt,Dn,yn.context),yn.needsFramebuffer&&tn(jt,Dn,yn.framebuffer),sn(jt,Dn,yn.state,Un),yn.profile&&Un(yn.profile)&&bn(jt,Dn,yn,!1,!0),$n?(yn.useVAO?yn.drawVAO?Un(yn.drawVAO)?Dn(jt.shared.vao,".setVAO(",yn.drawVAO.append(jt,Dn),");"):Tn(jt.shared.vao,".setVAO(",yn.drawVAO.append(jt,Tn),");"):Tn(jt.shared.vao,".setVAO(",jt.shared.vao,".targetVAO);"):(Tn(jt.shared.vao,".setVAO(null);"),In(jt,Tn,yn,$n.attributes,Nn),In(jt,Dn,yn,$n.attributes,Un)),Hn(jt,Tn,yn,$n.uniforms,Nn,!1),Hn(jt,Dn,yn,$n.uniforms,Un,!0),Wn(jt,Tn,Dn,yn)):(fn=jt.global.def("{}"),$n=yn.shader.progVar.append(jt,Dn),kn=Dn.def($n,".id"),Tn=Dn.def(fn,"[",kn,"]"),Dn(jt.shared.gl,".useProgram(",$n,".program);","if(!",Tn,"){",Tn,"=",fn,"[",kn,"]=",jt.link(function(Zn){return ar(vr,jt,yn,Zn,2)}),"(",$n,");}",Tn,".call(this,a0[",wn,"],",wn,");"))}function Kn(jt,fn){function yn(wn){var kn=fn.shader[wn];kn&&(kn=kn.append(jt,$n),isNaN(kn)?$n.set(Un.shader,"."+wn,kn):$n.set(Un.shader,"."+wn,jt.link(kn,{stable:!0})))}var $n=jt.proc("scope",3);jt.batchId="a2";var Un=jt.shared,Nn=Un.current;if(pn(jt,$n,fn.context),fn.framebuffer&&fn.framebuffer.append(jt,$n),Y(Object.keys(fn.state)).forEach(function(wn){var kn=fn.state[wn],Tn=kn.append(jt,$n);k(Tn)?Tn.forEach(function(Dn,Zn){isNaN(Dn)?$n.set(jt.next[wn],"["+Zn+"]",Dn):$n.set(jt.next[wn],"["+Zn+"]",jt.link(Dn,{stable:!0}))}):re(kn)?$n.set(Un.next,"."+wn,jt.link(Tn,{stable:!0})):$n.set(Un.next,"."+wn,Tn)}),bn(jt,$n,fn,!0,!0),["elements","offset","count","instances","primitive"].forEach(function(wn){var kn=fn.draw[wn];kn&&(kn=kn.append(jt,$n),isNaN(kn)?$n.set(Un.draw,"."+wn,kn):$n.set(Un.draw,"."+wn,jt.link(kn),{stable:!0}))}),Object.keys(fn.uniforms).forEach(function(wn){var kn=fn.uniforms[wn].append(jt,$n);Array.isArray(kn)&&(kn="["+kn.map(function(Tn){return isNaN(Tn)?Tn:jt.link(Tn,{stable:!0})})+"]"),$n.set(Un.uniforms,"["+jt.link(De.id(wn),{stable:!0})+"]",kn)}),Object.keys(fn.attributes).forEach(function(wn){var kn=fn.attributes[wn].append(jt,$n),Tn=jt.scopeAttrib(wn);Object.keys(new lr).forEach(function(Dn){$n.set(Tn,"."+Dn,kn[Dn])})}),fn.scopeVAO){var Rn=fn.scopeVAO.append(jt,$n);isNaN(Rn)?$n.set(Un.vao,".targetVAO",Rn):$n.set(Un.vao,".targetVAO",jt.link(Rn,{stable:!0}))}yn("vert"),yn("frag"),0=--this.refCount&&kt(this)},lt.profile&&(rt.getTotalRenderbufferSize=function(){var bt=0;return Object.keys(tt).forEach(function(zt){bt+=tt[zt].stats.size}),bt}),{create:function(bt,zt){function St(Le,Je){var st=0,Et=0,It=32854;if(typeof Le=="object"&&Le?("shape"in Le?(st=0|(Et=Le.shape)[0],Et=0|Et[1]):("radius"in Le&&(st=Et=0|Le.radius),"width"in Le&&(st=0|Le.width),"height"in Le&&(Et=0|Le.height)),"format"in Le&&(It=wt[Le.format])):typeof Le=="number"?(st=0|Le,Et=typeof Je=="number"?0|Je:st):Le||(st=Et=1),st!==Dt.width||Et!==Dt.height||It!==Dt.format)return St.width=Dt.width=st,St.height=Dt.height=Et,Dt.format=It,Ae.bindRenderbuffer(36161,Dt.renderbuffer),Ae.renderbufferStorage(36161,It,st,Et),lt.profile&&(Dt.stats.size=At[Dt.format]*Dt.width*Dt.height),St.format=Vt[Dt.format],St}var Dt=new ot(Ae.createRenderbuffer());return tt[Dt.id]=Dt,rt.renderbufferCount++,St(bt,zt),St.resize=function(Le,Je){var st=0|Le,Et=0|Je||st;return st===Dt.width&&Et===Dt.height||(St.width=Dt.width=st,St.height=Dt.height=Et,Ae.bindRenderbuffer(36161,Dt.renderbuffer),Ae.renderbufferStorage(36161,Dt.format,st,Et),lt.profile&&(Dt.stats.size=At[Dt.format]*Dt.width*Dt.height)),St},St._reglType="renderbuffer",St._renderbuffer=Dt,lt.profile&&(St.stats=Dt.stats),St.destroy=function(){Dt.decRef()},St},clear:function(){fe(tt).forEach(kt)},restore:function(){fe(tt).forEach(function(bt){bt.renderbuffer=Ae.createRenderbuffer(),Ae.bindRenderbuffer(36161,bt.renderbuffer),Ae.renderbufferStorage(36161,bt.format,bt.width,bt.height)}),Ae.bindRenderbuffer(36161,null)}}},et=[];et[6408]=4,et[6407]=3;var Ot=[];Ot[5121]=1,Ot[5126]=4,Ot[36193]=2;var Wt=[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],Jt=["x","y","z","w"],Be="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Ge={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},Tt={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},dt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Pe={cw:2304,ccw:2305},Ie=new Z(!1,!1,!1,function(){});return function(Ae){function De(){if(vr.length===0)Zt&&Zt.update(),lr=null;else{lr=ie.next(De),tt();for(var Mn=vr.length-1;0<=Mn;--Mn){var rr=vr[Mn];rr&&rr(zn,null,0)}St.flush(),Zt&&Zt.update()}}function He(){!lr&&0=vr.length&&rt()}}}}function Ut(){var Mn=ar.viewport,rr=ar.scissor_box;Mn[0]=Mn[1]=rr[0]=rr[1]=0,zn.viewportWidth=zn.framebufferWidth=zn.drawingBufferWidth=Mn[2]=rr[2]=St.drawingBufferWidth,zn.viewportHeight=zn.framebufferHeight=zn.drawingBufferHeight=Mn[3]=rr[3]=St.drawingBufferHeight}function tt(){zn.tick+=1,zn.time=zt(),Ut(),Wn.procs.poll()}function bt(){bn.refresh(),Ut(),Wn.procs.refresh(),Zt&&Zt.update()}function zt(){return(ae()-Kt)/1e3}if(!(Ae=i(Ae)))return null;var St=Ae.gl,Dt=St.getContextAttributes();St.isContextLost();var Le=function(Mn,rr){function nr(pr){var qr;pr=pr.toLowerCase();try{qr=Bn[pr]=Mn.getExtension(pr)}catch{}return!!qr}for(var Bn={},Fr=0;Frrr;++rr)Wr(H({framebuffer:Mn.framebuffer.faces[rr]},Mn),wt);else Wr(Mn,wt);else wt(0,Mn)},prop:ee.define.bind(null,1),context:ee.define.bind(null,2),this:ee.define.bind(null,3),draw:kt({}),buffer:function(Mn){return tn.create(Mn,34962,!1,!1)},elements:function(Mn){return nn.create(Mn,!1)},texture:bn.create2D,cube:bn.createCube,renderbuffer:In.create,framebuffer:Hn.create,framebufferCube:Hn.createCube,vao:sn.createVAO,attributes:Dt,frame:Vt,on:function(Mn,rr){var nr;switch(Mn){case"frame":return Vt(rr);case"lost":nr=Er;break;case"restore":nr=Kn;break;case"destroy":nr=Ln}return nr.push(rr),{cancel:function(){for(var Bn=0;Bn2?"one of ".concat(i," ").concat(c.slice(0,s-1).join(", "),", or ")+c[s-1]:s===2?"one of ".concat(i," ").concat(c[0]," or ").concat(c[1]):"of ".concat(i," ").concat(c[0])}return"of ".concat(i," ").concat(String(c))}a("ERR_INVALID_OPT_VALUE",function(c,i){return'The value "'+i+'" is invalid for option "'+c+'"'},TypeError),a("ERR_INVALID_ARG_TYPE",function(c,i,s){var u,d,h;if(typeof i=="string"&&(d="not ",i.substr(0,d.length)===d)?(u="must not be",i=i.replace(/^not /,"")):u="must be",function(g,p,v){return(v===void 0||v>g.length)&&(v=g.length),g.substring(v-p.length,v)===p}(c," argument"))h="The ".concat(c," ").concat(u," ").concat(l(i,"type"));else{var m=function(g,p,v){return typeof v!="number"&&(v=0),!(v+p.length>g.length)&&g.indexOf(p,v)!==-1}(c,".")?"property":"argument";h='The "'.concat(c,'" ').concat(m," ").concat(u," ").concat(l(i,"type"))}return h+=". Received type ".concat(typeof s)},TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",function(c){return"The "+c+" method is not implemented"}),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",function(c){return"Cannot call "+c+" after a stream was destroyed"}),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",function(c){return"Unknown encoding: "+c},TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),o.exports.codes=r},{}],287:[function(e,o,f){(function(r){(function(){var a=Object.keys||function(g){var p=[];for(var v in g)p.push(v);return p};o.exports=d;var l=e("./_stream_readable"),c=e("./_stream_writable");e("inherits")(d,l);for(var i=a(c.prototype),s=0;s0)if(typeof q=="string"||ee.objectMode||Object.getPrototypeOf(q)===s.prototype||(q=function(ie){return s.from(ie)}(q)),ne)ee.endEmitted?S(U,new _):O(U,ee,q,!0);else if(ee.ended)S(U,new b);else{if(ee.destroyed)return!1;ee.reading=!1,ee.decoder&&!$?(q=ee.decoder.write(q),ee.objectMode||q.length!==0?O(U,ee,q,!1):P(U,ee)):O(U,ee,q,!1)}else ne||(ee.reading=!1,P(U,ee));return!ee.ended&&(ee.lengthq.highWaterMark&&(q.highWaterMark=function($){return $>=1073741824?$=1073741824:($--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++),$}(U)),U<=q.length?U:q.ended?q.length:(q.needReadable=!0,0))}function z(U){var q=U._readableState;d("emitReadable",q.needReadable,q.emittedReadable),q.needReadable=!1,q.emittedReadable||(d("emitReadable",q.flowing),q.emittedReadable=!0,r.nextTick(L,U))}function L(U){var q=U._readableState;d("emitReadable_",q.destroyed,q.length,q.ended),q.destroyed||!q.length&&!q.ended||(U.emit("readable"),q.emittedReadable=!1),q.needReadable=!q.flowing&&!q.ended&&q.length<=q.highWaterMark,K(U)}function P(U,q){q.readingMore||(q.readingMore=!0,r.nextTick(N,U,q))}function N(U,q){for(;!q.reading&&!q.ended&&(q.length0,q.resumeScheduled&&!q.paused?q.flowing=!0:U.listenerCount("data")>0&&U.resume()}function G(U){d("readable nexttick read 0"),U.read(0)}function W(U,q){d("resume",q.reading),q.reading||U.read(0),q.resumeScheduled=!1,U.emit("resume"),K(U),q.flowing&&!q.reading&&U.read(0)}function K(U){var q=U._readableState;for(d("flow",q.flowing);q.flowing&&U.read()!==null;);}function te(U,q){return q.length===0?null:(q.objectMode?$=q.buffer.shift():!U||U>=q.length?($=q.decoder?q.buffer.join(""):q.buffer.length===1?q.buffer.first():q.buffer.concat(q.length),q.buffer.clear()):$=q.buffer.consume(U,q.decoder),$);var $}function Y(U){var q=U._readableState;d("endReadable",q.endEmitted),q.endEmitted||(q.ended=!0,r.nextTick(Z,q,U))}function Z(U,q){if(d("endReadableNT",U.endEmitted,U.length),!U.endEmitted&&U.length===0&&(U.endEmitted=!0,q.readable=!1,q.emit("end"),U.autoDestroy)){var $=q._writableState;(!$||$.autoDestroy&&$.finished)&&q.destroy()}}function re(U,q){for(var $=0,ne=U.length;$=q.highWaterMark:q.length>0)||q.ended))return d("read: emitReadable",q.length,q.ended),q.length===0&&q.ended?Y(this):z(this),null;if((U=R(U,q))===0&&q.ended)return q.length===0&&Y(this),null;var ne,H=q.needReadable;return d("need readable",H),(q.length===0||q.length-U0?te(U,q):null)===null?(q.needReadable=q.length<=q.highWaterMark,U=0):(q.length-=U,q.awaitDrain=0),q.length===0&&(q.ended||(q.needReadable=!0),$!==U&&q.ended&&Y(this)),ne!==null&&this.emit("data",ne),ne},E.prototype._read=function(U){S(this,new T("_read()"))},E.prototype.pipe=function(U,q){var $=this,ne=this._readableState;switch(ne.pipesCount){case 0:ne.pipes=U;break;case 1:ne.pipes=[ne.pipes,U];break;default:ne.pipes.push(U)}ne.pipesCount+=1,d("pipe count=%d opts=%j",ne.pipesCount,q);var H=(!q||q.end!==!1)&&U!==r.stdout&&U!==r.stderr?ee:me;function Q(_e,we){d("onunpipe"),_e===$&&we&&we.hasUnpiped===!1&&(we.hasUnpiped=!0,d("cleanup"),U.removeListener("close",ge),U.removeListener("finish",fe),U.removeListener("drain",ie),U.removeListener("error",le),U.removeListener("unpipe",Q),$.removeListener("end",ee),$.removeListener("end",me),$.removeListener("data",ue),ae=!0,!ne.awaitDrain||U._writableState&&!U._writableState.needDrain||ie())}function ee(){d("onend"),U.end()}ne.endEmitted?r.nextTick(H):$.once("end",H),U.on("unpipe",Q);var ie=function(_e){return function(){var we=_e._readableState;d("pipeOnDrain",we.awaitDrain),we.awaitDrain&&we.awaitDrain--,we.awaitDrain===0&&c(_e,"data")&&(we.flowing=!0,K(_e))}}($);U.on("drain",ie);var ae=!1;function ue(_e){d("ondata");var we=U.write(_e);d("dest.write",we),we===!1&&((ne.pipesCount===1&&ne.pipes===U||ne.pipesCount>1&&re(ne.pipes,U)!==-1)&&!ae&&(d("false write response, pause",ne.awaitDrain),ne.awaitDrain++),$.pause())}function le(_e){d("onerror",_e),me(),U.removeListener("error",le),c(U,"error")===0&&S(U,_e)}function ge(){U.removeListener("finish",fe),me()}function fe(){d("onfinish"),U.removeListener("close",ge),me()}function me(){d("unpipe"),$.unpipe(U)}return $.on("data",ue),function(_e,we,Te){if(typeof _e.prependListener=="function")return _e.prependListener(we,Te);_e._events&&_e._events[we]?Array.isArray(_e._events[we])?_e._events[we].unshift(Te):_e._events[we]=[Te,_e._events[we]]:_e.on(we,Te)}(U,"error",le),U.once("close",ge),U.once("finish",fe),U.emit("pipe",$),ne.flowing||(d("pipe resume"),$.resume()),U},E.prototype.unpipe=function(U){var q=this._readableState,$={hasUnpiped:!1};if(q.pipesCount===0)return this;if(q.pipesCount===1)return U&&U!==q.pipes||(U||(U=q.pipes),q.pipes=null,q.pipesCount=0,q.flowing=!1,U&&U.emit("unpipe",this,$)),this;if(!U){var ne=q.pipes,H=q.pipesCount;q.pipes=null,q.pipesCount=0,q.flowing=!1;for(var Q=0;Q0,ne.flowing!==!1&&this.resume()):U==="readable"&&(ne.endEmitted||ne.readableListening||(ne.readableListening=ne.needReadable=!0,ne.flowing=!1,ne.emittedReadable=!1,d("on readable",ne.length,ne.reading),ne.length?z(this):ne.reading||r.nextTick(G,this))),$},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(U,q){var $=i.prototype.removeListener.call(this,U,q);return U==="readable"&&r.nextTick(B,this),$},E.prototype.removeAllListeners=function(U){var q=i.prototype.removeAllListeners.apply(this,arguments);return U!=="readable"&&U!==void 0||r.nextTick(B,this),q},E.prototype.resume=function(){var U=this._readableState;return U.flowing||(d("resume"),U.flowing=!U.readableListening,function(q,$){$.resumeScheduled||($.resumeScheduled=!0,r.nextTick(W,q,$))}(this,U)),U.paused=!1,this},E.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(U){var q=this,$=this._readableState,ne=!1;for(var H in U.on("end",function(){if(d("wrapped end"),$.decoder&&!$.ended){var ee=$.decoder.end();ee&&ee.length&&q.push(ee)}q.push(null)}),U.on("data",function(ee){d("wrapped data"),$.decoder&&(ee=$.decoder.write(ee)),$.objectMode&&ee==null||($.objectMode||ee&&ee.length)&&(q.push(ee)||(ne=!0,U.pause()))}),U)this[H]===void 0&&typeof U[H]=="function"&&(this[H]=function(ee){return function(){return U[ee].apply(U,arguments)}}(H));for(var Q=0;Q-1))throw new _(N);return this._writableState.defaultEncoding=N,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(N,B,G){G(new y("_write()"))},E.prototype._writev=null,E.prototype.end=function(N,B,G){var W=this._writableState;return typeof N=="function"?(G=N,N=null,B=null):typeof B=="function"&&(G=B,B=null),N!=null&&this.write(N,B),W.corked&&(W.corked=1,this.uncork()),W.ending||function(K,te,Y){te.ending=!0,P(K,te),Y&&(te.finished?r.nextTick(Y):K.once("finish",Y)),te.ended=!0,K.writable=!1}(this,W,G),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(N){this._writableState&&(this._writableState.destroyed=N)}}),E.prototype.destroy=m.destroy,E.prototype._undestroy=m.undestroy,E.prototype._destroy=function(N,B){B(N)}}).call(this)}).call(this,e("_process"),typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":286,"./_stream_duplex":287,"./internal/streams/destroy":294,"./internal/streams/state":298,"./internal/streams/stream":299,_process:277,buffer:85,inherits:231,"util-deprecate":330}],292:[function(e,o,f){(function(r){(function(){var a;function l(k,b,T){return b in k?Object.defineProperty(k,b,{value:T,enumerable:!0,configurable:!0,writable:!0}):k[b]=T,k}var c=e("./end-of-stream"),i=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),d=Symbol("ended"),h=Symbol("lastPromise"),m=Symbol("handlePromise"),g=Symbol("stream");function p(k,b){return{value:k,done:b}}function v(k){var b=k[i];if(b!==null){var T=k[g].read();T!==null&&(k[h]=null,k[i]=null,k[s]=null,b(p(T,!1)))}}function y(k){r.nextTick(v,k)}var x=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((l(a={get stream(){return this[g]},next:function(){var k=this,b=this[u];if(b!==null)return Promise.reject(b);if(this[d])return Promise.resolve(p(void 0,!0));if(this[g].destroyed)return new Promise(function(A,M){r.nextTick(function(){k[u]?M(k[u]):A(p(void 0,!0))})});var T,_=this[h];if(_)T=new Promise(function(A,M){return function(E,D){A.then(function(){M[d]?E(p(void 0,!0)):M[m](E,D)},D)}}(_,this));else{var S=this[g].read();if(S!==null)return Promise.resolve(p(S,!1));T=new Promise(this[m])}return this[h]=T,T}},Symbol.asyncIterator,function(){return this}),l(a,"return",function(){var k=this;return new Promise(function(b,T){k[g].destroy(null,function(_){_?T(_):b(p(void 0,!0))})})}),a),x);o.exports=function(k){var b,T=Object.create(w,(l(b={},g,{value:k,writable:!0}),l(b,i,{value:null,writable:!0}),l(b,s,{value:null,writable:!0}),l(b,u,{value:null,writable:!0}),l(b,d,{value:k._readableState.endEmitted,writable:!0}),l(b,m,{value:function(_,S){var A=T[g].read();A?(T[h]=null,T[i]=null,T[s]=null,_(p(A,!1))):(T[i]=_,T[s]=S)},writable:!0}),b));return T[h]=null,c(k,function(_){if(_&&_.code!=="ERR_STREAM_PREMATURE_CLOSE"){var S=T[s];return S!==null&&(T[h]=null,T[i]=null,T[s]=null,S(_)),void(T[u]=_)}var A=T[i];A!==null&&(T[h]=null,T[i]=null,T[s]=null,A(p(void 0,!0))),T[d]=!0}),k.on("readable",y.bind(null,T)),T}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":295,_process:277}],293:[function(e,o,f){function r(u,d){var h=Object.keys(u);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(u);d&&(m=m.filter(function(g){return Object.getOwnPropertyDescriptor(u,g).enumerable})),h.push.apply(h,m)}return h}function a(u,d,h){return d in u?Object.defineProperty(u,d,{value:h,enumerable:!0,configurable:!0,writable:!0}):u[d]=h,u}function l(u,d){for(var h=0;h0?this.tail.next=g:this.head=g,this.tail=g,++this.length}},{key:"unshift",value:function(m){var g={data:m,next:this.head};this.length===0&&(this.tail=g),this.head=g,++this.length}},{key:"shift",value:function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(this.length===0)return"";for(var g=this.head,p=""+g.data;g=g.next;)p+=m+g.data;return p}},{key:"concat",value:function(m){if(this.length===0)return c.alloc(0);for(var g,p,v,y=c.allocUnsafe(m>>>0),x=this.head,w=0;x;)g=x.data,p=y,v=w,c.prototype.copy.call(g,p,v),w+=x.data.length,x=x.next;return y}},{key:"consume",value:function(m,g){var p;return my.length?y.length:m;if(x===y.length?v+=y:v+=y.slice(0,m),(m-=x)==0){x===y.length?(++p,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=y.slice(x));break}++p}return this.length-=p,v}},{key:"_getBuffer",value:function(m){var g=c.allocUnsafe(m),p=this.head,v=1;for(p.data.copy(g),m-=p.data.length;p=p.next;){var y=p.data,x=m>y.length?y.length:m;if(y.copy(g,g.length-m,0,x),(m-=x)==0){x===y.length?(++v,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=y.slice(x));break}++v}return this.length-=v,g}},{key:s,value:function(m,g){return i(this,function(p){for(var v=1;v0,function(T){v||(v=T),T&&x.forEach(u),b||(x.forEach(u),y(v))})});return g.reduce(d)}},{"../../../errors":286,"./end-of-stream":295}],298:[function(e,o,f){var r=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;o.exports={getHighWaterMark:function(a,l,c,i){var s=function(u,d,h){return u.highWaterMark!=null?u.highWaterMark:d?u[h]:null}(l,i,c);if(s!=null){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new r(i?c:"highWaterMark",s);return Math.floor(s)}return a.objectMode?16:16384}}},{"../../../errors":286}],299:[function(e,o,f){o.exports=e("events").EventEmitter},{events:84}],300:[function(e,o,f){var r=e("safe-buffer").Buffer,a=r.isEncoding||function(p){switch((p=""+p)&&p.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 l(p){var v;switch(this.encoding=function(y){var x=function(w){if(!w)return"utf8";for(var k;;)switch(w){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 w;default:if(k)return;w=(""+w).toLowerCase(),k=!0}}(y);if(typeof x!="string"&&(r.isEncoding===a||!a(y)))throw new Error("Unknown encoding: "+y);return x||y}(p),this.encoding){case"utf16le":this.text=s,this.end=u,v=4;break;case"utf8":this.fillLast=i,v=4;break;case"base64":this.text=d,this.end=h,v=3;break;default:return this.write=m,void(this.end=g)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(v)}function c(p){return p<=127?0:p>>5==6?2:p>>4==14?3:p>>3==30?4:p>>6==2?-1:-2}function i(p){var v=this.lastTotal-this.lastNeed,y=function(x,w,k){if((192&w[0])!=128)return x.lastNeed=0,"\uFFFD";if(x.lastNeed>1&&w.length>1){if((192&w[1])!=128)return x.lastNeed=1,"\uFFFD";if(x.lastNeed>2&&w.length>2&&(192&w[2])!=128)return x.lastNeed=2,"\uFFFD"}}(this,p);return y!==void 0?y:this.lastNeed<=p.length?(p.copy(this.lastChar,v,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(p.copy(this.lastChar,v,0,p.length),void(this.lastNeed-=p.length))}function s(p,v){if((p.length-v)%2==0){var y=p.toString("utf16le",v);if(y){var x=y.charCodeAt(y.length-1);if(x>=55296&&x<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=p[p.length-2],this.lastChar[1]=p[p.length-1],y.slice(0,-1)}return y}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=p[p.length-1],p.toString("utf16le",v,p.length-1)}function u(p){var v=p&&p.length?this.write(p):"";if(this.lastNeed){var y=this.lastTotal-this.lastNeed;return v+this.lastChar.toString("utf16le",0,y)}return v}function d(p,v){var y=(p.length-v)%3;return y===0?p.toString("base64",v):(this.lastNeed=3-y,this.lastTotal=3,y===1?this.lastChar[0]=p[p.length-1]:(this.lastChar[0]=p[p.length-2],this.lastChar[1]=p[p.length-1]),p.toString("base64",v,p.length-y))}function h(p){var v=p&&p.length?this.write(p):"";return this.lastNeed?v+this.lastChar.toString("base64",0,3-this.lastNeed):v}function m(p){return p.toString(this.encoding)}function g(p){return p&&p.length?this.write(p):""}f.StringDecoder=l,l.prototype.write=function(p){if(p.length===0)return"";var v,y;if(this.lastNeed){if((v=this.fillLast(p))===void 0)return"";y=this.lastNeed,this.lastNeed=0}else y=0;return y=0?(_>0&&(w.lastNeed=_-1),_):--T=0?(_>0&&(w.lastNeed=_-2),_):--T=0?(_>0&&(_===2?_=0:w.lastNeed=_-3),_):0}(this,p,v);if(!this.lastNeed)return p.toString("utf8",v);this.lastTotal=y;var x=p.length-(y-this.lastNeed);return p.copy(this.lastChar,0,x),p.toString("utf8",v,x)},l.prototype.fillLast=function(p){if(this.lastNeed<=p.length)return p.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);p.copy(this.lastChar,this.lastTotal-this.lastNeed,0,p.length),this.lastNeed-=p.length}},{"safe-buffer":284}],301:[function(e,o,f){(function(r,a){(function(){var l=e("assert"),c=e("debug")("stream-parser");o.exports=function(y){var x=y&&typeof y._transform=="function",w=y&&typeof y._write=="function";if(!x&&!w)throw new Error("must pass a Writable or Transform stream in");c("extending Parser into stream"),y._bytes=s,y._skipBytes=u,x&&(y._passthrough=d),x?y._transform=m:y._write=h};function i(y){c("initializing parser stream"),y._parserBytesLeft=0,y._parserBuffers=[],y._parserBuffered=0,y._parserState=-1,y._parserCallback=null,typeof y.push=="function"&&(y._parserOutput=y.push.bind(y)),y._parserInit=!0}function s(y,x){l(!this._parserCallback,'there is already a "callback" set!'),l(isFinite(y)&&y>0,'can only buffer a finite number of bytes > 0, got "'+y+'"'),this._parserInit||i(this),c("buffering %o bytes",y),this._parserBytesLeft=y,this._parserCallback=x,this._parserState=0}function u(y,x){l(!this._parserCallback,'there is already a "callback" set!'),l(y>0,'can only skip > 0 bytes, got "'+y+'"'),this._parserInit||i(this),c("skipping %o bytes",y),this._parserBytesLeft=y,this._parserCallback=x,this._parserState=1}function d(y,x){l(!this._parserCallback,'There is already a "callback" set!'),l(y>0,'can only pass through > 0 bytes, got "'+y+'"'),this._parserInit||i(this),c("passing through %o bytes",y),this._parserBytesLeft=y,this._parserCallback=x,this._parserState=2}function h(y,x,w){this._parserInit||i(this),c("write(%o bytes)",y.length),typeof x=="function"&&(w=x),p(this,y,null,w)}function m(y,x,w){this._parserInit||i(this),c("transform(%o bytes)",y.length),typeof x!="function"&&(x=this._parserOutput),p(this,y,x,w)}function g(y,x,w,k){if(y._parserBytesLeft-=x.length,c("%o bytes left for stream piece",y._parserBytesLeft),y._parserState===0?(y._parserBuffers.push(x),y._parserBuffered+=x.length):y._parserState===2&&w(x),y._parserBytesLeft!==0)return k;var b=y._parserCallback;if(b&&y._parserState===0&&y._parserBuffers.length>1&&(x=a.concat(y._parserBuffers,y._parserBuffered)),y._parserState!==0&&(x=null),y._parserCallback=null,y._parserBuffered=0,y._parserState=-1,y._parserBuffers.splice(0),b){var T=[];x&&T.push(x),w&&T.push(w);var _=b.length>T.length;_&&T.push(v(k));var S=b.apply(y,T);if(!_||k===S)return k}}var p=v(function y(x,w,k,b){return x._parserBytesLeft<=0?b(new Error("got data but not currently parsing anything")):w.length<=x._parserBytesLeft?function(){return g(x,w,k,b)}:function(){var T=w.slice(0,x._parserBytesLeft);return g(x,T,k,function(_){return _?b(_):w.length>T.length?function(){return y(x,w.slice(T.length),k,b)}:void 0})}});function v(y){return function(){for(var x=y.apply(this,arguments);typeof x=="function";)x=x();return x}}}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{_process:277,assert:75,buffer:85,debug:302}],302:[function(e,o,f){(function(r){(function(){function a(){var l;try{l=f.storage.debug}catch{}return!l&&r!==void 0&&"env"in r&&(l=r.env.DEBUG),l}(f=o.exports=e("./debug")).log=function(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},f.formatArgs=function(l){var c=this.useColors;if(l[0]=(c?"%c":"")+this.namespace+(c?" %c":" ")+l[0]+(c?"%c ":" ")+"+"+f.humanize(this.diff),!!c){var i="color: "+this.color;l.splice(1,0,i,"color: inherit");var s=0,u=0;l[0].replace(/%[a-zA-Z%]/g,function(d){d!=="%%"&&(s++,d==="%c"&&(u=s))}),l.splice(u,0,i)}},f.save=function(l){try{l==null?f.storage.removeItem("debug"):f.storage.debug=l}catch{}},f.load=a,f.useColors=function(){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+)/)},f.storage=typeof chrome<"u"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch{}}(),f.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],f.formatters.j=function(l){try{return JSON.stringify(l)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}},f.enable(a())}).call(this)}).call(this,e("_process"))},{"./debug":303,_process:277}],303:[function(e,o,f){var r;function a(l){function c(){if(c.enabled){var i=c,s=+new Date,u=s-(r||s);i.diff=u,i.prev=r,i.curr=s,r=s;for(var d=new Array(arguments.length),h=0;h0)return function(m){if(!((m=String(m)).length>100)){var g=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(m);if(!!g){var p=parseFloat(g[1]);switch((g[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*p;case"days":case"day":case"d":return p*c;case"hours":case"hour":case"hrs":case"hr":case"h":return p*l;case"minutes":case"minute":case"mins":case"min":case"m":return p*a;case"seconds":case"second":case"secs":case"sec":case"s":return p*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}}}(s);if(h==="number"&&isNaN(s)===!1)return u.long?i(d=s,c,"day")||i(d,l,"hour")||i(d,a,"minute")||i(d,r,"second")||d+" ms":function(m){return m>=c?Math.round(m/c)+"d":m>=l?Math.round(m/l)+"h":m>=a?Math.round(m/a)+"m":m>=r?Math.round(m/r)+"s":m+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}},{}],305:[function(e,o,f){var r=e("parenthesis");o.exports=function(a,l,c){if(a==null)throw Error("First argument should be a string");if(l==null)throw Error("Separator should be a string or a RegExp");c?(typeof c=="string"||Array.isArray(c))&&(c={ignore:c}):c={},c.escape==null&&(c.escape=!0),c.ignore==null?c.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof c.ignore=="string"&&(c.ignore=[c.ignore]),c.ignore=c.ignore.map(function(g){return g.length===1&&(g+=g),g}));var i=r.parse(a,{flat:!0,brackets:c.ignore}),s=i[0].split(l);if(c.escape){for(var u=[],d=0;d0;){k=T[T.length-1];var _=r[k];if(s[k]<_.length){for(var S=s[k];S<_.length;++S){var A=_[S];if(l[A]<0){l[A]=c[A]=g,i[A]=!0,g+=1,b.push(A),T.push(A);break}i[A]&&(c[k]=0|Math.min(c[k],c[A])),u[A]>=0&&d[k].push(u[A])}s[k]=S}else{if(c[k]===l[k]){var M=[],E=[],D=0;for(S=b.length-1;S>=0;--S){var O=b[S];if(i[O]=!1,M.push(O),E.push(d[O]),D+=d[O].length,u[O]=p.length,O===k){b.length=S;break}}p.push(M);var R=new Array(D);for(S=0;S1&&(m=1),m<-1&&(m=-1),(s*h-u*d<0?-1:1)*Math.acos(m)};f.default=function(s){var u=s.px,d=s.py,h=s.cx,m=s.cy,g=s.rx,p=s.ry,v=s.xAxisRotation,y=v===void 0?0:v,x=s.largeArcFlag,w=x===void 0?0:x,k=s.sweepFlag,b=k===void 0?0:k,T=[];if(g===0||p===0)return[];var _=Math.sin(y*a/360),S=Math.cos(y*a/360),A=S*(u-h)/2+_*(d-m)/2,M=-_*(u-h)/2+S*(d-m)/2;if(A===0&&M===0)return[];g=Math.abs(g),p=Math.abs(p);var E=Math.pow(A,2)/Math.pow(g,2)+Math.pow(M,2)/Math.pow(p,2);E>1&&(g*=Math.sqrt(E),p*=Math.sqrt(E));var D=function(W,K,te,Y,Z,re,U,q,$,ne,H,Q){var ee=Math.pow(Z,2),ie=Math.pow(re,2),ae=Math.pow(H,2),ue=Math.pow(Q,2),le=ee*ie-ee*ue-ie*ae;le<0&&(le=0),le/=ee*ue+ie*ae;var ge=(le=Math.sqrt(le)*(U===q?-1:1))*Z/re*Q,fe=le*-re/Z*H,me=ne*ge-$*fe+(W+te)/2,_e=$*ge+ne*fe+(K+Y)/2,we=(H-ge)/Z,Te=(Q-fe)/re,Oe=(-H-ge)/Z,de=(-Q-fe)/re,ye=i(1,0,we,Te),Me=i(we,Te,Oe,de);return q===0&&Me>0&&(Me-=a),q===1&&Me<0&&(Me+=a),[me,_e,ye,Me]}(u,d,h,m,g,p,w,b,_,S,A,M),O=r(D,4),R=O[0],z=O[1],L=O[2],P=O[3],N=Math.abs(P)/(a/4);Math.abs(1-N)<1e-7&&(N=1);var B=Math.max(Math.ceil(N),1);P/=B;for(var G=0;Gu[2]&&(u[2]=m[g+0]),m[g+1]>u[3]&&(u[3]=m[g+1]);return u}},{"abs-svg-path":70,assert:75,"is-svg-path":238,"normalize-svg-path":309,"parse-svg-path":250}],309:[function(e,o,f){o.exports=function(c){for(var i,s=[],u=0,d=0,h=0,m=0,g=null,p=null,v=0,y=0,x=0,w=c.length;x4?(u=k[k.length-4],d=k[k.length-3]):(u=v,d=y),s.push(k)}return s};var r=e("svg-arc-to-cubic-bezier");function a(c,i,s,u){return["C",c,i,s,u,s,u]}function l(c,i,s,u,d,h){return["C",c/3+2/3*s,i/3+2/3*u,d/3+2/3*s,h/3+2/3*u,d,h]}},{"svg-arc-to-cubic-bezier":307}],310:[function(e,o,f){var r,a=e("svg-path-bounds"),l=e("parse-svg-path"),c=e("draw-svg-path"),i=e("is-svg-path"),s=e("bitmap-sdf"),u=document.createElement("canvas"),d=u.getContext("2d");o.exports=function(h,m){if(!i(h))throw Error("Argument should be valid svg path string");m||(m={});var g,p;m.shape?(g=m.shape[0],p=m.shape[1]):(g=u.width=m.w||m.width||200,p=u.height=m.h||m.height||200);var v=Math.min(g,p),y=m.stroke||0,x=m.viewbox||m.viewBox||a(h),w=[g/(x[2]-x[0]),p/(x[3]-x[1])],k=Math.min(w[0]||0,w[1]||0)/2;if(d.fillStyle="black",d.fillRect(0,0,g,p),d.fillStyle="white",y&&(typeof y!="number"&&(y=1),d.strokeStyle=y>0?"white":"black",d.lineWidth=Math.abs(y)),d.translate(.5*g,.5*p),d.scale(k,k),function(){if(r!=null)return r;var _=document.createElement("canvas").getContext("2d");if(_.canvas.width=_.canvas.height=1,!window.Path2D)return r=!1;var S=new Path2D("M0,0h1v1h-1v-1Z");_.fillStyle="black",_.fill(S);var A=_.getImageData(0,0,1,1);return r=A&&A.data&&A.data[3]===255}()){var b=new Path2D(h);d.fill(b),y&&d.stroke(b)}else{var T=l(h);c(d,T),d.fill(),y&&d.stroke()}return d.setTransform(1,0,0,1,0,0),s(d,{cutoff:m.cutoff!=null?m.cutoff:.5,radius:m.radius!=null?m.radius:.5*v})}},{"bitmap-sdf":82,"draw-svg-path":126,"is-svg-path":238,"parse-svg-path":250,"svg-path-bounds":308}],311:[function(e,o,f){(function(r,a){(function(){var l=e("process/browser.js").nextTick,c=Function.prototype.apply,i=Array.prototype.slice,s={},u=0;function d(h,m){this._id=h,this._clearFn=m}f.setTimeout=function(){return new d(c.call(setTimeout,window,arguments),clearTimeout)},f.setInterval=function(){return new d(c.call(setInterval,window,arguments),clearInterval)},f.clearTimeout=f.clearInterval=function(h){h.close()},d.prototype.unref=d.prototype.ref=function(){},d.prototype.close=function(){this._clearFn.call(window,this._id)},f.enroll=function(h,m){clearTimeout(h._idleTimeoutId),h._idleTimeout=m},f.unenroll=function(h){clearTimeout(h._idleTimeoutId),h._idleTimeout=-1},f._unrefActive=f.active=function(h){clearTimeout(h._idleTimeoutId);var m=h._idleTimeout;m>=0&&(h._idleTimeoutId=setTimeout(function(){h._onTimeout&&h._onTimeout()},m))},f.setImmediate=typeof r=="function"?r:function(h){var m=u++,g=!(arguments.length<2)&&i.call(arguments,1);return s[m]=!0,l(function(){s[m]&&(g?h.apply(null,g):h.call(null),f.clearImmediate(m))}),m},f.clearImmediate=typeof a=="function"?a:function(h){delete s[h]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":277,timers:311}],312:[function(e,o,f){(function(r){var a=/^\s+/,l=/\s+$/,c=0,i=r.round,s=r.min,u=r.max,d=r.random;function h($,ne){if(ne=ne||{},($=$||"")instanceof h)return $;if(!(this instanceof h))return new h($,ne);var H=function(Q){var ee={r:0,g:0,b:0},ie=1,ae=null,ue=null,le=null,ge=!1,fe=!1;typeof Q=="string"&&(Q=function(Te){Te=Te.replace(a,"").replace(l,"").toLowerCase();var Oe,de=!1;if(R[Te])Te=R[Te],de=!0;else if(Te=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};return(Oe=U.rgb.exec(Te))?{r:Oe[1],g:Oe[2],b:Oe[3]}:(Oe=U.rgba.exec(Te))?{r:Oe[1],g:Oe[2],b:Oe[3],a:Oe[4]}:(Oe=U.hsl.exec(Te))?{h:Oe[1],s:Oe[2],l:Oe[3]}:(Oe=U.hsla.exec(Te))?{h:Oe[1],s:Oe[2],l:Oe[3],a:Oe[4]}:(Oe=U.hsv.exec(Te))?{h:Oe[1],s:Oe[2],v:Oe[3]}:(Oe=U.hsva.exec(Te))?{h:Oe[1],s:Oe[2],v:Oe[3],a:Oe[4]}:(Oe=U.hex8.exec(Te))?{r:B(Oe[1]),g:B(Oe[2]),b:B(Oe[3]),a:te(Oe[4]),format:de?"name":"hex8"}:(Oe=U.hex6.exec(Te))?{r:B(Oe[1]),g:B(Oe[2]),b:B(Oe[3]),format:de?"name":"hex"}:(Oe=U.hex4.exec(Te))?{r:B(Oe[1]+""+Oe[1]),g:B(Oe[2]+""+Oe[2]),b:B(Oe[3]+""+Oe[3]),a:te(Oe[4]+""+Oe[4]),format:de?"name":"hex8"}:(Oe=U.hex3.exec(Te))?{r:B(Oe[1]+""+Oe[1]),g:B(Oe[2]+""+Oe[2]),b:B(Oe[3]+""+Oe[3]),format:de?"name":"hex"}:!1}(Q)),typeof Q=="object"&&(q(Q.r)&&q(Q.g)&&q(Q.b)?(me=Q.r,_e=Q.g,we=Q.b,ee={r:255*P(me,255),g:255*P(_e,255),b:255*P(we,255)},ge=!0,fe=String(Q.r).substr(-1)==="%"?"prgb":"rgb"):q(Q.h)&&q(Q.s)&&q(Q.v)?(ae=W(Q.s),ue=W(Q.v),ee=function(Te,Oe,de){Te=6*P(Te,360),Oe=P(Oe,100),de=P(de,100);var ye=r.floor(Te),Me=Te-ye,ke=de*(1-Oe),Ee=de*(1-Me*Oe),ze=de*(1-(1-Me)*Oe),Fe=ye%6;return{r:255*[de,Ee,ke,ke,ze,de][Fe],g:255*[ze,de,de,Ee,ke,ke][Fe],b:255*[ke,ke,ze,de,de,Ee][Fe]}}(Q.h,ae,ue),ge=!0,fe="hsv"):q(Q.h)&&q(Q.s)&&q(Q.l)&&(ae=W(Q.s),le=W(Q.l),ee=function(Te,Oe,de){var ye,Me,ke;function Ee(Ve,Ke,Re){return Re<0&&(Re+=1),Re>1&&(Re-=1),Re<1/6?Ve+6*(Ke-Ve)*Re:Re<.5?Ke:Re<2/3?Ve+(Ke-Ve)*(2/3-Re)*6:Ve}if(Te=P(Te,360),Oe=P(Oe,100),de=P(de,100),Oe===0)ye=Me=ke=de;else{var ze=de<.5?de*(1+Oe):de+Oe-de*Oe,Fe=2*de-ze;ye=Ee(Fe,ze,Te+1/3),Me=Ee(Fe,ze,Te),ke=Ee(Fe,ze,Te-1/3)}return{r:255*ye,g:255*Me,b:255*ke}}(Q.h,ae,le),ge=!0,fe="hsl"),Q.hasOwnProperty("a")&&(ie=Q.a));var me,_e,we;return ie=L(ie),{ok:ge,format:Q.format||fe,r:s(255,u(ee.r,0)),g:s(255,u(ee.g,0)),b:s(255,u(ee.b,0)),a:ie}}($);this._originalInput=$,this._r=H.r,this._g=H.g,this._b=H.b,this._a=H.a,this._roundA=i(100*this._a)/100,this._format=ne.format||H.format,this._gradientType=ne.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=H.ok,this._tc_id=c++}function m($,ne,H){$=P($,255),ne=P(ne,255),H=P(H,255);var Q,ee,ie=u($,ne,H),ae=s($,ne,H),ue=(ie+ae)/2;if(ie==ae)Q=ee=0;else{var le=ie-ae;switch(ee=ue>.5?le/(2-ie-ae):le/(ie+ae),ie){case $:Q=(ne-H)/le+(ne>1)+720)%360;--ne;)Q.h=(Q.h+ee)%360,ie.push(h(Q));return ie}function O($,ne){ne=ne||6;for(var H=h($).toHsv(),Q=H.h,ee=H.s,ie=H.v,ae=[],ue=1/ne;ne--;)ae.push(h({h:Q,s:ee,v:ie})),ie=(ie+ue)%1;return ae}h.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 $=this.toRgb();return(299*$.r+587*$.g+114*$.b)/1e3},getLuminance:function(){var $,ne,H,Q=this.toRgb();return $=Q.r/255,ne=Q.g/255,H=Q.b/255,.2126*($<=.03928?$/12.92:r.pow(($+.055)/1.055,2.4))+.7152*(ne<=.03928?ne/12.92:r.pow((ne+.055)/1.055,2.4))+.0722*(H<=.03928?H/12.92:r.pow((H+.055)/1.055,2.4))},setAlpha:function($){return this._a=L($),this._roundA=i(100*this._a)/100,this},toHsv:function(){var $=g(this._r,this._g,this._b);return{h:360*$.h,s:$.s,v:$.v,a:this._a}},toHsvString:function(){var $=g(this._r,this._g,this._b),ne=i(360*$.h),H=i(100*$.s),Q=i(100*$.v);return this._a==1?"hsv("+ne+", "+H+"%, "+Q+"%)":"hsva("+ne+", "+H+"%, "+Q+"%, "+this._roundA+")"},toHsl:function(){var $=m(this._r,this._g,this._b);return{h:360*$.h,s:$.s,l:$.l,a:this._a}},toHslString:function(){var $=m(this._r,this._g,this._b),ne=i(360*$.h),H=i(100*$.s),Q=i(100*$.l);return this._a==1?"hsl("+ne+", "+H+"%, "+Q+"%)":"hsla("+ne+", "+H+"%, "+Q+"%, "+this._roundA+")"},toHex:function($){return p(this._r,this._g,this._b,$)},toHexString:function($){return"#"+this.toHex($)},toHex8:function($){return function(ne,H,Q,ee,ie){var ae=[G(i(ne).toString(16)),G(i(H).toString(16)),G(i(Q).toString(16)),G(K(ee))];return ie&&ae[0].charAt(0)==ae[0].charAt(1)&&ae[1].charAt(0)==ae[1].charAt(1)&&ae[2].charAt(0)==ae[2].charAt(1)&&ae[3].charAt(0)==ae[3].charAt(1)?ae[0].charAt(0)+ae[1].charAt(0)+ae[2].charAt(0)+ae[3].charAt(0):ae.join("")}(this._r,this._g,this._b,this._a,$)},toHex8String:function($){return"#"+this.toHex8($)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(100*P(this._r,255))+"%",g:i(100*P(this._g,255))+"%",b:i(100*P(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+i(100*P(this._r,255))+"%, "+i(100*P(this._g,255))+"%, "+i(100*P(this._b,255))+"%)":"rgba("+i(100*P(this._r,255))+"%, "+i(100*P(this._g,255))+"%, "+i(100*P(this._b,255))+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":!(this._a<1)&&(z[p(this._r,this._g,this._b,!0)]||!1)},toFilter:function($){var ne="#"+v(this._r,this._g,this._b,this._a),H=ne,Q=this._gradientType?"GradientType = 1, ":"";if($){var ee=h($);H="#"+v(ee._r,ee._g,ee._b,ee._a)}return"progid:DXImageTransform.Microsoft.gradient("+Q+"startColorstr="+ne+",endColorstr="+H+")"},toString:function($){var ne=!!$;$=$||this._format;var H=!1,Q=this._a<1&&this._a>=0;return ne||!Q||$!=="hex"&&$!=="hex6"&&$!=="hex3"&&$!=="hex4"&&$!=="hex8"&&$!=="name"?($==="rgb"&&(H=this.toRgbString()),$==="prgb"&&(H=this.toPercentageRgbString()),$!=="hex"&&$!=="hex6"||(H=this.toHexString()),$==="hex3"&&(H=this.toHexString(!0)),$==="hex4"&&(H=this.toHex8String(!0)),$==="hex8"&&(H=this.toHex8String()),$==="name"&&(H=this.toName()),$==="hsl"&&(H=this.toHslString()),$==="hsv"&&(H=this.toHsvString()),H||this.toHexString()):$==="name"&&this._a===0?this.toName():this.toRgbString()},clone:function(){return h(this.toString())},_applyModification:function($,ne){var H=$.apply(null,[this].concat([].slice.call(ne)));return this._r=H._r,this._g=H._g,this._b=H._b,this.setAlpha(H._a),this},lighten:function(){return this._applyModification(k,arguments)},brighten:function(){return this._applyModification(b,arguments)},darken:function(){return this._applyModification(T,arguments)},desaturate:function(){return this._applyModification(y,arguments)},saturate:function(){return this._applyModification(x,arguments)},greyscale:function(){return this._applyModification(w,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function($,ne){return $.apply(null,[this].concat([].slice.call(ne)))},analogous:function(){return this._applyCombination(D,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(E,arguments)},triad:function(){return this._applyCombination(A,arguments)},tetrad:function(){return this._applyCombination(M,arguments)}},h.fromRatio=function($,ne){if(typeof $=="object"){var H={};for(var Q in $)$.hasOwnProperty(Q)&&(H[Q]=Q==="a"?$[Q]:W($[Q]));$=H}return h($,ne)},h.equals=function($,ne){return!(!$||!ne)&&h($).toRgbString()==h(ne).toRgbString()},h.random=function(){return h.fromRatio({r:d(),g:d(),b:d()})},h.mix=function($,ne,H){H=H===0?0:H||50;var Q=h($).toRgb(),ee=h(ne).toRgb(),ie=H/100;return h({r:(ee.r-Q.r)*ie+Q.r,g:(ee.g-Q.g)*ie+Q.g,b:(ee.b-Q.b)*ie+Q.b,a:(ee.a-Q.a)*ie+Q.a})},h.readability=function($,ne){var H=h($),Q=h(ne);return(r.max(H.getLuminance(),Q.getLuminance())+.05)/(r.min(H.getLuminance(),Q.getLuminance())+.05)},h.isReadable=function($,ne,H){var Q,ee,ie=h.readability($,ne);switch(ee=!1,(Q=function(ae){var ue,le;return ue=((ae=ae||{level:"AA",size:"small"}).level||"AA").toUpperCase(),le=(ae.size||"small").toLowerCase(),ue!=="AA"&&ue!=="AAA"&&(ue="AA"),le!=="small"&&le!=="large"&&(le="small"),{level:ue,size:le}}(H)).level+Q.size){case"AAsmall":case"AAAlarge":ee=ie>=4.5;break;case"AAlarge":ee=ie>=3;break;case"AAAsmall":ee=ie>=7}return ee},h.mostReadable=function($,ne,H){var Q,ee,ie,ae,ue=null,le=0;ee=(H=H||{}).includeFallbackColors,ie=H.level,ae=H.size;for(var ge=0;gele&&(le=Q,ue=h(ne[ge]));return h.isReadable($,ue,{level:ie,size:ae})||!ee?ue:(H.includeFallbackColors=!1,h.mostReadable($,["#fff","#000"],H))};var R=h.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"},z=h.hexNames=function($){var ne={};for(var H in $)$.hasOwnProperty(H)&&(ne[$[H]]=H);return ne}(R);function L($){return $=parseFloat($),(isNaN($)||$<0||$>1)&&($=1),$}function P($,ne){(function(Q){return typeof Q=="string"&&Q.indexOf(".")!=-1&&parseFloat(Q)===1})($)&&($="100%");var H=function(Q){return typeof Q=="string"&&Q.indexOf("%")!=-1}($);return $=s(ne,u(0,parseFloat($))),H&&($=parseInt($*ne,10)/100),r.abs($-ne)<1e-6?1:$%ne/parseFloat(ne)}function N($){return s(1,u(0,$))}function B($){return parseInt($,16)}function G($){return $.length==1?"0"+$:""+$}function W($){return $<=1&&($=100*$+"%"),$}function K($){return r.round(255*parseFloat($)).toString(16)}function te($){return B($)/255}var Y,Z,re,U=(Z="[\\s|\\(]+("+(Y="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+Y+")[,|\\s]+("+Y+")\\s*\\)?",re="[\\s|\\(]+("+Y+")[,|\\s]+("+Y+")[,|\\s]+("+Y+")[,|\\s]+("+Y+")\\s*\\)?",{CSS_UNIT:new RegExp(Y),rgb:new RegExp("rgb"+Z),rgba:new RegExp("rgba"+re),hsl:new RegExp("hsl"+Z),hsla:new RegExp("hsla"+re),hsv:new RegExp("hsv"+Z),hsva:new RegExp("hsva"+re),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 q($){return!!U.CSS_UNIT.exec($)}o!==void 0&&o.exports?o.exports=h:window.tinycolor=h})(Math)},{}],313:[function(e,o,f){o.exports=a,o.exports.float32=o.exports.float=a,o.exports.fract32=o.exports.fract=function(l,c){if(l.length){if(l instanceof Float32Array)return new Float32Array(l.length);c instanceof Float32Array||(c=a(l));for(var i=0,s=c.length;ib&&(b=A[0]),A[1]T&&(T=A[1])}function S(A){switch(A.type){case"GeometryCollection":A.geometries.forEach(S);break;case"Point":_(A.coordinates);break;case"MultiPoint":A.coordinates.forEach(_)}}for(y in v.arcs.forEach(function(A){for(var M,E=-1,D=A.length;++Eb&&(b=M[0]),M[1]T&&(T=M[1])}),v.objects)S(v.objects[y]);return[w,k,b,T]}function i(v,y){var x=y.id,w=y.bbox,k=y.properties==null?{}:y.properties,b=s(v,y);return x==null&&w==null?{type:"Feature",properties:k,geometry:b}:w==null?{type:"Feature",id:x,properties:k,geometry:b}:{type:"Feature",id:x,bbox:w,properties:k,geometry:b}}function s(v,y){var x=l(v.transform),w=v.arcs;function k(A,M){M.length&&M.pop();for(var E=w[A<0?~A:A],D=0,O=E.length;D1)w=h(v,y,x);else for(k=0,w=new Array(b=v.arcs.length);k1)for(var M,E,D=1,O=T(A[0]);DO&&(E=A[0],A[0]=A[D],A[D]=E,O=M);return A}).filter(function(_){return _.length>0})}}function g(v,y){for(var x=0,w=v.length;x>>1;v[k]=2))throw new Error("n must be \u22652");var x,w=(_=v.bbox||c(v))[0],k=_[1],b=_[2],T=_[3];y={scale:[b-w?(b-w)/(x-1):1,T-k?(T-k)/(x-1):1],translate:[w,k]}}var _,S,A=p(y),M=v.objects,E={};function D(R){return A(R)}function O(R){var z;switch(R.type){case"GeometryCollection":z={type:"GeometryCollection",geometries:R.geometries.map(O)};break;case"Point":z={type:"Point",coordinates:D(R.coordinates)};break;case"MultiPoint":z={type:"MultiPoint",coordinates:R.coordinates.map(D)};break;default:return R}return R.id!=null&&(z.id=R.id),R.bbox!=null&&(z.bbox=R.bbox),R.properties!=null&&(z.properties=R.properties),z}for(S in M)E[S]=O(M[S]);return{type:"Topology",bbox:_,transform:y,objects:E,arcs:v.arcs.map(function(R){var z,L=0,P=1,N=R.length,B=new Array(N);for(B[0]=A(R[0],0);++L":(c.length>100&&(c=c.slice(0,99)+"\u2026"),c=c.replace(a,function(i){switch(i){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}))}},{"./safe-to-string":318}],320:[function(e,o,f){var r=e("../value/is"),a={object:!0,function:!0,undefined:!0};o.exports=function(l){return!!r(l)&&hasOwnProperty.call(a,typeof l)}},{"../value/is":326}],321:[function(e,o,f){var r=e("../lib/resolve-exception"),a=e("./is");o.exports=function(l){return a(l)?l:r(l,"%v is not a plain function",arguments[1])}},{"../lib/resolve-exception":317,"./is":322}],322:[function(e,o,f){var r=e("../function/is"),a=/^\s*class[\s{/}]/,l=Function.prototype.toString;o.exports=function(c){return!!r(c)&&!a.test(l.call(c))}},{"../function/is":316}],323:[function(e,o,f){var r=e("../object/is");o.exports=function(a){if(!r(a))return!1;try{return!!a.constructor&&a.constructor.prototype===a}catch{return!1}}},{"../object/is":320}],324:[function(e,o,f){var r=e("../value/is"),a=e("../object/is"),l=Object.prototype.toString;o.exports=function(c){if(!r(c))return null;if(a(c)){var i=c.toString;if(typeof i!="function"||i===l)return null}try{return""+c}catch{return null}}},{"../object/is":320,"../value/is":326}],325:[function(e,o,f){var r=e("../lib/resolve-exception"),a=e("./is");o.exports=function(l){return a(l)?l:r(l,"Cannot use %v",arguments[1])}},{"../lib/resolve-exception":317,"./is":326}],326:[function(e,o,f){o.exports=function(r){return r!=null}},{}],327:[function(e,o,f){(function(r){(function(){var a=e("bit-twiddle"),l=e("dup"),c=e("buffer").Buffer;r.__TYPEDARRAY_POOL||(r.__TYPEDARRAY_POOL={UINT8:l([32,0]),UINT16:l([32,0]),UINT32:l([32,0]),BIGUINT64:l([32,0]),INT8:l([32,0]),INT16:l([32,0]),INT32:l([32,0]),BIGINT64:l([32,0]),FLOAT:l([32,0]),DOUBLE:l([32,0]),DATA:l([32,0]),UINT8C:l([32,0]),BUFFER:l([32,0])});var i=typeof Uint8ClampedArray<"u",s=typeof BigUint64Array<"u",u=typeof BigInt64Array<"u",d=r.__TYPEDARRAY_POOL;d.UINT8C||(d.UINT8C=l([32,0])),d.BIGUINT64||(d.BIGUINT64=l([32,0])),d.BIGINT64||(d.BIGINT64=l([32,0])),d.BUFFER||(d.BUFFER=l([32,0]));var h=d.DATA,m=d.BUFFER;function g(O){if(O){var R=O.length||O.byteLength,z=a.log2(R);h[z].push(O)}}function p(O){O=a.nextPow2(O);var R=a.log2(O),z=h[R];return z.length>0?z.pop():new ArrayBuffer(O)}function v(O){return new Uint8Array(p(O),0,O)}function y(O){return new Uint16Array(p(2*O),0,O)}function x(O){return new Uint32Array(p(4*O),0,O)}function w(O){return new Int8Array(p(O),0,O)}function k(O){return new Int16Array(p(2*O),0,O)}function b(O){return new Int32Array(p(4*O),0,O)}function T(O){return new Float32Array(p(4*O),0,O)}function _(O){return new Float64Array(p(8*O),0,O)}function S(O){return i?new Uint8ClampedArray(p(O),0,O):v(O)}function A(O){return s?new BigUint64Array(p(8*O),0,O):null}function M(O){return u?new BigInt64Array(p(8*O),0,O):null}function E(O){return new DataView(p(O),0,O)}function D(O){O=a.nextPow2(O);var R=a.log2(O),z=m[R];return z.length>0?z.pop():new c(O)}f.free=function(O){if(c.isBuffer(O))m[a.log2(O.length)].push(O);else{if(Object.prototype.toString.call(O)!=="[object ArrayBuffer]"&&(O=O.buffer),!O)return;var R=O.length||O.byteLength,z=0|a.log2(R);h[z].push(O)}},f.freeUint8=f.freeUint16=f.freeUint32=f.freeBigUint64=f.freeInt8=f.freeInt16=f.freeInt32=f.freeBigInt64=f.freeFloat32=f.freeFloat=f.freeFloat64=f.freeDouble=f.freeUint8Clamped=f.freeDataView=function(O){g(O.buffer)},f.freeArrayBuffer=g,f.freeBuffer=function(O){m[a.log2(O.length)].push(O)},f.malloc=function(O,R){if(R===void 0||R==="arraybuffer")return p(O);switch(R){case"uint8":return v(O);case"uint16":return y(O);case"uint32":return x(O);case"int8":return w(O);case"int16":return k(O);case"int32":return b(O);case"float":case"float32":return T(O);case"double":case"float64":return _(O);case"uint8_clamped":return S(O);case"bigint64":return M(O);case"biguint64":return A(O);case"buffer":return D(O);case"data":case"dataview":return E(O);default:return null}return null},f.mallocArrayBuffer=p,f.mallocUint8=v,f.mallocUint16=y,f.mallocUint32=x,f.mallocInt8=w,f.mallocInt16=k,f.mallocInt32=b,f.mallocFloat32=f.mallocFloat=T,f.mallocFloat64=f.mallocDouble=_,f.mallocUint8Clamped=S,f.mallocBigUint64=A,f.mallocBigInt64=M,f.mallocDataView=E,f.mallocBuffer=D,f.clearCache=function(){for(var O=0;O<32;++O)d.UINT8[O].length=0,d.UINT16[O].length=0,d.UINT32[O].length=0,d.INT8[O].length=0,d.INT16[O].length=0,d.INT32[O].length=0,d.FLOAT[O].length=0,d.DOUBLE[O].length=0,d.BIGUINT64[O].length=0,d.BIGINT64[O].length=0,d.UINT8C[O].length=0,h[O].length=0,m[O].length=0}}).call(this)}).call(this,typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{})},{"bit-twiddle":81,buffer:85,dup:128}],328:[function(e,o,f){var r=/[\'\"]/;o.exports=function(a){return a?(r.test(a.charAt(0))&&(a=a.substr(1)),r.test(a.charAt(a.length-1))&&(a=a.substr(0,a.length-1)),a):""}},{}],329:[function(e,o,f){o.exports=function(r,a,l){Array.isArray(l)||(l=[].slice.call(arguments,2));for(var c=0,i=l.length;c2111)throw p.replace(/\{0\}/,this.local.name);return g},toMonthIndex:function(g,p,v){var y=this.intercalaryMonth(g);if(v&&p!==y||p<1||p>12)throw r.local.invalidMonth.replace(/\{0\}/,this.local.name);return y?!v&&p<=y?p-1:p:p-1},toChineseMonth:function(g,p){g.year&&(p=(g=g.year()).month());var v=this.intercalaryMonth(g);if(p<0||p>(v?12:11))throw r.local.invalidMonth.replace(/\{0\}/,this.local.name);return v?p>13},isIntercalaryMonth:function(g,p){g.year&&(p=(g=g.year()).month());var v=this.intercalaryMonth(g);return!!v&&v===p},leapYear:function(g){return this.intercalaryMonth(g)!==0},weekOfYear:function(g,p,v){var y,x=this._validateYear(g,r.local.invalidyear),w=m[x-m[0]],k=w>>9&4095,b=w>>5&15,T=31&w;(y=l.newDate(k,b,T)).add(4-(y.dayOfWeek()||7),"d");var _=this.toJD(g,p,v)-y.toJD();return 1+Math.floor(_/7)},monthsInYear:function(g){return this.leapYear(g)?13:12},daysInMonth:function(g,p){g.year&&(p=g.month(),g=g.year()),g=this._validateYear(g);var v=h[g-h[0]];if(p>(v>>13?12:11))throw r.local.invalidMonth.replace(/\{0\}/,this.local.name);return v&1<<12-p?30:29},weekDay:function(g,p,v){return(this.dayOfWeek(g,p,v)||7)<6},toJD:function(g,p,v){var y=this._validate(g,w,v,r.local.invalidDate);g=this._validateYear(y.year()),p=y.month(),v=y.day();var x=this.isIntercalaryMonth(g,p),w=this.toChineseMonth(g,p),k=function(b,T,_,S,A){var M,E,D;if(typeof b=="object")E=b,M=T||{};else{var O;if(!(typeof b=="number"&&b>=1888&&b<=2111))throw new Error("Lunar year outside range 1888-2111");if(!(typeof T=="number"&&T>=1&&T<=12))throw new Error("Lunar month outside range 1 - 12");if(!(typeof _=="number"&&_>=1&&_<=30))throw new Error("Lunar day outside range 1 - 30");typeof S=="object"?(O=!1,M=S):(O=!!S,M=A||{}),E={year:b,month:T,day:_,isIntercalary:O}}D=E.day-1;var R,z=h[E.year-h[0]],L=z>>13;R=L&&(E.month>L||E.isIntercalary)?E.month:E.month-1;for(var P=0;P>9&4095,(N>>5&15)-1,(31&N)+D);return M.year=B.getFullYear(),M.month=1+B.getMonth(),M.day=B.getDate(),M}(g,w,v,x);return l.toJD(k.year,k.month,k.day)},fromJD:function(g){var p=l.fromJD(g),v=function(x,w,k,b){var T,_;if(typeof x=="object")T=x,_=w||{};else{if(!(typeof x=="number"&&x>=1888&&x<=2111))throw new Error("Solar year outside range 1888-2111");if(!(typeof w=="number"&&w>=1&&w<=12))throw new Error("Solar month outside range 1 - 12");if(!(typeof k=="number"&&k>=1&&k<=31))throw new Error("Solar day outside range 1 - 31");T={year:x,month:w,day:k},_=b||{}}var S=m[T.year-m[0]],A=T.year<<9|T.month<<5|T.day;_.year=A>=S?T.year:T.year-1,S=m[_.year-m[0]];var M,E=new Date(S>>9&4095,(S>>5&15)-1,31&S),D=new Date(T.year,T.month-1,T.day);M=Math.round((D-E)/864e5);var O,R=h[_.year-h[0]];for(O=0;O<13;O++){var z=R&1<<12-O?30:29;if(M>13;return!L||O=2&&d<=6},extraInfo:function(i,s,u){var d=this._validate(i,s,u,r.local.invalidDate);return{century:c[Math.floor((d.year()-1)/100)+1]||""}},toJD:function(i,s,u){var d=this._validate(i,s,u,r.local.invalidDate);return i=d.year()+(d.year()<0?1:0),s=d.month(),(u=d.day())+(s>1?16:0)+(s>2?32*(s-2):0)+400*(i-1)+this.jdEpoch-1},fromJD:function(i){i=Math.floor(i+.5)-Math.floor(this.jdEpoch)-1;var s=Math.floor(i/400)+1;i-=400*(s-1),i+=i>15?16:0;var u=Math.floor(i/32)+1,d=i-32*(u-1)+1;return this.newDate(s<=0?s-1:s,u,d)}});var c={20:"Fruitbat",21:"Anchovy"};r.calendars.discworld=l},{"../main":346,"object-assign":247}],335:[function(e,o,f){var r=e("../main"),a=e("object-assign");function l(c){this.local=this.regionalOptions[c||""]||this.regionalOptions[""]}l.prototype=new r.baseCalendar,a(l.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(c){var i=this._validate(c,this.minMonth,this.minDay,r.local.invalidYear);return(c=i.year()+(i.year()<0?1:0))%4==3||c%4==-1},monthsInYear:function(c){return this._validate(c,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),13},weekOfYear:function(c,i,s){var u=this.newDate(c,i,s);return u.add(-u.dayOfWeek(),"d"),Math.floor((u.dayOfYear()-1)/7)+1},daysInMonth:function(c,i){var s=this._validate(c,i,this.minDay,r.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===13&&this.leapYear(s.year())?1:0)},weekDay:function(c,i,s){return(this.dayOfWeek(c,i,s)||7)<6},toJD:function(c,i,s){var u=this._validate(c,i,s,r.local.invalidDate);return(c=u.year())<0&&c++,u.day()+30*(u.month()-1)+365*(c-1)+Math.floor(c/4)+this.jdEpoch-1},fromJD:function(c){var i=Math.floor(c)+.5-this.jdEpoch,s=Math.floor((i-Math.floor((i+366)/1461))/365)+1;s<=0&&s--,i=Math.floor(c)+.5-this.newDate(s,1,1).toJD();var u=Math.floor(i/30)+1,d=i-30*(u-1)+1;return this.newDate(s,u,d)}}),r.calendars.ethiopian=l},{"../main":346,"object-assign":247}],336:[function(e,o,f){var r=e("../main"),a=e("object-assign");function l(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}function c(i,s){return i-s*Math.floor(i/s)}l.prototype=new r.baseCalendar,a(l.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,r.local.invalidYear);return this._leapYear(s.year())},_leapYear:function(i){return c(7*(i=i<0?i+1:i)+1,19)<7},monthsInYear:function(i){return this._validate(i,this.minMonth,this.minDay,r.local.invalidYear),this._leapYear(i.year?i.year():i)?13:12},weekOfYear:function(i,s,u){var d=this.newDate(i,s,u);return d.add(-d.dayOfWeek(),"d"),Math.floor((d.dayOfYear()-1)/7)+1},daysInYear:function(i){return i=this._validate(i,this.minMonth,this.minDay,r.local.invalidYear).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,r.local.invalidMonth),s===12&&this.leapYear(i)||s===8&&c(this.daysInYear(i),10)===5?30:s===9&&c(this.daysInYear(i),10)===3?29:this.daysPerMonth[s-1]},weekDay:function(i,s,u){return this.dayOfWeek(i,s,u)!==6},extraInfo:function(i,s,u){var d=this._validate(i,s,u,r.local.invalidDate);return{yearType:(this.leapYear(d)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(d)%10-3]}},toJD:function(i,s,u){var d=this._validate(i,s,u,r.local.invalidDate);i=d.year(),s=d.month(),u=d.day();var h=i<=0?i+1:i,m=this.jdEpoch+this._delay1(h)+this._delay2(h)+u+1;if(s<7){for(var g=7;g<=this.monthsInYear(i);g++)m+=this.daysInMonth(i,g);for(g=1;g=this.toJD(s===-1?1:s+1,7,1);)s++;for(var u=ithis.toJD(s,u,this.daysInMonth(s,u));)u++;var d=i-this.toJD(s,u,1)+1;return this.newDate(s,u,d)}}),r.calendars.hebrew=l},{"../main":346,"object-assign":247}],337:[function(e,o,f){var r=e("../main"),a=e("object-assign");function l(c){this.local=this.regionalOptions[c||""]||this.regionalOptions[""]}l.prototype=new r.baseCalendar,a(l.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\u012Bs","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(c){return(11*this._validate(c,this.minMonth,this.minDay,r.local.invalidYear).year()+14)%30<11},weekOfYear:function(c,i,s){var u=this.newDate(c,i,s);return u.add(-u.dayOfWeek(),"d"),Math.floor((u.dayOfYear()-1)/7)+1},daysInYear:function(c){return this.leapYear(c)?355:354},daysInMonth:function(c,i){var s=this._validate(c,i,this.minDay,r.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===12&&this.leapYear(s.year())?1:0)},weekDay:function(c,i,s){return this.dayOfWeek(c,i,s)!==5},toJD:function(c,i,s){var u=this._validate(c,i,s,r.local.invalidDate);return c=u.year(),i=u.month(),c=c<=0?c+1:c,(s=u.day())+Math.ceil(29.5*(i-1))+354*(c-1)+Math.floor((3+11*c)/30)+this.jdEpoch-1},fromJD:function(c){c=Math.floor(c)+.5;var i=Math.floor((30*(c-this.jdEpoch)+10646)/10631);i=i<=0?i-1:i;var s=Math.min(12,Math.ceil((c-29-this.toJD(i,1,1))/29.5)+1),u=c-this.toJD(i,s,1)+1;return this.newDate(i,s,u)}}),r.calendars.islamic=l},{"../main":346,"object-assign":247}],338:[function(e,o,f){var r=e("../main"),a=e("object-assign");function l(c){this.local=this.regionalOptions[c||""]||this.regionalOptions[""]}l.prototype=new r.baseCalendar,a(l.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(c){var i=this._validate(c,this.minMonth,this.minDay,r.local.invalidYear);return(c=i.year()<0?i.year()+1:i.year())%4==0},weekOfYear:function(c,i,s){var u=this.newDate(c,i,s);return u.add(4-(u.dayOfWeek()||7),"d"),Math.floor((u.dayOfYear()-1)/7)+1},daysInMonth:function(c,i){var s=this._validate(c,i,this.minDay,r.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===2&&this.leapYear(s.year())?1:0)},weekDay:function(c,i,s){return(this.dayOfWeek(c,i,s)||7)<6},toJD:function(c,i,s){var u=this._validate(c,i,s,r.local.invalidDate);return c=u.year(),i=u.month(),s=u.day(),c<0&&c++,i<=2&&(c--,i+=12),Math.floor(365.25*(c+4716))+Math.floor(30.6001*(i+1))+s-1524.5},fromJD:function(c){var i=Math.floor(c+.5)+1524,s=Math.floor((i-122.1)/365.25),u=Math.floor(365.25*s),d=Math.floor((i-u)/30.6001),h=d-Math.floor(d<14?1:13),m=s-Math.floor(h>2?4716:4715),g=i-u-Math.floor(30.6001*d);return m<=0&&m--,this.newDate(m,h,g)}}),r.calendars.julian=l},{"../main":346,"object-assign":247}],339:[function(e,o,f){var r=e("../main"),a=e("object-assign");function l(s){this.local=this.regionalOptions[s||""]||this.regionalOptions[""]}function c(s,u){return s-u*Math.floor(s/u)}function i(s,u){return c(s-1,u)+1}l.prototype=new r.baseCalendar,a(l.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,r.local.invalidYear),!1},formatYear:function(s){s=this._validate(s,this.minMonth,this.minDay,r.local.invalidYear).year();var u=Math.floor(s/400);return s%=400,s+=s<0?400:0,u+"."+Math.floor(s/20)+"."+s%20},forYear:function(s){if((s=s.split(".")).length<3)throw"Invalid Mayan year";for(var u=0,d=0;d19||d>0&&h<0)throw"Invalid Mayan year";u=20*u+h}return u},monthsInYear:function(s){return this._validate(s,this.minMonth,this.minDay,r.local.invalidYear),18},weekOfYear:function(s,u,d){return this._validate(s,u,d,r.local.invalidDate),0},daysInYear:function(s){return this._validate(s,this.minMonth,this.minDay,r.local.invalidYear),360},daysInMonth:function(s,u){return this._validate(s,u,this.minDay,r.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(s,u,d){return this._validate(s,u,d,r.local.invalidDate).day()},weekDay:function(s,u,d){return this._validate(s,u,d,r.local.invalidDate),!0},extraInfo:function(s,u,d){var h=this._validate(s,u,d,r.local.invalidDate).toJD(),m=this._toHaab(h),g=this._toTzolkin(h);return{haabMonthName:this.local.haabMonths[m[0]-1],haabMonth:m[0],haabDay:m[1],tzolkinDayName:this.local.tzolkinMonths[g[0]-1],tzolkinDay:g[0],tzolkinTrecena:g[1]}},_toHaab:function(s){var u=c((s-=this.jdEpoch)+8+340,365);return[Math.floor(u/20)+1,c(u,20)]},_toTzolkin:function(s){return[i((s-=this.jdEpoch)+20,20),i(s+4,13)]},toJD:function(s,u,d){var h=this._validate(s,u,d,r.local.invalidDate);return h.day()+20*h.month()+360*h.year()+this.jdEpoch},fromJD:function(s){s=Math.floor(s)+.5-this.jdEpoch;var u=Math.floor(s/360);s%=360,s+=s<0?360:0;var d=Math.floor(s/20),h=s%20;return this.newDate(u,d,h)}}),r.calendars.mayan=l},{"../main":346,"object-assign":247}],340:[function(e,o,f){var r=e("../main"),a=e("object-assign");function l(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}l.prototype=new r.baseCalendar;var c=r.instance("gregorian");a(l.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,r.local.invalidYear||r.regionalOptions[""].invalidYear);return c.leapYear(s.year()+(s.year()<1?1:0)+1469)},weekOfYear:function(i,s,u){var d=this.newDate(i,s,u);return d.add(1-(d.dayOfWeek()||7),"d"),Math.floor((d.dayOfYear()-1)/7)+1},daysInMonth:function(i,s){var u=this._validate(i,s,this.minDay,r.local.invalidMonth);return this.daysPerMonth[u.month()-1]+(u.month()===12&&this.leapYear(u.year())?1:0)},weekDay:function(i,s,u){return(this.dayOfWeek(i,s,u)||7)<6},toJD:function(i,s,u){var d=this._validate(i,s,u,r.local.invalidMonth);(i=d.year())<0&&i++;for(var h=d.day(),m=1;m=this.toJD(s+1,1,1);)s++;for(var u=i-Math.floor(this.toJD(s,1,1)+.5)+1,d=1;u>this.daysInMonth(s,d);)u-=this.daysInMonth(s,d),d++;return this.newDate(s,d,u)}}),r.calendars.nanakshahi=l},{"../main":346,"object-assign":247}],341:[function(e,o,f){var r=e("../main"),a=e("object-assign");function l(c){this.local=this.regionalOptions[c||""]||this.regionalOptions[""]}l.prototype=new r.baseCalendar,a(l.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(c){return this.daysInYear(c)!==this.daysPerYear},weekOfYear:function(c,i,s){var u=this.newDate(c,i,s);return u.add(-u.dayOfWeek(),"d"),Math.floor((u.dayOfYear()-1)/7)+1},daysInYear:function(c){if(c=this._validate(c,this.minMonth,this.minDay,r.local.invalidYear).year(),this.NEPALI_CALENDAR_DATA[c]===void 0)return this.daysPerYear;for(var i=0,s=this.minMonth;s<=12;s++)i+=this.NEPALI_CALENDAR_DATA[c][s];return i},daysInMonth:function(c,i){return c.year&&(i=c.month(),c=c.year()),this._validate(c,i,this.minDay,r.local.invalidMonth),this.NEPALI_CALENDAR_DATA[c]===void 0?this.daysPerMonth[i-1]:this.NEPALI_CALENDAR_DATA[c][i]},weekDay:function(c,i,s){return this.dayOfWeek(c,i,s)!==6},toJD:function(c,i,s){var u=this._validate(c,i,s,r.local.invalidDate);c=u.year(),i=u.month(),s=u.day();var d=r.instance(),h=0,m=i,g=c;this._createMissingCalendarData(c);var p=c-(m>9||m===9&&s>=this.NEPALI_CALENDAR_DATA[g][0]?56:57);for(i!==9&&(h=s,m--);m!==9;)m<=0&&(m=12,g--),h+=this.NEPALI_CALENDAR_DATA[g][m],m--;return i===9?(h+=s-this.NEPALI_CALENDAR_DATA[g][0])<0&&(h+=d.daysInYear(p)):h+=this.NEPALI_CALENDAR_DATA[g][9]-this.NEPALI_CALENDAR_DATA[g][0],d.newDate(p,1,1).add(h,"d").toJD()},fromJD:function(c){var i=r.instance().fromJD(c),s=i.year(),u=i.dayOfYear(),d=s+56;this._createMissingCalendarData(d);for(var h=9,m=this.NEPALI_CALENDAR_DATA[d][0],g=this.NEPALI_CALENDAR_DATA[d][h]-m+1;u>g;)++h>12&&(h=1,d++),g+=this.NEPALI_CALENDAR_DATA[d][h];var p=this.NEPALI_CALENDAR_DATA[d][h]-(g-u);return this.newDate(d,h,p)},_createMissingCalendarData:function(c){var i=this.daysPerMonth.slice(0);i.unshift(17);for(var s=c-1;s0?474:473))%2820+474+38)%2816<682},weekOfYear:function(i,s,u){var d=this.newDate(i,s,u);return d.add(-(d.dayOfWeek()+1)%7,"d"),Math.floor((d.dayOfYear()-1)/7)+1},daysInMonth:function(i,s){var u=this._validate(i,s,this.minDay,r.local.invalidMonth);return this.daysPerMonth[u.month()-1]+(u.month()===12&&this.leapYear(u.year())?1:0)},weekDay:function(i,s,u){return this.dayOfWeek(i,s,u)!==5},toJD:function(i,s,u){var d=this._validate(i,s,u,r.local.invalidDate);i=d.year(),s=d.month(),u=d.day();var h=i-(i>=0?474:473),m=474+c(h,2820);return u+(s<=7?31*(s-1):30*(s-1)+6)+Math.floor((682*m-110)/2816)+365*(m-1)+1029983*Math.floor(h/2820)+this.jdEpoch-1},fromJD:function(i){var s=(i=Math.floor(i)+.5)-this.toJD(475,1,1),u=Math.floor(s/1029983),d=c(s,1029983),h=2820;if(d!==1029982){var m=Math.floor(d/366),g=c(d,366);h=Math.floor((2134*m+2816*g+2815)/1028522)+m+1}var p=h+2820*u+474;p=p<=0?p-1:p;var v=i-this.toJD(p,1,1)+1,y=v<=186?Math.ceil(v/31):Math.ceil((v-6)/30),x=i-this.toJD(p,y,1)+1;return this.newDate(p,y,x)}}),r.calendars.persian=l,r.calendars.jalali=l},{"../main":346,"object-assign":247}],343:[function(e,o,f){var r=e("../main"),a=e("object-assign"),l=r.instance();function c(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}c.prototype=new r.baseCalendar,a(c.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(i){var s=this._validate(i,this.minMonth,this.minDay,r.local.invalidYear);return i=this._t2gYear(s.year()),l.leapYear(i)},weekOfYear:function(i,s,u){var d=this._validate(i,this.minMonth,this.minDay,r.local.invalidYear);return i=this._t2gYear(d.year()),l.weekOfYear(i,d.month(),d.day())},daysInMonth:function(i,s){var u=this._validate(i,s,this.minDay,r.local.invalidMonth);return this.daysPerMonth[u.month()-1]+(u.month()===2&&this.leapYear(u.year())?1:0)},weekDay:function(i,s,u){return(this.dayOfWeek(i,s,u)||7)<6},toJD:function(i,s,u){var d=this._validate(i,s,u,r.local.invalidDate);return i=this._t2gYear(d.year()),l.toJD(i,d.month(),d.day())},fromJD:function(i){var s=l.fromJD(i),u=this._g2tYear(s.year());return this.newDate(u,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)}}),r.calendars.taiwan=c},{"../main":346,"object-assign":247}],344:[function(e,o,f){var r=e("../main"),a=e("object-assign"),l=r.instance();function c(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}c.prototype=new r.baseCalendar,a(c.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(i){var s=this._validate(i,this.minMonth,this.minDay,r.local.invalidYear);return i=this._t2gYear(s.year()),l.leapYear(i)},weekOfYear:function(i,s,u){var d=this._validate(i,this.minMonth,this.minDay,r.local.invalidYear);return i=this._t2gYear(d.year()),l.weekOfYear(i,d.month(),d.day())},daysInMonth:function(i,s){var u=this._validate(i,s,this.minDay,r.local.invalidMonth);return this.daysPerMonth[u.month()-1]+(u.month()===2&&this.leapYear(u.year())?1:0)},weekDay:function(i,s,u){return(this.dayOfWeek(i,s,u)||7)<6},toJD:function(i,s,u){var d=this._validate(i,s,u,r.local.invalidDate);return i=this._t2gYear(d.year()),l.toJD(i,d.month(),d.day())},fromJD:function(i){var s=l.fromJD(i),u=this._g2tYear(s.year());return this.newDate(u,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)}}),r.calendars.thai=c},{"../main":346,"object-assign":247}],345:[function(e,o,f){var r=e("../main"),a=e("object-assign");function l(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}l.prototype=new r.baseCalendar,a(l.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\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","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,r.local.invalidYear);return this.daysInYear(s.year())===355},weekOfYear:function(i,s,u){var d=this.newDate(i,s,u);return d.add(-d.dayOfWeek(),"d"),Math.floor((d.dayOfYear()-1)/7)+1},daysInYear:function(i){for(var s=0,u=1;u<=12;u++)s+=this.daysInMonth(i,u);return s},daysInMonth:function(i,s){for(var u=this._validate(i,s,this.minDay,r.local.invalidMonth).toJD()-24e5+.5,d=0,h=0;hu)return c[d]-c[d-1];d++}return 30},weekDay:function(i,s,u){return this.dayOfWeek(i,s,u)!==5},toJD:function(i,s,u){var d=this._validate(i,s,u,r.local.invalidDate),h=12*(d.year()-1)+d.month()-15292;return d.day()+c[h-1]-1+24e5-.5},fromJD:function(i){for(var s=i-24e5+.5,u=0,d=0;ds);d++)u++;var h=u+15292,m=Math.floor((h-1)/12),g=m+1,p=h-12*m,v=s-c[u-1]+1;return this.newDate(g,p,v)},isValid:function(i,s,u){var d=r.baseCalendar.prototype.isValid.apply(this,arguments);return d&&(d=(i=i.year!=null?i.year:i)>=1276&&i<=1500),d},_validate:function(i,s,u,d){var h=r.baseCalendar.prototype._validate.apply(this,arguments);if(h.year<1276||h.year>1500)throw d.replace(/\{0\}/,this.local.name);return h}}),r.calendars.ummalqura=l;var c=[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]},{"../main":346,"object-assign":247}],346:[function(e,o,f){var r=e("object-assign");function a(){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={}}function l(d,h,m,g){if(this._calendar=d,this._year=h,this._month=m,this._day=g,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function c(d,h){return"000000".substring(0,h-(d=""+d).length)+d}function i(){this.shortYearCutoff="+10"}function s(d){this.local=this.regionalOptions[d]||this.regionalOptions[""]}r(a.prototype,{instance:function(d,h){d=(d||"gregorian").toLowerCase(),h=h||"";var m=this._localCals[d+"-"+h];if(!m&&this.calendars[d]&&(m=new this.calendars[d](h),this._localCals[d+"-"+h]=m),!m)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,d);return m},newDate:function(d,h,m,g,p){return(g=(d!=null&&d.year?d.calendar():typeof g=="string"?this.instance(g,p):g)||this.instance()).newDate(d,h,m)},substituteDigits:function(d){return function(h){return(h+"").replace(/[0-9]/g,function(m){return d[m]})}},substituteChineseDigits:function(d,h){return function(m){for(var g="",p=0;m>0;){var v=m%10;g=(v===0?"":d[v]+h[p])+g,p++,m=Math.floor(m/10)}return g.indexOf(d[1]+h[1])===0&&(g=g.substr(1)),g||d[0]}}}),r(l.prototype,{newDate:function(d,h,m){return this._calendar.newDate(d??this,h,m)},year:function(d){return arguments.length===0?this._year:this.set(d,"y")},month:function(d){return arguments.length===0?this._month:this.set(d,"m")},day:function(d){return arguments.length===0?this._day:this.set(d,"d")},date:function(d,h,m){if(!this._calendar.isValid(d,h,m))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=d,this._month=h,this._day=m,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(d,h){return this._calendar.add(this,d,h)},set:function(d,h){return this._calendar.set(this,d,h)},compareTo:function(d){if(this._calendar.name!==d._calendar.name)throw(u.local.differentCalendars||u.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,d._calendar.local.name);var h=this._year!==d._year?this._year-d._year:this._month!==d._month?this.monthOfYear()-d.monthOfYear():this._day-d._day;return h===0?0:h<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(d){return this._calendar.fromJD(d)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(d){return this._calendar.fromJSDate(d)},toString:function(){return(this.year()<0?"-":"")+c(Math.abs(this.year()),4)+"-"+c(this.month(),2)+"-"+c(this.day(),2)}}),r(i.prototype,{_validateLevel:0,newDate:function(d,h,m){return d==null?this.today():(d.year&&(this._validate(d,h,m,u.local.invalidDate||u.regionalOptions[""].invalidDate),m=d.day(),h=d.month(),d=d.year()),new l(this,d,h,m))},today:function(){return this.fromJSDate(new Date)},epoch:function(d){return this._validate(d,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(d){var h=this._validate(d,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return(h.year()<0?"-":"")+c(Math.abs(h.year()),4)},monthsInYear:function(d){return this._validate(d,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear),12},monthOfYear:function(d,h){var m=this._validate(d,h,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth);return(m.month()+this.monthsInYear(m)-this.firstMonth)%this.monthsInYear(m)+this.minMonth},fromMonthOfYear:function(d,h){var m=(h+this.firstMonth-2*this.minMonth)%this.monthsInYear(d)+this.minMonth;return this._validate(d,m,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth),m},daysInYear:function(d){var h=this._validate(d,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return this.leapYear(h)?366:365},dayOfYear:function(d,h,m){var g=this._validate(d,h,m,u.local.invalidDate||u.regionalOptions[""].invalidDate);return g.toJD()-this.newDate(g.year(),this.fromMonthOfYear(g.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(d,h,m){var g=this._validate(d,h,m,u.local.invalidDate||u.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(g))+2)%this.daysInWeek()},extraInfo:function(d,h,m){return this._validate(d,h,m,u.local.invalidDate||u.regionalOptions[""].invalidDate),{}},add:function(d,h,m){return this._validate(d,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate),this._correctAdd(d,this._add(d,h,m),h,m)},_add:function(d,h,m){if(this._validateLevel++,m==="d"||m==="w"){var g=d.toJD()+h*(m==="w"?this.daysInWeek():1),p=d.calendar().fromJD(g);return this._validateLevel--,[p.year(),p.month(),p.day()]}try{var v=d.year()+(m==="y"?h:0),y=d.monthOfYear()+(m==="m"?h:0);p=d.day(),m==="y"?(d.month()!==this.fromMonthOfYear(v,y)&&(y=this.newDate(v,d.month(),this.minDay).monthOfYear()),y=Math.min(y,this.monthsInYear(v)),p=Math.min(p,this.daysInMonth(v,this.fromMonthOfYear(v,y)))):m==="m"&&(function(w){for(;yk-1+w.minMonth;)v++,y-=k,k=w.monthsInYear(v)}(this),p=Math.min(p,this.daysInMonth(v,this.fromMonthOfYear(v,y))));var x=[v,this.fromMonthOfYear(v,y),p];return this._validateLevel--,x}catch(w){throw this._validateLevel--,w}},_correctAdd:function(d,h,m,g){if(!(this.hasYearZero||g!=="y"&&g!=="m"||h[0]!==0&&d.year()>0==h[0]>0)){var p={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[g],v=m<0?-1:1;h=this._add(d,m*p[0]+v*p[1],p[2])}return d.date(h[0],h[1],h[2])},set:function(d,h,m){this._validate(d,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate);var g=m==="y"?h:d.year(),p=m==="m"?h:d.month(),v=m==="d"?h:d.day();return m!=="y"&&m!=="m"||(v=Math.min(v,this.daysInMonth(g,p))),d.date(g,p,v)},isValid:function(d,h,m){this._validateLevel++;var g=this.hasYearZero||d!==0;if(g){var p=this.newDate(d,h,this.minDay);g=h>=this.minMonth&&h-this.minMonth=this.minDay&&m-this.minDay13.5?13:1),k=p-(w>2.5?4716:4715);return k<=0&&k--,this.newDate(k,w,x)},toJSDate:function(d,h,m){var g=this._validate(d,h,m,u.local.invalidDate||u.regionalOptions[""].invalidDate),p=new Date(g.year(),g.month()-1,g.day());return p.setHours(0),p.setMinutes(0),p.setSeconds(0),p.setMilliseconds(0),p.setHours(p.getHours()>12?p.getHours()+2:0),p},fromJSDate:function(d){return this.newDate(d.getFullYear(),d.getMonth()+1,d.getDate())}});var u=o.exports=new a;u.cdate=l,u.baseCalendar=i,u.calendars.gregorian=s},{"object-assign":247}],347:[function(e,o,f){var r=e("object-assign"),a=e("./main");r(a.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"}),a.local=a.regionalOptions[""],r(a.cdate.prototype,{formatDate:function(l,c){return typeof l!="string"&&(c=l,l=""),this._calendar.formatDate(l||"",this,c)}}),r(a.baseCalendar.prototype,{UNIX_EPOCH:a.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:a.instance().jdEpoch,TICKS_PER_DAY:864e9,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(l,c,i){if(typeof l!="string"&&(i=c,c=l,l=""),!c)return"";if(c.calendar()!==this)throw a.local.invalidFormat||a.regionalOptions[""].invalidFormat;l=l||this.local.dateFormat;for(var s,u,d,h,m=(i=i||{}).dayNamesShort||this.local.dayNamesShort,g=i.dayNames||this.local.dayNames,p=i.monthNumbers||this.local.monthNumbers,v=i.monthNamesShort||this.local.monthNamesShort,y=i.monthNames||this.local.monthNames,x=(i.calculateWeek||this.local.calculateWeek,function(D,O){for(var R=1;E+R1}),w=function(D,O,R,z){var L=""+O;if(x(D,z))for(;L.length1},S=function(N,B){var G=_(N,B),W=[2,3,G?4:2,G?4:2,10,11,20]["oyYJ@!".indexOf(N)+1],K=new RegExp("^-?\\d{1,"+W+"}"),te=c.substring(R).match(K);if(!te)throw(a.local.missingNumberAt||a.regionalOptions[""].missingNumberAt).replace(/\{0\}/,R);return R+=te[0].length,parseInt(te[0],10)},A=this,M=function(){if(typeof m=="function"){_("m");var N=m.call(A,c.substring(R));return R+=N.length,N}return S("m")},E=function(N,B,G,W){for(var K=_(N,W)?G:B,te=0;te-1){x=1,w=k;for(var P=this.daysInMonth(y,x);w>P;P=this.daysInMonth(y,x))x++,w-=P}return v>-1?this.fromJD(v):this.newDate(y,x,w)},determineDate:function(l,c,i,s,u){i&&typeof i!="object"&&(u=s,s=i,i=null),typeof s!="string"&&(u=s,s="");var d=this;return c=c?c.newDate():null,l=l==null?c:typeof l=="string"?function(h){try{return d.parseDate(s,h,u)}catch{}for(var m=((h=h.toLowerCase()).match(/^c/)&&i?i.newDate():null)||d.today(),g=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,p=g.exec(h);p;)m.add(parseInt(p[1],10),p[2]||"d"),p=g.exec(h);return m}(l):typeof l=="number"?isNaN(l)||l===1/0||l===-1/0?c:d.today().add(l,"d"):d.newDate(l)}})},{"./main":346,"object-assign":247}],348:[function(e,o,f){o.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}]},{}],349:[function(e,o,f){var r=e("./arrow_paths"),a=e("../../plots/font_attributes"),l=e("../../plots/cartesian/constants"),c=e("../../plot_api/plot_template").templatedArray;e("../../constants/axis_placeable_objects"),o.exports=c("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:a({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:r.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:r.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",l.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",l.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",l.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",l.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:a({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},{"../../constants/axis_placeable_objects":472,"../../plot_api/plot_template":543,"../../plots/cartesian/constants":561,"../../plots/font_attributes":585,"./arrow_paths":348}],350:[function(e,o,f){var r=e("../../lib"),a=e("../../plots/cartesian/axes"),l=e("./draw").draw;function c(s){var u=s._fullLayout;r.filterVisible(u.annotations).forEach(function(d){var h=a.getFromId(s,d.xref),m=a.getFromId(s,d.yref),g=a.getRefType(d.xref),p=a.getRefType(d.yref);d._extremes={},g==="range"&&i(d,h),p==="range"&&i(d,m)})}function i(s,u){var d,h=u._id,m=h.charAt(0),g=s[m],p=s["a"+m],v=s[m+"ref"],y=s["a"+m+"ref"],x=s["_"+m+"padplus"],w=s["_"+m+"padminus"],k={x:1,y:-1}[m]*s[m+"shift"],b=3*s.arrowsize*s.arrowwidth||0,T=b+k,_=b-k,S=3*s.startarrowsize*s.arrowwidth||0,A=S+k,M=S-k;if(y===v){var E=a.findExtremes(u,[u.r2c(g)],{ppadplus:T,ppadminus:_}),D=a.findExtremes(u,[u.r2c(p)],{ppadplus:Math.max(x,A),ppadminus:Math.max(w,M)});d={min:[E.min[0],D.min[0]],max:[E.max[0],D.max[0]]}}else A=p?A+p:A,M=p?M-p:M,d=a.findExtremes(u,[u.r2c(g)],{ppadplus:Math.max(x,T,A),ppadminus:Math.max(w,_,M)});s._extremes[h]=d}o.exports=function(s){var u=s._fullLayout;if(r.filterVisible(u.annotations).length&&s._fullData.length)return r.syncOrAsync([l,c],s)}},{"../../lib":503,"../../plots/cartesian/axes":554,"./draw":355}],351:[function(e,o,f){var r=e("../../lib"),a=e("../../registry"),l=e("../../plot_api/plot_template").arrayEditor;function c(s,u){var d,h,m,g,p,v,y,x=s._fullLayout.annotations,w=[],k=[],b=[],T=(u||[]).length;for(d=0;d0||d.explicitOff.length>0},onClick:function(s,u){var d,h,m=c(s,u),g=m.on,p=m.off.concat(m.explicitOff),v={},y=s._fullLayout.annotations;if(!(!g.length&&!p.length)){for(d=0;d2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[bt]}for(var Fe=!1,Ve=["x","y"],Ke=0;Ke1)&&(Pt===vt?((dt=At.r2fraction(T["a"+ft]))<0||dt>1)&&(Fe=!0):Fe=!0),Re=At._offset+At.r2p(T[ft]),Ye=.5}else{var Pe=Tt==="domain";ft==="x"?(We=T[ft],Re=Pe?At._offset+At._length*We:Re=R.l+R.w*We):(We=1-T[ft],Re=Pe?At._offset+At._length*We:Re=R.t+R.h*We),Ye=T.showarrow?.5:We}if(T.showarrow){Ge.head=Re;var Ie=T["a"+ft];if(nt=et*ze(.5,T.xanchor)-Ot*ze(.5,T.yanchor),Pt===vt){var Ae=s.getRefType(Pt);Ae==="domain"?(ft==="y"&&(Ie=1-Ie),Ge.tail=At._offset+At._length*Ie):Ae==="paper"?ft==="y"?(Ie=1-Ie,Ge.tail=R.t+R.h*Ie):Ge.tail=R.l+R.w*Ie:Ge.tail=At._offset+At.r2p(Ie),qe=nt}else Ge.tail=Re+Ie,qe=nt+Ie;Ge.text=Ge.tail+nt;var De=O[ft==="x"?"width":"height"];if(vt==="paper"&&(Ge.head=c.constrain(Ge.head,1,De-1)),Pt==="pixel"){var He=-Math.max(Ge.tail-3,Ge.text),rt=Math.min(Ge.tail+3,Ge.text)-De;He>0?(Ge.tail+=He,Ge.text+=He):rt>0&&(Ge.tail-=rt,Ge.text-=rt)}Ge.tail+=Be,Ge.head+=Be}else qe=nt=Wt*ze(Ye,Jt),Ge.text=Re+nt;Ge.text+=Be,nt+=Be,qe+=Be,T["_"+ft+"padplus"]=Wt/2+qe,T["_"+ft+"padminus"]=Wt/2-qe,T["_"+ft+"size"]=Wt,T["_"+ft+"shift"]=nt}if(Fe)U.remove();else{var lt=0,ot=0;if(T.align!=="left"&&(lt=(ye-Oe)*(T.align==="center"?.5:1)),T.valign!=="top"&&(ot=(Me-de)*(T.valign==="middle"?.5:1)),we)_e.select("svg").attr({x:ne+lt-1,y:ne+ot}).call(d.setClipUrl,Q?G:null,b);else{var kt=ne+ot-Te.top,wt=ne+lt-Te.left;ue.call(m.positionText,wt,kt).call(d.setClipUrl,Q?G:null,b)}ee.select("rect").call(d.setRect,ne,ne,ye,Me),H.call(d.setRect,q/2,q/2,ke-q,Ee-q),U.call(d.setTranslate,Math.round(W.x.text-ke/2),Math.round(W.y.text-Ee/2)),Y.attr({transform:"rotate("+K+","+W.x.text+","+W.y.text+")"});var Vt,Ut=function(tt,bt){te.selectAll(".annotation-arrow-g").remove();var zt=W.x.head,St=W.y.head,Dt=W.x.tail+tt,Le=W.y.tail+bt,Je=W.x.text+tt,st=W.y.text+bt,Et=c.rotationXYMatrix(K,Je,st),It=c.apply2DTransform(Et),Zt=c.apply2DTransform2(Et),Kt=+H.attr("width"),Ht=+H.attr("height"),mn=Je-.5*Kt,zn=mn+Kt,pn=st-.5*Ht,tn=pn+Ht,nn=[[mn,pn,mn,tn],[mn,tn,zn,tn],[zn,tn,zn,pn],[zn,pn,mn,pn]].map(Zt);if(!nn.reduce(function(Ln,lr){return Ln^!!c.segmentsIntersect(zt,St,zt+1e6,St+1e6,lr[0],lr[1],lr[2],lr[3])},!1)){nn.forEach(function(Ln){var lr=c.segmentsIntersect(Dt,Le,zt,St,Ln[0],Ln[1],Ln[2],Ln[3]);lr&&(Dt=lr.x,Le=lr.y)});var sn=T.arrowwidth,gn=T.arrowcolor,bn=T.arrowside,In=te.append("g").style({opacity:u.opacity(gn)}).classed("annotation-arrow-g",!0),Hn=In.append("path").attr("d","M"+Dt+","+Le+"L"+zt+","+St).style("stroke-width",sn+"px").call(u.stroke,u.rgb(gn));if(y(Hn,bn,T),z.annotationPosition&&Hn.node().parentNode&&!S){var Wn=zt,ar=St;if(T.standoff){var Or=Math.sqrt(Math.pow(zt-Dt,2)+Math.pow(St-Le,2));Wn+=T.standoff*(Dt-zt)/Or,ar+=T.standoff*(Le-St)/Or}var vr,Er,Kn=In.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Dt-Wn)+","+(Le-ar),transform:i(Wn,ar)}).style("stroke-width",sn+6+"px").call(u.stroke,"rgba(0,0,0,0)").call(u.fill,"rgba(0,0,0,0)");p.init({element:Kn.node(),gd:b,prepFn:function(){var Ln=d.getTranslate(U);vr=Ln.x,Er=Ln.y,A&&A.autorange&&P(A._name+".autorange",!0),M&&M.autorange&&P(M._name+".autorange",!0)},moveFn:function(Ln,lr){var Wr=It(vr,Er),Mn=Wr[0]+Ln,rr=Wr[1]+lr;U.call(d.setTranslate,Mn,rr),N("x",w(A,Ln,"x",R,T)),N("y",w(M,lr,"y",R,T)),T.axref===T.xref&&N("ax",w(A,Ln,"ax",R,T)),T.ayref===T.yref&&N("ay",w(M,lr,"ay",R,T)),In.attr("transform",i(Ln,lr)),Y.attr({transform:"rotate("+K+","+Mn+","+rr+")"})},doneFn:function(){a.call("_guiRelayout",b,B());var Ln=document.querySelector(".js-notes-box-panel");Ln&&Ln.redraw(Ln.selectedObj)}})}}};T.showarrow&&Ut(0,0),Z&&p.init({element:U.node(),gd:b,prepFn:function(){Vt=Y.attr("transform")},moveFn:function(tt,bt){var zt="pointer";if(T.showarrow)T.axref===T.xref?N("ax",w(A,tt,"ax",R,T)):N("ax",T.ax+tt),T.ayref===T.yref?N("ay",w(M,bt,"ay",R.w,T)):N("ay",T.ay+bt),Ut(tt,bt);else{if(S)return;var St,Dt;if(A)St=w(A,tt,"x",R,T);else{var Le=T._xsize/R.w,Je=T.x+(T._xshift-T.xshift)/R.w-Le/2;St=p.align(Je+tt/R.w,Le,0,1,T.xanchor)}if(M)Dt=w(M,bt,"y",R,T);else{var st=T._ysize/R.h,Et=T.y-(T._yshift+T.yshift)/R.h-st/2;Dt=p.align(Et-bt/R.h,st,0,1,T.yanchor)}N("x",St),N("y",Dt),A&&M||(zt=p.getCursor(A?.5:St,M?.5:Dt,T.xanchor,T.yanchor))}Y.attr({transform:i(tt,bt)+Vt}),g(U,zt)},clickFn:function(tt,bt){T.captureevents&&b.emit("plotly_clickannotation",le(bt))},doneFn:function(){g(U),a.call("_guiRelayout",b,B());var tt=document.querySelector(".js-notes-box-panel");tt&&tt.redraw(tt.selectedObj)}})}}}o.exports={draw:function(b){var T=b._fullLayout;T._infolayer.selectAll(".annotation").remove();for(var _=0;_=0,S=h.indexOf("end")>=0,A=w.backoff*b+m.standoff,M=k.backoff*T+m.startstandoff;if(x.nodeName==="line"){g={x:+d.attr("x1"),y:+d.attr("y1")},p={x:+d.attr("x2"),y:+d.attr("y2")};var E=g.x-p.x,D=g.y-p.y;if(y=(v=Math.atan2(D,E))+Math.PI,A&&M&&A+M>Math.sqrt(E*E+D*D))return void te();if(A){if(A*A>E*E+D*D)return void te();var O=A*Math.cos(v),R=A*Math.sin(v);p.x+=O,p.y+=R,d.attr({x2:p.x,y2:p.y})}if(M){if(M*M>E*E+D*D)return void te();var z=M*Math.cos(v),L=M*Math.sin(v);g.x-=z,g.y-=L,d.attr({x1:g.x,y1:g.y})}}else if(x.nodeName==="path"){var P=x.getTotalLength(),N="";if(P1){m=!0;break}}m?c.fullLayout._infolayer.select(".annotation-"+c.id+'[data-index="'+d+'"]').remove():(h._pdata=a(c.glplot.cameraParams,[i.xaxis.r2l(h.x)*s[0],i.yaxis.r2l(h.y)*s[1],i.zaxis.r2l(h.z)*s[2]]),r(c.graphDiv,h,d,c.id,h._xa,h._ya))}}},{"../../plots/gl3d/project":607,"../annotations/draw":355}],362:[function(e,o,f){var r=e("../../registry"),a=e("../../lib");o.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e("./attributes")}}},layoutAttributes:e("./attributes"),handleDefaults:e("./defaults"),includeBasePlot:function(l,c){var i=r.subplotsRegistry.gl3d;if(!!i)for(var s=i.attrRegex,u=Object.keys(l),d=0;d=0)))return h;if(y===3)p[y]>1&&(p[y]=1);else if(p[y]>=1)return h}var x=Math.round(255*p[0])+", "+Math.round(255*p[1])+", "+Math.round(255*p[2]);return v?"rgba("+x+", "+p[3]+")":"rgb("+x+")"}c.tinyRGB=function(h){var m=h.toRgb();return"rgb("+Math.round(m.r)+", "+Math.round(m.g)+", "+Math.round(m.b)+")"},c.rgb=function(h){return c.tinyRGB(r(h))},c.opacity=function(h){return h?r(h).getAlpha():0},c.addOpacity=function(h,m){var g=r(h).toRgb();return"rgba("+Math.round(g.r)+", "+Math.round(g.g)+", "+Math.round(g.b)+", "+m+")"},c.combine=function(h,m){var g=r(h).toRgb();if(g.a===1)return r(h).toRgbString();var p=r(m||u).toRgb(),v=p.a===1?p:{r:255*(1-p.a)+p.r*p.a,g:255*(1-p.a)+p.g*p.a,b:255*(1-p.a)+p.b*p.a},y={r:v.r*(1-g.a)+g.r*g.a,g:v.g*(1-g.a)+g.g*g.a,b:v.b*(1-g.a)+g.b*g.a};return r(y).toRgbString()},c.contrast=function(h,m,g){var p=r(h);return p.getAlpha()!==1&&(p=r(c.combine(h,u))),(p.isDark()?m?p.lighten(m):u:g?p.darken(g):s).toString()},c.stroke=function(h,m){var g=r(m);h.style({stroke:c.tinyRGB(g),"stroke-opacity":g.getAlpha()})},c.fill=function(h,m){var g=r(m);h.style({fill:c.tinyRGB(g),"fill-opacity":g.getAlpha()})},c.clean=function(h){if(h&&typeof h=="object"){var m,g,p,v,y=Object.keys(h);for(m=0;m0?Ie>=lt:Ie<=lt));Ae++)Ie>kt&&Ie0?Ie>=lt:Ie<=lt));Ae++)Ie>Pe[0]&&Ie1){var Pt=Math.pow(10,Math.floor(Math.log(vt)/Math.LN10));nt*=Pt*u.roundUp(vt/Pt,[2,5,10]),(Math.abs(we.start)/we.size+1e-6)%1<2e-6&&(We.tick0=0)}We.dtick=nt}We.domain=B?[Re+ne/ie.h,Re+Ee-ne/ie.h]:[Re+$/ie.w,Re+Ee-$/ie.w],We.setScale(),L.attr("transform",d(Math.round(ie.l),Math.round(ie.t)));var At,at=L.select("."+M.cbtitleunshift).attr("transform",d(-Math.round(ie.l),-Math.round(ie.t))),et=We.ticklabelposition,Ot=We.title.font.size,Wt=L.select("."+M.cbaxis),Jt=0,Be=0;function Ge(Tt,dt){var Pe={propContainer:We,propName:P._propPrefix+"title",traceIndex:P._traceIndex,_meta:P._meta,placeholder:ee._dfltTitle.colorbar,containerGroup:L.select("."+M.cbtitle)},Ie=Tt.charAt(0)==="h"?Tt.substr(1):"h"+Tt;L.selectAll("."+Ie+",."+Ie+"-math-group").remove(),v.draw(N,Tt,h(Pe,dt||{}))}return u.syncOrAsync([l.previousPromises,function(){var Tt,dt;(B&&Ye||!B&&!Ye)&&(ge==="top"&&(Tt=$+ie.l+ie.w*H,dt=ne+ie.t+ie.h*(1-Re-Ee)+3+.75*Ot),ge==="bottom"&&(Tt=$+ie.l+ie.w*H,dt=ne+ie.t+ie.h*(1-Re)-3-.25*Ot),ge==="right"&&(dt=ne+ie.t+ie.h*Q+3+.75*Ot,Tt=$+ie.l+ie.w*Re),Ge(We._id+"title",{attributes:{x:Tt,y:dt,"text-anchor":B?"start":"middle"}}))},function(){if(!B&&!Ye||B&&Ye){var Tt,dt=L.select("."+M.cbtitle),Pe=dt.select("text"),Ie=[-Y/2,Y/2],Ae=dt.select(".h"+We._id+"title-math-group").node(),De=15.6;if(Pe.node()&&(De=parseInt(Pe.node().style.fontSize,10)*_),Ae?(Tt=g.bBox(Ae),Be=Tt.width,(Jt=Tt.height)>De&&(Ie[1]-=(Jt-De)/2)):Pe.node()&&!Pe.classed(M.jsPlaceholder)&&(Tt=g.bBox(Pe.node()),Be=Tt.width,Jt=Tt.height),B){if(Jt){if(Jt+=5,ge==="top")We.domain[1]-=Jt/ie.h,Ie[1]*=-1;else{We.domain[0]+=Jt/ie.h;var He=y.lineCount(Pe);Ie[1]+=(1-He)*De}dt.attr("transform",d(Ie[0],Ie[1])),We.setScale()}}else Be&&(ge==="right"&&(We.domain[0]+=(Be+Ot/2)/ie.w),dt.attr("transform",d(Ie[0],Ie[1])),We.setScale())}L.selectAll("."+M.cbfills+",."+M.cblines).attr("transform",B?d(0,Math.round(ie.h*(1-We.domain[1]))):d(Math.round(ie.w*We.domain[0]),0)),Wt.attr("transform",B?d(0,Math.round(-ie.t)):d(Math.round(-ie.l),0));var rt=L.select("."+M.cbfills).selectAll("rect."+M.cbfill).attr("style","").data(Oe);rt.enter().append("rect").classed(M.cbfill,!0).style("stroke","none"),rt.exit().remove();var lt=fe.map(We.c2p).map(Math.round).sort(function(Ut,tt){return Ut-tt});rt.each(function(Ut,tt){var bt=[tt===0?fe[0]:(Oe[tt]+Oe[tt-1])/2,tt===Oe.length-1?fe[1]:(Oe[tt]+Oe[tt+1])/2].map(We.c2p).map(Math.round);B&&(bt[1]=u.constrain(bt[1]+(bt[1]>bt[0])?1:-1,lt[0],lt[1]));var zt=r.select(this).attr(B?"x":"y",ze).attr(B?"y":"x",r.min(bt)).attr(B?"width":"height",Math.max(ye,2)).attr(B?"height":"width",Math.max(r.max(bt)-r.min(bt),2));if(P._fillgradient)g.gradient(zt,N,P._id,B?"vertical":"horizontalreversed",P._fillgradient,"fill");else{var St=_e(Ut).replace("e-","");zt.attr("fill",a(St).toHexString())}});var ot=L.select("."+M.cblines).selectAll("path."+M.cbline).data(ue.color&&ue.width?de:[]);ot.enter().append("path").classed(M.cbline,!0),ot.exit().remove(),ot.each(function(Ut){var tt=ze,bt=Math.round(We.c2p(Ut))+ue.width/2%1;r.select(this).attr("d","M"+(B?tt+","+bt:bt+","+tt)+(B?"h":"v")+ye).call(g.lineGroupStyle,ue.width,me(Ut),ue.dash)}),Wt.selectAll("g."+We._id+"tick,path").remove();var kt=ze+ye+(Y||0)/2-(P.ticks==="outside"?1:0),wt=i.calcTicks(We),Vt=i.getTickSigns(We)[2];return i.drawTicks(N,We,{vals:We.ticks==="inside"?i.clipEnds(We,wt):wt,layer:Wt,path:i.makeTickPath(We,kt,Vt),transFn:i.makeTransTickFn(We)}),i.drawLabels(N,We,{vals:wt,layer:Wt,transFn:i.makeTransTickLabelFn(We),labelFns:i.makeLabelFns(We,kt)})},function(){if(B&&!Ye||!B&&Ye){var Tt,dt,Pe=We.position||0,Ie=We._offset+We._length/2;if(ge==="right")dt=Ie,Tt=ie.l+ie.w*Pe+10+Ot*(We.showticklabels?1:.5);else if(Tt=Ie,ge==="bottom"&&(dt=ie.t+ie.h*Pe+10+(et.indexOf("inside")===-1?We.tickfont.size:0)+(We.ticks!=="intside"&&P.ticklen||0)),ge==="top"){var Ae=le.text.split("
").length;dt=ie.t+ie.h*Pe+10-ye-_*Ot*Ae}Ge((B?"h":"v")+We._id+"title",{avoid:{selection:r.select(N).selectAll("g."+We._id+"tick"),side:ge,offsetTop:B?0:ie.t,offsetLeft:B?ie.l:0,maxShift:B?ee.width:ee.height},attributes:{x:Tt,y:dt,"text-anchor":"middle"},transform:{rotate:B?-90:0,offset:0}})}},l.previousPromises,function(){var Tt,dt=ye+Y/2;et.indexOf("inside")===-1&&(Tt=g.bBox(Wt.node()),dt+=B?Tt.width:Tt.height),At=at.select("text");var Pe=0,Ie=B&&ge==="top",Ae=!B&&ge==="right",De=0;if(At.node()&&!At.classed(M.jsPlaceholder)){var He,rt=at.select(".h"+We._id+"title-math-group").node();rt&&(B&&Ye||!B&&!Ye)?(Pe=(Tt=g.bBox(rt)).width,He=Tt.height):(Pe=(Tt=g.bBox(at.node())).right-ie.l-(B?ze:qe),He=Tt.bottom-ie.t-(B?qe:ze),B||ge!=="top"||(dt+=Tt.height,De=Tt.height)),Ae&&(At.attr("transform",d(Pe/2+Ot/2,0)),Pe*=2),dt=Math.max(dt,B?Pe:He)}var lt=2*(B?$:ne)+dt+Z+Y/2,ot=0;!B&&le.text&&q==="bottom"&&Q<=0&&(lt+=ot=lt/2,De+=ot),ee._hColorbarMoveTitle=ot,ee._hColorbarMoveCBTitle=De;var kt=Z+Y;L.select("."+M.cbbg).attr("x",(B?ze:qe)-kt/2-(B?$:0)).attr("y",(B?qe:ze)-(B?ke:ne+De-ot)).attr(B?"width":"height",Math.max(lt-ot,2)).attr(B?"height":"width",Math.max(ke+kt,2)).call(p.fill,re).call(p.stroke,P.bordercolor).style("stroke-width",Z);var wt=Ae?Math.max(Pe-10,0):0;if(L.selectAll("."+M.cboutline).attr("x",(B?ze:qe+$)+wt).attr("y",(B?qe+ne-ke:ze)+(Ie?Jt:0)).attr(B?"width":"height",Math.max(ye,2)).attr(B?"height":"width",Math.max(ke-(B?2*ne+Jt:2*$+wt),2)).call(p.stroke,P.outlinecolor).style({fill:"none","stroke-width":Y}),L.attr("transform",d(ie.l-(B?Fe*lt:0),ie.t-(B?0:(1-Ve)*lt-De))),!B&&(Z||a(re).getAlpha()&&!a.equals(ee.paper_bgcolor,re))){var Vt=Wt.selectAll("text"),Ut=Vt[0].length,tt=L.select("."+M.cbbg).node(),bt=g.bBox(tt),zt=g.getTranslate(L);Vt.each(function(It,Zt){var Kt=Ut-1;if(Zt===0||Zt===Kt){var Ht,mn=g.bBox(this),zn=g.getTranslate(this);if(Zt===Kt){var pn=mn.right+zn.x;(Ht=bt.right+zt.x+qe-Z-2+H-pn)>0&&(Ht=0)}else if(Zt===0){var tn=mn.left+zn.x;(Ht=bt.left+zt.x+qe+Z+2-tn)<0&&(Ht=0)}Ht&&(Ut<3?this.setAttribute("transform","translate("+Ht+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var St={},Dt=S[U],Le=A[U],Je=S[q],st=A[q],Et=lt-ye;B?(W==="pixels"?(St.y=Q,St.t=ke*Je,St.b=ke*st):(St.t=St.b=0,St.yt=Q+G*Je,St.yb=Q-G*st),te==="pixels"?(St.x=H,St.l=lt*Dt,St.r=lt*Le):(St.l=Et*Dt,St.r=Et*Le,St.xl=H-K*Dt,St.xr=H+K*Le)):(W==="pixels"?(St.x=H,St.l=ke*Dt,St.r=ke*Le):(St.l=St.r=0,St.xl=H+G*Dt,St.xr=H-G*Le),te==="pixels"?(St.y=1-Q,St.t=lt*Je,St.b=lt*st):(St.t=Et*Je,St.b=Et*st,St.yt=Q-K*Je,St.yb=Q+K*st)),l.autoMargin(N,P._id,St)}],N)}(R,O,E);z&&z.then&&(E._promises||[]).push(z),E._context.edits.colorbarPosition&&function(L,P,N){var B,G,W,K=P.orientation==="v",te=N._fullLayout._size;s.init({element:L.node(),gd:N,prepFn:function(){B=L.attr("transform"),m(L)},moveFn:function(Y,Z){L.attr("transform",B+d(Y,Z)),G=s.align((K?P._uFrac:P._vFrac)+Y/te.w,K?P._thickFrac:P._lenFrac,0,1,P.xanchor),W=s.align((K?P._vFrac:1-P._uFrac)-Z/te.h,K?P._lenFrac:P._thickFrac,0,1,P.yanchor);var re=s.getCursor(G,W,P.xanchor,P.yanchor);m(L,re)},doneFn:function(){if(m(L),G!==void 0&&W!==void 0){var Y={};Y[P._propPrefix+"x"]=G,Y[P._propPrefix+"y"]=W,P._traceIndex!==void 0?c.call("_guiRestyle",N,Y,P._traceIndex):c.call("_guiRelayout",N,Y)}}})}(R,O,E)}),D.exit().each(function(O){l.autoMargin(E,O._id)}).remove(),D.order()}}},{"../../constants/alignment":471,"../../lib":503,"../../lib/extend":493,"../../lib/setcursor":524,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../plots/cartesian/axis_defaults":556,"../../plots/cartesian/layout_attributes":569,"../../plots/cartesian/position_defaults":572,"../../plots/plots":619,"../../registry":638,"../color":366,"../colorscale/helpers":377,"../dragelement":385,"../drawing":388,"../titles":464,"./constants":368,"@plotly/d3":58,tinycolor2:312}],371:[function(e,o,f){var r=e("../../lib");o.exports=function(a){return r.isPlainObject(a.colorbar)}},{"../../lib":503}],372:[function(e,o,f){o.exports={moduleType:"component",name:"colorbar",attributes:e("./attributes"),supplyDefaults:e("./defaults"),draw:e("./draw").draw,hasColorbar:e("./has_colorbar")}},{"./attributes":367,"./defaults":369,"./draw":370,"./has_colorbar":371}],373:[function(e,o,f){var r=e("../colorbar/attributes"),a=e("../../lib/regex").counter,l=e("../../lib/sort_object_keys"),c=e("./scales.js").scales;l(c);function i(s){return"`"+s+"`"}o.exports=function(s,u){s=s||"";var d,h=(u=u||{}).cLetter||"c",m=("onlyIfNumerical"in u?u.onlyIfNumerical:Boolean(s),"noScale"in u?u.noScale:s==="marker.line"),g="showScaleDflt"in u?u.showScaleDflt:h==="z",p=typeof u.colorscaleDflt=="string"?c[u.colorscaleDflt]:null,v=u.editTypeOverride||"",y=s?s+".":"";"colorAttr"in u?(d=u.colorAttr,u.colorAttr):i(y+(d={z:"z",c:"color"}[h]));var x=h+"auto",w=h+"min",k=h+"max",b=h+"mid",T={};T[w]=T[k]=void 0;var _={};_[x]=!1;var S={};return d==="color"&&(S.color={valType:"color",arrayOk:!0,editType:v||"style"},u.anim&&(S.color.anim=!0)),S[x]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:T},S[w]={valType:"number",dflt:null,editType:v||"plot",impliedEdits:_},S[k]={valType:"number",dflt:null,editType:v||"plot",impliedEdits:_},S[b]={valType:"number",dflt:null,editType:"calc",impliedEdits:T},S.colorscale={valType:"colorscale",editType:"calc",dflt:p,impliedEdits:{autocolorscale:!1}},S.autocolorscale={valType:"boolean",dflt:u.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},S.reversescale={valType:"boolean",dflt:!1,editType:"plot"},m||(S.showscale={valType:"boolean",dflt:g,editType:"calc"},S.colorbar=r),u.noColorAxis||(S.coloraxis={valType:"subplotid",regex:a("coloraxis"),dflt:null,editType:"calc"}),S}},{"../../lib/regex":520,"../../lib/sort_object_keys":526,"../colorbar/attributes":367,"./scales.js":381}],374:[function(e,o,f){var r=e("fast-isnumeric"),a=e("../../lib"),l=e("./helpers").extractOpts;o.exports=function(c,i,s){var u,d=c._fullLayout,h=s.vals,m=s.containerStr,g=m?a.nestedProperty(i,m).get():i,p=l(g),v=p.auto!==!1,y=p.min,x=p.max,w=p.mid,k=function(){return a.aggNums(Math.min,null,h)},b=function(){return a.aggNums(Math.max,null,h)};y===void 0?y=k():v&&(y=g._colorAx&&r(y)?Math.min(y,k()):k()),x===void 0?x=b():v&&(x=g._colorAx&&r(x)?Math.max(x,b()):b()),v&&w!==void 0&&(x-w>w-y?y=w-(x-w):x-w=0?d.colorscale.sequential:d.colorscale.sequentialminus,p._sync("colorscale",u))}},{"../../lib":503,"./helpers":377,"fast-isnumeric":190}],375:[function(e,o,f){var r=e("../../lib"),a=e("./helpers").hasColorscale,l=e("./helpers").extractOpts;o.exports=function(c,i){function s(v,y){var x=v["_"+y];x!==void 0&&(v[y]=x)}function u(v,y){var x=y.container?r.nestedProperty(v,y.container).get():v;if(x)if(x.coloraxis)x._colorAx=i[x.coloraxis];else{var w=l(x),k=w.auto;(k||w.min===void 0)&&s(x,y.min),(k||w.max===void 0)&&s(x,y.max),w.autocolorscale&&s(x,"colorscale")}}for(var d=0;d=0;k--,b++){var T=y[k];w[b]=[1-T[0],T[1]]}return w}function p(y,x){x=x||{};for(var w=y.domain,k=y.range,b=k.length,T=new Array(b),_=0;_4/3-d?u:d}},{}],383:[function(e,o,f){var r=e("../../lib"),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];o.exports=function(l,c,i,s){return l=i==="left"?0:i==="center"?1:i==="right"?2:r.constrain(Math.floor(3*l),0,2),c=s==="bottom"?0:s==="middle"?1:s==="top"?2:r.constrain(Math.floor(3*c),0,2),a[c][l]}},{"../../lib":503}],384:[function(e,o,f){f.selectMode=function(r){return r==="lasso"||r==="select"},f.drawMode=function(r){return r==="drawclosedpath"||r==="drawopenpath"||r==="drawline"||r==="drawrect"||r==="drawcircle"},f.openMode=function(r){return r==="drawline"||r==="drawopenpath"},f.rectMode=function(r){return r==="select"||r==="drawline"||r==="drawrect"||r==="drawcircle"},f.freeMode=function(r){return r==="lasso"||r==="drawclosedpath"||r==="drawopenpath"},f.selectingOrDrawing=function(r){return f.freeMode(r)||f.rectMode(r)}},{}],385:[function(e,o,f){var r=e("mouse-event-offset"),a=e("has-hover"),l=e("has-passive-events"),c=e("../../lib").removeElement,i=e("../../plots/cartesian/constants"),s=o.exports={};s.align=e("./align"),s.getCursor=e("./cursor");var u=e("./unhover");function d(){var m=document.createElement("div");m.className="dragcover";var g=m.style;return g.position="fixed",g.left=0,g.right=0,g.top=0,g.bottom=0,g.zIndex=999999999,g.background="none",document.body.appendChild(m),m}function h(m){return r(m.changedTouches?m.changedTouches[0]:m,document.body)}s.unhover=u.wrapped,s.unhoverRaw=u.raw,s.init=function(m){var g,p,v,y,x,w,k,b,T=m.gd,_=1,S=T._context.doubleClickDelay,A=m.element;T._mouseDownTime||(T._mouseDownTime=0),A.style.pointerEvents="all",A.onmousedown=E,l?(A._ontouchstart&&A.removeEventListener("touchstart",A._ontouchstart),A._ontouchstart=E,A.addEventListener("touchstart",E,{passive:!1})):A.ontouchstart=E;var M=m.clampFn||function(R,z,L){return Math.abs(R)S&&(_=Math.max(_-1,1)),T._dragged)m.doneFn&&m.doneFn();else if(m.clickFn&&m.clickFn(_,w),!b){var z;try{z=new MouseEvent("click",R)}catch{var L=h(R);(z=document.createEvent("MouseEvents")).initMouseEvent("click",R.bubbles,R.cancelable,R.view,R.detail,R.screenX,R.screenY,L[0],L[1],R.ctrlKey,R.altKey,R.shiftKey,R.metaKey,R.button,R.relatedTarget)}k.dispatchEvent(z)}T._dragging=!1,T._dragged=!1}else T._dragged=!1}},s.coverSlip=d},{"../../lib":503,"../../plots/cartesian/constants":561,"./align":382,"./cursor":383,"./unhover":386,"has-hover":228,"has-passive-events":229,"mouse-event-offset":242}],386:[function(e,o,f){var r=e("../../lib/events"),a=e("../../lib/throttle"),l=e("../../lib/dom").getGraphDiv,c=e("../fx/constants"),i=o.exports={};i.wrapped=function(s,u,d){(s=l(s))._fullLayout&&a.clear(s._fullLayout._uid+c.HOVERID),i.raw(s,u,d)},i.raw=function(s,u){var d=s._fullLayout,h=s._hoverdata;u||(u={}),u.target&&!s._dragged&&r.triggerHandler(s,"plotly_beforehover",u)===!1||(d._hoverlayer.selectAll("g").remove(),d._hoverlayer.selectAll("line").remove(),d._hoverlayer.selectAll("circle").remove(),s._hoverdata=void 0,u.target&&h&&s.emit("plotly_unhover",{event:u,points:h}))}},{"../../lib/dom":491,"../../lib/events":492,"../../lib/throttle":530,"../fx/constants":400}],387:[function(e,o,f){f.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},f.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",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"}},{}],388:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),l=a.numberFormat,c=e("fast-isnumeric"),i=e("tinycolor2"),s=e("../../registry"),u=e("../color"),d=e("../colorscale"),h=a.strTranslate,m=e("../../lib/svg_text_utils"),g=e("../../constants/xmlns_namespaces"),p=e("../../constants/alignment").LINE_SPACING,v=e("../../constants/interactions").DESELECTDIM,y=e("../../traces/scatter/subtypes"),x=e("../../traces/scatter/make_bubble_size_func"),w=e("../../components/fx/helpers").appendArrayPointValue,k=o.exports={};function b(Y,Z,re){var U=Z.fillpattern,q=U&&k.getPatternAttr(U.shape,0,"");if(q){var $=k.getPatternAttr(U.bgcolor,0,null),ne=k.getPatternAttr(U.fgcolor,0,null),H=U.fgopacity,Q=k.getPatternAttr(U.size,0,8),ee=k.getPatternAttr(U.solidity,0,.3),ie=Z.uid;k.pattern(Y,"point",re,ie,q,Q,ee,void 0,U.fillmode,$,ne,H)}else Z.fillcolor&&Y.call(u.fill,Z.fillcolor)}k.font=function(Y,Z,re,U){a.isPlainObject(Z)&&(U=Z.color,re=Z.size,Z=Z.family),Z&&Y.style("font-family",Z),re+1&&Y.style("font-size",re+"px"),U&&Y.call(u.fill,U)},k.setPosition=function(Y,Z,re){Y.attr("x",Z).attr("y",re)},k.setSize=function(Y,Z,re){Y.attr("width",Z).attr("height",re)},k.setRect=function(Y,Z,re,U,q){Y.call(k.setPosition,Z,re).call(k.setSize,U,q)},k.translatePoint=function(Y,Z,re,U){var q=re.c2p(Y.x),$=U.c2p(Y.y);return!!(c(q)&&c($)&&Z.node())&&(Z.node().nodeName==="text"?Z.attr("x",q).attr("y",$):Z.attr("transform",h(q,$)),!0)},k.translatePoints=function(Y,Z,re){Y.each(function(U){var q=r.select(this);k.translatePoint(U,q,Z,re)})},k.hideOutsideRangePoint=function(Y,Z,re,U,q,$){Z.attr("display",re.isPtWithinRange(Y,q)&&U.isPtWithinRange(Y,$)?null:"none")},k.hideOutsideRangePoints=function(Y,Z){if(Z._hasClipOnAxisFalse){var re=Z.xaxis,U=Z.yaxis;Y.each(function(q){var $=q[0].trace,ne=$.xcalendar,H=$.ycalendar,Q=s.traceIs($,"bar-like")?".bartext":".point,.textpoint";Y.selectAll(Q).each(function(ee){k.hideOutsideRangePoint(ee,r.select(this),re,U,ne,H)})})}},k.crispRound=function(Y,Z,re){return Z&&c(Z)?Y._context.staticPlot?Z:Z<1?1:Math.round(Z):re||0},k.singleLineStyle=function(Y,Z,re,U,q){Z.style("fill","none");var $=(((Y||[])[0]||{}).trace||{}).line||{},ne=re||$.width||0,H=q||$.dash||"";u.stroke(Z,U||$.color),k.dashLine(Z,H,ne)},k.lineGroupStyle=function(Y,Z,re,U){Y.style("fill","none").each(function(q){var $=(((q||[])[0]||{}).trace||{}).line||{},ne=Z||$.width||0,H=U||$.dash||"";r.select(this).call(u.stroke,re||$.color).call(k.dashLine,H,ne)})},k.dashLine=function(Y,Z,re){re=+re||0,Z=k.dashStyle(Z,re),Y.style({"stroke-dasharray":Z,"stroke-width":re+"px"})},k.dashStyle=function(Y,Z){Z=+Z||1;var re=Math.max(Z,3);return Y==="solid"?Y="":Y==="dot"?Y=re+"px,"+re+"px":Y==="dash"?Y=3*re+"px,"+3*re+"px":Y==="longdash"?Y=5*re+"px,"+5*re+"px":Y==="dashdot"?Y=3*re+"px,"+re+"px,"+re+"px,"+re+"px":Y==="longdashdot"&&(Y=5*re+"px,"+2*re+"px,"+re+"px,"+2*re+"px"),Y},k.singleFillStyle=function(Y,Z){var re=r.select(Y.node());b(Y,((re.data()[0]||[])[0]||{}).trace||{},Z)},k.fillGroupStyle=function(Y,Z){Y.style("stroke-width",0).each(function(re){var U=r.select(this);re[0].trace&&b(U,re[0].trace,Z)})};var T=e("./symbol_defs");k.symbolNames=[],k.symbolFuncs=[],k.symbolNeedLines={},k.symbolNoDot={},k.symbolNoFill={},k.symbolList=[],Object.keys(T).forEach(function(Y){var Z=T[Y],re=Z.n;k.symbolList.push(re,String(re),Y,re+100,String(re+100),Y+"-open"),k.symbolNames[re]=Y,k.symbolFuncs[re]=Z.f,Z.needLine&&(k.symbolNeedLines[re]=!0),Z.noDot?k.symbolNoDot[re]=!0:k.symbolList.push(re+200,String(re+200),Y+"-dot",re+300,String(re+300),Y+"-open-dot"),Z.noFill&&(k.symbolNoFill[re]=!0)});var _=k.symbolNames.length;function S(Y,Z){var re=Y%100;return k.symbolFuncs[re](Z)+(Y>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}k.symbolNumber=function(Y){if(c(Y))Y=+Y;else if(typeof Y=="string"){var Z=0;Y.indexOf("-open")>0&&(Z=100,Y=Y.replace("-open","")),Y.indexOf("-dot")>0&&(Z+=200,Y=Y.replace("-dot","")),(Y=k.symbolNames.indexOf(Y))>=0&&(Y+=Z)}return Y%100>=_||Y>=400?0:Math.floor(Math.max(Y,0))};var A={x1:1,x2:0,y1:0,y2:0},M={x1:0,x2:0,y1:1,y2:0},E=l("~f"),D={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:A},horizontalreversed:{node:"linearGradient",attrs:A,reversed:!0},vertical:{node:"linearGradient",attrs:M},verticalreversed:{node:"linearGradient",attrs:M,reversed:!0}};k.gradient=function(Y,Z,re,U,q,$){for(var ne=q.length,H=D[U],Q=new Array(ne),ee=0;ee=100,Z.attr("d",S(Q,H))}var ee,ie,ae,ue=!1;if(Y.so)ae=ne.outlierwidth,ie=ne.outliercolor,ee=$.outliercolor;else{var le=(ne||{}).width;ae=(Y.mlw+1||le+1||(Y.trace?(Y.trace.marker.line||{}).width:0)+1)-1||0,ie="mlc"in Y?Y.mlcc=U.lineScale(Y.mlc):a.isArrayOrTypedArray(ne.color)?u.defaultLine:ne.color,a.isArrayOrTypedArray($.color)&&(ee=u.defaultLine,ue=!0),ee="mc"in Y?Y.mcc=U.markerScale(Y.mc):$.color||"rgba(0,0,0,0)",U.selectedColorFn&&(ee=U.selectedColorFn(Y))}if(Y.om)Z.call(u.stroke,ee).style({"stroke-width":(ae||1)+"px",fill:"none"});else{Z.style("stroke-width",(Y.isBlank?0:ae)+"px");var ge=$.gradient,fe=Y.mgt;fe?ue=!0:fe=ge&&ge.type,a.isArrayOrTypedArray(fe)&&(fe=fe[0],D[fe]||(fe=0));var me=$.pattern,_e=me&&k.getPatternAttr(me.shape,Y.i,"");if(fe&&fe!=="none"){var we=Y.mgc;we?ue=!0:we=ge.color;var Te=re.uid;ue&&(Te+="-"+Y.i),k.gradient(Z,q,Te,fe,[[0,we],[1,ee]],"fill")}else if(_e){var Oe=k.getPatternAttr(me.bgcolor,Y.i,null),de=k.getPatternAttr(me.fgcolor,Y.i,null),ye=me.fgopacity,Me=k.getPatternAttr(me.size,Y.i,8),ke=k.getPatternAttr(me.solidity,Y.i,.3),Ee=Y.mcc||a.isArrayOrTypedArray(me.shape)||a.isArrayOrTypedArray(me.bgcolor)||a.isArrayOrTypedArray(me.size)||a.isArrayOrTypedArray(me.solidity),ze=re.uid;Ee&&(ze+="-"+Y.i),k.pattern(Z,"point",q,ze,_e,Me,ke,Y.mcc,me.fillmode,Oe,de,ye)}else u.fill(Z,ee);ae&&u.stroke(Z,ie)}},k.makePointStyleFns=function(Y){var Z={},re=Y.marker;return Z.markerScale=k.tryColorscale(re,""),Z.lineScale=k.tryColorscale(re,"line"),s.traceIs(Y,"symbols")&&(Z.ms2mrc=y.isBubble(Y)?x(Y):function(){return(re.size||6)/2}),Y.selectedpoints&&a.extendFlat(Z,k.makeSelectedPointStyleFns(Y)),Z},k.makeSelectedPointStyleFns=function(Y){var Z={},re=Y.selected||{},U=Y.unselected||{},q=Y.marker||{},$=re.marker||{},ne=U.marker||{},H=q.opacity,Q=$.opacity,ee=ne.opacity,ie=Q!==void 0,ae=ee!==void 0;(a.isArrayOrTypedArray(H)||ie||ae)&&(Z.selectedOpacityFn=function(Oe){var de=Oe.mo===void 0?q.opacity:Oe.mo;return Oe.selected?ie?Q:de:ae?ee:v*de});var ue=q.color,le=$.color,ge=ne.color;(le||ge)&&(Z.selectedColorFn=function(Oe){var de=Oe.mcc||ue;return Oe.selected?le||de:ge||de});var fe=q.size,me=$.size,_e=ne.size,we=me!==void 0,Te=_e!==void 0;return s.traceIs(Y,"symbols")&&(we||Te)&&(Z.selectedSizeFn=function(Oe){var de=Oe.mrc||fe/2;return Oe.selected?we?me/2:de:Te?_e/2:de}),Z},k.makeSelectedTextStyleFns=function(Y){var Z={},re=Y.selected||{},U=Y.unselected||{},q=Y.textfont||{},$=re.textfont||{},ne=U.textfont||{},H=q.color,Q=$.color,ee=ne.color;return Z.selectedTextColorFn=function(ie){var ae=ie.tc||H;return ie.selected?Q||ae:ee||(Q?ae:u.addOpacity(ae,v))},Z},k.selectedPointStyle=function(Y,Z){if(Y.size()&&Z.selectedpoints){var re=k.makeSelectedPointStyleFns(Z),U=Z.marker||{},q=[];re.selectedOpacityFn&&q.push(function($,ne){$.style("opacity",re.selectedOpacityFn(ne))}),re.selectedColorFn&&q.push(function($,ne){u.fill($,re.selectedColorFn(ne))}),re.selectedSizeFn&&q.push(function($,ne){var H=ne.mx||U.symbol||0,Q=re.selectedSizeFn(ne);$.attr("d",S(k.symbolNumber(H),Q)),ne.mrc2=Q}),q.length&&Y.each(function($){for(var ne=r.select(this),H=0;H0?re:0}k.textPointStyle=function(Y,Z,re){if(Y.size()){var U;if(Z.selectedpoints){var q=k.makeSelectedTextStyleFns(Z);U=q.selectedTextColorFn}var $=Z.texttemplate,ne=re._fullLayout;Y.each(function(H){var Q=r.select(this),ee=$?a.extractOption(H,Z,"txt","texttemplate"):a.extractOption(H,Z,"tx","text");if(ee||ee===0){if($){var ie=Z._module.formatLabels,ae=ie?ie(H,Z,ne):{},ue={};w(ue,Z,H.i);var le=Z._meta||{};ee=a.texttemplateString(ee,ae,ne._d3locale,ue,H,le)}var ge=H.tp||Z.textposition,fe=z(H,Z),me=U?U(H):H.tc||Z.textfont.color;Q.call(k.font,H.tf||Z.textfont.family,fe,me).text(ee).call(m.convertToTspans,re).call(R,ge,fe,H.mrc)}else Q.remove()})}},k.selectedTextStyle=function(Y,Z){if(Y.size()&&Z.selectedpoints){var re=k.makeSelectedTextStyleFns(Z);Y.each(function(U){var q=r.select(this),$=re.selectedTextColorFn(U),ne=U.tp||Z.textposition,H=z(U,Z);u.fill(q,$);var Q=s.traceIs(Z,"bar-like");R(q,ne,H,U.mrc2||U.mrc,Q)})}};function L(Y,Z,re,U){var q=Y[0]-Z[0],$=Y[1]-Z[1],ne=re[0]-Z[0],H=re[1]-Z[1],Q=Math.pow(q*q+$*$,.25),ee=Math.pow(ne*ne+H*H,.25),ie=(ee*ee*q-Q*Q*ne)*U,ae=(ee*ee*$-Q*Q*H)*U,ue=3*ee*(Q+ee),le=3*Q*(Q+ee);return[[r.round(Z[0]+(ue&&ie/ue),2),r.round(Z[1]+(ue&&ae/ue),2)],[r.round(Z[0]-(le&&ie/le),2),r.round(Z[1]-(le&&ae/le),2)]]}k.smoothopen=function(Y,Z){if(Y.length<3)return"M"+Y.join("L");var re,U="M"+Y[0],q=[];for(re=1;re=1e4&&(k.savedBBoxes={},B=0),re&&(k.savedBBoxes[re]=le),B++,a.extendFlat({},le)},k.setClipUrl=function(Y,Z,re){Y.attr("clip-path",W(Z,re))},k.getTranslate=function(Y){var Z=(Y[Y.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(re,U,q){return[U,q].join(" ")}).split(" ");return{x:+Z[0]||0,y:+Z[1]||0}},k.setTranslate=function(Y,Z,re){var U=Y.attr?"attr":"getAttribute",q=Y.attr?"attr":"setAttribute",$=Y[U]("transform")||"";return Z=Z||0,re=re||0,$=$.replace(/(\btranslate\(.*?\);?)/,"").trim(),$=($+=h(Z,re)).trim(),Y[q]("transform",$),$},k.getScale=function(Y){var Z=(Y[Y.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(re,U,q){return[U,q].join(" ")}).split(" ");return{x:+Z[0]||1,y:+Z[1]||1}},k.setScale=function(Y,Z,re){var U=Y.attr?"attr":"getAttribute",q=Y.attr?"attr":"setAttribute",$=Y[U]("transform")||"";return Z=Z||1,re=re||1,$=$.replace(/(\bscale\(.*?\);?)/,"").trim(),$=($+="scale("+Z+","+re+")").trim(),Y[q]("transform",$),$};var K=/\s*sc.*/;k.setPointGroupScale=function(Y,Z,re){if(Z=Z||1,re=re||1,Y){var U=Z===1&&re===1?"":"scale("+Z+","+re+")";Y.each(function(){var q=(this.getAttribute("transform")||"").replace(K,"");q=(q+=U).trim(),this.setAttribute("transform",q)})}};var te=/translate\([^)]*\)\s*$/;k.setTextPointsScale=function(Y,Z,re){Y&&Y.each(function(){var U,q=r.select(this),$=q.select("text");if($.node()){var ne=parseFloat($.attr("x")||0),H=parseFloat($.attr("y")||0),Q=(q.attr("transform")||"").match(te);U=Z===1&&re===1?[]:[h(ne,H),"scale("+Z+","+re+")",h(-ne,-H)],Q&&U.push(Q),q.attr("transform",U.join(""))}})}},{"../../components/fx/helpers":402,"../../constants/alignment":471,"../../constants/interactions":478,"../../constants/xmlns_namespaces":480,"../../lib":503,"../../lib/svg_text_utils":529,"../../registry":638,"../../traces/scatter/make_bubble_size_func":944,"../../traces/scatter/subtypes":952,"../color":366,"../colorscale":378,"./symbol_defs":389,"@plotly/d3":58,"fast-isnumeric":190,tinycolor2:312}],389:[function(e,o,f){var r=e("@plotly/d3");o.exports={circle:{n:0,f:function(a){var l=r.round(a,2);return"M"+l+",0A"+l+","+l+" 0 1,1 0,-"+l+"A"+l+","+l+" 0 0,1 "+l+",0Z"}},square:{n:1,f:function(a){var l=r.round(a,2);return"M"+l+","+l+"H-"+l+"V-"+l+"H"+l+"Z"}},diamond:{n:2,f:function(a){var l=r.round(1.3*a,2);return"M"+l+",0L0,"+l+"L-"+l+",0L0,-"+l+"Z"}},cross:{n:3,f:function(a){var l=r.round(.4*a,2),c=r.round(1.2*a,2);return"M"+c+","+l+"H"+l+"V"+c+"H-"+l+"V"+l+"H-"+c+"V-"+l+"H-"+l+"V-"+c+"H"+l+"V-"+l+"H"+c+"Z"}},x:{n:4,f:function(a){var l=r.round(.8*a/Math.sqrt(2),2),c="l"+l+","+l,i="l"+l+",-"+l,s="l-"+l+",-"+l,u="l-"+l+","+l;return"M0,"+l+c+i+s+i+s+u+s+u+c+u+c+"Z"}},"triangle-up":{n:5,f:function(a){var l=r.round(2*a/Math.sqrt(3),2);return"M-"+l+","+r.round(a/2,2)+"H"+l+"L0,-"+r.round(a,2)+"Z"}},"triangle-down":{n:6,f:function(a){var l=r.round(2*a/Math.sqrt(3),2);return"M-"+l+",-"+r.round(a/2,2)+"H"+l+"L0,"+r.round(a,2)+"Z"}},"triangle-left":{n:7,f:function(a){var l=r.round(2*a/Math.sqrt(3),2);return"M"+r.round(a/2,2)+",-"+l+"V"+l+"L-"+r.round(a,2)+",0Z"}},"triangle-right":{n:8,f:function(a){var l=r.round(2*a/Math.sqrt(3),2);return"M-"+r.round(a/2,2)+",-"+l+"V"+l+"L"+r.round(a,2)+",0Z"}},"triangle-ne":{n:9,f:function(a){var l=r.round(.6*a,2),c=r.round(1.2*a,2);return"M-"+c+",-"+l+"H"+l+"V"+c+"Z"}},"triangle-se":{n:10,f:function(a){var l=r.round(.6*a,2),c=r.round(1.2*a,2);return"M"+l+",-"+c+"V"+l+"H-"+c+"Z"}},"triangle-sw":{n:11,f:function(a){var l=r.round(.6*a,2),c=r.round(1.2*a,2);return"M"+c+","+l+"H-"+l+"V-"+c+"Z"}},"triangle-nw":{n:12,f:function(a){var l=r.round(.6*a,2),c=r.round(1.2*a,2);return"M-"+l+","+c+"V-"+l+"H"+c+"Z"}},pentagon:{n:13,f:function(a){var l=r.round(.951*a,2),c=r.round(.588*a,2),i=r.round(-a,2),s=r.round(-.309*a,2);return"M"+l+","+s+"L"+c+","+r.round(.809*a,2)+"H-"+c+"L-"+l+","+s+"L0,"+i+"Z"}},hexagon:{n:14,f:function(a){var l=r.round(a,2),c=r.round(a/2,2),i=r.round(a*Math.sqrt(3)/2,2);return"M"+i+",-"+c+"V"+c+"L0,"+l+"L-"+i+","+c+"V-"+c+"L0,-"+l+"Z"}},hexagon2:{n:15,f:function(a){var l=r.round(a,2),c=r.round(a/2,2),i=r.round(a*Math.sqrt(3)/2,2);return"M-"+c+","+i+"H"+c+"L"+l+",0L"+c+",-"+i+"H-"+c+"L-"+l+",0Z"}},octagon:{n:16,f:function(a){var l=r.round(.924*a,2),c=r.round(.383*a,2);return"M-"+c+",-"+l+"H"+c+"L"+l+",-"+c+"V"+c+"L"+c+","+l+"H-"+c+"L-"+l+","+c+"V-"+c+"Z"}},star:{n:17,f:function(a){var l=1.4*a,c=r.round(.225*l,2),i=r.round(.951*l,2),s=r.round(.363*l,2),u=r.round(.588*l,2),d=r.round(-l,2),h=r.round(-.309*l,2),m=r.round(.118*l,2),g=r.round(.809*l,2);return"M"+c+","+h+"H"+i+"L"+s+","+m+"L"+u+","+g+"L0,"+r.round(.382*l,2)+"L-"+u+","+g+"L-"+s+","+m+"L-"+i+","+h+"H-"+c+"L0,"+d+"Z"}},hexagram:{n:18,f:function(a){var l=r.round(.66*a,2),c=r.round(.38*a,2),i=r.round(.76*a,2);return"M-"+i+",0l-"+c+",-"+l+"h"+i+"l"+c+",-"+l+"l"+c+","+l+"h"+i+"l-"+c+","+l+"l"+c+","+l+"h-"+i+"l-"+c+","+l+"l-"+c+",-"+l+"h-"+i+"Z"}},"star-triangle-up":{n:19,f:function(a){var l=r.round(a*Math.sqrt(3)*.8,2),c=r.round(.8*a,2),i=r.round(1.6*a,2),s=r.round(4*a,2),u="A "+s+","+s+" 0 0 1 ";return"M-"+l+","+c+u+l+","+c+u+"0,-"+i+u+"-"+l+","+c+"Z"}},"star-triangle-down":{n:20,f:function(a){var l=r.round(a*Math.sqrt(3)*.8,2),c=r.round(.8*a,2),i=r.round(1.6*a,2),s=r.round(4*a,2),u="A "+s+","+s+" 0 0 1 ";return"M"+l+",-"+c+u+"-"+l+",-"+c+u+"0,"+i+u+l+",-"+c+"Z"}},"star-square":{n:21,f:function(a){var l=r.round(1.1*a,2),c=r.round(2*a,2),i="A "+c+","+c+" 0 0 1 ";return"M-"+l+",-"+l+i+"-"+l+","+l+i+l+","+l+i+l+",-"+l+i+"-"+l+",-"+l+"Z"}},"star-diamond":{n:22,f:function(a){var l=r.round(1.4*a,2),c=r.round(1.9*a,2),i="A "+c+","+c+" 0 0 1 ";return"M-"+l+",0"+i+"0,"+l+i+l+",0"+i+"0,-"+l+i+"-"+l+",0Z"}},"diamond-tall":{n:23,f:function(a){var l=r.round(.7*a,2),c=r.round(1.4*a,2);return"M0,"+c+"L"+l+",0L0,-"+c+"L-"+l+",0Z"}},"diamond-wide":{n:24,f:function(a){var l=r.round(1.4*a,2),c=r.round(.7*a,2);return"M0,"+c+"L"+l+",0L0,-"+c+"L-"+l+",0Z"}},hourglass:{n:25,f:function(a){var l=r.round(a,2);return"M"+l+","+l+"H-"+l+"L"+l+",-"+l+"H-"+l+"Z"},noDot:!0},bowtie:{n:26,f:function(a){var l=r.round(a,2);return"M"+l+","+l+"V-"+l+"L-"+l+","+l+"V-"+l+"Z"},noDot:!0},"circle-cross":{n:27,f:function(a){var l=r.round(a,2);return"M0,"+l+"V-"+l+"M"+l+",0H-"+l+"M"+l+",0A"+l+","+l+" 0 1,1 0,-"+l+"A"+l+","+l+" 0 0,1 "+l+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(a){var l=r.round(a,2),c=r.round(a/Math.sqrt(2),2);return"M"+c+","+c+"L-"+c+",-"+c+"M"+c+",-"+c+"L-"+c+","+c+"M"+l+",0A"+l+","+l+" 0 1,1 0,-"+l+"A"+l+","+l+" 0 0,1 "+l+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(a){var l=r.round(a,2);return"M0,"+l+"V-"+l+"M"+l+",0H-"+l+"M"+l+","+l+"H-"+l+"V-"+l+"H"+l+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(a){var l=r.round(a,2);return"M"+l+","+l+"L-"+l+",-"+l+"M"+l+",-"+l+"L-"+l+","+l+"M"+l+","+l+"H-"+l+"V-"+l+"H"+l+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(a){var l=r.round(1.3*a,2);return"M"+l+",0L0,"+l+"L-"+l+",0L0,-"+l+"ZM0,-"+l+"V"+l+"M-"+l+",0H"+l},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(a){var l=r.round(1.3*a,2),c=r.round(.65*a,2);return"M"+l+",0L0,"+l+"L-"+l+",0L0,-"+l+"ZM-"+c+",-"+c+"L"+c+","+c+"M-"+c+","+c+"L"+c+",-"+c},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(a){var l=r.round(1.4*a,2);return"M0,"+l+"V-"+l+"M"+l+",0H-"+l},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(a){var l=r.round(a,2);return"M"+l+","+l+"L-"+l+",-"+l+"M"+l+",-"+l+"L-"+l+","+l},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(a){var l=r.round(1.2*a,2),c=r.round(.85*a,2);return"M0,"+l+"V-"+l+"M"+l+",0H-"+l+"M"+c+","+c+"L-"+c+",-"+c+"M"+c+",-"+c+"L-"+c+","+c},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(a){var l=r.round(a/2,2),c=r.round(a,2);return"M"+l+","+c+"V-"+c+"m-"+c+",0V"+c+"M"+c+","+l+"H-"+c+"m0,-"+c+"H"+c},needLine:!0,noFill:!0},"y-up":{n:37,f:function(a){var l=r.round(1.2*a,2),c=r.round(1.6*a,2),i=r.round(.8*a,2);return"M-"+l+","+i+"L0,0M"+l+","+i+"L0,0M0,-"+c+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(a){var l=r.round(1.2*a,2),c=r.round(1.6*a,2),i=r.round(.8*a,2);return"M-"+l+",-"+i+"L0,0M"+l+",-"+i+"L0,0M0,"+c+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(a){var l=r.round(1.2*a,2),c=r.round(1.6*a,2),i=r.round(.8*a,2);return"M"+i+","+l+"L0,0M"+i+",-"+l+"L0,0M-"+c+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(a){var l=r.round(1.2*a,2),c=r.round(1.6*a,2),i=r.round(.8*a,2);return"M-"+i+","+l+"L0,0M-"+i+",-"+l+"L0,0M"+c+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(a){var l=r.round(1.4*a,2);return"M"+l+",0H-"+l},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(a){var l=r.round(1.4*a,2);return"M0,"+l+"V-"+l},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(a){var l=r.round(a,2);return"M"+l+",-"+l+"L-"+l+","+l},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(a){var l=r.round(a,2);return"M"+l+","+l+"L-"+l+",-"+l},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(a){var l=r.round(a,2);return"M0,0L-"+l+","+r.round(2*a,2)+"H"+l+"Z"},noDot:!0},"arrow-down":{n:46,f:function(a){var l=r.round(a,2);return"M0,0L-"+l+",-"+r.round(2*a,2)+"H"+l+"Z"},noDot:!0},"arrow-left":{n:47,f:function(a){var l=r.round(2*a,2),c=r.round(a,2);return"M0,0L"+l+",-"+c+"V"+c+"Z"},noDot:!0},"arrow-right":{n:48,f:function(a){var l=r.round(2*a,2),c=r.round(a,2);return"M0,0L-"+l+",-"+c+"V"+c+"Z"},noDot:!0},"arrow-bar-up":{n:49,f:function(a){var l=r.round(a,2);return"M-"+l+",0H"+l+"M0,0L-"+l+","+r.round(2*a,2)+"H"+l+"Z"},needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(a){var l=r.round(a,2);return"M-"+l+",0H"+l+"M0,0L-"+l+",-"+r.round(2*a,2)+"H"+l+"Z"},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(a){var l=r.round(2*a,2),c=r.round(a,2);return"M0,-"+c+"V"+c+"M0,0L"+l+",-"+c+"V"+c+"Z"},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(a){var l=r.round(2*a,2),c=r.round(a,2);return"M0,-"+c+"V"+c+"M0,0L-"+l+",-"+c+"V"+c+"Z"},needLine:!0,noDot:!0}}},{"@plotly/d3":58}],390:[function(e,o,f){o.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",_deprecated:{opacity:{valType:"number",editType:"style"}}}},{}],391:[function(e,o,f){var r=e("fast-isnumeric"),a=e("../../registry"),l=e("../../plots/cartesian/axes"),c=e("../../lib"),i=e("./compute_error");function s(u,d,h,m){var g=d["error_"+m]||{},p=[];if(g.visible&&["linear","log"].indexOf(h.type)!==-1){for(var v=i(g),y=0;y0;s.each(function(p){var v,y=p[0].trace,x=y.error_x||{},w=y.error_y||{};y.ids&&(v=function(_){return _.id});var k=c.hasMarkers(y)&&y.marker.maxdisplayed>0;w.visible||x.visible||(p=[]);var b=r.select(this).selectAll("g.errorbar").data(p,v);if(b.exit().remove(),p.length){x.visible||b.selectAll("path.xerror").remove(),w.visible||b.selectAll("path.yerror").remove(),b.style("opacity",1);var T=b.enter().append("g").classed("errorbar",!0);g&&T.style("opacity",0).transition().duration(d.duration).style("opacity",1),l.setClipUrl(b,u.layerClipId,i),b.each(function(_){var S=r.select(this),A=function(z,L,P){var N={x:L.c2p(z.x),y:P.c2p(z.y)};return z.yh!==void 0&&(N.yh=P.c2p(z.yh),N.ys=P.c2p(z.ys),a(N.ys)||(N.noYS=!0,N.ys=P.c2p(z.ys,!0))),z.xh!==void 0&&(N.xh=L.c2p(z.xh),N.xs=L.c2p(z.xs),a(N.xs)||(N.noXS=!0,N.xs=L.c2p(z.xs,!0))),N}(_,h,m);if(!k||_.vis){var M,E=S.select("path.yerror");if(w.visible&&a(A.x)&&a(A.yh)&&a(A.ys)){var D=w.width;M="M"+(A.x-D)+","+A.yh+"h"+2*D+"m-"+D+",0V"+A.ys,A.noYS||(M+="m-"+D+",0h"+2*D),E.size()?g&&(E=E.transition().duration(d.duration).ease(d.easing)):E=S.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0),E.attr("d",M)}else E.remove();var O=S.select("path.xerror");if(x.visible&&a(A.y)&&a(A.xh)&&a(A.xs)){var R=(x.copy_ystyle?w:x).width;M="M"+A.xh+","+(A.y-R)+"v"+2*R+"m0,-"+R+"H"+A.xs,A.noXS||(M+="m0,-"+R+"v"+2*R),O.size()?g&&(O=O.transition().duration(d.duration).ease(d.easing)):O=S.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0),O.attr("d",M)}else O.remove()}})}})}},{"../../traces/scatter/subtypes":952,"../drawing":388,"@plotly/d3":58,"fast-isnumeric":190}],396:[function(e,o,f){var r=e("@plotly/d3"),a=e("../color");o.exports=function(l){l.each(function(c){var i=c[0].trace,s=i.error_y||{},u=i.error_x||{},d=r.select(this);d.selectAll("path.yerror").style("stroke-width",s.thickness+"px").call(a.stroke,s.color),u.copy_ystyle&&(u=s),d.selectAll("path.xerror").style("stroke-width",u.thickness+"px").call(a.stroke,u.color)})}},{"../color":366,"@plotly/d3":58}],397:[function(e,o,f){var r=e("../../plots/font_attributes"),a=e("./layout_attributes").hoverlabel,l=e("../../lib/extend").extendFlat;o.exports={hoverlabel:{bgcolor:l({},a.bgcolor,{arrayOk:!0}),bordercolor:l({},a.bordercolor,{arrayOk:!0}),font:r({arrayOk:!0,editType:"none"}),align:l({},a.align,{arrayOk:!0}),namelength:l({},a.namelength,{arrayOk:!0}),editType:"none"}}},{"../../lib/extend":493,"../../plots/font_attributes":585,"./layout_attributes":407}],398:[function(e,o,f){var r=e("../../lib"),a=e("../../registry");function l(c,i,s,u){u=u||r.identity,Array.isArray(c)&&(i[0][s]=u(c))}o.exports=function(c){var i=c.calcdata,s=c._fullLayout;function u(p){return function(v){return r.coerceHoverinfo({hoverinfo:v},{_module:p._module},s)}}for(var d=0;d=0&&h.indexde[0]._length||Pe<0||Pe>ye[0]._length)return p.unhoverRaw(ee,ie)}if(ie.pointerX=dt+de[0]._offset,ie.pointerY=Pe+ye[0]._offset,Re="xval"in ie?x.flat(ge,ie.xval):x.p2c(de,dt),qe="yval"in ie?x.flat(ge,ie.yval):x.p2c(ye,Pe),!a(Re[0])||!a(qe[0]))return c.warn("Fx.hover failed",ie,ee),p.unhoverRaw(ee,ie)}var De=1/0;function He(Mn,rr){for(Ye=0;YeWt&&(Jt.splice(0,Wt),De=Jt[0].distance),we&&Ke!==0&&Jt.length===0){Ot.distance=Ke,Ot.index=!1;var pr=ft._module.hoverPoints(Ot,at,et,"closest",{hoverLayer:fe._hoverlayer});if(pr&&(pr=pr.filter(function(fn){return fn.spikeDistance<=Ke})),pr&&pr.length){var qr,_i=pr.filter(function(fn){return fn.xa.showspikes&&fn.xa.spikesnap!=="hovered data"});if(_i.length){var cn=_i[0];a(cn.x0)&&a(cn.y0)&&(qr=lt(cn),(!Ge.vLinePoint||Ge.vLinePoint.spikeDistance>qr.spikeDistance)&&(Ge.vLinePoint=qr))}var jn=pr.filter(function(fn){return fn.ya.showspikes&&fn.ya.spikesnap!=="hovered data"});if(jn.length){var jt=jn[0];a(jt.x0)&&a(jt.y0)&&(qr=lt(jt),(!Ge.hLinePoint||Ge.hLinePoint.spikeDistance>qr.spikeDistance)&&(Ge.hLinePoint=qr))}}}}}function rt(Mn,rr,nr){for(var Bn,Fr=null,$r=1/0,pr=0;pr0&&Math.abs(Mn.distance)Le-1;Et--)Ht(Jt[Et]);Jt=It,Vt()}var mn=ee._hoverdata,zn=[],pn=Z(ee),tn=re(ee);for(We=0;We1||Jt.length>1)||Fe==="closest"&&Tt&&Jt.length>1,Ln=g.combine(fe.plot_bgcolor||g.background,fe.paper_bgcolor),lr=P(Jt,{gd:ee,hovermode:Fe,rotateLabels:Kn,bgColor:Ln,container:fe._hoverlayer,outerContainer:fe._paper.node(),commonLabelOpts:fe.hoverlabel,hoverdistance:fe.hoverdistance});if(x.isUnifiedHover(Fe)||(function(Mn,rr,nr){var Bn,Fr,$r,pr,qr,_i,cn,jn=0,jt=1,fn=Mn.size(),yn=new Array(fn),$n=0;function Un(Yn){var ir=Yn[0],or=Yn[Yn.length-1];if(Fr=ir.pmin-ir.pos-ir.dp+ir.size,$r=or.pos+or.dp+or.size-ir.pmax,Fr>.01){for(qr=Yn.length-1;qr>=0;qr--)Yn[qr].dp+=Fr;Bn=!1}if(!($r<.01)){if(Fr<-.01){for(qr=Yn.length-1;qr>=0;qr--)Yn[qr].dp-=$r;Bn=!1}if(Bn){var xr=0;for(pr=0;prir.pmax&&xr++;for(pr=Yn.length-1;pr>=0&&!(xr<=0);pr--)(_i=Yn[pr]).pos>ir.pmax-1&&(_i.del=!0,xr--);for(pr=0;pr=0;qr--)Yn[qr].dp-=$r;for(pr=Yn.length-1;pr>=0&&!(xr<=0);pr--)(_i=Yn[pr]).pos+_i.dp+_i.size>ir.pmax&&(_i.del=!0,xr--)}}}for(Mn.each(function(Yn){var ir=Yn[rr],or=ir._id.charAt(0)==="x",xr=ir.range;$n===0&&xr&&xr[0]>xr[1]!==or&&(jt=-1),yn[$n++]=[{datum:Yn,traceIndex:Yn.trace.index,dp:0,pos:Yn.pos,posref:Yn.posref,size:Yn.by*(or?S:1)/2,pmin:0,pmax:or?nr.width:nr.height}]}),yn.sort(function(Yn,ir){return Yn[0].posref-ir[0].posref||jt*(ir[0].traceIndex-Yn[0].traceIndex)});!Bn&&jn<=fn;){for(jn++,Bn=!0,pr=0;pr.01&&wn.pmin===kn.pmin&&wn.pmax===kn.pmax){for(qr=Rn.length-1;qr>=0;qr--)Rn[qr].dp+=Fr;for(Nn.push.apply(Nn,Rn),yn.splice(pr+1,1),cn=0,qr=Nn.length-1;qr>=0;qr--)cn+=Nn[qr].dp;for($r=cn/Nn.length,qr=Nn.length-1;qr>=0;qr--)Nn[qr].dp-=$r;Bn=!1}else pr++}yn.forEach(Un)}for(pr=yn.length-1;pr>=0;pr--){var Tn=yn[pr];for(qr=Tn.length-1;qr>=0;qr--){var Dn=Tn[qr],Zn=Dn.datum;Zn.offset=Dn.dp,Zn.del=Dn.del}}}(lr,Kn?"xa":"ya",fe),B(lr,Kn,fe._invScaleX,fe._invScaleY)),le&&le.tagName){var Wr=y.getComponentMethod("annotations","hasClickToShow")(ee,zn);h(r.select(le),Wr?"pointer":"")}!le||ue||!function(Mn,rr,nr){if(!nr||nr.length!==Mn._hoverdata.length)return!0;for(var Bn=nr.length-1;Bn>=0;Bn--){var Fr=nr[Bn],$r=Mn._hoverdata[Bn];if(Fr.curveNumber!==$r.curveNumber||String(Fr.pointNumber)!==String($r.pointNumber)||String(Fr.pointNumbers)!==String($r.pointNumbers))return!0}return!1}(ee,0,mn)||(mn&&ee.emit("plotly_unhover",{event:ie,points:mn}),ee.emit("plotly_hover",{event:ie,points:ee._hoverdata,xaxes:de,yaxes:ye,xvals:Re,yvals:qe}))})(q,$,ne,H,Q)})},f.loneHover=function(q,$){var ne=!0;Array.isArray(q)||(ne=!1,q=[q]);var H=$.gd,Q=Z(H),ee=re(H),ie=P(q.map(function(le){var ge=le._x0||le.x0||le.x||0,fe=le._x1||le.x1||le.x||0,me=le._y0||le.y0||le.y||0,_e=le._y1||le.y1||le.y||0,we=le.eventData;if(we){var Te=Math.min(ge,fe),Oe=Math.max(ge,fe),de=Math.min(me,_e),ye=Math.max(me,_e),Me=le.trace;if(y.traceIs(Me,"gl3d")){var ke=H._fullLayout[Me.scene]._scene.container,Ee=ke.offsetLeft,ze=ke.offsetTop;Te+=Ee,Oe+=Ee,de+=ze,ye+=ze}we.bbox={x0:Te+ee,x1:Oe+ee,y0:de+Q,y1:ye+Q},$.inOut_bbox&&$.inOut_bbox.push(we.bbox)}else we=!1;return{color:le.color||g.defaultLine,x0:le.x0||le.x||0,x1:le.x1||le.x||0,y0:le.y0||le.y||0,y1:le.y1||le.y||0,xLabel:le.xLabel,yLabel:le.yLabel,zLabel:le.zLabel,text:le.text,name:le.name,idealAlign:le.idealAlign,borderColor:le.borderColor,fontFamily:le.fontFamily,fontSize:le.fontSize,fontColor:le.fontColor,nameLength:le.nameLength,textAlign:le.textAlign,trace:le.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:le.hovertemplate||!1,hovertemplateLabels:le.hovertemplateLabels||!1,eventData:we}}),{gd:H,hovermode:"closest",rotateLabels:!1,bgColor:$.bgColor||g.background,container:r.select($.container),outerContainer:$.outerContainer||$.container}),ae=0,ue=0;return ie.sort(function(le,ge){return le.y0-ge.y0}).each(function(le,ge){var fe=le.y0-le.by/2;le.offset=fe-5([\s\S]*)<\/extra>/;function P(q,$){var ne=$.gd,H=ne._fullLayout,Q=$.hovermode,ee=$.rotateLabels,ie=$.bgColor,ae=$.container,ue=$.outerContainer,le=$.commonLabelOpts||{};if(q.length===0)return[[]];var ge=$.fontFamily||w.HOVERFONT,fe=$.fontSize||w.HOVERFONTSIZE,me=q[0],_e=me.xa,we=me.ya,Te=Q.charAt(0),Oe=me[Te+"Label"],de=U(ne,ue),ye=de.top,Me=de.width,ke=de.height,Ee=Oe!==void 0&&me.distance<=$.hoverdistance&&(Q==="x"||Q==="y");if(Ee){var ze,Fe,Ve=!0;for(ze=0;zeH.width-Kt?(st=H.width-Kt,bt.attr("d","M"+(Kt-E)+",0L"+Kt+","+Zt+E+"v"+Zt+(2*D+It.height)+"H-"+Kt+"V"+Zt+E+"H"+(Kt-2*E)+"Z")):bt.attr("d","M0,0L"+E+","+Zt+E+"H"+(D+It.width/2)+"v"+Zt+(2*D+It.height)+"H-"+(D+It.width/2)+"V"+Zt+E+"H-"+E+"Z")}else{var Ht,mn,zn;we.side==="right"?(Ht="start",mn=1,zn="",st=_e._offset+_e._length):(Ht="end",mn=-1,zn="-",st=_e._offset),Et=we._offset+(me.y0+me.y1)/2,zt.attr("text-anchor",Ht),bt.attr("d","M0,0L"+zn+E+","+E+"V"+(D+It.height/2)+"h"+zn+(2*D+It.width)+"V-"+(D+It.height/2)+"H"+zn+E+"V-"+E+"Z");var pn,tn=It.height/2,nn=ye-It.top-tn,sn="clip"+H._uid+"commonlabel"+we._id;if(st=0?Ge:Tt+Ie=0?Tt:wt+Ie=0?Jt:Be+Ae=0?Be:Vt+Ae=0,tt.idealAlign!=="top"&&Hn||!Wn?Hn?(tn+=sn/2,tt.anchor="start"):tt.anchor="middle":(tn-=sn/2,tt.anchor="end");else if(tt.pos=tn,Hn=pn+nn/2+ar<=Me,Wn=pn-nn/2-ar>=0,tt.idealAlign!=="left"&&Hn||!Wn)if(Hn)pn+=nn/2,tt.anchor="start";else{tt.anchor="middle";var Or=ar/2,vr=pn+Or-Me,Er=pn-Or;vr>0&&(pn-=vr),Er<0&&(pn+=-Er)}else pn-=nn/2,tt.anchor="end";Zt.attr("text-anchor",tt.anchor),Ht&&Kt.attr("text-anchor",tt.anchor),bt.attr("transform",i(pn,tn)+(ee?s(T):""))}),Ut}function N(q,$,ne,H,Q,ee){var ie="",ae="";q.nameOverride!==void 0&&(q.name=q.nameOverride),q.name&&(q.trace._meta&&(q.name=c.templateString(q.name,q.trace._meta)),ie=te(q.name,q.nameLength));var ue=ne.charAt(0),le=ue==="x"?"y":"x";q.zLabel!==void 0?(q.xLabel!==void 0&&(ae+="x: "+q.xLabel+"
"),q.yLabel!==void 0&&(ae+="y: "+q.yLabel+"
"),q.trace.type!=="choropleth"&&q.trace.type!=="choroplethmapbox"&&(ae+=(ae?"z: ":"")+q.zLabel)):$&&q[ue+"Label"]===Q?ae=q[le+"Label"]||"":q.xLabel===void 0?q.yLabel!==void 0&&q.trace.type!=="scattercarpet"&&(ae=q.yLabel):ae=q.yLabel===void 0?q.xLabel:"("+q.xLabel+", "+q.yLabel+")",!q.text&&q.text!==0||Array.isArray(q.text)||(ae+=(ae?"
":"")+q.text),q.extraText!==void 0&&(ae+=(ae?"
":"")+q.extraText),ee&&ae===""&&!q.hovertemplate&&(ie===""&&ee.remove(),ae=ie);var ge=q.hovertemplate||!1;if(ge){var fe=q.hovertemplateLabels||q;q[ue+"Label"]!==Q&&(fe[ue+"other"]=fe[ue+"Val"],fe[ue+"otherLabel"]=fe[ue+"Label"]),ae=(ae=c.hovertemplateString(ge,fe,H._d3locale,q.eventData[0]||{},q.trace._meta)).replace(L,function(me,_e){return ie=te(_e,q.nameLength),""})}return[ae,ie]}function B(q,$,ne,H){var Q=function(ie){return ie*ne},ee=function(ie){return ie*H};q.each(function(ie){var ae=r.select(this);if(ie.del)return ae.remove();var ue=ae.select("text.nums"),le=ie.anchor,ge=le==="end"?-1:1,fe={start:1,end:-1,middle:0}[le],me=fe*(E+D),_e=me+fe*(ie.txwidth+D),we=0,Te=ie.offset,Oe=le==="middle";Oe&&(me-=ie.tx2width/2,_e+=ie.txwidth/2+D),$&&(Te*=-M,we=ie.offset*A),ae.select("path").attr("d",Oe?"M-"+Q(ie.bx/2+ie.tx2width/2)+","+ee(Te-ie.by/2)+"h"+Q(ie.bx)+"v"+ee(ie.by)+"h-"+Q(ie.bx)+"Z":"M0,0L"+Q(ge*E+we)+","+ee(E+Te)+"v"+ee(ie.by/2-E)+"h"+Q(ge*ie.bx)+"v-"+ee(ie.by)+"H"+Q(ge*E+we)+"V"+ee(Te-E)+"Z");var de=we+me,ye=Te+ie.ty0-ie.by/2+D,Me=ie.textAlign||"auto";Me!=="auto"&&(Me==="left"&&le!=="start"?(ue.attr("text-anchor","start"),de=Oe?-ie.bx/2-ie.tx2width/2+D:-ie.bx-D):Me==="right"&&le!=="end"&&(ue.attr("text-anchor","end"),de=Oe?ie.bx/2-ie.tx2width/2-D:ie.bx+D)),ue.call(d.positionText,Q(de),ee(ye)),ie.tx2width&&(ae.select("text.name").call(d.positionText,Q(_e+fe*D+we),ee(Te+ie.ty0-ie.by/2+D)),ae.select("rect").call(m.setRect,Q(_e+(fe-1)*ie.tx2width/2+we),ee(Te-ie.by/2-1),Q(ie.tx2width),ee(ie.by+2)))})}function G(q,$){var ne=q.index,H=q.trace||{},Q=q.cd[0],ee=q.cd[ne]||{};function ie(me){return me||a(me)&&me===0}var ae=Array.isArray(ne)?function(me,_e){var we=c.castOption(Q,ne,me);return ie(we)?we:c.extractOption({},H,"",_e)}:function(me,_e){return c.extractOption(ee,H,me,_e)};function ue(me,_e,we){var Te=ae(_e,we);ie(Te)&&(q[me]=Te)}if(ue("hoverinfo","hi","hoverinfo"),ue("bgcolor","hbg","hoverlabel.bgcolor"),ue("borderColor","hbc","hoverlabel.bordercolor"),ue("fontFamily","htf","hoverlabel.font.family"),ue("fontSize","hts","hoverlabel.font.size"),ue("fontColor","htc","hoverlabel.font.color"),ue("nameLength","hnl","hoverlabel.namelength"),ue("textAlign","hta","hoverlabel.align"),q.posref=$==="y"||$==="closest"&&H.orientation==="h"?q.xa._offset+(q.x0+q.x1)/2:q.ya._offset+(q.y0+q.y1)/2,q.x0=c.constrain(q.x0,0,q.xa._length),q.x1=c.constrain(q.x1,0,q.xa._length),q.y0=c.constrain(q.y0,0,q.ya._length),q.y1=c.constrain(q.y1,0,q.ya._length),q.xLabelVal!==void 0&&(q.xLabel="xLabel"in q?q.xLabel:v.hoverLabelText(q.xa,q.xLabelVal,H.xhoverformat),q.xVal=q.xa.c2d(q.xLabelVal)),q.yLabelVal!==void 0&&(q.yLabel="yLabel"in q?q.yLabel:v.hoverLabelText(q.ya,q.yLabelVal,H.yhoverformat),q.yVal=q.ya.c2d(q.yLabelVal)),q.zLabelVal!==void 0&&q.zLabel===void 0&&(q.zLabel=String(q.zLabelVal)),!(isNaN(q.xerr)||q.xa.type==="log"&&q.xerr<=0)){var le=v.tickText(q.xa,q.xa.c2l(q.xerr),"hover").text;q.xerrneg!==void 0?q.xLabel+=" +"+le+" / -"+v.tickText(q.xa,q.xa.c2l(q.xerrneg),"hover").text:q.xLabel+=" \xB1 "+le,$==="x"&&(q.distance+=1)}if(!(isNaN(q.yerr)||q.ya.type==="log"&&q.yerr<=0)){var ge=v.tickText(q.ya,q.ya.c2l(q.yerr),"hover").text;q.yerrneg!==void 0?q.yLabel+=" +"+ge+" / -"+v.tickText(q.ya,q.ya.c2l(q.yerrneg),"hover").text:q.yLabel+=" \xB1 "+ge,$==="y"&&(q.distance+=1)}var fe=q.hoverinfo||q.trace.hoverinfo;return fe&&fe!=="all"&&((fe=Array.isArray(fe)?fe:fe.split("+")).indexOf("x")===-1&&(q.xLabel=void 0),fe.indexOf("y")===-1&&(q.yLabel=void 0),fe.indexOf("z")===-1&&(q.zLabel=void 0),fe.indexOf("text")===-1&&(q.text=void 0),fe.indexOf("name")===-1&&(q.name=void 0)),q}function W(q,$,ne){var H,Q,ee=ne.container,ie=ne.fullLayout,ae=ie._size,ue=ne.event,le=!!$.hLinePoint,ge=!!$.vLinePoint;if(ee.selectAll(".spikeline").remove(),ge||le){var fe=g.combine(ie.plot_bgcolor,ie.paper_bgcolor);if(le){var me,_e,we=$.hLinePoint;H=we&&we.xa,(Q=we&&we.ya).spikesnap==="cursor"?(me=ue.pointerX,_e=ue.pointerY):(me=H._offset+we.x,_e=Q._offset+we.y);var Te,Oe,de=l.readability(we.color,fe)<1.5?g.contrast(fe):we.color,ye=Q.spikemode,Me=Q.spikethickness,ke=Q.spikecolor||de,Ee=v.getPxPosition(q,Q);if(ye.indexOf("toaxis")!==-1||ye.indexOf("across")!==-1){if(ye.indexOf("toaxis")!==-1&&(Te=Ee,Oe=me),ye.indexOf("across")!==-1){var ze=Q._counterDomainMin,Fe=Q._counterDomainMax;Q.anchor==="free"&&(ze=Math.min(ze,Q.position),Fe=Math.max(Fe,Q.position)),Te=ae.l+ze*ae.w,Oe=ae.l+Fe*ae.w}ee.insert("line",":first-child").attr({x1:Te,x2:Oe,y1:_e,y2:_e,"stroke-width":Me,stroke:ke,"stroke-dasharray":m.dashStyle(Q.spikedash,Me)}).classed("spikeline",!0).classed("crisp",!0),ee.insert("line",":first-child").attr({x1:Te,x2:Oe,y1:_e,y2:_e,"stroke-width":Me+2,stroke:fe}).classed("spikeline",!0).classed("crisp",!0)}ye.indexOf("marker")!==-1&&ee.insert("circle",":first-child").attr({cx:Ee+(Q.side!=="right"?Me:-Me),cy:_e,r:Me,fill:ke}).classed("spikeline",!0)}if(ge){var Ve,Ke,Re=$.vLinePoint;H=Re&&Re.xa,Q=Re&&Re.ya,H.spikesnap==="cursor"?(Ve=ue.pointerX,Ke=ue.pointerY):(Ve=H._offset+Re.x,Ke=Q._offset+Re.y);var qe,We,Ye=l.readability(Re.color,fe)<1.5?g.contrast(fe):Re.color,nt=H.spikemode,ft=H.spikethickness,vt=H.spikecolor||Ye,Pt=v.getPxPosition(q,H);if(nt.indexOf("toaxis")!==-1||nt.indexOf("across")!==-1){if(nt.indexOf("toaxis")!==-1&&(qe=Pt,We=Ke),nt.indexOf("across")!==-1){var At=H._counterDomainMin,at=H._counterDomainMax;H.anchor==="free"&&(At=Math.min(At,H.position),at=Math.max(at,H.position)),qe=ae.t+(1-at)*ae.h,We=ae.t+(1-At)*ae.h}ee.insert("line",":first-child").attr({x1:Ve,x2:Ve,y1:qe,y2:We,"stroke-width":ft,stroke:vt,"stroke-dasharray":m.dashStyle(H.spikedash,ft)}).classed("spikeline",!0).classed("crisp",!0),ee.insert("line",":first-child").attr({x1:Ve,x2:Ve,y1:qe,y2:We,"stroke-width":ft+2,stroke:fe}).classed("spikeline",!0).classed("crisp",!0)}nt.indexOf("marker")!==-1&&ee.insert("circle",":first-child").attr({cx:Ve,cy:Pt-(H.side!=="top"?ft:-ft),r:ft,fill:vt}).classed("spikeline",!0)}}}function K(q,$){return!$||$.vLinePoint!==q._spikepoints.vLinePoint||$.hLinePoint!==q._spikepoints.hLinePoint}function te(q,$){return d.plainText(q||"",{len:$,allowedTags:["br","sub","sup","b","i","em"]})}function Y(q,$,ne){var H=$[q+"a"],Q=$[q+"Val"],ee=$.cd[0];if(H.type==="category")Q=H._categoriesMap[Q];else if(H.type==="date"){var ie=$.trace[q+"periodalignment"];if(ie){var ae=$.cd[$.index],ue=ae[q+"Start"];ue===void 0&&(ue=ae[q]);var le=ae[q+"End"];le===void 0&&(le=ae[q]);var ge=le-ue;ie==="end"?Q+=ge:ie==="middle"&&(Q+=ge/2)}Q=H.d2c(Q)}return ee&&ee.t&&ee.t.posLetter===H._id&&(ne.boxmode!=="group"&&ne.violinmode!=="group"||(Q+=ee.t.dPos)),Q}function Z(q){return q.offsetTop+q.clientTop}function re(q){return q.offsetLeft+q.clientLeft}function U(q,$){var ne=q._fullLayout,H=$.getBoundingClientRect(),Q=H.x,ee=H.y,ie=Q+H.width,ae=ee+H.height,ue=c.apply3DTransform(ne._invTransform)(Q,ee),le=c.apply3DTransform(ne._invTransform)(ie,ae),ge=ue[0],fe=ue[1],me=le[0],_e=le[1];return{x:ge,y:fe,width:me-ge,height:_e-fe,top:Math.min(fe,_e),left:Math.min(ge,me),right:Math.max(ge,me),bottom:Math.max(fe,_e)}}},{"../../lib":503,"../../lib/events":492,"../../lib/override_cursor":514,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../registry":638,"../color":366,"../dragelement":385,"../drawing":388,"../legend/defaults":418,"../legend/draw":419,"./constants":400,"./helpers":402,"@plotly/d3":58,"fast-isnumeric":190,tinycolor2:312}],404:[function(e,o,f){var r=e("../../lib"),a=e("../color"),l=e("./helpers").isUnifiedHover;o.exports=function(c,i,s,u){u=u||{};var d=i.legend;function h(m){u.font[m]||(u.font[m]=d?i.legend.font[m]:i.font[m])}i&&l(i.hovermode)&&(u.font||(u.font={}),h("size"),h("family"),h("color"),d?(u.bgcolor||(u.bgcolor=a.combine(i.legend.bgcolor,i.paper_bgcolor)),u.bordercolor||(u.bordercolor=i.legend.bordercolor)):u.bgcolor||(u.bgcolor=i.paper_bgcolor)),s("hoverlabel.bgcolor",u.bgcolor),s("hoverlabel.bordercolor",u.bordercolor),s("hoverlabel.namelength",u.namelength),r.coerceFont(s,"hoverlabel.font",u.font),s("hoverlabel.align",u.align)}},{"../../lib":503,"../color":366,"./helpers":402}],405:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes");o.exports=function(l,c){function i(s,u){return c[s]!==void 0?c[s]:r.coerce(l,c,a,s,u)}return i("clickmode"),i("hovermode")}},{"../../lib":503,"./layout_attributes":407}],406:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),l=e("../dragelement"),c=e("./helpers"),i=e("./layout_attributes"),s=e("./hover");o.exports={moduleType:"component",name:"fx",constants:e("./constants"),schema:{layout:i},attributes:e("./attributes"),layoutAttributes:i,supplyLayoutGlobalDefaults:e("./layout_global_defaults"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),getDistanceFunction:c.getDistanceFunction,getClosest:c.getClosest,inbox:c.inbox,quadrature:c.quadrature,appendArrayPointValue:c.appendArrayPointValue,castHoverOption:function(u,d,h){return a.castOption(u,d,"hoverlabel."+h)},castHoverinfo:function(u,d,h){return a.castOption(u,h,"hoverinfo",function(m){return a.coerceHoverinfo({hoverinfo:m},{_module:u._module},d)})},hover:s.hover,unhover:l.unhover,loneHover:s.loneHover,loneUnhover:function(u){var d=a.isD3Selection(u)?u:r.select(u);d.selectAll("g.hovertext").remove(),d.selectAll(".spikeline").remove()},click:e("./click")}},{"../../lib":503,"../dragelement":385,"./attributes":397,"./calc":398,"./click":399,"./constants":400,"./defaults":401,"./helpers":402,"./hover":403,"./layout_attributes":407,"./layout_defaults":408,"./layout_global_defaults":409,"@plotly/d3":58}],407:[function(e,o,f){var r=e("./constants"),a=e("../../plots/font_attributes"),l=a({editType:"none"});l.family.dflt=r.HOVERFONT,l.size.dflt=r.HOVERFONTSIZE,o.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"},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:l,grouptitlefont:a({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},{"../../plots/font_attributes":585,"./constants":400}],408:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes"),l=e("./hovermode_defaults"),c=e("./hoverlabel_defaults");o.exports=function(i,s){function u(g,p){return r.coerce(i,s,a,g,p)}l(i,s)&&(u("hoverdistance"),u("spikedistance")),u("dragmode")==="select"&&u("selectdirection");var d=s._has("mapbox"),h=s._has("geo"),m=s._basePlotModules.length;s.dragmode==="zoom"&&((d||h)&&m===1||d&&h&&m===2)&&(s.dragmode="pan"),c(i,s,u),r.coerceFont(u,"hoverlabel.grouptitlefont",s.hoverlabel.font)}},{"../../lib":503,"./hoverlabel_defaults":404,"./hovermode_defaults":405,"./layout_attributes":407}],409:[function(e,o,f){var r=e("../../lib"),a=e("./hoverlabel_defaults"),l=e("./layout_attributes");o.exports=function(c,i){a(c,i,function(s,u){return r.coerce(c,i,l,s,u)})}},{"../../lib":503,"./hoverlabel_defaults":404,"./layout_attributes":407}],410:[function(e,o,f){var r=e("../../lib"),a=e("../../lib/regex").counter,l=e("../../plots/domain").attributes,c=e("../../plots/cartesian/constants").idRegex,i=e("../../plot_api/plot_template"),s={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:[a("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[c.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[c.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:l({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 u(m,g,p){var v=g[p+"axes"],y=Object.keys((m._splomAxes||{})[p]||{});return Array.isArray(v)?v:y.length?y:void 0}function d(m,g,p,v,y,x){var w=g(m+"gap",p),k=g("domain."+m);g(m+"side",v);for(var b=new Array(y),T=k[0],_=(k[1]-T)/(y-w),S=_*(1-w),A=0;A1){!k&&!b&&!T&&L("pattern")==="independent"&&(k=!0),S._hasSubplotGrid=k;var E,D,O=L("roworder")==="top to bottom",R=k?.2:.1,z=k?.3:.1;_&&g._splomGridDflt&&(E=g._splomGridDflt.xside,D=g._splomGridDflt.yside),S._domains={x:d("x",L,R,E,M),y:d("y",L,z,D,A,O)}}else delete g.grid}function L(P,N){return r.coerce(p,S,s,P,N)}},contentDefaults:function(m,g){var p=g.grid;if(p&&p._domains){var v,y,x,w,k,b,T,_=m.grid||{},S=g._subplots,A=p._hasSubplotGrid,M=p.rows,E=p.columns,D=p.pattern==="independent",O=p._axisMap={};if(A){var R=_.subplots||[];b=p.subplots=new Array(M);var z=1;for(v=0;v1);if(A===!1&&(h.legend=void 0),(A!==!1||p.uirevision)&&(y("uirevision",h.uirevision),A!==!1)){y("bgcolor",h.paper_bgcolor),y("bordercolor"),y("borderwidth");var M,E,D,O=a.coerceFont(y,"font",h.font),R=y("orientation")==="h";if(R?(M=0,r.getComponentMethod("rangeslider","isVisible")(d.xaxis)?(E=1.1,D="bottom"):(E=-.1,D="top")):(M=1.02,E=1,D="auto"),y("traceorder",_),u.isGrouped(h.legend)&&y("tracegroupgap"),y("itemsizing"),y("itemwidth"),y("itemclick"),y("itemdoubleclick"),y("groupclick"),y("x",M),y("xanchor"),y("y",E),y("yanchor",D),y("valign"),a.noneOrAll(p,v,["x","y"]),y("title.text")){y("title.side",R?"left":"top");var z=a.extendFlat({},O,{size:a.bigFont(O.size)});a.coerceFont(y,"title.font",z)}}}},{"../../lib":503,"../../plot_api/plot_template":543,"../../plots/attributes":550,"../../plots/layout_attributes":610,"../../registry":638,"./attributes":416,"./helpers":422}],419:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),l=e("../../plots/plots"),c=e("../../registry"),i=e("../../lib/events"),s=e("../dragelement"),u=e("../drawing"),d=e("../color"),h=e("../../lib/svg_text_utils"),m=e("./handle_click"),g=e("./constants"),p=e("../../constants/alignment"),v=p.LINE_SPACING,y=p.FROM_TL,x=p.FROM_BR,w=e("./get_legend_data"),k=e("./style"),b=e("./helpers");function T(O,R,z,L,P){var N=z.data()[0][0].trace,B={event:P,node:z.node(),curveNumber:N.index,expandedIndex:N._expandedIndex,data:O.data,layout:O.layout,frames:O._transitionData._frames,config:O._context,fullData:O._fullData,fullLayout:O._fullLayout};N._group&&(B.group=N._group),c.traceIs(N,"pie-like")&&(B.label=z.datum()[0].label),i.triggerHandler(O,"plotly_legendclick",B)!==!1&&(L===1?R._clickTimeout=setTimeout(function(){O._fullLayout&&m(z,O,L)},O._context.doubleClickDelay):L===2&&(R._clickTimeout&&clearTimeout(R._clickTimeout),O._legendMouseDownTime=0,i.triggerHandler(O,"plotly_legenddoubleclick",B)!==!1&&m(z,O,L)))}function _(O,R,z){var L,P,N=O.data()[0][0],B=N.trace,G=c.traceIs(B,"pie-like"),W=!z._inHover&&R._context.edits.legendText&&!G,K=z._maxNameLength;N.groupTitle?(L=N.groupTitle.text,P=N.groupTitle.font):(P=z.font,z.entries?L=N.text:(L=G?N.label:B.name,B._meta&&(L=a.templateString(L,B._meta))));var te=a.ensureSingle(O,"text","legendtext");te.attr("text-anchor","start").call(u.font,P).text(W?S(L,K):L);var Y=z.itemwidth+2*g.itemGap;h.positionText(te,Y,0),W?te.call(h.makeEditable,{gd:R,text:L}).call(M,O,R,z).on("edit",function(Z){this.text(S(Z,K)).call(M,O,R,z);var re=N.trace._fullInput||{},U={};if(c.hasTransform(re,"groupby")){var q=c.getTransformIndices(re,"groupby"),$=q[q.length-1],ne=a.keyedContainer(re,"transforms["+$+"].styles","target","value.name");ne.set(N.trace._group,Z),U=ne.constructUpdate()}else U.name=Z;return c.call("_guiRestyle",R,U,B.index)}):M(te,O,R,z)}function S(O,R){var z=Math.max(4,R);if(O&&O.trim().length>=z/2)return O;for(var L=z-(O=O||"").length;L>0;L--)O+=" ";return O}function A(O,R){var z,L=R._context.doubleClickDelay,P=1,N=a.ensureSingle(O,"rect","legendtoggle",function(B){R._context.staticPlot||B.style("cursor","pointer").attr("pointer-events","all"),B.call(d.fill,"rgba(0,0,0,0)")});R._context.staticPlot||(N.on("mousedown",function(){(z=new Date().getTime())-R._legendMouseDownTimeL&&(P=Math.max(P-1,1)),T(R,B,O,P,r.event)}}))}function M(O,R,z,L,P){L._inHover&&O.attr("data-notex",!0),h.convertToTspans(O,z,function(){(function(N,B,G,W){var K=N.data()[0][0];if(!G._inHover&&K&&!K.trace.showlegend)return void N.remove();var te=N.select("g[class*=math-group]"),Y=te.node();G||(G=B._fullLayout.legend);var Z,re=G.borderwidth;Z=W===1?G.title.font:K.groupTitle?K.groupTitle.font:G.font;var U,q,$=Z.size*v;if(Y){var ne=u.bBox(Y);U=ne.height,q=ne.width,W===1?u.setTranslate(te,re,re+.75*U):u.setTranslate(te,0,.25*U)}else{var H=N.select(W===1?".legendtitletext":".legendtext"),Q=h.lineCount(H),ee=H.node();if(U=$*Q,q=ee?u.bBox(ee).width:0,W===1)G.title.side==="left"&&(q+=2*g.itemGap),h.positionText(H,re+g.titlePad,re+$);else{var ie=2*g.itemGap+G.itemwidth;K.groupTitle&&(ie=g.itemGap,q-=G.itemwidth),h.positionText(H,ie,-$*((Q-1)/2-.3))}}W===1?(G._titleWidth=q,G._titleHeight=U):(K.lineHeight=$,K.height=Math.max(U,16)+3,K.width=q)})(R,z,L,P)})}function E(O){return a.isRightAnchor(O)?"right":a.isCenterAnchor(O)?"center":"left"}function D(O){return a.isBottomAnchor(O)?"bottom":a.isMiddleAnchor(O)?"middle":"top"}o.exports=function(O,R){return R||(R=O._fullLayout.legend||{}),function(z,L){var P,N,B=z._fullLayout,G="legend"+B._uid,W=L._inHover;if(W?(P=L.layer,G+="-hover"):P=B._infolayer,!!P){if(z._legendMouseDownTime||(z._legendMouseDownTime=0),W){if(!L.entries)return;N=w(L.entries,L)}else{if(!z.calcdata)return;N=B.showlegend&&w(z.calcdata,L)}var K=B.hiddenlabels||[];if(!(W||B.showlegend&&N.length))return P.selectAll(".legend").remove(),B._topdefs.select("#"+G).remove(),l.autoMargin(z,"legend");var te=a.ensureSingle(P,"g","legend",function(Q){W||Q.attr("pointer-events","all")}),Y=a.ensureSingleById(B._topdefs,"clipPath",G,function(Q){Q.append("rect")}),Z=a.ensureSingle(te,"rect","bg",function(Q){Q.attr("shape-rendering","crispEdges")});Z.call(d.stroke,L.bordercolor).call(d.fill,L.bgcolor).style("stroke-width",L.borderwidth+"px");var re=a.ensureSingle(te,"g","scrollbox"),U=L.title;if(L._titleWidth=0,L._titleHeight=0,U.text){var q=a.ensureSingle(re,"text","legendtitletext");q.attr("text-anchor","start").call(u.font,U.font).text(U.text),M(q,re,z,L,1)}else re.selectAll(".legendtitletext").remove();var $=a.ensureSingle(te,"rect","scrollbar",function(Q){Q.attr(g.scrollBarEnterAttrs).call(d.fill,g.scrollBarColor)}),ne=re.selectAll("g.groups").data(N);ne.enter().append("g").attr("class","groups"),ne.exit().remove();var H=ne.selectAll("g.traces").data(a.identity);H.enter().append("g").attr("class","traces"),H.exit().remove(),H.style("opacity",function(Q){var ee=Q[0].trace;return c.traceIs(ee,"pie-like")?K.indexOf(Q[0].label)!==-1?.5:1:ee.visible==="legendonly"?.5:1}).each(function(){r.select(this).call(_,z,L)}).call(k,z,L).each(function(){W||r.select(this).call(A,z)}),a.syncOrAsync([l.previousPromises,function(){return function(Q,ee,ie,ae){var ue=Q._fullLayout;ae||(ae=ue.legend);var le=ue._size,ge=b.isVertical(ae),fe=b.isGrouped(ae),me=ae.borderwidth,_e=2*me,we=g.itemGap,Te=ae.itemwidth+2*we,Oe=2*(me+we),de=D(ae),ye=ae.y<0||ae.y===0&&de==="top",Me=ae.y>1||ae.y===1&&de==="bottom",ke=ae.tracegroupgap;ae._maxHeight=Math.max(ye||Me?ue.height/2:le.h,30);var Ee=0;ae._width=0,ae._height=0;var ze=function(Tt){var dt=0,Pe=0,Ie=Tt.title.side;return Ie&&(Ie.indexOf("left")!==-1&&(dt=Tt._titleWidth),Ie.indexOf("top")!==-1&&(Pe=Tt._titleHeight)),[dt,Pe]}(ae);if(ge)ie.each(function(Tt){var dt=Tt[0].height;u.setTranslate(this,me+ze[0],me+ze[1]+ae._height+dt/2+we),ae._height+=dt,ae._width=Math.max(ae._width,Tt[0].width)}),Ee=Te+ae._width,ae._width+=we+Te+_e,ae._height+=Oe,fe&&(ee.each(function(Tt,dt){u.setTranslate(this,0,dt*ae.tracegroupgap)}),ae._height+=(ae._lgroupsLength-1)*ae.tracegroupgap);else{var Fe=E(ae),Ve=ae.x<0||ae.x===0&&Fe==="right",Ke=ae.x>1||ae.x===1&&Fe==="left",Re=Me||ye,qe=ue.width/2;ae._maxWidth=Math.max(Ve?Re&&Fe==="left"?le.l+le.w:qe:Ke?Re&&Fe==="right"?le.r+le.w:qe:le.w,2*Te);var We=0,Ye=0;ie.each(function(Tt){var dt=Tt[0].width+Te;We=Math.max(We,dt),Ye+=dt}),Ee=null;var nt=0;if(fe){var ft=0,vt=0,Pt=0;ee.each(function(){var Tt=0,dt=0;r.select(this).selectAll("g.traces").each(function(Ie){var Ae=Ie[0].width,De=Ie[0].height;u.setTranslate(this,ze[0],ze[1]+me+we+De/2+dt),dt+=De,Tt=Math.max(Tt,Te+Ae)});var Pe=Tt+we;vt>0&&Pe+me+vt>ae._maxWidth?(nt=Math.max(nt,vt),vt=0,Pt+=ft+ke,ft=dt):ft=Math.max(ft,dt),u.setTranslate(this,vt,Pt),vt+=Pe}),ae._width=Math.max(nt,vt)+me,ae._height=Pt+ft+Oe}else{var At=ie.size(),at=Ye+_e+(At-1)*we=ae._maxWidth&&(nt=Math.max(nt,Jt),Ot=0,Wt+=et,ae._height+=et,et=0),u.setTranslate(this,ze[0]+me+Ot,ze[1]+me+Wt+dt/2+we),Jt=Ot+Pe+we,Ot+=Ie,et=Math.max(et,dt)}),at?(ae._width=Ot+_e,ae._height=et+Oe):(ae._width=Math.max(nt,Jt)+_e,ae._height+=et+Oe)}}ae._width=Math.ceil(Math.max(ae._width+ze[0],ae._titleWidth+2*(me+g.titlePad))),ae._height=Math.ceil(Math.max(ae._height+ze[1],ae._titleHeight+2*(me+g.itemGap))),ae._effHeight=Math.min(ae._height,ae._maxHeight);var Be=Q._context.edits,Ge=Be.legendText||Be.legendPosition;ie.each(function(Tt){var dt=r.select(this).select(".legendtoggle"),Pe=Tt[0].height,Ie=Ge?Te:Ee||Te+Tt[0].width;ge||(Ie+=we/2),u.setRect(dt,0,-Pe/2,Ie,Pe)})}(z,ne,H,L)},function(){var Q,ee,ie,ae,ue=B._size,le=L.borderwidth;if(!W){if(function(Re){var qe=Re._fullLayout.legend,We=E(qe),Ye=D(qe);return l.autoMargin(Re,"legend",{x:qe.x,y:qe.y,l:qe._width*y[We],r:qe._width*x[We],b:qe._effHeight*x[Ye],t:qe._effHeight*y[Ye]})}(z))return;var ge=ue.l+ue.w*L.x-y[E(L)]*L._width,fe=ue.t+ue.h*(1-L.y)-y[D(L)]*L._effHeight;if(B.margin.autoexpand){var me=ge,_e=fe;ge=a.constrain(ge,0,B.width-L._width),fe=a.constrain(fe,0,B.height-L._effHeight),ge!==me&&a.log("Constrain legend.x to make legend fit inside graph"),fe!==_e&&a.log("Constrain legend.y to make legend fit inside graph")}u.setTranslate(te,ge,fe)}if($.on(".drag",null),te.on("wheel",null),W||L._height<=L._maxHeight||z._context.staticPlot){var we=L._effHeight;W&&(we=L._height),Z.attr({width:L._width-le,height:we-le,x:le/2,y:le/2}),u.setTranslate(re,0,0),Y.select("rect").attr({width:L._width-2*le,height:we-2*le,x:le,y:le}),u.setClipUrl(re,G,z),u.setRect($,0,0,0,0),delete L._scrollY}else{var Te,Oe,de,ye=Math.max(g.scrollBarMinHeight,L._effHeight*L._effHeight/L._height),Me=L._effHeight-ye-2*g.scrollBarMargin,ke=L._height-L._effHeight,Ee=Me/ke,ze=Math.min(L._scrollY||0,ke);Z.attr({width:L._width-2*le+g.scrollBarWidth+g.scrollBarMargin,height:L._effHeight-le,x:le/2,y:le/2}),Y.select("rect").attr({width:L._width-2*le+g.scrollBarWidth+g.scrollBarMargin,height:L._effHeight-2*le,x:le,y:le+ze}),u.setClipUrl(re,G,z),Ke(ze,ye,Ee),te.on("wheel",function(){Ke(ze=a.constrain(L._scrollY+r.event.deltaY/Me*ke,0,ke),ye,Ee),ze!==0&&ze!==ke&&r.event.preventDefault()});var Fe=r.behavior.drag().on("dragstart",function(){var Re=r.event.sourceEvent;Te=Re.type==="touchstart"?Re.changedTouches[0].clientY:Re.clientY,de=ze}).on("drag",function(){var Re=r.event.sourceEvent;Re.buttons===2||Re.ctrlKey||(Oe=Re.type==="touchmove"?Re.changedTouches[0].clientY:Re.clientY,Ke(ze=function(qe,We,Ye){var nt=(Ye-We)/Ee+qe;return a.constrain(nt,0,ke)}(de,Te,Oe),ye,Ee))});$.call(Fe);var Ve=r.behavior.drag().on("dragstart",function(){var Re=r.event.sourceEvent;Re.type==="touchstart"&&(Te=Re.changedTouches[0].clientY,de=ze)}).on("drag",function(){var Re=r.event.sourceEvent;Re.type==="touchmove"&&(Oe=Re.changedTouches[0].clientY,Ke(ze=function(qe,We,Ye){var nt=(We-Ye)/Ee+qe;return a.constrain(nt,0,ke)}(de,Te,Oe),ye,Ee))});re.call(Ve)}function Ke(Re,qe,We){L._scrollY=z._fullLayout.legend._scrollY=Re,u.setTranslate(re,0,-Re),u.setRect($,L._width,g.scrollBarMargin+Re*We,g.scrollBarWidth,qe),Y.select("rect").attr("y",le+Re)}z._context.edits.legendPosition&&(te.classed("cursor-move",!0),s.init({element:te.node(),gd:z,prepFn:function(){var Re=u.getTranslate(te);ie=Re.x,ae=Re.y},moveFn:function(Re,qe){var We=ie+Re,Ye=ae+qe;u.setTranslate(te,We,Ye),Q=s.align(We,0,ue.l,ue.l+ue.w,L.xanchor),ee=s.align(Ye,0,ue.t+ue.h,ue.t,L.yanchor)},doneFn:function(){Q!==void 0&&ee!==void 0&&c.call("_guiRelayout",z,{"legend.x":Q,"legend.y":ee})},clickFn:function(Re,qe){var We=P.selectAll("g.traces").filter(function(){var Ye=this.getBoundingClientRect();return qe.clientX>=Ye.left&&qe.clientX<=Ye.right&&qe.clientY>=Ye.top&&qe.clientY<=Ye.bottom});We.size()>0&&T(z,te,We,Re,qe)}}))}],z)}}(O,R)}},{"../../constants/alignment":471,"../../lib":503,"../../lib/events":492,"../../lib/svg_text_utils":529,"../../plots/plots":619,"../../registry":638,"../color":366,"../dragelement":385,"../drawing":388,"./constants":417,"./get_legend_data":420,"./handle_click":421,"./helpers":422,"./style":424,"@plotly/d3":58}],420:[function(e,o,f){var r=e("../../registry"),a=e("./helpers");o.exports=function(l,c){var i,s,u=c._inHover,d=a.isGrouped(c),h=a.isReversed(c),m={},g=[],p=!1,v={},y=0,x=0;function w(B,G){if(B!==""&&a.isGrouped(c))g.indexOf(B)===-1?(g.push(B),p=!0,m[B]=[G]):m[B].push(G);else{var W="~~i"+y;g.push(W),m[W]=[G],y++}}for(i=0;iO&&(D=O)}M[i][0]._groupMinRank=D,M[i][0]._preGroupSort=i}var R=function(B,G){return B.trace.legendrank-G.trace.legendrank||B._preSort-G._preSort};for(M.forEach(function(B,G){B[0]._preGroupSort=G}),M.sort(function(B,G){return B[0]._groupMinRank-G[0]._groupMinRank||B[0]._preGroupSort-G[0]._preGroupSort}),i=0;ik?k:x}o.exports=function(x,w,k){var b=w._fullLayout;k||(k=b.legend);var T=k.itemsizing==="constant",_=k.itemwidth,S=(_+2*g.itemGap)/2,A=c(S,0),M=function(O,R,z,L){var P;if(O+1)P=O;else{if(!(R&&R.width>0))return 0;P=R.width}return T?L:Math.min(P,z)};function E(O,R,z){var L=O[0].trace,P=L.marker||{},N=P.line||{},B=z?L.visible&&L.type===z:a.traceIs(L,"bar"),G=r.select(R).select("g.legendpoints").selectAll("path.legend"+z).data(B?[O]:[]);G.enter().append("path").classed("legend"+z,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",A),G.exit().remove(),G.each(function(W){var K=r.select(this),te=W[0],Y=M(te.mlw,P.line,5,2);K.style("stroke-width",Y+"px");var Z=te.mcc;if(!k._inHover&&"mc"in te){var re=u(P),U=re.mid;U===void 0&&(U=(re.max+re.min)/2),Z=i.tryColorscale(P,"")(U)}var q=Z||te.mc||P.color,$=P.pattern,ne=$&&i.getPatternAttr($.shape,0,"");if(ne){var H=i.getPatternAttr($.bgcolor,0,null),Q=i.getPatternAttr($.fgcolor,0,null),ee=$.fgopacity,ie=y($.size,8,10),ae=y($.solidity,.5,1),ue="legend-"+L.uid;K.call(i.pattern,"legend",w,ue,ne,ie,ae,Z,$.fillmode,H,Q,ee)}else K.call(s.fill,q);Y&&s.stroke(K,te.mlc||N.color)})}function D(O,R,z){var L=O[0],P=L.trace,N=z?P.visible&&P.type===z:a.traceIs(P,z),B=r.select(R).select("g.legendpoints").selectAll("path.legend"+z).data(N?[O]:[]);if(B.enter().append("path").classed("legend"+z,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",A),B.exit().remove(),B.size()){var G=(P.marker||{}).line,W=M(m(G.width,L.pts),G,5,2),K=l.minExtend(P,{marker:{line:{width:W}}});K.marker.line.color=G.color;var te=l.minExtend(L,{trace:K});h(B,te,K)}}x.each(function(O){var R=r.select(this),z=l.ensureSingle(R,"g","layers");z.style("opacity",O[0].trace.opacity);var L=k.valign,P=O[0].lineHeight,N=O[0].height;if(L!=="middle"&&P&&N){var B={top:1,bottom:-1}[L]*(.5*(P-N+3));z.attr("transform",c(0,B))}else z.attr("transform",null);z.selectAll("g.legendfill").data([O]).enter().append("g").classed("legendfill",!0),z.selectAll("g.legendlines").data([O]).enter().append("g").classed("legendlines",!0);var G=z.selectAll("g.legendsymbols").data([O]);G.enter().append("g").classed("legendsymbols",!0),G.selectAll("g.legendpoints").data([O]).enter().append("g").classed("legendpoints",!0)}).each(function(O){var R,z=O[0].trace,L=[];if(z.visible)switch(z.type){case"histogram2d":case"heatmap":L=[["M-15,-2V4H15V-2Z"]],R=!0;break;case"choropleth":case"choroplethmapbox":L=[["M-6,-6V6H6V-6Z"]],R=!0;break;case"densitymapbox":L=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],R="radial";break;case"cone":L=[["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"]],R=!1;break;case"streamtube":L=[["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"]],R=!1;break;case"surface":L=[["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"]],R=!0;break;case"mesh3d":L=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],R=!1;break;case"volume":L=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],R=!0;break;case"isosurface":L=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],R=!1}var P=r.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(L);P.enter().append("path").classed("legend3dandfriends",!0).attr("transform",A).style("stroke-miterlimit",1),P.exit().remove(),P.each(function(N,B){var G,W=r.select(this),K=u(z),te=K.colorscale,Y=K.reversescale;if(te){if(!R){var Z=te.length;G=B===0?te[Y?Z-1:0][1]:B===1?te[Y?0:Z-1][1]:te[Math.floor((Z-1)/2)][1]}}else{var re=z.vertexcolor||z.facecolor||z.color;G=l.isArrayOrTypedArray(re)?re[B]||re[0]:re}W.attr("d",N[0]),G?W.call(s.fill,G):W.call(function(U){if(U.size()){var q="legendfill-"+z.uid;i.gradient(U,w,q,p(Y,R==="radial"),te,"fill")}})})}).each(function(O){var R=O[0].trace,z=R.type==="waterfall";if(O[0]._distinct&&z){var L=O[0].trace[O[0].dir].marker;return O[0].mc=L.color,O[0].mlw=L.line.width,O[0].mlc=L.line.color,E(O,this,"waterfall")}var P=[];R.visible&&z&&(P=O[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 N=r.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(P);N.enter().append("path").classed("legendwaterfall",!0).attr("transform",A).style("stroke-miterlimit",1),N.exit().remove(),N.each(function(B){var G=r.select(this),W=R[B[0]].marker,K=M(void 0,W.line,5,2);G.attr("d",B[1]).style("stroke-width",K+"px").call(s.fill,W.color),K&&G.call(s.stroke,W.line.color)})}).each(function(O){E(O,this,"funnel")}).each(function(O){E(O,this)}).each(function(O){var R=O[0].trace,z=r.select(this).select("g.legendpoints").selectAll("path.legendbox").data(R.visible&&a.traceIs(R,"box-violin")?[O]:[]);z.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",A),z.exit().remove(),z.each(function(){var L=r.select(this);if(R.boxpoints!=="all"&&R.points!=="all"||s.opacity(R.fillcolor)!==0||s.opacity((R.line||{}).color)!==0){var P=M(void 0,R.line,5,2);L.style("stroke-width",P+"px").call(s.fill,R.fillcolor),P&&s.stroke(L,R.line.color)}else{var N=l.minExtend(R,{marker:{size:T?12:l.constrain(R.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});z.call(i.pointStyle,N,w)}})}).each(function(O){D(O,this,"funnelarea")}).each(function(O){D(O,this,"pie")}).each(function(O){var R,z,L=v(O),P=L.showFill,N=L.showLine,B=L.showGradientLine,G=L.showGradientFill,W=L.anyFill,K=L.anyLine,te=O[0],Y=te.trace,Z=u(Y),re=Z.colorscale,U=Z.reversescale,q=d.hasMarkers(Y)||!W?"M5,0":K?"M5,-2":"M5,-3",$=r.select(this),ne=$.select(".legendfill").selectAll("path").data(P||G?[O]:[]);if(ne.enter().append("path").classed("js-fill",!0),ne.exit().remove(),ne.attr("d",q+"h"+_+"v6h-"+_+"z").call(function(ee){if(ee.size())if(P)i.fillGroupStyle(ee,w);else{var ie="legendfill-"+Y.uid;i.gradient(ee,w,ie,p(U),re,"fill")}}),N||B){var H=M(void 0,Y.line,10,5);z=l.minExtend(Y,{line:{width:H}}),R=[l.minExtend(te,{trace:z})]}var Q=$.select(".legendlines").selectAll("path").data(N||B?[R]:[]);Q.enter().append("path").classed("js-line",!0),Q.exit().remove(),Q.attr("d",q+(B?"l"+_+",0.0001":"h"+_)).call(N?i.lineGroupStyle:function(ee){if(ee.size()){var ie="legendline-"+Y.uid;i.lineGroupStyle(ee),i.gradient(ee,w,ie,p(U),re,"stroke")}})}).each(function(O){var R,z,L=v(O),P=L.anyFill,N=L.anyLine,B=L.showLine,G=L.showMarker,W=O[0],K=W.trace,te=!G&&!N&&!P&&d.hasText(K);function Y(Q,ee,ie,ae){var ue=l.nestedProperty(K,Q).get(),le=l.isArrayOrTypedArray(ue)&&ee?ee(ue):ue;if(T&&le&&ae!==void 0&&(le=ae),ie){if(leie[1])return ie[1]}return le}function Z(Q){return W._distinct&&W.index&&Q[W.index]?Q[W.index]:Q[0]}if(G||te||B){var re={},U={};if(G){re.mc=Y("marker.color",Z),re.mx=Y("marker.symbol",Z),re.mo=Y("marker.opacity",l.mean,[.2,1]),re.mlc=Y("marker.line.color",Z),re.mlw=Y("marker.line.width",l.mean,[0,5],2),U.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var q=Y("marker.size",l.mean,[2,16],12);re.ms=q,U.marker.size=q}B&&(U.line={width:Y("line.width",Z,[0,10],5)}),te&&(re.tx="Aa",re.tp=Y("textposition",Z),re.ts=10,re.tc=Y("textfont.color",Z),re.tf=Y("textfont.family",Z)),R=[l.minExtend(W,re)],(z=l.minExtend(K,U)).selectedpoints=null,z.texttemplate=null}var $=r.select(this).select("g.legendpoints"),ne=$.selectAll("path.scatterpts").data(G?R:[]);ne.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",A),ne.exit().remove(),ne.call(i.pointStyle,z,w),G&&(R[0].mrc=3);var H=$.selectAll("g.pointtext").data(te?R:[]);H.enter().append("g").classed("pointtext",!0).append("text").attr("transform",A),H.exit().remove(),H.selectAll("text").call(i.textPointStyle,z,w)}).each(function(O){var R=O[0].trace,z=r.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(R.visible&&R.type==="candlestick"?[O,O]:[]);z.enter().append("path").classed("legendcandle",!0).attr("d",function(L,P){return P?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",A).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(L,P){var N=r.select(this),B=R[P?"increasing":"decreasing"],G=M(void 0,B.line,5,2);N.style("stroke-width",G+"px").call(s.fill,B.fillcolor),G&&s.stroke(N,B.line.color)})}).each(function(O){var R=O[0].trace,z=r.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(R.visible&&R.type==="ohlc"?[O,O]:[]);z.enter().append("path").classed("legendohlc",!0).attr("d",function(L,P){return P?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",A).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(L,P){var N=r.select(this),B=R[P?"increasing":"decreasing"],G=M(void 0,B.line,5,2);N.style("fill","none").call(i.dashLine,B.line.dash,G),G&&s.stroke(N,B.line.color)})})}},{"../../lib":503,"../../registry":638,"../../traces/pie/helpers":906,"../../traces/pie/style_one":912,"../../traces/scatter/subtypes":952,"../color":366,"../colorscale/helpers":377,"../drawing":388,"./constants":417,"@plotly/d3":58}],425:[function(e,o,f){e("./constants"),o.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"}}},{"./constants":427}],426:[function(e,o,f){var r=e("../../registry"),a=e("../../plots/plots"),l=e("../../plots/cartesian/axis_ids"),c=e("../../fonts/ploticon"),i=e("../shapes/draw").eraseActiveShape,s=e("../../lib"),u=s._,d=o.exports={};function h(b,T){var _,S,A=T.currentTarget,M=A.getAttribute("data-attr"),E=A.getAttribute("data-val")||!0,D=b._fullLayout,O={},R=l.list(b,null,!0),z=D._cartesianSpikesEnabled;if(M==="zoom"){var L,P=E==="in"?.5:2,N=(1+P)/2,B=(1-P)/2;for(S=0;S1?(U=["toggleHover"],q=["resetViews"]):D?(re=["zoomInGeo","zoomOutGeo"],U=["hoverClosestGeo"],q=["resetGeo"]):E?(U=["hoverClosest3d"],q=["resetCameraDefault3d","resetCameraLastSave3d"]):P?(re=["zoomInMapbox","zoomOutMapbox"],U=["toggleHover"],q=["resetViewMapbox"]):z?U=["hoverClosestGl2d"]:O?U=["hoverClosestPie"]:G?(U=["hoverClosestCartesian","hoverCompareCartesian"],q=["resetViewSankey"]):U=["toggleHover"],M&&(U=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(ae){for(var ue=0;ue0)){var w=function(b,T,_){for(var S=_.filter(function(D){return T[D].anchor===b._id}),A=0,M=0;M=fe.max)le=ee[ge+1];else if(ue=fe.pmax)le=ee[ge+1];else if(ue0?b+x:x;return{ppad:x,ppadplus:w?_:S,ppadminus:w?S:_}}return{ppad:x}}function d(h,m,g,p,v){var y=h.type==="category"||h.type==="multicategory"?h.r2c:h.d2c;if(m!==void 0)return[y(m),y(g)];if(p){var x,w,k,b,T=1/0,_=-1/0,S=p.match(l.segmentRE);for(h.type==="date"&&(y=c.decodeDate(y)),x=0;x_&&(_=b)));return _>=T?[T,_]:void 0}}o.exports=function(h){var m=h._fullLayout,g=r.filterVisible(m.shapes);if(g.length&&h._fullData.length)for(var p=0;pge?(_e=ue,de="y0",we=ge,ye="y1"):(_e=ge,de="y1",we=ue,ye="y0"),Wt(dt),Ge(ee,H),function(Pe,Ie,Ae){var De=Ie.xref,He=Ie.yref,rt=l.getFromId(Ae,De),lt=l.getFromId(Ae,He),ot="";De==="paper"||rt.autorange||(ot+=De),He==="paper"||lt.autorange||(ot+=He),d.setClipUrl(Pe,ot?"clip"+Ae._fullLayout._uid+ot:null,Ae)}(ne,H,$),Ot.moveFn=ze==="move"?Jt:Be,Ot.altKey=dt.altKey)},doneFn:function(){x($)||(g(ne),Tt(ee),b(ne,$,H),r.call("_guiRelayout",$,ie.getUpdateObj()))},clickFn:function(){x($)||Tt(ee)}};function Wt(dt){if(x($))ze=null;else if(Ke)ze=dt.target.tagName==="path"?"move":dt.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Pe=Ot.element.getBoundingClientRect(),Ie=Pe.right-Pe.left,Ae=Pe.bottom-Pe.top,De=dt.clientX-Pe.left,He=dt.clientY-Pe.top,rt=!Re&&Ie>10&&Ae>10&&!dt.shiftKey?m.getCursor(De/Ie,1-He/Ae):"move";g(ne,rt),ze=rt.split("-")[0]}}function Jt(dt,Pe){if(H.type==="path"){var Ie=function(He){return He},Ae=Ie,De=Ie;Fe?qe("xanchor",H.xanchor=At(fe+dt)):(Ae=function(He){return At(vt(He)+dt)},We&&We.type==="date"&&(Ae=v.encodeDate(Ae))),Ve?qe("yanchor",H.yanchor=at(me+Pe)):(De=function(He){return at(Pt(He)+Pe)},nt&&nt.type==="date"&&(De=v.encodeDate(De))),qe("path",H.path=_(Ee,Ae,De))}else Fe?qe("xanchor",H.xanchor=At(fe+dt)):(qe("x0",H.x0=At(ae+dt)),qe("x1",H.x1=At(le+dt))),Ve?qe("yanchor",H.yanchor=at(me+Pe)):(qe("y0",H.y0=at(ue+Pe)),qe("y1",H.y1=at(ge+Pe)));ne.attr("d",T($,H)),Ge(ee,H)}function Be(dt,Pe){if(Re){var Ie=function(Le){return Le},Ae=Ie,De=Ie;Fe?qe("xanchor",H.xanchor=At(fe+dt)):(Ae=function(Le){return At(vt(Le)+dt)},We&&We.type==="date"&&(Ae=v.encodeDate(Ae))),Ve?qe("yanchor",H.yanchor=at(me+Pe)):(De=function(Le){return at(Pt(Le)+Pe)},nt&&nt.type==="date"&&(De=v.encodeDate(De))),qe("path",H.path=_(Ee,Ae,De))}else if(Ke){if(ze==="resize-over-start-point"){var He=ae+dt,rt=Ve?ue-Pe:ue+Pe;qe("x0",H.x0=Fe?He:At(He)),qe("y0",H.y0=Ve?rt:at(rt))}else if(ze==="resize-over-end-point"){var lt=le+dt,ot=Ve?ge-Pe:ge+Pe;qe("x1",H.x1=Fe?lt:At(lt)),qe("y1",H.y1=Ve?ot:at(ot))}}else{var kt=function(Le){return ze.indexOf(Le)!==-1},wt=kt("n"),Vt=kt("s"),Ut=kt("w"),tt=kt("e"),bt=wt?_e+Pe:_e,zt=Vt?we+Pe:we,St=Ut?Te+dt:Te,Dt=tt?Oe+dt:Oe;Ve&&(wt&&(bt=_e-Pe),Vt&&(zt=we-Pe)),(!Ve&&zt-bt>10||Ve&&bt-zt>10)&&(qe(de,H[de]=Ve?bt:at(bt)),qe(ye,H[ye]=Ve?zt:at(zt))),Dt-St>10&&(qe(Me,H[Me]=Fe?St:At(St)),qe(ke,H[ke]=Fe?Dt:At(Dt)))}ne.attr("d",T($,H)),Ge(ee,H)}function Ge(dt,Pe){(Fe||Ve)&&function(){var Ie=Pe.type!=="path",Ae=dt.selectAll(".visual-cue").data([0]);Ae.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var De=vt(Fe?Pe.xanchor:a.midRange(Ie?[Pe.x0,Pe.x1]:v.extractPathCoords(Pe.path,p.paramIsX))),He=Pt(Ve?Pe.yanchor:a.midRange(Ie?[Pe.y0,Pe.y1]:v.extractPathCoords(Pe.path,p.paramIsY)));if(De=v.roundPositionForSharpStrokeRendering(De,1),He=v.roundPositionForSharpStrokeRendering(He,1),Fe&&Ve){var rt="M"+(De-1-1)+","+(He-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Ae.attr("d",rt)}else if(Fe){var lt="M"+(De-1-1)+","+(He-9-1)+"v18 h2 v-18 Z";Ae.attr("d",lt)}else{var ot="M"+(De-9-1)+","+(He-1-1)+"h18 v2 h-18 Z";Ae.attr("d",ot)}}()}function Tt(dt){dt.selectAll(".visual-cue").remove()}m.init(Ot),et.node().onmousemove=Wt}(A,re,D,M,z,Z):D.editable===!0&&re.style("pointer-events",te||u.opacity(B)*N<=.5?"stroke":"all");re.node().addEventListener("click",function(){return function($,ne){if(!!w($)){var H=+ne.node().getAttribute("data-index");if(H>=0){if(H===$._fullLayout._activeShapeIndex)return void S($);$._fullLayout._activeShapeIndex=H,$._fullLayout._deactivateShape=S,y($)}}}(A,re)})}}function b(A,M,E){var D=(E.xref+E.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");d.setClipUrl(A,D?"clip"+M._fullLayout._uid+D:null,M)}function T(A,M){var E,D,O,R,z,L,P,N,B=M.type,G=l.getRefType(M.xref),W=l.getRefType(M.yref),K=l.getFromId(A,M.xref),te=l.getFromId(A,M.yref),Y=A._fullLayout._size;if(K?G==="domain"?D=function(ee){return K._offset+K._length*ee}:(E=v.shapePositionToRange(K),D=function(ee){return K._offset+K.r2p(E(ee,!0))}):D=function(ee){return Y.l+Y.w*ee},te?W==="domain"?R=function(ee){return te._offset+te._length*(1-ee)}:(O=v.shapePositionToRange(te),R=function(ee){return te._offset+te.r2p(O(ee,!0))}):R=function(ee){return Y.t+Y.h*(1-ee)},B==="path")return K&&K.type==="date"&&(D=v.decodeDate(D)),te&&te.type==="date"&&(R=v.decodeDate(R)),function(ee,ie,ae){var ue=ee.path,le=ee.xsizemode,ge=ee.ysizemode,fe=ee.xanchor,me=ee.yanchor;return ue.replace(p.segmentRE,function(_e){var we=0,Te=_e.charAt(0),Oe=p.paramIsX[Te],de=p.paramIsY[Te],ye=p.numParams[Te],Me=_e.substr(1).replace(p.paramRE,function(ke){return Oe[we]?ke=le==="pixel"?ie(fe)+Number(ke):ie(ke):de[we]&&(ke=ge==="pixel"?ae(me)-Number(ke):ae(ke)),++we>ye&&(ke="X"),ke});return we>ye&&(Me=Me.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+_e)),Te+Me})}(M,D,R);if(M.xsizemode==="pixel"){var Z=D(M.xanchor);z=Z+M.x0,L=Z+M.x1}else z=D(M.x0),L=D(M.x1);if(M.ysizemode==="pixel"){var re=R(M.yanchor);P=re-M.y0,N=re-M.y1}else P=R(M.y0),N=R(M.y1);if(B==="line")return"M"+z+","+P+"L"+L+","+N;if(B==="rect")return"M"+z+","+P+"H"+L+"V"+N+"H"+z+"Z";var U=(z+L)/2,q=(P+N)/2,$=Math.abs(U-z),ne=Math.abs(q-P),H="A"+$+","+ne,Q=U+$+","+q;return"M"+Q+H+" 0 1,1 "+(U+","+(q-ne))+H+" 0 0,1 "+Q+"Z"}function _(A,M,E){return A.replace(p.segmentRE,function(D){var O=0,R=D.charAt(0),z=p.paramIsX[R],L=p.paramIsY[R],P=p.numParams[R];return R+D.substr(1).replace(p.paramRE,function(N){return O>=P||(z[O]?N=M(N):L[O]&&(N=E(N)),O++),N})})}function S(A){w(A)&&A._fullLayout._activeShapeIndex>=0&&(s(A),delete A._fullLayout._activeShapeIndex,y(A))}o.exports={draw:y,drawOne:k,eraseActiveShape:function(A){if(!!w(A)){s(A);var M=A._fullLayout._activeShapeIndex,E=(A.layout||{}).shapes||[];if(M=0&&h(_),k.attr("d",v(w)),z&&!T&&(R=function(Z,re){for(var U=0;U1&&(q.length!==2||q[1][0]!=="Z")&&(O===0&&(q[0][0]="M"),w[D]=q,S(),A())}}()}}function K(Z,re){(function(U,q){if(w.length)for(var $=0;$0&&_0&&(Y=Y.transition().duration(N.transition.duration).ease(N.transition.easing)),Y.attr("transform",s(te-.5*h.gripWidth,N._dims.currentValueTotalHeight))}}function O(P,N){var B=P._dims;return B.inputAreaStart+h.stepInset+(B.inputAreaLength-2*h.stepInset)*Math.min(1,Math.max(0,N))}function R(P,N){var B=P._dims;return Math.min(1,Math.max(0,(N-h.stepInset-B.inputAreaStart)/(B.inputAreaLength-2*h.stepInset-2*B.inputAreaStart)))}function z(P,N,B){var G=B._dims,W=i.ensureSingle(P,"rect",h.railTouchRectClass,function(K){K.call(M,N,P,B).style("pointer-events","all")});W.attr({width:G.inputAreaLength,height:Math.max(G.inputAreaWidth,h.tickOffset+B.ticklen+G.labelHeight)}).call(l.fill,B.bgcolor).attr("opacity",0),c.setTranslate(W,0,G.currentValueTotalHeight)}function L(P,N){var B=N._dims,G=B.inputAreaLength-2*h.railInset,W=i.ensureSingle(P,"rect",h.railRectClass);W.attr({width:G,height:h.railWidth,rx:h.railRadius,ry:h.railRadius,"shape-rendering":"crispEdges"}).call(l.stroke,N.bordercolor).call(l.fill,N.bgcolor).style("stroke-width",N.borderwidth+"px"),c.setTranslate(W,h.railInset,.5*(B.inputAreaWidth-h.railWidth)+B.currentValueTotalHeight)}o.exports=function(P){var N=P._fullLayout,B=function(Z,re){for(var U=Z[h.name],q=[],$=0;$0?[0]:[]);function W(Z){Z._commandObserver&&(Z._commandObserver.remove(),delete Z._commandObserver),a.autoMargin(P,y(Z))}if(G.enter().append("g").classed(h.containerClassName,!0).style("cursor","ew-resize"),G.exit().each(function(){r.select(this).selectAll("g."+h.groupClassName).each(W)}).remove(),B.length!==0){var K=G.selectAll("g."+h.groupClassName).data(B,x);K.enter().append("g").classed(h.groupClassName,!0),K.exit().each(W).remove();for(var te=0;te0||ae<0){var fe={left:[-ue,0],right:[ue,0],top:[0,-ue],bottom:[0,ue]}[S.side];$.attr("transform",s(fe[0],fe[1]))}}}return Y.call(Z),W&&(L?Y.on(".opacity",null):(O=0,R=!0,Y.text(T).on("mouseover.opacity",function(){r.select(this).transition().duration(m.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){r.select(this).transition().duration(m.HIDE_PLACEHOLDER).style("opacity",0)})),Y.call(h.makeEditable,{gd:v}).on("edit",function(q){_!==void 0?c.call("_guiRestyle",v,b,q,_):c.call("_guiRelayout",v,b,q)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Z)}).on("input",function(q){this.text(q||" ").call(h.positionText,A.x,A.y)})),Y.classed("js-placeholder",R),E}}},{"../../constants/alignment":471,"../../constants/interactions":478,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/plots":619,"../../registry":638,"../color":366,"../drawing":388,"@plotly/d3":58,"fast-isnumeric":190}],465:[function(e,o,f){var r=e("../../plots/font_attributes"),a=e("../color/attributes"),l=e("../../lib/extend").extendFlat,c=e("../../plot_api/edit_types").overrideAll,i=e("../../plots/pad_attributes"),s=e("../../plot_api/plot_template").templatedArray,u=s("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}});o.exports=c(s("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:u,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:l(i({editType:"arraydraw"}),{}),font:r({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},{"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plot_api/plot_template":543,"../../plots/font_attributes":585,"../../plots/pad_attributes":618,"../color/attributes":365}],466:[function(e,o,f){o.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:"\u25C4",right:"\u25BA",up:"\u25B2",down:"\u25BC"}}},{}],467:[function(e,o,f){var r=e("../../lib"),a=e("../../plots/array_container_defaults"),l=e("./attributes"),c=e("./constants").name,i=l.buttons;function s(d,h,m){function g(p,v){return r.coerce(d,h,l,p,v)}g("visible",a(d,h,{name:"buttons",handleItemDefaults:u}).length>0)&&(g("active"),g("direction"),g("type"),g("showactive"),g("x"),g("y"),r.noneOrAll(d,h,["x","y"]),g("xanchor"),g("yanchor"),g("pad.t"),g("pad.r"),g("pad.b"),g("pad.l"),r.coerceFont(g,"font",m.font),g("bgcolor",m.paper_bgcolor),g("bordercolor"),g("borderwidth"))}function u(d,h){function m(g,p){return r.coerce(d,h,i,g,p)}m("visible",d.method==="skip"||Array.isArray(d.args))&&(m("method"),m("args"),m("args2"),m("label"),m("execute"))}o.exports=function(d,h){a(d,h,{name:c,handleItemDefaults:s})}},{"../../lib":503,"../../plots/array_container_defaults":549,"./attributes":465,"./constants":466}],468:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../plots/plots"),l=e("../color"),c=e("../drawing"),i=e("../../lib"),s=e("../../lib/svg_text_utils"),u=e("../../plot_api/plot_template").arrayEditor,d=e("../../constants/alignment").LINE_SPACING,h=e("./constants"),m=e("./scrollbox");function g(O){return O._index}function p(O,R){return+O.attr(h.menuIndexAttrName)===R._index}function v(O,R,z,L,P,N,B,G){R.active=B,u(O.layout,h.name,R).applyUpdate("active",B),R.type==="buttons"?x(O,L,null,null,R):R.type==="dropdown"&&(P.attr(h.menuIndexAttrName,"-1"),y(O,L,P,N,R),G||x(O,L,P,N,R))}function y(O,R,z,L,P){var N=i.ensureSingle(R,"g",h.headerClassName,function(Y){Y.style("pointer-events","all")}),B=P._dims,G=P.active,W=P.buttons[G]||h.blankHeaderOpts,K={y:P.pad.t,yPad:0,x:P.pad.l,xPad:0,index:0},te={width:B.headerWidth,height:B.headerHeight};N.call(w,P,W,O).call(E,P,K,te),i.ensureSingle(R,"text",h.headerArrowClassName,function(Y){Y.attr("text-anchor","end").call(c.font,P.font).text(h.arrowSymbol[P.direction])}).attr({x:B.headerWidth-h.arrowOffsetX+P.pad.l,y:B.headerHeight/2+h.textOffsetY+P.pad.t}),N.on("click",function(){z.call(D,String(p(z,P)?-1:P._index)),x(O,R,z,L,P)}),N.on("mouseover",function(){N.call(_)}),N.on("mouseout",function(){N.call(S,P)}),c.setTranslate(R,B.lx,B.ly)}function x(O,R,z,L,P){z||(z=R).attr("pointer-events","all");var N=function($){return+$.attr(h.menuIndexAttrName)==-1}(z)&&P.type!=="buttons"?[]:P.buttons,B=P.type==="dropdown"?h.dropdownButtonClassName:h.buttonClassName,G=z.selectAll("g."+B).data(i.filterVisible(N)),W=G.enter().append("g").classed(B,!0),K=G.exit();P.type==="dropdown"?(W.attr("opacity","0").transition().attr("opacity","1"),K.transition().attr("opacity","0").remove()):K.remove();var te=0,Y=0,Z=P._dims,re=["up","down"].indexOf(P.direction)!==-1;P.type==="dropdown"&&(re?Y=Z.headerHeight+h.gapButtonHeader:te=Z.headerWidth+h.gapButtonHeader),P.type==="dropdown"&&P.direction==="up"&&(Y=-h.gapButtonHeader+h.gapButton-Z.openHeight),P.type==="dropdown"&&P.direction==="left"&&(te=-h.gapButtonHeader+h.gapButton-Z.openWidth);var U={x:Z.lx+te+P.pad.l,y:Z.ly+Y+P.pad.t,yPad:h.gapButton,xPad:h.gapButton,index:0},q={l:U.x+P.borderwidth,t:U.y+P.borderwidth};G.each(function($,ne){var H=r.select(this);H.call(w,P,$,O).call(E,P,U),H.on("click",function(){r.event.defaultPrevented||($.execute&&($.args2&&P.active===ne?(v(O,P,0,R,z,L,-1),a.executeAPICommand(O,$.method,$.args2)):(v(O,P,0,R,z,L,ne),a.executeAPICommand(O,$.method,$.args))),O.emit("plotly_buttonclicked",{menu:P,button:$,active:P.active}))}),H.on("mouseover",function(){H.call(_)}),H.on("mouseout",function(){H.call(S,P),G.call(T,P)})}),G.call(T,P),re?(q.w=Math.max(Z.openWidth,Z.headerWidth),q.h=U.y-q.t):(q.w=U.x-q.l,q.h=Math.max(Z.openHeight,Z.headerHeight)),q.direction=P.direction,L&&(G.size()?function($,ne,H,Q,ee,ie){var ae,ue,le,ge=ee.direction,fe=ge==="up"||ge==="down",me=ee._dims,_e=ee.active;if(fe)for(ue=0,le=0;le<_e;le++)ue+=me.heights[le]+h.gapButton;else for(ae=0,le=0;le<_e;le++)ae+=me.widths[le]+h.gapButton;Q.enable(ie,ae,ue),Q.hbar&&Q.hbar.attr("opacity","0").transition().attr("opacity","1"),Q.vbar&&Q.vbar.attr("opacity","0").transition().attr("opacity","1")}(0,0,0,L,P,q):function($){var ne=!!$.hbar,H=!!$.vbar;ne&&$.hbar.transition().attr("opacity","0").each("end",function(){ne=!1,H||$.disable()}),H&&$.vbar.transition().attr("opacity","0").each("end",function(){H=!1,ne||$.disable()})}(L))}function w(O,R,z,L){O.call(k,R).call(b,R,z,L)}function k(O,R){i.ensureSingle(O,"rect",h.itemRectClassName,function(z){z.attr({rx:h.rx,ry:h.ry,"shape-rendering":"crispEdges"})}).call(l.stroke,R.bordercolor).call(l.fill,R.bgcolor).style("stroke-width",R.borderwidth+"px")}function b(O,R,z,L){var P=i.ensureSingle(O,"text",h.itemTextClassName,function(G){G.attr({"text-anchor":"start","data-notex":1})}),N=z.label,B=L._fullLayout._meta;B&&(N=i.templateString(N,B)),P.call(c.font,R.font).text(N).call(s.convertToTspans,L)}function T(O,R){var z=R.active;O.each(function(L,P){var N=r.select(this);P===z&&R.showactive&&N.select("rect."+h.itemRectClassName).call(l.fill,h.activeColor)})}function _(O){O.select("rect."+h.itemRectClassName).call(l.fill,h.hoverColor)}function S(O,R){O.select("rect."+h.itemRectClassName).call(l.fill,R.bgcolor)}function A(O,R){var z=R._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},L=c.tester.selectAll("g."+h.dropdownButtonClassName).data(i.filterVisible(R.buttons));L.enter().append("g").classed(h.dropdownButtonClassName,!0);var P=["up","down"].indexOf(R.direction)!==-1;L.each(function(te,Y){var Z=r.select(this);Z.call(w,R,te,O);var re=Z.select("."+h.itemTextClassName),U=re.node()&&c.bBox(re.node()).width,q=Math.max(U+h.textPadX,h.minWidth),$=R.font.size*d,ne=s.lineCount(re),H=Math.max($*ne,h.minHeight)+h.textOffsetY;H=Math.ceil(H),q=Math.ceil(q),z.widths[Y]=q,z.heights[Y]=H,z.height1=Math.max(z.height1,H),z.width1=Math.max(z.width1,q),P?(z.totalWidth=Math.max(z.totalWidth,q),z.openWidth=z.totalWidth,z.totalHeight+=H+h.gapButton,z.openHeight+=H+h.gapButton):(z.totalWidth+=q+h.gapButton,z.openWidth+=q+h.gapButton,z.totalHeight=Math.max(z.totalHeight,H),z.openHeight=z.totalHeight)}),P?z.totalHeight-=h.gapButton:z.totalWidth-=h.gapButton,z.headerWidth=z.width1+h.arrowPadX,z.headerHeight=z.height1,R.type==="dropdown"&&(P?(z.width1+=h.arrowPadX,z.totalHeight=z.height1):z.totalWidth=z.width1,z.totalWidth+=h.arrowPadX),L.remove();var N=z.totalWidth+R.pad.l+R.pad.r,B=z.totalHeight+R.pad.t+R.pad.b,G=O._fullLayout._size;z.lx=G.l+G.w*R.x,z.ly=G.t+G.h*(1-R.y);var W="left";i.isRightAnchor(R)&&(z.lx-=N,W="right"),i.isCenterAnchor(R)&&(z.lx-=N/2,W="center");var K="top";i.isBottomAnchor(R)&&(z.ly-=B,K="bottom"),i.isMiddleAnchor(R)&&(z.ly-=B/2,K="middle"),z.totalWidth=Math.ceil(z.totalWidth),z.totalHeight=Math.ceil(z.totalHeight),z.lx=Math.round(z.lx),z.ly=Math.round(z.ly),a.autoMargin(O,M(R),{x:R.x,y:R.y,l:N*({right:1,center:.5}[W]||0),r:N*({left:1,center:.5}[W]||0),b:B*({top:1,middle:.5}[K]||0),t:B*({bottom:1,middle:.5}[K]||0)})}function M(O){return h.autoMarginIdRoot+O._index}function E(O,R,z,L){L=L||{};var P=O.select("."+h.itemRectClassName),N=O.select("."+h.itemTextClassName),B=R.borderwidth,G=z.index,W=R._dims;c.setTranslate(O,B+z.x,B+z.y);var K=["up","down"].indexOf(R.direction)!==-1,te=L.height||(K?W.heights[G]:W.height1);P.attr({x:0,y:0,width:L.width||(K?W.width1:W.widths[G]),height:te});var Y=R.font.size*d,Z=(s.lineCount(N)-1)*Y/2;s.positionText(N,h.textOffsetX,te/2-Z+h.textOffsetY),K?z.y+=W.heights[G]+z.yPad:z.x+=W.widths[G]+z.xPad,z.index++}function D(O,R){O.attr(h.menuIndexAttrName,R||"-1").selectAll("g."+h.dropdownButtonClassName).remove()}o.exports=function(O){var R=O._fullLayout,z=i.filterVisible(R[h.name]);function L(Y){a.autoMargin(O,M(Y))}var P=R._menulayer.selectAll("g."+h.containerClassName).data(z.length>0?[0]:[]);if(P.enter().append("g").classed(h.containerClassName,!0).style("cursor","pointer"),P.exit().each(function(){r.select(this).selectAll("g."+h.headerGroupClassName).each(L)}).remove(),z.length!==0){var N=P.selectAll("g."+h.headerGroupClassName).data(z,g);N.enter().append("g").classed(h.headerGroupClassName,!0);for(var B=i.ensureSingle(P,"g",h.dropdownButtonGroupClassName,function(Y){Y.style("pointer-events","all")}),G=0;GE,R=i.barLength+2*i.barPad,z=i.barWidth+2*i.barPad,L=w,P=b+T;P+z>g&&(P=g-z);var N=this.container.selectAll("rect.scrollbar-horizontal").data(O?[0]:[]);N.exit().on(".drag",null).remove(),N.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,i.barColor),O?(this.hbar=N.attr({rx:i.barRadius,ry:i.barRadius,x:L,y:P,width:R,height:z}),this._hbarXMin=L+R/2,this._hbarTranslateMax=E-R):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var B=T>D,G=i.barWidth+2*i.barPad,W=i.barLength+2*i.barPad,K=w+k,te=b;K+G>m&&(K=m-G);var Y=this.container.selectAll("rect.scrollbar-vertical").data(B?[0]:[]);Y.exit().on(".drag",null).remove(),Y.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,i.barColor),B?(this.vbar=Y.attr({rx:i.barRadius,ry:i.barRadius,x:K,y:te,width:G,height:W}),this._vbarYMin=te+W/2,this._vbarTranslateMax=D-W):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var Z=this.id,re=p-.5,U=B?v+G+.5:v+.5,q=y-.5,$=O?x+z+.5:x+.5,ne=h._topdefs.selectAll("#"+Z).data(O||B?[0]:[]);if(ne.exit().remove(),ne.enter().append("clipPath").attr("id",Z).append("rect"),O||B?(this._clipRect=ne.select("rect").attr({x:Math.floor(re),y:Math.floor(q),width:Math.ceil(U)-Math.floor(re),height:Math.ceil($)-Math.floor(q)}),this.container.call(l.setClipUrl,Z,this.gd),this.bg.attr({x:w,y:b,width:k,height:T})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(l.setClipUrl,null),delete this._clipRect),O||B){var H=r.behavior.drag().on("dragstart",function(){r.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(H);var Q=r.behavior.drag().on("dragstart",function(){r.event.sourceEvent.preventDefault(),r.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));O&&this.hbar.on(".drag",null).call(Q),B&&this.vbar.on(".drag",null).call(Q)}this.setTranslate(u,d)},i.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(l.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)},i.prototype._onBoxDrag=function(){var s=this.translateX,u=this.translateY;this.hbar&&(s-=r.event.dx),this.vbar&&(u-=r.event.dy),this.setTranslate(s,u)},i.prototype._onBoxWheel=function(){var s=this.translateX,u=this.translateY;this.hbar&&(s+=r.event.deltaY),this.vbar&&(u+=r.event.deltaY),this.setTranslate(s,u)},i.prototype._onBarDrag=function(){var s=this.translateX,u=this.translateY;if(this.hbar){var d=s+this._hbarXMin,h=d+this._hbarTranslateMax;s=(c.constrain(r.event.x,d,h)-d)/(h-d)*(this.position.w-this._box.w)}if(this.vbar){var m=u+this._vbarYMin,g=m+this._vbarTranslateMax;u=(c.constrain(r.event.y,m,g)-m)/(g-m)*(this.position.h-this._box.h)}this.setTranslate(s,u)},i.prototype.setTranslate=function(s,u){var d=this.position.w-this._box.w,h=this.position.h-this._box.h;if(s=c.constrain(s||0,0,d),u=c.constrain(u||0,0,h),this.translateX=s,this.translateY=u,this.container.call(l.setTranslate,this._box.l-this.position.l-s,this._box.t-this.position.t-u),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+s-.5),y:Math.floor(this.position.t+u-.5)}),this.hbar){var m=s/d;this.hbar.call(l.setTranslate,s+m*this._hbarTranslateMax,u)}if(this.vbar){var g=u/h;this.vbar.call(l.setTranslate,s,u+g*this._vbarTranslateMax)}}},{"../../lib":503,"../color":366,"../drawing":388,"@plotly/d3":58}],471:[function(e,o,f){o.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"}}},{}],472:[function(e,o,f){o.exports={axisRefDescription:function(r,a,l){return["If set to a",r,"axis id (e.g. *"+r+"* or","*"+r+"2*), the `"+r+"` position refers to a",r,"coordinate. If set to *paper*, the `"+r+"`","position refers to the distance from the",a,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",a,"("+l+"). If set to a",r,"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",a,"of the domain of that axis: e.g.,","*"+r+"2 domain* refers to the domain of the second",r," axis and a",r,"position of 0.5 refers to the","point between the",a,"and the",l,"of the domain of the","second",r,"axis."].join(" ")}}},{}],473:[function(e,o,f){o.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}},{}],474:[function(e,o,f){o.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"}},{}],475:[function(e,o,f){o.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},{}],476:[function(e,o,f){o.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]}},{}],477:[function(e,o,f){o.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}},{}],478:[function(e,o,f){o.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],479:[function(e,o,f){o.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,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,EPOCHJD:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"\u2212"}},{}],480:[function(e,o,f){f.xmlns="http://www.w3.org/2000/xmlns/",f.svg="http://www.w3.org/2000/svg",f.xlink="http://www.w3.org/1999/xlink",f.svgAttrs={xmlns:f.svg,"xmlns:xlink":f.xlink}},{}],481:[function(e,o,f){f.version=e("./version").version,e("native-promise-only"),e("../build/plotcss");for(var r=e("./registry"),a=f.register=r.register,l=e("./plot_api"),c=Object.keys(l),i=0;iplotly-logomark"}}},{}],483:[function(e,o,f){f.isLeftAnchor=function(r){return r.xanchor==="left"||r.xanchor==="auto"&&r.x<=1/3},f.isCenterAnchor=function(r){return r.xanchor==="center"||r.xanchor==="auto"&&r.x>1/3&&r.x<2/3},f.isRightAnchor=function(r){return r.xanchor==="right"||r.xanchor==="auto"&&r.x>=2/3},f.isTopAnchor=function(r){return r.yanchor==="top"||r.yanchor==="auto"&&r.y>=2/3},f.isMiddleAnchor=function(r){return r.yanchor==="middle"||r.yanchor==="auto"&&r.y>1/3&&r.y<2/3},f.isBottomAnchor=function(r){return r.yanchor==="bottom"||r.yanchor==="auto"&&r.y<=1/3}},{}],484:[function(e,o,f){var r=e("./mod"),a=r.mod,l=r.modHalf,c=Math.PI,i=2*c;function s(m){return Math.abs(m[1]-m[0])>i-1e-14}function u(m,g){return l(g-m,i)}function d(m,g){if(s(g))return!0;var p,v;g[0](v=a(v,i))&&(v+=i);var y=a(m,i),x=y+i;return y>=p&&y<=v||x>=p&&x<=v}function h(m,g,p,v,y,x,w){y=y||0,x=x||0;var k,b,T,_,S,A=s([p,v]);function M(R,z){return[R*Math.cos(z)+y,x-R*Math.sin(z)]}A?(k=0,b=c,T=i):p=y&&m<=x);var y,x},pathArc:function(m,g,p,v,y){return h(null,m,g,p,v,y,0)},pathSector:function(m,g,p,v,y){return h(null,m,g,p,v,y,1)},pathAnnulus:function(m,g,p,v,y,x){return h(m,g,p,v,y,x,1)}}},{"./mod":510}],485:[function(e,o,f){var r=Array.isArray,a=ArrayBuffer,l=DataView;function c(u){return a.isView(u)&&!(u instanceof l)}function i(u){return r(u)||c(u)}function s(u,d,h){if(i(u)){if(i(u[0])){for(var m=h,g=0;gx.max?v.set(y):v.set(+p)}},integer:{coerceFunction:function(p,v,y,x){p%1||!r(p)||x.min!==void 0&&px.max?v.set(y):v.set(+p)}},string:{coerceFunction:function(p,v,y,x){if(typeof p!="string"){var w=typeof p=="number";x.strict!==!0&&w?v.set(String(p)):v.set(y)}else x.noBlank&&!p?v.set(y):v.set(p)}},color:{coerceFunction:function(p,v,y){a(p).isValid()?v.set(p):v.set(y)}},colorlist:{coerceFunction:function(p,v,y){Array.isArray(p)&&p.length&&p.every(function(x){return a(x).isValid()})?v.set(p):v.set(y)}},colorscale:{coerceFunction:function(p,v,y){v.set(c.get(p,y))}},angle:{coerceFunction:function(p,v,y){p==="auto"?v.set("auto"):r(p)?v.set(h(+p,360)):v.set(y)}},subplotid:{coerceFunction:function(p,v,y,x){var w=x.regex||d(y);typeof p=="string"&&w.test(p)?v.set(p):v.set(y)},validateFunction:function(p,v){var y=v.dflt;return p===y||typeof p=="string"&&!!d(y).test(p)}},flaglist:{coerceFunction:function(p,v,y,x){if(typeof p=="string")if((x.extras||[]).indexOf(p)===-1){for(var w=p.split("+"),k=0;k=r&&N<=a?N:d}if(typeof N!="string"&&typeof N!="number")return d;N=String(N);var te=T(B),Y=N.charAt(0);!te||Y!=="G"&&Y!=="g"||(N=N.substr(1),B="");var Z=te&&B.substr(0,7)==="chinese",re=N.match(Z?k:w);if(!re)return d;var U=re[1],q=re[3]||"1",$=Number(re[5]||1),ne=Number(re[7]||0),H=Number(re[9]||0),Q=Number(re[11]||0);if(te){if(U.length===2)return d;var ee;U=Number(U);try{var ie=y.getComponentMethod("calendars","getCal")(B);if(Z){var ae=q.charAt(q.length-1)==="i";q=parseInt(q,10),ee=ie.newDate(U,ie.toMonthIndex(U,q,ae),$)}else ee=ie.newDate(U,Number(q),$)}catch{return d}return ee?(ee.toJD()-v)*h+ne*m+H*g+Q*p:d}U=U.length===2?(Number(U)+2e3-b)%100+b:Number(U),q-=1;var ue=new Date(Date.UTC(2e3,q,$,ne,H));return ue.setUTCFullYear(U),ue.getUTCMonth()!==q||ue.getUTCDate()!==$?d:ue.getTime()+Q*p},r=f.MIN_MS=f.dateTime2ms("-9999"),a=f.MAX_MS=f.dateTime2ms("9999-12-31 23:59:59.9999"),f.isDateTime=function(N,B){return f.dateTime2ms(N,B)!==d};var S=90*h,A=3*m,M=5*g;function E(N,B,G,W,K){if((B||G||W||K)&&(N+=" "+_(B,2)+":"+_(G,2),(W||K)&&(N+=":"+_(W,2),K))){for(var te=4;K%10==0;)te-=1,K/=10;N+="."+_(K,te)}return N}f.ms2DateTime=function(N,B,G){if(typeof N!="number"||!(N>=r&&N<=a))return d;B||(B=0);var W,K,te,Y,Z,re,U=Math.floor(10*s(N+.05,1)),q=Math.round(N-U/10);if(T(G)){var $=Math.floor(q/h)+v,ne=Math.floor(s(N,h));try{W=y.getComponentMethod("calendars","getCal")(G).fromJD($).formatDate("yyyy-mm-dd")}catch{W=x("G%Y-%m-%d")(new Date(q))}if(W.charAt(0)==="-")for(;W.length<11;)W="-0"+W.substr(1);else for(;W.length<10;)W="0"+W;K=B=r+h&&N<=a-h))return d;var B=Math.floor(10*s(N+.05,1)),G=new Date(Math.round(N-B/10));return E(l("%Y-%m-%d")(G),G.getHours(),G.getMinutes(),G.getSeconds(),10*G.getUTCMilliseconds()+B)},f.cleanDate=function(N,B,G){if(N===d)return B;if(f.isJSDate(N)||typeof N=="number"&&isFinite(N)){if(T(G))return i.error("JS Dates and milliseconds are incompatible with world calendars",N),B;if(!(N=f.ms2DateTimeLocal(+N))&&B!==void 0)return B}else if(!f.isDateTime(N,G))return i.error("unrecognized date",N),B;return N};var D=/%\d?f/g,O=/%h/g,R={1:"1",2:"1",3:"2",4:"2"};function z(N,B,G,W){N=N.replace(D,function(te){var Y=Math.min(+te.charAt(1)||6,6);return(B/1e3%1+2).toFixed(Y).substr(2).replace(/0+$/,"")||"0"});var K=new Date(Math.floor(B+.05));if(N=N.replace(O,function(){return R[G("%q")(K)]}),T(W))try{N=y.getComponentMethod("calendars","worldCalFmt")(N,B,W)}catch{return"Invalid"}return G(N)(K)}var L=[59,59.9,59.99,59.999,59.9999];f.formatDate=function(N,B,G,W,K,te){if(K=T(K)&&K,!B)if(G==="y")B=te.year;else if(G==="m")B=te.month;else{if(G!=="d")return function(Y,Z){var re=s(Y+.05,h),U=_(Math.floor(re/m),2)+":"+_(s(Math.floor(re/g),60),2);if(Z!=="M"){c(Z)||(Z=0);var q=(100+Math.min(s(Y/p,60),L[Z])).toFixed(Z).substr(1);Z>0&&(q=q.replace(/0+$/,"").replace(/[\.]$/,"")),U+=":"+q}return U}(N,G)+` +`+z(te.dayMonthYear,N,W,K);B=te.dayMonth+` +`+te.year}return z(B,N,W,K)};var P=3*h;f.incrementMonth=function(N,B,G){G=T(G)&&G;var W=s(N,h);if(N=Math.round(N-W),G)try{var K=Math.round(N/h)+v,te=y.getComponentMethod("calendars","getCal")(G),Y=te.fromJD(K);return B%12?te.add(Y,B,"m"):te.add(Y,B/12,"y"),(Y.toJD()-v)*h+W}catch{i.error("invalid ms "+N+" in calendar "+G)}var Z=new Date(N+P);return Z.setUTCMonth(Z.getUTCMonth()+B)+W-P},f.findExactDates=function(N,B){for(var G,W,K=0,te=0,Y=0,Z=0,re=T(B)&&y.getComponentMethod("calendars","getCal")(B),U=0;U0&&E[D+1][0]<0)return D;return null}switch(x=S==="RUS"||S==="FJI"?function(E){var D;if(M(E)===null)D=E;else for(D=new Array(E.length),b=0;bD?O[R++]=[E[b][0]+360,E[b][1]]:b===D?(O[R++]=E[b],O[R++]=[E[b][0],-90]):O[R++]=E[b];var z=m.tester(O);z.pts.pop(),A.push(z)}:function(E){A.push(m.tester(E))},T.type){case"MultiPolygon":for(w=0;w<_.length;w++)for(k=0;k<_[w].length;k++)x(_[w][k]);break;case"Polygon":for(w=0;w<_.length;w++)x(_[w])}return A},getTraceGeojson:v,extractTraceFeature:function(y){var x=y[0].trace,w=v(x);if(!w)return!1;var k,b={},T=[];for(k=0;kG&&(G=te,P=K)}else P=N;return c.default(P).geometry.coordinates}(z),O.fIn=E,O.fOut=z,T.push(z)}else u.log(["Location",O.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete b[D]}switch(w.type){case"FeatureCollection":var A=w.features;for(k=0;k100?(clearInterval(D),M("Unexpected error while fetching from "+S)):void E++},50)})}for(var T=0;T0&&(c.push(i),i=[])}return i.length>0&&c.push(i),c},f.makeLine=function(a){return a.length===1?{type:"LineString",coordinates:a[0]}:{type:"MultiLineString",coordinates:a}},f.makePolygon=function(a){if(a.length===1)return{type:"Polygon",coordinates:a};for(var l=new Array(a.length),c=0;c1||A<0||A>1?null:{x:u+x*A,y:d+b*A}}function s(u,d,h,m,g){var p=m*u+g*d;if(p<0)return m*m+g*g;if(p>h){var v=m-u,y=g-d;return v*v+y*y}var x=m*d-g*u;return x*x/h}f.segmentsIntersect=i,f.segmentDistance=function(u,d,h,m,g,p,v,y){if(i(u,d,h,m,g,p,v,y))return 0;var x=h-u,w=m-d,k=v-g,b=y-p,T=x*x+w*w,_=k*k+b*b,S=Math.min(s(x,w,T,g-u,p-d),s(x,w,T,v-u,y-d),s(k,b,_,u-g,d-p),s(k,b,_,h-g,m-p));return Math.sqrt(S)},f.getTextLocation=function(u,d,h,m){if(u===a&&m===l||(r={},a=u,l=m),r[h])return r[h];var g=u.getPointAtLength(c(h-m/2,d)),p=u.getPointAtLength(c(h+m/2,d)),v=Math.atan((p.y-g.y)/(p.x-g.x)),y=u.getPointAtLength(c(h,d)),x={x:(4*y.x+g.x+p.x)/6,y:(4*y.y+g.y+p.y)/6,theta:v};return r[h]=x,x},f.clearLocationCache=function(){a=null},f.getVisibleSegment=function(u,d,h){var m,g,p=d.left,v=d.right,y=d.top,x=d.bottom,w=0,k=u.getTotalLength(),b=k;function T(S){var A=u.getPointAtLength(S);S===0?m=A:S===k&&(g=A);var M=A.xv?A.x-v:0,E=A.yx?A.y-x:0;return Math.sqrt(M*M+E*E)}for(var _=T(w);_;){if((w+=_+h)>b)return;_=T(w)}for(_=T(b);_;){if(w>(b-=_+h))return;_=T(b)}return{min:w,max:b,len:b-w,total:k,isClosed:w===0&&b===k&&Math.abs(m.x-g.x)<.1&&Math.abs(m.y-g.y)<.1}},f.findPointOnPath=function(u,d,h,m){for(var g,p,v,y=(m=m||{}).pathLength||u.getTotalLength(),x=m.tolerance||.001,w=m.iterationLimit||30,k=u.getPointAtLength(0)[h]>u.getPointAtLength(y)[h]?-1:1,b=0,T=0,_=y;b0?_=g:T=g,b++}return p}},{"./mod":510}],499:[function(e,o,f){var r=e("fast-isnumeric"),a=e("tinycolor2"),l=e("color-normalize"),c=e("../components/colorscale"),i=e("../components/color/attributes").defaultLine,s=e("./array").isArrayOrTypedArray,u=l(i);function d(g,p){var v=g;return v[3]*=p,v}function h(g){if(r(g))return u;var p=l(g);return p.length?p:u}function m(g){return r(g)?g:1}o.exports={formatColor:function(g,p,v){var y,x,w,k,b,T=g.color,_=s(T),S=s(p),A=c.extractOpts(g),M=[];if(y=A.colorscale!==void 0?c.makeColorScaleFuncFromTrace(g):h,x=_?function(D,O){return D[O]===void 0?u:l(y(D[O]))}:h,w=S?function(D,O){return D[O]===void 0?1:m(D[O])}:m,_||S)for(var E=0;E1?(l*r+l*a)/l:r+a,i=String(c).length;if(i>16){var s=String(a).length;if(i>=String(r).length+s){var u=parseFloat(c).toPrecision(12);u.indexOf("e+")===-1&&(c=+u)}}return c}},{}],503:[function(e,o,f){var r=e("@plotly/d3"),a=e("d3-time-format").utcFormat,l=e("d3-format").format,c=e("fast-isnumeric"),i=e("../constants/numerical"),s=i.FP_SAFE,u=-s,d=i.BADNUM,h=o.exports={};h.adjustFormat=function(U){return!U||/^\d[.]\df/.test(U)||/[.]\d%/.test(U)?U:U==="0.f"?"~f":/^\d%/.test(U)?"~%":/^\ds/.test(U)?"~s":!/^[~,.0$]/.test(U)&&/[&fps]/.test(U)?"~"+U:U};var m={};h.warnBadFormat=function(U){var q=String(U);m[q]||(m[q]=1,h.warn('encountered bad format: "'+q+'"'))},h.noFormat=function(U){return String(U)},h.numberFormat=function(U){var q;try{q=l(h.adjustFormat(U))}catch{return h.warnBadFormat(U),h.noFormat}return q},h.nestedProperty=e("./nested_property"),h.keyedContainer=e("./keyed_container"),h.relativeAttr=e("./relative_attr"),h.isPlainObject=e("./is_plain_object"),h.toLogRange=e("./to_log_range"),h.relinkPrivateKeys=e("./relink_private");var g=e("./array");h.isTypedArray=g.isTypedArray,h.isArrayOrTypedArray=g.isArrayOrTypedArray,h.isArray1D=g.isArray1D,h.ensureArray=g.ensureArray,h.concat=g.concat,h.maxRowLength=g.maxRowLength,h.minRowLength=g.minRowLength;var p=e("./mod");h.mod=p.mod,h.modHalf=p.modHalf;var v=e("./coerce");h.valObjectMeta=v.valObjectMeta,h.coerce=v.coerce,h.coerce2=v.coerce2,h.coerceFont=v.coerceFont,h.coercePattern=v.coercePattern,h.coerceHoverinfo=v.coerceHoverinfo,h.coerceSelectionMarkerOpacity=v.coerceSelectionMarkerOpacity,h.validate=v.validate;var y=e("./dates");h.dateTime2ms=y.dateTime2ms,h.isDateTime=y.isDateTime,h.ms2DateTime=y.ms2DateTime,h.ms2DateTimeLocal=y.ms2DateTimeLocal,h.cleanDate=y.cleanDate,h.isJSDate=y.isJSDate,h.formatDate=y.formatDate,h.incrementMonth=y.incrementMonth,h.dateTick0=y.dateTick0,h.dfltRange=y.dfltRange,h.findExactDates=y.findExactDates,h.MIN_MS=y.MIN_MS,h.MAX_MS=y.MAX_MS;var x=e("./search");h.findBin=x.findBin,h.sorterAsc=x.sorterAsc,h.sorterDes=x.sorterDes,h.distinctVals=x.distinctVals,h.roundUp=x.roundUp,h.sort=x.sort,h.findIndexOfMin=x.findIndexOfMin,h.sortObjectKeys=e("./sort_object_keys");var w=e("./stats");h.aggNums=w.aggNums,h.len=w.len,h.mean=w.mean,h.median=w.median,h.midRange=w.midRange,h.variance=w.variance,h.stdev=w.stdev,h.interp=w.interp;var k=e("./matrix");h.init2dArray=k.init2dArray,h.transposeRagged=k.transposeRagged,h.dot=k.dot,h.translationMatrix=k.translationMatrix,h.rotationMatrix=k.rotationMatrix,h.rotationXYMatrix=k.rotationXYMatrix,h.apply3DTransform=k.apply3DTransform,h.apply2DTransform=k.apply2DTransform,h.apply2DTransform2=k.apply2DTransform2,h.convertCssMatrix=k.convertCssMatrix,h.inverseTransformMatrix=k.inverseTransformMatrix;var b=e("./angles");h.deg2rad=b.deg2rad,h.rad2deg=b.rad2deg,h.angleDelta=b.angleDelta,h.angleDist=b.angleDist,h.isFullCircle=b.isFullCircle,h.isAngleInsideSector=b.isAngleInsideSector,h.isPtInsideSector=b.isPtInsideSector,h.pathArc=b.pathArc,h.pathSector=b.pathSector,h.pathAnnulus=b.pathAnnulus;var T=e("./anchor_utils");h.isLeftAnchor=T.isLeftAnchor,h.isCenterAnchor=T.isCenterAnchor,h.isRightAnchor=T.isRightAnchor,h.isTopAnchor=T.isTopAnchor,h.isMiddleAnchor=T.isMiddleAnchor,h.isBottomAnchor=T.isBottomAnchor;var _=e("./geometry2d");h.segmentsIntersect=_.segmentsIntersect,h.segmentDistance=_.segmentDistance,h.getTextLocation=_.getTextLocation,h.clearLocationCache=_.clearLocationCache,h.getVisibleSegment=_.getVisibleSegment,h.findPointOnPath=_.findPointOnPath;var S=e("./extend");h.extendFlat=S.extendFlat,h.extendDeep=S.extendDeep,h.extendDeepAll=S.extendDeepAll,h.extendDeepNoArrays=S.extendDeepNoArrays;var A=e("./loggers");h.log=A.log,h.warn=A.warn,h.error=A.error;var M=e("./regex");h.counterRegex=M.counter;var E=e("./throttle");h.throttle=E.throttle,h.throttleDone=E.done,h.clearThrottle=E.clear;var D=e("./dom");function O(U){var q={};for(var $ in U)for(var ne=U[$],H=0;Hs||U=q)&&c(U)&&U>=0&&U%1==0},h.noop=e("./noop"),h.identity=e("./identity"),h.repeat=function(U,q){for(var $=new Array(q),ne=0;ne$?Math.max($,Math.min(q,U)):Math.max(q,Math.min($,U))},h.bBoxIntersect=function(U,q,$){return $=$||0,U.left<=q.right+$&&q.left<=U.right+$&&U.top<=q.bottom+$&&q.top<=U.bottom+$},h.simpleMap=function(U,q,$,ne,H){for(var Q=U.length,ee=new Array(Q),ie=0;ie=Math.pow(2,$)?H>10?(h.warn("randstr failed uniqueness"),ae):U(q,$,ne,(H||0)+1):ae},h.OptionControl=function(U,q){U||(U={}),q||(q="opt");var $={optionList:[],_newoption:function(ne){ne[q]=U,$[ne.name]=ne,$.optionList.push(ne)}};return $["_"+q]=U,$},h.smooth=function(U,q){if((q=Math.round(q)||0)<2)return U;var $,ne,H,Q,ee=U.length,ie=2*ee,ae=2*q-1,ue=new Array(ae),le=new Array(ee);for($=0;$=ie&&(H-=ie*Math.floor(H/ie)),H<0?H=-1-H:H>=ee&&(H=ie-1-H),Q+=U[H]*ue[ne];le[$]=Q}return le},h.syncOrAsync=function(U,q,$){var ne;function H(){return h.syncOrAsync(U,q,$)}for(;U.length;)if((ne=(0,U.splice(0,1)[0])(q))&&ne.then)return ne.then(H);return $&&$(q)},h.stripTrailingSlash=function(U){return U.substr(-1)==="/"?U.substr(0,U.length-1):U},h.noneOrAll=function(U,q,$){if(U){var ne,H=!1,Q=!0;for(ne=0;ne<$.length;ne++)U[$[ne]]!=null?H=!0:Q=!1;if(H&&!Q)for(ne=0;ne<$.length;ne++)U[$[ne]]=q[$[ne]]}},h.mergeArray=function(U,q,$,ne){var H=typeof ne=="function";if(h.isArrayOrTypedArray(U))for(var Q=Math.min(U.length,q.length),ee=0;ee0?H:0})},h.fillArray=function(U,q,$,ne){if(ne=ne||h.identity,h.isArrayOrTypedArray(U))for(var H=0;H1?H+ee[1]:"";if(Q&&(ee.length>1||ie.length>4||$))for(;ne.test(ie);)ie=ie.replace(ne,"$1"+Q+"$2");return ie+ae},h.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var B=/^\w*$/;h.templateString=function(U,q){var $={};return U.replace(h.TEMPLATE_STRING_REGEX,function(ne,H){var Q;return B.test(H)?Q=q[H]:($[H]=$[H]||h.nestedProperty(q,H).get,Q=$[H]()),h.isValidTextValue(Q)?Q:""})};var G={max:10,count:0,name:"hovertemplate"};h.hovertemplateString=function(){return te.apply(G,arguments)};var W={max:10,count:0,name:"texttemplate"};h.texttemplateString=function(){return te.apply(W,arguments)};var K=/^[:|\|]/;function te(U,q,$){var ne=this,H=arguments;q||(q={});var Q={};return U.replace(h.TEMPLATE_STRING_REGEX,function(ee,ie,ae){var ue,le,ge,fe=ie==="_xother"||ie==="_yother",me=ie==="_xother_"||ie==="_yother_",_e=ie==="xother_"||ie==="yother_",we=ie==="xother"||ie==="yother"||fe||_e||me,Te=ie;if((fe||me)&&(Te=Te.substring(1)),(_e||me)&&(Te=Te.substring(0,Te.length-1)),we){if((ue=q[Te])===void 0)return""}else for(ge=3;ge=48&&ee<=57,ue=ie>=48&&ie<=57;if(ae&&(ne=10*ne+ee-48),ue&&(H=10*H+ie-48),!ae||!ue){if(ne!==H)return ne-H;if(ee!==ie)return ee-ie}}return H-ne};var Y=2e9;h.seedPseudoRandom=function(){Y=2e9},h.pseudoRandom=function(){var U=Y;return Y=(69069*Y+1)%4294967296,Math.abs(Y-U)<429496729?h.pseudoRandom():Y/4294967296},h.fillText=function(U,q,$){var ne=Array.isArray($)?function(ee){$.push(ee)}:function(ee){$.text=ee},H=h.extractOption(U,q,"htx","hovertext");if(h.isValidTextValue(H))return ne(H);var Q=h.extractOption(U,q,"tx","text");return h.isValidTextValue(Q)?ne(Q):void 0},h.isValidTextValue=function(U){return U||U===0},h.formatPercent=function(U,q){q=q||0;for(var $=(Math.round(100*U*Math.pow(10,q))*Math.pow(.1,q)).toFixed(q)+"%",ne=0;ne1&&(ue=1):ue=0,h.strTranslate(H-ue*($+ee),Q-ue*(ne+ie))+h.strScale(ue)+(ae?"rotate("+ae+(q?"":" "+$+" "+ne)+")":"")},h.ensureUniformFontSize=function(U,q){var $=h.extendFlat({},q);return $.size=Math.max(q.size,U._fullLayout.uniformtext.minsize||0),$},h.join2=function(U,q,$){var ne=U.length;return ne>1?U.slice(0,-1).join(q)+$+U[ne-1]:U.join(q)},h.bigFont=function(U){return Math.round(1.2*U)};var Z=h.getFirefoxVersion(),re=Z!==null&&Z<86;h.getPositionFromD3Event=function(){return re?[r.event.layerX,r.event.layerY]:[r.event.offsetX,r.event.offsetY]}},{"../constants/numerical":479,"./anchor_utils":483,"./angles":484,"./array":485,"./clean_number":486,"./clear_responsive":488,"./coerce":489,"./dates":490,"./dom":491,"./extend":493,"./filter_unique":494,"./filter_visible":495,"./geometry2d":498,"./identity":501,"./increment":502,"./is_plain_object":504,"./keyed_container":505,"./localize":506,"./loggers":507,"./make_trace_groups":508,"./matrix":509,"./mod":510,"./nested_property":511,"./noop":512,"./notifier":513,"./preserve_drawing_buffer":517,"./push_unique":518,"./regex":520,"./relative_attr":521,"./relink_private":522,"./search":523,"./sort_object_keys":526,"./stats":527,"./throttle":530,"./to_log_range":531,"@plotly/d3":58,"d3-format":112,"d3-time-format":120,"fast-isnumeric":190}],504:[function(e,o,f){o.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}},{}],505:[function(e,o,f){var r=e("./nested_property"),a=/^\w*$/;o.exports=function(l,c,i,s){var u,d,h;i=i||"name",s=s||"value";var m={};c&&c.length?(h=r(l,c),d=h.get()):d=l,c=c||"";var g={};if(d)for(u=0;u2)return m[x]=2|m[x],v.set(y,null);if(p){for(u=x;u1){var i=["LOG:"];for(c=0;c1){var s=[];for(c=0;c"),"long")}},l.warn=function(){var c;if(r.logging>0){var i=["WARN:"];for(c=0;c0){var s=[];for(c=0;c"),"stick")}},l.error=function(){var c;if(r.logging>0){var i=["ERROR:"];for(c=0;c0){var s=[];for(c=0;c"),"stick")}}},{"../plot_api/plot_config":541,"./notifier":513}],508:[function(e,o,f){var r=e("@plotly/d3");o.exports=function(a,l,c){var i=a.selectAll("g."+c.replace(/\s/g,".")).data(l,function(u){return u[0].trace.uid});i.exit().remove(),i.enter().append("g").attr("class",c),i.order();var s=a.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each(function(u){u[0][s]=r.select(this)}),i}},{"@plotly/d3":58}],509:[function(e,o,f){var r=e("gl-mat4");f.init2dArray=function(a,l){for(var c=new Array(a),i=0;ia/2?r-Math.round(r/a)*a:r}}},{}],511:[function(e,o,f){var r=e("fast-isnumeric"),a=e("./array").isArrayOrTypedArray;function l(m,g){return function(){var p,v,y,x,w,k=m;for(x=0;x/g),v=0;vd||b===a||bm)&&(!w||!g(x))}:function(x,w){var k=x[0],b=x[1];if(k===a||kd||b===a||bm)return!1;var T,_,S,A,M,E=s.length,D=s[0][0],O=s[0][1],R=0;for(T=1;TMath.max(_,D)||b>Math.max(S,O)))if(bv||Math.abs(r(h,x))>u)return!0;return!1},l.filter=function(c,i){var s=[c[0]],u=0,d=0;function h(m){c.push(m);var g=s.length,p=u;s.splice(d+1);for(var v=p+1;v1&&h(c.pop()),{addPt:h,raw:c,filtered:s}}},{"../constants/numerical":479,"./matrix":509}],516:[function(e,o,f){(function(r){(function(){var a=e("./show_no_webgl_msg"),l=e("regl");o.exports=function(c,i,s){var u=c._fullLayout,d=!0;return u._glcanvas.each(function(h){if(h.regl)h.regl.preloadCachedCode(s);else if(!h.pick||u._has("parcoords")){try{h.regl=l({canvas:this,attributes:{antialias:!h.pick,preserveDrawingBuffer:!0},pixelRatio:c._context.plotGlPixelRatio||r.devicePixelRatio,extensions:i||[],cachedCode:s||{}})}catch{d=!1}h.regl||(d=!1),d&&this.addEventListener("webglcontextlost",function(m){c&&c.emit&&c.emit("plotly_webglcontextlost",{event:m,layer:h.key})},!1)}}),d||a({container:u._glcontainer.node()}),d}}).call(this)}).call(this,typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{})},{"./show_no_webgl_msg":525,regl:283}],517:[function(e,o,f){var r=e("fast-isnumeric"),a=e("is-mobile");o.exports=function(l){var c;if(typeof(c=l&&l.hasOwnProperty("userAgent")?l.userAgent:function(){var g;return typeof navigator<"u"&&(g=navigator.userAgent),g&&g.headers&&typeof g.headers["user-agent"]=="string"&&(g=g.headers["user-agent"]),g}())!="string")return!0;var i=a({ua:{headers:{"user-agent":c}},tablet:!0,featureDetect:!1});if(!i){for(var s=c.split(" "),u=1;u-1;d--){var h=s[d];if(h.substr(0,8)==="Version/"){var m=h.substr(8).split(".")[0];if(r(m)&&(m=+m),m>=13)return!0}}}return i}},{"fast-isnumeric":190,"is-mobile":234}],518:[function(e,o,f){o.exports=function(r,a){if(a instanceof RegExp){for(var l=a.toString(),c=0;ca.queueLength&&(c.undoQueue.queue.shift(),c.undoQueue.index--))},startSequence:function(c){c.undoQueue=c.undoQueue||{index:0,queue:[],sequence:!1},c.undoQueue.sequence=!0,c.undoQueue.beginSequence=!0},stopSequence:function(c){c.undoQueue=c.undoQueue||{index:0,queue:[],sequence:!1},c.undoQueue.sequence=!1,c.undoQueue.beginSequence=!1},undo:function(c){var i,s;if(!(c.undoQueue===void 0||isNaN(c.undoQueue.index)||c.undoQueue.index<=0)){for(c.undoQueue.index--,i=c.undoQueue.queue[c.undoQueue.index],c.undoQueue.inSequence=!0,s=0;s=c.undoQueue.queue.length)){for(i=c.undoQueue.queue[c.undoQueue.index],c.undoQueue.inSequence=!0,s=0;sm}function d(h,m){return h>=m}f.findBin=function(h,m,g){if(r(m.start))return g?Math.ceil((h-m.start)/m.size-1e-9)-1:Math.floor((h-m.start)/m.size+1e-9);var p,v,y=0,x=m.length,w=0,k=x>1?(m[x-1]-m[0])/(x-1):1;for(v=k>=0?g?i:s:g?d:u,h+=1e-9*k*(g?-1:1)*(k>=0?1:-1);y90&&a.log("Long binary search..."),y-1},f.sorterAsc=function(h,m){return h-m},f.sorterDes=function(h,m){return m-h},f.distinctVals=function(h){var m,g=h.slice();for(g.sort(f.sorterAsc),m=g.length-1;m>-1&&g[m]===c;m--);for(var p,v=g[m]-g[0]||1,y=v/(m||1)/1e4,x=[],w=0;w<=m;w++){var k=g[w],b=k-p;p===void 0?(x.push(k),p=k):b>y&&(v=Math.min(v,b),x.push(k),p=k)}return{vals:x,minDiff:v}},f.roundUp=function(h,m,g){for(var p,v=0,y=m.length-1,x=0,w=g?0:1,k=g?1:0,b=g?Math.ceil:Math.floor;v0&&(p=1),g&&p)return h.sort(m)}return p?h:h.reverse()},f.findIndexOfMin=function(h,m){m=m||l;for(var g,p=1/0,v=0;vi.length)&&(s=i.length),r(c)||(c=!1),a(i[0])){for(d=new Array(s),u=0;ul.length-1)return l[l.length-1];var i=c%1;return i*l[Math.ceil(c)]+(1-i)*l[Math.floor(c)]}},{"./array":485,"fast-isnumeric":190}],528:[function(e,o,f){var r=e("color-normalize");o.exports=function(a){return a?r(a):[0,0,0,1]}},{"color-normalize":89}],529:[function(e,o,f){var r=e("@plotly/d3"),a=e("../lib"),l=a.strTranslate,c=e("../constants/xmlns_namespaces"),i=e("../constants/alignment").LINE_SPACING,s=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;f.convertToTspans=function(L,P,N){var B=L.text(),G=!L.attr("data-notex")&&P&&P._context.typesetMath&&typeof MathJax<"u"&&B.match(s),W=r.select(L.node().parentNode);if(!W.empty()){var K=L.attr("class")?L.attr("class").split(" ")[0]:"text";return K+="-math",W.selectAll("svg."+K).remove(),W.selectAll("g."+K+"-group").remove(),L.style("display",null).attr({"data-unformatted":B,"data-math":"N"}),G?(P&&P._promises||[]).push(new Promise(function(Y){L.style("display","none");var Z=parseInt(L.node().style.fontSize,10),re={fontSize:Z};(function(U,q,$){var ne,H,Q,ee,ie=parseInt((MathJax.version||"").split(".")[0]);if(ie!==2&&ie!==3)return void a.warn("No MathJax version:",MathJax.version);var ae=function(){var le="math-output-"+a.randstr({},64),ge=(ee=r.select("body").append("div").attr({id:le}).style({visibility:"hidden",position:"absolute","font-size":q.fontSize+"px"}).text(U.replace(u,"\\lt ").replace(d,"\\gt "))).node();return ie===2?MathJax.Hub.Typeset(ge):MathJax.typeset([ge])},ue=function(){var le=ee.select(ie===2?".MathJax_SVG":".MathJax"),ge=!le.empty()&&ee.select("svg").node();if(ge){var fe,me=ge.getBoundingClientRect();fe=ie===2?r.select("body").select("#MathJax_SVG_glyphs"):le.select("defs"),$(le,fe,me)}else a.log("There was an error in the tex syntax.",U),$();ee.remove()};ie===2?MathJax.Hub.Queue(function(){return H=a.extendDeepAll({},MathJax.Hub.config),Q=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:h},displayAlign:"left"})},function(){if((ne=MathJax.Hub.config.menuSettings.renderer)!=="SVG")return MathJax.Hub.setRenderer("SVG")},ae,ue,function(){if(ne!=="SVG")return MathJax.Hub.setRenderer(ne)},function(){return Q!==void 0&&(MathJax.Hub.processSectionDelay=Q),MathJax.Hub.Config(H)}):ie===3&&(H=a.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=h,(ne=MathJax.config.startup.output)!=="svg"&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){ae(),ue(),ne!=="svg"&&(MathJax.config.startup.output=ne),MathJax.config=H}))})(G[2],re,function(U,q,$){W.selectAll("svg."+K).remove(),W.selectAll("g."+K+"-group").remove();var ne=U&&U.select("svg");if(!ne||!ne.node())return te(),void Y();var H=W.append("g").classed(K+"-group",!0).attr({"pointer-events":"none","data-unformatted":B,"data-math":"Y"});H.node().appendChild(ne.node()),q&&q.node()&&ne.node().insertBefore(q.node().cloneNode(!0),ne.node().firstChild);var Q=$.width,ee=$.height;ne.attr({class:K,height:ee,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var ie=L.node().style.fill||"black",ae=ne.select("g");ae.attr({fill:ie,stroke:ie});var ue=ae.node().getBoundingClientRect(),le=ue.width,ge=ue.height;(le>Q||ge>ee)&&(ne.style("overflow","hidden"),le=(ue=ne.node().getBoundingClientRect()).width,ge=ue.height);var fe=+L.attr("x"),me=+L.attr("y"),_e=-(Z||L.node().getBoundingClientRect().height)/4;if(K[0]==="y")H.attr({transform:"rotate("+[-90,fe,me]+")"+l(-le/2,_e-ge/2)});else if(K[0]==="l")me=_e-ge/2;else if(K[0]==="a"&&K.indexOf("atitle")!==0)fe=0,me=_e;else{var we=L.attr("text-anchor");fe-=le*(we==="middle"?.5:we==="end"?1:0),me=me+_e-ge/2}ne.attr({x:fe,y:me}),N&&N.call(L,H),Y(H)})})):te(),L}function te(){W.empty()||(K=L.attr("class")+"-math",W.select("svg."+K).remove()),L.text("").style("white-space","pre"),function(Y,Z){Z=Z.replace(y," ");var re,U=!1,q=[],$=-1;function ne(){$++;var de=document.createElementNS(c.svg,"tspan");r.select(de).attr({class:"line",dy:$*i+"em"}),Y.appendChild(de),re=de;var ye=q;if(q=[{node:de}],ye.length>1)for(var Me=1;Me doesnt match end tag <"+de+">. Pretending it did match.",Z),re=q[q.length-1].node}else a.log("Ignoring unexpected end tag .",Z)}k.test(Z)?ne():(re=Y,q=[{node:Y}]);for(var ie=Z.split(x),ae=0;ae|>|>)/g,h=[["$","$"],["\\(","\\)"]],m={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},g={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},v=["http:","https:","mailto:","",void 0,":"],y=f.NEWLINES=/(\r\n?|\n)/g,x=/(<[^<>]*>)/,w=/<(\/?)([^ >]*)(\s+(.*))?>/i,k=//i;f.BR_TAG_ALL=//gi;var b=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,T=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,_=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,S=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function A(L,P){if(!L)return null;var N=L.match(P),B=N&&(N[3]||N[4]);return B&&O(B)}var M=/(^|;)\s*color:/;f.plainText=function(L,P){for(var N=(P=P||{}).len!==void 0&&P.len!==-1?P.len:1/0,B=P.allowedTags!==void 0?P.allowedTags:["br"],G=3,W=L.split(x),K=[],te="",Y=0,Z=0;ZG?K.push(re.substr(0,ne-G)+"..."):K.push(re.substr(0,ne));break}te=""}}return K.join("")};var E={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},D=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function O(L){return L.replace(D,function(P,N){return(N.charAt(0)==="#"?function(B){if(!(B>1114111)){var G=String.fromCodePoint;if(G)return G(B);var W=String.fromCharCode;return B<=65535?W(B):W(55232+(B>>10),B%1024+56320)}}(N.charAt(1)==="x"?parseInt(N.substr(2),16):parseInt(N.substr(1),10)):E[N])||P})}function R(L){var P=encodeURI(decodeURI(L)),N=document.createElement("a"),B=document.createElement("a");N.href=L,B.href=P;var G=N.protocol,W=B.protocol;return v.indexOf(G)!==-1&&v.indexOf(W)!==-1?P:""}function z(L,P,N){var B,G,W,K=N.horizontalAlign,te=N.verticalAlign||"top",Y=L.node().getBoundingClientRect(),Z=P.node().getBoundingClientRect();return G=te==="bottom"?function(){return Y.bottom-B.height}:te==="middle"?function(){return Y.top+(Y.height-B.height)/2}:function(){return Y.top},W=K==="right"?function(){return Y.right-B.width}:K==="center"?function(){return Y.left+(Y.width-B.width)/2}:function(){return Y.left},function(){B=this.node().getBoundingClientRect();var re=W()-Z.left,U=G()-Z.top,q=N.gd||{};if(N.gd){q._fullLayout._calcInverseTransform(q);var $=a.apply3DTransform(q._fullLayout._invTransform)(re,U);re=$[0],U=$[1]}return this.style({top:U+"px",left:re+"px","z-index":1e3}),this}}f.convertEntities=O,f.sanitizeHTML=function(L){L=L.replace(y," ");for(var P=document.createElement("p"),N=P,B=[],G=L.split(x),W=0;Ws.ts+c?h():s.timer=setTimeout(function(){h(),s.timer=null},c)},f.done=function(l){var c=r[l];return c&&c.timer?new Promise(function(i){var s=c.onDone;c.onDone=function(){s&&s(),i(),c.onDone=null}}):Promise.resolve()},f.clear=function(l){if(l)a(r[l]),delete r[l];else for(var c in r)f.clear(c)}},{}],531:[function(e,o,f){var r=e("fast-isnumeric");o.exports=function(a,l){if(a>0)return Math.log(a)/Math.LN10;var c=Math.log(Math.min(l[0],l[1]))/Math.LN10;return r(c)||(c=Math.log(Math.max(l[0],l[1]))/Math.LN10-6),c}},{"fast-isnumeric":190}],532:[function(e,o,f){var r=o.exports={},a=e("../plots/geo/constants").locationmodeToLayer,l=e("topojson-client").feature;r.getTopojsonName=function(c){return[c.scope.replace(/ /g,"-"),"_",c.resolution.toString(),"m"].join("")},r.getTopojsonPath=function(c,i){return c+i+".json"},r.getTopojsonFeatures=function(c,i){var s=a[c.locationmode],u=i.objects[s];return l(i,u).features}},{"../plots/geo/constants":587,"topojson-client":315}],533:[function(e,o,f){o.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},{}],534:[function(e,o,f){o.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"}}},{}],535:[function(e,o,f){var r=e("../registry");o.exports=function(a){for(var l,c,i=r.layoutArrayContainers,s=r.layoutArrayRegexes,u=a.split("[")[0],d=0;d0&&c.log("Clearing previous rejected promises from queue."),_._promises=[]},f.cleanLayout=function(_){var S,A;_||(_={}),_.xaxis1&&(_.xaxis||(_.xaxis=_.xaxis1),delete _.xaxis1),_.yaxis1&&(_.yaxis||(_.yaxis=_.yaxis1),delete _.yaxis1),_.scene1&&(_.scene||(_.scene=_.scene1),delete _.scene1);var M=(i.subplotsRegistry.cartesian||{}).attrRegex,E=(i.subplotsRegistry.polar||{}).attrRegex,D=(i.subplotsRegistry.ternary||{}).attrRegex,O=(i.subplotsRegistry.gl3d||{}).attrRegex,R=Object.keys(_);for(S=0;S3?(H.x=1.02,H.xanchor="left"):H.x<-2&&(H.x=-.02,H.xanchor="right"),H.y>3?(H.y=1.02,H.yanchor="bottom"):H.y<-2&&(H.y=-.02,H.yanchor="top")),p(_),_.dragmode==="rotate"&&(_.dragmode="orbit"),u.clean(_),_.template&&_.template.layout&&f.cleanLayout(_.template.layout),_},f.cleanData=function(_){for(var S=0;S<_.length;S++){var A,M=_[S];if(M.type==="histogramy"&&"xbins"in M&&!("ybins"in M)&&(M.ybins=M.xbins,delete M.xbins),M.error_y&&"opacity"in M.error_y){var E=u.defaults,D=M.error_y.color||(m(M,"bar")?u.defaultLine:E[S%E.length]);M.error_y.color=u.addOpacity(u.rgb(D),u.opacity(D)*M.error_y.opacity),delete M.error_y.opacity}if("bardir"in M&&(M.bardir!=="h"||!m(M,"bar")&&M.type.substr(0,9)!=="histogram"||(M.orientation="h",f.swapXYData(M)),delete M.bardir),M.type==="histogramy"&&f.swapXYData(M),M.type!=="histogramx"&&M.type!=="histogramy"||(M.type="histogram"),"scl"in M&&!("colorscale"in M)&&(M.colorscale=M.scl,delete M.scl),"reversescl"in M&&!("reversescale"in M)&&(M.reversescale=M.reversescl,delete M.reversescl),M.xaxis&&(M.xaxis=d(M.xaxis,"x")),M.yaxis&&(M.yaxis=d(M.yaxis,"y")),m(M,"gl3d")&&M.scene&&(M.scene=i.subplotsRegistry.gl3d.cleanId(M.scene)),!m(M,"pie-like")&&!m(M,"bar-like"))if(Array.isArray(M.textposition))for(A=0;A0)return _.substr(0,S)}f.hasParent=function(_,S){for(var A=b(S);A;){if(A in _)return!0;A=b(A)}return!1};var T=["x","y","z"];f.clearAxisTypes=function(_,S,A){for(var M=0;M1&&l.warn("Full array edits are incompatible with other edits",v);var _=m[""][""];if(u(_))h.set(null);else{if(!Array.isArray(_))return l.warn("Unrecognized full array edit value",v,_),!0;h.set(_)}return!k&&(y(b,T),x(d),!0)}var S,A,M,E,D,O,R,z,L=Object.keys(m).map(Number).sort(c),P=h.get(),N=P||[],B=p(T,v).get(),G=[],W=-1,K=N.length;for(S=0;SN.length-(R?0:1))l.warn("index out of range",v,M);else if(O!==void 0)D.length>1&&l.warn("Insertion & removal are incompatible with edits to the same index.",v,M),u(O)?G.push(M):R?(O==="add"&&(O={}),N.splice(M,0,O),B&&B.splice(M,0,{})):l.warn("Unrecognized full object edit value",v,M,O),W===-1&&(W=M);else for(A=0;A=0;S--)N.splice(G[S],1),B&&B.splice(G[S],1);if(N.length?P||h.set(N):h.set(null),k)return!1;if(y(b,T),w!==a){var te;if(W===-1)te=L;else{for(K=Math.max(N.length,K),te=[],S=0;S=W);S++)te.push(M);for(S=W;S=de.data.length||Ee<-de.data.length)throw new Error(Me+" must be valid indices for gd.data.");if(ye.indexOf(Ee,ke+1)>-1||Ee>=0&&ye.indexOf(-de.data.length+Ee)>-1||Ee<0&&ye.indexOf(de.data.length+Ee)>-1)throw new Error("each index in "+Me+" must be unique.")}}function P(de,ye,Me){if(!Array.isArray(de.data))throw new Error("gd.data must be an array.");if(ye===void 0)throw new Error("currentIndices is a required argument.");if(Array.isArray(ye)||(ye=[ye]),L(de,ye,"currentIndices"),Me===void 0||Array.isArray(Me)||(Me=[Me]),Me!==void 0&&L(de,Me,"newIndices"),Me!==void 0&&ye.length!==Me.length)throw new Error("current and new indices must be of equal length.")}function N(de,ye,Me,ke,Ee){(function(Ye,nt,ft,vt){var Pt=c.isPlainObject(vt);if(!Array.isArray(Ye.data))throw new Error("gd.data must be an array");if(!c.isPlainObject(nt))throw new Error("update must be a key:value object");if(ft===void 0)throw new Error("indices must be an integer or array of integers");for(var At in L(Ye,ft,"indices"),nt){if(!Array.isArray(nt[At])||nt[At].length!==ft.length)throw new Error("attribute "+At+" must be an array of length equal to indices array length");if(Pt&&(!(At in vt)||!Array.isArray(vt[At])||vt[At].length!==nt[At].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}})(de,ye,Me,ke);for(var ze=function(Ye,nt,ft,vt){var Pt,At,at,et,Ot,Wt=c.isPlainObject(vt),Jt=[];for(var Be in Array.isArray(ft)||(ft=[ft]),ft=z(ft,Ye.data.length-1),nt)for(var Ge=0;Ge-1&&Me.indexOf("grouptitlefont")===-1?Ve(Me,Me.replace("titlefont","title.font")):Me.indexOf("titleposition")>-1?Ve(Me,Me.replace("titleposition","title.position")):Me.indexOf("titleside")>-1?Ve(Me,Me.replace("titleside","title.side")):Me.indexOf("titleoffset")>-1&&Ve(Me,Me.replace("titleoffset","title.offset")):Ve(Me,Me.replace("title","title.text"));function Ve(Ke,Re){de[Re]=de[Ke],delete de[Ke]}}function re(de,ye,Me){de=c.getGraphDiv(de),T.clearPromiseQueue(de);var ke={};if(typeof ye=="string")ke[ye]=Me;else{if(!c.isPlainObject(ye))return c.warn("Relayout fail.",ye,Me),Promise.reject();ke=c.extendFlat({},ye)}Object.keys(ke).length&&(de.changed=!0);var Ee=Q(de,ke),ze=Ee.flags;ze.calc&&(de.calcdata=void 0);var Fe=[m.previousPromises];ze.layoutReplot?Fe.push(_.layoutReplot):Object.keys(ke).length&&(U(de,ze,Ee)||m.supplyDefaults(de),ze.legend&&Fe.push(_.doLegend),ze.layoutstyle&&Fe.push(_.layoutStyles),ze.axrange&&q(Fe,Ee.rangesAltered),ze.ticks&&Fe.push(_.doTicksRelayout),ze.modebar&&Fe.push(_.doModeBar),ze.camera&&Fe.push(_.doCamera),ze.colorbars&&Fe.push(_.doColorBars),Fe.push(E)),Fe.push(m.rehover,m.redrag),u.add(de,re,[de,Ee.undoit],re,[de,Ee.redoit]);var Ve=c.syncOrAsync(Fe,de);return Ve&&Ve.then||(Ve=Promise.resolve(de)),Ve.then(function(){return de.emit("plotly_relayout",Ee.eventData),de})}function U(de,ye,Me){var ke=de._fullLayout;if(!ye.axrange)return!1;for(var Ee in ye)if(Ee!=="axrange"&&ye[Ee])return!1;for(var ze in Me.rangesAltered){var Fe=g.id2name(ze),Ve=de.layout[Fe],Ke=ke[Fe];if(Ke.autorange=Ve.autorange,Ve.range&&(Ke.range=Ve.range.slice()),Ke.cleanRange(),Ke._matchGroup){for(var Re in Ke._matchGroup)if(Re!==ze){var qe=ke[g.id2name(Re)];qe.autorange=Ke.autorange,qe.range=Ke.range.slice(),qe._input.range=Ke.range.slice()}}}return!0}function q(de,ye){var Me=ye?function(ke){var Ee=[],ze=!0;for(var Fe in ye){var Ve=g.getFromId(ke,Fe);if(Ee.push(Fe),(Ve.ticklabelposition||"").indexOf("inside")!==-1&&Ve._anchorAxis&&Ee.push(Ve._anchorAxis._id),Ve._matchGroup)for(var Ke in Ve._matchGroup)ye[Ke]||Ee.push(Ke);Ve.automargin&&(ze=!1)}return g.draw(ke,Ee,{skipTitle:ze})}:function(ke){return g.draw(ke,"redraw")};de.push(w,_.doAutoRangeAndConstraints,Me,_.drawData,_.finalDraw)}var $=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,ne=/^[xyz]axis[0-9]*\.autorange$/,H=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Q(de,ye){var Me,ke,Ee,ze=de.layout,Fe=de._fullLayout,Ve=Fe._guiEditing,Ke=K(Fe._preGUI,Ve),Re=Object.keys(ye),qe=g.list(de),We=c.extendDeepAll({},ye),Ye={};for(Z(ye),Re=Object.keys(ye),ke=0;ke0&&typeof Ge.parts[dt]!="string";)dt--;var Pe=Ge.parts[dt],Ie=Ge.parts[dt-1]+"."+Pe,Ae=Ge.parts.slice(0,dt).join("."),De=i(de.layout,Ae).get(),He=i(Fe,Ae).get(),rt=Ge.get();if(Tt!==void 0){At[Be]=Tt,at[Be]=Pe==="reverse"?Tt:W(rt);var lt=h.getLayoutValObject(Fe,Ge.parts);if(lt&<.impliedEdits&&Tt!==null)for(var ot in lt.impliedEdits)et(c.relativeAttr(Be,ot),lt.impliedEdits[ot]);if(["width","height"].indexOf(Be)!==-1)if(Tt){et("autosize",null);var kt=Be==="height"?"width":"height";et(kt,Fe[kt])}else Fe[Be]=de._initialAutoSize[Be];else if(Be==="autosize")et("width",Tt?null:Fe.width),et("height",Tt?null:Fe.height);else if(Ie.match($))Jt(Ie),i(Fe,Ae+"._inputRange").set(null);else if(Ie.match(ne)){Jt(Ie),i(Fe,Ae+"._inputRange").set(null);var wt=i(Fe,Ae).get();wt._inputDomain&&(wt._input.domain=wt._inputDomain.slice())}else Ie.match(H)&&i(Fe,Ae+"._inputDomain").set(null);if(Pe==="type"){Ot=De;var Vt=He.type==="linear"&&Tt==="log",Ut=He.type==="log"&&Tt==="linear";if(Vt||Ut){if(Ot&&Ot.range)if(He.autorange)Vt&&(Ot.range=Ot.range[1]>Ot.range[0]?[1,2]:[2,1]);else{var tt=Ot.range[0],bt=Ot.range[1];Vt?(tt<=0&&bt<=0&&et(Ae+".autorange",!0),tt<=0?tt=bt/1e6:bt<=0&&(bt=tt/1e6),et(Ae+".range[0]",Math.log(tt)/Math.LN10),et(Ae+".range[1]",Math.log(bt)/Math.LN10)):(et(Ae+".range[0]",Math.pow(10,tt)),et(Ae+".range[1]",Math.pow(10,bt)))}else et(Ae+".autorange",!0);Array.isArray(Fe._subplots.polar)&&Fe._subplots.polar.length&&Fe[Ge.parts[0]]&&Ge.parts[1]==="radialaxis"&&delete Fe[Ge.parts[0]]._subplot.viewInitial["radialaxis.range"],d.getComponentMethod("annotations","convertCoords")(de,He,Tt,et),d.getComponentMethod("images","convertCoords")(de,He,Tt,et)}else et(Ae+".autorange",!0),et(Ae+".range",null);i(Fe,Ae+"._inputRange").set(null)}else if(Pe.match(A)){var zt=i(Fe,Be).get(),St=(Tt||{}).type;St&&St!=="-"||(St="linear"),d.getComponentMethod("annotations","convertCoords")(de,zt,St,et),d.getComponentMethod("images","convertCoords")(de,zt,St,et)}var Dt=b.containerArrayMatch(Be);if(Dt){Me=Dt.array,ke=Dt.index;var Le=Dt.property,Je=lt||{editType:"calc"};ke!==""&&Le===""&&(b.isAddVal(Tt)?at[Be]=null:b.isRemoveVal(Tt)?at[Be]=(i(ze,Me).get()||[])[ke]:c.warn("unrecognized full object value",ye)),S.update(Pt,Je),Ye[Me]||(Ye[Me]={});var st=Ye[Me][ke];st||(st=Ye[Me][ke]={}),st[Le]=Tt,delete ye[Be]}else Pe==="reverse"?(De.range?De.range.reverse():(et(Ae+".autorange",!0),De.range=[1,0]),He.autorange?Pt.calc=!0:Pt.plot=!0):(Fe._has("scatter-like")&&Fe._has("regl")&&Be==="dragmode"&&(Tt==="lasso"||Tt==="select")&&rt!=="lasso"&&rt!=="select"||Fe._has("gl2d")?Pt.plot=!0:lt?S.update(Pt,lt):Pt.calc=!0,Ge.set(Tt))}}for(Me in Ye)b.applyContainerArrayChanges(de,Ke(ze,Me),Ye[Me],Pt,Ke)||(Pt.plot=!0);for(var Et in Wt){var It=(Ot=g.getFromId(de,Et))&&Ot._constraintGroup;if(It)for(var Zt in Pt.calc=!0,It)Wt[Zt]||(g.getFromId(de,Zt)._constraintShrinkable=!0)}return(ee(de)||ye.height||ye.width)&&(Pt.plot=!0),(Pt.plot||Pt.calc)&&(Pt.layoutReplot=!0),{flags:Pt,rangesAltered:Wt,undoit:at,redoit:At,eventData:We}}function ee(de){var ye=de._fullLayout,Me=ye.width,ke=ye.height;return de.layout.autosize&&m.plotAutoSize(de,de.layout,ye),ye.width!==Me||ye.height!==ke}function ie(de,ye,Me,ke){de=c.getGraphDiv(de),T.clearPromiseQueue(de),c.isPlainObject(ye)||(ye={}),c.isPlainObject(Me)||(Me={}),Object.keys(ye).length&&(de.changed=!0),Object.keys(Me).length&&(de.changed=!0);var Ee=T.coerceTraceIndices(de,ke),ze=Y(de,c.extendFlat({},ye),Ee),Fe=ze.flags,Ve=Q(de,c.extendFlat({},Me)),Ke=Ve.flags;(Fe.calc||Ke.calc)&&(de.calcdata=void 0),Fe.clearAxisTypes&&T.clearAxisTypes(de,Ee,Me);var Re=[];Ke.layoutReplot?Re.push(_.layoutReplot):Fe.fullReplot?Re.push(f._doPlot):(Re.push(m.previousPromises),U(de,Ke,Ve)||m.supplyDefaults(de),Fe.style&&Re.push(_.doTraceStyle),(Fe.colorbars||Ke.colorbars)&&Re.push(_.doColorBars),Ke.legend&&Re.push(_.doLegend),Ke.layoutstyle&&Re.push(_.layoutStyles),Ke.axrange&&q(Re,Ve.rangesAltered),Ke.ticks&&Re.push(_.doTicksRelayout),Ke.modebar&&Re.push(_.doModeBar),Ke.camera&&Re.push(_.doCamera),Re.push(E)),Re.push(m.rehover,m.redrag),u.add(de,ie,[de,ze.undoit,Ve.undoit,ze.traces],ie,[de,ze.redoit,Ve.redoit,ze.traces]);var qe=c.syncOrAsync(Re,de);return qe&&qe.then||(qe=Promise.resolve(de)),qe.then(function(){return de.emit("plotly_update",{data:ze.eventData,layout:Ve.eventData}),de})}function ae(de){return function(ye){ye._fullLayout._guiEditing=!0;var Me=de.apply(null,arguments);return ye._fullLayout._guiEditing=!1,Me}}var ue=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],le=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function ge(de,ye){for(var Me=0;Me1;)if(ke.pop(),(Me=i(ye,ke.join(".")+".uirevision").get())!==void 0)return Me;return ye.uirevision}function me(de,ye){for(var Me=0;Me=Ee.length?Ee[0]:Ee[Re]:Ee}function Ve(Re){return Array.isArray(ze)?Re>=ze.length?ze[0]:ze[Re]:ze}function Ke(Re,qe){var We=0;return function(){if(Re&&++We===qe)return Re()}}return ke._frameWaitingCnt===void 0&&(ke._frameWaitingCnt=0),new Promise(function(Re,qe){function We(){ke._currentFrame&&ke._currentFrame.onComplete&&ke._currentFrame.onComplete();var Ge=ke._currentFrame=ke._frameQueue.shift();if(Ge){var Tt=Ge.name?Ge.name.toString():null;de._fullLayout._currentFrame=Tt,ke._lastFrameAt=Date.now(),ke._timeToNext=Ge.frameOpts.duration,m.transition(de,Ge.frame.data,Ge.frame.layout,T.coerceTraceIndices(de,Ge.frame.traces),Ge.frameOpts,Ge.transitionOpts).then(function(){Ge.onComplete&&Ge.onComplete()}),de.emit("plotly_animatingframe",{name:Tt,frame:Ge.frame,animation:{frame:Ge.frameOpts,transition:Ge.transitionOpts}})}else de.emit("plotly_animated"),window.cancelAnimationFrame(ke._animationRaf),ke._animationRaf=null}function Ye(){de.emit("plotly_animating"),ke._lastFrameAt=-1/0,ke._timeToNext=0,ke._runningTransitions=0,ke._currentFrame=null;var Ge=function(){ke._animationRaf=window.requestAnimationFrame(Ge),Date.now()-ke._lastFrameAt>ke._timeToNext&&We()};Ge()}var nt,ft,vt=0;function Pt(Ge){return Array.isArray(Ee)?vt>=Ee.length?Ge.transitionOpts=Ee[vt]:Ge.transitionOpts=Ee[0]:Ge.transitionOpts=Ee,vt++,Ge}var At=[],at=ye==null,et=Array.isArray(ye);if(!at&&!et&&c.isPlainObject(ye))At.push({type:"object",data:Pt(c.extendFlat({},ye))});else if(at||["string","number"].indexOf(typeof ye)!==-1)for(nt=0;nt0&&JtJt)&&Be.push(ft);At=Be}}At.length>0?function(Ge){if(Ge.length!==0){for(var Tt=0;Tt=0;ke--)if(c.isPlainObject(ye[ke])){var Ye=ye[ke].name,nt=(Ke[Ye]||We[Ye]||{}).name,ft=ye[ke].name,vt=Ke[nt]||We[nt];nt&&ft&&typeof ft=="number"&&vt&&M<5&&(M++,c.warn('addFrames: overwriting frame "'+(Ke[nt]||We[nt]).name+'" with a frame whose name of type "number" also equates to "'+nt+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),M===5&&c.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),We[Ye]={name:Ye},qe.push({frame:m.supplyFrameDefaults(ye[ke]),index:Me&&Me[ke]!==void 0&&Me[ke]!==null?Me[ke]:Re+ke})}qe.sort(function(Be,Ge){return Be.index>Ge.index?-1:Be.index=0;ke--){if(typeof(Ee=qe[ke].frame).name=="number"&&c.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Ee.name)for(;Ke[Ee.name="frame "+de._transitionData._counter++];);if(Ke[Ee.name]){for(ze=0;ze=0;Me--)ke=ye[Me],ze.push({type:"delete",index:ke}),Fe.unshift({type:"insert",index:ke,value:Ee[ke]});var Ve=m.modifyFrames,Ke=m.modifyFrames,Re=[de,Fe],qe=[de,ze];return u&&u.add(de,Ve,Re,Ke,qe),m.modifyFrames(de,ze)},f.addTraces=function de(ye,Me,ke){ye=c.getGraphDiv(ye);var Ee,ze,Fe=[],Ve=f.deleteTraces,Ke=de,Re=[ye,Fe],qe=[ye,Me];for(function(We,Ye,nt){var ft,vt;if(!Array.isArray(We.data))throw new Error("gd.data must be an array.");if(Ye===void 0)throw new Error("traces must be defined.");for(Array.isArray(Ye)||(Ye=[Ye]),ft=0;ft=0&&We=0&&We=R.length)return!1;if(A.dimensions===2){if(E++,M.length===E)return A;var z=M[E];if(!w(z))return!1;A=R[O][z]}else A=R[O]}else A=R}}return A}function w(A){return A===Math.round(A)&&A>=0}function k(){var A,M,E={};for(A in h(E,c),r.subplotsRegistry)if((M=r.subplotsRegistry[A]).layoutAttributes)if(Array.isArray(M.attr))for(var D=0;D=z.length)return!1;D=(E=(r.transformsRegistry[z[L].type]||{}).attributes)&&E[M[2]],R=3}else{var P=A._module;if(P||(P=(r.modules[A.type||l.type.dflt]||{})._module),!P)return!1;if(!(D=(E=P.attributes)&&E[O])){var N=P.basePlotModule;N&&N.attributes&&(D=N.attributes[O])}D||(D=l[O])}return x(D,M,R)},f.getLayoutValObject=function(A,M){return x(function(E,D){var O,R,z,L,P=E._basePlotModules;if(P){var N;for(O=0;O=h&&(d._input||{})._templateitemname;g&&(m=h);var p,v=u+"["+m+"]";function y(){p={},g&&(p[v]={},p[v].templateitemname=g)}function x(k,b){g?r.nestedProperty(p[v],k).set(b):p[v+"."+k]=b}function w(){var k=p;return y(),k}return y(),{modifyBase:function(k,b){p[k]=b},modifyItem:x,getUpdateObj:w,applyUpdate:function(k,b){k&&x(k,b);var T=w();for(var _ in T)r.nestedProperty(s,_).set(T[_])}}}},{"../lib":503,"../plots/attributes":550}],544:[function(e,o,f){var r=e("@plotly/d3"),a=e("../registry"),l=e("../plots/plots"),c=e("../lib"),i=e("../lib/clear_gl_canvases"),s=e("../components/color"),u=e("../components/drawing"),d=e("../components/titles"),h=e("../components/modebar"),m=e("../plots/cartesian/axes"),g=e("../constants/alignment"),p=e("../plots/cartesian/constraints"),v=p.enforce,y=p.clean,x=e("../plots/cartesian/autorange").doAutoRange;function w(M,E,D){for(var O=0;O=M[1]||R[1]<=M[0])&&z[0]E[0])return!0}return!1}function k(M){var E,D,O,R,z,L,P=M._fullLayout,N=P._size,B=N.p,G=m.list(M,"",!0);if(P._paperdiv.style({width:M._context.responsive&&P.autosize&&!M._context._hasZeroWidth&&!M.layout.width?"100%":P.width+"px",height:M._context.responsive&&P.autosize&&!M._context._hasZeroHeight&&!M.layout.height?"100%":P.height+"px"}).selectAll(".main-svg").call(u.setSize,P.width,P.height),M._context.setBackground(M,P.paper_bgcolor),f.drawMainTitle(M),h.manage(M),!P._has("cartesian"))return l.previousPromises(M);function W(Ye,nt,ft){var vt=Ye._lw/2;return Ye._id.charAt(0)==="x"?nt?ft==="top"?nt._offset-B-vt:nt._offset+nt._length+B+vt:N.t+N.h*(1-(Ye.position||0))+vt%1:nt?ft==="right"?nt._offset+nt._length+B+vt:nt._offset-B-vt:N.l+N.w*(Ye.position||0)+vt%1}for(E=0;EN?A.push({code:"unused",traceType:O,templateCount:P,dataCount:N}):N>P&&A.push({code:"reused",traceType:O,templateCount:P,dataCount:N})}}else A.push({code:"data"});if(function B(G,W){for(var K in G)if(K.charAt(0)!=="_"){var te=G[K],Y=v(G,K,W);a(te)?(Array.isArray(G)&&te._template===!1&&te.templateitemname&&A.push({code:"missing",path:Y,templateitemname:te.templateitemname}),B(te,Y)):Array.isArray(te)&&y(te)&&B(te,Y)}}({data:E,layout:M},""),A.length)return A.map(x)}},{"../lib":503,"../plots/attributes":550,"../plots/plots":619,"./plot_config":541,"./plot_schema":542,"./plot_template":543}],546:[function(e,o,f){var r=e("fast-isnumeric"),a=e("./plot_api"),l=e("../plots/plots"),c=e("../lib"),i=e("../snapshot/helpers"),s=e("../snapshot/tosvg"),u=e("../snapshot/svgtoimg"),d=e("../version").version,h={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}};o.exports=function(m,g){var p,v,y,x;function w(N){return!(N in g)||c.validate(g[N],h[N])}if(g=g||{},c.isPlainObject(m)?(p=m.data||[],v=m.layout||{},y=m.config||{},x={}):(m=c.getGraphDiv(m),p=c.extendDeep([],m.data),v=c.extendDeep({},m.layout),y=m._context,x=m._fullLayout||{}),!w("width")&&g.width!==null||!w("height")&&g.height!==null)throw new Error("Height and width should be pixel values.");if(!w("format"))throw new Error("Export format is not "+c.join2(h.format.values,", "," or ")+".");var k={};function b(N,B){return c.coerce(g,k,h,N,B)}var T=b("format"),_=b("width"),S=b("height"),A=b("scale"),M=b("setBackground"),E=b("imageDataOnly"),D=document.createElement("div");D.style.position="absolute",D.style.left="-5000px",document.body.appendChild(D);var O=c.extendFlat({},v);_?O.width=_:g.width===null&&r(x.width)&&(O.width=x.width),S?O.height=S:g.height===null&&r(x.height)&&(O.height=x.height);var R=c.extendFlat({},y,{_exportedPlot:!0,staticPlot:!0,setBackground:M}),z=i.getRedrawFunc(D);function L(){return new Promise(function(N){setTimeout(N,i.getDelay(D._fullLayout))})}function P(){return new Promise(function(N,B){var G=s(D,T,A),W=D._fullLayout.width,K=D._fullLayout.height;function te(){a.purge(D),document.body.removeChild(D)}if(T==="full-json"){var Y=l.graphJson(D,!1,"keepdata","object",!0,!0);return Y.version=d,Y=JSON.stringify(Y),te(),N(E?Y:i.encodeJSON(Y))}if(te(),T==="svg")return N(E?G:i.encodeSVG(G));var Z=document.createElement("canvas");Z.id=c.randstr(),u({format:T,width:W,height:K,scale:A,canvas:Z,svg:G,promise:!0}).then(N).catch(B)})}return new Promise(function(N,B){a.newPlot(D,p,O,R).then(z).then(L).then(P).then(function(G){N(function(W){return E?W.replace(i.IMAGE_URL_PREFIX,""):W}(G))}).catch(function(G){B(G)})})}},{"../lib":503,"../plots/plots":619,"../snapshot/helpers":642,"../snapshot/svgtoimg":644,"../snapshot/tosvg":646,"../version":1123,"./plot_api":540,"fast-isnumeric":190}],547:[function(e,o,f){var r=e("../lib"),a=e("../plots/plots"),l=e("./plot_schema"),c=e("./plot_config").dfltConfig,i=r.isPlainObject,s=Array.isArray,u=r.isArrayOrTypedArray;function d(k,b,T,_,S,A){A=A||[];for(var M=Object.keys(k),E=0;Ez.length&&_.push(p("unused",S,O.concat(z.length)));var W,K,te,Y,Z,re=z.length,U=Array.isArray(G);if(U&&(re=Math.min(re,G.length)),L.dimensions===2)for(K=0;Kz[K].length&&_.push(p("unused",S,O.concat(K,z[K].length)));var q=z[K].length;for(W=0;W<(U?Math.min(q,G[K].length):q);W++)te=U?G[K][W]:G,Y=R[K][W],Z=z[K][W],r.validate(Y,te)?Z!==Y&&Z!==+Y&&_.push(p("dynamic",S,O.concat(K,W),Y,Z)):_.push(p("value",S,O.concat(K,W),Y))}else _.push(p("array",S,O.concat(K),R[K]));else for(K=0;K1&&A.push(p("object","layout"))),a.supplyDefaults(M);for(var E=M._fullData,D=T.length,O=0;O0&&Math.round(v)===v))return{vals:h};g=v}for(var y=u.calendar,x=m==="start",w=m==="end",k=s[d+"period0"],b=l(k,y)||0,T=[],_=[],S=[],A=h.length,M=0;MR;)O=c(O,-g,y);for(;O<=R;)O=c(O,g,y);D=c(O,-g,y)}else{for(O=b+(E=Math.round((R-b)/p))*p;O>R;)O-=p;for(;O<=R;)O+=p;D=O-p}T[M]=x?D:w?O:(D+O)/2,_[M]=D,S[M]=O}return{vals:T,starts:_,ends:S}}},{"../../constants/numerical":479,"../../lib":503,"fast-isnumeric":190}],552:[function(e,o,f){o.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},{}],553:[function(e,o,f){var r=e("@plotly/d3"),a=e("fast-isnumeric"),l=e("../../lib"),c=e("../../constants/numerical").FP_SAFE,i=e("../../registry"),s=e("../../components/drawing"),u=e("./axis_ids"),d=u.getFromId,h=u.isLinked;function m(_,S){var A,M,E=[],D=_._fullLayout,O=p(D,S,0),R=p(D,S,1),z=v(_,S),L=z.min,P=z.max;if(L.length===0||P.length===0)return l.simpleMap(S.range,S.r2l);var N=L[0].val,B=P[0].val;for(A=1;A0&&((re=H-O(K)-R(te))>Q?U/re>ee&&(Y=K,Z=te,ee=U/re):U/H>ee&&(Y={val:K.val,nopad:1},Z={val:te.val,nopad:1},ee=U/H));if(N===B){var ie=N-1,ae=N+1;if($)if(N===0)E=[0,1];else{var ue=(N>0?P:L).reduce(function(ge,fe){return Math.max(ge,R(fe))},0),le=N/(1-Math.min(.5,ue/H));E=N>0?[0,le]:[le,0]}else E=ne?[Math.max(0,ie),Math.max(1,ae)]:[ie,ae]}else $?(Y.val>=0&&(Y={val:0,nopad:1}),Z.val<=0&&(Z={val:0,nopad:1})):ne&&(Y.val-ee*O(Y)<0&&(Y={val:0,nopad:1}),Z.val<=0&&(Z={val:1,nopad:1})),ee=(Z.val-Y.val-g(S,K.val,te.val))/(H-O(Y)-R(Z)),E=[Y.val-ee*O(Y),Z.val+ee*R(Z)];return G&&E.reverse(),l.simpleMap(E,S.l2r||Number)}function g(_,S,A){var M=0;if(_.rangebreaks)for(var E=_.locateBreaks(S,A),D=0;D0?A.ppadplus:A.ppadminus)||A.ppad||0),$=U((_._m>0?A.ppadminus:A.ppadplus)||A.ppad||0),ne=U(A.vpadplus||A.vpad),H=U(A.vpadminus||A.vpad);if(!Z){if(P=1/0,N=-1/0,Y)for(M=0;M0&&(P=E),E>N&&E-c&&(P=E),E>N&&E=ie;M--)ee(M);return{min:B,max:G,opts:A}},concatExtremes:v};function v(_,S,A){var M,E,D,O=S._id,R=_._fullData,z=_._fullLayout,L=[],P=[];function N(te,Y){for(M=0;M=A&&(L.extrapad||!O)){R=!1;break}E(S,L.val)&&L.pad<=A&&(O||!L.extrapad)&&(_.splice(z,1),z--)}if(R){var P=D&&S===0;_.push({val:S,pad:P?0:A,extrapad:!P&&O})}}function k(_){return a(_)&&Math.abs(_)=S}},{"../../components/drawing":388,"../../constants/numerical":479,"../../lib":503,"../../registry":638,"./axis_ids":558,"@plotly/d3":58,"fast-isnumeric":190}],554:[function(e,o,f){var r=e("@plotly/d3"),a=e("fast-isnumeric"),l=e("../../plots/plots"),c=e("../../registry"),i=e("../../lib"),s=i.strTranslate,u=e("../../lib/svg_text_utils"),d=e("../../components/titles"),h=e("../../components/color"),m=e("../../components/drawing"),g=e("./layout_attributes"),p=e("./clean_ticks"),v=e("../../constants/numerical"),y=v.ONEMAXYEAR,x=v.ONEAVGYEAR,w=v.ONEMINYEAR,k=v.ONEMAXQUARTER,b=v.ONEAVGQUARTER,T=v.ONEMINQUARTER,_=v.ONEMAXMONTH,S=v.ONEAVGMONTH,A=v.ONEMINMONTH,M=v.ONEWEEK,E=v.ONEDAY,D=E/2,O=v.ONEHOUR,R=v.ONEMIN,z=v.ONESEC,L=v.MINUS_SIGN,P=v.BADNUM,N={K:"zeroline"},B={K:"gridline",L:"path"},G={K:"tick",L:"path"},W={K:"tick",L:"text"},K=e("../../constants/alignment"),te=K.MID_SHIFT,Y=K.CAP_SHIFT,Z=K.LINE_SPACING,re=K.OPPOSITE_SIDE,U=o.exports={};U.setConvert=e("./set_convert");var q=e("./axis_autotype"),$=e("./axis_ids"),ne=$.idSort,H=$.isLinked;U.id2name=$.id2name,U.name2id=$.name2id,U.cleanId=$.cleanId,U.list=$.list,U.listIds=$.listIds,U.getFromId=$.getFromId,U.getFromTrace=$.getFromTrace;var Q=e("./autorange");U.getAutoRange=Q.getAutoRange,U.findExtremes=Q.findExtremes;function ee(Be){var Ge=1e-4*(Be[1]-Be[0]);return[Be[0]-Ge,Be[1]+Ge]}U.coerceRef=function(Be,Ge,Tt,dt,Pe,Ie){var Ae=dt.charAt(dt.length-1),De=Tt._fullLayout._subplots[Ae+"axis"],He=dt+"ref",rt={};return Pe||(Pe=De[0]||(typeof Ie=="string"?Ie:Ie[0])),Ie||(Ie=Pe),De=De.concat(De.map(function(lt){return lt+" domain"})),rt[He]={valType:"enumerated",values:De.concat(Ie?typeof Ie=="string"?[Ie]:Ie:[]),dflt:Pe},i.coerce(Be,Ge,rt,He)},U.getRefType=function(Be){return Be===void 0?Be:Be==="paper"?"paper":Be==="pixel"?"pixel":/( domain)$/.test(Be)?"domain":"range"},U.coercePosition=function(Be,Ge,Tt,dt,Pe,Ie){var Ae,De;if(U.getRefType(dt)!=="range")Ae=i.ensureNumber,De=Tt(Pe,Ie);else{var He=U.getFromId(Ge,dt);De=Tt(Pe,Ie=He.fraction2r(Ie)),Ae=He.cleanPos}Be[Pe]=Ae(De)},U.cleanPosition=function(Be,Ge,Tt){return(Tt==="paper"||Tt==="pixel"?i.ensureNumber:U.getFromId(Ge,Tt).cleanPos)(Be)},U.redrawComponents=function(Be,Ge){Ge=Ge||U.listIds(Be);var Tt=Be._fullLayout;function dt(Pe,Ie,Ae,De){for(var He=c.getComponentMethod(Pe,Ie),rt={},lt=0;lt2e-6||((Tt-Be._forceTick0)/Be._minDtick%1+1.000001)%1>2e-6)&&(Be._minDtick=0)):Be._minDtick=0},U.saveRangeInitial=function(Be,Ge){for(var Tt=U.list(Be,"",!0),dt=!1,Pe=0;Pe.3*Kt||It(St)||It(Dt))){var Ht=zt.dtick/2;tt+=tt+Ht.8){var Je=Number(zt.substr(1));Le.exactYears>.8&&Je%12==0?tt=U.tickIncrement(tt,"M6","reverse")+1.5*E:Le.exactMonths>.8?tt=U.tickIncrement(tt,"M1","reverse")+15.5*E:tt-=D;var st=U.tickIncrement(tt,zt);if(st<=St)return st}return tt}(Ut,Be,Vt,De,Pe)),wt=Ut,0;wt<=He;)wt=U.tickIncrement(wt,Vt,!1,Pe);return{start:Ge.c2r(Ut,0,Pe),end:Ge.c2r(wt,0,Pe),size:Vt,_dataSpan:He-De}},U.prepTicks=function(Be,Ge){var Tt=i.simpleMap(Be.range,Be.r2l,void 0,void 0,Ge);if(Be._dtickInit=Be.dtick,Be._tick0Init=Be.tick0,Be.tickmode==="auto"||!Be.dtick){var dt,Pe=Be.nticks;Pe||(Be.type==="category"||Be.type==="multicategory"?(dt=Be.tickfont?i.bigFont(Be.tickfont.size||12):15,Pe=Be._length/dt):(dt=Be._id.charAt(0)==="y"?40:80,Pe=i.constrain(Be._length/dt,4,9)+1),Be._name==="radialaxis"&&(Pe*=2)),Be.tickmode==="array"&&(Pe*=100),Be._roughDTick=Math.abs(Tt[1]-Tt[0])/Pe,U.autoTicks(Be,Be._roughDTick),Be._minDtick>0&&Be.dtick<2*Be._minDtick&&(Be.dtick=Be._minDtick,Be.tick0=Be.l2r(Be._forceTick0))}Be.ticklabelmode==="period"&&function(Ie){var Ae;function De(){return!(a(Ie.dtick)||Ie.dtick.charAt(0)!=="M")}var He=De(),rt=U.getTickFormat(Ie);if(rt){var lt=Ie._dtickInit!==Ie.dtick;/%[fLQsSMX]/.test(rt)||(/%[HI]/.test(rt)?(Ae=O,lt&&!He&&Ie.dtickHn&&Er=Ie:kt<=Ie;kt=U.tickIncrement(kt,Be.dtick,Ae,Be.calendar)){if(Dt++,Be.rangebreaks&&!Ae){if(kt=He)break}if(tt.length>Ut||kt===bt)break;bt=kt;var Le=!1;lt&&kt!==(0|kt)&&(Le=!0);var Je={minor:Le,value:kt};Vt>1&&Dt%Vt&&(Je.skipLabel=!0),tt.push(Je)}if(ot&&function(nn,sn,gn){for(var bn=0;bn0?(Hn=bn-1,Wn=bn):(Hn=bn,Wn=bn);var ar,Or=nn[Hn].value,vr=nn[Wn].value,Er=Math.abs(vr-Or),Kn=gn||Er,Ln=0;Kn>=w?Ln=Er>=w&&Er<=y?Er:x:gn===b&&Kn>=T?Ln=Er>=T&&Er<=k?Er:b:Kn>=A?Ln=Er>=A&&Er<=_?Er:S:gn===M&&Kn>=M?Ln=M:Kn>=E?Ln=E:gn===D&&Kn>=D?Ln=D:gn===O&&Kn>=O&&(Ln=O),Ln>=Er&&(Ln=Er,ar=!0);var lr=In+Ln;if(sn.rangebreaks&&Ln>0){for(var Wr=0,Mn=0;Mn<84;Mn++){var rr=(Mn+.5)/84;sn.maskBreaks(In*(1-rr)+rr*lr)!==P&&Wr++}(Ln*=Wr/84)||(nn[bn].drop=!0),ar&&Er>M&&(Ln=Er)}(Ln>0||bn===0)&&(nn[bn].periodX=In+Ln/2)}}(tt,Be,Be._definedDelta),Be.rangebreaks){var st=Be._id.charAt(0)==="y",Et=1;Be.tickmode==="auto"&&(Et=Be.tickfont?Be.tickfont.size:12);var It=NaN;for(zt=tt.length-1;zt>-1;zt--)if(tt[zt].drop)tt.splice(zt,1);else{tt[zt].value=Ot(tt[zt].value,Be);var Zt=Be.c2p(tt[zt].value);(st?It>Zt-Et:ItHe||HtHe&&(Kt.periodX=He),Ht10||dt.substr(5)!=="01-01"?Be._tickround="d":Be._tickround=+Ge.substr(1)%12==0?"y":"m";else if(Ge>=E&&Pe<=10||Ge>=15*E)Be._tickround="d";else if(Ge>=R&&Pe<=16||Ge>=O)Be._tickround="M";else if(Ge>=z&&Pe<=19||Ge>=R)Be._tickround="S";else{var Ie=Be.l2r(Tt+Ge).replace(/^-/,"").length;Be._tickround=Math.max(Pe,Ie)-20,Be._tickround<0&&(Be._tickround=4)}}else if(a(Ge)||Ge.charAt(0)==="L"){var Ae=Be.range.map(Be.r2d||Number);a(Ge)||(Ge=Number(Ge.substr(1))),Be._tickround=2-Math.floor(Math.log(Ge)/Math.LN10+.01);var De=Math.max(Math.abs(Ae[0]),Math.abs(Ae[1])),He=Math.floor(Math.log(De)/Math.LN10+.01),rt=Be.minexponent===void 0?3:Be.minexponent;Math.abs(He)>rt&&(Ee(Be.exponentformat)&&!ze(He)?Be._tickexponent=3*Math.round((He-1)/3):Be._tickexponent=He)}else Be._tickround=null}function Me(Be,Ge,Tt){var dt=Be.tickfont||{};return{x:Ge,dx:0,dy:0,text:Tt||"",fontSize:dt.size,font:dt.family,fontColor:dt.color}}U.autoTicks=function(Be,Ge){var Tt;function dt(lt){return Math.pow(lt,Math.floor(Math.log(Ge)/Math.LN10))}if(Be.type==="date"){Be.tick0=i.dateTick0(Be.calendar,0);var Pe=2*Ge;if(Pe>x)Ge/=x,Tt=dt(10),Be.dtick="M"+12*de(Ge,Tt,ge);else if(Pe>S)Ge/=S,Be.dtick="M"+de(Ge,1,fe);else if(Pe>E){Be.dtick=de(Ge,E,Be._hasDayOfWeekBreaks?[1,2,7,14]:_e);var Ie=U.getTickFormat(Be),Ae=Be.ticklabelmode==="period";Ae&&(Be._rawTick0=Be.tick0),/%[uVW]/.test(Ie)?Be.tick0=i.dateTick0(Be.calendar,2):Be.tick0=i.dateTick0(Be.calendar,1),Ae&&(Be._dowTick0=Be.tick0)}else Pe>O?Be.dtick=de(Ge,O,fe):Pe>R?Be.dtick=de(Ge,R,me):Pe>z?Be.dtick=de(Ge,z,me):(Tt=dt(10),Be.dtick=de(Ge,Tt,ge))}else if(Be.type==="log"){Be.tick0=0;var De=i.simpleMap(Be.range,Be.r2l);if(Ge>.7)Be.dtick=Math.ceil(Ge);else if(Math.abs(De[1]-De[0])<1){var He=1.5*Math.abs((De[1]-De[0])/Ge);Ge=Math.abs(Math.pow(10,De[1])-Math.pow(10,De[0]))/He,Tt=dt(10),Be.dtick="L"+de(Ge,Tt,ge)}else Be.dtick=Ge>.3?"D2":"D1"}else Be.type==="category"||Be.type==="multicategory"?(Be.tick0=0,Be.dtick=Math.ceil(Math.max(Ge,1))):et(Be)?(Be.tick0=0,Tt=1,Be.dtick=de(Ge,Tt,Oe)):(Be.tick0=0,Tt=dt(10),Be.dtick=de(Ge,Tt,ge));if(Be.dtick===0&&(Be.dtick=1),!a(Be.dtick)&&typeof Be.dtick!="string"){var rt=Be.dtick;throw Be.dtick=1,"ax.dtick error: "+String(rt)}},U.tickIncrement=function(Be,Ge,Tt,dt){var Pe=Tt?-1:1;if(a(Ge))return i.increment(Be,Pe*Ge);var Ie=Ge.charAt(0),Ae=Pe*Number(Ge.substr(1));if(Ie==="M")return i.incrementMonth(Be,Ae,dt);if(Ie==="L")return Math.log(Math.pow(10,Be)+Ae)/Math.LN10;if(Ie==="D"){var De=Ge==="D2"?Te:we,He=Be+.01*Pe,rt=i.roundUp(i.mod(He,1),De,Tt);return Math.floor(He)+Math.log(r.round(Math.pow(10,rt),1))/Math.LN10}throw"unrecognized dtick "+String(Ge)},U.tickFirst=function(Be,Ge){var Tt=Be.r2l||Number,dt=i.simpleMap(Be.range,Tt,void 0,void 0,Ge),Pe=dt[1] ")}else Ut._prevDateHead=Le,Je+="
"+Le;tt.text=Je}(Be,Ie,Tt,De):He==="log"?function(Ut,tt,bt,zt,St){var Dt=Ut.dtick,Le=tt.x,Je=Ut.tickformat,st=typeof Dt=="string"&&Dt.charAt(0);if(St==="never"&&(St=""),zt&&st!=="L"&&(Dt="L3",st="L"),Je||st==="L")tt.text=Fe(Math.pow(10,Le),Ut,St,zt);else if(a(Dt)||st==="D"&&i.mod(Le+.01,1)<.1){var Et=Math.round(Le),It=Math.abs(Et),Zt=Ut.exponentformat;Zt==="power"||Ee(Zt)&&ze(Et)?(tt.text=Et===0?1:Et===1?"10":"10"+(Et>1?"":L)+It+"",tt.fontSize*=1.25):(Zt==="e"||Zt==="E")&&It>2?tt.text="1"+Zt+(Et>0?"+":L)+It:(tt.text=Fe(Math.pow(10,Le),Ut,"","fakehover"),Dt==="D1"&&Ut._id.charAt(0)==="y"&&(tt.dy-=tt.fontSize/6))}else{if(st!=="D")throw"unrecognized dtick "+String(Dt);tt.text=String(Math.round(Math.pow(10,i.mod(Le,1)))),tt.fontSize*=.75}if(Ut.dtick==="D1"){var Kt=String(tt.text).charAt(0);Kt!=="0"&&Kt!=="1"||(Ut._id.charAt(0)==="y"?tt.dx-=tt.fontSize/4:(tt.dy+=tt.fontSize/2,tt.dx+=(Ut.range[1]>Ut.range[0]?1:-1)*tt.fontSize*(Le<0?.5:.25)))}}(Be,Ie,0,De,wt):He==="category"?function(Ut,tt){var bt=Ut._categories[Math.round(tt.x)];bt===void 0&&(bt=""),tt.text=String(bt)}(Be,Ie):He==="multicategory"?function(Ut,tt,bt){var zt=Math.round(tt.x),St=Ut._categories[zt]||[],Dt=St[1]===void 0?"":String(St[1]),Le=St[0]===void 0?"":String(St[0]);bt?tt.text=Le+" - "+Dt:(tt.text=Dt,tt.text2=Le)}(Be,Ie,Tt):et(Be)?function(Ut,tt,bt,zt,St){if(Ut.thetaunit!=="radians"||bt)tt.text=Fe(tt.x,Ut,St,zt);else{var Dt=tt.x/180;if(Dt===0)tt.text="0";else{var Le=function(st){function Et(Ht,mn){return Math.abs(Ht-mn)<=1e-6}var It=function(Ht){for(var mn=1;!Et(Math.round(Ht*mn)/mn,Ht);)mn*=10;return mn}(st),Zt=st*It,Kt=Math.abs(function Ht(mn,zn){return Et(zn,0)?mn:Ht(zn,mn%zn)}(Zt,It));return[Math.round(Zt/Kt),Math.round(It/Kt)]}(Dt);if(Le[1]>=100)tt.text=Fe(i.deg2rad(tt.x),Ut,St,zt);else{var Je=tt.x<0;Le[1]===1?Le[0]===1?tt.text="\u03C0":tt.text=Le[0]+"\u03C0":tt.text=["",Le[0],"","\u2044","",Le[1],"","\u03C0"].join(""),Je&&(tt.text=L+tt.text)}}}}(Be,Ie,Tt,De,wt):function(Ut,tt,bt,zt,St){St==="never"?St="":Ut.showexponent==="all"&&Math.abs(tt.x/Ut.dtick)<1e-6&&(St="hide"),tt.text=Fe(tt.x,Ut,St,zt)}(Be,Ie,0,De,wt),dt||(Be.tickprefix&&!kt(Be.showtickprefix)&&(Ie.text=Be.tickprefix+Ie.text),Be.ticksuffix&&!kt(Be.showticksuffix)&&(Ie.text+=Be.ticksuffix)),Be.tickson==="boundaries"||Be.showdividers){var Vt=function(Ut){var tt=Be.l2p(Ut);return tt>=0&&tt<=Be._length?Ut:null};Ie.xbnd=[Vt(Ie.x-.5),Vt(Ie.x+Be.dtick-.5)]}return Ie},U.hoverLabelText=function(Be,Ge,Tt){Tt&&(Be=i.extendFlat({},Be,{hoverformat:Tt}));var dt=Array.isArray(Ge)?Ge[0]:Ge,Pe=Array.isArray(Ge)?Ge[1]:void 0;if(Pe!==void 0&&Pe!==dt)return U.hoverLabelText(Be,dt,Tt)+" - "+U.hoverLabelText(Be,Pe,Tt);var Ie=Be.type==="log"&&dt<=0,Ae=U.tickText(Be,Be.c2l(Ie?-dt:dt),"hover").text;return Ie?dt===0?"0":L+Ae:Ae};var ke=["f","p","n","\u03BC","m","","k","M","G","T"];function Ee(Be){return Be==="SI"||Be==="B"}function ze(Be){return Be>14||Be<-15}function Fe(Be,Ge,Tt,dt){var Pe=Be<0,Ie=Ge._tickround,Ae=Tt||Ge.exponentformat||"B",De=Ge._tickexponent,He=U.getTickFormat(Ge),rt=Ge.separatethousands;if(dt){var lt={exponentformat:Ae,minexponent:Ge.minexponent,dtick:Ge.showexponent==="none"?Ge.dtick:a(Be)&&Math.abs(Be)||1,range:Ge.showexponent==="none"?Ge.range.map(Ge.r2d):[0,Be||1]};ye(lt),Ie=(Number(lt._tickround)||0)+4,De=lt._tickexponent,Ge.hoverformat&&(He=Ge.hoverformat)}if(He)return Ge._numFormat(He)(Be).replace(/-/g,L);var ot,kt=Math.pow(10,-Ie)/2;if(Ae==="none"&&(De=0),(Be=Math.abs(Be))"+ot+"":Ae==="B"&&De===9?Be+="B":Ee(Ae)&&(Be+=ke[De/3+5])),Pe?L+Be:Be}function Ve(Be,Ge){for(var Tt=[],dt={},Pe=0;Pe1&&Tt=Pe.min&&Be=0,bt=lt(kt,wt[1])<=0;return(Vt||tt)&&(Ut||bt)}if(Be.tickformatstops&&Be.tickformatstops.length>0)switch(Be.type){case"date":case"linear":for(Ge=0;Ge=Ae(Pe)))){Tt=dt;break}break;case"log":for(Ge=0;Ge0?Kn.bottom-nr:0,Bn)))),Ge.automargin){Ln={x:0,y:0,r:0,l:0,t:0,b:0};var Fr=[0,1];if(He==="x"){if(Mn==="b"?Ln[Mn]=Ge._depth:(Ln[Mn]=Ge._depth=Math.max(Kn.width>0?nr-Kn.top:0,Bn),Fr.reverse()),Kn.width>0){var $r=Kn.right-(Ge._offset+Ge._length);$r>0&&(Ln.xr=1,Ln.r=$r);var pr=Ge._offset-Kn.left;pr>0&&(Ln.xl=0,Ln.l=pr)}}else if(Mn==="l"?Ln[Mn]=Ge._depth=Math.max(Kn.height>0?nr-Kn.left:0,Bn):(Ln[Mn]=Ge._depth=Math.max(Kn.height>0?Kn.right-nr:0,Bn),Fr.reverse()),Kn.height>0){var qr=Kn.bottom-(Ge._offset+Ge._length);qr>0&&(Ln.yb=0,Ln.b=qr);var _i=Ge._offset-Kn.top;_i>0&&(Ln.yt=1,Ln.t=_i)}Ln[rt]=Ge.anchor==="free"?Ge.position:Ge._anchorAxis.domain[Fr[0]],Ge.title.text!==Ae._dfltTitle[He]&&(Ln[Mn]+=qe(Ge)+(Ge.title.standoff||0)),Ge.mirror&&Ge.anchor!=="free"&&((lr={x:0,y:0,r:0,l:0,t:0,b:0})[rr]=Ge.linewidth,Ge.mirror&&Ge.mirror!==!0&&(lr[rr]+=Bn),Ge.mirror===!0||Ge.mirror==="ticks"?lr[rt]=Ge._anchorAxis.domain[Fr[1]]:Ge.mirror!=="all"&&Ge.mirror!=="allticks"||(lr[rt]=[Ge._counterDomainMin,Ge._counterDomainMax][Fr[1]]))}vr&&(Wr=c.getComponentMethod("rangeslider","autoMarginOpts")(Be,Ge)),l.autoMargin(Be,nt(Ge),Ln),l.autoMargin(Be,ft(Ge),lr),l.autoMargin(Be,vt(Ge),Wr)}),Tt.skipTitle||vr&&Ge.side==="bottom"||ar.push(function(){return function(Kn,Ln){var lr,Wr=Kn._fullLayout,Mn=Ln._id,rr=Mn.charAt(0),nr=Ln.title.font.size;if(Ln.title.hasOwnProperty("standoff"))lr=Ln._depth+Ln.title.standoff+qe(Ln);else{var Bn=Wt(Ln);if(Ln.type==="multicategory")lr=Ln._depth;else{var Fr=1.5*nr;Bn&&(Fr=.5*nr,Ln.ticks==="outside"&&(Fr+=Ln.ticklen)),lr=10+Fr+(Ln.linewidth?Ln.linewidth-1:0)}Bn||(lr+=rr==="x"?Ln.side==="top"?nr*(Ln.showticklabels?1:0):nr*(Ln.showticklabels?1.5:.5):Ln.side==="right"?nr*(Ln.showticklabels?1:.5):nr*(Ln.showticklabels?.5:0))}var $r,pr,qr,_i,cn=U.getPxPosition(Kn,Ln);if(rr==="x"?(pr=Ln._offset+Ln._length/2,qr=Ln.side==="top"?cn-lr:cn+lr):(qr=Ln._offset+Ln._length/2,pr=Ln.side==="right"?cn+lr:cn-lr,$r={rotate:"-90",offset:0}),Ln.type!=="multicategory"){var jn=Ln._selections[Ln._id+"tick"];if(_i={selection:jn,side:Ln.side},jn&&jn.node()&&jn.node().parentNode){var jt=m.getTranslate(jn.node().parentNode);_i.offsetLeft=jt.x,_i.offsetTop=jt.y}Ln.title.hasOwnProperty("standoff")&&(_i.pad=0)}return d.draw(Kn,Mn+"title",{propContainer:Ln,propName:Ln._name+".title.text",placeholder:Wr._dfltTitle[rr],avoid:_i,transform:$r,attributes:{x:pr,y:qr,"text-anchor":"middle"}})}(Be,Ge)}),i.syncOrAsync(ar)}}function Er(Kn){var Ln=De+(Kn||"tick");return tt[Ln]||(tt[Ln]=function(lr,Wr){var Mn,rr,nr,Bn;return lr._selections[Wr].size()?(Mn=1/0,rr=-1/0,nr=1/0,Bn=-1/0,lr._selections[Wr].each(function(){var Fr=Ye(this),$r=m.bBox(Fr.node().parentNode);Mn=Math.min(Mn,$r.top),rr=Math.max(rr,$r.bottom),nr=Math.min(nr,$r.left),Bn=Math.max(Bn,$r.right)})):(Mn=0,rr=0,nr=0,Bn=0),{top:Mn,bottom:rr,left:nr,right:Bn,height:rr-Mn,width:Bn-nr}}(Ge,Ln)),tt[Ln]}},U.getTickSigns=function(Be){var Ge=Be._id.charAt(0),Tt={x:"top",y:"right"}[Ge],dt=Be.side===Tt?1:-1,Pe=[-1,1,dt,-dt];return Be.ticks!=="inside"==(Ge==="x")&&(Pe=Pe.map(function(Ie){return-Ie})),Be.side&&Pe.push({l:-1,t:-1,r:1,b:1}[Be.side.charAt(0)]),Pe},U.makeTransTickFn=function(Be){return Be._id.charAt(0)==="x"?function(Ge){return s(Be._offset+Be.l2p(Ge.x),0)}:function(Ge){return s(0,Be._offset+Be.l2p(Ge.x))}},U.makeTransTickLabelFn=function(Be){var Ge=function(Pe){var Ie=Pe.ticklabelposition||"",Ae=function(bt){return Ie.indexOf(bt)!==-1},De=Ae("top"),He=Ae("left"),rt=Ae("right"),lt=Ae("bottom"),ot=Ae("inside"),kt=lt||He||De||rt;if(!kt&&!ot)return[0,0];var wt=Pe.side,Vt=kt?(Pe.tickwidth||0)/2:0,Ut=3,tt=Pe.tickfont?Pe.tickfont.size:12;return(lt||De)&&(Vt+=tt*Y,Ut+=(Pe.linewidth||0)/2),(He||rt)&&(Vt+=(Pe.linewidth||0)/2,Ut+=3),ot&&wt==="top"&&(Ut-=tt*(1-Y)),(He||De)&&(Vt=-Vt),wt!=="bottom"&&wt!=="right"||(Ut=-Ut),[kt?Vt:0,ot?Ut:0]}(Be),Tt=Ge[0],dt=Ge[1];return Be._id.charAt(0)==="x"?function(Pe){return s(Tt+Be._offset+Be.l2p(Ke(Pe)),dt)}:function(Pe){return s(dt,Tt+Be._offset+Be.l2p(Ke(Pe)))}},U.makeTickPath=function(Be,Ge,Tt,dt){dt=dt!==void 0?dt:Be.ticklen;var Pe=Be._id.charAt(0),Ie=(Be.linewidth||1)/2;return Pe==="x"?"M0,"+(Ge+Ie*Tt)+"v"+dt*Tt:"M"+(Ge+Ie*Tt)+",0h"+dt*Tt},U.makeLabelFns=function(Be,Ge,Tt){var dt=Be.ticklabelposition||"",Pe=function(Kt){return dt.indexOf(Kt)!==-1},Ie=Pe("top"),Ae=Pe("left"),De=Pe("right"),He=Pe("bottom")||Ae||Ie||De,rt=Pe("inside"),lt=dt==="inside"&&Be.ticks==="inside"||!rt&&Be.ticks==="outside"&&Be.tickson!=="boundaries",ot=0,kt=0,wt=lt?Be.ticklen:0;if(rt?wt*=-1:He&&(wt=0),lt&&(ot+=wt,Tt)){var Vt=i.deg2rad(Tt);ot=wt*Math.cos(Vt)+1,kt=wt*Math.sin(Vt)}Be.showticklabels&&(lt||Be.showline)&&(ot+=.2*Be.tickfont.size);var Ut,tt,bt,zt,St,Dt={labelStandoff:ot+=(Be.linewidth||1)/2*(rt?-1:1),labelShift:kt},Le=0,Je=Be.side,st=Be._id.charAt(0),Et=Be.tickangle;if(st==="x")zt=(St=!rt&&Je==="bottom"||rt&&Je==="top")?1:-1,rt&&(zt*=-1),Ut=kt*zt,tt=Ge+ot*zt,bt=St?1:-.2,Math.abs(Et)===90&&(rt?bt+=te:bt=Et===-90&&Je==="bottom"?Y:Et===90&&Je==="top"?te:.5,Le=te/2*(Et/90)),Dt.xFn=function(Kt){return Kt.dx+Ut+Le*Kt.fontSize},Dt.yFn=function(Kt){return Kt.dy+tt+Kt.fontSize*bt},Dt.anchorFn=function(Kt,Ht){if(He){if(Ae)return"end";if(De)return"start"}return a(Ht)&&Ht!==0&&Ht!==180?Ht*zt<0!==rt?"end":"start":"middle"},Dt.heightFn=function(Kt,Ht,mn){return Ht<-60||Ht>60?-.5*mn:Be.side==="top"!==rt?-mn:0};else if(st==="y"){if(zt=(St=!rt&&Je==="left"||rt&&Je==="right")?1:-1,rt&&(zt*=-1),Ut=ot,tt=kt*zt,bt=0,rt||Math.abs(Et)!==90||(bt=Et===-90&&Je==="left"||Et===90&&Je==="right"?Y:.5),rt){var It=a(Et)?+Et:0;if(It!==0){var Zt=i.deg2rad(It);Le=Math.abs(Math.sin(Zt))*Y*zt,bt=0}}Dt.xFn=function(Kt){return Kt.dx+Ge-(Ut+Kt.fontSize*bt)*zt+Le*Kt.fontSize},Dt.yFn=function(Kt){return Kt.dy+tt+Kt.fontSize*te},Dt.anchorFn=function(Kt,Ht){return a(Ht)&&Math.abs(Ht)===90?"middle":St?"end":"start"},Dt.heightFn=function(Kt,Ht,mn){return Be.side==="right"&&(Ht*=-1),Ht<-30?-mn:Ht<30?-.5*mn:0}}return Dt},U.drawTicks=function(Be,Ge,Tt){Tt=Tt||{};var dt=Ge._id+"tick",Pe=Tt.vals;Ge.ticklabelmode==="period"&&(Pe=Pe.slice()).shift();var Ie=Tt.layer.selectAll("path."+dt).data(Ge.ticks?Pe:[],Re);Ie.exit().remove(),Ie.enter().append("path").classed(dt,1).classed("ticks",1).classed("crisp",Tt.crisp!==!1).call(h.stroke,Ge.tickcolor).style("stroke-width",m.crispRound(Be,Ge.tickwidth,1)+"px").attr("d",Tt.path).style("display",null),Jt(Ge,[G]),Ie.attr("transform",Tt.transFn)},U.drawGrid=function(Be,Ge,Tt){Tt=Tt||{};var dt=Ge._id+"grid",Pe=Tt.vals,Ie=Tt.counterAxis;if(Ge.showgrid===!1)Pe=[];else if(Ie&&U.shouldShowZeroLine(Be,Ge,Ie))for(var Ae=Ge.tickmode==="array",De=0;DeIt||sn.leftIt||sn.top+(Ge.tickangle?0:tn.fontSize/4)Ge["_visibleLabelMin_"+st._id]?pn.style("display","none"):It.K!=="tick"||Et||pn.style("display",null)})})})})},wt(ot,lt+1?lt:rt);var Vt=null;Ge._selections&&(Ge._selections[Ae]=ot);var Ut=[function(){return kt.length&&Promise.all(kt)}];Ge.automargin&&dt._redrawFromAutoMarginCount&<===90?(Vt=90,Ut.push(function(){wt(ot,lt)})):Ut.push(function(){if(wt(ot,rt),De.length&&Ie==="x"&&!a(rt)&&(Ge.type!=="log"||String(Ge.dtick).charAt(0)!=="D")){Vt=0;var zt,St=0,Dt=[];if(ot.each(function(nn){St=Math.max(St,nn.fontSize);var sn=Ge.l2p(nn.x),gn=Ye(this),bn=m.bBox(gn.node());Dt.push({top:0,bottom:10,height:10,left:sn-bn.width/2,right:sn+bn.width/2+2,width:bn.width+2})}),Ge.tickson!=="boundaries"&&!Ge.showdividers||Tt.secondary){var Le=De.length,Je=Math.abs((De[Le-1].x-De[0].x)*Ge._m)/(Le-1),st=Ge.ticklabelposition||"",Et=function(nn){return st.indexOf(nn)!==-1},It=Et("top"),Zt=Et("left"),Kt=Et("right"),Ht=Et("bottom")||Zt||It||Kt?(Ge.tickwidth||0)+6:0,mn=Je<2.5*St||Ge.type==="multicategory"||Ge._name==="realaxis";for(zt=0;zt1)for(De=1;De2*E}(v,g))return"date";var b=p.autotypenumbers!=="strict";return function(T,_){for(var S=T.length,A=h(S),M=0,E=0,D={},O=0;O2*M}(v,b)?"category":function(T,_){for(var S=T.length,A=0;A=2){var M,E,D="";if(A.length===2){for(M=0;M<2;M++)if(E=k(A[M])){D=v;break}}var O=S("pattern",D);if(O===v)for(M=0;M<2;M++)(E=k(A[M]))&&(T.bounds[M]=A[M]=E-1);if(O)for(M=0;M<2;M++)switch(E=A[M],O){case v:if(!r(E)||(E=+E)!==Math.floor(E)||E<0||E>=7)return void(T.enabled=!1);T.bounds[M]=A[M]=E;break;case y:if(!r(E)||(E=+E)<0||E>24)return void(T.enabled=!1);T.bounds[M]=A[M]=E}if(_.autorange===!1){var R=_.range;if(R[0]R[1])return void(T.enabled=!1)}else if(A[0]>R[0]&&A[1]u?1:-1:+(c.substr(1)||1)-+(i.substr(1)||1)},f.ref2id=function(c){return!!/^[xyz]/.test(c)&&c.split(" ")[0]},f.isLinked=function(c,i){return l(i,c._axisMatchGroups)||l(i,c._axisConstraintGroups)}},{"../../registry":638,"./constants":561}],559:[function(e,o,f){o.exports=function(r,a,l,c){if(a.type==="category"){var i,s=r.categoryarray,u=Array.isArray(s)&&s.length>0;u&&(i="array");var d,h=l("categoryorder",i);h==="array"&&(d=l("categoryarray")),u||h!=="array"||(h=a.categoryorder="trace"),h==="trace"?a._initialCategories=[]:h==="array"?a._initialCategories=d.slice():(d=function(m,g){var p,v,y,x=g.dataAttr||m._id.charAt(0),w={};if(g.axData)p=g.axData;else for(p=[],v=0;vT?_.substr(T):S.substr(b))+A:_+S+w*k:A}function y(w,k){for(var b=k._size,T=b.h/b.w,_={},S=Object.keys(w),A=0;Au*L)||G){for(b=0;bne&&ieq&&(q=ie);E/=(q-U)/(2*$),U=S.l2r(U),q=S.l2r(q),S.range=S._input.range=Y=0?Math.min(ie,.9):1/(1/Math.max(ie,-.3)+3.222))}function Y(ie,ae,ue,le,ge){return ie.append("path").attr("class","zoombox").style({fill:ae>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",u(ue,le)).attr("d",ge+"Z")}function Z(ie,ae,ue){return ie.append("path").attr("class","zoombox-corners").style({fill:h.background,stroke:h.defaultLine,"stroke-width":1,opacity:0}).attr("transform",u(ae,ue)).attr("d","M0,0Z")}function re(ie,ae,ue,le,ge,fe){ie.attr("d",le+"M"+ue.l+","+ue.t+"v"+ue.h+"h"+ue.w+"v-"+ue.h+"h-"+ue.w+"Z"),U(ie,ae,ge,fe)}function U(ie,ae,ue,le){ue||(ie.transition().style("fill",le>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ae.transition().style("opacity",1).duration(200))}function q(ie){r.select(ie).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function $(ie){P&&ie.data&&ie._context.showTips&&(a.notifier(a._(ie,"Double-click to zoom back out"),"long"),P=!1)}function ne(ie){var ae=Math.floor(Math.min(ie.b-ie.t,ie.r-ie.l,L)/2);return"M"+(ie.l-3.5)+","+(ie.t-.5+ae)+"h3v"+-ae+"h"+ae+"v-3h-"+(ae+3)+"ZM"+(ie.r+3.5)+","+(ie.t-.5+ae)+"h-3v"+-ae+"h"+-ae+"v-3h"+(ae+3)+"ZM"+(ie.r+3.5)+","+(ie.b+.5-ae)+"h-3v"+ae+"h"+-ae+"v3h"+(ae+3)+"ZM"+(ie.l-3.5)+","+(ie.b+.5-ae)+"h3v"+ae+"h"+ae+"v3h-"+(ae+3)+"Z"}function H(ie,ae,ue,le,ge){for(var fe,me,_e,we,Te=!1,Oe={},de={},ye=(ge||{}).xaHash,Me=(ge||{}).yaHash,ke=0;ke=0)sn._fullLayout._deactivateShape(sn);else{var gn=sn._fullLayout.clickmode;if(q(sn),tn!==2||Jt||Zt(),Wt)gn.indexOf("select")>-1&&D(nn,sn,ye,Me,ae.id,wt),gn.indexOf("event")>-1&&g.click(sn,nn,ae.id);else if(tn===1&&Jt){var bn=me?Te:we,In=me==="s"||_e==="w"?0:1,Hn=bn._name+".range["+In+"]",Wn=function(vr,Er){var Kn,Ln=vr.range[Er],lr=Math.abs(Ln-vr.range[1-Er]);return vr.type==="date"?Ln:vr.type==="log"?(Kn=Math.ceil(Math.max(0,-Math.log(lr)/Math.LN10))+3,l("."+Kn+"g")(Math.pow(10,Ln))):(Kn=Math.floor(Math.log(Math.abs(Ln))/Math.LN10)-Math.floor(Math.log(lr)/Math.LN10)+4,l("."+String(Kn)+"g")(Ln))}(bn,In),ar="left",Or="middle";if(bn.fixedrange)return;me?(Or=me==="n"?"top":"bottom",bn.side==="right"&&(ar="right")):_e==="e"&&(ar="right"),sn._context.showAxisRangeEntryBoxes&&r.select(Tt).call(d.makeEditable,{gd:sn,immediate:!0,background:sn._fullLayout.paper_bgcolor,text:String(Wn),fill:bn.tickfont?bn.tickfont.color:"#444",horizontalAlign:ar,verticalAlign:Or}).on("edit",function(vr){var Er=bn.d2r(vr);Er!==void 0&&s.call("_guiRelayout",sn,Hn,Er)})}}}function tt(tn,nn){if(ie._transitioningWithDuration)return!1;var sn=Math.max(0,Math.min(ze,at*tn+dt)),gn=Math.max(0,Math.min(Fe,et*nn+Pe)),bn=Math.abs(sn-dt),In=Math.abs(gn-Pe);function Hn(){rt="",Ie.r=Ie.l,Ie.t=Ie.b,ot.attr("d","M0,0Z")}if(Ie.l=Math.min(dt,sn),Ie.r=Math.max(dt,sn),Ie.t=Math.min(Pe,gn),Ie.b=Math.max(Pe,gn),Ve.isSubplotConstrained)bn>L||In>L?(rt="xy",bn/ze>In/Fe?(In=bn*Fe/ze,Pe>gn?Ie.t=Pe-In:Ie.b=Pe+In):(bn=In*ze/Fe,dt>sn?Ie.l=dt-bn:Ie.r=dt+bn),ot.attr("d",ne(Ie))):Hn();else if(Ke.isSubplotConstrained)if(bn>L||In>L){rt="xy";var Wn=Math.min(Ie.l/ze,(Fe-Ie.b)/Fe),ar=Math.max(Ie.r/ze,(Fe-Ie.t)/Fe);Ie.l=Wn*ze,Ie.r=ar*ze,Ie.b=(1-Wn)*Fe,Ie.t=(1-ar)*Fe,ot.attr("d",ne(Ie))}else Hn();else!qe||In0){var Or;if(Ke.isSubplotConstrained||!Re&&qe.length===1){for(Or=0;Orw[1]-1/4096&&(c.domain=d),a.noneOrAll(l.domain,c.domain,d)}return i("layer"),c}},{"../../lib":503,"fast-isnumeric":190}],573:[function(e,o,f){var r=e("./show_dflt");o.exports=function(a,l,c,i,s){s||(s={});var u=s.tickSuffixDflt,d=r(a);c("tickprefix")&&c("showtickprefix",d),c("ticksuffix",u)&&c("showticksuffix",d)}},{"./show_dflt":577}],574:[function(e,o,f){var r=e("../../constants/alignment").FROM_BL;o.exports=function(a,l,c){c===void 0&&(c=r[a.constraintoward||"center"]);var i=[a.r2l(a.range[0]),a.r2l(a.range[1])],s=i[0]+(i[1]-i[0])*c;a.range=a._input.range=[a.l2r(s+(i[0]-s)*l),a.l2r(s+(i[1]-s)*l)],a.setScale()}},{"../../constants/alignment":471}],575:[function(e,o,f){var r=e("polybooljs"),a=e("../../registry"),l=e("../../components/drawing").dashStyle,c=e("../../components/color"),i=e("../../components/fx"),s=e("../../components/fx/helpers").makeEventData,u=e("../../components/dragelement/helpers"),d=u.freeMode,h=u.rectMode,m=u.drawMode,g=u.openMode,p=u.selectMode,v=e("../../components/shapes/draw_newshape/display_outlines"),y=e("../../components/shapes/draw_newshape/helpers").handleEllipse,x=e("../../components/shapes/draw_newshape/newshapes"),w=e("../../lib"),k=e("../../lib/polygon"),b=e("../../lib/throttle"),T=e("./axis_ids").getFromId,_=e("../../lib/clear_gl_canvases"),S=e("../../plot_api/subroutines").redrawReglTraces,A=e("./constants"),M=A.MINSELECT,E=k.filter,D=k.tester,O=e("./handle_outline").clearSelect,R=e("./helpers"),z=R.p2r,L=R.axValue,P=R.getTransform;function N($,ne,H,Q,ee,ie,ae){var ue,le,ge,fe,me,_e,we,Te,Oe,de=ne._hoverdata,ye=ne._fullLayout.clickmode.indexOf("event")>-1,Me=[];if(function(Ve){return Ve&&Array.isArray(Ve)&&Ve[0].hoverOnBox!==!0}(de)){K($,ne,ie);var ke=function(Ve,Ke){var Re,qe,We=Ve[0],Ye=-1,nt=[];for(qe=0;qe0?function(Ve,Ke){var Re,qe,We,Ye=[];for(We=0;We0&&Ye.push(Re);if(Ye.length===1&&Ye[0]===Ke.searchInfo&&(qe=Ke.searchInfo.cd[0].trace).selectedpoints.length===Ke.pointNumbers.length){for(We=0;We1||(We+=Re.selectedpoints.length)>1))return!1;return We===1}(ue)&&(_e=Z(ke))){for(ae&&ae.remove(),Oe=0;Oe=0&&Q._fullLayout._deactivateShape(Q),m(ne)){var ee=Q._fullLayout._zoomlayer.selectAll(".select-outline-"+H.id);if(ee&&Q._fullLayout._drawing){var ie=x(ee,$);ie&&a.call("_guiRelayout",Q,{shapes:ie}),Q._fullLayout._drawing=!1}}H.selection={},H.selection.selectionDefs=$.selectionDefs=[],H.selection.mergedPolygons=$.mergedPolygons=[]}function Y($,ne,H,Q){var ee,ie,ae,ue=[],le=ne.map(function(we){return we._id}),ge=H.map(function(we){return we._id});for(ae=0;ae<$.calcdata.length;ae++)if((ie=(ee=$.calcdata[ae])[0].trace).visible===!0&&ie._module&&ie._module.selectPoints)if(!Q||ie.subplot!==Q&&ie.geo!==Q)if(ie.type==="splom"&&ie._xaxes[le[0]]&&ie._yaxes[ge[0]]){var fe=_e(ie._module,ee,ne[0],H[0]);fe.scene=$._fullLayout._splomScenes[ie.uid],ue.push(fe)}else if(ie.type==="sankey"){var me=_e(ie._module,ee,ne[0],H[0]);ue.push(me)}else{if(le.indexOf(ie.xaxis)===-1||ge.indexOf(ie.yaxis)===-1)continue;ue.push(_e(ie._module,ee,T($,ie.xaxis),T($,ie.yaxis)))}else ue.push(_e(ie._module,ee,ne[0],H[0]));return ue;function _e(we,Te,Oe,de){return{_module:we,cd:Te,xaxis:Oe,yaxis:de}}}function Z($){var ne=$.searchInfo.cd[0].trace,H=$.pointNumber,Q=$.pointNumbers,ee=Q.length>0?Q[0]:H;return!!ne.selectedpoints&&ne.selectedpoints.indexOf(ee)>-1}function re($,ne,H){var Q,ee,ie,ae;for(Q=0;Q=0)_e._fullLayout._deactivateShape(_e);else if(!le){var He=we.clickmode;b.done(Tt).then(function(){if(b.clear(Tt),Ae===2){for(Wt.remove(),Re=0;Re-1&&N(De,_e,Q.xaxes,Q.yaxes,Q.subplot,Q,Wt),He==="event"&&_e.emit("plotly_selected",void 0);i.click(_e,De)}).catch(w.error)}},Q.doneFn=function(){Ge.remove(),b.done(Tt).then(function(){b.clear(Tt),Q.gd.emit("plotly_selected",We),Ke&&Q.selectionDefs&&(Ke.subtract=Ot,Q.selectionDefs.push(Ke),Q.mergedPolygons.length=0,[].push.apply(Q.mergedPolygons,Ve)),Q.doneFnCompleted&&Q.doneFnCompleted(dt)}).catch(w.error),le&&te(Q)}},clearSelect:O,clearSelectionsCache:te,selectOnClick:N}},{"../../components/color":366,"../../components/dragelement/helpers":384,"../../components/drawing":388,"../../components/fx":406,"../../components/fx/helpers":402,"../../components/shapes/draw_newshape/display_outlines":454,"../../components/shapes/draw_newshape/helpers":455,"../../components/shapes/draw_newshape/newshapes":456,"../../lib":503,"../../lib/clear_gl_canvases":487,"../../lib/polygon":515,"../../lib/throttle":530,"../../plot_api/subroutines":544,"../../registry":638,"./axis_ids":558,"./constants":561,"./handle_outline":565,"./helpers":566,polybooljs:254}],576:[function(e,o,f){var r=e("@plotly/d3"),a=e("d3-time-format").utcFormat,l=e("../../lib"),c=l.numberFormat,i=e("fast-isnumeric"),s=l.cleanNumber,u=l.ms2DateTime,d=l.dateTime2ms,h=l.ensureNumber,m=l.isArrayOrTypedArray,g=e("../../constants/numerical"),p=g.FP_SAFE,v=g.BADNUM,y=g.LOG_CLIP,x=g.ONEWEEK,w=g.ONEDAY,k=g.ONEHOUR,b=g.ONEMIN,T=g.ONESEC,_=e("./axis_ids"),S=e("./constants"),A=S.HOUR_PATTERN,M=S.WEEKDAY_PATTERN;function E(O){return Math.pow(10,O)}function D(O){return O!=null}o.exports=function(O,R){R=R||{};var z=O._id||"x",L=z.charAt(0);function P(H,Q){if(H>0)return Math.log(H)/Math.LN10;if(H<=0&&Q&&O.range&&O.range.length===2){var ee=O.range[0],ie=O.range[1];return .5*(ee+ie-2*y*Math.abs(ee-ie))}return v}function N(H,Q,ee,ie){if((ie||{}).msUTC&&i(H))return+H;var ae=d(H,ee||O.calendar);if(ae===v){if(!i(H))return v;H=+H;var ue=Math.floor(10*l.mod(H+.05,1)),le=Math.round(H-ue/10);ae=d(new Date(le))+ue/10}return ae}function B(H,Q,ee){return u(H,Q,ee||O.calendar)}function G(H){return O._categories[Math.round(H)]}function W(H){if(D(H)){if(O._categoriesMap===void 0&&(O._categoriesMap={}),O._categoriesMap[H]!==void 0)return O._categoriesMap[H];O._categories.push(typeof H=="number"?String(H):H);var Q=O._categories.length-1;return O._categoriesMap[H]=Q,Q}return v}function K(H){if(O._categoriesMap)return O._categoriesMap[H]}function te(H){var Q=K(H);return Q!==void 0?Q:i(H)?+H:void 0}function Y(H){return i(H)?+H:K(H)}function Z(H,Q,ee){return r.round(ee+Q*H,2)}function re(H,Q,ee){return(H-ee)/Q}var U=function(H){return i(H)?Z(H,O._m,O._b):v},q=function(H){return re(H,O._m,O._b)};if(O.rangebreaks){var $=L==="y";U=function(H){if(!i(H))return v;var Q=O._rangebreaks.length;if(!Q)return Z(H,O._m,O._b);var ee=$;O.range[0]>O.range[1]&&(ee=!ee);for(var ie=ee?-1:1,ae=ie*H,ue=0,le=0;lefe)){ue=ae<(ge+fe)/2?le:le+1;break}ue=le+1}var me=O._B[ue]||0;return isFinite(me)?Z(H,O._m2,me):0},q=function(H){var Q=O._rangebreaks.length;if(!Q)return re(H,O._m,O._b);for(var ee=0,ie=0;ieO._rangebreaks[ie].pmax&&(ee=ie+1);return re(H,O._m2,O._B[ee])}}O.c2l=O.type==="log"?P:h,O.l2c=O.type==="log"?E:h,O.l2p=U,O.p2l=q,O.c2p=O.type==="log"?function(H,Q){return U(P(H,Q))}:U,O.p2c=O.type==="log"?function(H){return E(q(H))}:q,["linear","-"].indexOf(O.type)!==-1?(O.d2r=O.r2d=O.d2c=O.r2c=O.d2l=O.r2l=s,O.c2d=O.c2r=O.l2d=O.l2r=h,O.d2p=O.r2p=function(H){return O.l2p(s(H))},O.p2d=O.p2r=q,O.cleanPos=h):O.type==="log"?(O.d2r=O.d2l=function(H,Q){return P(s(H),Q)},O.r2d=O.r2c=function(H){return E(s(H))},O.d2c=O.r2l=s,O.c2d=O.l2r=h,O.c2r=P,O.l2d=E,O.d2p=function(H,Q){return O.l2p(O.d2r(H,Q))},O.p2d=function(H){return E(q(H))},O.r2p=function(H){return O.l2p(s(H))},O.p2r=q,O.cleanPos=h):O.type==="date"?(O.d2r=O.r2d=l.identity,O.d2c=O.r2c=O.d2l=O.r2l=N,O.c2d=O.c2r=O.l2d=O.l2r=B,O.d2p=O.r2p=function(H,Q,ee){return O.l2p(N(H,0,ee))},O.p2d=O.p2r=function(H,Q,ee){return B(q(H),Q,ee)},O.cleanPos=function(H){return l.cleanDate(H,v,O.calendar)}):O.type==="category"?(O.d2c=O.d2l=W,O.r2d=O.c2d=O.l2d=G,O.d2r=O.d2l_noadd=te,O.r2c=function(H){var Q=Y(H);return Q!==void 0?Q:O.fraction2r(.5)},O.l2r=O.c2r=h,O.r2l=Y,O.d2p=function(H){return O.l2p(O.r2c(H))},O.p2d=function(H){return G(q(H))},O.r2p=O.d2p,O.p2r=q,O.cleanPos=function(H){return typeof H=="string"&&H!==""?H:h(H)}):O.type==="multicategory"&&(O.r2d=O.c2d=O.l2d=G,O.d2r=O.d2l_noadd=te,O.r2c=function(H){var Q=te(H);return Q!==void 0?Q:O.fraction2r(.5)},O.r2c_just_indices=K,O.l2r=O.c2r=h,O.r2l=te,O.d2p=function(H){return O.l2p(O.r2c(H))},O.p2d=function(H){return G(q(H))},O.r2p=O.d2p,O.p2r=q,O.cleanPos=function(H){return Array.isArray(H)||typeof H=="string"&&H!==""?H:h(H)},O.setupMultiCategory=function(H){var Q,ee,ie=O._traceIndices,ae=O._matchGroup;if(ae&&O._categories.length===0){for(var ue in ae)if(ue!==z){var le=R[_.id2name(ue)];ie=ie.concat(le._traceIndices)}}var ge=[[0,{}],[0,{}]],fe=[];for(Q=0;Qp&&(ae[ee]=p),ae[0]===ae[1]){var le=Math.max(1,Math.abs(1e-6*ae[0]));ae[0]-=le,ae[1]+=le}}else l.nestedProperty(O,H).set(ie)},O.setScale=function(H){var Q=R._size;if(O.overlaying){var ee=_.getFromId({_fullLayout:R},O.overlaying);O.domain=ee.domain}var ie=H&&O._r?"_r":"range",ae=O.calendar;O.cleanRange(ie);var ue,le,ge=O.r2l(O[ie][0],ae),fe=O.r2l(O[ie][1],ae),me=L==="y";if(me?(O._offset=Q.t+(1-O.domain[1])*Q.h,O._length=Q.h*(O.domain[1]-O.domain[0]),O._m=O._length/(ge-fe),O._b=-O._m*fe):(O._offset=Q.l+O.domain[0]*Q.w,O._length=Q.w*(O.domain[1]-O.domain[0]),O._m=O._length/(fe-ge),O._b=-O._m*ge),O._rangebreaks=[],O._lBreaks=0,O._m2=0,O._B=[],O.rangebreaks&&(O._rangebreaks=O.locateBreaks(Math.min(ge,fe),Math.max(ge,fe)),O._rangebreaks.length)){for(ue=0;uefe&&(_e=!_e),_e&&O._rangebreaks.reverse();var we=_e?-1:1;for(O._m2=we*O._length/(Math.abs(fe-ge)-O._lBreaks),O._B.push(-O._m2*(me?fe:ge)),ue=0;ueie&&(ie+=7,aeie&&(ie+=24,ae=ee&&ae=ee&&H=Ke.min&&(EeKe.max&&(Ke.max=ze),Fe=!1)}Fe&&le.push({min:Ee,max:ze})}};for(ee=0;eed.duration?(function(){for(var A={},M=0;M rect").call(c.setTranslate,0,0).call(c.setScale,1,1),b.plot.call(c.setTranslate,T._offset,_._offset).call(c.setScale,1,1);var S=b.plot.selectAll(".scatterlayer .trace");S.selectAll(".point").call(c.setPointGroupScale,1,1),S.selectAll(".textpoint").call(c.setTextPointsScale,1,1),S.call(c.hideOutsideRangePoints,b)}function k(b,T){var _=b.plotinfo,S=_.xaxis,A=_.yaxis,M=S._length,E=A._length,D=!!b.xr1,O=!!b.yr1,R=[];if(D){var z=l.simpleMap(b.xr0,S.r2l),L=l.simpleMap(b.xr1,S.r2l),P=z[1]-z[0],N=L[1]-L[0];R[0]=(z[0]*(1-T)+T*L[0]-z[0])/(z[1]-z[0])*M,R[2]=M*(1-T+T*N/P),S.range[0]=S.l2r(z[0]*(1-T)+T*L[0]),S.range[1]=S.l2r(z[1]*(1-T)+T*L[1])}else R[0]=0,R[2]=M;if(O){var B=l.simpleMap(b.yr0,A.r2l),G=l.simpleMap(b.yr1,A.r2l),W=B[1]-B[0],K=G[1]-G[0];R[1]=(B[1]*(1-T)+T*G[1]-B[1])/(B[0]-B[1])*E,R[3]=E*(1-T+T*K/W),A.range[0]=S.l2r(B[0]*(1-T)+T*G[0]),A.range[1]=A.l2r(B[1]*(1-T)+T*G[1])}else R[1]=0,R[3]=E;i.drawOne(s,S,{skipTitle:!0}),i.drawOne(s,A,{skipTitle:!0}),i.redrawComponents(s,[S._id,A._id]);var te=D?M/R[2]:1,Y=O?E/R[3]:1,Z=D?R[0]:0,re=O?R[1]:0,U=D?R[0]/R[2]*M:0,q=O?R[1]/R[3]*E:0,$=S._offset-U,ne=A._offset-q;_.clipRect.call(c.setTranslate,Z,re).call(c.setScale,1/te,1/Y),_.plot.call(c.setTranslate,$,ne).call(c.setScale,te,Y),c.setPointGroupScale(_.zoomScalePts,1/te,1/Y),c.setTextPointsScale(_.zoomScaleTxt,1/te,1/Y)}i.redrawComponents(s)}},{"../../components/drawing":388,"../../lib":503,"../../registry":638,"./axes":554,"@plotly/d3":58}],582:[function(e,o,f){var r=e("../../registry").traceIs,a=e("./axis_autotype");function l(i){return{v:"x",h:"y"}[i.orientation||"v"]}function c(i,s){var u=l(i),d=r(i,"box-violin"),h=r(i._fullInput||{},"candlestick");return d&&!h&&s===u&&i[u]===void 0&&i[u+"0"]===void 0}o.exports=function(i,s,u,d){u("autotypenumbers",d.autotypenumbersDflt),u("type",(d.splomStash||{}).type)==="-"&&(function(h,m){if(h.type==="-"){var g,p=h._id,v=p.charAt(0);p.indexOf("scene")!==-1&&(p=v);var y=function(A,M,E){for(var D=0;D0&&(O["_"+E+"axes"]||{})[M]||(O[E+"axis"]||E)===M&&(c(O,E)||(O[E]||[]).length||O[E+"0"]))return O}}(m,p,v);if(!!y){if(y.type==="histogram"&&v==={v:"y",h:"x"}[y.orientation||"v"])return void(h.type="linear");var x=v+"calendar",w=y[x],k={noMultiCategory:!r(y,"cartesian")||r(y,"noMultiCategory")};if(y.type==="box"&&y._hasPreCompStats&&v==={h:"x",v:"y"}[y.orientation||"v"]&&(k.noMultiCategory=!0),k.autotypenumbers=h.autotypenumbers,c(y,v)){var b=l(y),T=[];for(g=0;g0?".":"")+g;a.isPlainObject(p)?s(p,d,v,m+1):d(v,g,p)}})}f.manageCommandObserver=function(u,d,h,m){var g={},p=!0;d&&d._commandObserver&&(g=d._commandObserver),g.cache||(g.cache={}),g.lookupTable={};var v=f.hasSimpleAPICommandBindings(u,h,g.lookupTable);if(d&&d._commandObserver){if(v)return g;if(d._commandObserver.remove)return d._commandObserver.remove(),d._commandObserver=null,g}if(v){l(u,v,g.cache),g.check=function(){if(p){var w=l(u,v,g.cache);return w.changed&&m&&g.lookupTable[w.value]!==void 0&&(g.disable(),Promise.resolve(m({value:w.value,type:v.type,prop:v.prop,traces:v.traces,index:g.lookupTable[w.value]})).then(g.enable,g.enable)),w.changed}};for(var y=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],x=0;x0&&N<0&&(N+=360);var W=(N-P)/4;return{type:"Polygon",coordinates:[[[P,B],[P,G],[P+W,G],[P+2*W,G],[P+3*W,G],[N,G],[N,B],[N-W,B],[N-2*W,B],[N-3*W,B],[P,B]]]}}o.exports=function(R){return new E(R)},D.plot=function(R,z,L){var P=this,N=z[this.id],B=[],G=!1;for(var W in _.layerNameToAdjective)if(W!=="frame"&&N["show"+W]){G=!0;break}for(var K=0;K0&&B._module.calcGeoJSON(N,z)}if(!this.updateProjection(R,z)){this.viewInitial&&this.scope===L.scope||this.saveViewInitial(L),this.scope=L.scope,this.updateBaseLayers(z,L),this.updateDims(z,L),this.updateFx(z,L),p.generalUpdatePerTraceModule(this.graphDiv,this,R,L);var G=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=G.selectAll(".point"),this.dataPoints.text=G.selectAll("text"),this.dataPaths.line=G.selectAll(".js-line");var W=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=W.selectAll("path"),this.render()}},D.updateProjection=function(R,z){var L=this.graphDiv,P=z[this.id],N=z._size,B=P.domain,G=P.projection,W=P.lonaxis,K=P.lataxis,te=W._ax,Y=K._ax,Z=this.projection=function(de){var ye=de.projection,Me=ye.type,ke=_.projNames[Me];ke="geo"+u.titleCase(ke);for(var Ee=(a[ke]||i[ke])(),ze=de._isSatellite?180*Math.acos(1/ye.distance)/Math.PI:de._isClipped?_.lonaxisSpan[Me]/2:null,Fe=["center","rotate","parallels","clipExtent"],Ve=function(qe){return qe?Ee:[]},Ke=0;Keze*Math.PI/180}return!1},Ee.getPath=function(){return l().projection(Ee)},Ee.getBounds=function(qe){return Ee.getPath().bounds(qe)},Ee.precision(_.precision),de._isSatellite&&Ee.tilt(ye.tilt).distance(ye.distance),ze&&Ee.clipAngle(ze-_.clipPad),Ee}(P),re=[[N.l+N.w*B.x[0],N.t+N.h*(1-B.y[1])],[N.l+N.w*B.x[1],N.t+N.h*(1-B.y[0])]],U=P.center||{},q=G.rotation||{},$=W.range||[],ne=K.range||[];if(P.fitbounds){te._length=re[1][0]-re[0][0],Y._length=re[1][1]-re[0][1],te.range=y(L,te),Y.range=y(L,Y);var H=(te.range[0]+te.range[1])/2,Q=(Y.range[0]+Y.range[1])/2;if(P._isScoped)U={lon:H,lat:Q};else if(P._isClipped){U={lon:H,lat:Q},q={lon:H,lat:Q,roll:q.roll};var ee=G.type,ie=_.lonaxisSpan[ee]/2||180,ae=_.lataxisSpan[ee]/2||90;$=[H-ie,H+ie],ne=[Q-ae,Q+ae]}else U={lon:H,lat:Q},q={lon:H,lat:q.lat,roll:q.roll}}Z.center([U.lon-q.lon,U.lat-q.lat]).rotate([-q.lon,-q.lat,q.roll]).parallels(G.parallels);var ue=O($,ne);Z.fitExtent(re,ue);var le=this.bounds=Z.getBounds(ue),ge=this.fitScale=Z.scale(),fe=Z.translate();if(P.fitbounds){var me=Z.getBounds(O(te.range,Y.range)),_e=Math.min((le[1][0]-le[0][0])/(me[1][0]-me[0][0]),(le[1][1]-le[0][1])/(me[1][1]-me[0][1]));isFinite(_e)?Z.scale(_e*ge):u.warn("Something went wrong during"+this.id+"fitbounds computations.")}else Z.scale(G.scale*ge);var we=this.midPt=[(le[0][0]+le[1][0])/2,(le[0][1]+le[1][1])/2];if(Z.translate([fe[0]+(we[0]-fe[0]),fe[1]+(we[1]-fe[1])]).clipExtent(le),P._isAlbersUsa){var Te=Z([U.lon,U.lat]),Oe=Z.translate();Z.translate([Oe[0]-(Te[0]-Oe[0]),Oe[1]-(Te[1]-Oe[1])])}},D.updateBaseLayers=function(R,z){var L=this,P=L.topojson,N=L.layers,B=L.basePaths;function G(Z){return Z==="lonaxis"||Z==="lataxis"}function W(Z){return Boolean(_.lineLayers[Z])}function K(Z){return Boolean(_.fillLayers[Z])}var te=(this.hasChoropleth?_.layersForChoropleth:_.layers).filter(function(Z){return W(Z)||K(Z)?z["show"+Z]:!G(Z)||z[Z].showgrid}),Y=L.framework.selectAll(".layer").data(te,String);Y.exit().each(function(Z){delete N[Z],delete B[Z],r.select(this).remove()}),Y.enter().append("g").attr("class",function(Z){return"layer "+Z}).each(function(Z){var re=N[Z]=r.select(this);Z==="bg"?L.bgRect=re.append("rect").style("pointer-events","all"):G(Z)?B[Z]=re.append("path").style("fill","none"):Z==="backplot"?re.append("g").classed("choroplethlayer",!0):Z==="frontplot"?re.append("g").classed("scatterlayer",!0):W(Z)?B[Z]=re.append("path").style("fill","none").style("stroke-miterlimit",2):K(Z)&&(B[Z]=re.append("path").style("stroke","none"))}),Y.order(),Y.each(function(Z){var re=B[Z],U=_.layerNameToAdjective[Z];Z==="frame"?re.datum(_.sphereSVG):W(Z)||K(Z)?re.datum(M(P,P.objects[Z])):G(Z)&&re.datum(function(q,$,ne){var H,Q,ee,ie=$[q],ae=_.scopeDefaults[$.scope];q==="lonaxis"?(H=ae.lonaxisRange,Q=ae.lataxisRange,ee=function(Oe,de){return[Oe,de]}):q==="lataxis"&&(H=ae.lataxisRange,Q=ae.lonaxisRange,ee=function(Oe,de){return[de,Oe]});var ue={type:"linear",range:[H[0],H[1]-1e-6],tick0:ie.tick0,dtick:ie.dtick};v.setConvert(ue,ne);var le=v.calcTicks(ue);$.isScoped||q!=="lonaxis"||le.pop();for(var ge=le.length,fe=new Array(ge),me=0;me-1&&b(r.event,P,[L.xaxis],[L.yaxis],L.id,K),G.indexOf("event")>-1&&g.click(P,r.event))})}function te(Y){return L.projection.invert([Y[0]+L.xaxis._offset,Y[1]+L.yaxis._offset])}},D.makeFramework=function(){var R=this,z=R.graphDiv,L=z._fullLayout,P="clip"+L._uid+R.id;R.clipDef=L._clips.append("clipPath").attr("id",P),R.clipRect=R.clipDef.append("rect"),R.framework=r.select(R.container).append("g").attr("class","geo "+R.id).call(m.setClipUrl,P,z),R.project=function(N){var B=R.projection(N);return B?[B[0]-R.xaxis._offset,B[1]-R.yaxis._offset]:[null,null]},R.xaxis={_id:"x",c2p:function(N){return R.project(N)[0]}},R.yaxis={_id:"y",c2p:function(N){return R.project(N)[1]}},R.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},v.setConvert(R.mockAxis,L)},D.saveViewInitial=function(R){var z,L=R.center||{},P=R.projection,N=P.rotation||{};this.viewInitial={fitbounds:R.fitbounds,"projection.scale":P.scale},z=R._isScoped?{"center.lon":L.lon,"center.lat":L.lat}:R._isClipped?{"projection.rotation.lon":N.lon,"projection.rotation.lat":N.lat}:{"center.lon":L.lon,"center.lat":L.lat,"projection.rotation.lon":N.lon},u.extendFlat(this.viewInitial,z)},D.render=function(){var R,z=this.projection,L=z.getPath();function P(B){var G=z(B.lonlat);return G?d(G[0],G[1]):null}function N(B){return z.isLonLatOverEdges(B.lonlat)?"none":null}for(R in this.basePaths)this.basePaths[R].attr("d",L);for(R in this.dataPaths)this.dataPaths[R].attr("d",function(B){return L(B.geojson)});for(R in this.dataPoints)this.dataPoints[R].attr("display",N).attr("transform",P)}},{"../../components/color":366,"../../components/dragelement":385,"../../components/drawing":388,"../../components/fx":406,"../../lib":503,"../../lib/geo_location_utils":496,"../../lib/topojson_utils":532,"../../registry":638,"../cartesian/autorange":553,"../cartesian/axes":554,"../cartesian/select":575,"../plots":619,"./constants":587,"./zoom":592,"@plotly/d3":58,"d3-geo":114,"d3-geo-projection":113,"topojson-client":315}],589:[function(e,o,f){var r=e("../../plots/get_data").getSubplotCalcData,a=e("../../lib").counterRegex,l=e("./geo"),c="geo",i=a(c),s={};s.geo={valType:"subplotid",dflt:c,editType:"calc"},o.exports={attr:c,name:c,idRoot:c,idRegex:i,attrRegex:i,attributes:s,layoutAttributes:e("./layout_attributes"),supplyLayoutDefaults:e("./layout_defaults"),plot:function(u){for(var d=u._fullLayout,h=u.calcdata,m=d._subplots.geo,g=0;g0&&K<0&&(K+=360);var te,Y,Z,re=(W+K)/2;if(!k){var U=b?x.projRotate:[re,0,0];te=m("projection.rotation.lon",U[0]),m("projection.rotation.lat",U[1]),m("projection.rotation.roll",U[2]),m("showcoastlines",!b&&M)&&(m("coastlinecolor"),m("coastlinewidth")),m("showocean",!!M&&void 0)&&m("oceancolor")}k?(Y=-96.6,Z=38.7):(Y=b?re:te,Z=(G[0]+G[1])/2),m("center.lon",Y),m("center.lat",Z),T&&(m("projection.tilt"),m("projection.distance")),_&&m("projection.parallels",x.projParallels||[0,60]),m("projection.scale"),m("showland",!!M&&void 0)&&m("landcolor"),m("showlakes",!!M&&void 0)&&m("lakecolor"),m("showrivers",!!M&&void 0)&&(m("rivercolor"),m("riverwidth")),m("showcountries",b&&y!=="usa"&&M)&&(m("countrycolor"),m("countrywidth")),(y==="usa"||y==="north america"&&v===50)&&(m("showsubunits",M),m("subunitcolor"),m("subunitwidth")),b||m("showframe",M)&&(m("framecolor"),m("framewidth")),m("bgcolor"),m("fitbounds")&&(delete h.projection.scale,b?(delete h.center.lon,delete h.center.lat):S?(delete h.center.lon,delete h.center.lat,delete h.projection.rotation.lon,delete h.projection.rotation.lat,delete h.lonaxis.range,delete h.lataxis.range):(delete h.center.lon,delete h.center.lat,delete h.projection.rotation.lon))}o.exports=function(d,h,m){a(d,h,m,{type:"geo",attributes:i,handleDefaults:u,fullData:m,partition:"y"})}},{"../../lib":503,"../get_data":593,"../subplot_defaults":632,"./constants":587,"./layout_attributes":590}],592:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),l=e("../../registry"),c=Math.PI/180,i=180/Math.PI,s={cursor:"pointer"},u={cursor:"auto"};function d(M,E){return r.behavior.zoom().translate(E.translate()).scale(E.scale())}function h(M,E,D){var O=M.id,R=M.graphDiv,z=R.layout,L=z[O],P=R._fullLayout,N=P[O],B={},G={};function W(K,te){B[O+"."+K]=a.nestedProperty(L,K).get(),l.call("_storeDirectGUIEdit",z,P._preGUI,B);var Y=a.nestedProperty(N,K);Y.get()!==te&&(Y.set(te),a.nestedProperty(L,K).set(te),G[O+"."+K]=te)}D(W),W("projection.scale",E.scale()/M.fitScale),W("fitbounds",!1),R.emit("plotly_relayout",G)}function m(M,E){var D=d(0,E);function O(R){var z=E.invert(M.midPt);R("center.lon",z[0]),R("center.lat",z[1])}return D.on("zoomstart",function(){r.select(this).style(s)}).on("zoom",function(){E.scale(r.event.scale).translate(r.event.translate),M.render();var R=E.invert(M.midPt);M.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":E.scale()/M.fitScale,"geo.center.lon":R[0],"geo.center.lat":R[1]})}).on("zoomend",function(){r.select(this).style(u),h(M,E,O)}),D}function g(M,E){var D,O,R,z,L,P,N,B,G,W=d(0,E);function K(Y){return E.invert(Y)}function te(Y){var Z=E.rotate(),re=E.invert(M.midPt);Y("projection.rotation.lon",-Z[0]),Y("center.lon",re[0]),Y("center.lat",re[1])}return W.on("zoomstart",function(){r.select(this).style(s),D=r.mouse(this),O=E.rotate(),R=E.translate(),z=O,L=K(D)}).on("zoom",function(){if(P=r.mouse(this),function(re){var U=K(re);if(!U)return!0;var q=E(U);return Math.abs(q[0]-re[0])>2||Math.abs(q[1]-re[1])>2}(D))return W.scale(E.scale()),void W.translate(E.translate());E.scale(r.event.scale),E.translate([R[0],r.event.translate[1]]),L?K(P)&&(B=K(P),N=[z[0]+(B[0]-L[0]),O[1],O[2]],E.rotate(N),z=N):L=K(D=P),G=!0,M.render();var Y=E.rotate(),Z=E.invert(M.midPt);M.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":E.scale()/M.fitScale,"geo.center.lon":Z[0],"geo.center.lat":Z[1],"geo.projection.rotation.lon":-Y[0]})}).on("zoomend",function(){r.select(this).style(u),G&&h(M,E,te)}),W}function p(M,E){var D,O={r:E.rotate(),k:E.scale()},R=d(0,E),z=function(K){for(var te=0,Y=arguments.length,Z=[];++tete?(z=(G>0?90:-90)-K,R=0):(z=Math.asin(G/te)*i-K,R=Math.sqrt(te*te-G*G));var Y=180-z-2*K,Z=(Math.atan2(W,B)-Math.atan2(N,R))*i,re=(Math.atan2(W,B)-Math.atan2(N,-R))*i;return b(D[0],D[1],z,Z)<=b(D[0],D[1],Y,re)?[z,Z,D[2]]:[Y,re,D[2]]}function b(M,E,D,O){var R=T(D-M),z=T(O-E);return Math.sqrt(R*R+z*z)}function T(M){return(M%360+540)%360-180}function _(M,E,D){var O=D*c,R=M.slice(),z=E===0?1:0,L=E===2?1:2,P=Math.cos(O),N=Math.sin(O);return R[z]=M[z]*P-M[L]*N,R[L]=M[L]*P+M[z]*N,R}function S(M){return[Math.atan2(2*(M[0]*M[1]+M[2]*M[3]),1-2*(M[1]*M[1]+M[2]*M[2]))*i,Math.asin(Math.max(-1,Math.min(1,2*(M[0]*M[2]-M[3]*M[1]))))*i,Math.atan2(2*(M[0]*M[3]+M[1]*M[2]),1-2*(M[2]*M[2]+M[3]*M[3]))*i]}function A(M,E){for(var D=0,O=0,R=M.length;OMath.abs(k)?(m.boxEnd[1]=m.boxStart[1]+Math.abs(w)*L*(k>=0?1:-1),m.boxEnd[1]b[3]&&(m.boxEnd[1]=b[3],m.boxEnd[0]=m.boxStart[0]+(b[3]-m.boxStart[1])/Math.abs(L))):(m.boxEnd[0]=m.boxStart[0]+Math.abs(k)/L*(w>=0?1:-1),m.boxEnd[0]b[2]&&(m.boxEnd[0]=b[2],m.boxEnd[1]=m.boxStart[1]+(b[2]-m.boxStart[0])*Math.abs(L)))}}else m.boxEnabled?(w=m.boxStart[0]!==m.boxEnd[0],k=m.boxStart[1]!==m.boxEnd[1],w||k?(w&&(E(0,m.boxStart[0],m.boxEnd[0]),u.xaxis.autorange=!1),k&&(E(1,m.boxStart[1],m.boxEnd[1]),u.yaxis.autorange=!1),u.relayoutCallback()):u.glplot.setDirty(),m.boxEnabled=!1,m.boxInited=!1):m.boxInited&&(m.boxInited=!1);break;case"pan":m.boxEnabled=!1,m.boxInited=!1,v?(m.panning||(m.dragStart[0]=y,m.dragStart[1]=x),Math.abs(m.dragStart[0]-y).999&&(_="turntable"):_="turntable")}else _="turntable";g("dragmode",_),g("hovermode",p.getDfltFromLayout("hovermode"))}o.exports=function(h,m,g){var p=m._basePlotModules.length>1;c(h,m,g,{type:"gl3d",attributes:s,handleDefaults:d,fullLayout:m,font:m.font,fullData:g,getDfltFromLayout:function(v){if(!p)return r.validate(h[v],s[v])?h[v]:void 0},autotypenumbersDflt:m.autotypenumbers,paper_bgcolor:m.paper_bgcolor,calendar:m.calendar})}},{"../../../components/color":366,"../../../lib":503,"../../../registry":638,"../../get_data":593,"../../subplot_defaults":632,"./axis_defaults":601,"./layout_attributes":604}],604:[function(e,o,f){var r=e("./axis_attributes"),a=e("../../domain").attributes,l=e("../../../lib/extend").extendFlat,c=e("../../../lib").counterRegex;function i(s,u,d){return{x:{valType:"number",dflt:s,editType:"camera"},y:{valType:"number",dflt:u,editType:"camera"},z:{valType:"number",dflt:d,editType:"camera"},editType:"camera"}}o.exports={_arrayAttrRegexps:[c("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:l(i(0,0,1),{}),center:l(i(0,0,0),{}),eye:l(i(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:a({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:r,yaxis:r,zaxis:r,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",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},{"../../../lib":503,"../../../lib/extend":493,"../../domain":584,"./axis_attributes":600}],605:[function(e,o,f){var r=e("../../../lib/str2rgbarray"),a=["xaxis","yaxis","zaxis"];function l(){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]}l.prototype.merge=function(c){for(var i=0;i<3;++i){var s=c[a[i]];s.visible?(this.enabled[i]=s.showspikes,this.colors[i]=r(s.spikecolor),this.drawSides[i]=s.spikesides,this.lineWidth[i]=s.spikethickness):(this.enabled[i]=!1,this.drawSides[i]=!1)}},o.exports=function(c){var i=new l;return i.merge(c),i}},{"../../../lib/str2rgbarray":528}],606:[function(e,o,f){o.exports=function(i){for(var s=i.axesOptions,u=i.glplot.axesPixels,d=i.fullSceneLayout,h=[[],[],[]],m=0;m<3;++m){var g=d[l[m]];if(g._length=(u[m].hi-u[m].lo)*u[m].pixelsPerDataUnit/i.dataScale[m],Math.abs(g._length)===1/0||isNaN(g._length))h[m]=[];else{g._input_range=g.range.slice(),g.range[0]=u[m].lo/i.dataScale[m],g.range[1]=u[m].hi/i.dataScale[m],g._m=1/(i.dataScale[m]*u[m].pixelsPerDataUnit),g.range[0]===g.range[1]&&(g.range[0]-=1,g.range[1]+=1);var p=g.tickmode;if(g.tickmode==="auto"){g.tickmode="linear";var v=g.nticks||a.constrain(g._length/40,4,9);r.autoTicks(g,Math.abs(g.range[1]-g.range[0])/v)}for(var y=r.calcTicks(g,{msUTC:!0}),x=0;x/g," "));h[m]=y,g.tickmode=p}}for(s.ticks=h,m=0;m<3;++m)for(c[m]=.5*(i.glplot.bounds[0][m]+i.glplot.bounds[1][m]),x=0;x<2;++x)s.bounds[x][m]=i.glplot.bounds[x][m];i.contourLevels=function(w){for(var k=new Array(3),b=0;b<3;++b){for(var T=w[b],_=new Array(T.length),S=0;SL.deltaY?1.1:.9090909090909091,N=E.glplot.getAspectratio();E.glplot.setAspectratio({x:P*N.x,y:P*N.y,z:P*N.z})}z(E)}},!!u&&{passive:!1}),E.glplot.canvas.addEventListener("mousemove",function(){if(E.fullSceneLayout.dragmode!==!1&&E.camera.mouseListener.buttons!==0){var L=R();E.graphDiv.emit("plotly_relayouting",L)}}),E.staticMode||E.glplot.canvas.addEventListener("webglcontextlost",function(L){D&&D.emit&&D.emit("plotly_webglcontextlost",{event:L,layer:E.id})},!1)),E.glplot.oncontextloss=function(){E.recoverContext()},E.glplot.onrender=function(){E.render()},!0},_.render=function(){var E,D=this,O=D.graphDiv,R=D.svgContainer,z=D.container.getBoundingClientRect();O._fullLayout._calcInverseTransform(O);var L=O._fullLayout._invScaleX,P=O._fullLayout._invScaleY,N=z.width*L,B=z.height*P;R.setAttributeNS(null,"viewBox","0 0 "+N+" "+B),R.setAttributeNS(null,"width",N),R.setAttributeNS(null,"height",B),b(D),D.glplot.axes.update(D.axesOptions);for(var G=Object.keys(D.traces),W=null,K=D.glplot.selection,te=0;te")):E.type==="isosurface"||E.type==="volume"?($.valueLabel=g.hoverLabelText(D._mockAxis,D._mockAxis.d2l(K.traceCoordinate[3]),E.valuehoverformat),ee.push("value: "+$.valueLabel),K.textLabel&&ee.push(K.textLabel),re=ee.join("
")):re=K.textLabel;var ie={x:K.traceCoordinate[0],y:K.traceCoordinate[1],z:K.traceCoordinate[2],data:U._input,fullData:U,curveNumber:U.index,pointNumber:q};p.appendArrayPointValue(ie,U,q),E._module.eventData&&(ie=U._module.eventData(ie,K,U,{},q));var ae={points:[ie]};if(D.fullSceneLayout.hovermode){var ue=[];p.loneHover({trace:U,x:(.5+.5*Z[0]/Z[3])*N,y:(.5-.5*Z[1]/Z[3])*B,xLabel:$.xLabel,yLabel:$.yLabel,zLabel:$.zLabel,text:re,name:W.name,color:p.castHoverOption(U,q,"bgcolor")||W.color,borderColor:p.castHoverOption(U,q,"bordercolor"),fontFamily:p.castHoverOption(U,q,"font.family"),fontSize:p.castHoverOption(U,q,"font.size"),fontColor:p.castHoverOption(U,q,"font.color"),nameLength:p.castHoverOption(U,q,"namelength"),textAlign:p.castHoverOption(U,q,"align"),hovertemplate:h.castOption(U,q,"hovertemplate"),hovertemplateLabels:h.extendFlat({},ie,$),eventData:[ie]},{container:R,gd:O,inOut_bbox:ue}),ie.bbox=ue[0]}K.buttons&&K.distance<5?O.emit("plotly_click",ae):O.emit("plotly_hover",ae),this.oldEventData=ae}else p.loneUnhover(R),this.oldEventData&&O.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;D.drawAnnotations(D)},_.recoverContext=function(){var E=this;E.glplot.dispose();var D=function(){E.glplot.gl.isContextLost()?requestAnimationFrame(D):E.initializeGLPlot()?E.plot.apply(E,E.plotArgs):h.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(D)};var A=["xaxis","yaxis","zaxis"];function M(E,D,O){for(var R=E.fullSceneLayout,z=0;z<3;z++){var L=A[z],P=L.charAt(0),N=R[L],B=D[P],G=D[P+"calendar"],W=D["_"+P+"length"];if(h.isArrayOrTypedArray(B))for(var K,te=0;te<(W||B.length);te++)if(h.isArrayOrTypedArray(B[te]))for(var Y=0;Yre[1][L])re[0][L]=-1,re[1][L]=1;else{var le=re[1][L]-re[0][L];re[0][L]-=le/32,re[1][L]+=le/32}if(N.autorange==="reversed"){var ge=re[0][L];re[0][L]=re[1][L],re[1][L]=ge}}else{var fe=N.range;re[0][L]=N.r2l(fe[0]),re[1][L]=N.r2l(fe[1])}re[0][L]===re[1][L]&&(re[0][L]-=1,re[1][L]+=1),U[L]=re[1][L]-re[0][L],this.glplot.setBounds(L,{min:re[0][L]*te[L],max:re[1][L]*te[L]})}var me=G.aspectmode;if(me==="cube")Z=[1,1,1];else if(me==="manual"){var _e=G.aspectratio;Z=[_e.x,_e.y,_e.z]}else{if(me!=="auto"&&me!=="data")throw new Error("scene.js aspectRatio was not one of the enumerated types");var we=[1,1,1];for(L=0;L<3;++L){var Te=q[B=(N=G[A[L]]).type];we[L]=Math.pow(Te.acc,1/Te.count)/te[L]}Z=me==="data"||Math.max.apply(null,we)/Math.min.apply(null,we)<=4?we:[1,1,1]}G.aspectratio.x=W.aspectratio.x=Z[0],G.aspectratio.y=W.aspectratio.y=Z[1],G.aspectratio.z=W.aspectratio.z=Z[2],this.glplot.setAspectratio(G.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:G.aspectratio.x,y:G.aspectratio.y,z:G.aspectratio.z}),this.viewInitial.aspectmode||(this.viewInitial.aspectmode=G.aspectmode);var Oe=G.domain||null,de=D._size||null;if(Oe&&de){var ye=this.container.style;ye.position="absolute",ye.left=de.l+Oe.x[0]*de.w+"px",ye.top=de.t+(1-Oe.y[1])*de.h+"px",ye.width=de.w*(Oe.x[1]-Oe.x[0])+"px",ye.height=de.h*(Oe.y[1]-Oe.y[0])+"px"}this.glplot.redraw()}},_.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener("wheel",this.camera.wheelListener),this.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},_.getCamera=function(){var E;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(E=this.camera).up[0],y:E.up[1],z:E.up[2]},center:{x:E.center[0],y:E.center[1],z:E.center[2]},eye:{x:E.eye[0],y:E.eye[1],z:E.eye[2]},projection:{type:E._ortho===!0?"orthographic":"perspective"}}},_.setViewport=function(E){var D,O=E.camera;this.camera.lookAt.apply(this,[[(D=O).eye.x,D.eye.y,D.eye.z],[D.center.x,D.center.y,D.center.z],[D.up.x,D.up.y,D.up.z]]),this.glplot.setAspectratio(E.aspectratio),O.projection.type==="orthographic"!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},_.isCameraChanged=function(E){var D=this.getCamera(),O=h.nestedProperty(E,this.id+".camera").get();function R(N,B,G,W){var K=["up","center","eye"],te=["x","y","z"];return B[K[G]]&&N[K[G]][te[W]]===B[K[G]][te[W]]}var z=!1;if(O===void 0)z=!0;else{for(var L=0;L<3;L++)for(var P=0;P<3;P++)if(!R(D,O,L,P)){z=!0;break}(!O.projection||D.projection&&D.projection.type!==O.projection.type)&&(z=!0)}return z},_.isAspectChanged=function(E){var D=this.glplot.getAspectratio(),O=h.nestedProperty(E,this.id+".aspectratio").get();return O===void 0||O.x!==D.x||O.y!==D.y||O.z!==D.z},_.saveLayout=function(E){var D,O,R,z,L,P,N=this.fullLayout,B=this.isCameraChanged(E),G=this.isAspectChanged(E),W=B||G;if(W){var K={};B&&(D=this.getCamera(),R=(O=h.nestedProperty(E,this.id+".camera")).get(),K[this.id+".camera"]=R),G&&(z=this.glplot.getAspectratio(),P=(L=h.nestedProperty(E,this.id+".aspectratio")).get(),K[this.id+".aspectratio"]=P),d.call("_storeDirectGUIEdit",E,N._preGUI,K),B&&(O.set(D),h.nestedProperty(N,this.id+".camera").set(D)),G&&(L.set(z),h.nestedProperty(N,this.id+".aspectratio").set(z),this.glplot.redraw())}return W},_.updateFx=function(E,D){var O=this.camera;if(O)if(E==="orbit")O.mode="orbit",O.keyBindingMode="rotate";else if(E==="turntable"){O.up=[0,0,1],O.mode="turntable",O.keyBindingMode="rotate";var R=this.graphDiv,z=R._fullLayout,L=this.fullSceneLayout.camera,P=L.up.x,N=L.up.y,B=L.up.z;if(B/Math.sqrt(P*P+N*N+B*B)<.999){var G=this.id+".camera.up",W={x:0,y:0,z:1},K={};K[G]=W;var te=R.layout;d.call("_storeDirectGUIEdit",te,z._preGUI,K),L.up=W,h.nestedProperty(te,G).set(W)}}else O.keyBindingMode=E;this.fullSceneLayout.hovermode=D},_.toImage=function(E){E||(E="png"),this.staticMode&&this.container.appendChild(r),this.glplot.redraw();var D=this.glplot.gl,O=D.drawingBufferWidth,R=D.drawingBufferHeight;D.bindFramebuffer(D.FRAMEBUFFER,null);var z=new Uint8Array(O*R*4);D.readPixels(0,0,O,R,D.RGBA,D.UNSIGNED_BYTE,z),function(G,W,K){for(var te=0,Y=K-1;te0)for(var U=255/re,q=0;q<3;++q)G[Z+q]=Math.min(U*G[Z+q],255)}}(z,O,R);var L=document.createElement("canvas");L.width=O,L.height=R;var P,N=L.getContext("2d"),B=N.createImageData(O,R);switch(B.data.set(z),N.putImageData(B,0,0),E){case"jpeg":P=L.toDataURL("image/jpeg");break;case"webp":P=L.toDataURL("image/webp");break;default:P=L.toDataURL("image/png")}return this.staticMode&&this.container.removeChild(r),P},_.setConvert=function(){for(var E=0;E<3;E++){var D=this.fullSceneLayout[A[E]];g.setConvert(D,this.fullLayout),D.setScale=h.noop}},_.make4thDimension=function(){var E=this.graphDiv._fullLayout;this._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},g.setConvert(this._mockAxis,E)},o.exports=T},{"../../../stackgl_modules":1124,"../../components/fx":406,"../../lib":503,"../../lib/show_no_webgl_msg":525,"../../lib/str2rgbarray":528,"../../plots/cartesian/axes":554,"../../registry":638,"./layout/convert":602,"./layout/spikes":605,"./layout/tick_marks":606,"./project":607,"has-passive-events":229,"webgl-context":331}],609:[function(e,o,f){o.exports=function(r,a,l,c){c=c||r.length;for(var i=new Array(c),s=0;sOpenStreetMap contributors',l=['\xA9 Carto',a].join(" "),c=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),i={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:a,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}]},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}]},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:l,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}]},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:l,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}]},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:c,tiles:["https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}]},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:c,tiles:["https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}]},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),tiles:["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}]}},s=r(i);o.exports={requiredVersion:"1.10.1",styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:i,styleValuesNonMapbox:s,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install mapbox-gl@1.10.1."].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:",s.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')`}}},{"../../lib/sort_object_keys":526}],612:[function(e,o,f){var r=e("../../lib");o.exports=function(a,l){var c=a.split(" "),i=c[0],s=c[1],u=r.isArrayOrTypedArray(l)?r.mean(l):l,d=.5+u/100,h=1.5+u/100,m=["",""],g=[0,0];switch(i){case"top":m[0]="top",g[1]=-h;break;case"bottom":m[0]="bottom",g[1]=h}switch(s){case"left":m[1]="right",g[0]=-d;break;case"right":m[1]="left",g[0]=d}return{anchor:m[0]&&m[1]?m.join("-"):m[0]?m[0]:m[1]?m[1]:"center",offset:g}}},{"../../lib":503}],613:[function(e,o,f){var r=e("mapbox-gl/dist/mapbox-gl-unminified"),a=e("../../lib"),l=a.strTranslate,c=a.strScale,i=e("../../plots/get_data").getSubplotCalcData,s=e("../../constants/xmlns_namespaces"),u=e("@plotly/d3"),d=e("../../components/drawing"),h=e("../../lib/svg_text_utils"),m=e("./mapbox"),g=f.constants=e("./constants");function p(v){return typeof v=="string"&&(g.styleValuesMapbox.indexOf(v)!==-1||v.indexOf("mapbox://")===0)}f.name="mapbox",f.attr="subplot",f.idRoot="mapbox",f.idRegex=f.attrRegex=a.counterRegex("mapbox"),f.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},f.layoutAttributes=e("./layout_attributes"),f.supplyLayoutDefaults=e("./layout_defaults"),f.plot=function(v){var y=v._fullLayout,x=v.calcdata,w=y._subplots.mapbox;if(r.version!==g.requiredVersion)throw new Error(g.wrongVersionErrorMsg);var k=function(M,E){var D=M._fullLayout;if(M._context.mapboxAccessToken==="")return"";for(var O=[],R=[],z=!1,L=!1,P=0;P1&&a.warn(g.multipleTokensErrorMsg),O[0]):(R.length&&a.log(["Listed mapbox access token(s)",R.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(v,w);r.accessToken=k;for(var b=0;bR/2){var z=M.split("|").join("
");D.text(z).attr("data-unformatted",z).call(h.convertToTspans,v),O=d.bBox(D.node())}D.attr("transform",l(-3,8-O.height)),E.insert("rect",".static-attribution").attr({x:-O.width-6,y:-O.height-3,width:O.width+6,height:O.height+3,fill:"rgba(255, 255, 255, 0.75)"});var L=1;O.width+6>R&&(L=R/(O.width+6));var P=[w.l+w.w*T.x[1],w.t+w.h*(1-T.y[0])];E.attr("transform",l(P[0],P[1])+c(L))}},f.updateFx=function(v){for(var y=v._fullLayout,x=y._subplots.mapbox,w=0;w0){for(var g=0;g0}function d(h){var m={},g={};switch(h.type){case"circle":r.extendFlat(g,{"circle-radius":h.circle.radius,"circle-color":h.color,"circle-opacity":h.opacity});break;case"line":r.extendFlat(g,{"line-width":h.line.width,"line-color":h.color,"line-opacity":h.opacity,"line-dasharray":h.line.dash});break;case"fill":r.extendFlat(g,{"fill-color":h.color,"fill-outline-color":h.fill.outlinecolor,"fill-opacity":h.opacity});break;case"symbol":var p=h.symbol,v=l(p.textposition,p.iconsize);r.extendFlat(m,{"icon-image":p.icon+"-15","icon-size":p.iconsize/10,"text-field":p.text,"text-size":p.textfont.size,"text-anchor":v.anchor,"text-offset":v.offset,"symbol-placement":p.placement}),r.extendFlat(g,{"icon-color":h.color,"text-color":p.textfont.color,"text-opacity":h.opacity});break;case"raster":r.extendFlat(g,{"raster-fade-duration":0,"raster-opacity":h.opacity})}return{layout:m,paint:g}}s.update=function(h){this.visible?this.needsNewImage(h)?this.updateImage(h):this.needsNewSource(h)?(this.removeLayer(),this.updateSource(h),this.updateLayer(h)):this.needsNewLayer(h)?this.updateLayer(h):this.updateStyle(h):(this.updateSource(h),this.updateLayer(h)),this.visible=u(h)},s.needsNewImage=function(h){return this.subplot.map.getSource(this.idSource)&&this.sourceType==="image"&&h.sourcetype==="image"&&(this.source!==h.source||JSON.stringify(this.coordinates)!==JSON.stringify(h.coordinates))},s.needsNewSource=function(h){return this.sourceType!==h.sourcetype||JSON.stringify(this.source)!==JSON.stringify(h.source)||this.layerType!==h.type},s.needsNewLayer=function(h){return this.layerType!==h.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},s.updateImage=function(h){this.subplot.map.getSource(this.idSource).updateImage({url:h.source,coordinates:h.coordinates});var m=this.findFollowingMapboxLayerId(this.lookupBelow());m!==null&&this.subplot.map.moveLayer(this.idLayer,m)},s.updateSource=function(h){var m=this.subplot.map;if(m.getSource(this.idSource)&&m.removeSource(this.idSource),this.sourceType=h.sourcetype,this.source=h.source,u(h)){var g=function(p){var v,y=p.sourcetype,x=p.source,w={type:y};return y==="geojson"?v="data":y==="vector"?v=typeof x=="string"?"url":"tiles":y==="raster"?(v="tiles",w.tileSize=256):y==="image"&&(v="url",w.coordinates=p.coordinates),w[v]=x,p.sourceattribution&&(w.attribution=a(p.sourceattribution)),w}(h);m.addSource(this.idSource,g)}},s.findFollowingMapboxLayerId=function(h){if(h==="traces")for(var m=this.subplot.getMapLayers(),g=0;g1)for(O=0;O-1&&x(B.originalEvent,R,[O.xaxis],[O.yaxis],O.id,N),G.indexOf("event")>-1&&u.click(R,B.originalEvent)}}},T.updateFx=function(E){var D=this,O=D.map,R=D.gd;if(!D.isStatic){var z,L=E.dragmode;z=h(L)?function(B,G){(B.range={})[D.id]=[N([G.xmin,G.ymin]),N([G.xmax,G.ymax])]}:function(B,G,W){(B.lassoPoints={})[D.id]=W.filtered.map(N)};var P=D.dragOptions;D.dragOptions=a.extendDeep(P||{},{dragmode:E.dragmode,element:D.div,gd:R,plotinfo:{id:D.id,domain:E[D.id].domain,xaxis:D.xaxis,yaxis:D.yaxis,fillRangeItems:z},xaxes:[D.xaxis],yaxes:[D.yaxis],subplot:D.id}),O.off("click",D.onClickInPanHandler),g(L)||m(L)?(O.dragPan.disable(),O.on("zoomstart",D.clearSelect),D.dragOptions.prepFn=function(B,G,W){p(B,G,W,D.dragOptions,L)},s.init(D.dragOptions)):(O.dragPan.enable(),O.off("zoomstart",D.clearSelect),D.div.onmousedown=null,D.onClickInPanHandler=D.onClickInPanFn(D.dragOptions),O.on("click",D.onClickInPanHandler))}function N(B){var G=D.map.unproject(B);return[G.lng,G.lat]}},T.updateFramework=function(E){var D=E[this.id].domain,O=E._size,R=this.div.style;R.width=O.w*(D.x[1]-D.x[0])+"px",R.height=O.h*(D.y[1]-D.y[0])+"px",R.left=O.l+D.x[0]*O.w+"px",R.top=O.t+(1-D.y[1])*O.h+"px",this.xaxis._offset=O.l+D.x[0]*O.w,this.xaxis._length=O.w*(D.x[1]-D.x[0]),this.yaxis._offset=O.t+(1-D.y[1])*O.h,this.yaxis._length=O.h*(D.y[1]-D.y[0])},T.updateLayers=function(E){var D,O=E[this.id].layers,R=this.layerList;if(O.length!==R.length){for(D=0;D=K.width-20?(Z["text-anchor"]="start",Z.x=5):(Z["text-anchor"]="end",Z.x=K._paper.attr("width")-7),te.attr(Z);var re=te.select(".js-link-to-tool"),U=te.select(".js-link-spacer"),q=te.select(".js-sourcelinks");W._context.showSources&&W._context.showSources(W),W._context.showLink&&function($,ne){ne.text("");var H=ne.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text($._context.linkText+" "+String.fromCharCode(187));if($._context.sendData)H.on("click",function(){b.sendDataToCloud($)});else{var Q=window.location.pathname.split("/"),ee=window.location.search;H.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+Q[2].split(".")[0]+"/"+Q[1]+ee})}}(W,re),U.text(re.text()&&q.text()?" - ":"")}},b.sendDataToCloud=function(W){var K=(window.PLOTLYENV||{}).BASE_URL||W._context.plotlyServerURL;if(K){W.emit("plotly_beforeexport");var te=r.select(W).append("div").attr("id","hiddenform").style("display","none"),Y=te.append("form").attr({action:K+"/external",method:"post",target:"_blank"});return Y.append("input").attr({type:"text",name:"data"}).node().value=b.graphJson(W,!1,"keepdata"),Y.node().submit(),te.remove(),W.emit("plotly_afterexport"),!1}};var S=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];function M(W,K){var te=W._context.locale;te||(te="en-US");var Y=!1,Z={};function re(Q){for(var ee=!0,ie=0;ie1&&Te.length>1){for(i.getComponentMethod("grid","sizeDefaults")(U,re),Z=0;Z15&&Te.length>15&&re.shapes.length===0&&re.images.length===0,b.linkSubplots($,re,q,Y),b.cleanPlot($,re,q,Y);var ke=!(!Y._has||!Y._has("gl2d")),Ee=!(!re._has||!re._has("gl2d")),ze=!(!Y._has||!Y._has("cartesian"))||ke,Fe=!(!re._has||!re._has("cartesian"))||Ee;ze&&!Fe?Y._bgLayer.remove():Fe&&!ze&&(re._shouldCreateBgLayer=!0),Y._zoomlayer&&!W._dragging&&p({_fullLayout:Y}),function(qe,We){var Ye,nt=[];We.meta&&(Ye=We._meta={meta:We.meta,layout:{meta:We.meta}});for(var ft=0;ft0){var ne=1-2*U;Y=Math.round(ne*Y),Z=Math.round(ne*Z)}}var H=b.layoutAttributes.width.min,Q=b.layoutAttributes.height.min;Y1,ie=!K.height&&Math.abs(te.height-Z)>1;(ie||ee)&&(ee&&(te.width=Y),ie&&(te.height=Z)),W._initialAutoSize||(W._initialAutoSize={width:Y,height:Z}),b.sanitizeMargins(te)},b.supplyLayoutModuleDefaults=function(W,K,te,Y){var Z,re,U,q=i.componentsRegistry,$=K._basePlotModules,ne=i.subplotsRegistry.cartesian;for(Z in q)(U=q[Z]).includeBasePlot&&U.includeBasePlot(W,K);for(var H in $.length||$.push(ne),K._has("cartesian")&&(i.getComponentMethod("grid","contentDefaults")(W,K),ne.finalizeSubplots(W,K)),K._subplots)K._subplots[H].sort(d.subplotSort);for(re=0;re<$.length;re++)(U=$[re]).supplyLayoutDefaults&&U.supplyLayoutDefaults(W,K,te);var Q=K._modules;for(re=0;re1&&(te.l/=ae,te.r/=ae)}if(H){var ue=(te.t+te.b)/H;ue>1&&(te.t/=ue,te.b/=ue)}var le=te.xl!==void 0?te.xl:te.x,ge=te.xr!==void 0?te.xr:te.x,fe=te.yt!==void 0?te.yt:te.y,me=te.yb!==void 0?te.yb:te.y;Q[K]={l:{val:le,size:te.l+ie},r:{val:ge,size:te.r+ie},b:{val:me,size:te.b+ie},t:{val:fe,size:te.t+ie}},ee[K]=1}else delete Q[K],delete ee[K];if(!Y._replotting)return b.doAutoMargin(W)}},b.doAutoMargin=function(W){var K=W._fullLayout,te=K.width,Y=K.height;K._size||(K._size={}),z(K);var Z=K._size,re=K.margin,U=d.extendFlat({},Z),q=re.l,$=re.r,ne=re.t,H=re.b,Q=K._pushmargin,ee=K._pushmarginIds;if(K.margin.autoexpand!==!1){for(var ie in Q)ee[ie]||delete Q[ie];for(var ae in Q.base={l:{val:0,size:q},r:{val:1,size:$},t:{val:1,size:ne},b:{val:0,size:H}},Q){var ue=Q[ae].l||{},le=Q[ae].b||{},ge=ue.val,fe=ue.size,me=le.val,_e=le.size;for(var we in Q){if(c(fe)&&Q[we].r){var Te=Q[we].r.val,Oe=Q[we].r.size;if(Te>ge){var de=(fe*Te+(Oe-te)*ge)/(Te-ge),ye=(Oe*(1-ge)+(fe-te)*(1-Te))/(Te-ge);de+ye>q+$&&(q=de,$=ye)}}if(c(_e)&&Q[we].t){var Me=Q[we].t.val,ke=Q[we].t.size;if(Me>me){var Ee=(_e*Me+(ke-Y)*me)/(Me-me),ze=(ke*(1-me)+(_e-Y)*(1-Me))/(Me-me);Ee+ze>H+ne&&(H=Ee,ne=ze)}}}}}var Fe=d.constrain(te-re.l-re.r,2,64),Ve=d.constrain(Y-re.t-re.b,2,64),Ke=Math.max(0,te-Fe),Re=Math.max(0,Y-Ve);if(Ke){var qe=(q+$)/Ke;qe>1&&(q/=qe,$/=qe)}if(Re){var We=(H+ne)/Re;We>1&&(H/=We,ne/=We)}if(Z.l=Math.round(q),Z.r=Math.round($),Z.t=Math.round(ne),Z.b=Math.round(H),Z.p=Math.round(re.pad),Z.w=Math.round(te)-Z.l-Z.r,Z.h=Math.round(Y)-Z.t-Z.b,!K._replotting&&b.didMarginChange(U,Z)){"_redrawFromAutoMarginCount"in K?K._redrawFromAutoMarginCount++:K._redrawFromAutoMarginCount=1;var Ye=3*(1+Object.keys(ee).length);if(K._redrawFromAutoMarginCount0&&(W._transitioningWithDuration=!0),W._transitionData._interruptCallbacks.push(function(){Y=!0}),te.redraw&&W._transitionData._interruptCallbacks.push(function(){return i.call("redraw",W)}),W._transitionData._interruptCallbacks.push(function(){W.emit("plotly_transitioninterrupted",[])});var q=0,$=0;function ne(){return q++,function(){$++,Y||$!==q||function(H){!W._transitionData||(function(Q){if(Q)for(;Q.length;)Q.shift()}(W._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(te.redraw)return i.call("redraw",W)}).then(function(){W._transitioning=!1,W._transitioningWithDuration=!1,W.emit("plotly_transitioned",[])}).then(H))}(U)}}te.runFn(ne),setTimeout(ne())})}],re=d.syncOrAsync(Z,W);return re&&re.then||(re=Promise.resolve()),re.then(function(){return W})}b.didMarginChange=function(W,K){for(var te=0;te1)return!0}return!1},b.graphJson=function(W,K,te,Y,Z,re){(Z&&K&&!W._fullData||Z&&!K&&!W._fullLayout)&&b.supplyDefaults(W);var U=Z?W._fullData:W.data,q=Z?W._fullLayout:W.layout,$=(W._transitionData||{})._frames;function ne(ee,ie){if(typeof ee=="function")return ie?"_function_":null;if(d.isPlainObject(ee)){var ae,ue={};return Object.keys(ee).sort().forEach(function(le){if(["_","["].indexOf(le.charAt(0))===-1)if(typeof ee[le]!="function"){if(te==="keepdata"){if(le.substr(le.length-3)==="src")return}else if(te==="keepstream"){if(typeof(ae=ee[le+"src"])=="string"&&ae.indexOf(":")>0&&!d.isPlainObject(ee.stream))return}else if(te!=="keepall"&&typeof(ae=ee[le+"src"])=="string"&&ae.indexOf(":")>0)return;ue[le]=ne(ee[le],ie)}else ie&&(ue[le]="_function")}),ue}return Array.isArray(ee)?ee.map(function(le){return ne(le,ie)}):d.isTypedArray(ee)?d.simpleMap(ee,d.identity):d.isJSDate(ee)?d.ms2DateTimeLocal(+ee):ee}var H={data:(U||[]).map(function(ee){var ie=ne(ee);return K&&delete ie.fit,ie})};if(!K&&(H.layout=ne(q),Z)){var Q=q._size;H.layout.computed={margin:{b:Q.b,l:Q.l,r:Q.r,t:Q.t}}}return $&&(H.frames=ne($)),re&&(H.config=ne(W._context,!0)),Y==="object"?H:JSON.stringify(H)},b.modifyFrames=function(W,K){var te,Y,Z,re=W._transitionData._frames,U=W._transitionData._frameHash;for(te=0;te=0;re--)if(we[re].enabled){te._indexToPoints=we[re]._indexToPoints;break}Y&&Y.calc&&(_e=Y.calc(W,te))}Array.isArray(_e)&&_e[0]||(_e=[{x:m,y:m}]),_e[0].t||(_e[0].t={}),_e[0].trace=te,ne[fe]=_e}}for(B(U,q,$),Z=0;Z1e-10?g:0}function m(g,p,v){p=p||0,v=v||0;for(var y=g.length,x=new Array(y),w=0;w0?w:1/0}),y=r.mod(v+1,p.length);return[p[v],p[y]]},findIntersectionXY:u,findXYatLength:function(g,p,v,y){var x=-p*v,w=p*p+1,k=2*(p*x-v),b=x*x+v*v-g*g,T=Math.sqrt(k*k-4*w*b),_=(-k+T)/(2*w),S=(-k-T)/(2*w);return[[_,p*_+x+y],[S,p*S+x+y]]},clampTiny:h,pathPolygon:function(g,p,v,y,x,w){return"M"+m(d(g,p,v,y),x,w).join("L")},pathPolygonAnnulus:function(g,p,v,y,x,w,k){var b,T;g=90||Jt>90&&Be>=450?1:Tt<=0&&Pe<=0?0:Math.max(Tt,Pe),Pt=Jt<=180&&Be>=180||Jt>180&&Be>=540?-1:Ge>=0&&dt>=0?0:Math.min(Ge,dt),At=Jt<=270&&Be>=270||Jt>270&&Be>=630?-1:Tt>=0&&Pe>=0?0:Math.min(Tt,Pe),at=Be>=360?1:Ge<=0&&dt<=0?0:Math.max(Ge,dt),[Pt,At,at,et]}(ge),de=Oe[2]-Oe[0],ye=Oe[3]-Oe[1],Me=le/ue,ke=Math.abs(ye/de);Me>ke?(fe=ue,Te=(le-(me=ue*ke))/H.h/2,_e=[ie[0],ie[1]],we=[ae[0]+Te,ae[1]-Te]):(me=le,Te=(ue-(fe=le/ke))/H.w/2,_e=[ie[0]+Te,ie[1]-Te],we=[ae[0],ae[1]]),this.xLength2=fe,this.yLength2=me,this.xDomain2=_e,this.yDomain2=we;var Ee,ze=this.xOffset2=H.l+H.w*_e[0],Fe=this.yOffset2=H.t+H.h*(1-we[1]),Ve=this.radius=fe/de,Ke=this.innerRadius=this.getHole($)*Ve,Re=this.cx=ze-Ve*Oe[0],qe=this.cy=Fe+Ve*Oe[3],We=this.cxx=Re-ze,Ye=this.cyy=qe-Fe,nt=Q.side;nt==="counterclockwise"?(Ee=nt,nt="top"):nt==="clockwise"&&(Ee=nt,nt="bottom"),this.radialAxis=this.mockAxis(q,$,Q,{_id:"x",side:nt,_trueSide:Ee,domain:[Ke/H.w,Ve/H.w]}),this.angularAxis=this.mockAxis(q,$,ee,{side:"right",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(q,$),this.updateAngularAxis(q,$),this.updateRadialAxis(q,$),this.updateRadialAxisTitle(q,$),this.xaxis=this.mockCartesianAxis(q,$,{_id:"x",domain:_e}),this.yaxis=this.mockCartesianAxis(q,$,{_id:"y",domain:we});var ft=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",ft).attr("transform",s(We,Ye)),ne.frontplot.attr("transform",s(ze,Fe)).call(d.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),ne.bg.attr("d",ft).attr("transform",s(Re,qe)).call(u.fill,$.bgcolor)},Y.mockAxis=function(q,$,ne,H){var Q=c.extendFlat({},ne,H);return p(Q,$,q),Q},Y.mockCartesianAxis=function(q,$,ne){var H=this,Q=H.isSmith,ee=ne._id,ie=c.extendFlat({type:"linear"},ne);g(ie,q);var ae={x:[0,2],y:[1,3]};return ie.setRange=function(){var ue=H.sectorBBox,le=ae[ee],ge=H.radialAxis._rl,fe=(ge[1]-ge[0])/(1-H.getHole($));ie.range=[ue[le[0]]*fe,ue[le[1]]*fe]},ie.isPtWithinRange=ee!=="x"||Q?function(){return!0}:function(ue){return H.isPtInside(ue)},ie.setRange(),ie.setScale(),ie},Y.doAutoRange=function(q,$){var ne=this.gd,H=this.radialAxis,Q=this.getRadial($);v(ne,H);var ee=H.range;Q.range=ee.slice(),Q._input.range=ee.slice(),H._rl=[H.r2l(ee[0],null,"gregorian"),H.r2l(ee[1],null,"gregorian")]},Y.updateRadialAxis=function(q,$){var ne=this,H=ne.gd,Q=ne.layers,ee=ne.radius,ie=ne.innerRadius,ae=ne.cx,ue=ne.cy,le=ne.getRadial($),ge=G(ne.getSector($)[0],360),fe=ne.radialAxis,me=ie90&&ge<=270&&(fe.tickangle=180);var we=_e?function(Ve){var Ke=N(ne,z([Ve.x,0]));return s(Ke[0]-ae,Ke[1]-ue)}:function(Ve){return s(fe.l2p(Ve.x)+ie,0)},Te=_e?function(Ve){return P(ne,Ve.x,-1/0,1/0)}:function(Ve){return ne.pathArc(fe.r2p(Ve.x)+ie)},Oe=Z(le);if(ne.radialTickLayout!==Oe&&(Q["radial-axis"].selectAll(".xtick").remove(),ne.radialTickLayout=Oe),me){fe.setScale();var de=0,ye=_e?(fe.tickvals||[]).filter(function(Ve){return Ve>=0}).map(function(Ve){return m.tickText(fe,Ve,!0,!1)}):m.calcTicks(fe),Me=_e?ye:m.clipEnds(fe,ye),ke=m.getTickSigns(fe)[2];_e&&((fe.ticks==="top"&&fe.side==="bottom"||fe.ticks==="bottom"&&fe.side==="top")&&(ke=-ke),fe.ticks==="top"&&fe.side==="top"&&(de=-fe.ticklen),fe.ticks==="bottom"&&fe.side==="bottom"&&(de=fe.ticklen)),m.drawTicks(H,fe,{vals:ye,layer:Q["radial-axis"],path:m.makeTickPath(fe,0,ke),transFn:we,crisp:!1}),m.drawGrid(H,fe,{vals:Me,layer:Q["radial-grid"],path:Te,transFn:c.noop,crisp:!1}),m.drawLabels(H,fe,{vals:ye,layer:Q["radial-axis"],transFn:we,labelFns:m.makeLabelFns(fe,de)})}var Ee=ne.radialAxisAngle=ne.vangles?K(re(W(le.angle),ne.vangles)):le.angle,ze=s(ae,ue),Fe=ze+i(-Ee);U(Q["radial-axis"],me&&(le.showticklabels||le.ticks),{transform:Fe}),U(Q["radial-grid"],me&&le.showgrid,{transform:_e?"":ze}),U(Q["radial-line"].select("line"),me&&le.showline,{x1:_e?-ee:ie,y1:0,x2:ee,y2:0,transform:Fe}).attr("stroke-width",le.linewidth).call(u.stroke,le.linecolor)},Y.updateRadialAxisTitle=function(q,$,ne){if(!this.isSmith){var H=this.gd,Q=this.radius,ee=this.cx,ie=this.cy,ae=this.getRadial($),ue=this.id+"title",le=0;if(ae.title){var ge=d.bBox(this.layers["radial-axis"].node()).height,fe=ae.title.font.size,me=ae.side;le=me==="top"?fe:me==="counterclockwise"?-(ge+.4*fe):ge+.8*fe}var _e=ne!==void 0?ne:this.radialAxisAngle,we=W(_e),Te=Math.cos(we),Oe=Math.sin(we),de=ee+Q/2*Te+le*Oe,ye=ie-Q/2*Oe+le*Te;this.layers["radial-axis-title"]=k.draw(H,ue,{propContainer:ae,propName:this.id+".radialaxis.title",placeholder:B(H,"Click to enter radial axis title"),attributes:{x:de,y:ye,"text-anchor":"middle"},transform:{rotate:-_e}})}},Y.updateAngularAxis=function(q,$){var ne=this,H=ne.gd,Q=ne.layers,ee=ne.radius,ie=ne.innerRadius,ae=ne.cx,ue=ne.cy,le=ne.getAngular($),ge=ne.angularAxis,fe=ne.isSmith;fe||(ne.fillViewInitialKey("angularaxis.rotation",le.rotation),ge.setGeometry(),ge.setScale());var me=fe?function(Ve){var Ke=N(ne,z([0,Ve.x]));return Math.atan2(Ke[0]-ae,Ke[1]-ue)-Math.PI/2}:function(Ve){return ge.t2g(Ve.x)};ge.type==="linear"&&ge.thetaunit==="radians"&&(ge.tick0=K(ge.tick0),ge.dtick=K(ge.dtick));var _e=function(Ve){return s(ae+ee*Math.cos(Ve),ue-ee*Math.sin(Ve))},we=fe?function(Ve){var Ke=N(ne,z([0,Ve.x]));return s(Ke[0],Ke[1])}:function(Ve){return _e(me(Ve))},Te=fe?function(Ve){var Ke=N(ne,z([0,Ve.x])),Re=Math.atan2(Ke[0]-ae,Ke[1]-ue)-Math.PI/2;return s(Ke[0],Ke[1])+i(-K(Re))}:function(Ve){var Ke=me(Ve);return _e(Ke)+i(-K(Ke))},Oe=fe?function(Ve){return L(ne,Ve.x,0,1/0)}:function(Ve){var Ke=me(Ve),Re=Math.cos(Ke),qe=Math.sin(Ke);return"M"+[ae+ie*Re,ue-ie*qe]+"L"+[ae+ee*Re,ue-ee*qe]},de=m.makeLabelFns(ge,0).labelStandoff,ye={xFn:function(Ve){var Ke=me(Ve);return Math.cos(Ke)*de},yFn:function(Ve){var Ke=me(Ve),Re=Math.sin(Ke)>0?.2:1;return-Math.sin(Ke)*(de+Ve.fontSize*Re)+Math.abs(Math.cos(Ke))*(Ve.fontSize*E)},anchorFn:function(Ve){var Ke=me(Ve),Re=Math.cos(Ke);return Math.abs(Re)<.1?"middle":Re>0?"start":"end"},heightFn:function(Ve,Ke,Re){var qe=me(Ve);return-.5*(1+Math.sin(qe))*Re}},Me=Z(le);ne.angularTickLayout!==Me&&(Q["angular-axis"].selectAll("."+ge._id+"tick").remove(),ne.angularTickLayout=Me);var ke,Ee=fe?[1/0].concat(ge.tickvals||[]).map(function(Ve){return m.tickText(ge,Ve,!0,!1)}):m.calcTicks(ge);if(fe&&(Ee[0].text="\u221E",Ee[0].fontSize*=1.75),$.gridshape==="linear"?(ke=Ee.map(me),c.angleDelta(ke[0],ke[1])<0&&(ke=ke.slice().reverse())):ke=null,ne.vangles=ke,ge.type==="category"&&(Ee=Ee.filter(function(Ve){return c.isAngleInsideSector(me(Ve),ne.sectorInRad)})),ge.visible){var ze=ge.ticks==="inside"?-1:1,Fe=(ge.linewidth||1)/2;m.drawTicks(H,ge,{vals:Ee,layer:Q["angular-axis"],path:"M"+ze*Fe+",0h"+ze*ge.ticklen,transFn:Te,crisp:!1}),m.drawGrid(H,ge,{vals:Ee,layer:Q["angular-grid"],path:Oe,transFn:c.noop,crisp:!1}),m.drawLabels(H,ge,{vals:Ee,layer:Q["angular-axis"],repositionOnUpdate:!0,transFn:we,labelFns:ye})}U(Q["angular-line"].select("path"),le.showline,{d:ne.pathSubplot(),transform:s(ae,ue)}).attr("stroke-width",le.linewidth).call(u.stroke,le.linecolor)},Y.updateFx=function(q,$){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(q),this.updateRadialDrag(q,$,0),this.updateRadialDrag(q,$,1)),this.updateHoverAndMainDrag(q))},Y.updateHoverAndMainDrag=function(q){var $,ne,H=this,Q=H.isSmith,ee=H.gd,ie=H.layers,ae=q._zoomlayer,ue=D.MINZOOM,le=D.OFFEDGE,ge=H.radius,fe=H.innerRadius,me=H.cx,_e=H.cy,we=H.cxx,Te=H.cyy,Oe=H.sectorInRad,de=H.vangles,ye=H.radialAxis,Me=O.clampTiny,ke=O.findXYatLength,Ee=O.findEnclosingVertexAngles,ze=D.cornerHalfWidth,Fe=D.cornerLen/2,Ve=y.makeDragger(ie,"path","maindrag","crosshair");r.select(Ve).attr("d",H.pathSubplot()).attr("transform",s(me,_e)),Ve.onmousemove=function(rt){w.hover(ee,rt,H.id),ee._fullLayout._lasthover=Ve,ee._fullLayout._hoversubplot=H.id},Ve.onmouseout=function(rt){ee._dragging||x.unhover(ee,rt)};var Ke,Re,qe,We,Ye,nt,ft,vt,Pt,At={element:Ve,gd:ee,subplot:H.id,plotinfo:{id:H.id,xaxis:H.xaxis,yaxis:H.yaxis},xaxes:[H.xaxis],yaxes:[H.yaxis]};function at(rt,lt){return Math.sqrt(rt*rt+lt*lt)}function et(rt,lt){return at(rt-we,lt-Te)}function Ot(rt,lt){return Math.atan2(Te-lt,rt-we)}function Wt(rt,lt){return[rt*Math.cos(lt),rt*Math.sin(-lt)]}function Jt(rt,lt){if(rt===0)return H.pathSector(2*ze);var ot=Fe/rt,kt=lt-ot,wt=lt+ot,Vt=Math.max(0,Math.min(rt,ge)),Ut=Vt-ze,tt=Vt+ze;return"M"+Wt(Ut,kt)+"A"+[Ut,Ut]+" 0,0,0 "+Wt(Ut,wt)+"L"+Wt(tt,wt)+"A"+[tt,tt]+" 0,0,1 "+Wt(tt,kt)+"Z"}function Be(rt,lt,ot){if(rt===0)return H.pathSector(2*ze);var kt,wt,Vt=Wt(rt,lt),Ut=Wt(rt,ot),tt=Me((Vt[0]+Ut[0])/2),bt=Me((Vt[1]+Ut[1])/2);if(tt&&bt){var zt=bt/tt,St=-1/zt,Dt=ke(ze,zt,tt,bt);kt=ke(Fe,St,Dt[0][0],Dt[0][1]),wt=ke(Fe,St,Dt[1][0],Dt[1][1])}else{var Le,Je;bt?(Le=Fe,Je=ze):(Le=ze,Je=Fe),kt=[[tt-Le,bt-Je],[tt+Le,bt-Je]],wt=[[tt-Le,bt+Je],[tt+Le,bt+Je]]}return"M"+kt.join("L")+"L"+wt.reverse().join("L")+"Z"}function Ge(rt,lt){return lt=Math.max(Math.min(lt,ge),fe),rtue?(rt-1&&rt===1&&T(lt,ee,[H.xaxis],[H.yaxis],H.id,At),ot.indexOf("event")>-1&&w.click(ee,lt,H.id)}At.prepFn=function(rt,lt,ot){var kt=ee._fullLayout.dragmode,wt=Ve.getBoundingClientRect();ee._fullLayout._calcInverseTransform(ee);var Vt=ee._fullLayout._invTransform;$=ee._fullLayout._invScaleX,ne=ee._fullLayout._invScaleY;var Ut=c.apply3DTransform(Vt)(lt-wt.left,ot-wt.top);if(Ke=Ut[0],Re=Ut[1],de){var tt=O.findPolygonOffset(ge,Oe[0],Oe[1],de);Ke+=we+tt[0],Re+=Te+tt[1]}switch(kt){case"zoom":At.clickFn=He,Q||(At.moveFn=de?Ie:dt,At.doneFn=Ae,function(){qe=null,We=null,Ye=H.pathSubplot(),nt=!1;var bt=ee._fullLayout[H.id];ft=a(bt.bgcolor).getLuminance(),(vt=y.makeZoombox(ae,ft,me,_e,Ye)).attr("fill-rule","evenodd"),Pt=y.makeCorners(ae,me,_e),_(ee)}());break;case"select":case"lasso":b(rt,lt,ot,At,kt)}},x.init(At)},Y.updateRadialDrag=function(q,$,ne){var H=this,Q=H.gd,ee=H.layers,ie=H.radius,ae=H.innerRadius,ue=H.cx,le=H.cy,ge=H.radialAxis,fe=D.radialDragBoxSize,me=fe/2;if(ge.visible){var _e,we,Te,Oe=W(H.radialAxisAngle),de=ge._rl,ye=de[0],Me=de[1],ke=de[ne],Ee=.75*(de[1]-de[0])/(1-H.getHole($))/ie;ne?(_e=ue+(ie+me)*Math.cos(Oe),we=le-(ie+me)*Math.sin(Oe),Te="radialdrag"):(_e=ue+(ae-me)*Math.cos(Oe),we=le-(ae-me)*Math.sin(Oe),Te="radialdrag-inner");var ze,Fe,Ve,Ke=y.makeRectDragger(ee,Te,"crosshair",-me,-me,fe,fe),Re={element:Ke,gd:Q};U(r.select(Ke),ge.visible&&ae0==(ne?Ve>ye:Vep?function(k){return k<=0}:function(k){return k>=0};d.c2g=function(k){var b=d.c2l(k)-g;return(w(b)?b:0)+x},d.g2c=function(k){return d.l2c(k+g-x)},d.g2p=function(k){return k*y},d.c2p=function(k){return d.g2p(d.c2g(k))}}})(i,s);break;case"angularaxis":(function(d,h){var m=d.type;if(m==="linear"){var g=d.d2c,p=d.c2d;d.d2c=function(v,y){return function(x,w){return w==="degrees"?l(x):x}(g(v),y)},d.c2d=function(v,y){return p(function(x,w){return w==="degrees"?c(x):x}(v,y))}}d.makeCalcdata=function(v,y){var x,w,k=v[y],b=v._length,T=function(E){return d.d2c(E,v.thetaunit)};if(k){if(r.isTypedArray(k)&&m==="linear"){if(b===k.length)return k;if(k.subarray)return k.subarray(0,b)}for(x=new Array(b),w=0;w0?1:0}function a(i){var s=i[0],u=i[1];if(!isFinite(s)||!isFinite(u))return[1,0];var d=(s+1)*(s+1)+u*u;return[(s*s+u*u-1)/d,2*u/d]}function l(i,s){var u=s[0],d=s[1];return[u*i.radius+i.cx,-d*i.radius+i.cy]}function c(i,s){return s*i.radius}o.exports={smith:a,reactanceArc:function(i,s,u,d){var h=l(i,a([u,s])),m=h[0],g=h[1],p=l(i,a([d,s])),v=p[0],y=p[1];if(s===0)return["M"+m+","+g,"L"+v+","+y].join(" ");var x=c(i,1/Math.abs(s));return["M"+m+","+g,"A"+x+","+x+" 0 0,"+(s<0?1:0)+" "+v+","+y].join(" ")},resistanceArc:function(i,s,u,d){var h=c(i,1/(s+1)),m=l(i,a([s,u])),g=m[0],p=m[1],v=l(i,a([s,d])),y=v[0],x=v[1];if(r(u)!==r(d)){var w=l(i,a([s,0]));return["M"+g+","+p,"A"+h+","+h+" 0 0,"+(00){for(var s=[],u=0;u=A&&(E.min=0,D.min=0,O.min=0,y.aaxis&&delete y.aaxis.min,y.baxis&&delete y.baxis.min,y.caxis&&delete y.caxis.min)}function v(y,x,w,k){var b=m[x._name];function T(D,O){return l.coerce(y,x,b,D,O)}T("uirevision",k.uirevision),x.type="linear";var _=T("color"),S=_!==b.color.dflt?_:w.font.color,A=x._name.charAt(0).toUpperCase(),M="Component "+A,E=T("title.text",M);x._hovertitle=E===M?E:A,l.coerceFont(T,"title.font",{family:w.font.family,size:l.bigFont(w.font.size),color:S}),T("min"),d(y,x,T,"linear"),s(y,x,T,"linear"),i(y,x,T,"linear"),u(y,x,T,{outerTicks:!0}),T("showticklabels")&&(l.coerceFont(T,"tickfont",{family:w.font.family,size:w.font.size,color:S}),T("tickangle"),T("tickformat")),h(y,x,T,{dfltColor:_,bgColor:w.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:b}),T("hoverformat"),T("layer")}o.exports=function(y,x,w){c(y,x,w,{type:"ternary",attributes:m,handleDefaults:p,font:x.font,paper_bgcolor:x.paper_bgcolor})}},{"../../components/color":366,"../../lib":503,"../../plot_api/plot_template":543,"../cartesian/line_grid_defaults":571,"../cartesian/prefix_suffix_defaults":573,"../cartesian/tick_label_defaults":578,"../cartesian/tick_mark_defaults":579,"../cartesian/tick_value_defaults":580,"../subplot_defaults":632,"./layout_attributes":635}],637:[function(e,o,f){var r=e("@plotly/d3"),a=e("tinycolor2"),l=e("../../registry"),c=e("../../lib"),i=c.strTranslate,s=c._,u=e("../../components/color"),d=e("../../components/drawing"),h=e("../cartesian/set_convert"),m=e("../../lib/extend").extendFlat,g=e("../plots"),p=e("../cartesian/axes"),v=e("../../components/dragelement"),y=e("../../components/fx"),x=e("../../components/dragelement/helpers"),w=x.freeMode,k=x.rectMode,b=e("../../components/titles"),T=e("../cartesian/select").prepSelect,_=e("../cartesian/select").selectOnClick,S=e("../cartesian/select").clearSelect,A=e("../cartesian/select").clearSelectionsCache,M=e("../cartesian/constants");function E(G,W){this.id=G.id,this.graphDiv=G.graphDiv,this.init(W),this.makeFramework(W),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}o.exports=E;var D=E.prototype;D.init=function(G){this.container=G._ternarylayer,this.defs=G._defs,this.layoutId=G._uid,this.traceHash={},this.layers={}},D.plot=function(G,W){var K=W[this.id],te=W._size;this._hasClipOnAxisFalse=!1;for(var Y=0;YO*ae?Y=(Z=ae)*O:Z=(Y=ie)/O,re=Q*Y/ie,U=ee*Z/ae,K=W.l+W.w*ne-Y/2,te=W.t+W.h*(1-H)-Z/2,q.x0=K,q.y0=te,q.w=Y,q.h=Z,q.sum=ue,q.xaxis={type:"linear",range:[le+2*fe-ue,ue-le-2*ge],domain:[ne-re/2,ne+re/2],_id:"x"},h(q.xaxis,q.graphDiv._fullLayout),q.xaxis.setScale(),q.xaxis.isPtWithinRange=function(ze){return ze.a>=q.aaxis.range[0]&&ze.a<=q.aaxis.range[1]&&ze.b>=q.baxis.range[1]&&ze.b<=q.baxis.range[0]&&ze.c>=q.caxis.range[1]&&ze.c<=q.caxis.range[0]},q.yaxis={type:"linear",range:[le,ue-ge-fe],domain:[H-U/2,H+U/2],_id:"y"},h(q.yaxis,q.graphDiv._fullLayout),q.yaxis.setScale(),q.yaxis.isPtWithinRange=function(){return!0};var me=q.yaxis.domain[0],_e=q.aaxis=m({},G.aaxis,{range:[le,ue-ge-fe],side:"left",tickangle:(+G.aaxis.tickangle||0)-30,domain:[me,me+U*O],anchor:"free",position:0,_id:"y",_length:Y});h(_e,q.graphDiv._fullLayout),_e.setScale();var we=q.baxis=m({},G.baxis,{range:[ue-le-fe,ge],side:"bottom",domain:q.xaxis.domain,anchor:"free",position:0,_id:"x",_length:Y});h(we,q.graphDiv._fullLayout),we.setScale();var Te=q.caxis=m({},G.caxis,{range:[ue-le-ge,fe],side:"right",tickangle:(+G.caxis.tickangle||0)+30,domain:[me,me+U*O],anchor:"free",position:0,_id:"y",_length:Y});h(Te,q.graphDiv._fullLayout),Te.setScale();var Oe="M"+K+","+(te+Z)+"h"+Y+"l-"+Y/2+",-"+Z+"Z";q.clipDef.select("path").attr("d",Oe),q.layers.plotbg.select("path").attr("d",Oe);var de="M0,"+Z+"h"+Y+"l-"+Y/2+",-"+Z+"Z";q.clipDefRelative.select("path").attr("d",de);var ye=i(K,te);q.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",ye),q.clipDefRelative.select("path").attr("transform",null);var Me=i(K-we._offset,te+Z);q.layers.baxis.attr("transform",Me),q.layers.bgrid.attr("transform",Me);var ke=i(K+Y/2,te)+"rotate(30)"+i(0,-_e._offset);q.layers.aaxis.attr("transform",ke),q.layers.agrid.attr("transform",ke);var Ee=i(K+Y/2,te)+"rotate(-30)"+i(0,-Te._offset);q.layers.caxis.attr("transform",Ee),q.layers.cgrid.attr("transform",Ee),q.drawAxes(!0),q.layers.aline.select("path").attr("d",_e.showline?"M"+K+","+(te+Z)+"l"+Y/2+",-"+Z:"M0,0").call(u.stroke,_e.linecolor||"#000").style("stroke-width",(_e.linewidth||0)+"px"),q.layers.bline.select("path").attr("d",we.showline?"M"+K+","+(te+Z)+"h"+Y:"M0,0").call(u.stroke,we.linecolor||"#000").style("stroke-width",(we.linewidth||0)+"px"),q.layers.cline.select("path").attr("d",Te.showline?"M"+(K+Y/2)+","+te+"l"+Y/2+","+Z:"M0,0").call(u.stroke,Te.linecolor||"#000").style("stroke-width",(Te.linewidth||0)+"px"),q.graphDiv._context.staticPlot||q.initInteractions(),d.setClipUrl(q.layers.frontplot,q._hasClipOnAxisFalse?null:q.clipId,q.graphDiv)},D.drawAxes=function(G){var W=this.graphDiv,K=this.id.substr(7)+"title",te=this.layers,Y=this.aaxis,Z=this.baxis,re=this.caxis;if(this.drawAx(Y),this.drawAx(Z),this.drawAx(re),G){var U=Math.max(Y.showticklabels?Y.tickfont.size/2:0,(re.showticklabels?.75*re.tickfont.size:0)+(re.ticks==="outside"?.87*re.ticklen:0)),q=(Z.showticklabels?Z.tickfont.size:0)+(Z.ticks==="outside"?Z.ticklen:0)+3;te["a-title"]=b.draw(W,"a"+K,{propContainer:Y,propName:this.id+".aaxis.title",placeholder:s(W,"Click to enter Component A title"),attributes:{x:this.x0+this.w/2,y:this.y0-Y.title.font.size/3-U,"text-anchor":"middle"}}),te["b-title"]=b.draw(W,"b"+K,{propContainer:Z,propName:this.id+".baxis.title",placeholder:s(W,"Click to enter Component B title"),attributes:{x:this.x0-q,y:this.y0+this.h+.83*Z.title.font.size+q,"text-anchor":"middle"}}),te["c-title"]=b.draw(W,"c"+K,{propContainer:re,propName:this.id+".caxis.title",placeholder:s(W,"Click to enter Component C title"),attributes:{x:this.x0+this.w+q,y:this.y0+this.h+.83*re.title.font.size+q,"text-anchor":"middle"}})}},D.drawAx=function(G){var W,K=this.graphDiv,te=G._name,Y=te.charAt(0),Z=G._id,re=this.layers[te],U=Y+"tickLayout",q=(W=G).ticks+String(W.ticklen)+String(W.showticklabels);this[U]!==q&&(re.selectAll("."+Z+"tick").remove(),this[U]=q),G.setScale();var $=p.calcTicks(G),ne=p.clipEnds(G,$),H=p.makeTransTickFn(G),Q=p.getTickSigns(G)[2],ee=c.deg2rad(30),ie=Q*(G.linewidth||1)/2,ae=Q*G.ticklen,ue=this.w,le=this.h,ge=Y==="b"?"M0,"+ie+"l"+Math.sin(ee)*ae+","+Math.cos(ee)*ae:"M"+ie+",0l"+Math.cos(ee)*ae+","+-Math.sin(ee)*ae,fe={a:"M0,0l"+le+",-"+ue/2,b:"M0,0l-"+ue/2+",-"+le,c:"M0,0l-"+le+","+ue/2}[Y];p.drawTicks(K,G,{vals:G.ticks==="inside"?ne:$,layer:re,path:ge,transFn:H,crisp:!1}),p.drawGrid(K,G,{vals:ne,layer:this.layers[Y+"grid"],path:fe,transFn:H,crisp:!1}),p.drawLabels(K,G,{vals:$,layer:re,transFn:H,labelFns:p.makeLabelFns(G,0,30)})};var R=M.MINZOOM/2+.87,z="m-0.87,.5h"+R+"v3h-"+(R+5.2)+"l"+(R/2+2.6)+",-"+(.87*R+4.5)+"l2.6,1.5l-"+R/2+","+.87*R+"Z",L="m0.87,.5h-"+R+"v3h"+(R+5.2)+"l-"+(R/2+2.6)+",-"+(.87*R+4.5)+"l-2.6,1.5l"+R/2+","+.87*R+"Z",P="m0,1l"+R/2+","+.87*R+"l2.6,-1.5l-"+(R/2+2.6)+",-"+(.87*R+4.5)+"l-"+(R/2+2.6)+","+(.87*R+4.5)+"l2.6,1.5l"+R/2+",-"+.87*R+"Z",N=!0;function B(G){r.select(G).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}D.clearSelect=function(){A(this.dragOptions),S(this.dragOptions.gd)},D.initInteractions=function(){var G,W,K,te,Y,Z,re,U,q,$,ne,H,Q=this,ee=Q.layers.plotbg.select("path").node(),ie=Q.graphDiv,ae=ie._fullLayout._zoomlayer;function ue(de){var ye={};return ye[Q.id+".aaxis.min"]=de.a,ye[Q.id+".baxis.min"]=de.b,ye[Q.id+".caxis.min"]=de.c,ye}function le(de,ye){var Me=ie._fullLayout.clickmode;B(ie),de===2&&(ie.emit("plotly_doubleclick",null),l.call("_guiRelayout",ie,ue({a:0,b:0,c:0}))),Me.indexOf("select")>-1&&de===1&&_(ye,ie,[Q.xaxis],[Q.yaxis],Q.id,Q.dragOptions),Me.indexOf("event")>-1&&y.click(ie,ye,Q.id)}function ge(de,ye){return 1-ye/Q.h}function fe(de,ye){return 1-(de+(Q.h-ye)/Math.sqrt(3))/Q.w}function me(de,ye){return(de-(Q.h-ye)/Math.sqrt(3))/Q.w}function _e(de,ye){var Me=K+de*G,ke=te+ye*W,Ee=Math.max(0,Math.min(1,ge(0,te),ge(0,ke))),ze=Math.max(0,Math.min(1,fe(K,te),fe(Me,ke))),Fe=Math.max(0,Math.min(1,me(K,te),me(Me,ke))),Ve=(Ee/2+Fe)*Q.w,Ke=(1-Ee/2-ze)*Q.w,Re=(Ve+Ke)/2,qe=Ke-Ve,We=(1-Ee)*Q.h,Ye=We-qe/O;qe.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),H.transition().style("opacity",1).duration(200),$=!0),ie.emit("plotly_relayouting",ue(re))}function we(){B(ie),re!==Y&&(l.call("_guiRelayout",ie,ue(re)),N&&ie.data&&ie._context.showTips&&(c.notifier(s(ie,"Double-click to zoom back out"),"long"),N=!1))}function Te(de,ye){var Me=de/Q.xaxis._m,ke=ye/Q.yaxis._m,Ee=[(re={a:Y.a-ke,b:Y.b+(Me+ke)/2,c:Y.c-(Me-ke)/2}).a,re.b,re.c].sort(c.sorterAsc),ze=Ee.indexOf(re.a),Fe=Ee.indexOf(re.b),Ve=Ee.indexOf(re.c);Ee[0]<0&&(Ee[1]+Ee[0]/2<0?(Ee[2]+=Ee[0]+Ee[1],Ee[0]=Ee[1]=0):(Ee[2]+=Ee[0]/2,Ee[1]+=Ee[0]/2,Ee[0]=0),re={a:Ee[ze],b:Ee[Fe],c:Ee[Ve]},ye=(Y.a-re.a)*Q.yaxis._m,de=(Y.c-re.c-Y.b+re.b)*Q.xaxis._m);var Ke=i(Q.x0+de,Q.y0+ye);Q.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ke);var Re=i(-de,-ye);Q.clipDefRelative.select("path").attr("transform",Re),Q.aaxis.range=[re.a,Q.sum-re.b-re.c],Q.baxis.range=[Q.sum-re.a-re.c,re.b],Q.caxis.range=[Q.sum-re.a-re.b,re.c],Q.drawAxes(!1),Q._hasClipOnAxisFalse&&Q.plotContainer.select(".scatterlayer").selectAll(".trace").call(d.hideOutsideRangePoints,Q),ie.emit("plotly_relayouting",ue(re))}function Oe(){l.call("_guiRelayout",ie,ue(re))}this.dragOptions={element:ee,gd:ie,plotinfo:{id:Q.id,domain:ie._fullLayout[Q.id].domain,xaxis:Q.xaxis,yaxis:Q.yaxis},subplot:Q.id,prepFn:function(de,ye,Me){Q.dragOptions.xaxes=[Q.xaxis],Q.dragOptions.yaxes=[Q.yaxis],G=ie._fullLayout._invScaleX,W=ie._fullLayout._invScaleY;var ke=Q.dragOptions.dragmode=ie._fullLayout.dragmode;w(ke)?Q.dragOptions.minDrag=1:Q.dragOptions.minDrag=void 0,ke==="zoom"?(Q.dragOptions.moveFn=_e,Q.dragOptions.clickFn=le,Q.dragOptions.doneFn=we,function(Ee,ze,Fe){var Ve=ee.getBoundingClientRect();K=ze-Ve.left,te=Fe-Ve.top,ie._fullLayout._calcInverseTransform(ie);var Ke=ie._fullLayout._invTransform,Re=c.apply3DTransform(Ke)(K,te);K=Re[0],te=Re[1],Y={a:Q.aaxis.range[0],b:Q.baxis.range[1],c:Q.caxis.range[1]},re=Y,Z=Q.aaxis.range[1]-Y.a,U=a(Q.graphDiv._fullLayout[Q.id].bgcolor).getLuminance(),q="M0,"+Q.h+"L"+Q.w/2+", 0L"+Q.w+","+Q.h+"Z",$=!1,ne=ae.append("path").attr("class","zoombox").attr("transform",i(Q.x0,Q.y0)).style({fill:U>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",q),H=ae.append("path").attr("class","zoombox-corners").attr("transform",i(Q.x0,Q.y0)).style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),Q.clearSelect(ie)}(0,ye,Me)):ke==="pan"?(Q.dragOptions.moveFn=Te,Q.dragOptions.clickFn=le,Q.dragOptions.doneFn=Oe,Y={a:Q.aaxis.range[0],b:Q.baxis.range[1],c:Q.caxis.range[1]},re=Y,Q.clearSelect(ie)):(k(ke)||w(ke))&&T(de,ye,Me,Q.dragOptions,ke)}},ee.onmousemove=function(de){y.hover(ie,de,Q.id),ie._fullLayout._lasthover=ee,ie._fullLayout._hoversubplot=Q.id},ee.onmouseout=function(de){ie._dragging||v.unhover(ie,de)},v.init(this.dragOptions)}},{"../../components/color":366,"../../components/dragelement":385,"../../components/dragelement/helpers":384,"../../components/drawing":388,"../../components/fx":406,"../../components/titles":464,"../../lib":503,"../../lib/extend":493,"../../registry":638,"../cartesian/axes":554,"../cartesian/constants":561,"../cartesian/select":575,"../cartesian/set_convert":576,"../plots":619,"@plotly/d3":58,tinycolor2:312}],638:[function(e,o,f){var r=e("./lib/loggers"),a=e("./lib/noop"),l=e("./lib/push_unique"),c=e("./lib/is_plain_object"),i=e("./lib/dom").addStyleRule,s=e("./lib/extend"),u=e("./plots/attributes"),d=e("./plots/layout_attributes"),h=s.extendFlat,m=s.extendDeepAll;function g(_){var S=_.name,A=_.categories,M=_.meta;if(f.modules[S])r.log("Type "+S+" already registered");else{f.subplotsRegistry[_.basePlotModule.name]||function(N){var B=N.name;if(f.subplotsRegistry[B])return void r.log("Plot type "+B+" already registered.");for(var G in x(N),f.subplotsRegistry[B]=N,f.componentsRegistry)b(G,N.name)}(_.basePlotModule);for(var E={},D=0;D-1&&(v[x[d]].title={text:""});for(d=0;d")!==-1?"":E.html(O).text()});return E.remove(),D}(A),A=(A=A.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(u,"'"),a.isIE()&&(A=(A=(A=A.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),A}},{"../components/color":366,"../components/drawing":388,"../constants/xmlns_namespaces":480,"../lib":503,"@plotly/d3":58}],647:[function(e,o,f){var r=e("../../lib");o.exports=function(a,l){for(var c=0;cO+E||!r(D))}for(var z=0;zd))return i}return s!==void 0?s:c.dflt},f.coerceColor=function(c,i,s){return a(i).isValid()?i:s!==void 0?s:c.dflt},f.coerceEnumerated=function(c,i,s){return c.coerceNumber&&(i=+i),c.values.indexOf(i)!==-1?i:s!==void 0?s:c.dflt},f.getValue=function(c,i){var s;return Array.isArray(c)?i0?ue+=le:w<0&&(ue-=le)}return ue}function U(ae){var ue=w,le=ae.b,ge=re(ae);return r.inbox(le-ue,ge-ue,R+(ge-ue)/(ge-le)-1)}var q=m[k+"a"],$=m[b+"a"];S=Math.abs(q.r2c(q.range[1])-q.r2c(q.range[0]));var ne=r.getDistanceFunction(v,T,_,function(ae){return(T(ae)+_(ae))/2});if(r.getClosest(A,ne,m),m.index!==!1&&A[m.index].p!==u){P||(K=function(ae){return Math.min(N(ae),ae.p-E.bargroupwidth/2)},te=function(ae){return Math.max(B(ae),ae.p+E.bargroupwidth/2)});var H=A[m.index],Q=M.base?H.b+H.s:H.s;m[b+"0"]=m[b+"1"]=$.c2p(H[b],!0),m[b+"LabelVal"]=Q;var ee=E.extents[E.extents.round(H.p)];m[k+"0"]=q.c2p(D?K(H):ee[0],!0),m[k+"1"]=q.c2p(D?te(H):ee[1],!0);var ie=H.orig_p!==void 0;return m[k+"LabelVal"]=ie?H.orig_p:H.p,m.labelLabel=s(q,m[k+"LabelVal"],M[k+"hoverformat"]),m.valueLabel=s($,m[b+"LabelVal"],M[b+"hoverformat"]),m.baseLabel=s($,H.b,M[b+"hoverformat"]),m.spikeDistance=(function(ae){var ue=w,le=ae.b,ge=re(ae);return r.inbox(le-ue,ge-ue,z+(ge-ue)/(ge-le)-1)}(H)+function(ae){return Y(N(ae),B(ae),z)}(H))/2,m[k+"Spike"]=q.c2p(H.p,!0),c(H,M,m),m.hovertemplate=M.hovertemplate,m}}function h(m,g){var p=g.mcc||m.marker.color,v=g.mlcc||m.marker.line.color,y=i(m,g);return l.opacity(p)?p:l.opacity(v)&&y?v:void 0}o.exports={hoverPoints:function(m,g,p,v,y){var x=d(m,g,p,v,y);if(x){var w=x.cd,k=w[0].trace,b=w[x.index];return x.color=h(k,b),a.getComponentMethod("errorbars","hoverInfo")(b,k,x),[x]}},hoverOnBars:d,getTraceColor:h}},{"../../components/color":366,"../../components/fx":406,"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/axes":554,"../../registry":638,"./helpers":654}],656:[function(e,o,f){o.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults").supplyDefaults,crossTraceDefaults:e("./defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc").crossTraceCalc,colorbar:e("../scatter/marker_colorbar"),arraysToCalcdata:e("./arrays_to_calcdata"),plot:e("./plot").plot,style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover").hoverPoints,eventData:e("./event_data"),selectPoints:e("./select"),moduleType:"trace",name:"bar",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},{"../../plots/cartesian":568,"../scatter/marker_colorbar":945,"./arrays_to_calcdata":647,"./attributes":648,"./calc":649,"./cross_trace_calc":651,"./defaults":652,"./event_data":653,"./hover":655,"./layout_attributes":657,"./layout_defaults":658,"./plot":659,"./select":660,"./style":662}],657:[function(e,o,f){o.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"}}},{}],658:[function(e,o,f){var r=e("../../registry"),a=e("../../plots/cartesian/axes"),l=e("../../lib"),c=e("./layout_attributes");o.exports=function(i,s,u){function d(k,b){return l.coerce(i,s,c,k,b)}for(var h=!1,m=!1,g=!1,p={},v=d("barmode"),y=0;y0}function D(z){return z==="auto"?0:z}function O(z,L){var P=Math.PI/180*L,N=Math.abs(Math.sin(P)),B=Math.abs(Math.cos(P));return{x:z.width*B+z.height*N,y:z.width*N+z.height*B}}function R(z,L,P,N,B,G){var W=!!G.isHorizontal,K=!!G.constrained,te=G.angle||0,Y=G.anchor||"end",Z=Y==="end",re=Y==="start",U=((G.leftToRight||0)+1)/2,q=1-U,$=B.width,ne=B.height,H=Math.abs(L-z),Q=Math.abs(N-P),ee=H>2*T&&Q>2*T?T:0;H-=2*ee,Q-=2*ee;var ie=D(te);te!=="auto"||$<=H&&ne<=Q||!($>H||ne>Q)||($>Q||ne>H)&&$.01?ze:function(Re,qe,We){return We&&Re===qe?Re:Math.abs(Re-qe)>=2?ze(Re):Re>qe?Math.ceil(Re):Math.floor(Re)};Oe=Fe(Oe,de,Q),de=Fe(de,Oe,Q),ye=Fe(ye,Me,!Q),Me=Fe(Me,ye,!Q)}var Ve=M(l.ensureSingle(we,"path"),te,B,G);if(Ve.style("vector-effect","non-scaling-stroke").attr("d",isNaN((de-Oe)*(Me-ye))||ke&&z._context.staticPlot?"M0,0Z":"M"+Oe+","+ye+"V"+Me+"H"+de+"V"+ye+"Z").call(s.setClipUrl,L.layerClipId,z),!te.uniformtext.mode&&ee){var Ke=s.makePointStyleFns(U);s.singlePointStyle(ge,Ve,U,Ke,z)}(function(Re,qe,We,Ye,nt,ft,vt,Pt,At,at,et){var Ot,Wt=qe.xaxis,Jt=qe.yaxis,Be=Re._fullLayout;function Ge(Kt,Ht,mn){return l.ensureSingle(Kt,"text").text(Ht).attr({class:"bartext bartext-"+Ot,"text-anchor":"middle","data-notex":1}).call(s.font,mn).call(c.convertToTspans,Re)}var Tt=Ye[0].trace,dt=Tt.orientation==="h",Pe=function(Kt,Ht,mn,zn,pn){var tn,nn=Ht[0].trace;return tn=nn.texttemplate?function(sn,gn,bn,In,Hn){var Wn=gn[0].trace,ar=l.castOption(Wn,bn,"texttemplate");if(!ar)return"";var Or,vr,Er,Kn,Ln=Wn.type==="histogram",lr=Wn.type==="waterfall",Wr=Wn.type==="funnel",Mn=Wn.orientation==="h";Mn?(Or="y",vr=Hn,Er="x",Kn=In):(Or="x",vr=In,Er="y",Kn=Hn);function rr(_i){return d(Kn,Kn.c2l(_i),!0).text}var nr=gn[bn],Bn={};Bn.label=nr.p,Bn.labelLabel=Bn[Or+"Label"]=(Fr=nr.p,d(vr,vr.c2l(Fr),!0).text);var Fr,$r=l.castOption(Wn,nr.i,"text");($r===0||$r)&&(Bn.text=$r),Bn.value=nr.s,Bn.valueLabel=Bn[Er+"Label"]=rr(nr.s);var pr={};b(pr,Wn,nr.i),(Ln||pr.x===void 0)&&(pr.x=Mn?Bn.value:Bn.label),(Ln||pr.y===void 0)&&(pr.y=Mn?Bn.label:Bn.value),(Ln||pr.xLabel===void 0)&&(pr.xLabel=Mn?Bn.valueLabel:Bn.labelLabel),(Ln||pr.yLabel===void 0)&&(pr.yLabel=Mn?Bn.labelLabel:Bn.valueLabel),lr&&(Bn.delta=+nr.rawS||nr.s,Bn.deltaLabel=rr(Bn.delta),Bn.final=nr.v,Bn.finalLabel=rr(Bn.final),Bn.initial=Bn.final-Bn.delta,Bn.initialLabel=rr(Bn.initial)),Wr&&(Bn.value=nr.s,Bn.valueLabel=rr(Bn.value),Bn.percentInitial=nr.begR,Bn.percentInitialLabel=l.formatPercent(nr.begR),Bn.percentPrevious=nr.difR,Bn.percentPreviousLabel=l.formatPercent(nr.difR),Bn.percentTotal=nr.sumR,Bn.percenTotalLabel=l.formatPercent(nr.sumR));var qr=l.castOption(Wn,nr.i,"customdata");return qr&&(Bn.customdata=qr),l.texttemplateString(ar,Bn,sn._d3locale,pr,Bn,Wn._meta||{})}(Kt,Ht,mn,zn,pn):nn.textinfo?function(sn,gn,bn,In){var Hn=sn[0].trace,Wn=Hn.orientation==="h",ar=Hn.type==="waterfall",Or=Hn.type==="funnel";function vr(qr){return d(Wn?bn:In,+qr,!0).text}var Er,Kn=Hn.textinfo,Ln=sn[gn],lr=Kn.split("+"),Wr=[],Mn=function(qr){return lr.indexOf(qr)!==-1};Mn("label")&&Wr.push((rr=sn[gn].p,d(Wn?In:bn,rr,!0).text));var rr;if(Mn("text")&&((Er=l.castOption(Hn,Ln.i,"text"))===0||Er)&&Wr.push(Er),ar){var nr=+Ln.rawS||Ln.s,Bn=Ln.v,Fr=Bn-nr;Mn("initial")&&Wr.push(vr(Fr)),Mn("delta")&&Wr.push(vr(nr)),Mn("final")&&Wr.push(vr(Bn))}if(Or){Mn("value")&&Wr.push(vr(Ln.s));var $r=0;Mn("percent initial")&&$r++,Mn("percent previous")&&$r++,Mn("percent total")&&$r++;var pr=$r>1;Mn("percent initial")&&(Er=l.formatPercent(Ln.begR),pr&&(Er+=" of initial"),Wr.push(Er)),Mn("percent previous")&&(Er=l.formatPercent(Ln.difR),pr&&(Er+=" of previous"),Wr.push(Er)),Mn("percent total")&&(Er=l.formatPercent(Ln.sumR),pr&&(Er+=" of total"),Wr.push(Er))}return Wr.join("
")}(Ht,mn,zn,pn):v.getValue(nn.text,mn),v.coerceString(w,tn)}(Be,Ye,nt,Wt,Jt);Ot=function(Kt,Ht){var mn=v.getValue(Kt.textposition,Ht);return v.coerceEnumerated(k,mn)}(Tt,nt);var Ie=at.mode==="stack"||at.mode==="relative",Ae=Ye[nt],De=!Ie||Ae._outmost;if(!Pe||Ot==="none"||(Ae.isBlank||ft===vt||Pt===At)&&(Ot==="auto"||Ot==="inside"))return void We.select("text").remove();var He=Be.font,rt=p.getBarColor(Ye[nt],Tt),lt=p.getInsideTextFont(Tt,nt,He,rt),ot=p.getOutsideTextFont(Tt,nt,He),kt=We.datum();dt?Wt.type==="log"&&kt.s0<=0&&(ft=Wt.range[0]=Ut*(St/tt):St>=tt*(zt/Ut);Ut>0&&tt>0&&(Dt||Le||Je)?Ot="inside":(Ot="outside",wt.remove(),wt=null)}else Ot="inside";if(!wt){bt=l.ensureUniformFontSize(Re,Ot==="outside"?ot:lt);var st=(wt=Ge(We,Pe,bt)).attr("transform");if(wt.attr("transform",""),Vt=s.bBox(wt.node()),Ut=Vt.width,tt=Vt.height,wt.attr("transform",st),Ut<=0||tt<=0)return void wt.remove()}var Et,It,Zt=Tt.textangle;Ot==="outside"?(It=Tt.constraintext==="both"||Tt.constraintext==="outside",Et=function(Kt,Ht,mn,zn,pn,tn){var nn,sn=!!tn.isHorizontal,gn=!!tn.constrained,bn=tn.angle||0,In=pn.width,Hn=pn.height,Wn=Math.abs(Ht-Kt),ar=Math.abs(zn-mn);nn=sn?ar>2*T?T:0:Wn>2*T?T:0;var Or=1;gn&&(Or=sn?Math.min(1,ar/Hn):Math.min(1,Wn/In));var vr=D(bn),Er=O(pn,vr),Kn=(sn?Er.x:Er.y)/2,Ln=(pn.left+pn.right)/2,lr=(pn.top+pn.bottom)/2,Wr=(Kt+Ht)/2,Mn=(mn+zn)/2,rr=0,nr=0,Bn=sn?A(Ht,Kt):A(mn,zn);return sn?(Wr=Ht-Bn*nn,rr=Bn*Kn):(Mn=zn+Bn*nn,nr=-Bn*Kn),{textX:Ln,textY:lr,targetX:Wr,targetY:Mn,anchorX:rr,anchorY:nr,scale:Or,rotate:vr}}(ft,vt,Pt,At,Vt,{isHorizontal:dt,constrained:It,angle:Zt})):(It=Tt.constraintext==="both"||Tt.constraintext==="inside",Et=R(ft,vt,Pt,At,Vt,{isHorizontal:dt,constrained:It,angle:Zt,anchor:Tt.insidetextanchor})),Et.fontSize=bt.size,m(Tt.type==="histogram"?"bar":Tt.type,Et,Be),Ae.transform=Et,M(wt,Be,at,et).attr("transform",l.getTextTransform(Et))})(z,L,we,Z,fe,Oe,de,ye,Me,B,G),L.layerClipId&&s.hideOutsideRangePoint(ge,we.select("text"),W,K,U.xcalendar,U.ycalendar)});var le=U.cliponaxis===!1;s.setClipUrl(re,le?null:L.layerClipId,z)});u.getComponentMethod("errorbars","plot")(z,Y,L,B)},toMoveInsideBar:R}},{"../../components/color":366,"../../components/drawing":388,"../../components/fx/helpers":402,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../registry":638,"./attributes":648,"./constants":650,"./helpers":654,"./style":662,"./uniform_text":664,"@plotly/d3":58,"fast-isnumeric":190}],660:[function(e,o,f){function r(a,l,c,i,s){var u=l.c2p(i?a.s0:a.p0,!0),d=l.c2p(i?a.s1:a.p1,!0),h=c.c2p(i?a.p0:a.s0,!0),m=c.c2p(i?a.p1:a.s1,!0);return s?[(u+d)/2,(h+m)/2]:i?[d,(h+m)/2]:[(u+d)/2,m]}o.exports=function(a,l){var c,i=a.cd,s=a.xaxis,u=a.yaxis,d=i[0].trace,h=d.type==="funnel",m=d.orientation==="h",g=[];if(l===!1)for(c=0;c1||M.bargap===0&&M.bargroupgap===0&&!E[0].trace.marker.line.width)&&r.select(this).attr("shape-rendering","crispEdges")}),S.selectAll("g.points").each(function(E){p(r.select(this),E[0].trace,_)}),i.getComponentMethod("errorbars","style")(S)},styleTextPoints:v,styleOnSelect:function(_,S,A){var M=S[0].trace;M.selectedpoints?function(E,D,O){l.selectedPointStyle(E.selectAll("path"),D),function(R,z,L){R.each(function(P){var N,B=r.select(this);if(P.selected){N=c.ensureUniformFontSize(L,y(B,P,z,L));var G=z.selected.textfont&&z.selected.textfont.color;G&&(N.color=G),l.font(B,N)}else l.selectedTextStyle(B,z)})}(E.selectAll("text"),D,O)}(A,M,_):(p(A,M,_),i.getComponentMethod("errorbars","style")(A))},getInsideTextFont:w,getOutsideTextFont:k,getBarColor:T,resizeText:s}},{"../../components/color":366,"../../components/drawing":388,"../../lib":503,"../../registry":638,"./attributes":648,"./helpers":654,"./uniform_text":664,"@plotly/d3":58}],663:[function(e,o,f){var r=e("../../components/color"),a=e("../../components/colorscale/helpers").hasColorscale,l=e("../../components/colorscale/defaults"),c=e("../../lib").coercePattern;o.exports=function(i,s,u,d,h){var m=u("marker.color",d),g=a(i,"marker");g&&l(i,s,h,u,{prefix:"marker.",cLetter:"c"}),u("marker.line.color",r.defaultLine),a(i,"marker.line")&&l(i,s,h,u,{prefix:"marker.line.",cLetter:"c"}),u("marker.line.width"),u("marker.opacity"),c(u,"marker.pattern",m,g),u("selected.marker.color"),u("unselected.marker.color")}},{"../../components/color":366,"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503}],664:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib");function l(c){return"_"+c+"Text_minsize"}o.exports={recordMinTextSize:function(c,i,s){if(s.uniformtext.mode){var u=l(c),d=s.uniformtext.minsize,h=i.scale*i.fontSize;i.hide=hv.range[1]&&(_+=Math.PI),r.getClosest(m,function(M){return w(T,_,[M.rp0,M.rp1],[M.thetag0,M.thetag1],x)?k+Math.min(1,Math.abs(M.thetag1-M.thetag0)/b)-1+(M.rp1-T)/(M.rp1-M.rp0)-1:1/0},u),u.index!==!1){var S=m[u.index];u.x0=u.x1=S.ct[0],u.y0=u.y1=S.ct[1];var A=a.extendFlat({},S,{r:S.s,theta:S.p});return c(S,g,u),i(A,g,p,u),u.hovertemplate=g.hovertemplate,u.color=l(g,S),u.xLabelVal=u.yLabelVal=void 0,S.s<0&&(u.idealAlign="left"),[u]}}},{"../../components/fx":406,"../../lib":503,"../../plots/polar/helpers":621,"../bar/hover":655,"../scatterpolar/hover":1006}],669:[function(e,o,f){o.exports={moduleType:"trace",name:"barpolar",basePlotModule:e("../../plots/polar"),categories:["polar","bar","showLegend"],attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("../scatterpolar/format_labels"),style:e("../bar/style").style,styleOnSelect:e("../bar/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../bar/select"),meta:{}}},{"../../plots/polar":622,"../bar/select":660,"../bar/style":662,"../scatter/marker_colorbar":945,"../scatterpolar/format_labels":1005,"./attributes":665,"./calc":666,"./defaults":667,"./hover":668,"./layout_attributes":670,"./layout_defaults":671,"./plot":672}],670:[function(e,o,f){o.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},{}],671:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes");o.exports=function(l,c,i){var s,u={};function d(g,p){return r.coerce(l[s]||{},c[s],a,g,p)}for(var h=0;h0?(A=_,M=S):(A=S,M=_);var E=[i.findEnclosingVertexAngles(A,x.vangles)[0],(A+M)/2,i.findEnclosingVertexAngles(M,x.vangles)[1]];return i.pathPolygonAnnulus(b,T,A,M,E,w,k)}:function(b,T,_,S){return l.pathAnnulus(b,T,_,S,w,k)}}(u),y=u.layers.frontplot.select("g.barlayer");l.makeTraceGroups(y,d,"trace bars").each(function(){var x=r.select(this),w=l.ensureSingle(x,"g","points").selectAll("g.point").data(l.identity);w.enter().append("g").style("vector-effect","non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),w.exit().remove(),w.each(function(k){var b,T=r.select(this),_=k.rp0=g.c2p(k.s0),S=k.rp1=g.c2p(k.s1),A=k.thetag0=p.c2g(k.p0),M=k.thetag1=p.c2g(k.p1);if(a(_)&&a(S)&&a(A)&&a(M)&&_!==S&&A!==M){var E=g.c2g(k.s1),D=(A+M)/2;k.ct=[h.c2p(E*Math.cos(D)),m.c2p(E*Math.sin(D))],b=v(_,S,A,M)}else b="M0,0Z";l.ensureSingle(T,"path").attr("d",b)}),c.setClipUrl(x,u._hasClipOnAxisFalse?u.clipIds.forTraces:null,s)})}},{"../../components/drawing":388,"../../lib":503,"../../plots/polar/helpers":621,"@plotly/d3":58,"fast-isnumeric":190}],673:[function(e,o,f){var r=e("../scatter/attributes"),a=e("../bar/attributes"),l=e("../../components/color/attributes"),c=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,i=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../lib/extend").extendFlat,u=r.marker,d=u.line;o.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:r.xperiod,yperiod:r.yperiod,xperiod0:r.xperiod0,yperiod0:r.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,xhoverformat:c("x"),yhoverformat:c("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"},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:s({},u.symbol,{arrayOk:!1,editType:"plot"}),opacity:s({},u.opacity,{arrayOk:!1,dflt:1,editType:"style"}),size:s({},u.size,{arrayOk:!1,editType:"calc"}),color:s({},u.color,{arrayOk:!1,editType:"style"}),line:{color:s({},d.color,{arrayOk:!1,dflt:l.defaultLine,editType:"style"}),width:s({},d.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:r.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},offsetgroup:a.offsetgroup,alignmentgroup:a.alignmentgroup,selected:{marker:r.selected.marker,editType:"style"},unselected:{marker:r.unselected.marker,editType:"style"},text:s({},r.text,{}),hovertext:s({},r.hovertext,{}),hovertemplate:i({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},{"../../components/color/attributes":365,"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../bar/attributes":648,"../scatter/attributes":927}],674:[function(e,o,f){var r=e("fast-isnumeric"),a=e("../../plots/cartesian/axes"),l=e("../../plots/cartesian/align_period"),c=e("../../lib"),i=e("../../constants/numerical").BADNUM,s=c._;o.exports=function(w,k){var b,T,_,S,A,M,E,D=w._fullLayout,O=a.getFromId(w,k.xaxis||"x"),R=a.getFromId(w,k.yaxis||"y"),z=[],L=k.type==="violin"?"_numViolins":"_numBoxes";k.orientation==="h"?(_=O,S="x",A=R,M="y",E=!!k.yperiodalignment):(_=R,S="y",A=O,M="x",E=!!k.xperiodalignment);var P,N,B,G,W,K,te=function(We,Ye,nt,ft){var vt,Pt=Ye+"0"in We,At="d"+Ye in We;if(Ye in We||Pt&&At){var at=nt.makeCalcdata(We,Ye);return[l(We,nt,Ye,at).vals,at]}vt=Pt?We[Ye+"0"]:"name"in We&&(nt.type==="category"||r(We.name)&&["linear","log"].indexOf(nt.type)!==-1||c.isDateTime(We.name)&&nt.type==="date")?We.name:ft;for(var et=nt.type==="multicategory"?nt.r2c_just_indices(vt):nt.d2c(vt,0,We[Ye+"calendar"]),Ot=We._length,Wt=new Array(Ot),Jt=0;JtP.uf};if(k._hasPreCompStats){var ne=k[S],H=function(We){return _.d2c((k[We]||[])[b])},Q=1/0,ee=-1/0;for(b=0;b=P.q1&&P.q3>=P.med){var ae=H("lowerfence");P.lf=ae!==i&&ae<=P.q1?ae:g(P,B,G);var ue=H("upperfence");P.uf=ue!==i&&ue>=P.q3?ue:p(P,B,G);var le=H("mean");P.mean=le!==i?le:G?c.mean(B,G):(P.q1+P.q3)/2;var ge=H("sd");P.sd=le!==i&&ge>=0?ge:G?c.stdev(B,G,P.mean):P.q3-P.q1,P.lo=v(P),P.uo=y(P);var fe=H("notchspan");fe=fe!==i&&fe>0?fe:x(P,G),P.ln=P.med-fe,P.un=P.med+fe;var me=P.lf,_e=P.uf;k.boxpoints&&B.length&&(me=Math.min(me,B[0]),_e=Math.max(_e,B[G-1])),k.notched&&(me=Math.min(me,P.ln),_e=Math.max(_e,P.un)),P.min=me,P.max=_e}else{var we;c.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+P.q1,"median = "+P.med,"q3 = "+P.q3].join(` +`)),we=P.med!==i?P.med:P.q1!==i?P.q3!==i?(P.q1+P.q3)/2:P.q1:P.q3!==i?P.q3:0,P.med=we,P.q1=P.q3=we,P.lf=P.uf=we,P.mean=P.sd=we,P.ln=P.un=we,P.min=P.max=we}Q=Math.min(Q,P.min),ee=Math.max(ee,P.max),P.pts2=N.filter($),z.push(P)}}k._extremes[_._id]=a.findExtremes(_,[Q,ee],{padded:!0})}else{var Te=_.makeCalcdata(k,S),Oe=function(We,Ye){for(var nt=We.length,ft=new Array(nt+1),vt=0;vt=0&&Me0){var Ke,Re;(P={}).pos=P[M]=U[b],N=P.pts=ye[b].sort(h),G=(B=P[S]=N.map(m)).length,P.min=B[0],P.max=B[G-1],P.mean=c.mean(B,G),P.sd=c.stdev(B,G,P.mean),P.med=c.interp(B,.5),G%2&&(Fe||Ve)?(Fe?(Ke=B.slice(0,G/2),Re=B.slice(G/2+1)):Ve&&(Ke=B.slice(0,G/2+1),Re=B.slice(G/2)),P.q1=c.interp(Ke,.5),P.q3=c.interp(Re,.5)):(P.q1=c.interp(B,.25),P.q3=c.interp(B,.75)),P.lf=g(P,B,G),P.uf=p(P,B,G),P.lo=v(P),P.uo=y(P);var qe=x(P,G);P.ln=P.med-qe,P.un=P.med+qe,ke=Math.min(ke,P.ln),Ee=Math.max(Ee,P.un),P.pts2=N.filter($),z.push(P)}k._extremes[_._id]=a.findExtremes(_,k.notched?Te.concat([ke,Ee]):Te,{padded:!0})}return function(We,Ye){if(c.isArrayOrTypedArray(Ye.selectedpoints))for(var nt=0;nt0?(z[0].t={num:D[L],dPos:q,posLetter:M,valLetter:S,labels:{med:s(w,"median:"),min:s(w,"min:"),q1:s(w,"q1:"),q3:s(w,"q3:"),max:s(w,"max:"),mean:k.boxmean==="sd"?s(w,"mean \xB1 \u03C3:"):s(w,"mean:"),lf:s(w,"lower fence:"),uf:s(w,"upper fence:")}},D[L]++,z):[{t:{empty:!0}}]};var u={text:"tx",hovertext:"htx"};function d(w,k,b){for(var T in u)c.isArrayOrTypedArray(k[T])&&(Array.isArray(b)?c.isArrayOrTypedArray(k[T][b[0]])&&(w[u[T]]=k[T][b[0]][b[1]]):w[u[T]]=k[T][b])}function h(w,k){return w.v-k.v}function m(w){return w.v}function g(w,k,b){return b===0?w.q1:Math.min(w.q1,k[Math.min(c.findBin(2.5*w.q1-1.5*w.q3,k,!0)+1,b-1)])}function p(w,k,b){return b===0?w.q3:Math.max(w.q3,k[Math.max(c.findBin(2.5*w.q3-1.5*w.q1,k),0)])}function v(w){return 4*w.q1-3*w.q3}function y(w){return 4*w.q3-3*w.q1}function x(w,k){return k===0?0:1.57*(w.q3-w.q1)/Math.sqrt(k)}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"fast-isnumeric":190}],675:[function(e,o,f){var r=e("../../plots/cartesian/axes"),a=e("../../lib"),l=e("../../plots/cartesian/constraints").getAxisGroup,c=["v","h"];function i(s,u,d,h){var m,g,p,v=u.calcdata,y=u._fullLayout,x=h._id,w=x.charAt(0),k=[],b=0;for(m=0;m1,M=1-y[s+"gap"],E=1-y[s+"groupgap"];for(m=0;m0){var ie=N.pointpos,ae=N.jitter,ue=N.marker.size/2,le=0;ie+ae>=0&&((le=Q*(ie+ae))>L?(ee=!0,ne=ue,q=le):le>re&&(ne=ue,q=L)),le<=L&&(q=L);var ge=0;ie-ae<=0&&((ge=-Q*(ie-ae))>P?(ee=!0,H=ue,$=ge):ge>U&&(H=ue,$=P)),ge<=P&&($=P)}else q=L,$=P;var fe=new Array(p.length);for(g=0;g0?(A="v",M=D>0?Math.min(R,O):Math.min(O)):D>0?(A="h",M=Math.min(R)):M=0;if(M){g._length=M;var G=p("orientation",A);g._hasPreCompStats?G==="v"&&D===0?(p("x0",0),p("dx",1)):G==="h"&&E===0&&(p("y0",0),p("dy",1)):G==="v"&&D===0?p("x0"):G==="h"&&E===0&&p("y0"),a.getComponentMethod("calendars","handleTraceDefaults")(m,g,["x","y"],v)}else g.visible=!1}function h(m,g,p,v){var y=v.prefix,x=r.coerce2(m,g,u,"marker.outliercolor"),w=p("marker.line.outliercolor"),k="outliers";g._hasPreCompStats?k="all":(x||w)&&(k="suspectedoutliers");var b=p(y+"points",k);b?(p("jitter",b==="all"?.3:0),p("pointpos",b==="all"?-1.5:0),p("marker.symbol"),p("marker.opacity"),p("marker.size"),p("marker.color",g.line.color),p("marker.line.color"),p("marker.line.width"),b==="suspectedoutliers"&&(p("marker.line.outliercolor",g.marker.color),p("marker.line.outlierwidth")),p("selected.marker.color"),p("unselected.marker.color"),p("selected.marker.size"),p("unselected.marker.size"),p("text"),p("hovertext")):delete g.marker;var T=p("hoveron");T!=="all"&&T.indexOf("points")===-1||p("hovertemplate"),r.coerceSelectionMarkerOpacity(g,p)}o.exports={supplyDefaults:function(m,g,p,v){function y(S,A){return r.coerce(m,g,u,S,A)}if(d(m,g,y,v),g.visible!==!1){c(m,g,v,y),y("xhoverformat"),y("yhoverformat");var x=g._hasPreCompStats;x&&(y("lowerfence"),y("upperfence")),y("line.color",(m.marker||{}).color||p),y("line.width"),y("fillcolor",l.addOpacity(g.line.color,.5));var w=!1;if(x){var k=y("mean"),b=y("sd");k&&k.length&&(w=!0,b&&b.length&&(w="sd"))}y("boxmean",w),y("whiskerwidth"),y("width"),y("quartilemethod");var T=!1;if(x){var _=y("notchspan");_&&_.length&&(T=!0)}else r.validate(m.notchwidth,u.notchwidth)&&(T=!0);y("notched",T)&&y("notchwidth"),h(m,g,y,{prefix:"box"})}},crossTraceDefaults:function(m,g){var p,v;function y(k){return r.coerce(v._input,v,u,k)}for(var x=0;xb.lo&&(B.so=!0)}return S});k.enter().append("path").classed("point",!0),k.exit().remove(),k.call(l.translatePoints,g,p)}function s(u,d,h,m){var g,p,v=d.val,y=d.pos,x=!!y.rangebreaks,w=m.bPos,k=m.bPosPxOffset||0,b=h.boxmean||(h.meanline||{}).visible;Array.isArray(m.bdPos)?(g=m.bdPos[0],p=m.bdPos[1]):(g=m.bdPos,p=m.bdPos);var T=u.selectAll("path.mean").data(h.type==="box"&&h.boxmean||h.type==="violin"&&h.box.visible&&h.meanline.visible?a.identity:[]);T.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),T.exit().remove(),T.each(function(_){var S=y.c2l(_.pos+w,!0),A=y.l2p(S-g)+k,M=y.l2p(S+p)+k,E=x?(A+M)/2:y.l2p(S)+k,D=v.c2p(_.mean,!0),O=v.c2p(_.mean-_.sd,!0),R=v.c2p(_.mean+_.sd,!0);h.orientation==="h"?r.select(this).attr("d","M"+D+","+A+"V"+M+(b==="sd"?"m0,0L"+O+","+E+"L"+D+","+A+"L"+R+","+E+"Z":"")):r.select(this).attr("d","M"+A+","+D+"H"+M+(b==="sd"?"m0,0L"+E+","+O+"L"+A+","+D+"L"+E+","+R+"Z":""))})}o.exports={plot:function(u,d,h,m){var g=d.xaxis,p=d.yaxis;a.makeTraceGroups(m,h,"trace boxes").each(function(v){var y,x,w=r.select(this),k=v[0],b=k.t,T=k.trace;b.wdPos=b.bdPos*T.whiskerwidth,T.visible!==!0||b.empty?w.remove():(T.orientation==="h"?(y=p,x=g):(y=g,x=p),c(w,{pos:y,val:x},T,b),i(w,{x:g,y:p},T,b),s(w,{pos:y,val:x},T,b))})},plotBoxAndWhiskers:c,plotPoints:i,plotBoxMean:s}},{"../../components/drawing":388,"../../lib":503,"@plotly/d3":58}],683:[function(e,o,f){o.exports=function(r,a){var l,c,i=r.cd,s=r.xaxis,u=r.yaxis,d=[];if(a===!1)for(l=0;l=10)return null;for(var s=1/0,u=-1/0,d=c.length,h=0;h0?Math.floor:Math.ceil,G=P>0?Math.ceil:Math.floor,W=P>0?Math.min:Math.max,K=P>0?Math.max:Math.min,te=B(z+N),Y=G(L-N),Z=[[p=R(z)]];for(s=te;s*P=0;i--)s[g-i]=r[p][i],u[g-i]=a[p][i];for(d.push({x:s,y:u,bicubic:h}),i=p,s=[],u=[];i>=0;i--)s[p-i]=r[i][0],u[p-i]=a[i][0];return d.push({x:s,y:u,bicubic:m}),d}},{}],697:[function(e,o,f){var r=e("../../plots/cartesian/axes"),a=e("../../lib/extend").extendFlat;o.exports=function(l,c,i){var s,u,d,h,m,g,p,v,y,x,w,k,b,T,_=l["_"+c],S=l[c+"axis"],A=S._gridlines=[],M=S._minorgridlines=[],E=S._boundarylines=[],D=l["_"+i],O=l[i+"axis"];S.tickmode==="array"&&(S.tickvals=_.slice());var R=l._xctrl,z=l._yctrl,L=R[0].length,P=R.length,N=l._a.length,B=l._b.length;r.prepTicks(S),S.tickmode==="array"&&delete S.tickvals;var G=S.smoothing?3:1;function W(te){var Y,Z,re,U,q,$,ne,H,Q,ee,ie,ae,ue=[],le=[],ge={};if(c==="b")for(Z=l.b2j(te),re=Math.floor(Math.max(0,Math.min(B-2,Z))),U=Z-re,ge.length=B,ge.crossLength=N,ge.xy=function(fe){return l.evalxy([],fe,Z)},ge.dxy=function(fe,me){return l.dxydi([],fe,re,me,U)},Y=0;Y0&&(Q=l.dxydi([],Y-1,re,0,U),ue.push(q[0]+Q[0]/3),le.push(q[1]+Q[1]/3),ee=l.dxydi([],Y-1,re,1,U),ue.push(H[0]-ee[0]/3),le.push(H[1]-ee[1]/3)),ue.push(H[0]),le.push(H[1]),q=H;else for(Y=l.a2i(te),$=Math.floor(Math.max(0,Math.min(N-2,Y))),ne=Y-$,ge.length=N,ge.crossLength=B,ge.xy=function(fe){return l.evalxy([],Y,fe)},ge.dxy=function(fe,me){return l.dxydj([],$,fe,ne,me)},Z=0;Z0&&(ie=l.dxydj([],$,Z-1,ne,0),ue.push(q[0]+ie[0]/3),le.push(q[1]+ie[1]/3),ae=l.dxydj([],$,Z-1,ne,1),ue.push(H[0]-ae[0]/3),le.push(H[1]-ae[1]/3)),ue.push(H[0]),le.push(H[1]),q=H;return ge.axisLetter=c,ge.axis=S,ge.crossAxis=O,ge.value=te,ge.constvar=i,ge.index=v,ge.x=ue,ge.y=le,ge.smoothing=O.smoothing,ge}function K(te){var Y,Z,re,U,q,$=[],ne=[],H={};if(H.length=_.length,H.crossLength=D.length,c==="b")for(re=Math.max(0,Math.min(B-2,te)),q=Math.min(1,Math.max(0,te-re)),H.xy=function(Q){return l.evalxy([],Q,te)},H.dxy=function(Q,ee){return l.dxydi([],Q,re,ee,q)},Y=0;Y_.length-1||A.push(a(K(u),{color:S.gridcolor,width:S.gridwidth}));for(v=g;v_.length-1||w<0||w>_.length-1))for(k=_[d],b=_[w],s=0;s_[_.length-1]||M.push(a(W(x),{color:S.minorgridcolor,width:S.minorgridwidth}));S.startline&&E.push(a(K(0),{color:S.startlinecolor,width:S.startlinewidth})),S.endline&&E.push(a(K(_.length-1),{color:S.endlinecolor,width:S.endlinewidth}))}else{for(h=5e-15,g=(m=[Math.floor((_[_.length-1]-S.tick0)/S.dtick*(1+h)),Math.ceil((_[0]-S.tick0)/S.dtick/(1+h))].sort(function(te,Y){return te-Y}))[0],p=m[1],v=g;v<=p;v++)y=S.tick0+S.dtick*v,A.push(a(W(y),{color:S.gridcolor,width:S.gridwidth}));for(v=g-1;v_[_.length-1]||M.push(a(W(x),{color:S.minorgridcolor,width:S.minorgridwidth}));S.startline&&E.push(a(W(_[0]),{color:S.startlinecolor,width:S.startlinewidth})),S.endline&&E.push(a(W(_[_.length-1]),{color:S.endlinecolor,width:S.endlinewidth}))}}},{"../../lib/extend":493,"../../plots/cartesian/axes":554}],698:[function(e,o,f){var r=e("../../plots/cartesian/axes"),a=e("../../lib/extend").extendFlat;o.exports=function(l,c){var i,s,u,d=c._labels=[],h=c._gridlines;for(i=0;il.length&&(a=a.slice(0,l.length)):a=[],i=0;i90&&(y-=180,h=-h),{angle:y,flip:h,p:r.c2p(c,a,l),offsetMultplier:m}}},{}],712:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../components/drawing"),l=e("./map_1d_array"),c=e("./makepath"),i=e("./orient_text"),s=e("../../lib/svg_text_utils"),u=e("../../lib"),d=u.strRotate,h=u.strTranslate,m=e("../../constants/alignment");function g(w,k,b,T,_,S){var A="const-"+_+"-lines",M=b.selectAll("."+A).data(S);M.enter().append("path").classed(A,!0).style("vector-effect","non-scaling-stroke"),M.each(function(E){var D=E,O=D.x,R=D.y,z=l([],O,w.c2p),L=l([],R,k.c2p),P="M"+c(z,L,D.smoothing);r.select(this).attr("d",P).style("stroke-width",D.width).style("stroke",D.color).style("fill","none")}),M.exit().remove()}function p(w,k,b,T,_,S,A,M){var E=S.selectAll("text."+M).data(A);E.enter().append("text").classed(M,!0);var D=0,O={};return E.each(function(R,z){var L;if(R.axis.tickangle==="auto")L=i(T,k,b,R.xy,R.dxy);else{var P=(R.axis.tickangle+180)*Math.PI/180;L=i(T,k,b,R.xy,[Math.cos(P),Math.sin(P)])}z||(O={angle:L.angle,flip:L.flip});var N=(R.endAnchor?-1:1)*L.flip,B=r.select(this).attr({"text-anchor":N>0?"start":"end","data-notex":1}).call(a.font,R.font).text(R.text).call(s.convertToTspans,w),G=a.bBox(this);B.attr("transform",h(L.p[0],L.p[1])+d(L.angle)+h(R.axis.labelpadding*N,.3*G.height)),D=Math.max(D,G.width+R.axis.labelpadding)}),E.exit().remove(),O.maxExtent=D,O}o.exports=function(w,k,b,T){var _=k.xaxis,S=k.yaxis,A=w._fullLayout._clips;u.makeTraceGroups(T,b,"trace").each(function(M){var E=r.select(this),D=M[0],O=D.trace,R=O.aaxis,z=O.baxis,L=u.ensureSingle(E,"g","minorlayer"),P=u.ensureSingle(E,"g","majorlayer"),N=u.ensureSingle(E,"g","boundarylayer"),B=u.ensureSingle(E,"g","labellayer");E.style("opacity",O.opacity),g(_,S,P,R,"a",R._gridlines),g(_,S,P,z,"b",z._gridlines),g(_,S,L,R,"a",R._minorgridlines),g(_,S,L,z,"b",z._minorgridlines),g(_,S,N,R,"a-boundary",R._boundarylines),g(_,S,N,z,"b-boundary",z._boundarylines);var G=p(w,_,S,O,D,B,R._labels,"a-label"),W=p(w,_,S,O,D,B,z._labels,"b-label");(function(K,te,Y,Z,re,U,q,$){var ne,H,Q,ee,ie=u.aggNums(Math.min,null,Y.a),ae=u.aggNums(Math.max,null,Y.a),ue=u.aggNums(Math.min,null,Y.b),le=u.aggNums(Math.max,null,Y.b);ne=.5*(ie+ae),H=ue,Q=Y.ab2xy(ne,H,!0),ee=Y.dxyda_rough(ne,H),q.angle===void 0&&u.extendFlat(q,i(Y,re,U,Q,Y.dxydb_rough(ne,H))),x(K,te,Y,Z,Q,ee,Y.aaxis,re,U,q,"a-title"),ne=ie,H=.5*(ue+le),Q=Y.ab2xy(ne,H,!0),ee=Y.dxydb_rough(ne,H),$.angle===void 0&&u.extendFlat($,i(Y,re,U,Q,Y.dxyda_rough(ne,H))),x(K,te,Y,Z,Q,ee,Y.baxis,re,U,$,"b-title")})(w,B,O,D,_,S,G,W),function(K,te,Y,Z,re){var U,q,$,ne,H=Y.select("#"+K._clipPathId);H.size()||(H=Y.append("clipPath").classed("carpetclip",!0));var Q=u.ensureSingle(H,"path","carpetboundary"),ee=te.clipsegments,ie=[];for(ne=0;ne90&&B<270,W=r.select(this);W.text(A.title.text).call(s.convertToTspans,w),G&&(L=(-s.lineCount(W)+y)*v*N-L),W.attr("transform",h(P.p[0],P.p[1])+d(P.angle)+h(0,L)).attr("text-anchor","middle").call(a.font,A.title.font)}),z.exit().remove()}},{"../../components/drawing":388,"../../constants/alignment":471,"../../lib":503,"../../lib/svg_text_utils":529,"./makepath":709,"./map_1d_array":710,"./orient_text":711,"@plotly/d3":58}],713:[function(e,o,f){var r=e("./constants"),a=e("../../lib/search").findBin,l=e("./compute_control_points"),c=e("./create_spline_evaluator"),i=e("./create_i_derivative_evaluator"),s=e("./create_j_derivative_evaluator");o.exports=function(u){var d=u._a,h=u._b,m=d.length,g=h.length,p=u.aaxis,v=u.baxis,y=d[0],x=d[m-1],w=h[0],k=h[g-1],b=d[d.length-1]-d[0],T=h[h.length-1]-h[0],_=b*r.RELATIVE_CULL_TOLERANCE,S=T*r.RELATIVE_CULL_TOLERANCE;y-=_,x+=_,w-=S,k+=S,u.isVisible=function(A,M){return A>y&&Aw&&Mx||Mk},u.setScale=function(){var A=u._x,M=u._y,E=l(u._xctrl,u._yctrl,A,M,p.smoothing,v.smoothing);u._xctrl=E[0],u._yctrl=E[1],u.evalxy=c([u._xctrl,u._yctrl],m,g,p.smoothing,v.smoothing),u.dxydi=i([u._xctrl,u._yctrl],p.smoothing,v.smoothing),u.dxydj=s([u._xctrl,u._yctrl],p.smoothing,v.smoothing)},u.i2a=function(A){var M=Math.max(0,Math.floor(A[0]),m-2),E=A[0]-M;return(1-E)*d[M]+E*d[M+1]},u.j2b=function(A){var M=Math.max(0,Math.floor(A[1]),m-2),E=A[1]-M;return(1-E)*h[M]+E*h[M+1]},u.ij2ab=function(A){return[u.i2a(A[0]),u.j2b(A[1])]},u.a2i=function(A){var M=Math.max(0,Math.min(a(A,d),m-2)),E=d[M],D=d[M+1];return Math.max(0,Math.min(m-1,M+(A-E)/(D-E)))},u.b2j=function(A){var M=Math.max(0,Math.min(a(A,h),g-2)),E=h[M],D=h[M+1];return Math.max(0,Math.min(g-1,M+(A-E)/(D-E)))},u.ab2ij=function(A){return[u.a2i(A[0]),u.b2j(A[1])]},u.i2c=function(A,M){return u.evalxy([],A,M)},u.ab2xy=function(A,M,E){if(!E&&(Ad[m-1]|Mh[g-1]))return[!1,!1];var D=u.a2i(A),O=u.b2j(M),R=u.evalxy([],D,O);if(E){var z,L,P,N,B=0,G=0,W=[];Ad[m-1]?(z=m-2,L=1,B=(A-d[m-1])/(d[m-1]-d[m-2])):L=D-(z=Math.max(0,Math.min(m-2,Math.floor(D)))),Mh[g-1]?(P=g-2,N=1,G=(M-h[g-1])/(h[g-1]-h[g-2])):N=O-(P=Math.max(0,Math.min(g-2,Math.floor(O)))),B&&(u.dxydi(W,z,P,L,N),R[0]+=W[0]*B,R[1]+=W[1]*B),G&&(u.dxydj(W,z,P,L,N),R[0]+=W[0]*G,R[1]+=W[1]*G)}return R},u.c2p=function(A,M,E){return[M.c2p(A[0]),E.c2p(A[1])]},u.p2x=function(A,M,E){return[M.p2c(A[0]),E.p2c(A[1])]},u.dadi=function(A){var M=Math.max(0,Math.min(d.length-2,A));return d[M+1]-d[M]},u.dbdj=function(A){var M=Math.max(0,Math.min(h.length-2,A));return h[M+1]-h[M]},u.dxyda=function(A,M,E,D){var O=u.dxydi(null,A,M,E,D),R=u.dadi(A,E);return[O[0]/R,O[1]/R]},u.dxydb=function(A,M,E,D){var O=u.dxydj(null,A,M,E,D),R=u.dbdj(M,D);return[O[0]/R,O[1]/R]},u.dxyda_rough=function(A,M,E){var D=b*(E||.1),O=u.ab2xy(A+D,M,!0),R=u.ab2xy(A-D,M,!0);return[.5*(O[0]-R[0])/D,.5*(O[1]-R[1])/D]},u.dxydb_rough=function(A,M,E){var D=T*(E||.1),O=u.ab2xy(A,M+D,!0),R=u.ab2xy(A,M-D,!0);return[.5*(O[0]-R[0])/D,.5*(O[1]-R[1])/D]},u.dpdx=function(A){return A._m},u.dpdy=function(A){return A._m}}},{"../../lib/search":523,"./compute_control_points":701,"./constants":702,"./create_i_derivative_evaluator":703,"./create_j_derivative_evaluator":704,"./create_spline_evaluator":705}],714:[function(e,o,f){var r=e("../../lib");o.exports=function(a,l,c){var i,s,u,d=[],h=[],m=a[0].length,g=a.length;function p(te,Y){var Z,re=0,U=0;return te>0&&(Z=a[Y][te-1])!==void 0&&(U++,re+=Z),te0&&(Z=a[Y-1][te])!==void 0&&(U++,re+=Z),Y0&&s0&&i1e-5);return r.log("Smoother converged to",D,"after",O,"iterations"),a}},{"../../lib":503}],715:[function(e,o,f){var r=e("../../lib").isArray1D;o.exports=function(a,l,c){var i=c("x"),s=i&&i.length,u=c("y"),d=u&&u.length;if(!s&&!d)return!1;if(l._cheater=!i,s&&!r(i)||d&&!r(u))l._length=null;else{var h=s?i.length:1/0;d&&(h=Math.min(h,u.length)),l.a&&l.a.length&&(h=Math.min(h,l.a.length)),l.b&&l.b.length&&(h=Math.min(h,l.b.length)),l._length=h}return!0}},{"../../lib":503}],716:[function(e,o,f){var r=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../scattergeo/attributes"),l=e("../../components/colorscale/attributes"),c=e("../../plots/attributes"),i=e("../../components/color/attributes").defaultLine,s=e("../../lib/extend").extendFlat,u=a.marker.line;o.exports=s({locations:{valType:"data_array",editType:"calc"},locationmode:a.locationmode,z:{valType:"data_array",editType:"calc"},geojson:s({},a.geojson,{}),featureidkey:a.featureidkey,text:s({},a.text,{}),hovertext:s({},a.hovertext,{}),marker:{line:{color:s({},u.color,{dflt:i}),width:s({},u.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:a.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:a.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:s({},c.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:r(),showlegend:s({},c.showlegend,{dflt:!1})},l("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/color/attributes":365,"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scattergeo/attributes":969}],717:[function(e,o,f){var r=e("fast-isnumeric"),a=e("../../constants/numerical").BADNUM,l=e("../../components/colorscale/calc"),c=e("../scatter/arrays_to_calcdata"),i=e("../scatter/calc_selection");function s(u){return u&&typeof u=="string"}o.exports=function(u,d){var h,m=d._length,g=new Array(m);h=d.geojson?function(w){return s(w)||r(w)}:s;for(var p=0;p")}}(c,p,u),[c]}},{"../../lib":503,"../../plots/cartesian/axes":554,"./attributes":716}],721:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../heatmap/colorbar"),calc:e("./calc"),calcGeoJSON:e("./plot").calcGeoJSON,plot:e("./plot").plot,style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("./select"),moduleType:"trace",name:"choropleth",basePlotModule:e("../../plots/geo"),categories:["geo","noOpacity","showLegend"],meta:{}}},{"../../plots/geo":589,"../heatmap/colorbar":795,"./attributes":716,"./calc":717,"./defaults":718,"./event_data":719,"./hover":720,"./plot":722,"./select":723,"./style":724}],722:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),l=e("../../lib/geo_location_utils"),c=e("../../lib/topojson_utils").getTopojsonFeatures,i=e("../../plots/cartesian/autorange").findExtremes,s=e("./style").style;o.exports={calcGeoJSON:function(u,d){for(var h=u[0].trace,m=d[h.geo],g=m._subplot,p=h.locationmode,v=h._length,y=p==="geojson-id"?l.extractTraceFeature(u):c(h,g.topojson),x=[],w=[],k=0;k=0;c--){var i=l[c].id;if(typeof i=="string"&&i.indexOf("water")===0){for(var s=c+1;s=0;d--)s.removeLayer(u[d][1])},i.dispose=function(){var s=this.subplot.map;this._removeLayers(),s.removeSource(this.sourceId)},o.exports=function(s,u){var d=u[0].trace,h=new c(s,d.uid),m=h.sourceId,g=r(u),p=h.below=s.belowLookup["trace-"+d.uid];return s.map.addSource(m,{type:"geojson",data:g.geojson}),h._addLayers(g,p),u[0].trace._glTrace=h,h}},{"../../plots/mapbox/constants":611,"./convert":726}],730:[function(e,o,f){var r=e("../../components/colorscale/attributes"),a=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,l=e("../../plots/template_attributes").hovertemplateAttrs,c=e("../mesh3d/attributes"),i=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat,u={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"],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:l({editType:"calc"},{keys:["norm"]}),uhoverformat:a("u",1),vhoverformat:a("v",1),whoverformat:a("w",1),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),showlegend:s({},i.showlegend,{dflt:!1})};s(u,r("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach(function(d){u[d]=c[d]}),u.hoverinfo=s({},i.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),u.transforms=void 0,o.exports=u},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../mesh3d/attributes":867}],731:[function(e,o,f){var r=e("../../components/colorscale/calc");o.exports=function(a,l){for(var c=l.u,i=l.v,s=l.w,u=Math.min(l.x.length,l.y.length,l.z.length,c.length,i.length,s.length),d=-1/0,h=1/0,m=0;mu.level||u.starts.length&&s===u.level)}break;case"constraint":if(c.prefixBoundary=!1,c.edgepaths.length)return;var d=c.x.length,h=c.y.length,m=-1/0,g=1/0;for(l=0;l":y>m&&(c.prefixBoundary=!0);break;case"<":(ym||c.starts.length&&v===g)&&(c.prefixBoundary=!0);break;case"][":p=Math.min(y[0],y[1]),v=Math.max(y[0],y[1]),pm&&(c.prefixBoundary=!0)}}}},{}],738:[function(e,o,f){var r=e("../../components/colorscale"),a=e("./make_color_map"),l=e("./end_plus");o.exports={min:"zmin",max:"zmax",calc:function(c,i,s){var u=i.contours,d=i.line,h=u.size||1,m=u.coloring,g=a(i,{isColorbar:!0});if(m==="heatmap"){var p=r.extractOpts(i);s._fillgradient=p.reversescale?r.flipScale(p.colorscale):p.colorscale,s._zrange=[p.min,p.max]}else m==="fill"&&(s._fillcolor=g);s._line={color:m==="lines"?g:d.color,width:u.showlines!==!1?d.width:0,dash:d.dash},s._levels={start:u.start,end:l(u),size:h}}}},{"../../components/colorscale":378,"./end_plus":746,"./make_color_map":751}],739:[function(e,o,f){o.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}}},{}],740:[function(e,o,f){var r=e("fast-isnumeric"),a=e("./label_defaults"),l=e("../../components/color"),c=l.addOpacity,i=l.opacity,s=e("../../constants/filter_ops"),u=s.CONSTRAINT_REDUCTION,d=s.COMPARISON_OPS2;o.exports=function(h,m,g,p,v,y){var x,w,k,b=m.contours,T=g("contours.operation");b._operation=u[T],function(_,S){var A;d.indexOf(S.operation)===-1?(_("contours.value",[0,1]),Array.isArray(S.value)?S.value.length>2?S.value=S.value.slice(2):S.length===0?S.value=[0,1]:S.length<2?(A=parseFloat(S.value[0]),S.value=[A,A+1]):S.value=[parseFloat(S.value[0]),parseFloat(S.value[1])]:r(S.value)&&(A=parseFloat(S.value),S.value=[A,A+1])):(_("contours.value",0),r(S.value)||(Array.isArray(S.value)?S.value=parseFloat(S.value[0]):S.value=0))}(g,b),T==="="?x=b.showlines=!0:(x=g("contours.showlines"),k=g("fillcolor",c((h.line||{}).color||v,.5))),x&&(w=g("line.color",k&&i(k)?c(m.fillcolor,1):v),g("line.width",2),g("line.dash")),g("line.smoothing"),a(g,p,w,y)}},{"../../components/color":366,"../../constants/filter_ops":475,"./label_defaults":750,"fast-isnumeric":190}],741:[function(e,o,f){var r=e("../../constants/filter_ops"),a=e("fast-isnumeric");function l(s,u){var d,h=Array.isArray(u);function m(g){return a(g)?+g:null}return r.COMPARISON_OPS2.indexOf(s)!==-1?d=m(h?u[0]:u):r.INTERVAL_OPS.indexOf(s)!==-1?d=h?[m(u[0]),m(u[1])]:[m(u),m(u)]:r.SET_OPS.indexOf(s)!==-1&&(d=h?u.map(m):[m(u)]),d}function c(s){return function(u){u=l(s,u);var d=Math.min(u[0],u[1]),h=Math.max(u[0],u[1]);return{start:d,end:h,size:h-d}}}function i(s){return function(u){return{start:u=l(s,u),end:1/0,size:1/0}}}o.exports={"[]":c("[]"),"][":c("]["),">":i(">"),"<":i("<"),"=":i("=")}},{"../../constants/filter_ops":475,"fast-isnumeric":190}],742:[function(e,o,f){o.exports=function(r,a,l,c){var i=c("contours.start"),s=c("contours.end"),u=i===!1||s===!1,d=l("contours.size");!(u?a.autocontour=!0:l("autocontour",!1))&&d||l("ncontours")}},{}],743:[function(e,o,f){var r=e("../../lib");function a(l){return r.extendFlat({},l,{edgepaths:r.extendDeep([],l.edgepaths),paths:r.extendDeep([],l.paths),starts:r.extendDeep([],l.starts)})}o.exports=function(l,c){var i,s,u,d=function(g){return g.reverse()},h=function(g){return g};switch(c){case"=":case"<":return l;case">":for(l.length!==1&&r.warn("Contour data invalid for the specified inequality operation."),s=l[0],i=0;i1e3){r.warn("Too many contours, clipping at 1000",c);break}return h}},{"../../lib":503,"./constraint_mapping":741,"./end_plus":746}],746:[function(e,o,f){o.exports=function(r){return r.end+r.size/1e6}},{}],747:[function(e,o,f){var r=e("../../lib"),a=e("./constants");function l(s,u,d,h){return Math.abs(s[0]-u[0])20&&ee?Q===208||Q===1114?ae=ie[0]===0?1:-1:ue=ie[1]===0?1:-1:a.BOTTOMSTART.indexOf(Q)!==-1?ue=1:a.LEFTSTART.indexOf(Q)!==-1?ae=1:a.TOPSTART.indexOf(Q)!==-1?ue=-1:ae=-1,[ae,ue]}(v,d,u),x=[i(s,u,[-y[0],-y[1]])],w=s.z.length,k=s.z[0].length,b=u.slice(),T=y.slice();for(g=0;g<1e4;g++){if(v>20?(v=a.CHOOSESADDLE[v][(y[0]||y[1])<0?0:1],s.crossings[p]=a.SADDLEREMAINDER[v]):delete s.crossings[p],!(y=a.NEWDELTA[v])){r.log("Found bad marching index:",v,u,s.level);break}x.push(i(s,u,y)),u[0]+=y[0],u[1]+=y[1],p=u.join(","),l(x[x.length-1],x[x.length-2],h,m)&&x.pop();var _=y[0]&&(u[0]<0||u[0]>k-2)||y[1]&&(u[1]<0||u[1]>w-2);if(u[0]===b[0]&&u[1]===b[1]&&y[0]===T[0]&&y[1]===T[1]||d&&_)break;v=s.crossings[p]}g===1e4&&r.log("Infinite loop in contour?");var S,A,M,E,D,O,R,z,L,P,N,B,G,W,K,te=l(x[0],x[x.length-1],h,m),Y=0,Z=.2*s.smoothing,re=[],U=0;for(g=1;g=U;g--)if((S=re[g])=U&&S+re[A]z&&L--,s.edgepaths[L]=N.concat(x,P));break}H||(s.edgepaths[z]=x.concat(P))}for(z=0;zl?0:1)+(c[0][1]>l?0:2)+(c[1][1]>l?0:4)+(c[1][0]>l?0:8);return i===5||i===10?l>(c[0][0]+c[0][1]+c[1][0]+c[1][1])/4?i===5?713:1114:i===5?104:208:i===15?0:i}o.exports=function(l){var c,i,s,u,d,h,m,g,p,v=l[0].z,y=v.length,x=v[0].length,w=y===2||x===2;for(i=0;i=0&&(A=K,E=D):Math.abs(S[1]-A[1])<.01?Math.abs(S[1]-K[1])<.01&&(K[0]-S[0])*(A[0]-K[0])>=0&&(A=K,E=D):a.log("endpt to newendpt is not vert. or horz.",S,A,K)}if(S=A,E>=0)break;z+="L"+A}if(E===T.edgepaths.length){a.log("unclosed perimeter path");break}L=E,(N=P.indexOf(L)===-1)&&(L=P[0],z+="Z")}for(L=0;LA.center?A.right-D:D-A.left)/(z+Math.abs(Math.sin(R)*E)),N=(O>A.middle?A.bottom-O:O-A.top)/(Math.abs(L)+Math.cos(R)*E);if(P<1||N<1)return 1/0;var B=x.EDGECOST*(1/(P-1)+1/(N-1));B+=x.ANGLECOST*R*R;for(var G=D-z,W=O-L,K=D+z,te=O+L,Y=0;Y2*x.MAXCOST)break;N&&(D/=2),O=(E=R-D/2)+1.5*D}if(P<=x.MAXCOST)return z},f.addLabelData=function(T,_,S,A){var M=_.fontSize,E=_.width+M/3,D=Math.max(0,_.height-M/3),O=T.x,R=T.y,z=T.theta,L=Math.sin(z),P=Math.cos(z),N=function(G,W){return[O+G*P-W*L,R+G*L+W*P]},B=[N(-E/2,-D/2),N(-E/2,D/2),N(E/2,D/2),N(E/2,-D/2)];S.push({text:_.text,x:O,y:R,dy:_.dy,theta:z,level:_.level,width:E,height:D}),A.push(B)},f.drawLabels=function(T,_,S,A,M){var E=T.selectAll("text").data(_,function(R){return R.text+","+R.x+","+R.y+","+R.theta});if(E.exit().remove(),E.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(R){var z=R.x+Math.sin(R.theta)*R.dy,L=R.y-Math.cos(R.theta)*R.dy;r.select(this).text(R.text).attr({x:z,y:L,transform:"rotate("+180*R.theta/Math.PI+" "+z+" "+L+")"}).call(i.convertToTspans,S)}),M){for(var D="",O=0;Os.end&&(s.start=s.end=(s.start+s.end)/2),c._input.contours||(c._input.contours={}),a.extendFlat(c._input.contours,{start:s.start,end:s.end,size:s.size}),c._input.autocontour=!0}else if(s.type!=="constraint"){var m,g=s.start,p=s.end,v=c._input.contours;g>p&&(s.start=v.start=p,p=s.end=v.end=g,g=s.start),!(s.size>0)&&(m=g===p?1:l(g,p,c.ncontours).dtick,v.size=s.size=m)}}},{"../../lib":503,"../../plots/cartesian/axes":554}],755:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../components/drawing"),l=e("../heatmap/style"),c=e("./make_color_map");o.exports=function(i){var s=r.select(i).selectAll("g.contour");s.style("opacity",function(u){return u[0].trace.opacity}),s.each(function(u){var d=r.select(this),h=u[0].trace,m=h.contours,g=h.line,p=m.size||1,v=m.start,y=m.type==="constraint",x=!y&&m.coloring==="lines",w=!y&&m.coloring==="fill",k=x||w?c(h):null;d.selectAll("g.contourlevel").each(function(_){r.select(this).selectAll("path").call(a.lineGroupStyle,g.width,x?k(_.level):g.color,g.dash)});var b=m.labelfont;if(d.selectAll("g.contourlabels text").each(function(_){a.font(r.select(this),{family:b.family,size:b.size,color:b.color||(x?k(_.level):g.color)})}),y)d.selectAll("g.contourfill path").style("fill",h.fillcolor);else if(w){var T;d.selectAll("g.contourfill path").style("fill",function(_){return T===void 0&&(T=_.level),k(_.level+.5*p)}),T===void 0&&(T=v),d.selectAll("g.contourbg path").style("fill",k(T-.5*p))}}),l(i)}},{"../../components/drawing":388,"../heatmap/style":805,"./make_color_map":751,"@plotly/d3":58}],756:[function(e,o,f){var r=e("../../components/colorscale/defaults"),a=e("./label_defaults");o.exports=function(l,c,i,s,u){var d,h=i("contours.coloring"),m="";h==="fill"&&(d=i("contours.showlines")),d!==!1&&(h!=="lines"&&(m=i("line.color","#000")),i("line.width",.5),i("line.dash")),h!=="none"&&(l.showlegend!==!0&&(c.showlegend=!1),c._dfltShowLegend=!1,r(l,c,s,i,{prefix:"",cLetter:"z"})),i("line.smoothing"),a(i,s,m,u)}},{"../../components/colorscale/defaults":376,"./label_defaults":750}],757:[function(e,o,f){var r=e("../heatmap/attributes"),a=e("../contour/attributes"),l=e("../../components/colorscale/attributes"),c=e("../../lib/extend").extendFlat,i=a.contours;o.exports=c({carpet:{valType:"string",editType:"calc"},z:r.z,a:r.x,a0:r.x0,da:r.dx,b:r.y,b0:r.y0,db:r.dy,text:r.text,hovertext:r.hovertext,transpose:r.transpose,atype:r.xtype,btype:r.ytype,fillcolor:a.fillcolor,autocontour:a.autocontour,ncontours:a.ncontours,contours:{type:i.type,start:i.start,end:i.end,size:i.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:i.showlines,showlabels:i.showlabels,labelfont:i.labelfont,labelformat:i.labelformat,operation:i.operation,value:i.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:a.line.color,width:a.line.width,dash:a.line.dash,smoothing:a.line.smoothing,editType:"plot"},transforms:void 0},l("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../contour/attributes":735,"../heatmap/attributes":792}],758:[function(e,o,f){var r=e("../../components/colorscale/calc"),a=e("../../lib"),l=e("../heatmap/convert_column_xyz"),c=e("../heatmap/clean_2d_array"),i=e("../heatmap/interp2d"),s=e("../heatmap/find_empties"),u=e("../heatmap/make_bound_array"),d=e("./defaults"),h=e("../carpet/lookup_carpetid"),m=e("../contour/set_contours");o.exports=function(g,p){var v=p._carpetTrace=h(g,p);if(v&&v.visible&&v.visible!=="legendonly"){if(!p.a||!p.b){var y=g.data[v.index],x=g.data[p.index];x.a||(x.a=y.a),x.b||(x.b=y.b),d(x,p,p._defaultColor,g._fullLayout)}var w=function(k,b){var T,_,S,A,M,E,D,O=b._carpetTrace,R=O.aaxis,z=O.baxis;R._minDtick=0,z._minDtick=0,a.isArray1D(b.z)&&l(b,R,z,"a","b",["z"]),T=b._a=b._a||b.a,A=b._b=b._b||b.b,T=T?R.makeCalcdata(b,"_a"):[],A=A?z.makeCalcdata(b,"_b"):[],_=b.a0||0,S=b.da||1,M=b.b0||0,E=b.db||1,D=b._z=c(b._z||b.z,b.transpose),b._emptypoints=s(D),i(D,b._emptypoints);var L=a.maxRowLength(D),P=b.xtype==="scaled"?"":T,N=u(b,P,_,S,L,R),B=b.ytype==="scaled"?"":A,G=u(b,B,M,E,D.length,z),W={a:N,b:G,z:D};return b.contours.type==="levels"&&b.contours.coloring!=="none"&&r(k,b,{vals:D,containerStr:"",cLetter:"z"}),[W]}(g,p);return m(p,p._z),w}}},{"../../components/colorscale/calc":374,"../../lib":503,"../carpet/lookup_carpetid":708,"../contour/set_contours":754,"../heatmap/clean_2d_array":794,"../heatmap/convert_column_xyz":796,"../heatmap/find_empties":798,"../heatmap/interp2d":801,"../heatmap/make_bound_array":803,"./defaults":759}],759:[function(e,o,f){var r=e("../../lib"),a=e("../heatmap/xyz_defaults"),l=e("./attributes"),c=e("../contour/constraint_defaults"),i=e("../contour/contours_defaults"),s=e("../contour/style_defaults");o.exports=function(u,d,h,m){function g(p,v){return r.coerce(u,d,l,p,v)}if(g("carpet"),u.a&&u.b){if(!a(u,d,g,m,"a","b"))return void(d.visible=!1);g("text"),g("contours.type")==="constraint"?c(u,d,g,m,h,{hasHover:!1}):(i(u,d,g,function(p){return r.coerce2(u,d,l,p)}),s(u,d,g,m,{hasHover:!1}))}else d._defaultColor=h,d._length=null}},{"../../lib":503,"../contour/constraint_defaults":740,"../contour/contours_defaults":742,"../contour/style_defaults":756,"../heatmap/xyz_defaults":807,"./attributes":757}],760:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../contour/colorbar"),calc:e("./calc"),plot:e("./plot"),style:e("../contour/style"),moduleType:"trace",name:"contourcarpet",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},{"../../plots/cartesian":568,"../contour/colorbar":738,"../contour/style":755,"./attributes":757,"./calc":758,"./defaults":759,"./plot":761}],761:[function(e,o,f){var r=e("@plotly/d3"),a=e("../carpet/map_1d_array"),l=e("../carpet/makepath"),c=e("../../components/drawing"),i=e("../../lib"),s=e("../contour/make_crossings"),u=e("../contour/find_all_paths"),d=e("../contour/plot"),h=e("../contour/constants"),m=e("../contour/convert_to_constraints"),g=e("../contour/empty_pathinfo"),p=e("../contour/close_boundaries"),v=e("../carpet/lookup_carpetid"),y=e("../carpet/axis_aligned_line");function x(b,T,_){var S=b.getPointAtLength(T),A=b.getPointAtLength(_),M=A.x-S.x,E=A.y-S.y,D=Math.sqrt(M*M+E*E);return[M/D,E/D]}function w(b){var T=Math.sqrt(b[0]*b[0]+b[1]*b[1]);return[b[0]/T,b[1]/T]}function k(b,T){var _=Math.abs(b[0]*T[0]+b[1]*T[1]);return Math.sqrt(1-_*_)/_}o.exports=function(b,T,_,S){var A=T.xaxis,M=T.yaxis;i.makeTraceGroups(S,_,"contour").each(function(E){var D=r.select(this),O=E[0],R=O.trace,z=R._carpetTrace=v(b,R),L=b.calcdata[z.index][0];if(z.visible&&z.visible!=="legendonly"){var P=O.a,N=O.b,B=R.contours,G=g(B,T,O),W=B.type==="constraint",K=B._operation,te=W?K==="="?"lines":"fill":B.coloring,Y=[[P[0],N[N.length-1]],[P[P.length-1],N[N.length-1]],[P[P.length-1],N[0]],[P[0],N[0]]];s(G);var Z=1e-8*(P[P.length-1]-P[0]),re=1e-8*(N[N.length-1]-N[0]);u(G,Z,re);var U,q,$,ne,H=G;B.type==="constraint"&&(H=m(G,K)),function(ae,ue){var le,ge,fe,me,_e,we,Te,Oe,de;for(le=0;le=0;ne--)U=L.clipsegments[ne],q=a([],U.x,A.c2p),$=a([],U.y,M.c2p),q.reverse(),$.reverse(),Q.push(l(q,$,U.bicubic));var ee="M"+Q.join("L")+"Z";(function(ae,ue,le,ge,fe,me){var _e,we,Te,Oe,de=i.ensureSingle(ae,"g","contourbg").selectAll("path").data(me!=="fill"||fe?[]:[0]);de.enter().append("path"),de.exit().remove();var ye=[];for(Oe=0;Oe=0&&(vt=He,At=at):Math.abs(ft[1]-vt[1])=0&&(vt=He,At=at):i.log("endpt to newendpt is not vert. or horz.",ft,vt,He)}if(At>=0)break;Ot+=Ae(ft,vt),ft=vt}if(At===Fe.edgepaths.length){i.log("unclosed perimeter path");break}nt=At,(Jt=Wt.indexOf(nt)===-1)&&(nt=Wt[0],Ot+=Ae(ft,vt)+"Z",ft=null)}for(nt=0;ntUt&&(Tt.max=Ut),Tt.len=Tt.max-Tt.min}(this,At,vt,at,_e,Pt.height),!(at.len<(Pt.width+Pt.height)*h.LABELMIN)))for(var et=Math.min(Math.ceil(at.len/ft),h.LABELMAX),Ot=0;Ot0?+y[g]:0),p.push({type:"Feature",geometry:{type:"Point",coordinates:b},properties:T})}}var S=c.extractOpts(d),A=S.reversescale?c.flipScale(S.colorscale):S.colorscale,M=A[0][1],E=["interpolate",["linear"],["heatmap-density"],0,l.opacity(M)<1?M:l.addOpacity(M,0)];for(g=1;g=0;u--)i.removeLayer(s[u][1])},c.dispose=function(){var i=this.subplot.map;this._removeLayers(),i.removeSource(this.sourceId)},o.exports=function(i,s){var u=s[0].trace,d=new l(i,u.uid),h=d.sourceId,m=r(s),g=d.below=i.belowLookup["trace-"+u.uid];return i.map.addSource(h,{type:"geojson",data:m.geojson}),d._addLayers(m,g),d}},{"../../plots/mapbox/constants":611,"./convert":764}],770:[function(e,o,f){var r=e("../../lib");o.exports=function(a,l){for(var c=0;c"),h.color=function(T,_){var S=T.marker,A=_.mc||S.color,M=_.mlc||S.line.color,E=_.mlw||S.line.width;if(r(A))return A;if(r(M)&&E)return M}(g,v),[h]}}},{"../../components/color":366,"../../lib":503,"../bar/hover":655}],778:[function(e,o,f){o.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults").supplyDefaults,crossTraceDefaults:e("./defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc"),plot:e("./plot"),style:e("./style").style,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("../bar/select"),moduleType:"trace",name:"funnel",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../bar/select":660,"./attributes":771,"./calc":772,"./cross_trace_calc":774,"./defaults":775,"./event_data":776,"./hover":777,"./layout_attributes":779,"./layout_defaults":780,"./plot":781,"./style":782}],779:[function(e,o,f){o.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"}}},{}],780:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes");o.exports=function(l,c,i){var s=!1;function u(m,g){return r.coerce(l,c,a,m,g)}for(var d=0;d path").each(function(x){if(!x.isBlank){var w=y.marker;r.select(this).call(l.fill,x.mc||w.color).call(l.stroke,x.mlc||w.line.color).call(a.dashLine,w.line.dash,x.mlw||w.line.width).style("opacity",y.selectedpoints&&!x.selected?c:1)}}),u(v,y,d),v.selectAll(".regions").each(function(){r.select(this).selectAll("path").style("stroke-width",0).call(l.fill,y.connector.fillcolor)}),v.selectAll(".lines").each(function(){var x=y.connector.line;a.lineGroupStyle(r.select(this).selectAll("path"),x.width,x.color,x.dash)})})}}},{"../../components/color":366,"../../components/drawing":388,"../../constants/interactions":478,"../bar/style":662,"../bar/uniform_text":664,"@plotly/d3":58}],783:[function(e,o,f){var r=e("../pie/attributes"),a=e("../../plots/attributes"),l=e("../../plots/domain").attributes,c=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../plots/template_attributes").texttemplateAttrs,s=e("../../lib/extend").extendFlat;o.exports={labels:r.labels,label0:r.label0,dlabel:r.dlabel,values:r.values,marker:{colors:r.marker.colors,line:{color:s({},r.marker.line.color,{dflt:null}),width:s({},r.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:r.text,hovertext:r.hovertext,scalegroup:s({},r.scalegroup,{}),textinfo:s({},r.textinfo,{flags:["label","text","value","percent"]}),texttemplate:i({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:s({},a.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:c({},{keys:["label","color","value","text","percent"]}),textposition:s({},r.textposition,{values:["inside","none"],dflt:"inside"}),textfont:r.textfont,insidetextfont:r.insidetextfont,title:{text:r.title.text,font:r.title.font,position:s({},r.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:l({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"}}},{"../../lib/extend":493,"../../plots/attributes":550,"../../plots/domain":584,"../../plots/template_attributes":633,"../pie/attributes":901}],784:[function(e,o,f){var r=e("../../plots/plots");f.name="funnelarea",f.plot=function(a,l,c,i){r.plotBasePlot(f.name,a,l,c,i)},f.clean=function(a,l,c,i){r.cleanBasePlot(f.name,a,l,c,i)}},{"../../plots/plots":619}],785:[function(e,o,f){var r=e("../pie/calc");o.exports={calc:function(a,l){return r.calc(a,l)},crossTraceCalc:function(a){r.crossTraceCalc(a,{type:"funnelarea"})}}},{"../pie/calc":903}],786:[function(e,o,f){var r=e("../../lib"),a=e("./attributes"),l=e("../../plots/domain").defaults,c=e("../bar/defaults").handleText,i=e("../pie/defaults").handleLabelsAndValues;o.exports=function(s,u,d,h){function m(T,_){return r.coerce(s,u,a,T,_)}var g=m("labels"),p=m("values"),v=i(g,p),y=v.len;if(u._hasLabels=v.hasLabels,u._hasValues=v.hasValues,!u._hasLabels&&u._hasValues&&(m("label0"),m("dlabel")),y){u._length=y,m("marker.line.width")&&m("marker.line.color",h.paper_bgcolor),m("marker.colors"),m("scalegroup");var x,w=m("text"),k=m("texttemplate");if(k||(x=m("textinfo",Array.isArray(w)?"text+percent":"percent")),m("hovertext"),m("hovertemplate"),k||x&&x!=="none"){var b=m("textposition");c(s,u,h,m,b,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}l(u,h,m),m("title.text")&&(m("title.position"),r.coerceFont(m,"title.font",h.font)),m("aspectratio"),m("baseratio")}else u.visible=!1}},{"../../lib":503,"../../plots/domain":584,"../bar/defaults":652,"../pie/defaults":904,"./attributes":783}],787:[function(e,o,f){o.exports={moduleType:"trace",name:"funnelarea",basePlotModule:e("./base_plot"),categories:["pie-like","funnelarea","showLegend"],attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot"),style:e("./style"),styleOne:e("../pie/style_one"),meta:{}}},{"../pie/style_one":912,"./attributes":783,"./base_plot":784,"./calc":785,"./defaults":786,"./layout_attributes":788,"./layout_defaults":789,"./plot":790,"./style":791}],788:[function(e,o,f){var r=e("../pie/layout_attributes").hiddenlabels;o.exports={hiddenlabels:r,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{"../pie/layout_attributes":908}],789:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes");o.exports=function(l,c){function i(s,u){return r.coerce(l,c,a,s,u)}i("hiddenlabels"),i("funnelareacolorway",c.colorway),i("extendfunnelareacolors")}},{"../../lib":503,"./layout_attributes":788}],790:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../components/drawing"),l=e("../../lib"),c=l.strScale,i=l.strTranslate,s=e("../../lib/svg_text_utils"),u=e("../bar/plot").toMoveInsideBar,d=e("../bar/uniform_text"),h=d.recordMinTextSize,m=d.clearMinTextSize,g=e("../pie/helpers"),p=e("../pie/plot"),v=p.attachFxHandlers,y=p.determineInsideTextFont,x=p.layoutAreas,w=p.prerenderTitles,k=p.positionTitleOutside,b=p.formatSliceLabel;function T(_,S){return"l"+(S[0]-_[0])+","+(S[1]-_[1])}o.exports=function(_,S){var A=_._fullLayout;m("funnelarea",A),w(S,_),x(S,A._size),l.makeTraceGroups(A._funnelarealayer,S,"trace").each(function(M){var E=r.select(this),D=M[0],O=D.trace;(function(R){if(!R.length)return;var z=R[0],L=z.trace,P=L.aspectratio,N=L.baseratio;N>.999&&(N=.999);var B,G=Math.pow(N,2),W=z.vTotal,K=W,te=W*G/(1-G)/W;function Y(){var Te,Oe={x:Te=Math.sqrt(te),y:-Te};return[Oe.x,Oe.y]}var Z,re,U=[];for(U.push(Y()),Z=R.length-1;Z>-1;Z--)if(!(re=R[Z]).hidden){var q=re.v/K;te+=q,U.push(Y())}var $=1/0,ne=-1/0;for(Z=0;Z-1;Z--)if(!(re=R[Z]).hidden){var fe=U[ge+=1][0],me=U[ge][1];re.TL=[-fe,me],re.TR=[fe,me],re.BL=ue,re.BR=le,re.pxmid=(_e=re.TR,we=re.BR,[.5*(_e[0]+we[0]),.5*(_e[1]+we[1])]),ue=re.TL,le=re.TR}var _e,we})(M),E.each(function(){var R=r.select(this).selectAll("g.slice").data(M);R.enter().append("g").classed("slice",!0),R.exit().remove(),R.each(function(L,P){if(L.hidden)r.select(this).selectAll("path,g").remove();else{L.pointNumber=L.i,L.curveNumber=O.index;var N=D.cx,B=D.cy,G=r.select(this),W=G.selectAll("path.surface").data([L]);W.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),G.call(v,_,M);var K="M"+(N+L.TR[0])+","+(B+L.TR[1])+T(L.TR,L.BR)+T(L.BR,L.BL)+T(L.BL,L.TL)+"Z";W.attr("d",K),b(_,L,D);var te=g.castOption(O.textposition,L.pts),Y=G.selectAll("g.slicetext").data(L.text&&te!=="none"?[0]:[]);Y.enter().append("g").classed("slicetext",!0),Y.exit().remove(),Y.each(function(){var Z=l.ensureSingle(r.select(this),"text","",function(ee){ee.attr("data-notex",1)}),re=l.ensureUniformFontSize(_,y(O,L,A.font));Z.text(L.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(a.font,re).call(s.convertToTspans,_);var U,q,$,ne=a.bBox(Z.node()),H=Math.min(L.BL[1],L.BR[1])+B,Q=Math.max(L.TL[1],L.TR[1])+B;q=Math.max(L.TL[0],L.BL[0])+N,$=Math.min(L.TR[0],L.BR[0])+N,(U=u(q,$,H,Q,ne,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=re.size,h(O.type,U,A),M[P].transform=U,Z.attr("transform",l.getTextTransform(U))})}});var z=r.select(this).selectAll("g.titletext").data(O.title.text?[0]:[]);z.enter().append("g").classed("titletext",!0),z.exit().remove(),z.each(function(){var L=l.ensureSingle(r.select(this),"text","",function(B){B.attr("data-notex",1)}),P=O.title.text;O._meta&&(P=l.templateString(P,O._meta)),L.text(P).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(a.font,O.title.font).call(s.convertToTspans,_);var N=k(D,A._size);L.attr("transform",i(N.x,N.y)+c(Math.min(1,N.scale))+i(N.tx,N.ty))})})})}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../bar/plot":659,"../bar/uniform_text":664,"../pie/helpers":906,"../pie/plot":910,"@plotly/d3":58}],791:[function(e,o,f){var r=e("@plotly/d3"),a=e("../pie/style_one"),l=e("../bar/uniform_text").resizeText;o.exports=function(c){var i=c._fullLayout._funnelarealayer.selectAll(".trace");l(c,i,"funnelarea"),i.each(function(s){var u=s[0].trace,d=r.select(this);d.style({opacity:u.opacity}),d.selectAll("path.surface").each(function(h){r.select(this).call(a,h,u)})})}},{"../bar/uniform_text":664,"../pie/style_one":912,"@plotly/d3":58}],792:[function(e,o,f){var r=e("../scatter/attributes"),a=e("../../plots/attributes"),l=e("../../plots/font_attributes"),c=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,i=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../plots/template_attributes").texttemplateAttrs,u=e("../../components/colorscale/attributes"),d=e("../../lib/extend").extendFlat;o.exports=d({z:{valType:"data_array",editType:"calc"},x:d({},r.x,{impliedEdits:{xtype:"array"}}),x0:d({},r.x0,{impliedEdits:{xtype:"scaled"}}),dx:d({},r.dx,{impliedEdits:{xtype:"scaled"}}),y:d({},r.y,{impliedEdits:{ytype:"array"}}),y0:d({},r.y0,{impliedEdits:{ytype:"scaled"}}),dy:d({},r.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:d({},r.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:d({},r.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:d({},r.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:d({},r.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:d({},r.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:d({},r.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:c("x"),yhoverformat:c("y"),zhoverformat:c("z",1),hovertemplate:i(),texttemplate:s({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:l({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:d({},a.showlegend,{dflt:!1})},{transforms:void 0},u("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/font_attributes":585,"../../plots/template_attributes":633,"../scatter/attributes":927}],793:[function(e,o,f){var r=e("../../registry"),a=e("../../lib"),l=e("../../plots/cartesian/axes"),c=e("../../plots/cartesian/align_period"),i=e("../histogram2d/calc"),s=e("../../components/colorscale/calc"),u=e("./convert_column_xyz"),d=e("./clean_2d_array"),h=e("./interp2d"),m=e("./find_empties"),g=e("./make_bound_array"),p=e("../../constants/numerical").BADNUM;function v(y){for(var x=[],w=y.length,k=0;kte){W("x scale is not linear");break}}if(_.length&&B==="fast"){var Y=(_[_.length-1]-_[0])/(_.length-1),Z=Math.abs(Y/100);for(D=0;D<_.length-1;D++)if(Math.abs(_[D+1]-_[D]-Y)>Z){W("y scale is not linear");break}}}}var re=a.maxRowLength(E),U=x.xtype==="scaled"?"":w,q=g(x,U,k,b,re,R),$=x.ytype==="scaled"?"":_,ne=g(x,$,S,A,E.length,z);N||(x._extremes[R._id]=l.findExtremes(R,q),x._extremes[z._id]=l.findExtremes(z,ne));var H={x:q,y:ne,z:E,text:x._text||x.text,hovertext:x._hovertext||x.hovertext};if(x.xperiodalignment&&T&&(H.orig_x=T),x.yperiodalignment&&M&&(H.orig_y=M),U&&U.length===q.length-1&&(H.xCenter=U),$&&$.length===ne.length-1&&(H.yCenter=$),P&&(H.xRanges=O.xRanges,H.yRanges=O.yRanges,H.pts=O.pts),L||s(y,x,{vals:E,cLetter:"z"}),L&&x.contours&&x.contours.coloring==="heatmap"){var Q={type:x.type==="contour"?"heatmap":"histogram2d",xcalendar:x.xcalendar,ycalendar:x.ycalendar};H.xfill=g(Q,U,k,b,re,R),H.yfill=g(Q,$,S,A,E.length,z)}return[H]}},{"../../components/colorscale/calc":374,"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/axes":554,"../../registry":638,"../histogram2d/calc":826,"./clean_2d_array":794,"./convert_column_xyz":796,"./find_empties":798,"./interp2d":801,"./make_bound_array":803}],794:[function(e,o,f){var r=e("fast-isnumeric"),a=e("../../lib"),l=e("../../constants/numerical").BADNUM;o.exports=function(c,i,s,u){var d,h,m,g,p,v;function y(_){if(r(_))return+_}if(i&&i.transpose){for(d=0,p=0;p=0;u--)(d=((p[[(c=(s=v[u])[0])-1,i=s[1]]]||w)[2]+(p[[c+1,i]]||w)[2]+(p[[c,i-1]]||w)[2]+(p[[c,i+1]]||w)[2])/20)&&(h[s]=[c,i,d],v.splice(u,1),m=!0);if(!m)throw"findEmpties iterated with no new neighbors";for(s in h)p[s]=h[s],g.push(h[s])}return g.sort(function(b,T){return T[2]-b[2]})}},{"../../lib":503}],799:[function(e,o,f){var r=e("../../components/fx"),a=e("../../lib"),l=e("../../plots/cartesian/axes"),c=e("../../components/colorscale").extractOpts;o.exports=function(i,s,u,d,h){h||(h={});var m,g,p,v,y=h.isContour,x=i.cd[0],w=x.trace,k=i.xa,b=i.ya,T=x.x,_=x.y,S=x.z,A=x.xCenter,M=x.yCenter,E=x.zmask,D=w.zhoverformat,O=T,R=_;if(i.index!==!1){try{p=Math.round(i.index[1]),v=Math.round(i.index[0])}catch{return void a.error("Error hovering on heatmap, pointNumber must be [row,col], found:",i.index)}if(p<0||p>=S[0].length||v<0||v>S.length)return}else{if(r.inbox(s-T[0],s-T[T.length-1],0)>0||r.inbox(u-_[0],u-_[_.length-1],0)>0)return;if(y){var z;for(O=[2*T[0]-T[1]],z=1;zT&&(S=Math.max(S,Math.abs(i[h][m]-b)/(_-T))))}return S}o.exports=function(i,s){var u,d=1;for(c(i,s),u=0;u.01;u++)d=c(i,s,l(d));return d>.01&&r.log("interp2d didn't converge quickly",d),i}},{"../../lib":503}],802:[function(e,o,f){var r=e("../../lib");o.exports=function(a,l){a("texttemplate");var c=r.extendFlat({},l.font,{color:"auto",size:"auto"});r.coerceFont(a,"textfont",c)}},{"../../lib":503}],803:[function(e,o,f){var r=e("../../registry"),a=e("../../lib").isArrayOrTypedArray;o.exports=function(l,c,i,s,u,d){var h,m,g,p=[],v=r.traceIs(l,"contour"),y=r.traceIs(l,"histogram"),x=r.traceIs(l,"gl2d");if(a(c)&&c.length>1&&!y&&d.type!=="category"){var w=c.length;if(!(w<=u))return v?c.slice(0,u):c.slice(0,u+1);if(v||x)p=c.slice(0,u);else if(u===1)p=[c[0]-.5,c[0]+.5];else{for(p=[1.5*c[0]-.5*c[1]],g=1;g0;)R=M.c2p(U[N]),N--;for(R0;)P=E.c2p(q[N]),N--;if(PJe||Je>E._length))for(B=zt;BEt||Et>M._length)){var It=d({x:st,y:Le},te,T._fullLayout);It.x=st,It.y=Le;var Zt=K.z[N][B];Zt===void 0?(It.z="",It.zLabel=""):(It.z=Zt,It.zLabel=i.tickText(Vt,Zt,"hover").text);var Kt=K.text&&K.text[N]&&K.text[N][B];Kt!==void 0&&Kt!==!1||(Kt=""),It.text=Kt;var Ht=s.texttemplateString(kt,It,T._fullLayout._d3locale,It,te._meta||{});if(Ht){var mn=Ht.split("
"),zn=mn.length,pn=0;for(G=0;G0&&(T=!0);for(var A=0;As){var u=s-c[a];return c[a]=s,u}}return 0},max:function(a,l,c,i){var s=i[l];if(r(s)){if(s=Number(s),!r(c[a]))return c[a]=s,s;if(c[a]u?v>c?v>1.1*a?a:v>1.1*l?l:c:v>i?i:v>s?s:u:Math.pow(10,Math.floor(Math.log(v)/Math.LN10))}function g(v,y,x,w,k,b){if(w&&v>c){var T=p(y,k,b),_=p(x,k,b),S=v===a?0:1;return T[S]!==_[S]}return Math.floor(x/v)-Math.floor(y/v)>.1}function p(v,y,x){var w=y.c2d(v,a,x).split("-");return w[0]===""&&(w.unshift(),w[0]="-"+w[0]),w}o.exports=function(v,y,x,w,k){var b,T,_=-1.1*y,S=-.1*y,A=v-S,M=x[0],E=x[1],D=Math.min(h(M+S,M+A,w,k),h(E+S,E+A,w,k)),O=Math.min(h(M+_,M+S,w,k),h(E+_,E+S,w,k));if(D>O&&Oc){var R=b===a?1:6,z=b===a?"M12":"M1";return function(L,P){var N=w.c2d(L,a,k),B=N.indexOf("-",R);B>0&&(N=N.substr(0,B));var G=w.d2c(N,0,k);if(Gv.r2l(H)&&(ee=c.tickIncrement(ee,O.size,!0,T)),U.start=v.l2r(ee),ne||a.nestedProperty(p,M+".start").set(U.start)}var ie=O.end,ae=v.r2l(re.end),ue=ae!==void 0;if((O.endFound||ue)&&ae!==v.r2l(ie)){var le=ue?ae:a.aggNums(Math.max,null,_);U.end=v.l2r(le),ue||a.nestedProperty(p,M+".start").set(U.end)}var ge="autobin"+y;return p._input[ge]===!1&&(p._input[M]=a.extendFlat({},p[M]||{}),delete p._input[ge],delete p[ge]),[U,_]}o.exports={calc:function(g,p){var v,y,x,w,k=[],b=[],T=p.orientation==="h",_=c.getFromId(g,T?p.yaxis:p.xaxis),S=T?"y":"x",A={x:"y",y:"x"}[S],M=p[S+"calendar"],E=p.cumulative,D=m(g,p,_,S),O=D[0],R=D[1],z=typeof O.size=="string",L=[],P=z?L:O,N=[],B=[],G=[],W=0,K=p.histnorm,te=p.histfunc,Y=K.indexOf("density")!==-1;E.enabled&&Y&&(K=K.replace(/ ?density$/,""),Y=!1);var Z,re=te==="max"||te==="min"?null:0,U=s.count,q=u[K],$=!1,ne=function(de){return _.r2c(de,0,M)};for(a.isArrayOrTypedArray(p[A])&&te!=="count"&&(Z=p[A],$=te==="avg",U=s[te]),v=ne(O.start),x=ne(O.end)+(v-c.tickIncrement(v,O.size,!1,M))/1e6;v=0&&w=0;ke--)Ve(ke);else if(ye==="increasing"){for(ke=1;ke=0;ke--)de[ke]+=de[ke+1];Me==="exclude"&&(de.push(0),de.shift())}}(b,E.direction,E.currentbin);var me=Math.min(k.length,b.length),_e=[],we=0,Te=me-1;for(v=0;v=we;v--)if(b[v]){Te=v;break}for(v=we;v<=Te;v++)if(r(k[v])&&r(b[v])){var Oe={p:k[v],s:b[v],b:0};E.enabled||(Oe.pts=G[v],ae?Oe.ph0=Oe.ph1=G[v].length?R[G[v][0]]:k[v]:(p._computePh=!0,Oe.ph0=ee(L[v]),Oe.ph1=ee(L[v+1],!0))),_e.push(Oe)}return _e.length===1&&(_e[0].width1=c.tickIncrement(_e[0].p,O.size,!1,M)-_e[0].p),i(_e,p),a.isArrayOrTypedArray(p.selectedpoints)&&a.tagSelected(_e,p,ge),_e},calcAllAutoBins:m}},{"../../lib":503,"../../plots/cartesian/axes":554,"../../registry":638,"../bar/arrays_to_calcdata":647,"./average":813,"./bin_functions":815,"./bin_label_vals":816,"./norm_functions":824,"fast-isnumeric":190}],818:[function(e,o,f){o.exports={eventDataKeys:["binNumber"]}},{}],819:[function(e,o,f){var r=e("../../lib"),a=e("../../plots/cartesian/axis_ids"),l=e("../../registry").traceIs,c=e("../bar/defaults").handleGroupingDefaults,i=r.nestedProperty,s=e("../../plots/cartesian/constraints").getAxisGroup,u=[{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"}],d=["x","y"];o.exports=function(h,m){var g,p,v,y,x,w,k,b=m._histogramBinOpts={},T=[],_={},S=[];function A(Y,Z){return r.coerce(g._input,g,g._module.attributes,Y,Z)}function M(Y){return Y.orientation==="v"?"x":"y"}function E(Y,Z,re){var U=Y.uid+"__"+re;Z||(Z=U);var q=function(Q,ee){return a.getFromTrace({_fullLayout:m},Q,ee).type}(Y,re),$=Y[re+"calendar"]||"",ne=b[Z],H=!0;ne&&(q===ne.axType&&$===ne.calendar?(H=!1,ne.traces.push(Y),ne.dirs.push(re)):(Z=U,q!==ne.axType&&r.warn(["Attempted to group the bins of trace",Y.index,"set on a","type:"+q,"axis","with bins on","type:"+ne.axType,"axis."].join(" ")),$!==ne.calendar&&r.warn(["Attempted to group the bins of trace",Y.index,"set with a",$,"calendar","with bins",ne.calendar?"on a "+ne.calendar+" calendar":"w/o a set calendar"].join(" ")))),H&&(b[Z]={traces:[Y],dirs:[re],axType:q,calendar:Y[re+"calendar"]||""}),Y["_"+re+"bingroup"]=Z}for(x=0;xL&&D.splice(L,D.length-L),z.length>L&&z.splice(L,z.length-L);var P=[],N=[],B=[],G=typeof E.size=="string",W=typeof R.size=="string",K=[],te=[],Y=G?K:E,Z=W?te:R,re=0,U=[],q=[],$=p.histnorm,ne=p.histfunc,H=$.indexOf("density")!==-1,Q=ne==="max"||ne==="min"?null:0,ee=l.count,ie=c[$],ae=!1,ue=[],le=[],ge="z"in p?p.z:"marker"in p&&Array.isArray(p.marker.color)?p.marker.color:"";ge&&ne!=="count"&&(ae=ne==="avg",ee=l[ne]);var fe=E.size,me=S(E.start),_e=S(E.end)+(me-a.tickIncrement(me,fe,!1,T))/1e6;for(v=me;v<_e;v=a.tickIncrement(v,fe,!1,T))N.push(Q),K.push(v),ae&&B.push(0);K.push(v);var we,Te=N.length,Oe=(v-me)/Te,de=(we=me+Oe/2,k.c2r(we,0,T)),ye=R.size,Me=A(R.start),ke=A(R.end)+(Me-a.tickIncrement(Me,ye,!1,_))/1e6;for(v=Me;v=0&&x=0&&w-1,flipY:L.tiling.flip.indexOf("y")>-1,orientation:L.tiling.orientation,pad:{inner:L.tiling.pad},maxDepth:L._maxDepth}).descendants(),W=1/0,K=-1/0;G.forEach(function(U){var q=U.depth;q>=L._maxDepth?(U.x0=U.x1=(U.x0+U.x1)/2,U.y0=U.y1=(U.y0+U.y1)/2):(W=Math.min(W,q),K=Math.max(K,q))}),y=y.data(G,d.getPtId),L._maxVisibleLayers=isFinite(K)?K-W+1:0,y.enter().append("g").classed("slice",!0),E(y,!1,{},[w,k],_),y.order();var te=null;if(M&&R){var Y=d.getPtId(R);y.each(function(U){te===null&&d.getPtId(U)===Y&&(te={x0:U.x0,x1:U.x1,y0:U.y0,y1:U.y1})})}var Z=function(){return te||{x0:0,x1:w,y0:0,y1:k}},re=y;return M&&(re=re.transition().each("end",function(){var U=r.select(this);d.setSliceCursor(U,g,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),re.each(function(U){U._x0=b(U.x0),U._x1=b(U.x1),U._y0=T(U.y0),U._y1=T(U.y1),U._hoverX=b(U.x1-L.tiling.pad),U._hoverY=T(B?U.y1-L.tiling.pad/2:U.y0+L.tiling.pad/2);var q=r.select(this),$=a.ensureSingle(q,"path","surface",function(ee){ee.style("pointer-events","all")});M?$.transition().attrTween("d",function(ee){var ie=D(ee,!1,Z(),[w,k],{orientation:L.tiling.orientation,flipX:L.tiling.flip.indexOf("x")>-1,flipY:L.tiling.flip.indexOf("y")>-1});return function(ae){return _(ie(ae))}}):$.attr("d",_),q.call(h,v,g,p,{styleOne:s,eventDataKeys:u.eventDataKeys,transitionTime:u.CLICK_TRANSITION_TIME,transitionEasing:u.CLICK_TRANSITION_EASING}).call(d.setSliceCursor,g,{isTransitioning:g._transitioning}),$.call(s,U,L,{hovered:!1}),U.x0===U.x1||U.y0===U.y1?U._text="":U._text=m(U,v,L,p,z)||"";var ne=a.ensureSingle(q,"g","slicetext"),H=a.ensureSingle(ne,"text","",function(ee){ee.attr("data-notex",1)}),Q=a.ensureUniformFontSize(g,d.determineTextFont(L,U,z.font));H.text(U._text||" ").classed("slicetext",!0).attr("text-anchor",N?"end":P?"start":"middle").call(l.font,Q).call(c.convertToTspans,g),U.textBB=l.bBox(H.node()),U.transform=S(U,{fontSize:Q.size}),U.transform.fontSize=Q.size,M?H.transition().attrTween("transform",function(ee){var ie=O(ee,!1,Z(),[w,k]);return function(ae){return A(ie(ae))}}):H.attr("transform",A(U))}),te}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../sunburst/fx":1054,"../sunburst/helpers":1055,"../sunburst/plot":1059,"../treemap/constants":1078,"./partition":842,"./style":844,"@plotly/d3":58}],839:[function(e,o,f){o.exports={moduleType:"trace",name:"icicle",basePlotModule:e("./base_plot"),categories:[],animatable:!0,attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot"),style:e("./style").style,colorbar:e("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":945,"./attributes":834,"./base_plot":835,"./calc":836,"./defaults":837,"./layout_attributes":840,"./layout_defaults":841,"./plot":843,"./style":844}],840:[function(e,o,f){o.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],841:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes");o.exports=function(l,c){function i(s,u){return r.coerce(l,c,a,s,u)}i("iciclecolorway",c.colorway),i("extendiciclecolors")}},{"../../lib":503,"./layout_attributes":840}],842:[function(e,o,f){var r=e("d3-hierarchy"),a=e("../treemap/flip_tree");o.exports=function(l,c,i){var s=i.flipX,u=i.flipY,d=i.orientation==="h",h=i.maxDepth,m=c[0],g=c[1];h&&(m=(l.height+1)*c[0]/Math.min(l.height+1,h),g=(l.height+1)*c[1]/Math.min(l.height+1,h));var p=r.partition().padding(i.pad.inner).size(d?[c[1],m]:[c[0],g])(l);return(d||s||u)&&a(p,c,{swapXY:d,flipX:s,flipY:u}),p}},{"../treemap/flip_tree":1083,"d3-hierarchy":115}],843:[function(e,o,f){var r=e("../treemap/draw"),a=e("./draw_descendants");o.exports=function(l,c,i,s){return r(l,c,i,s,{type:"icicle",drawDescendants:a})}},{"../treemap/draw":1080,"./draw_descendants":838}],844:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../components/color"),l=e("../../lib"),c=e("../bar/uniform_text").resizeText;function i(s,u,d){var h=u.data.data,m=!u.children,g=h.i,p=l.castOption(d,g,"marker.line.color")||a.defaultLine,v=l.castOption(d,g,"marker.line.width")||0;s.style("stroke-width",v).call(a.fill,h.color).call(a.stroke,p).style("opacity",m?d.leaf.opacity:null)}o.exports={style:function(s){var u=s._fullLayout._iciclelayer.selectAll(".trace");c(s,u,"icicle"),u.each(function(d){var h=r.select(this),m=d[0].trace;h.style("opacity",m.opacity),h.selectAll("path.surface").each(function(g){r.select(this).call(i,g,m)})})},styleOne:i}},{"../../components/color":366,"../../lib":503,"../bar/uniform_text":664,"@plotly/d3":58}],845:[function(e,o,f){for(var r=e("../../plots/attributes"),a=e("../../plots/template_attributes").hovertemplateAttrs,l=e("../../lib/extend").extendFlat,c=e("./constants").colormodel,i=["rgb","rgba","rgba256","hsl","hsla"],s=[],u=[],d=0;d0||r.inbox(s-u.y0,s-(u.y0+u.h*d.dy),0)>0)){var g,p=Math.floor((i-u.x0)/d.dx),v=Math.floor(Math.abs(s-u.y0)/d.dy);if(d._hasZ?g=u.z[v][p]:d._hasSource&&(g=d._canvas.el.getContext("2d").getImageData(p,v,1,1).data),g){var y,x=u.hi||d.hoverinfo;if(x){var w=x.split("+");w.indexOf("all")!==-1&&(w=["color"]),w.indexOf("color")!==-1&&(y=!0)}var k,b=l.colormodel[d.colormodel],T=b.colormodel||d.colormodel,_=T.length,S=d._scaler(g),A=b.suffix,M=[];(d.hovertemplate||y)&&(M.push("["+[S[0]+A[0],S[1]+A[1],S[2]+A[2]].join(", ")),_===4&&M.push(", "+S[3]+A[3]),M.push("]"),M=M.join(""),c.extraText=T.toUpperCase()+": "+M),Array.isArray(d.hovertext)&&Array.isArray(d.hovertext[v])?k=d.hovertext[v][p]:Array.isArray(d.text)&&Array.isArray(d.text[v])&&(k=d.text[v][p]);var E=m.c2p(u.y0+(v+.5)*d.dy),D=u.x0+(p+.5)*d.dx,O=u.y0+(v+.5)*d.dy,R="["+g.slice(0,d.colormodel.length).join(", ")+"]";return[a.extendFlat(c,{index:[v,p],x0:h.c2p(u.x0+p*d.dx),x1:h.c2p(u.x0+(p+1)*d.dx),y0:E,y1:E,color:S,xVal:D,xLabelVal:D,yVal:O,yLabelVal:O,zLabelVal:R,text:k,hovertemplateLabels:{zLabel:R,colorLabel:M,"color[0]Label":S[0]+A[0],"color[1]Label":S[1]+A[1],"color[2]Label":S[2]+A[2],"color[3]Label":S[3]+A[3]}})]}}}},{"../../components/fx":406,"../../lib":503,"./constants":847}],852:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),style:e("./style"),hoverPoints:e("./hover"),eventData:e("./event_data"),moduleType:"trace",name:"image",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},{"../../plots/cartesian":568,"./attributes":845,"./calc":846,"./defaults":848,"./event_data":849,"./hover":851,"./plot":853,"./style":854}],853:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),l=a.strTranslate,c=e("../../constants/xmlns_namespaces"),i=e("./constants"),s=a.isIOS()||a.isSafari()||a.isIE();o.exports=function(u,d,h,m){var g=d.xaxis,p=d.yaxis,v=!(s||u._context._exportedPlot);a.makeTraceGroups(m,h,"im").each(function(y){var x=r.select(this),w=y[0],k=w.trace,b=(k.zsmooth==="fast"||k.zsmooth===!1&&v)&&!k._hasZ&&k._hasSource&&g.type==="linear"&&p.type==="linear";k._realImage=b;var T,_,S,A,M,E,D=w.z,O=w.x0,R=w.y0,z=w.w,L=w.h,P=k.dx,N=k.dy;for(E=0;T===void 0&&E0;)_=g.c2p(O+E*P),E--;for(E=0;A===void 0&&E0;)M=p.c2p(R+E*N),E--;_Y[0];if(Z||re){var U=T+B/2,q=A+G/2;K+="transform:"+l(U+"px",q+"px")+"scale("+(Z?-1:1)+","+(re?-1:1)+")"+l(-U+"px",-q+"px")+";"}}W.attr("style",K);var $=new Promise(function(H){if(k._hasZ)H();else if(k._hasSource)if(k._canvas&&k._canvas.el.width===z&&k._canvas.el.height===L&&k._canvas.source===k.source)H();else{var Q=document.createElement("canvas");Q.width=z,Q.height=L;var ee=Q.getContext("2d");k._image=k._image||new Image;var ie=k._image;ie.onload=function(){ee.drawImage(ie,0,0),k._canvas={el:Q,source:k.source},H()},ie.setAttribute("src",k.source)}}).then(function(){var H;if(k._hasZ)H=ne(function(ee,ie){return D[ie][ee]}).toDataURL("image/png");else if(k._hasSource)if(b)H=k.source;else{var Q=k._canvas.el.getContext("2d").getImageData(0,0,z,L).data;H=ne(function(ee,ie){var ae=4*(ie*z+ee);return[Q[ae],Q[ae+1],Q[ae+2],Q[ae+3]]}).toDataURL("image/png")}W.attr({"xlink:href":H,height:G,width:B,x:T,y:A})});u._promises.push($)}function ne(H){var Q=document.createElement("canvas");Q.width=B,Q.height=G;var ee,ie=Q.getContext("2d"),ae=function(de){return a.constrain(Math.round(g.c2p(O+de*P)-T),0,B)},ue=function(de){return a.constrain(Math.round(p.c2p(R+de*N)-A),0,G)},le=i.colormodel[k.colormodel],ge=le.colormodel||k.colormodel,fe=le.fmt;for(E=0;E0}function S(O){O.each(function(R){w.stroke(r.select(this),R.line.color)}).each(function(R){w.fill(r.select(this),R.color)}).style("stroke-width",function(R){return R.line.width})}function A(O,R,z){var L=O._fullLayout,P=c.extendFlat({type:"linear",ticks:"outside",range:z,showline:!0},R),N={type:"linear",_id:"x"+R._id},B={letter:"x",font:L.font,noHover:!0,noTickson:!0};function G(W,K){return c.coerce(P,N,x,W,K)}return v(P,N,G,B,L),y(P,N,G,B),N}function M(O,R,z){return[Math.min(R/O.width,z/O.height),O,R+"x"+z]}function E(O,R,z,L){var P=document.createElementNS("http://www.w3.org/2000/svg","text"),N=r.select(P);return N.text(O).attr("x",0).attr("y",0).attr("text-anchor",z).attr("data-unformatted",O).call(g.convertToTspans,L).call(h.font,R),h.bBox(N.node())}function D(O,R,z,L,P,N){var B="_cache"+R;O[B]&&O[B].key===P||(O[B]={key:P,value:z});var G=c.aggNums(N,null,[O[B].value,L],2);return O[B].value=G,G}o.exports=function(O,R,z,L){var P,N=O._fullLayout;_(z)&&L&&(P=L()),c.makeTraceGroups(N._indicatorlayer,R,"trace").each(function(B){var G,W,K,te,Y,Z=B[0].trace,re=r.select(this),U=Z._hasGauge,q=Z._isAngular,$=Z._isBullet,ne=Z.domain,H={w:N._size.w*(ne.x[1]-ne.x[0]),h:N._size.h*(ne.y[1]-ne.y[0]),l:N._size.l+N._size.w*ne.x[0],r:N._size.r+N._size.w*(1-ne.x[1]),t:N._size.t+N._size.h*(1-ne.y[1]),b:N._size.b+N._size.h*ne.y[0]},Q=H.l+H.w/2,ee=H.t+H.h/2,ie=Math.min(H.w/2,H.h),ae=m.innerRadius*ie,ue=Z.align||"center";if(W=ee,U){if(q&&(G=Q,W=ee+ie/2,K=function(Oe){return function(de,ye){var Me=Math.sqrt(de.width/2*(de.width/2)+de.height*de.height);return[ye/Me,de,ye]}(Oe,.9*ae)}),$){var le=m.bulletPadding,ge=1-m.bulletNumberDomainSize+le;G=H.l+(ge+(1-ge)*b[ue])*H.w,K=function(Oe){return M(Oe,(m.bulletNumberDomainSize-le)*H.w,H.h)}}}else G=H.l+b[ue]*H.w,K=function(Oe){return M(Oe,H.w,H.h)};(function(Oe,de,ye,Me){var ke,Ee,ze,Fe=ye[0].trace,Ve=Me.numbersX,Ke=Me.numbersY,Re=Fe.align||"center",qe=k[Re],We=Me.transitionOpts,Ye=Me.onComplete,nt=c.ensureSingle(de,"g","numbers"),ft=[];Fe._hasNumber&&ft.push("number"),Fe._hasDelta&&(ft.push("delta"),Fe.delta.position==="left"&&ft.reverse());var vt=nt.selectAll("text").data(ft);function Pt(Ge,Tt,dt,Pe){if(!Ge.match("s")||dt>=0==Pe>=0||Tt(dt).slice(-1).match(T)||Tt(Pe).slice(-1).match(T))return Tt;var Ie=Ge.slice().replace("s","f").replace(/\d+/,function(De){return parseInt(De)-1}),Ae=A(Oe,{tickformat:Ie});return function(De){return Math.abs(De)<1?p.tickText(Ae,De).text:Tt(De)}}vt.enter().append("text"),vt.attr("text-anchor",function(){return qe}).attr("class",function(Ge){return Ge}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),vt.exit().remove();var At,at=Fe.mode+Fe.align;if(Fe._hasDelta&&(At=function(){var Ge=A(Oe,{tickformat:Fe.delta.valueformat},Fe._range);Ge.setScale(),p.prepTicks(Ge);var Tt=function(He){return p.tickText(Ge,He).text},dt=function(He){return Fe.delta.relative?He.relativeDelta:He.delta},Pe=function(He,rt){return He===0||typeof He!="number"||isNaN(He)?"-":(He>0?Fe.delta.increasing.symbol:Fe.delta.decreasing.symbol)+rt(He)},Ie=function(He){return He.delta>=0?Fe.delta.increasing.color:Fe.delta.decreasing.color};Fe._deltaLastValue===void 0&&(Fe._deltaLastValue=dt(ye[0]));var Ae=nt.select("text.delta");function De(){Ae.text(Pe(dt(ye[0]),Tt)).call(w.fill,Ie(ye[0])).call(g.convertToTspans,Oe)}return Ae.call(h.font,Fe.delta.font).call(w.fill,Ie({delta:Fe._deltaLastValue})),_(We)?Ae.transition().duration(We.duration).ease(We.easing).tween("text",function(){var He=r.select(this),rt=dt(ye[0]),lt=Fe._deltaLastValue,ot=Pt(Fe.delta.valueformat,Tt,lt,rt),kt=l(lt,rt);return Fe._deltaLastValue=rt,function(wt){He.text(Pe(kt(wt),ot)),He.call(w.fill,Ie({delta:kt(wt)}))}}).each("end",function(){De(),Ye&&Ye()}).each("interrupt",function(){De(),Ye&&Ye()}):De(),Ee=E(Pe(dt(ye[0]),Tt),Fe.delta.font,qe,Oe),Ae}(),at+=Fe.delta.position+Fe.delta.font.size+Fe.delta.font.family+Fe.delta.valueformat,at+=Fe.delta.increasing.symbol+Fe.delta.decreasing.symbol,ze=Ee),Fe._hasNumber&&(function(){var Ge=A(Oe,{tickformat:Fe.number.valueformat},Fe._range);Ge.setScale(),p.prepTicks(Ge);var Tt=function(De){return p.tickText(Ge,De).text},dt=Fe.number.suffix,Pe=Fe.number.prefix,Ie=nt.select("text.number");function Ae(){var De=typeof ye[0].y=="number"?Pe+Tt(ye[0].y)+dt:"-";Ie.text(De).call(h.font,Fe.number.font).call(g.convertToTspans,Oe)}_(We)?Ie.transition().duration(We.duration).ease(We.easing).each("end",function(){Ae(),Ye&&Ye()}).each("interrupt",function(){Ae(),Ye&&Ye()}).attrTween("text",function(){var De=r.select(this),He=l(ye[0].lastY,ye[0].y);Fe._lastValue=ye[0].y;var rt=Pt(Fe.number.valueformat,Tt,ye[0].lastY,ye[0].y);return function(lt){De.text(Pe+rt(He(lt))+dt)}}):Ae(),ke=E(Pe+Tt(ye[0].y)+dt,Fe.number.font,qe,Oe)}(),at+=Fe.number.font.size+Fe.number.font.family+Fe.number.valueformat+Fe.number.suffix+Fe.number.prefix,ze=ke),Fe._hasDelta&&Fe._hasNumber){var et,Ot,Wt=[(ke.left+ke.right)/2,(ke.top+ke.bottom)/2],Jt=[(Ee.left+Ee.right)/2,(Ee.top+Ee.bottom)/2],Be=.75*Fe.delta.font.size;Fe.delta.position==="left"&&(et=D(Fe,"deltaPos",0,-1*(ke.width*b[Fe.align]+Ee.width*(1-b[Fe.align])+Be),at,Math.min),Ot=Wt[1]-Jt[1],ze={width:ke.width+Ee.width+Be,height:Math.max(ke.height,Ee.height),left:Ee.left+et,right:ke.right,top:Math.min(ke.top,Ee.top+Ot),bottom:Math.max(ke.bottom,Ee.bottom+Ot)}),Fe.delta.position==="right"&&(et=D(Fe,"deltaPos",0,ke.width*(1-b[Fe.align])+Ee.width*b[Fe.align]+Be,at,Math.max),Ot=Wt[1]-Jt[1],ze={width:ke.width+Ee.width+Be,height:Math.max(ke.height,Ee.height),left:ke.left,right:Ee.right+et,top:Math.min(ke.top,Ee.top+Ot),bottom:Math.max(ke.bottom,Ee.bottom+Ot)}),Fe.delta.position==="bottom"&&(et=null,Ot=Ee.height,ze={width:Math.max(ke.width,Ee.width),height:ke.height+Ee.height,left:Math.min(ke.left,Ee.left),right:Math.max(ke.right,Ee.right),top:ke.bottom-ke.height,bottom:ke.bottom+Ee.height}),Fe.delta.position==="top"&&(et=null,Ot=ke.top,ze={width:Math.max(ke.width,Ee.width),height:ke.height+Ee.height,left:Math.min(ke.left,Ee.left),right:Math.max(ke.right,Ee.right),top:ke.bottom-ke.height-Ee.height,bottom:ke.bottom}),At.attr({dx:et,dy:Ot})}(Fe._hasNumber||Fe._hasDelta)&&nt.attr("transform",function(){var Ge=Me.numbersScaler(ze);at+=Ge[2];var Tt,dt=D(Fe,"numbersScale",1,Ge[0],at,Math.min);Fe._scaleNumbers||(dt=1),Tt=Fe._isAngular?Ke-dt*ze.bottom:Ke-dt*(ze.top+ze.bottom)/2,Fe._numbersTop=dt*ze.top+Tt;var Pe=ze[Re];Re==="center"&&(Pe=(ze.left+ze.right)/2);var Ie=Ve-dt*Pe;return Ie=D(Fe,"numbersTranslate",0,Ie,at,Math.max),s(Ie,Tt)+i(dt)})})(O,re,B,{numbersX:G,numbersY:W,numbersScaler:K,transitionOpts:z,onComplete:P}),U&&(te={range:Z.gauge.axis.range,color:Z.gauge.bgcolor,line:{color:Z.gauge.bordercolor,width:0},thickness:1},Y={range:Z.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:Z.gauge.bordercolor,width:Z.gauge.borderwidth},thickness:1});var fe=re.selectAll("g.angular").data(q?B:[]);fe.exit().remove();var me=re.selectAll("g.angularaxis").data(q?B:[]);me.exit().remove(),q&&function(Oe,de,ye,Me){var ke,Ee,ze,Fe,Ve=ye[0].trace,Ke=Me.size,Re=Me.radius,qe=Me.innerRadius,We=Me.gaugeBg,Ye=Me.gaugeOutline,nt=[Ke.l+Ke.w/2,Ke.t+Ke.h/2+Re/2],ft=Me.gauge,vt=Me.layer,Pt=Me.transitionOpts,At=Me.onComplete,at=Math.PI/2;function et(Ut){var tt=Ve.gauge.axis.range[0],bt=(Ut-tt)/(Ve.gauge.axis.range[1]-tt)*Math.PI-at;return bt<-at?-at:bt>at?at:bt}function Ot(Ut){return r.svg.arc().innerRadius((qe+Re)/2-Ut/2*(Re-qe)).outerRadius((qe+Re)/2+Ut/2*(Re-qe)).startAngle(-at)}function Wt(Ut){Ut.attr("d",function(tt){return Ot(tt.thickness).startAngle(et(tt.range[0])).endAngle(et(tt.range[1]))()})}ft.enter().append("g").classed("angular",!0),ft.attr("transform",s(nt[0],nt[1])),vt.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),vt.selectAll("g.xangularaxistick,path,text").remove(),(ke=A(Oe,Ve.gauge.axis)).type="linear",ke.range=Ve.gauge.axis.range,ke._id="xangularaxis",ke.ticklabeloverflow="allow",ke.setScale();var Jt=function(Ut){return(ke.range[0]-Ut.x)/(ke.range[1]-ke.range[0])*Math.PI+Math.PI},Be={},Ge=p.makeLabelFns(ke,0).labelStandoff;Be.xFn=function(Ut){var tt=Jt(Ut);return Math.cos(tt)*Ge},Be.yFn=function(Ut){var tt=Jt(Ut),bt=Math.sin(tt)>0?.2:1;return-Math.sin(tt)*(Ge+Ut.fontSize*bt)+Math.abs(Math.cos(tt))*(Ut.fontSize*d)},Be.anchorFn=function(Ut){var tt=Jt(Ut),bt=Math.cos(tt);return Math.abs(bt)<.1?"middle":bt>0?"start":"end"},Be.heightFn=function(Ut,tt,bt){var zt=Jt(Ut);return-.5*(1+Math.sin(zt))*bt};var Tt=function(Ut){return s(nt[0]+Re*Math.cos(Ut),nt[1]-Re*Math.sin(Ut))};if(ze=function(Ut){return Tt(Jt(Ut))},Ee=p.calcTicks(ke),Fe=p.getTickSigns(ke)[2],ke.visible){Fe=ke.ticks==="inside"?-1:1;var dt=(ke.linewidth||1)/2;p.drawTicks(Oe,ke,{vals:Ee,layer:vt,path:"M"+Fe*dt+",0h"+Fe*ke.ticklen,transFn:function(Ut){var tt=Jt(Ut);return Tt(tt)+"rotate("+-u(tt)+")"}}),p.drawLabels(Oe,ke,{vals:Ee,layer:vt,transFn:ze,labelFns:Be})}var Pe=[We].concat(Ve.gauge.steps),Ie=ft.selectAll("g.bg-arc").data(Pe);Ie.enter().append("g").classed("bg-arc",!0).append("path"),Ie.select("path").call(Wt).call(S),Ie.exit().remove();var Ae=Ot(Ve.gauge.bar.thickness),De=ft.selectAll("g.value-arc").data([Ve.gauge.bar]);De.enter().append("g").classed("value-arc",!0).append("path");var He=De.select("path");_(Pt)?(He.transition().duration(Pt.duration).ease(Pt.easing).each("end",function(){At&&At()}).each("interrupt",function(){At&&At()}).attrTween("d",(rt=Ae,lt=et(ye[0].lastY),ot=et(ye[0].y),function(){var Ut=a(lt,ot);return function(tt){return rt.endAngle(Ut(tt))()}})),Ve._lastValue=ye[0].y):He.attr("d",typeof ye[0].y=="number"?Ae.endAngle(et(ye[0].y)):"M0,0Z");var rt,lt,ot;He.call(S),De.exit().remove(),Pe=[];var kt=Ve.gauge.threshold.value;(kt||kt===0)&&Pe.push({range:[kt,kt],color:Ve.gauge.threshold.color,line:{color:Ve.gauge.threshold.line.color,width:Ve.gauge.threshold.line.width},thickness:Ve.gauge.threshold.thickness});var wt=ft.selectAll("g.threshold-arc").data(Pe);wt.enter().append("g").classed("threshold-arc",!0).append("path"),wt.select("path").call(Wt).call(S),wt.exit().remove();var Vt=ft.selectAll("g.gauge-outline").data([Ye]);Vt.enter().append("g").classed("gauge-outline",!0).append("path"),Vt.select("path").call(Wt).call(S),Vt.exit().remove()}(O,0,B,{radius:ie,innerRadius:ae,gauge:fe,layer:me,size:H,gaugeBg:te,gaugeOutline:Y,transitionOpts:z,onComplete:P});var _e=re.selectAll("g.bullet").data($?B:[]);_e.exit().remove();var we=re.selectAll("g.bulletaxis").data($?B:[]);we.exit().remove(),$&&function(Oe,de,ye,Me){var ke,Ee,ze,Fe,Ve,Ke=ye[0].trace,Re=Me.gauge,qe=Me.layer,We=Me.gaugeBg,Ye=Me.gaugeOutline,nt=Me.size,ft=Ke.domain,vt=Me.transitionOpts,Pt=Me.onComplete;Re.enter().append("g").classed("bullet",!0),Re.attr("transform",s(nt.l,nt.t)),qe.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),qe.selectAll("g.xbulletaxistick,path,text").remove();var At=nt.h,at=Ke.gauge.bar.thickness*At,et=ft.x[0],Ot=ft.x[0]+(ft.x[1]-ft.x[0])*(Ke._hasNumber||Ke._hasDelta?1-m.bulletNumberDomainSize:1);(ke=A(Oe,Ke.gauge.axis))._id="xbulletaxis",ke.domain=[et,Ot],ke.setScale(),Ee=p.calcTicks(ke),ze=p.makeTransTickFn(ke),Fe=p.getTickSigns(ke)[2],Ve=nt.t+nt.h,ke.visible&&(p.drawTicks(Oe,ke,{vals:ke.ticks==="inside"?p.clipEnds(ke,Ee):Ee,layer:qe,path:p.makeTickPath(ke,Ve,Fe),transFn:ze}),p.drawLabels(Oe,ke,{vals:Ee,layer:qe,transFn:ze,labelFns:p.makeLabelFns(ke,Ve)}));function Wt(Ie){Ie.attr("width",function(Ae){return Math.max(0,ke.c2p(Ae.range[1])-ke.c2p(Ae.range[0]))}).attr("x",function(Ae){return ke.c2p(Ae.range[0])}).attr("y",function(Ae){return .5*(1-Ae.thickness)*At}).attr("height",function(Ae){return Ae.thickness*At})}var Jt=[We].concat(Ke.gauge.steps),Be=Re.selectAll("g.bg-bullet").data(Jt);Be.enter().append("g").classed("bg-bullet",!0).append("rect"),Be.select("rect").call(Wt).call(S),Be.exit().remove();var Ge=Re.selectAll("g.value-bullet").data([Ke.gauge.bar]);Ge.enter().append("g").classed("value-bullet",!0).append("rect"),Ge.select("rect").attr("height",at).attr("y",(At-at)/2).call(S),_(vt)?Ge.select("rect").transition().duration(vt.duration).ease(vt.easing).each("end",function(){Pt&&Pt()}).each("interrupt",function(){Pt&&Pt()}).attr("width",Math.max(0,ke.c2p(Math.min(Ke.gauge.axis.range[1],ye[0].y)))):Ge.select("rect").attr("width",typeof ye[0].y=="number"?Math.max(0,ke.c2p(Math.min(Ke.gauge.axis.range[1],ye[0].y))):0),Ge.exit().remove();var Tt=ye.filter(function(){return Ke.gauge.threshold.value||Ke.gauge.threshold.value===0}),dt=Re.selectAll("g.threshold-bullet").data(Tt);dt.enter().append("g").classed("threshold-bullet",!0).append("line"),dt.select("line").attr("x1",ke.c2p(Ke.gauge.threshold.value)).attr("x2",ke.c2p(Ke.gauge.threshold.value)).attr("y1",(1-Ke.gauge.threshold.thickness)/2*At).attr("y2",(1-(1-Ke.gauge.threshold.thickness)/2)*At).call(w.stroke,Ke.gauge.threshold.line.color).style("stroke-width",Ke.gauge.threshold.line.width),dt.exit().remove();var Pe=Re.selectAll("g.gauge-outline").data([Ye]);Pe.enter().append("g").classed("gauge-outline",!0).append("rect"),Pe.select("rect").call(Wt).call(S),Pe.exit().remove()}(O,0,B,{gauge:_e,layer:we,size:H,gaugeBg:te,gaugeOutline:Y,transitionOpts:z,onComplete:P});var Te=re.selectAll("text.title").data(B);Te.exit().remove(),Te.enter().append("text").classed("title",!0),Te.attr("text-anchor",function(){return $?k.right:k[Z.title.align]}).text(Z.title.text).call(h.font,Z.title.font).call(g.convertToTspans,O),Te.attr("transform",function(){var Oe,de=H.l+H.w*b[Z.title.align],ye=m.titlePadding,Me=h.bBox(Te.node());return U?(q&&(Z.gauge.axis.visible?Oe=h.bBox(me.node()).top-ye-Me.bottom:Oe=H.t+H.h/2-ie/2-Me.bottom-ye),$&&(Oe=W-(Me.top+Me.bottom)/2,de=H.l-m.bulletPadding*H.w)):Oe=Z._numbersTop-ye-Me.bottom,s(de,Oe)})})}},{"../../components/color":366,"../../components/drawing":388,"../../constants/alignment":471,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"../../plots/cartesian/axis_defaults":556,"../../plots/cartesian/layout_attributes":569,"../../plots/cartesian/position_defaults":572,"./constants":858,"@plotly/d3":58,"d3-interpolate":116}],862:[function(e,o,f){var r=e("../../components/colorscale/attributes"),a=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,l=e("../../plots/template_attributes").hovertemplateAttrs,c=e("../mesh3d/attributes"),i=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat,u=e("../../plot_api/edit_types").overrideAll,d=o.exports=u(s({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:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:l(),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),valuehoverformat:a("value",1),showlegend:s({},i.showlegend,{dflt:!1})},r("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:c.opacity,lightposition:c.lightposition,lighting:c.lighting,flatshading:c.flatshading,contour:c.contour,hoverinfo:s({},i.hoverinfo)}),"calc","nested");d.flatshading.dflt=!0,d.lighting.facenormalsepsilon.dflt=0,d.x.editType=d.y.editType=d.z.editType=d.value.editType="calc+clearAxisTypes",d.transforms=void 0},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../mesh3d/attributes":867}],863:[function(e,o,f){var r=e("../../components/colorscale/calc"),a=e("../streamtube/calc").processGrid,l=e("../streamtube/calc").filter;o.exports=function(c,i){i._len=Math.min(i.x.length,i.y.length,i.z.length,i.value.length),i._x=l(i.x,i._len),i._y=l(i.y,i._len),i._z=l(i.z,i._len),i._value=l(i.value,i._len);var s=a(i);i._gridFill=s.fill,i._Xs=s.Xs,i._Ys=s.Ys,i._Zs=s.Zs,i._len=s.len;for(var u=1/0,d=-1/0,h=0;h0;v--){var y=Math.min(p[v],p[v-1]),x=Math.max(p[v],p[v-1]);if(x>y&&y-1}function Q(Re,qe){return Re===null?qe:Re}function ee(Re,qe,We){re();var Ye,nt,ft,vt=[qe],Pt=[We];if(b>=1)vt=[qe],Pt=[We];else if(b>0){var At=function(dt,Pe){var Ie=dt[0],Ae=dt[1],De=dt[2],He=function(tt,bt,zt){for(var St=[],Dt=0;Dt-1?We[Ot]:Z(Wt,Jt,Be);et[Ot]=Tt>-1?Tt:q(Wt,Jt,Be,Q(Re,Ge))}Ye=et[0],nt=et[1],ft=et[2],g._meshI.push(Ye),g._meshJ.push(nt),g._meshK.push(ft),++D}}function ie(Re,qe,We,Ye){var nt=Re[3];ntYe&&(nt=Ye);for(var ft=(Re[3]-nt)/(Re[3]-qe[3]+1e-9),vt=[],Pt=0;Pt<4;Pt++)vt[Pt]=(1-ft)*Re[Pt]+ft*qe[Pt];return vt}function ae(Re,qe,We){return Re>=qe&&Re<=We}function ue(Re){var qe=.001*(Y-te);return Re>=te-qe&&Re<=Y+qe}function le(Re){for(var qe=[],We=0;We<4;We++){var Ye=Re[We];qe.push([g._x[Ye],g._y[Ye],g._z[Ye],g._value[Ye]])}return qe}function ge(Re,qe,We,Ye,nt,ft){ft||(ft=1),We=[-1,-1,-1];var vt=!1,Pt=[ae(qe[0][3],Ye,nt),ae(qe[1][3],Ye,nt),ae(qe[2][3],Ye,nt)];if(!Pt[0]&&!Pt[1]&&!Pt[2])return!1;var At=function(et,Ot,Wt){return ue(Ot[0][3])&&ue(Ot[1][3])&&ue(Ot[2][3])?(ee(et,Ot,Wt),!0):ft<3&&ge(et,Ot,Wt,te,Y,++ft)};if(Pt[0]&&Pt[1]&&Pt[2])return At(Re,qe,We)||vt;var at=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(et){if(Pt[et[0]]&&Pt[et[1]]&&!Pt[et[2]]){var Ot=qe[et[0]],Wt=qe[et[1]],Jt=qe[et[2]],Be=ie(Jt,Ot,Ye,nt),Ge=ie(Jt,Wt,Ye,nt);vt=At(Re,[Ge,Be,Ot],[-1,-1,We[et[0]]])||vt,vt=At(Re,[Ot,Wt,Ge],[We[et[0]],We[et[1]],-1])||vt,at=!0}}),at||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(et){if(Pt[et[0]]&&!Pt[et[1]]&&!Pt[et[2]]){var Ot=qe[et[0]],Wt=qe[et[1]],Jt=qe[et[2]],Be=ie(Wt,Ot,Ye,nt),Ge=ie(Jt,Ot,Ye,nt);vt=At(Re,[Ge,Be,Ot],[-1,-1,We[et[0]]])||vt,at=!0}}),vt}function fe(Re,qe,We,Ye){var nt=!1,ft=le(qe),vt=[ae(ft[0][3],We,Ye),ae(ft[1][3],We,Ye),ae(ft[2][3],We,Ye),ae(ft[3][3],We,Ye)];if(!(vt[0]||vt[1]||vt[2]||vt[3]))return nt;if(vt[0]&&vt[1]&&vt[2]&&vt[3])return E&&(nt=function(At,at,et){var Ot=function(Wt,Jt,Be){ee(At,[at[Wt],at[Jt],at[Be]],[et[Wt],et[Jt],et[Be]])};Ot(0,1,2),Ot(3,0,1),Ot(2,3,0),Ot(1,2,3)}(Re,ft,qe)||nt),nt;var Pt=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(At){if(vt[At[0]]&&vt[At[1]]&&vt[At[2]]&&!vt[At[3]]){var at=ft[At[0]],et=ft[At[1]],Ot=ft[At[2]],Wt=ft[At[3]];if(E)nt=ee(Re,[at,et,Ot],[qe[At[0]],qe[At[1]],qe[At[2]]])||nt;else{var Jt=ie(Wt,at,We,Ye),Be=ie(Wt,et,We,Ye),Ge=ie(Wt,Ot,We,Ye);nt=ee(null,[Jt,Be,Ge],[-1,-1,-1])||nt}Pt=!0}}),Pt||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach(function(At){if(vt[At[0]]&&vt[At[1]]&&!vt[At[2]]&&!vt[At[3]]){var at=ft[At[0]],et=ft[At[1]],Ot=ft[At[2]],Wt=ft[At[3]],Jt=ie(Ot,at,We,Ye),Be=ie(Ot,et,We,Ye),Ge=ie(Wt,et,We,Ye),Tt=ie(Wt,at,We,Ye);E?(nt=ee(Re,[at,Tt,Jt],[qe[At[0]],-1,-1])||nt,nt=ee(Re,[et,Be,Ge],[qe[At[1]],-1,-1])||nt):nt=function(dt,Pe,Ie){var Ae=function(De,He,rt){ee(dt,[Pe[De],Pe[He],Pe[rt]],[Ie[De],Ie[He],Ie[rt]])};Ae(0,1,2),Ae(2,3,0)}(null,[Jt,Be,Ge,Tt],[-1,-1,-1,-1])||nt,Pt=!0}}),Pt||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(At){if(vt[At[0]]&&!vt[At[1]]&&!vt[At[2]]&&!vt[At[3]]){var at=ft[At[0]],et=ft[At[1]],Ot=ft[At[2]],Wt=ft[At[3]],Jt=ie(et,at,We,Ye),Be=ie(Ot,at,We,Ye),Ge=ie(Wt,at,We,Ye);E?(nt=ee(Re,[at,Jt,Be],[qe[At[0]],-1,-1])||nt,nt=ee(Re,[at,Be,Ge],[qe[At[0]],-1,-1])||nt,nt=ee(Re,[at,Ge,Jt],[qe[At[0]],-1,-1])||nt):nt=ee(null,[Jt,Be,Ge],[-1,-1,-1])||nt,Pt=!0}})),nt}function me(Re,qe,We,Ye,nt,ft,vt,Pt,At,at,et){var Ot=!1;return M&&(H(Re,"A")&&(Ot=fe(null,[qe,We,Ye,ft],at,et)||Ot),H(Re,"B")&&(Ot=fe(null,[We,Ye,nt,At],at,et)||Ot),H(Re,"C")&&(Ot=fe(null,[We,ft,vt,At],at,et)||Ot),H(Re,"D")&&(Ot=fe(null,[Ye,ft,Pt,At],at,et)||Ot),H(Re,"E")&&(Ot=fe(null,[We,Ye,ft,At],at,et)||Ot)),E&&(Ot=fe(Re,[We,Ye,ft,At],at,et)||Ot),Ot}function _e(Re,qe,We,Ye,nt,ft,vt,Pt){return[Pt[0]===!0||ge(Re,le([qe,We,Ye]),[qe,We,Ye],ft,vt),Pt[1]===!0||ge(Re,le([Ye,nt,qe]),[Ye,nt,qe],ft,vt)]}function we(Re,qe,We,Ye,nt,ft,vt,Pt,At){return Pt?_e(Re,qe,We,nt,Ye,ft,vt,At):_e(Re,We,nt,Ye,qe,ft,vt,At)}function Te(Re,qe,We,Ye,nt,ft,vt){var Pt,At,at,et,Ot=!1,Wt=function(){Ot=ge(Re,[Pt,At,at],[-1,-1,-1],nt,ft)||Ot,Ot=ge(Re,[at,et,Pt],[-1,-1,-1],nt,ft)||Ot},Jt=vt[0],Be=vt[1],Ge=vt[2];return Jt&&(Pt=$(le([G(qe,We-0,Ye-0)])[0],le([G(qe-1,We-0,Ye-0)])[0],Jt),At=$(le([G(qe,We-0,Ye-1)])[0],le([G(qe-1,We-0,Ye-1)])[0],Jt),at=$(le([G(qe,We-1,Ye-1)])[0],le([G(qe-1,We-1,Ye-1)])[0],Jt),et=$(le([G(qe,We-1,Ye-0)])[0],le([G(qe-1,We-1,Ye-0)])[0],Jt),Wt()),Be&&(Pt=$(le([G(qe-0,We,Ye-0)])[0],le([G(qe-0,We-1,Ye-0)])[0],Be),At=$(le([G(qe-0,We,Ye-1)])[0],le([G(qe-0,We-1,Ye-1)])[0],Be),at=$(le([G(qe-1,We,Ye-1)])[0],le([G(qe-1,We-1,Ye-1)])[0],Be),et=$(le([G(qe-1,We,Ye-0)])[0],le([G(qe-1,We-1,Ye-0)])[0],Be),Wt()),Ge&&(Pt=$(le([G(qe-0,We-0,Ye)])[0],le([G(qe-0,We-0,Ye-1)])[0],Ge),At=$(le([G(qe-0,We-1,Ye)])[0],le([G(qe-0,We-1,Ye-1)])[0],Ge),at=$(le([G(qe-1,We-1,Ye)])[0],le([G(qe-1,We-1,Ye-1)])[0],Ge),et=$(le([G(qe-1,We-0,Ye)])[0],le([G(qe-1,We-0,Ye-1)])[0],Ge),Wt()),Ot}function Oe(Re,qe,We,Ye,nt,ft,vt,Pt,At,at,et,Ot){var Wt=Re;return Ot?(M&&Re==="even"&&(Wt=null),me(Wt,qe,We,Ye,nt,ft,vt,Pt,At,at,et)):(M&&Re==="odd"&&(Wt=null),me(Wt,At,Pt,vt,ft,nt,Ye,We,qe,at,et))}function de(Re,qe,We,Ye,nt){for(var ft=[],vt=0,Pt=0;PtMath.abs(nt-K)?[W,nt]:[nt,K];Ee(Re,ft[0],ft[1])}}var vt=[[Math.min(te,K),Math.max(te,K)],[Math.min(W,Y),Math.max(W,Y)]];["x","y","z"].forEach(function(Pt){for(var At=[],at=0;at0&&(Ge.push(Pe.id),Pt==="x"?Tt.push([Pe.distRatio,0,0]):Pt==="y"?Tt.push([0,Pe.distRatio,0]):Tt.push([0,0,Pe.distRatio]))}else Be=Ke(1,Pt==="x"?L-1:Pt==="y"?P-1:N-1);Ge.length>0&&(At[et]=Pt==="x"?ze(null,Ge,Ot,Wt,Tt,At[et]):Pt==="y"?Fe(null,Ge,Ot,Wt,Tt,At[et]):Ve(null,Ge,Ot,Wt,Tt,At[et]),et++),Be.length>0&&(At[et]=Pt==="x"?de(null,Be,Ot,Wt,At[et]):Pt==="y"?ye(null,Be,Ot,Wt,At[et]):Me(null,Be,Ot,Wt,At[et]),et++)}var Ie=g.caps[Pt];Ie.show&&Ie.fill&&(ne(Ie.fill),At[et]=Pt==="x"?de(null,[0,L-1],Ot,Wt,At[et]):Pt==="y"?ye(null,[0,P-1],Ot,Wt,At[et]):Me(null,[0,N-1],Ot,Wt,At[et]),et++)}}),D===0&&U(),g._meshX=y,g._meshY=x,g._meshZ=w,g._meshIntensity=k,g._Xs=O,g._Ys=R,g._Zs=z}(),g}o.exports={findNearestOnAxis:s,generateIsoMeshes:m,createIsosurfaceTrace:function(g,p){var v=g.glplot.gl,y=r({gl:v}),x=new u(g,y,p.uid);return y._trace=x,x.update(p),g.glplot.add(y),x}}},{"../../../stackgl_modules":1124,"../../components/colorscale":378,"../../lib/gl_format_color":499,"../../lib/str2rgbarray":528,"../../plots/gl3d/zip3":609}],865:[function(e,o,f){var r=e("../../lib"),a=e("../../registry"),l=e("./attributes"),c=e("../../components/colorscale/defaults");function i(s,u,d,h,m){var g=m("isomin"),p=m("isomax");p!=null&&g!=null&&g>p&&(u.isomin=null,u.isomax=null);var v=m("x"),y=m("y"),x=m("z"),w=m("value");v&&v.length&&y&&y.length&&x&&x.length&&w&&w.length?(a.getComponentMethod("calendars","handleTraceDefaults")(s,u,["x","y","z"],h),m("valuehoverformat"),["x","y","z"].forEach(function(k){m(k+"hoverformat");var b="caps."+k;m(b+".show")&&m(b+".fill");var T="slices."+k;m(T+".show")&&(m(T+".fill"),m(T+".locations"))}),m("spaceframe.show")&&m("spaceframe.fill"),m("surface.show")&&(m("surface.count"),m("surface.fill"),m("surface.pattern")),m("contour.show")&&(m("contour.color"),m("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(k){m(k)}),c(s,u,h,m,{prefix:"",cLetter:"c"}),u._length=null):u.visible=!1}o.exports={supplyDefaults:function(s,u,d,h){i(s,u,d,h,function(m,g){return r.coerce(s,u,l,m,g)})},supplyIsoDefaults:i}},{"../../components/colorscale/defaults":376,"../../lib":503,"../../registry":638,"./attributes":862}],866:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults").supplyDefaults,calc:e("./calc"),colorbar:{min:"cmin",max:"cmax"},plot:e("./convert").createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:e("../../plots/gl3d"),categories:["gl3d","showLegend"],meta:{}}},{"../../plots/gl3d":598,"./attributes":862,"./calc":863,"./convert":864,"./defaults":865}],867:[function(e,o,f){var r=e("../../components/colorscale/attributes"),a=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,l=e("../../plots/template_attributes").hovertemplateAttrs,c=e("../surface/attributes"),i=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat;o.exports=s({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:l({editType:"calc"}),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("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"},transforms:void 0},r("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:c.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:s({},c.contours.x.show,{}),color:c.contours.x.color,width:c.contours.x.width,editType:"calc"},lightposition:{x:s({},c.lightposition.x,{dflt:1e5}),y:s({},c.lightposition.y,{dflt:1e5}),z:s({},c.lightposition.z,{dflt:0}),editType:"calc"},lighting:s({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},c.lighting),hoverinfo:s({},i.hoverinfo,{editType:"calc"}),showlegend:s({},i.showlegend,{dflt:!1})})},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633,"../surface/attributes":1061}],868:[function(e,o,f){var r=e("../../components/colorscale/calc");o.exports=function(a,l){l.intensity&&r(a,l,{vals:l.intensity,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":374}],869:[function(e,o,f){var r=e("../../../stackgl_modules").gl_mesh3d,a=e("../../../stackgl_modules").delaunay_triangulate,l=e("../../../stackgl_modules").alpha_shape,c=e("../../../stackgl_modules").convex_hull,i=e("../../lib/gl_format_color").parseColorScale,s=e("../../lib/str2rgbarray"),u=e("../../components/colorscale").extractOpts,d=e("../../plots/gl3d/zip3");function h(x,w,k){this.scene=x,this.uid=k,this.mesh=w,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var m=h.prototype;function g(x){for(var w=[],k=x.length,b=0;b=w-.5)return!1;return!0}m.handlePick=function(x){if(x.object===this.mesh){var w=x.index=x.data.index;x.data._cellCenter?x.traceCoordinate=x.data.dataCoordinate:x.traceCoordinate=[this.data.x[w],this.data.y[w],this.data.z[w]];var k=this.data.hovertext||this.data.text;return Array.isArray(k)&&k[w]!==void 0?x.textLabel=k[w]:k&&(x.textLabel=k),!0}},m.update=function(x){var w=this.scene,k=w.fullSceneLayout;this.data=x;var b,T=x.x.length,_=d(p(k.xaxis,x.x,w.dataScale[0],x.xcalendar),p(k.yaxis,x.y,w.dataScale[1],x.ycalendar),p(k.zaxis,x.z,w.dataScale[2],x.zcalendar));if(x.i&&x.j&&x.k){if(x.i.length!==x.j.length||x.j.length!==x.k.length||!y(x.i,T)||!y(x.j,T)||!y(x.k,T))return;b=d(v(x.i),v(x.j),v(x.k))}else b=x.alphahull===0?c(_):x.alphahull>0?l(x.alphahull,_):function(E,D){for(var O=["x","y","z"].indexOf(E),R=[],z=D.length,L=0;LS):_=L>O,S=L;var P=v(O,R,z,L);P.pos=D,P.yc=(O+L)/2,P.i=E,P.dir=_?"increasing":"decreasing",P.x=P.pos,P.y=[z,R],A&&(P.orig_p=m[E]),b&&(P.tx=h.text[E]),T&&(P.htx=h.hovertext[E]),M.push(P)}else M.push({pos:D,empty:!0})}return h._extremes[p._id]=l.findExtremes(p,r.concat(w,x),{padded:!0}),M.length&&(M[0].t={labels:{open:a(d,"open:")+" ",high:a(d,"high:")+" ",low:a(d,"low:")+" ",close:a(d,"close:")+" "}}),M}o.exports={calc:function(d,h){var m=l.getFromId(d,h.xaxis),g=l.getFromId(d,h.yaxis),p=function(k,b,T){var _=T._minDiff;if(!_){var S,A=k._fullData,M=[];for(_=1/0,S=0;S"+b.labels[R]+r.hoverLabelText(w,z,k.yhoverformat):((O=a.extendFlat({},_)).y0=O.y1=L,O.yLabelVal=z,O.yLabel=b.labels[R]+r.hoverLabelText(w,z,k.yhoverformat),O.name="",T.push(O),E[z]=O)}return T}function m(g,p,v,y){var x=g.cd,w=g.ya,k=x[0].trace,b=x[0].t,T=d(g,p,v,y);if(!T)return[];var _=x[T.index],S=T.index=_.i,A=_.dir;function M(P){return b.labels[P]+r.hoverLabelText(w,k[P][S],k.yhoverformat)}var E=_.hi||k.hoverinfo,D=E.split("+"),O=E==="all",R=O||D.indexOf("y")!==-1,z=O||D.indexOf("text")!==-1,L=R?[M("open"),M("high"),M("low"),M("close")+" "+u[A]]:[];return z&&i(_,k,L),T.extraText=L.join("
"),T.y0=T.y1=w.c2p(_.yc,!0),[T]}o.exports={hoverPoints:function(g,p,v,y){return g.cd[0].trace.hoverlabel.split?h(g,p,v,y):m(g,p,v,y)},hoverSplit:h,hoverOnPoints:m}},{"../../components/color":366,"../../components/fx":406,"../../constants/delta.js":473,"../../lib":503,"../../plots/cartesian/axes":554}],876:[function(e,o,f){o.exports={moduleType:"trace",name:"ohlc",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","showLegend"],meta:{},attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc").calc,plot:e("./plot"),style:e("./style"),hoverPoints:e("./hover").hoverPoints,selectPoints:e("./select")}},{"../../plots/cartesian":568,"./attributes":872,"./calc":873,"./defaults":874,"./hover":875,"./plot":878,"./select":879,"./style":880}],877:[function(e,o,f){var r=e("../../registry"),a=e("../../lib");o.exports=function(l,c,i,s){var u=i("x"),d=i("open"),h=i("high"),m=i("low"),g=i("close");if(i("hoverlabel.split"),r.getComponentMethod("calendars","handleTraceDefaults")(l,c,["x"],s),d&&h&&m&&g){var p=Math.min(d.length,h.length,m.length,g.length);return u&&(p=Math.min(p,a.minRowLength(u))),c._length=p,p}}},{"../../lib":503,"../../registry":638}],878:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib");o.exports=function(l,c,i,s){var u=c.yaxis,d=c.xaxis,h=!!d.rangebreaks;a.makeTraceGroups(s,i,"trace ohlc").each(function(m){var g=r.select(this),p=m[0],v=p.t;if(p.trace.visible!==!0||v.empty)g.remove();else{var y=v.tickLen,x=g.selectAll("path").data(a.identity);x.enter().append("path"),x.exit().remove(),x.attr("d",function(w){if(w.empty)return"M0,0Z";var k=d.c2p(w.pos-y,!0),b=d.c2p(w.pos+y,!0),T=h?(k+b)/2:d.c2p(w.pos,!0);return"M"+k+","+u.c2p(w.o,!0)+"H"+T+"M"+T+","+u.c2p(w.h,!0)+"V"+u.c2p(w.l,!0)+"M"+b+","+u.c2p(w.c,!0)+"H"+T})}})}},{"../../lib":503,"@plotly/d3":58}],879:[function(e,o,f){o.exports=function(r,a){var l,c=r.cd,i=r.xaxis,s=r.yaxis,u=[],d=c[0].t.bPos||0;if(a===!1)for(l=0;l=U.length||q[U[$]]!==void 0)return!1;q[U[$]]=!0}return!0}(Z.map(function(U){return U.displayindex})))for(re=0;re0;w&&(y="array");var k=g("categoryorder",y);k==="array"?(g("categoryarray"),g("ticktext")):(delete h.categoryarray,delete h.ticktext),w||k!=="array"||(m.categoryorder="trace")}}o.exports=function(h,m,g,p){function v(b,T){return r.coerce(h,m,s,b,T)}var y=i(h,m,{name:"dimensions",handleItemDefaults:d}),x=function(b,T,_,S,A){A("line.shape"),A("line.hovertemplate");var M=A("line.color",S.colorway[0]);if(a(b,"line")&&r.isArrayOrTypedArray(M)){if(M.length)return A("line.colorscale"),l(b,T,S,A,{prefix:"line.",cLetter:"c"}),M.length;T.line.color=_}return 1/0}(h,m,g,p,v);c(m,p,v),Array.isArray(y)&&y.length||(m.visible=!1),u(m,y,"values",x),v("hoveron"),v("hovertemplate"),v("arrangement"),v("bundlecolors"),v("sortpaths"),v("counts");var w={family:p.font.family,size:Math.round(p.font.size),color:p.font.color};r.coerceFont(v,"labelfont",w);var k={family:p.font.family,size:Math.round(p.font.size/1.2),color:p.font.color};r.coerceFont(v,"tickfont",k)}},{"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/domain":584,"../parcoords/merge_length":898,"./attributes":881}],885:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:e("./base_plot"),categories:["noOpacity"],meta:{}}},{"./attributes":881,"./base_plot":882,"./calc":883,"./defaults":884,"./plot":887}],886:[function(e,o,f){var r=e("@plotly/d3"),a=e("d3-interpolate").interpolateNumber,l=e("../../plot_api/plot_api"),c=e("../../components/fx"),i=e("../../lib"),s=i.strTranslate,u=e("../../components/drawing"),d=e("tinycolor2"),h=e("../../lib/svg_text_utils");function m(U,q,$,ne){var H=U.map(K.bind(0,q,$)),Q=ne.selectAll("g.parcatslayer").data([null]);Q.enter().append("g").attr("class","parcatslayer").style("pointer-events","all");var ee=Q.selectAll("g.trace.parcats").data(H,g),ie=ee.enter().append("g").attr("class","trace parcats");ee.attr("transform",function(Te){return s(Te.x,Te.y)}),ie.append("g").attr("class","paths");var ae=ee.select("g.paths").selectAll("path.path").data(function(Te){return Te.paths},g);ae.attr("fill",function(Te){return Te.model.color});var ue=ae.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Te){return Te.model.color}).attr("fill-opacity",0);T(ue),ae.attr("d",function(Te){return Te.svgD}),ue.empty()||ae.sort(v),ae.exit().remove(),ae.on("mouseover",y).on("mouseout",x).on("click",b),ie.append("g").attr("class","dimensions");var le=ee.select("g.dimensions").selectAll("g.dimension").data(function(Te){return Te.dimensions},g);le.enter().append("g").attr("class","dimension"),le.attr("transform",function(Te){return s(Te.x,0)}),le.exit().remove();var ge=le.selectAll("g.category").data(function(Te){return Te.categories},g),fe=ge.enter().append("g").attr("class","category");ge.attr("transform",function(Te){return s(0,Te.y)}),fe.append("rect").attr("class","catrect").attr("pointer-events","none"),ge.select("rect.catrect").attr("fill","none").attr("width",function(Te){return Te.width}).attr("height",function(Te){return Te.height}),S(fe);var me=ge.selectAll("rect.bandrect").data(function(Te){return Te.bands},g);me.each(function(){i.raiseToTop(this)}),me.attr("fill",function(Te){return Te.color});var _e=me.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Te){return Te.color}).attr("fill-opacity",0);me.attr("fill",function(Te){return Te.color}).attr("width",function(Te){return Te.width}).attr("height",function(Te){return Te.height}).attr("y",function(Te){return Te.y}).attr("cursor",function(Te){return Te.parcatsViewModel.arrangement==="fixed"?"default":Te.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),A(_e),me.exit().remove(),fe.append("text").attr("class","catlabel").attr("pointer-events","none");var we=q._fullLayout.paper_bgcolor;ge.select("text.catlabel").attr("text-anchor",function(Te){return p(Te)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",h.makeTextShadow(we)).style("fill","rgb(0, 0, 0)").attr("x",function(Te){return p(Te)?Te.width+5:-5}).attr("y",function(Te){return Te.height/2}).text(function(Te){return Te.model.categoryLabel}).each(function(Te){u.font(r.select(this),Te.parcatsViewModel.categorylabelfont),h.convertToTspans(r.select(this),q)}),fe.append("text").attr("class","dimlabel"),ge.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Te){return Te.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Te){return Te.width/2}).attr("y",-5).text(function(Te,Oe){return Oe===0?Te.parcatsViewModel.model.dimensions[Te.model.dimensionInd].dimensionLabel:null}).each(function(Te){u.font(r.select(this),Te.parcatsViewModel.labelfont)}),ge.selectAll("rect.bandrect").on("mouseover",R).on("mouseout",z),ge.exit().remove(),le.call(r.behavior.drag().origin(function(Te){return{x:Te.x,y:0}}).on("dragstart",L).on("drag",P).on("dragend",N)),ee.each(function(Te){Te.traceSelection=r.select(this),Te.pathSelection=r.select(this).selectAll("g.paths").selectAll("path.path"),Te.dimensionSelection=r.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),ee.exit().remove()}function g(U){return U.key}function p(U){var q=U.parcatsViewModel.dimensions.length,$=U.parcatsViewModel.dimensions[q-1].model.dimensionInd;return U.model.dimensionInd===$}function v(U,q){return U.model.rawColor>q.model.rawColor?1:U.model.rawColor"),Ee=r.mouse(ie)[0];c.loneHover({trace:ae,x:_e-le.left+ge.left,y:we-le.top+ge.top,text:ke,color:U.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Te,idealAlign:Ee<_e?"right":"left",hovertemplate:(ae.line||{}).hovertemplate,hovertemplateLabels:ye,eventData:[{data:ae._input,fullData:ae,count:Oe,probability:de}]},{container:ue._hoverlayer.node(),outerContainer:ue._paper.node(),gd:ie})}}}function x(U){if(!U.parcatsViewModel.dragDimension&&(T(r.select(this)),c.loneUnhover(U.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),U.parcatsViewModel.pathSelection.sort(v),U.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var q=w(U),$=k(U);U.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:q,event:r.event,constraints:$})}}function w(U){for(var q=[],$=B(U.parcatsViewModel),ne=0;ne1&&ge.displayInd===le.dimensions.length-1?(ne=ae.left,H="left"):(ne=ae.left+ae.width,H="right");var _e=ue.model.count,we=ue.model.categoryLabel,Te=_e/ue.parcatsViewModel.model.count,Oe={countLabel:_e,categoryLabel:we,probabilityLabel:Te.toFixed(3)},de=[];ue.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&de.push(["Count:",Oe.countLabel].join(" ")),ue.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&de.push(["P("+Oe.categoryLabel+"):",Oe.probabilityLabel].join(" "));var ye=de.join("
");return{trace:fe,x:Q*(ne-q.left),y:ee*(me-q.top),text:ye,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:H,hovertemplate:fe.hovertemplate,hovertemplateLabels:Oe,eventData:[{data:fe._input,fullData:fe,count:_e,category:we,probability:Te}]}}function R(U){if(!U.parcatsViewModel.dragDimension&&U.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){if(r.mouse(this)[1]<-1)return;var q,$=U.parcatsViewModel.graphDiv,ne=$._fullLayout,H=ne._paperdiv.node().getBoundingClientRect(),Q=U.parcatsViewModel.hoveron;Q==="color"?(function(ee){var ie=r.select(ee).datum(),ae=M(ie);_(ae),ae.each(function(){i.raiseToTop(this)}),r.select(ee.parentNode).selectAll("rect.bandrect").filter(function(ue){return ue.color===ie.color}).each(function(){i.raiseToTop(this),r.select(this).attr("stroke","black").attr("stroke-width",1.5)})}(this),D(this,"plotly_hover",r.event)):(function(ee){r.select(ee.parentNode).selectAll("rect.bandrect").each(function(ie){var ae=M(ie);_(ae),ae.each(function(){i.raiseToTop(this)})}),r.select(ee.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(this),E(this,"plotly_hover",r.event)),U.parcatsViewModel.hoverinfoItems.indexOf("none")===-1&&(Q==="category"?q=O($,H,this):Q==="color"?q=function(ee,ie,ae){ee._fullLayout._calcInverseTransform(ee);var ue,le,ge=ee._fullLayout._invScaleX,fe=ee._fullLayout._invScaleY,me=ae.getBoundingClientRect(),_e=r.select(ae).datum(),we=_e.categoryViewModel,Te=we.parcatsViewModel,Oe=Te.model.dimensions[we.model.dimensionInd],de=Te.trace,ye=me.y+me.height/2;Te.dimensions.length>1&&Oe.displayInd===Te.dimensions.length-1?(ue=me.left,le="left"):(ue=me.left+me.width,le="right");var Me=we.model.categoryLabel,ke=_e.parcatsViewModel.model.count,Ee=0;_e.categoryViewModel.bands.forEach(function(ft){ft.color===_e.color&&(Ee+=ft.count)});var ze=we.model.count,Fe=0;Te.pathSelection.each(function(ft){ft.model.color===_e.color&&(Fe+=ft.model.count)});var Ve=Ee/ke,Ke=Ee/Fe,Re=Ee/ze,qe={countLabel:ke,categoryLabel:Me,probabilityLabel:Ve.toFixed(3)},We=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&We.push(["Count:",qe.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(We.push("P(color \u2229 "+Me+"): "+qe.probabilityLabel),We.push("P("+Me+" | color): "+Ke.toFixed(3)),We.push("P(color | "+Me+"): "+Re.toFixed(3)));var Ye=We.join("
"),nt=d.mostReadable(_e.color,["black","white"]);return{trace:de,x:ge*(ue-ie.left),y:fe*(ye-ie.top),text:Ye,color:_e.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:nt,fontSize:10,idealAlign:le,hovertemplate:de.hovertemplate,hovertemplateLabels:qe,eventData:[{data:de._input,fullData:de,category:Me,count:ke,probability:Ve,categorycount:ze,colorcount:Fe,bandcolorcount:Ee}]}}($,H,this):Q==="dimension"&&(q=function(ee,ie,ae){var ue=[];return r.select(ae.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){ue.push(O(ee,ie,this))}),ue}($,H,this)),q&&c.loneHover(q,{container:ne._hoverlayer.node(),outerContainer:ne._paper.node(),gd:$}))}}function z(U){var q=U.parcatsViewModel;!q.dragDimension&&(T(q.pathSelection),S(q.dimensionSelection.selectAll("g.category")),A(q.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),c.loneUnhover(q.graphDiv._fullLayout._hoverlayer.node()),q.pathSelection.sort(v),q.hoverinfoItems.indexOf("skip")===-1)&&(U.parcatsViewModel.hoveron==="color"?D(this,"plotly_unhover",r.event):E(this,"plotly_unhover",r.event))}function L(U){U.parcatsViewModel.arrangement!=="fixed"&&(U.dragDimensionDisplayInd=U.model.displayInd,U.initialDragDimensionDisplayInds=U.parcatsViewModel.model.dimensions.map(function(q){return q.displayInd}),U.dragHasMoved=!1,U.dragCategoryDisplayInd=null,r.select(this).selectAll("g.category").select("rect.catrect").each(function(q){var $=r.mouse(this)[0],ne=r.mouse(this)[1];-2<=$&&$<=q.width+2&&-2<=ne&&ne<=q.height+2&&(U.dragCategoryDisplayInd=q.model.displayInd,U.initialDragCategoryDisplayInds=U.model.categories.map(function(H){return H.displayInd}),q.model.dragY=q.y,i.raiseToTop(this.parentNode),r.select(this.parentNode).selectAll("rect.bandrect").each(function(H){H.yle.y+le.height/2&&(Q.model.displayInd=le.model.displayInd,le.model.displayInd=ie),U.dragCategoryDisplayInd=Q.model.displayInd}if(U.dragCategoryDisplayInd===null||U.parcatsViewModel.arrangement==="freeform"){H.model.dragX=r.event.x;var ge=U.parcatsViewModel.dimensions[$],fe=U.parcatsViewModel.dimensions[ne];ge!==void 0&&H.model.dragXfe.x&&(H.model.displayInd=fe.model.displayInd,fe.model.displayInd=U.dragDimensionDisplayInd),U.dragDimensionDisplayInd=H.model.displayInd}Z(U.parcatsViewModel),Y(U.parcatsViewModel),W(U.parcatsViewModel),G(U.parcatsViewModel)}}function N(U){if(U.parcatsViewModel.arrangement!=="fixed"&&U.dragDimensionDisplayInd!==null){r.select(this).selectAll("text").attr("font-weight","normal");var q={},$=B(U.parcatsViewModel),ne=U.parcatsViewModel.model.dimensions.map(function(le){return le.displayInd}),H=U.initialDragDimensionDisplayInds.some(function(le,ge){return le!==ne[ge]});H&&ne.forEach(function(le,ge){var fe=U.parcatsViewModel.model.dimensions[ge].containerInd;q["dimensions["+fe+"].displayindex"]=le});var Q=!1;if(U.dragCategoryDisplayInd!==null){var ee=U.model.categories.map(function(le){return le.displayInd});if(Q=U.initialDragCategoryDisplayInds.some(function(le,ge){return le!==ee[ge]})){var ie=U.model.categories.slice().sort(function(le,ge){return le.displayInd-ge.displayInd}),ae=ie.map(function(le){return le.categoryValue}),ue=ie.map(function(le){return le.categoryLabel});q["dimensions["+U.model.containerInd+"].categoryarray"]=[ae],q["dimensions["+U.model.containerInd+"].ticktext"]=[ue],q["dimensions["+U.model.containerInd+"].categoryorder"]="array"}}U.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!U.dragHasMoved&&U.potentialClickBand&&(U.parcatsViewModel.hoveron==="color"?D(U.potentialClickBand,"plotly_click",r.event.sourceEvent):E(U.potentialClickBand,"plotly_click",r.event.sourceEvent)),U.model.dragX=null,U.dragCategoryDisplayInd!==null&&(U.parcatsViewModel.dimensions[U.dragDimensionDisplayInd].categories[U.dragCategoryDisplayInd].model.dragY=null,U.dragCategoryDisplayInd=null),U.dragDimensionDisplayInd=null,U.parcatsViewModel.dragDimension=null,U.dragHasMoved=null,U.potentialClickBand=null,Z(U.parcatsViewModel),Y(U.parcatsViewModel),r.transition().duration(300).ease("cubic-in-out").each(function(){W(U.parcatsViewModel,!0),G(U.parcatsViewModel,!0)}).each("end",function(){(H||Q)&&l.restyle(U.parcatsViewModel.graphDiv,q,[$])})}}function B(U){for(var q,$=U.graphDiv._fullData,ne=0;ne<$.length;ne++)if(U.key===$[ne].uid){q=ne;break}return q}function G(U,q){var $;q===void 0&&(q=!1),U.pathSelection.data(function(ne){return ne.paths},g),($=U.pathSelection,q?$.transition():$).attr("d",function(ne){return ne.svgD})}function W(U,q){function $(ee){return q?ee.transition():ee}q===void 0&&(q=!1),U.dimensionSelection.data(function(ee){return ee.dimensions},g);var ne=U.dimensionSelection.selectAll("g.category").data(function(ee){return ee.categories},g);$(U.dimensionSelection).attr("transform",function(ee){return s(ee.x,0)}),$(ne).attr("transform",function(ee){return s(0,ee.y)}),ne.select(".dimlabel").text(function(ee,ie){return ie===0?ee.parcatsViewModel.model.dimensions[ee.model.dimensionInd].dimensionLabel:null}),ne.select(".catlabel").attr("text-anchor",function(ee){return p(ee)?"start":"end"}).attr("x",function(ee){return p(ee)?ee.width+5:-5}).each(function(ee){var ie,ae;p(ee)?(ie=ee.width+5,ae="start"):(ie=-5,ae="end"),r.select(this).selectAll("tspan").attr("x",ie).attr("text-anchor",ae)});var H=ne.selectAll("rect.bandrect").data(function(ee){return ee.bands},g),Q=H.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(ee){return ee.color}).attr("fill-opacity",0);H.attr("fill",function(ee){return ee.color}).attr("width",function(ee){return ee.width}).attr("height",function(ee){return ee.height}).attr("y",function(ee){return ee.y}),A(Q),H.each(function(){i.raiseToTop(this)}),H.exit().remove()}function K(U,q,$){var ne,H=$[0],Q=q.margin||{l:80,r:80,t:100,b:80},ee=H.trace,ie=ee.domain,ae=q.width,ue=q.height,le=Math.floor(ae*(ie.x[1]-ie.x[0])),ge=Math.floor(ue*(ie.y[1]-ie.y[0])),fe=ie.x[0]*ae+Q.l,me=q.height-ie.y[1]*q.height+Q.t,_e=ee.line.shape;ne=ee.hoverinfo==="all"?["count","probability"]:(ee.hoverinfo||"").split("+");var we={trace:ee,key:ee.uid,model:H,x:fe,y:me,width:le,height:ge,hoveron:ee.hoveron,hoverinfoItems:ne,arrangement:ee.arrangement,bundlecolors:ee.bundlecolors,sortpaths:ee.sortpaths,labelfont:ee.labelfont,categorylabelfont:ee.tickfont,pathShape:_e,dragDimension:null,margin:Q,paths:[],dimensions:[],graphDiv:U,traceSelection:null,pathSelection:null,dimensionSelection:null};return H.dimensions&&(Z(we),Y(we)),we}function te(U,q,$,ne,H){var Q,ee,ie=[],ae=[];for(ee=0;ee<$.length-1;ee++)Q=a($[ee]+U[ee],U[ee+1]),ie.push(Q(H)),ae.push(Q(1-H));var ue="M "+U[0]+","+q[0];for(ue+="l"+$[0]+",0 ",ee=1;ee<$.length;ee++)ue+="C"+ie[ee-1]+","+q[ee-1]+" "+ae[ee-1]+","+q[ee]+" "+U[ee]+","+q[ee],ue+="l"+$[ee]+",0 ";for(ue+="l0,"+ne+" ",ue+="l -"+$[$.length-1]+",0 ",ee=$.length-2;ee>=0;ee--)ue+="C"+ae[ee]+","+(q[ee+1]+ne)+" "+ie[ee]+","+(q[ee]+ne)+" "+(U[ee]+$[ee])+","+(q[ee]+ne),ue+="l-"+$[ee]+",0 ";return ue+="Z"}function Y(U){var q=U.dimensions,$=U.model,ne=q.map(function(We){return We.categories.map(function(Ye){return Ye.y})}),H=U.model.dimensions.map(function(We){return We.categories.map(function(Ye){return Ye.displayInd})}),Q=U.model.dimensions.map(function(We){return We.displayInd}),ee=U.dimensions.map(function(We){return We.model.dimensionInd}),ie=q.map(function(We){return We.x}),ae=q.map(function(We){return We.width}),ue=[];for(var le in $.paths)$.paths.hasOwnProperty(le)&&ue.push($.paths[le]);function ge(We){var Ye=We.categoryInds.map(function(nt,ft){return H[ft][nt]});return ee.map(function(nt){return Ye[nt]})}ue.sort(function(We,Ye){var nt=ge(We),ft=ge(Ye);return U.sortpaths==="backward"&&(nt.reverse(),ft.reverse()),nt.push(We.valueInds[0]),ft.push(Ye.valueInds[0]),U.bundlecolors&&(nt.unshift(We.rawColor),ft.unshift(Ye.rawColor)),ntft?1:0});for(var fe=new Array(ue.length),me=q[0].model.count,_e=q[0].categories.map(function(We){return We.height}).reduce(function(We,Ye){return We+Ye}),we=0;we0?_e*(Oe.count/me):0;for(var de,ye=new Array(ne.length),Me=0;Me1?(U.width-80-16)/(ne-1):0)*H;var Q,ee,ie,ae,ue,le=[],ge=U.model.maxCats,fe=q.categories.length,me=q.count,_e=U.height-8*(ge-1),we=8*(ge-fe)/2,Te=q.categories.map(function(Oe){return{displayInd:Oe.displayInd,categoryInd:Oe.categoryInd}});for(Te.sort(function(Oe,de){return Oe.displayInd-de.displayInd}),ue=0;ue0?ee.count/me*_e:0,ie={key:ee.valueInds[0],model:ee,width:16,height:Q,y:ee.dragY!==null?ee.dragY:we,bands:[],parcatsViewModel:U},we=we+Q+8,le.push(ie);return{key:q.dimensionInd,x:q.dragX!==null?q.dragX:$,y:0,width:16,model:q,categories:le,parcatsViewModel:U,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}o.exports=function(U,q,$,ne){m($,U,ne,q)}},{"../../components/drawing":388,"../../components/fx":406,"../../lib":503,"../../lib/svg_text_utils":529,"../../plot_api/plot_api":540,"@plotly/d3":58,"d3-interpolate":116,tinycolor2:312}],887:[function(e,o,f){var r=e("./parcats");o.exports=function(a,l,c,i){var s=a._fullLayout,u=s._paper,d=s._size;r(a,u,l,{width:d.w,height:d.h,margin:{t:d.t,r:d.r,b:d.b,l:d.l}},c,i)}},{"./parcats":886}],888:[function(e,o,f){var r=e("../../components/colorscale/attributes"),a=e("../../plots/cartesian/layout_attributes"),l=e("../../plots/font_attributes"),c=e("../../plots/domain").attributes,i=e("../../lib/extend").extendFlat,s=e("../../plot_api/plot_template").templatedArray;o.exports={domain:c({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:l({editType:"plot"}),tickfont:l({editType:"plot"}),rangefont:l({editType:"plot"}),dimensions:s("dimension",{label:{valType:"string",editType:"plot"},tickvals:i({},a.tickvals,{editType:"plot"}),ticktext:i({},a.ticktext,{editType:"plot"}),tickformat:i({},a.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:i({editType:"calc"},r("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"}))}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/plot_template":543,"../../plots/cartesian/layout_attributes":569,"../../plots/domain":584,"../../plots/font_attributes":585}],889:[function(e,o,f){var r=e("./constants"),a=e("@plotly/d3"),l=e("../../lib/gup").keyFun,c=e("../../lib/gup").repeat,i=e("../../lib").sorterAsc,s=e("../../lib").strTranslate,u=r.bar.snapRatio;function d(O,R){return O*(1-u)+R*u}var h=r.bar.snapClose;function m(O,R){return O*(1-h)+R*h}function g(O,R,z,L){if(function(re,U){for(var q=0;q=U[q][0]&&re<=U[q][1])return!0;return!1}(z,L))return z;var P=O?-1:1,N=0,B=R.length-1;if(P<0){var G=N;N=B,B=G}for(var W=R[N],K=W,te=N;P*teR){Y=z;break}}if(P=K,isNaN(P)&&(P=isNaN(te)||isNaN(Y)?isNaN(te)?Y:te:R-W[te][1]H[1]+ee||Q=.9*H[1]+.1*H[0]?"n":Q<=.9*H[0]+.1*H[1]?"s":"ns"}(re,R);U&&(N.interval=G[P],N.intervalPix=re,N.region=U)}}if(O.ordinal&&!N.region){var q=O.unitTickvals,$=O.unitToPaddedPx.invert(R);for(z=0;z=ne[0]&&$<=ne[1]){N.clickableOrdinalRange=ne;break}}}return N}function _(O,R){a.event.sourceEvent.stopPropagation();var z=R.height-a.mouse(O)[1]-2*r.verticalPadding,L=R.brush.svgBrush;L.wasDragged=!0,L._dragging=!0,L.grabbingBar?L.newExtent=[z-L.grabPoint,z+L.barLength-L.grabPoint].map(R.unitToPaddedPx.invert):L.newExtent=[L.startExtent,R.unitToPaddedPx.invert(z)].sort(i),R.brush.filterSpecified=!0,L.extent=L.stayingIntervals.concat([L.newExtent]),L.brushCallback(R),b(O.parentNode)}function S(O,R){var z=T(R,R.height-a.mouse(O)[1]-2*r.verticalPadding),L="crosshair";z.clickableOrdinalRange?L="pointer":z.region&&(L=z.region+"-resize"),a.select(document.body).style("cursor",L)}function A(O){O.on("mousemove",function(R){a.event.preventDefault(),R.parent.inBrushDrag||S(this,R)}).on("mouseleave",function(R){R.parent.inBrushDrag||w()}).call(a.behavior.drag().on("dragstart",function(R){(function(z,L){a.event.sourceEvent.stopPropagation();var P=L.height-a.mouse(z)[1]-2*r.verticalPadding,N=L.unitToPaddedPx.invert(P),B=L.brush,G=T(L,P),W=G.interval,K=B.svgBrush;if(K.wasDragged=!1,K.grabbingBar=G.region==="ns",K.grabbingBar){var te=W.map(L.unitToPaddedPx);K.grabPoint=P-te[0]-r.verticalPadding,K.barLength=te[1]-te[0]}K.clickableOrdinalRange=G.clickableOrdinalRange,K.stayingIntervals=L.multiselect&&B.filterSpecified?B.filter.getConsolidated():[],W&&(K.stayingIntervals=K.stayingIntervals.filter(function(Y){return Y[0]!==W[0]&&Y[1]!==W[1]})),K.startExtent=G.region?W[G.region==="s"?1:0]:N,L.parent.inBrushDrag=!0,K.brushStartCallback()})(this,R)}).on("drag",function(R){_(this,R)}).on("dragend",function(R){(function(z,L){var P=L.brush,N=P.filter,B=P.svgBrush;B._dragging||(S(z,L),_(z,L),L.brush.svgBrush.wasDragged=!1),B._dragging=!1,a.event.sourceEvent.stopPropagation();var G=B.grabbingBar;if(B.grabbingBar=!1,B.grabLocation=void 0,L.parent.inBrushDrag=!1,w(),!B.wasDragged)return B.wasDragged=void 0,B.clickableOrdinalRange?P.filterSpecified&&L.multiselect?B.extent.push(B.clickableOrdinalRange):(B.extent=[B.clickableOrdinalRange],P.filterSpecified=!0):G?(B.extent=B.stayingIntervals,B.extent.length===0&&E(P)):E(P),B.brushCallback(L),b(z.parentNode),void B.brushEndCallback(P.filterSpecified?N.getConsolidated():[]);var W=function(){N.set(N.getConsolidated())};if(L.ordinal){var K=L.unitTickvals;K[K.length-1]B.newExtent[0];B.extent=B.stayingIntervals.concat(te?[B.newExtent]:[]),B.extent.length||E(P),B.brushCallback(L),te?b(z.parentNode,W):(W(),b(z.parentNode))}else W();B.brushEndCallback(P.filterSpecified?N.getConsolidated():[])})(this,R)}))}function M(O,R){return O[0]-R[0]}function E(O){O.filterSpecified=!1,O.svgBrush.extent=[[-1/0,1/0]]}function D(O){for(var R,z=O.slice(),L=[],P=z.shift();P;){for(R=P.slice();(P=z.shift())&&P[0]<=R[1];)R[1]=Math.max(R[1],P[1]);L.push(R)}return L.length===1&&L[0][0]>L[0][1]&&(L=[]),L}o.exports={makeBrush:function(O,R,z,L,P,N){var B,G=function(){var W,K,te=[];return{set:function(Y){(te=Y.map(function(Z){return Z.slice().sort(i)}).sort(M)).length===1&&te[0][0]===-1/0&&te[0][1]===1/0&&(te=[[0,-1]]),W=D(te),K=te.reduce(function(Z,re){return[Math.min(Z[0],re[0]),Math.max(Z[1],re[1])]},[1/0,-1/0])},get:function(){return te.slice()},getConsolidated:function(){return W},getBounds:function(){return K}}}();return G.set(z),{filter:G,filterSpecified:R,svgBrush:{extent:[],brushStartCallback:L,brushCallback:(B=P,function(W){var K=W.brush,te=function(Y){return Y.svgBrush.extent.map(function(Z){return Z.slice()})}(K).slice();K.filter.set(te),B()}),brushEndCallback:N}}},ensureAxisBrush:function(O,R){var z=O.selectAll("."+r.cn.axisBrush).data(c,l);z.enter().append("g").classed(r.cn.axisBrush,!0),function(L,P){var N=L.selectAll(".background").data(c);N.enter().append("rect").classed("background",!0).call(p).call(v).style("pointer-events","auto").attr("transform",s(0,r.verticalPadding)),N.call(A).attr("height",function(W){return W.height-r.verticalPadding});var B=L.selectAll(".highlight-shadow").data(c);B.enter().append("line").classed("highlight-shadow",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width+r.bar.strokeWidth).attr("stroke",P).attr("opacity",r.bar.strokeOpacity).attr("stroke-linecap","butt"),B.attr("y1",function(W){return W.height}).call(k);var G=L.selectAll(".highlight").data(c);G.enter().append("line").classed("highlight",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width-r.bar.strokeWidth).attr("stroke",r.bar.fillColor).attr("opacity",r.bar.fillOpacity).attr("stroke-linecap","butt"),G.attr("y1",function(W){return W.height}).call(k)}(z,R)},cleanRanges:function(O,R){if(Array.isArray(O[0])?(O=O.map(function(L){return L.sort(i)}),O=R.multiselect?D(O.sort(M)):[O[0]]):O=[O.sort(i)],R.tickvals){var z=R.tickvals.slice().sort(i);if(!(O=O.map(function(L){var P=[g(0,z,L[0],[]),g(1,z,L[1],[])];if(P[1]>P[0])return P}).filter(function(L){return L})).length)return}return O.length>1?O:O[0]}}},{"../../lib":503,"../../lib/gup":500,"./constants":893,"@plotly/d3":58}],890:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:e("./base_plot"),categories:["gl","regl","noOpacity","noHover"],meta:{}}},{"./attributes":888,"./base_plot":891,"./calc":892,"./defaults":894}],891:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../plots/get_data").getModuleCalcData,l=e("./plot"),c=e("../../constants/xmlns_namespaces");f.name="parcoords",f.plot=function(i){var s=a(i.calcdata,"parcoords")[0];s.length&&l(i,s)},f.clean=function(i,s,u,d){var h=d._has&&d._has("parcoords"),m=s._has&&s._has("parcoords");h&&!m&&(d._paperdiv.selectAll(".parcoords").remove(),d._glimages.selectAll("*").remove())},f.toSVG=function(i){var s=i._fullLayout._glimages,u=r.select(i).selectAll(".svg-container");u.filter(function(d,h){return h===u.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var d=this.toDataURL("image/png");s.append("svg:image").attr({xmlns:c.svg,"xlink:href":d,preserveAspectRatio:"none",x:0,y:0,width:this.style.width,height:this.style.height})}),window.setTimeout(function(){r.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},{"../../constants/xmlns_namespaces":480,"../../plots/get_data":593,"./plot":900,"@plotly/d3":58}],892:[function(e,o,f){var r=e("../../lib").isArrayOrTypedArray,a=e("../../components/colorscale"),l=e("../../lib/gup").wrap;o.exports=function(c,i){var s,u;return a.hasColorscale(i,"line")&&r(i.line.color)?(s=i.line.color,u=a.extractOpts(i.line).colorscale,a.calc(c,i,{vals:s,containerStr:"line",cLetter:"c"})):(s=function(d){for(var h=new Array(d),m=0;mh&&(r.log("parcoords traces support up to "+h+" dimensions at the moment"),k.splice(h));var b=i(p,v,{name:"dimensions",layout:x,handleItemDefaults:g}),T=function(S,A,M,E,D){var O=D("line.color",M);if(a(S,"line")&&r.isArrayOrTypedArray(O)){if(O.length)return D("line.colorscale"),l(S,A,E,D,{prefix:"line.",cLetter:"c"}),O.length;A.line.color=M}return 1/0}(p,v,y,x,w);c(v,x,w),Array.isArray(b)&&b.length||(v.visible=!1),m(v,b,"values",T);var _={family:x.font.family,size:Math.round(x.font.size/1.2),color:x.font.color};r.coerceFont(w,"labelfont",_),r.coerceFont(w,"tickfont",_),r.coerceFont(w,"rangefont",_),w("labelangle"),w("labelside")}},{"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503,"../../plots/array_container_defaults":549,"../../plots/cartesian/axes":554,"../../plots/domain":584,"./attributes":888,"./axisbrush":889,"./constants":893,"./merge_length":898}],895:[function(e,o,f){var r=e("../../lib").isTypedArray;f.convertTypedArray=function(a){return r(a)?Array.prototype.slice.call(a):a},f.isOrdinal=function(a){return!!a.tickvals},f.isVisible=function(a){return a.visible||!("visible"in a)}},{"../../lib":503}],896:[function(e,o,f){var r=e("./base_index");r.plot=e("./plot"),o.exports=r},{"./base_index":890,"./plot":900}],897:[function(e,o,f){var r=e("glslify"),a=r([`precision highp float; +#define GLSLIFY 1 + +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)); +} +`]),l=r([`precision highp float; +#define GLSLIFY 1 + +varying vec4 fragColor; + +void main() { + gl_FragColor = fragColor; +} +`]),c=e("./constants").maxDimensionCount,i=e("../../lib"),s=new Uint8Array(4),u=new Uint8Array(4),d={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function h(b,T,_,S,A){var M=b._gl;M.enable(M.SCISSOR_TEST),M.scissor(T,_,S,A),b.clear({color:[0,0,0,0],depth:1})}function m(b,T,_,S,A,M){var E=M.key;_.drawCompleted||(function(D){D.read({x:0,y:0,width:1,height:1,data:s})}(b),_.drawCompleted=!0),function D(O){var R=Math.min(S,A-O*S);O===0&&(window.cancelAnimationFrame(_.currentRafs[E]),delete _.currentRafs[E],h(b,M.scissorX,M.scissorY,M.scissorWidth,M.viewBoxSize[1])),_.clearOnly||(M.count=2*R,M.offset=2*O*S,T(M),O*S+R>>8*T)%256/255}function v(b,T,_){for(var S=new Array(8*T),A=0,M=0;MQ&&(Q=Y[U].dim1.canvasX,$=U);ne===0&&h(R,0,0,_.canvasWidth,_.canvasHeight);var ee=function(Te){var Oe,de,ye,Me=[[],[]];for(ye=0;ye<64;ye++){var ke=!Te&&yeee._length&&(_e=_e.slice(0,ee._length));var we,Te=ee.tickvals;function Oe(Ee,ze){return{val:Ee,text:we[ze]}}function de(Ee,ze){return Ee.val-ze.val}if(Array.isArray(Te)&&Te.length){we=ee.ticktext,Array.isArray(we)&&we.length?we.length>Te.length?we=we.slice(0,Te.length):Te.length>we.length&&(Te=Te.slice(0,we.length)):we=Te.map(l(ee.tickformat));for(var ye=1;ye=ze||Re>=Fe)return;var qe=ke.lineLayer.readPixel(Ke,Fe-1-Re),We=qe[3]!==0,Ye=We?qe[2]+256*(qe[1]+256*qe[0]):null,nt={x:Ke,y:Re,clientX:Ee.clientX,clientY:Ee.clientY,dataIndex:ke.model.key,curveNumber:Ye};Ye!==ae&&(We?Y.hover(nt):Y.unhover&&Y.unhover(nt),ae=Ye)}}),ie.style("opacity",function(ke){return ke.pick?0:1}),re.style("background","rgba(255, 255, 255, 0)");var ue=re.selectAll("."+w.cn.parcoords).data(ee,p);ue.exit().remove(),ue.enter().append("g").classed(w.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),ue.attr("transform",function(ke){return u(ke.model.translateX,ke.model.translateY)});var le=ue.selectAll("."+w.cn.parcoordsControlView).data(v,p);le.enter().append("g").classed(w.cn.parcoordsControlView,!0),le.attr("transform",function(ke){return u(ke.model.pad.l,ke.model.pad.t)});var ge=le.selectAll("."+w.cn.yAxis).data(function(ke){return ke.dimensions},p);ge.enter().append("g").classed(w.cn.yAxis,!0),le.each(function(ke){N(ge,ke,q)}),ie.each(function(ke){if(ke.viewModel){!ke.lineLayer||Y?ke.lineLayer=b(this,ke):ke.lineLayer.update(ke),(ke.key||ke.key===0)&&(ke.viewModel[ke.key]=ke.lineLayer);var Ee=!ke.context||Y;ke.lineLayer.render(ke.viewModel.panels,Ee)}}),ge.attr("transform",function(ke){return u(ke.xScale(ke.xIndex),0)}),ge.call(r.behavior.drag().origin(function(ke){return ke}).on("drag",function(ke){var Ee=ke.parent;Q.linePickActive(!1),ke.x=Math.max(-w.overdrag,Math.min(ke.model.width+w.overdrag,r.event.x)),ke.canvasX=ke.x*ke.model.canvasPixelRatio,ge.sort(function(ze,Fe){return ze.x-Fe.x}).each(function(ze,Fe){ze.xIndex=Fe,ze.x=ke===ze?ze.x:ze.xScale(ze.xIndex),ze.canvasX=ze.x*ze.model.canvasPixelRatio}),N(ge,Ee,q),ge.filter(function(ze){return Math.abs(ke.xIndex-ze.xIndex)!==0}).attr("transform",function(ze){return u(ze.xScale(ze.xIndex),0)}),r.select(this).attr("transform",u(ke.x,0)),ge.each(function(ze,Fe,Ve){Ve===ke.parent.key&&(Ee.dimensions[Fe]=ze)}),Ee.contextLayer&&Ee.contextLayer.render(Ee.panels,!1,!O(Ee)),Ee.focusLayer.render&&Ee.focusLayer.render(Ee.panels)}).on("dragend",function(ke){var Ee=ke.parent;ke.x=ke.xScale(ke.xIndex),ke.canvasX=ke.x*ke.model.canvasPixelRatio,N(ge,Ee,q),r.select(this).attr("transform",function(ze){return u(ze.x,0)}),Ee.contextLayer&&Ee.contextLayer.render(Ee.panels,!1,!O(Ee)),Ee.focusLayer&&Ee.focusLayer.render(Ee.panels),Ee.pickLayer&&Ee.pickLayer.render(Ee.panels,!0),Q.linePickActive(!0),Y&&Y.axesMoved&&Y.axesMoved(Ee.key,Ee.dimensions.map(function(ze){return ze.crossfilterDimensionIndex}))})),ge.exit().remove();var fe=ge.selectAll("."+w.cn.axisOverlays).data(v,p);fe.enter().append("g").classed(w.cn.axisOverlays,!0),fe.selectAll("."+w.cn.axis).remove();var me=fe.selectAll("."+w.cn.axis).data(v,p);me.enter().append("g").classed(w.cn.axis,!0),me.each(function(ke){var Ee=ke.model.height/ke.model.tickDistance,ze=ke.domainScale,Fe=ze.domain();r.select(this).call(r.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Ee,ke.tickFormat).tickValues(ke.ordinal?Fe:null).tickFormat(function(Ve){return x.isOrdinal(ke)?Ve:B(ke.model.dimensions[ke.visibleIndex],Ve)}).scale(ze)),h.font(me.selectAll("text"),ke.model.tickFont)}),me.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),me.selectAll("text").style("text-shadow",d.makeTextShadow($)).style("cursor","default");var _e=fe.selectAll("."+w.cn.axisHeading).data(v,p);_e.enter().append("g").classed(w.cn.axisHeading,!0);var we=_e.selectAll("."+w.cn.axisTitle).data(v,p);we.enter().append("text").classed(w.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events","auto"),we.text(function(ke){return ke.label}).each(function(ke){var Ee=r.select(this);h.font(Ee,ke.model.labelFont),d.convertToTspans(Ee,W)}).attr("transform",function(ke){var Ee=P(ke.model.labelAngle,ke.model.labelSide),ze=w.axisTitleOffset;return(Ee.dir>0?"":u(0,2*ze+ke.model.height))+s(Ee.degrees)+u(-ze*Ee.dx,-ze*Ee.dy)}).attr("text-anchor",function(ke){var Ee=P(ke.model.labelAngle,ke.model.labelSide);return 2*Math.abs(Ee.dx)>Math.abs(Ee.dy)?Ee.dir*Ee.dx<0?"start":"end":"middle"});var Te=fe.selectAll("."+w.cn.axisExtent).data(v,p);Te.enter().append("g").classed(w.cn.axisExtent,!0);var Oe=Te.selectAll("."+w.cn.axisExtentTop).data(v,p);Oe.enter().append("g").classed(w.cn.axisExtentTop,!0),Oe.attr("transform",u(0,-w.axisExtentOffset));var de=Oe.selectAll("."+w.cn.axisExtentTopText).data(v,p);de.enter().append("text").classed(w.cn.axisExtentTopText,!0).call(L),de.text(function(ke){return G(ke,!0)}).each(function(ke){h.font(r.select(this),ke.model.rangeFont)});var ye=Te.selectAll("."+w.cn.axisExtentBottom).data(v,p);ye.enter().append("g").classed(w.cn.axisExtentBottom,!0),ye.attr("transform",function(ke){return u(0,ke.model.height+w.axisExtentOffset)});var Me=ye.selectAll("."+w.cn.axisExtentBottomText).data(v,p);Me.enter().append("text").classed(w.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(L),Me.text(function(ke){return G(ke,!1)}).each(function(ke){h.font(r.select(this),ke.model.rangeFont)}),k.ensureAxisBrush(fe,$)}},{"../../components/colorscale":378,"../../components/drawing":388,"../../lib":503,"../../lib/gup":500,"../../lib/svg_text_utils":529,"../../plots/cartesian/axes":554,"./axisbrush":889,"./constants":893,"./helpers":895,"./lines":897,"@plotly/d3":58,"color-rgba":91}],900:[function(e,o,f){var r=e("./parcoords"),a=e("../../lib/prepare_regl"),l=e("./helpers").isVisible,c={};function i(s,u,d){var h=u.indexOf(d),m=s.indexOf(h);return m===-1&&(m+=u.length),m}(o.exports=function(s,u){var d=s._fullLayout;if(a(s,[],c)){var h={},m={},g={},p={},v=d._size;u.forEach(function(y,x){var w=y[0].trace;g[x]=w.index;var k=p[x]=w._fullInput.index;h[x]=s.data[k].dimensions,m[x]=s.data[k].dimensions.slice()}),r(s,u,{width:v.w,height:v.h,margin:{t:v.t,r:v.r,b:v.b,l:v.l}},{filterChanged:function(y,x,w){var k=m[y][x],b=w.map(function(E){return E.slice()}),T="dimensions["+x+"].constraintrange",_=d._tracePreGUI[s._fullData[g[y]]._fullInput.uid];if(_[T]===void 0){var S=k.constraintrange;_[T]=S||null}var A=s._fullData[g[y]].dimensions[x];b.length?(b.length===1&&(b=b[0]),k.constraintrange=b,A.constraintrange=b.slice(),b=[b]):(delete k.constraintrange,delete A.constraintrange,b=null);var M={};M[T]=b,s.emit("plotly_restyle",[M,[p[y]]])},hover:function(y){s.emit("plotly_hover",y)},unhover:function(y){s.emit("plotly_unhover",y)},axesMoved:function(y,x){var w=function(k,b){return function(T,_){return i(k,b,T)-i(k,b,_)}}(x,m[y].filter(l));h[y].sort(w),m[y].filter(function(k){return!l(k)}).sort(function(k){return m[y].indexOf(k)}).forEach(function(k){h[y].splice(h[y].indexOf(k),1),h[y].splice(m[y].indexOf(k),0,k)}),s.emit("plotly_restyle",[{dimensions:[h[y]]},[p[y]]])}})}}).reglPrecompiled=c},{"../../lib/prepare_regl":516,"./helpers":895,"./parcoords":899}],901:[function(e,o,f){var r=e("../../plots/attributes"),a=e("../../plots/domain").attributes,l=e("../../plots/font_attributes"),c=e("../../components/color/attributes"),i=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../plots/template_attributes").texttemplateAttrs,u=e("../../lib/extend").extendFlat,d=l({editType:"plot",arrayOk:!0,colorEditType:"plot"});o.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:c.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},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:u({},r.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:i({},{keys:["label","color","value","percent","text"]}),texttemplate:s({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:u({},d,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:u({},d,{}),outsidetextfont:u({},d,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:u({},d,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:a({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:"number",min:-360,max:360,dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:u({},d,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},{"../../components/color/attributes":365,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/domain":584,"../../plots/font_attributes":585,"../../plots/template_attributes":633}],902:[function(e,o,f){var r=e("../../plots/plots");f.name="pie",f.plot=function(a,l,c,i){r.plotBasePlot(f.name,a,l,c,i)},f.clean=function(a,l,c,i){r.cleanBasePlot(f.name,a,l,c,i)}},{"../../plots/plots":619}],903:[function(e,o,f){var r=e("fast-isnumeric"),a=e("tinycolor2"),l=e("../../components/color"),c={};function i(u){return function(d,h){return!!d&&!!(d=a(d)).isValid()&&(d=l.addOpacity(d,d.getAlpha()),u[h]||(u[h]=d),d)}}function s(u,d){var h,m=JSON.stringify(u),g=d[m];if(!g){for(g=u.slice(),h=0;h=0}),(d.type==="funnelarea"?A:d.sort)&&g.sort(function(R,z){return z.v-R.v}),g[0]&&(g[0].vTotal=S),g},crossTraceCalc:function(u,d){var h=(d||{}).type;h||(h="pie");var m=u._fullLayout,g=u.calcdata,p=m[h+"colorway"],v=m["_"+h+"colormap"];m["extend"+h+"colors"]&&(p=s(p,c));for(var y=0,x=0;x0){p=!0;break}}p||(g=0)}return{hasLabels:h,hasValues:m,len:g}}o.exports={handleLabelsAndValues:s,supplyDefaults:function(u,d,h,m){function g(_,S){return a.coerce(u,d,l,_,S)}var p=s(g("labels"),g("values")),v=p.len;if(d._hasLabels=p.hasLabels,d._hasValues=p.hasValues,!d._hasLabels&&d._hasValues&&(g("label0"),g("dlabel")),v){d._length=v,g("marker.line.width")&&g("marker.line.color"),g("marker.colors"),g("scalegroup");var y,x=g("text"),w=g("texttemplate");if(w||(y=g("textinfo",Array.isArray(x)?"text+percent":"percent")),g("hovertext"),g("hovertemplate"),w||y&&y!=="none"){var k=g("textposition");i(u,d,m,g,k,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(k)||k==="auto"||k==="outside")&&g("automargin"),(k==="inside"||k==="auto"||Array.isArray(k))&&g("insidetextorientation")}c(d,m,g);var b=g("hole");if(g("title.text")){var T=g("title.position",b?"middle center":"top center");b||T!=="middle center"||(d.title.position="top center"),a.coerceFont(g,"title.font",m.font)}g("sort"),g("direction"),g("rotation"),g("pull")}else d.visible=!1}}},{"../../lib":503,"../../plots/domain":584,"../bar/defaults":652,"./attributes":901,"fast-isnumeric":190}],905:[function(e,o,f){var r=e("../../components/fx/helpers").appendArrayMultiPointValues;o.exports=function(a,l){var c={curveNumber:l.index,pointNumbers:a.pts,data:l._input,fullData:l,label:a.label,color:a.color,value:a.v,percent:a.percent,text:a.text,bbox:a.bbox,v:a.v};return a.pts.length===1&&(c.pointNumber=c.i=a.pts[0]),r(c,l,a.pts),l.type==="funnelarea"&&(delete c.v,delete c.i),c}},{"../../components/fx/helpers":402}],906:[function(e,o,f){var r=e("../../lib");function a(l){return l.indexOf("e")!==-1?l.replace(/[.]?0+e/,"e"):l.indexOf(".")!==-1?l.replace(/[.]?0+$/,""):l}f.formatPiePercent=function(l,c){var i=a((100*l).toPrecision(3));return r.numSeparate(i,c)+"%"},f.formatPieValue=function(l,c){var i=a(l.toPrecision(10));return r.numSeparate(i,c)},f.getFirstFilled=function(l,c){if(Array.isArray(l))for(var i=0;i"),name:Q.hovertemplate||ee.indexOf("name")!==-1?Q.name:void 0,idealAlign:ne.pxmid[0]<0?"left":"right",color:y.castOption(me.bgcolor,ne.pts)||ne.color,borderColor:y.castOption(me.bordercolor,ne.pts),fontFamily:y.castOption(_e.family,ne.pts),fontSize:y.castOption(_e.size,ne.pts),fontColor:y.castOption(_e.color,ne.pts),nameLength:y.castOption(me.namelength,ne.pts),textAlign:y.castOption(me.align,ne.pts),hovertemplate:y.castOption(Q.hovertemplate,ne.pts),hovertemplateLabels:ne,eventData:[x(ne,Q)]},{container:H._hoverlayer.node(),outerContainer:H._paper.node(),gd:te,inOut_bbox:we}),ne.bbox=we[0],q._hasHoverLabel=!0}q._hasHoverEvent=!0,te.emit("plotly_hover",{points:[x(ne,Q)],event:r.event})}}),K.on("mouseout",function(ne){var H=te._fullLayout,Q=te._fullData[q.index],ee=r.select(this).datum();q._hasHoverEvent&&(ne.originalEvent=r.event,te.emit("plotly_unhover",{points:[x(ee,Q)],event:r.event}),q._hasHoverEvent=!1),q._hasHoverLabel&&(l.loneUnhover(H._hoverlayer.node()),q._hasHoverLabel=!1)}),K.on("click",function(ne){var H=te._fullLayout,Q=te._fullData[q.index];te._dragging||H.hovermode===!1||(te._hoverdata=[x(ne,Q)],l.click(te,r.event))})}function b(K,te,Y){var Z=y.castOption(K.insidetextfont.color,te.pts);!Z&&K._input.textfont&&(Z=y.castOption(K._input.textfont.color,te.pts));var re=y.castOption(K.insidetextfont.family,te.pts)||y.castOption(K.textfont.family,te.pts)||Y.family,U=y.castOption(K.insidetextfont.size,te.pts)||y.castOption(K.textfont.size,te.pts)||Y.size;return{color:Z||c.contrast(te.color),family:re,size:U}}function T(K,te){for(var Y,Z,re=0;reFe&&Fe>Ke||Ve=-4;ge-=2)fe(Math.PI*ge,"tan");for(ge=4;ge>=-4;ge-=2)fe(Math.PI*(ge+1),"tan")}if(ee||ae){for(ge=4;ge>=-4;ge-=2)fe(Math.PI*(ge+1.5),"rad");for(ge=4;ge>=-4;ge-=2)fe(Math.PI*(ge+.5),"rad")}}if($||ue||ee){var me=Math.sqrt(K.width*K.width+K.height*K.height);if((U={scale:re*Z*2/me,rCenter:1-re,rotate:0}).textPosAngle=(te.startangle+te.stopangle)/2,U.scale>=1)return U;le.push(U)}(ue||ae)&&((U=S(K,Z,q,ne,H)).textPosAngle=(te.startangle+te.stopangle)/2,le.push(U)),(ue||ie)&&((U=A(K,Z,q,ne,H)).textPosAngle=(te.startangle+te.stopangle)/2,le.push(U));for(var _e=0,we=0,Te=0;Te=1)break}return le[_e]}function S(K,te,Y,Z,re){te=Math.max(0,te-2*v);var U=K.width/K.height,q=D(U,Z,te,Y);return{scale:2*q/K.height,rCenter:M(U,q/te),rotate:E(re)}}function A(K,te,Y,Z,re){te=Math.max(0,te-2*v);var U=K.height/K.width,q=D(U,Z,te,Y);return{scale:2*q/K.width,rCenter:M(U,q/te),rotate:E(re+Math.PI/2)}}function M(K,te){return Math.cos(te)-K*te}function E(K){return(180/Math.PI*K+720)%180-90}function D(K,te,Y,Z){var re=K+1/(2*Math.tan(te));return Y*Math.min(1/(Math.sqrt(re*re+.5)+re),Z/(Math.sqrt(K*K+Z/2)+K))}function O(K,te){return K.v!==te.vTotal||te.trace.hole?Math.min(1/(1+1/Math.sin(K.halfangle)),K.ring/2):1}function R(K,te){var Y=te.pxmid[0],Z=te.pxmid[1],re=K.width/2,U=K.height/2;return Y<0&&(re*=-1),Z<0&&(U*=-1),{scale:1,rCenter:1,rotate:0,x:re+Math.abs(U)*(re>0?1:-1)/2,y:U/(1+Y*Y/(Z*Z)),outside:!0}}function z(K,te){var Y,Z,re,U=K.trace,q={x:K.cx,y:K.cy},$={tx:0,ty:0};$.ty+=U.title.font.size,re=P(U),U.title.position.indexOf("top")!==-1?(q.y-=(1+re)*K.r,$.ty-=K.titleBox.height):U.title.position.indexOf("bottom")!==-1&&(q.y+=(1+re)*K.r);var ne,H,Q=(ne=K.r,H=K.trace.aspectratio,ne/(H===void 0?1:H)),ee=te.w*(U.domain.x[1]-U.domain.x[0])/2;return U.title.position.indexOf("left")!==-1?(ee+=Q,q.x-=(1+re)*Q,$.tx+=K.titleBox.width/2):U.title.position.indexOf("center")!==-1?ee*=2:U.title.position.indexOf("right")!==-1&&(ee+=Q,q.x+=(1+re)*Q,$.tx-=K.titleBox.width/2),Y=ee/K.titleBox.width,Z=L(K,te)/K.titleBox.height,{x:q.x,y:q.y,scale:Math.min(Y,Z),tx:$.tx,ty:$.ty}}function L(K,te){var Y=K.trace,Z=te.h*(Y.domain.y[1]-Y.domain.y[0]);return Math.min(K.titleBox.height,Z/2)}function P(K){var te,Y=K.pull;if(!Y)return 0;if(Array.isArray(Y))for(Y=0,te=0;teY&&(Y=K.pull[te]);return Y}function N(K,te){for(var Y=[],Z=0;Z1?(we=ae.r,Te=we/le.aspectratio):(Te=ae.r,we=Te*le.aspectratio),we*=(1+le.baseratio)/2,_e=we*Te}fe=Math.min(fe,_e/ae.vTotal)}for(ue=0;ue")}if(U){var ge=s.castOption(re,te.i,"texttemplate");if(ge){var fe=function(_e){return{label:_e.label,value:_e.v,valueLabel:y.formatPieValue(_e.v,Z.separators),percent:_e.v/Y.vTotal,percentLabel:y.formatPiePercent(_e.v/Y.vTotal,Z.separators),color:_e.color,text:_e.text,customdata:s.castOption(re,_e.i,"customdata")}}(te),me=y.getFirstFilled(re.text,te.pts);(w(me)||me==="")&&(fe.text=me),te.text=s.texttemplateString(ge,fe,K._fullLayout._d3locale,fe,re._meta||{})}else te.text=""}}function W(K,te){var Y=K.rotate*Math.PI/180,Z=Math.cos(Y),re=Math.sin(Y),U=(te.left+te.right)/2,q=(te.top+te.bottom)/2;K.textX=U*Z-q*re,K.textY=U*re+q*Z,K.noCenter=!0}o.exports={plot:function(K,te){var Y=K._fullLayout,Z=Y._size;p("pie",Y),T(te,K),N(te,Z);var re=s.makeTraceGroups(Y._pielayer,te,"trace").each(function(U){var q=r.select(this),$=U[0],ne=$.trace;(function(H){var Q,ee,ie,ae=H[0],ue=ae.r,le=ae.trace,ge=y.getRotationAngle(le.rotation),fe=2*Math.PI/ae.vTotal,me="px0",_e="px1";if(le.direction==="counterclockwise"){for(Q=0;Qae.vTotal/2?1:0,ee.halfangle=Math.PI*Math.min(ee.v/ae.vTotal,.5),ee.ring=1-le.hole,ee.rInscribed=O(ee,ae))})(U),q.attr("stroke-linejoin","round"),q.each(function(){var H=r.select(this).selectAll("g.slice").data(U);H.enter().append("g").classed("slice",!0),H.exit().remove();var Q=[[[],[]],[[],[]]],ee=!1;H.each(function(_e,we){if(_e.hidden)r.select(this).selectAll("path,g").remove();else{_e.pointNumber=_e.i,_e.curveNumber=ne.index,Q[_e.pxmid[1]<0?0:1][_e.pxmid[0]<0?0:1].push(_e);var Te=$.cx,Oe=$.cy,de=r.select(this),ye=de.selectAll("path.surface").data([_e]);if(ye.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),de.call(k,K,U),ne.pull){var Me=+y.castOption(ne.pull,_e.pts)||0;Me>0&&(Te+=Me*_e.pxmid[0],Oe+=Me*_e.pxmid[1])}_e.cxFinal=Te,_e.cyFinal=Oe;var ke=ne.hole;if(_e.v===$.vTotal){var Ee="M"+(Te+_e.px0[0])+","+(Oe+_e.px0[1])+Re(_e.px0,_e.pxmid,!0,1)+Re(_e.pxmid,_e.px0,!0,1)+"Z";ke?ye.attr("d","M"+(Te+ke*_e.px0[0])+","+(Oe+ke*_e.px0[1])+Re(_e.px0,_e.pxmid,!1,ke)+Re(_e.pxmid,_e.px0,!1,ke)+"Z"+Ee):ye.attr("d",Ee)}else{var ze=Re(_e.px0,_e.px1,!0,1);if(ke){var Fe=1-ke;ye.attr("d","M"+(Te+ke*_e.px1[0])+","+(Oe+ke*_e.px1[1])+Re(_e.px1,_e.px0,!1,ke)+"l"+Fe*_e.px0[0]+","+Fe*_e.px0[1]+ze+"Z")}else ye.attr("d","M"+Te+","+Oe+"l"+_e.px0[0]+","+_e.px0[1]+ze+"Z")}G(K,_e,$);var Ve=y.castOption(ne.textposition,_e.pts),Ke=de.selectAll("g.slicetext").data(_e.text&&Ve!=="none"?[0]:[]);Ke.enter().append("g").classed("slicetext",!0),Ke.exit().remove(),Ke.each(function(){var qe=s.ensureSingle(r.select(this),"text","",function(at){at.attr("data-notex",1)}),We=s.ensureUniformFontSize(K,Ve==="outside"?function(at,et,Ot){var Wt=y.castOption(at.outsidetextfont.color,et.pts)||y.castOption(at.textfont.color,et.pts)||Ot.color,Jt=y.castOption(at.outsidetextfont.family,et.pts)||y.castOption(at.textfont.family,et.pts)||Ot.family,Be=y.castOption(at.outsidetextfont.size,et.pts)||y.castOption(at.textfont.size,et.pts)||Ot.size;return{color:Wt,family:Jt,size:Be}}(ne,_e,Y.font):b(ne,_e,Y.font));qe.text(_e.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(i.font,We).call(h.convertToTspans,K);var Ye,nt=i.bBox(qe.node());if(Ve==="outside")Ye=R(nt,_e);else if(Ye=_(nt,_e,$),Ve==="auto"&&Ye.scale<1){var ft=s.ensureUniformFontSize(K,ne.outsidetextfont);qe.call(i.font,ft),Ye=R(nt=i.bBox(qe.node()),_e)}var vt=Ye.textPosAngle,Pt=vt===void 0?_e.pxmid:B($.r,vt);if(Ye.targetX=Te+Pt[0]*Ye.rCenter+(Ye.x||0),Ye.targetY=Oe+Pt[1]*Ye.rCenter+(Ye.y||0),W(Ye,nt),Ye.outside){var At=Ye.targetY;_e.yLabelMin=At-nt.height/2,_e.yLabelMid=At,_e.yLabelMax=At+nt.height/2,_e.labelExtraX=0,_e.labelExtraY=0,ee=!0}Ye.fontSize=We.size,g(ne.type,Ye,Y),U[we].transform=Ye,qe.attr("transform",s.getTextTransform(Ye))})}function Re(qe,We,Ye,nt){var ft=nt*(We[0]-qe[0]),vt=nt*(We[1]-qe[1]);return"a"+nt*$.r+","+nt*$.r+" 0 "+_e.largeArc+(Ye?" 1 ":" 0 ")+ft+","+vt}});var ie=r.select(this).selectAll("g.titletext").data(ne.title.text?[0]:[]);if(ie.enter().append("g").classed("titletext",!0),ie.exit().remove(),ie.each(function(){var _e,we=s.ensureSingle(r.select(this),"text","",function(Oe){Oe.attr("data-notex",1)}),Te=ne.title.text;ne._meta&&(Te=s.templateString(Te,ne._meta)),we.text(Te).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(i.font,ne.title.font).call(h.convertToTspans,K),_e=ne.title.position==="middle center"?function(Oe){var de=Math.sqrt(Oe.titleBox.width*Oe.titleBox.width+Oe.titleBox.height*Oe.titleBox.height);return{x:Oe.cx,y:Oe.cy,scale:Oe.trace.hole*Oe.r*2/de,tx:0,ty:-Oe.titleBox.height/2+Oe.trace.title.font.size}}($):z($,Z),we.attr("transform",d(_e.x,_e.y)+u(Math.min(1,_e.scale))+d(_e.tx,_e.ty))}),ee&&function(_e,we){var Te,Oe,de,ye,Me,ke,Ee,ze,Fe,Ve,Ke,Re,qe;function We(vt,Pt){return vt.pxmid[1]-Pt.pxmid[1]}function Ye(vt,Pt){return Pt.pxmid[1]-vt.pxmid[1]}function nt(vt,Pt){Pt||(Pt={});var At,at,et,Ot,Wt=Pt.labelExtraY+(Oe?Pt.yLabelMax:Pt.yLabelMin),Jt=Oe?vt.yLabelMin:vt.yLabelMax,Be=Oe?vt.yLabelMax:vt.yLabelMin,Ge=vt.cyFinal+Me(vt.px0[1],vt.px1[1]),Tt=Wt-Jt;if(Tt*Ee>0&&(vt.labelExtraY=Tt),Array.isArray(we.pull))for(at=0;at=(y.castOption(we.pull,et.pts)||0)||((vt.pxmid[1]-et.pxmid[1])*Ee>0?(Tt=et.cyFinal+Me(et.px0[1],et.px1[1])-Jt-vt.labelExtraY)*Ee>0&&(vt.labelExtraY+=Tt):(Be+vt.labelExtraY-Ge)*Ee>0&&(At=3*ke*Math.abs(at-Ve.indexOf(vt)),(Ot=et.cxFinal+ye(et.px0[0],et.px1[0])+At-(vt.cxFinal+vt.pxmid[0])-vt.labelExtraX)*ke>0&&(vt.labelExtraX+=Ot)))}for(Oe=0;Oe<2;Oe++)for(de=Oe?We:Ye,Me=Oe?Math.max:Math.min,Ee=Oe?1:-1,Te=0;Te<2;Te++){for(ye=Te?Math.max:Math.min,ke=Te?1:-1,(ze=_e[Oe][Te]).sort(de),Fe=_e[1-Oe][Te],Ve=Fe.concat(ze),Re=[],Ke=0;KeMath.abs(ze)?Me+="l"+ze*Te.pxmid[0]/Te.pxmid[1]+","+ze+"H"+(ye+Te.labelExtraX+ke):Me+="l"+Te.labelExtraX+","+Ee+"v"+(ze-Ee)+"h"+ke}else Me+="V"+(Te.yLabelMid+Te.labelExtraY)+"h"+ke;s.ensureSingle(Oe,"path","textline").call(c.stroke,we.outsidetextfont.color).attr({"stroke-width":Math.min(2,we.outsidetextfont.size/8),d:Me,fill:"none"})}else Oe.select("path.textline").remove()})}(H,ne),ee&&ne.automargin){var ae=i.bBox(q.node()),ue=ne.domain,le=Z.w*(ue.x[1]-ue.x[0]),ge=Z.h*(ue.y[1]-ue.y[0]),fe=(.5*le-$.r)/Z.w,me=(.5*ge-$.r)/Z.h;a.autoMargin(K,"pie."+ne.uid+".automargin",{xl:ue.x[0]-fe,xr:ue.x[1]+fe,yb:ue.y[0]-me,yt:ue.y[1]+me,l:Math.max($.cx-$.r-ae.left,0),r:Math.max(ae.right-($.cx+$.r),0),b:Math.max(ae.bottom-($.cy+$.r),0),t:Math.max($.cy-$.r-ae.top,0),pad:5})}})});setTimeout(function(){re.selectAll("tspan").each(function(){var U=r.select(this);U.attr("dy")&&U.attr("dy",U.attr("dy"))})},0)},formatSliceLabel:G,transformInsideText:_,determineInsideTextFont:b,positionTitleOutside:z,prerenderTitles:T,layoutAreas:N,attachFxHandlers:k,computeTransform:W}},{"../../components/color":366,"../../components/drawing":388,"../../components/fx":406,"../../lib":503,"../../lib/svg_text_utils":529,"../../plots/plots":619,"../bar/constants":650,"../bar/uniform_text":664,"./event_data":905,"./helpers":906,"@plotly/d3":58}],911:[function(e,o,f){var r=e("@plotly/d3"),a=e("./style_one"),l=e("../bar/uniform_text").resizeText;o.exports=function(c){var i=c._fullLayout._pielayer.selectAll(".trace");l(c,i,"pie"),i.each(function(s){var u=s[0].trace,d=r.select(this);d.style({opacity:u.opacity}),d.selectAll("path.surface").each(function(h){r.select(this).call(a,h,u)})})}},{"../bar/uniform_text":664,"./style_one":912,"@plotly/d3":58}],912:[function(e,o,f){var r=e("../../components/color"),a=e("./helpers").castOption;o.exports=function(l,c,i){var s=i.marker.line,u=a(s.color,c.pts)||r.defaultLine,d=a(s.width,c.pts)||0;l.style("stroke-width",d).call(r.fill,c.color).call(r.stroke,u)}},{"../../components/color":366,"./helpers":906}],913:[function(e,o,f){var r=e("../scatter/attributes");o.exports={x:r.x,y:r.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:r.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},{"../scatter/attributes":927}],914:[function(e,o,f){var r=e("../../../stackgl_modules").gl_pointcloud2d,a=e("../../lib/str2rgbarray"),l=e("../../plots/cartesian/autorange").findExtremes,c=e("../scatter/get_trace_color");function i(u,d){this.scene=u,this.uid=d,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=r(u.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var s=i.prototype;s.handlePick=function(u){var d=this.idToIndex[u.pointId];return{trace:this,dataCoord:u.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*d],this.pickXYData[2*d+1]]:[this.pickXData[d],this.pickYData[d]],textLabel:Array.isArray(this.textLabels)?this.textLabels[d]:this.textLabels,color:this.color,name:this.name,pointIndex:d,hoverinfo:this.hoverinfo}},s.update=function(u){this.index=u.index,this.textLabels=u.text,this.name=u.name,this.hoverinfo=u.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(u),this.color=c(u,{})},s.updateFast=function(u){var d,h,m,g,p,v,y=this.xData=this.pickXData=u.x,x=this.yData=this.pickYData=u.y,w=this.pickXYData=u.xy,k=u.xbounds&&u.ybounds,b=u.indices,T=this.bounds;if(w){if(m=w,d=w.length>>>1,k)T[0]=u.xbounds[0],T[2]=u.xbounds[1],T[1]=u.ybounds[0],T[3]=u.ybounds[1];else for(v=0;vT[2]&&(T[2]=g),pT[3]&&(T[3]=p);if(b)h=b;else for(h=new Int32Array(d),v=0;vT[2]&&(T[2]=g),pT[3]&&(T[3]=p);this.idToIndex=h,this.pointcloudOptions.idToIndex=h,this.pointcloudOptions.positions=m;var _=a(u.marker.color),S=a(u.marker.border.color),A=u.opacity*u.marker.opacity;_[3]*=A,this.pointcloudOptions.color=_;var M=u.marker.blend;M===null&&(M=y.length<100||x.length<100),this.pointcloudOptions.blend=M,S[3]*=A,this.pointcloudOptions.borderColor=S;var E=u.marker.sizemin,D=Math.max(u.marker.sizemax,u.marker.sizemin);this.pointcloudOptions.sizeMin=E,this.pointcloudOptions.sizeMax=D,this.pointcloudOptions.areaRatio=u.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var O=this.scene.xaxis,R=this.scene.yaxis,z=D/2||.5;u._extremes[O._id]=l(O,[T[0],T[2]],{ppad:z}),u._extremes[R._id]=l(R,[T[1],T[3]],{ppad:z})},s.dispose=function(){this.pointcloud.dispose()},o.exports=function(u,d){var h=new i(u,d.uid);return h.update(d),h}},{"../../../stackgl_modules":1124,"../../lib/str2rgbarray":528,"../../plots/cartesian/autorange":553,"../scatter/get_trace_color":937}],915:[function(e,o,f){var r=e("../../lib"),a=e("./attributes");o.exports=function(l,c,i){function s(u,d){return r.coerce(l,c,a,u,d)}s("x"),s("y"),s("xbounds"),s("ybounds"),l.xy&&l.xy instanceof Float32Array&&(c.xy=l.xy),l.indices&&l.indices instanceof Int32Array&&(c.indices=l.indices),s("text"),s("marker.color",i),s("marker.opacity"),s("marker.blend"),s("marker.sizemin"),s("marker.sizemax"),s("marker.border.color",i),s("marker.border.arearatio"),c._length=null}},{"../../lib":503,"./attributes":913}],916:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("../scatter3d/calc"),plot:e("./convert"),moduleType:"trace",name:"pointcloud",basePlotModule:e("../../plots/gl2d"),categories:["gl","gl2d","showLegend"],meta:{}}},{"../../plots/gl2d":596,"../scatter3d/calc":956,"./attributes":913,"./convert":914,"./defaults":915}],917:[function(e,o,f){var r=e("../../plots/font_attributes"),a=e("../../plots/attributes"),l=e("../../components/color/attributes"),c=e("../../components/fx/attributes"),i=e("../../plots/domain").attributes,s=e("../../plots/template_attributes").hovertemplateAttrs,u=e("../../components/colorscale/attributes"),d=e("../../plot_api/plot_template").templatedArray,h=e("../../plots/cartesian/axis_format_attributes").descriptionOnlyNumbers,m=e("../../lib/extend").extendFlat,g=e("../../plot_api/edit_types").overrideAll;(o.exports=g({hoverinfo:m({},a.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:c.hoverlabel,domain:i({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:h("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:r({}),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:l.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:c.hoverlabel,hovertemplate:s({},{keys:["value","label"]})},link:{label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:l.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:c.hoverlabel,hovertemplate:s({},{keys:["value","label"]}),colorscales:d("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:m(u().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},{"../../components/color/attributes":365,"../../components/colorscale/attributes":373,"../../components/fx/attributes":397,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plot_api/plot_template":543,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/domain":584,"../../plots/font_attributes":585,"../../plots/template_attributes":633}],918:[function(e,o,f){var r=e("../../plot_api/edit_types").overrideAll,a=e("../../plots/get_data").getModuleCalcData,l=e("./plot"),c=e("../../components/fx/layout_attributes"),i=e("../../lib/setcursor"),s=e("../../components/dragelement"),u=e("../../plots/cartesian/select").prepSelect,d=e("../../lib"),h=e("../../registry");function m(g,p){var v=g._fullData[p],y=g._fullLayout,x=y.dragmode,w=y.dragmode==="pan"?"move":"crosshair",k=v._bgRect;if(x!=="pan"&&x!=="zoom"){i(k,w);var b={_id:"x",c2p:d.identity,_offset:v._sankey.translateX,_length:v._sankey.width},T={_id:"y",c2p:d.identity,_offset:v._sankey.translateY,_length:v._sankey.height},_={gd:g,element:k.node(),plotinfo:{id:p,xaxis:b,yaxis:T,fillRangeItems:d.noop},subplot:p,xaxes:[b],yaxes:[T],doneFnCompleted:function(S){var A,M=g._fullData[p],E=M.node.groups.slice(),D=[];function O(P){for(var N=M._sankey.graph.nodes,B=0;BS&&(S=g.source[h]),g.target[h]>S&&(S=g.target[h]);var A,M=S+1;d.node._count=M;var E=d.node.groups,D={};for(h=0;h0&&i(N,M)&&i(B,M)&&(!D.hasOwnProperty(N)||!D.hasOwnProperty(B)||D[N]!==D[B])){D.hasOwnProperty(B)&&(B=D[B]),D.hasOwnProperty(N)&&(N=D[N]),B=+B,x[N=+N]=x[B]=!0;var G="";g.label&&g.label[h]&&(G=g.label[h]);var W=null;G&&w.hasOwnProperty(G)&&(W=w[G]),p.push({pointNumber:h,label:G,color:v?g.color[h]:g.color,customdata:y?g.customdata[h]:g.customdata,concentrationscale:W,source:N,target:B,value:+P}),L.source.push(N),L.target.push(B)}}var K=M+E.length,te=c(m.color),Y=c(m.customdata),Z=[];for(h=0;hM-1,childrenNodes:[],pointNumber:h,label:re,color:te?m.color[h]:m.color,customdata:Y?m.customdata[h]:m.customdata})}var U=!1;return function(q,$,ne){for(var H=a.init2dArray(q,0),Q=0;Q1})}(K,L.source,L.target)&&(U=!0),{circular:U,links:p,nodes:Z,groups:E,groupLookup:D}}o.exports=function(d,h){var m=u(h);return l({circular:m.circular,_nodes:m.nodes,_links:m.links,_groups:m.groups,_groupLookup:m.groupLookup})}},{"../../components/colorscale":378,"../../lib":503,"../../lib/gup":500,"strongly-connected-components":306}],920:[function(e,o,f){o.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"}}},{}],921:[function(e,o,f){var r=e("../../lib"),a=e("./attributes"),l=e("../../components/color"),c=e("tinycolor2"),i=e("../../plots/domain").defaults,s=e("../../components/fx/hoverlabel_defaults"),u=e("../../plot_api/plot_template"),d=e("../../plots/array_container_defaults");function h(m,g){function p(v,y){return r.coerce(m,g,a.link.colorscales,v,y)}p("label"),p("cmin"),p("cmax"),p("colorscale")}o.exports=function(m,g,p,v){function y(D,O){return r.coerce(m,g,a,D,O)}var x=r.extendDeep(v.hoverlabel,m.hoverlabel),w=m.node,k=u.newContainer(g,"node");function b(D,O){return r.coerce(w,k,a.node,D,O)}b("label"),b("groups"),b("x"),b("y"),b("pad"),b("thickness"),b("line.color"),b("line.width"),b("hoverinfo",m.hoverinfo),s(w,k,b,x),b("hovertemplate");var T=v.colorway;b("color",k.label.map(function(D,O){return l.addOpacity(function(R){return T[R%T.length]}(O),.8)})),b("customdata");var _=m.link||{},S=u.newContainer(g,"link");function A(D,O){return r.coerce(_,S,a.link,D,O)}A("label"),A("source"),A("target"),A("value"),A("line.color"),A("line.width"),A("hoverinfo",m.hoverinfo),s(_,S,A,x),A("hovertemplate");var M,E=c(v.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";A("color",r.repeat(E,S.value.length)),A("customdata"),d(_,S,{name:"colorscales",handleItemDefaults:h}),i(g,v,y),y("orientation"),y("valueformat"),y("valuesuffix"),k.x.length&&k.y.length&&(M="freeform"),y("arrangement",M),r.coerceFont(y,"textfont",r.extendFlat({},v.font)),g._length=null}},{"../../components/color":366,"../../components/fx/hoverlabel_defaults":404,"../../lib":503,"../../plot_api/plot_template":543,"../../plots/array_container_defaults":549,"../../plots/domain":584,"./attributes":917,tinycolor2:312}],922:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),moduleType:"trace",name:"sankey",basePlotModule:e("./base_plot"),selectPoints:e("./select.js"),categories:["noOpacity"],meta:{}}},{"./attributes":917,"./base_plot":918,"./calc":919,"./defaults":921,"./plot":923,"./select.js":925}],923:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),l=a.numberFormat,c=e("./render"),i=e("../../components/fx"),s=e("../../components/color"),u=e("./constants").cn,d=a._;function h(_){return _!==""}function m(_,S){return _.filter(function(A){return A.key===S.traceId})}function g(_,S){r.select(_).select("path").style("fill-opacity",S),r.select(_).select("rect").style("fill-opacity",S)}function p(_){r.select(_).select("text.name").style("fill","black")}function v(_){return function(S){return _.node.sourceLinks.indexOf(S.link)!==-1||_.node.targetLinks.indexOf(S.link)!==-1}}function y(_){return function(S){return S.node.sourceLinks.indexOf(_.link)!==-1||S.node.targetLinks.indexOf(_.link)!==-1}}function x(_,S,A){S&&A&&m(A,S).selectAll("."+u.sankeyLink).filter(v(S)).call(k.bind(0,S,A,!1))}function w(_,S,A){S&&A&&m(A,S).selectAll("."+u.sankeyLink).filter(v(S)).call(b.bind(0,S,A,!1))}function k(_,S,A,M){var E=M.datum().link.label;M.style("fill-opacity",function(D){if(!D.link.concentrationscale)return .4}),E&&m(S,_).selectAll("."+u.sankeyLink).filter(function(D){return D.link.label===E}).style("fill-opacity",function(D){if(!D.link.concentrationscale)return .4}),A&&m(S,_).selectAll("."+u.sankeyNode).filter(y(_)).call(x)}function b(_,S,A,M){var E=M.datum().link.label;M.style("fill-opacity",function(D){return D.tinyColorAlpha}),E&&m(S,_).selectAll("."+u.sankeyLink).filter(function(D){return D.link.label===E}).style("fill-opacity",function(D){return D.tinyColorAlpha}),A&&m(S,_).selectAll(u.sankeyNode).filter(y(_)).call(w)}function T(_,S){var A=_.hoverlabel||{},M=a.nestedProperty(A,S).get();return!Array.isArray(M)&&M}o.exports=function(_,S){for(var A=_._fullLayout,M=A._paper,E=A._size,D=0;D<_._fullData.length;D++)if(_._fullData[D].visible&&_._fullData[D].type===u.sankey&&!_._fullData[D]._viewInitial){var O=_._fullData[D].node;_._fullData[D]._viewInitial={node:{groups:O.groups.slice(),x:O.x.slice(),y:O.y.slice()}}}var R=d(_,"source:")+" ",z=d(_,"target:")+" ",L=d(_,"concentration:")+" ",P=d(_,"incoming flow count:")+" ",N=d(_,"outgoing flow count:")+" ";c(_,M,S,{width:E.w,height:E.h,margin:{t:E.t,r:E.r,b:E.b,l:E.l}},{linkEvents:{hover:function(B,G,W){_._fullLayout.hovermode!==!1&&(r.select(B).call(k.bind(0,G,W,!0)),G.link.trace.link.hoverinfo!=="skip"&&(G.link.fullData=G.link.trace,_.emit("plotly_hover",{event:r.event,points:[G.link]})))},follow:function(B,G){if(_._fullLayout.hovermode!==!1){var W=G.link.trace.link;if(W.hoverinfo!=="none"&&W.hoverinfo!=="skip"){for(var K=[],te=0,Y=0;Y"),color:T(W,"bgcolor")||s.addOpacity(Z.color,1),borderColor:T(W,"bordercolor"),fontFamily:T(W,"font.family"),fontSize:T(W,"font.size"),fontColor:T(W,"font.color"),nameLength:T(W,"namelength"),textAlign:T(W,"align"),idealAlign:r.event.x"),color:T(W,"bgcolor")||G.tinyColorHue,borderColor:T(W,"bordercolor"),fontFamily:T(W,"font.family"),fontSize:T(W,"font.size"),fontColor:T(W,"font.color"),nameLength:T(W,"namelength"),textAlign:T(W,"align"),idealAlign:"left",hovertemplate:W.hovertemplate,hovertemplateLabels:q,eventData:[G.node]},{container:A._hoverlayer.node(),outerContainer:A._paper.node(),gd:_});g(H,.85),p(H)}}},unhover:function(B,G,W){_._fullLayout.hovermode!==!1&&(r.select(B).call(w,G,W),G.node.trace.node.hoverinfo!=="skip"&&(G.node.fullData=G.node.trace,_.emit("plotly_unhover",{event:r.event,points:[G.node]})),i.loneUnhover(A._hoverlayer.node()))},select:function(B,G,W){var K=G.node;K.originalEvent=r.event,_._hoverdata=[K],r.select(B).call(w,G,W),i.click(_,{target:!0})}}})}},{"../../components/color":366,"../../components/fx":406,"../../lib":503,"./constants":920,"./render":924,"@plotly/d3":58}],924:[function(e,o,f){var r=e("d3-force"),a=e("d3-interpolate").interpolateNumber,l=e("@plotly/d3"),c=e("@plotly/d3-sankey"),i=e("@plotly/d3-sankey-circular"),s=e("./constants"),u=e("tinycolor2"),d=e("../../components/color"),h=e("../../components/drawing"),m=e("../../lib"),g=m.strTranslate,p=m.strRotate,v=e("../../lib/gup"),y=v.keyFun,x=v.repeat,w=v.unwrap,k=e("../../lib/svg_text_utils"),b=e("../../registry"),T=e("../../constants/alignment"),_=T.CAP_SHIFT,S=T.LINE_SPACING;function A(Y,Z,re){var U,q=w(Z),$=q.trace,ne=$.domain,H=$.orientation==="h",Q=$.node.pad,ee=$.node.thickness,ie=Y.width*(ne.x[1]-ne.x[0]),ae=Y.height*(ne.y[1]-ne.y[0]),ue=q._nodes,le=q._links,ge=q.circular;(U=ge?i.sankeyCircular().circularLinkGap(0):c.sankey()).iterations(s.sankeyIterations).size(H?[ie,ae]:[ae,ie]).nodeWidth(ee).nodePadding(Q).nodeId(function(Ee){return Ee.pointNumber}).nodes(ue).links(le);var fe,me,_e,we=U();for(var Te in U.nodePadding()=Re||(Ve=Re-Fe.y0)>1e-6&&(Fe.y0+=Ve,Fe.y1+=Ve),Re=Fe.y1+Q})}(function(Ee){var ze,Fe,Ve=Ee.map(function(Ye,nt){return{x0:Ye.x0,index:nt}}).sort(function(Ye,nt){return Ye.x0-nt.x0}),Ke=[],Re=-1,qe=-1/0;for(fe=0;feqe+ee&&(Re+=1,ze=We.x0),qe=We.x0,Ke[Re]||(Ke[Re]=[]),Ke[Re].push(We),Fe=ze-We.x0,We.x0+=Fe,We.x1+=Fe}return Ke}(ue=we.nodes)),U.update(we)}return{circular:ge,key:re,trace:$,guid:m.randstr(),horizontal:H,width:ie,height:ae,nodePad:$.node.pad,nodeLineColor:$.node.line.color,nodeLineWidth:$.node.line.width,linkLineColor:$.link.line.color,linkLineWidth:$.link.line.width,valueFormat:$.valueformat,valueSuffix:$.valuesuffix,textFont:$.textfont,translateX:ne.x[0]*Y.width+Y.margin.l,translateY:Y.height-ne.y[1]*Y.height+Y.margin.t,dragParallel:H?ae:ie,dragPerpendicular:H?ie:ae,arrangement:$.arrangement,sankey:U,graph:we,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function M(Y,Z,re){var U=u(Z.color),q=Z.source.label+"|"+Z.target.label+"__"+re;return Z.trace=Y.trace,Z.curveNumber=Y.trace.index,{circular:Y.circular,key:q,traceId:Y.key,pointNumber:Z.pointNumber,link:Z,tinyColorHue:d.tinyRGB(U),tinyColorAlpha:U.getAlpha(),linkPath:E,linkLineColor:Y.linkLineColor,linkLineWidth:Y.linkLineWidth,valueFormat:Y.valueFormat,valueSuffix:Y.valueSuffix,sankey:Y.sankey,parent:Y,interactionState:Y.interactionState,flow:Z.flow}}function E(){return function(Y){if(Y.link.circular)return Z=Y.link,re=Z.width/2,U=Z.circularPathData,Z.circularLinkType==="top"?"M "+U.targetX+" "+(U.targetY+re)+" L"+U.rightInnerExtent+" "+(U.targetY+re)+"A"+(U.rightLargeArcRadius+re)+" "+(U.rightSmallArcRadius+re)+" 0 0 1 "+(U.rightFullExtent-re)+" "+(U.targetY-U.rightSmallArcRadius)+"L"+(U.rightFullExtent-re)+" "+U.verticalRightInnerExtent+"A"+(U.rightLargeArcRadius+re)+" "+(U.rightLargeArcRadius+re)+" 0 0 1 "+U.rightInnerExtent+" "+(U.verticalFullExtent-re)+"L"+U.leftInnerExtent+" "+(U.verticalFullExtent-re)+"A"+(U.leftLargeArcRadius+re)+" "+(U.leftLargeArcRadius+re)+" 0 0 1 "+(U.leftFullExtent+re)+" "+U.verticalLeftInnerExtent+"L"+(U.leftFullExtent+re)+" "+(U.sourceY-U.leftSmallArcRadius)+"A"+(U.leftLargeArcRadius+re)+" "+(U.leftSmallArcRadius+re)+" 0 0 1 "+U.leftInnerExtent+" "+(U.sourceY+re)+"L"+U.sourceX+" "+(U.sourceY+re)+"L"+U.sourceX+" "+(U.sourceY-re)+"L"+U.leftInnerExtent+" "+(U.sourceY-re)+"A"+(U.leftLargeArcRadius-re)+" "+(U.leftSmallArcRadius-re)+" 0 0 0 "+(U.leftFullExtent-re)+" "+(U.sourceY-U.leftSmallArcRadius)+"L"+(U.leftFullExtent-re)+" "+U.verticalLeftInnerExtent+"A"+(U.leftLargeArcRadius-re)+" "+(U.leftLargeArcRadius-re)+" 0 0 0 "+U.leftInnerExtent+" "+(U.verticalFullExtent+re)+"L"+U.rightInnerExtent+" "+(U.verticalFullExtent+re)+"A"+(U.rightLargeArcRadius-re)+" "+(U.rightLargeArcRadius-re)+" 0 0 0 "+(U.rightFullExtent+re)+" "+U.verticalRightInnerExtent+"L"+(U.rightFullExtent+re)+" "+(U.targetY-U.rightSmallArcRadius)+"A"+(U.rightLargeArcRadius-re)+" "+(U.rightSmallArcRadius-re)+" 0 0 0 "+U.rightInnerExtent+" "+(U.targetY-re)+"L"+U.targetX+" "+(U.targetY-re)+"Z":"M "+U.targetX+" "+(U.targetY-re)+" L"+U.rightInnerExtent+" "+(U.targetY-re)+"A"+(U.rightLargeArcRadius+re)+" "+(U.rightSmallArcRadius+re)+" 0 0 0 "+(U.rightFullExtent-re)+" "+(U.targetY+U.rightSmallArcRadius)+"L"+(U.rightFullExtent-re)+" "+U.verticalRightInnerExtent+"A"+(U.rightLargeArcRadius+re)+" "+(U.rightLargeArcRadius+re)+" 0 0 0 "+U.rightInnerExtent+" "+(U.verticalFullExtent+re)+"L"+U.leftInnerExtent+" "+(U.verticalFullExtent+re)+"A"+(U.leftLargeArcRadius+re)+" "+(U.leftLargeArcRadius+re)+" 0 0 0 "+(U.leftFullExtent+re)+" "+U.verticalLeftInnerExtent+"L"+(U.leftFullExtent+re)+" "+(U.sourceY+U.leftSmallArcRadius)+"A"+(U.leftLargeArcRadius+re)+" "+(U.leftSmallArcRadius+re)+" 0 0 0 "+U.leftInnerExtent+" "+(U.sourceY-re)+"L"+U.sourceX+" "+(U.sourceY-re)+"L"+U.sourceX+" "+(U.sourceY+re)+"L"+U.leftInnerExtent+" "+(U.sourceY+re)+"A"+(U.leftLargeArcRadius-re)+" "+(U.leftSmallArcRadius-re)+" 0 0 1 "+(U.leftFullExtent-re)+" "+(U.sourceY+U.leftSmallArcRadius)+"L"+(U.leftFullExtent-re)+" "+U.verticalLeftInnerExtent+"A"+(U.leftLargeArcRadius-re)+" "+(U.leftLargeArcRadius-re)+" 0 0 1 "+U.leftInnerExtent+" "+(U.verticalFullExtent-re)+"L"+U.rightInnerExtent+" "+(U.verticalFullExtent-re)+"A"+(U.rightLargeArcRadius-re)+" "+(U.rightLargeArcRadius-re)+" 0 0 1 "+(U.rightFullExtent+re)+" "+U.verticalRightInnerExtent+"L"+(U.rightFullExtent+re)+" "+(U.targetY+U.rightSmallArcRadius)+"A"+(U.rightLargeArcRadius-re)+" "+(U.rightSmallArcRadius-re)+" 0 0 1 "+U.rightInnerExtent+" "+(U.targetY+re)+"L"+U.targetX+" "+(U.targetY+re)+"Z";var Z,re,U,q=Y.link.source.x1,$=Y.link.target.x0,ne=a(q,$),H=ne(.5),Q=ne(.5),ee=Y.link.y0-Y.link.width/2,ie=Y.link.y0+Y.link.width/2,ae=Y.link.y1-Y.link.width/2,ue=Y.link.y1+Y.link.width/2;return"M"+q+","+ee+"C"+H+","+ee+" "+Q+","+ae+" "+$+","+ae+"L"+$+","+ue+"C"+Q+","+ue+" "+H+","+ie+" "+q+","+ie+"Z"}}function D(Y,Z){var re=u(Z.color),U=s.nodePadAcross,q=Y.nodePad/2;Z.dx=Z.x1-Z.x0,Z.dy=Z.y1-Z.y0;var $=Z.dx,ne=Math.max(.5,Z.dy),H="node_"+Z.pointNumber;return Z.group&&(H=m.randstr()),Z.trace=Y.trace,Z.curveNumber=Y.trace.index,{index:Z.pointNumber,key:H,partOfGroup:Z.partOfGroup||!1,group:Z.group,traceId:Y.key,trace:Y.trace,node:Z,nodePad:Y.nodePad,nodeLineColor:Y.nodeLineColor,nodeLineWidth:Y.nodeLineWidth,textFont:Y.textFont,size:Y.horizontal?Y.height:Y.width,visibleWidth:Math.ceil($),visibleHeight:ne,zoneX:-U,zoneY:-q,zoneWidth:$+2*U,zoneHeight:ne+2*q,labelY:Y.horizontal?Z.dy/2+1:Z.dx/2+1,left:Z.originalLayer===1,sizeAcross:Y.width,forceLayouts:Y.forceLayouts,horizontal:Y.horizontal,darkBackground:re.getBrightness()<=128,tinyColorHue:d.tinyRGB(re),tinyColorAlpha:re.getAlpha(),valueFormat:Y.valueFormat,valueSuffix:Y.valueSuffix,sankey:Y.sankey,graph:Y.graph,arrangement:Y.arrangement,uniqueNodeLabelPathId:[Y.guid,Y.key,H].join("_"),interactionState:Y.interactionState,figure:Y}}function O(Y){Y.attr("transform",function(Z){return g(Z.node.x0.toFixed(3),Z.node.y0.toFixed(3))})}function R(Y){Y.call(O)}function z(Y,Z){Y.call(R),Z.attr("d",E())}function L(Y){Y.attr("width",function(Z){return Z.node.x1-Z.node.x0}).attr("height",function(Z){return Z.visibleHeight})}function P(Y){return Y.link.width>1||Y.linkLineWidth>0}function N(Y){return g(Y.translateX,Y.translateY)+(Y.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function B(Y,Z,re){Y.on(".basic",null).on("mouseover.basic",function(U){U.interactionState.dragInProgress||U.partOfGroup||(re.hover(this,U,Z),U.interactionState.hovered=[this,U])}).on("mousemove.basic",function(U){U.interactionState.dragInProgress||U.partOfGroup||(re.follow(this,U),U.interactionState.hovered=[this,U])}).on("mouseout.basic",function(U){U.interactionState.dragInProgress||U.partOfGroup||(re.unhover(this,U,Z),U.interactionState.hovered=!1)}).on("click.basic",function(U){U.interactionState.hovered&&(re.unhover(this,U,Z),U.interactionState.hovered=!1),U.interactionState.dragInProgress||U.partOfGroup||re.select(this,U,Z)})}function G(Y,Z,re,U){var q=l.behavior.drag().origin(function($){return{x:$.node.x0+$.visibleWidth/2,y:$.node.y0+$.visibleHeight/2}}).on("dragstart",function($){if($.arrangement!=="fixed"&&(m.ensureSingle(U._fullLayout._infolayer,"g","dragcover",function(H){U._fullLayout._dragCover=H}),m.raiseToTop(this),$.interactionState.dragInProgress=$.node,K($.node),$.interactionState.hovered&&(re.nodeEvents.unhover.apply(0,$.interactionState.hovered),$.interactionState.hovered=!1),$.arrangement==="snap")){var ne=$.traceId+"|"+$.key;$.forceLayouts[ne]?$.forceLayouts[ne].alpha(1):function(H,Q,ee,ie){(function(ue){for(var le=0;le0&&fe.forceLayouts[le].alpha(0)}}(0,Q,ae,ee)).stop()}(0,ne,$),function(H,Q,ee,ie,ae){window.requestAnimationFrame(function ue(){var le;for(le=0;le0)window.requestAnimationFrame(ue);else{var ge=ee.node.originalX;ee.node.x0=ge-ee.visibleWidth/2,ee.node.x1=ge+ee.visibleWidth/2,W(ee,ae)}})}(Y,Z,$,ne,U)}}).on("drag",function($){if($.arrangement!=="fixed"){var ne=l.event.x,H=l.event.y;$.arrangement==="snap"?($.node.x0=ne-$.visibleWidth/2,$.node.x1=ne+$.visibleWidth/2,$.node.y0=H-$.visibleHeight/2,$.node.y1=H+$.visibleHeight/2):($.arrangement==="freeform"&&($.node.x0=ne-$.visibleWidth/2,$.node.x1=ne+$.visibleWidth/2),H=Math.max(0,Math.min($.size-$.visibleHeight/2,H)),$.node.y0=H-$.visibleHeight/2,$.node.y1=H+$.visibleHeight/2),K($.node),$.arrangement!=="snap"&&($.sankey.update($.graph),z(Y.filter(te($)),Z))}}).on("dragend",function($){if($.arrangement!=="fixed"){$.interactionState.dragInProgress=!1;for(var ne=0;ne<$.node.childrenNodes.length;ne++)$.node.childrenNodes[ne].x=$.node.x,$.node.childrenNodes[ne].y=$.node.y;$.arrangement!=="snap"&&W($,U)}});Y.on(".drag",null).call(q)}function W(Y,Z){for(var re=[],U=[],q=0;qb&&G[_].gap;)_--;for(A=G[_].s,T=G.length-1;T>_;T--)G[T].s=A;for(;b<_;)if(G[++b].gap){for(T=b+1;G[T].gap;)T++;for(var Q=G[b-1][Y],ee=G[b-1].s,ie=(G[T].s-ee)/(G[T][Y]-Q);bR[g]&&g=0;i--){var s=r[i];if(s.type==="scatter"&&s.xaxis===l.xaxis&&s.yaxis===l.yaxis){s.opacity=void 0;break}}}}}},{}],934:[function(e,o,f){var r=e("../../lib"),a=e("../../registry"),l=e("./attributes"),c=e("./constants"),i=e("./subtypes"),s=e("./xy_defaults"),u=e("./period_defaults"),d=e("./stack_defaults"),h=e("./marker_defaults"),m=e("./line_defaults"),g=e("./line_shape_defaults"),p=e("./text_defaults"),v=e("./fillcolor_defaults"),y=e("../../lib").coercePattern;o.exports=function(x,w,k,b){function T(R,z){return r.coerce(x,w,l,R,z)}var _=s(x,w,b,T);if(_||(w.visible=!1),w.visible){u(x,w,b,T),T("xhoverformat"),T("yhoverformat");var S=d(x,w,b,T),A=!S&&_=Math.min(ge,fe)&&x<=Math.max(ge,fe)?0:1/0}var me=Math.max(3,le.mrc||0),_e=1-1/me,we=Math.abs(v.c2p(le.x)-x);return we=Math.min(ge,fe)&&w<=Math.max(ge,fe)?0:1/0}var me=Math.max(3,le.mrc||0),_e=1-1/me,we=Math.abs(y.c2p(le.y)-w);return weae!=(U=K[G][1])>=ae&&(Y=K[G-1][0],Z=K[G][0],U-re&&(te=Y+(Z-Y)*(ae-re)/(U-re),H=Math.min(H,te),Q=Math.max(Q,te)));H=Math.max(H,0),Q=Math.min(Q,v._length);var ue=i.defaultLine;return i.opacity(p.fillcolor)?ue=p.fillcolor:i.opacity((p.line||{}).color)&&(ue=p.line.color),r.extendFlat(u,{distance:u.maxHoverDistance,x0:H,x1:Q,y0:ae,y1:ae,color:ue,hovertemplate:!1}),delete u.index,p.text&&!Array.isArray(p.text)?u.text=String(p.text):u.text=p.name,[u]}}}},{"../../components/color":366,"../../components/fx":406,"../../lib":503,"../../registry":638,"./get_trace_color":937}],939:[function(e,o,f){var r=e("./subtypes");o.exports={hasLines:r.hasLines,hasMarkers:r.hasMarkers,hasText:r.hasText,isBubble:r.isBubble,attributes:e("./attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("./cross_trace_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./cross_trace_calc"),arraysToCalcdata:e("./arrays_to_calcdata"),plot:e("./plot"),colorbar:e("./marker_colorbar"),formatLabels:e("./format_labels"),style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("./select"),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"./arrays_to_calcdata":926,"./attributes":927,"./calc":928,"./cross_trace_calc":932,"./cross_trace_defaults":933,"./defaults":934,"./format_labels":936,"./hover":938,"./marker_colorbar":945,"./plot":948,"./select":949,"./style":951,"./subtypes":952}],940:[function(e,o,f){var r=e("../../lib").isArrayOrTypedArray,a=e("../../components/colorscale/helpers").hasColorscale,l=e("../../components/colorscale/defaults");o.exports=function(c,i,s,u,d,h){var m=(c.marker||{}).color;d("line.color",s),a(c,"line")?l(c,i,u,d,{prefix:"line.",cLetter:"c"}):d("line.color",!r(m)&&m||s),d("line.width"),(h||{}).noDash||d("line.dash")}},{"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"../../lib":503}],941:[function(e,o,f){var r=e("../../constants/numerical"),a=r.BADNUM,l=r.LOG_CLIP,c=l+.5,i=l-.5,s=e("../../lib"),u=s.segmentsIntersect,d=s.constrain,h=e("./constants");o.exports=function(m,g){var p,v,y,x,w,k,b,T,_,S,A,M,E,D,O,R,z,L,P=g.xaxis,N=g.yaxis,B=P.type==="log",G=N.type==="log",W=P._length,K=N._length,te=g.connectGaps,Y=g.baseTolerance,Z=g.shape,re=Z==="linear",U=g.fill&&g.fill!=="none",q=[],$=h.minTolerance,ne=m.length,H=new Array(ne),Q=0;function ee(Ye){var nt=m[Ye];if(!nt)return!1;var ft=g.linearized?P.l2p(nt.x):P.c2p(nt.x),vt=g.linearized?N.l2p(nt.y):N.c2p(nt.y);if(ft===a){if(B&&(ft=P.c2p(nt.x,!0)),ft===a)return!1;G&&vt===a&&(ft*=Math.abs(P._m*K*(P._m>0?c:i)/(N._m*W*(N._m>0?c:i)))),ft*=1e3}if(vt===a){if(G&&(vt=N.c2p(nt.y,!0)),vt===a)return!1;vt*=1e3}return[ft,vt]}function ie(Ye,nt,ft,vt){var Pt=ft-Ye,At=vt-nt,at=.5-Ye,et=.5-nt,Ot=Pt*Pt+At*At,Wt=Pt*at+At*et;if(Wt>0&&Wtye||Ye[1]ke)return[d(Ye[0],de,ye),d(Ye[1],Me,ke)]}function Fe(Ye,nt){return Ye[0]===nt[0]&&(Ye[0]===de||Ye[0]===ye)||Ye[1]===nt[1]&&(Ye[1]===Me||Ye[1]===ke)||void 0}function Ve(Ye,nt,ft){return function(vt,Pt){var At=ze(vt),at=ze(Pt),et=[];if(At&&at&&Fe(At,at))return et;At&&et.push(At),at&&et.push(at);var Ot=2*s.constrain((vt[Ye]+Pt[Ye])/2,nt,ft)-((At||vt)[Ye]+(at||Pt)[Ye]);return Ot&&((At&&at?Ot>0==At[Ye]>at[Ye]?At:at:At||at)[Ye]+=Ot),et}}function Ke(Ye){var nt=Ye[0],ft=Ye[1],vt=nt===H[Q-1][0],Pt=ft===H[Q-1][1];if(!vt||!Pt)if(Q>1){var At=nt===H[Q-2][0],at=ft===H[Q-2][1];vt&&(nt===de||nt===ye)&&At?at?Q--:H[Q-1]=Ye:Pt&&(ft===Me||ft===ke)&&at?At?Q--:H[Q-1]=Ye:H[Q++]=Ye}else H[Q++]=Ye}function Re(Ye){H[Q-1][0]!==Ye[0]&&H[Q-1][1]!==Ye[1]&&Ke([fe,me]),Ke(Ye),_e=null,fe=me=0}function qe(Ye){if(z=Ye[0]/W,L=Ye[1]/K,le=Ye[0]ye?ye:0,ge=Ye[1]ke?ke:0,le||ge){if(Q)if(_e){var nt=Te(_e,Ye);nt.length>1&&(Re(nt[0]),H[Q++]=nt[1])}else we=Te(H[Q-1],Ye)[0],H[Q++]=we;else H[Q++]=[le||Ye[0],ge||Ye[1]];var ft=H[Q-1];le&&ge&&(ft[0]!==le||ft[1]!==ge)?(_e&&(fe!==le&&me!==ge?Ke(fe&&me?(vt=_e,At=(Pt=Ye)[0]-vt[0],at=(Pt[1]-vt[1])/At,(vt[1]*Pt[0]-Pt[1]*vt[0])/At>0?[at>0?de:ye,ke]:[at>0?ye:de,Me]):[fe||le,me||ge]):fe&&me&&Ke([fe,me])),Ke([le,ge])):fe-le&&me-ge&&Ke([le||fe,ge||me]),_e=Ye,fe=le,me=ge}else _e&&Re(Te(_e,Ye)[0]),H[Q++]=Ye;var vt,Pt,At,at}for(Z==="linear"||Z==="spline"?Te=function(Ye,nt){for(var ft=[],vt=0,Pt=0;Pt<4;Pt++){var At=Ee[Pt],at=u(Ye[0],Ye[1],nt[0],nt[1],At[0],At[1],At[2],At[3]);at&&(!vt||Math.abs(at.x-ft[0][0])>1||Math.abs(at.y-ft[0][1])>1)&&(at=[at.x,at.y],vt&&ue(at,Ye)ae(k,We))break;y=k,(E=_[0]*T[0]+_[1]*T[1])>A?(A=E,x=k,b=!1):E=m.length||!k)break;qe(k),v=k}}else qe(x)}_e&&Ke([fe||_e[0],me||_e[1]]),q.push(H.slice(0,Q))}return q}},{"../../constants/numerical":479,"../../lib":503,"./constants":931}],942:[function(e,o,f){o.exports=function(r,a,l){l("line.shape")==="spline"&&l("line.smoothing")}},{}],943:[function(e,o,f){var r={tonextx:1,tonexty:1,tonext:1};o.exports=function(a,l,c){var i,s,u,d,h,m={},g=!1,p=-1,v=0,y=-1;for(s=0;s=0?h=y:(h=y=v,v++),h0?Math.max(h,s):0}}},{"fast-isnumeric":190}],945:[function(e,o,f){o.exports={container:"marker",min:"cmin",max:"cmax"}},{}],946:[function(e,o,f){var r=e("../../components/color"),a=e("../../components/colorscale/helpers").hasColorscale,l=e("../../components/colorscale/defaults"),c=e("./subtypes");o.exports=function(i,s,u,d,h,m){var g=c.isBubble(i),p=(i.line||{}).color;m=m||{},p&&(u=p),h("marker.symbol"),h("marker.opacity",g?.7:1),h("marker.size"),h("marker.color",u),a(i,"marker")&&l(i,s,d,h,{prefix:"marker.",cLetter:"c"}),m.noSelect||(h("selected.marker.color"),h("unselected.marker.color"),h("selected.marker.size"),h("unselected.marker.size")),m.noLine||(h("marker.line.color",p&&!Array.isArray(p)&&s.marker.color!==p?p:g?r.background:r.defaultLine),a(i,"marker.line")&&l(i,s,d,h,{prefix:"marker.line.",cLetter:"c"}),h("marker.line.width",g?1:0)),g&&(h("marker.sizeref"),h("marker.sizemin"),h("marker.sizemode")),m.gradient&&h("marker.gradient.type")!=="none"&&h("marker.gradient.color")}},{"../../components/color":366,"../../components/colorscale/defaults":376,"../../components/colorscale/helpers":377,"./subtypes":952}],947:[function(e,o,f){var r=e("../../lib").dateTick0,a=e("../../constants/numerical").ONEWEEK;function l(c,i){return r(i,c%a==0?1:0)}o.exports=function(c,i,s,u,d){if(d||(d={x:!0,y:!0}),d.x){var h=u("xperiod");h&&(u("xperiod0",l(h,i.xcalendar)),u("xperiodalignment"))}if(d.y){var m=u("yperiod");m&&(u("yperiod0",l(m,i.ycalendar)),u("yperiodalignment"))}}},{"../../constants/numerical":479,"../../lib":503}],948:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../registry"),l=e("../../lib"),c=l.ensureSingle,i=l.identity,s=e("../../components/drawing"),u=e("./subtypes"),d=e("./line_points"),h=e("./link_traces"),m=e("../../lib/polygon").tester;function g(p,v,y,x,w,k,b){var T;(function(ye,Me,ke,Ee,ze){var Fe=ke.xaxis,Ve=ke.yaxis,Ke=r.extent(l.simpleMap(Fe.range,Fe.r2c)),Re=r.extent(l.simpleMap(Ve.range,Ve.r2c)),qe=Ee[0].trace;if(!!u.hasMarkers(qe)){var We=qe.marker.maxdisplayed;if(We!==0){var Ye=Ee.filter(function(Pt){return Pt.x>=Ke[0]&&Pt.x<=Ke[1]&&Pt.y>=Re[0]&&Pt.y<=Re[1]}),nt=Math.ceil(Ye.length/We),ft=0;ze.forEach(function(Pt,At){var at=Pt[0].trace;u.hasMarkers(at)&&at.marker.maxdisplayed>0&&At0;function S(ye){return _?ye.transition():ye}var A=y.xaxis,M=y.yaxis,E=x[0].trace,D=E.line,O=r.select(k),R=c(O,"g","errorbars"),z=c(O,"g","lines"),L=c(O,"g","points"),P=c(O,"g","text");if(a.getComponentMethod("errorbars","plot")(p,R,y,b),E.visible===!0){var N,B;S(O).style("opacity",E.opacity);var G=E.fill.charAt(E.fill.length-1);G!=="x"&&G!=="y"&&(G=""),x[0][y.isRangePlot?"nodeRangePlot3":"node3"]=O;var W,K,te="",Y=[],Z=E._prevtrace;Z&&(te=Z._prevRevpath||"",B=Z._nextFill,Y=Z._polygons);var re,U,q,$,ne,H,Q,ee="",ie="",ae=[],ue=l.noop;if(N=E._ownFill,u.hasLines(E)||E.fill!=="none"){for(B&&B.datum(x),["hv","vh","hvh","vhv"].indexOf(D.shape)!==-1?(re=s.steps(D.shape),U=s.steps(D.shape.split("").reverse().join(""))):re=U=D.shape==="spline"?function(ye){var Me=ye[ye.length-1];return ye.length>1&&ye[0][0]===Me[0]&&ye[0][1]===Me[1]?s.smoothclosed(ye.slice(1),D.smoothing):s.smoothopen(ye,D.smoothing)}:function(ye){return"M"+ye.join("L")},q=function(ye){return U(ye.reverse())},ae=d(x,{xaxis:A,yaxis:M,connectGaps:E.connectgaps,baseTolerance:Math.max(D.width||1,3)/4,shape:D.shape,simplify:D.simplify,fill:E.fill}),Q=E._polygons=new Array(ae.length),T=0;T1){var ke=r.select(this);if(ke.datum(x),ye)S(ke.style("opacity",0).attr("d",W).call(s.lineGroupStyle)).style("opacity",1);else{var Ee=S(ke);Ee.attr("d",W),s.singleLineStyle(x,Ee)}}}}}var le=z.selectAll(".js-line").data(ae);S(le.exit()).style("opacity",0).remove(),le.each(ue(!1)),le.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(s.lineGroupStyle).each(ue(!0)),s.setClipUrl(le,y.layerClipId,p),ae.length?(N?(N.datum(x),$&&H&&(G?(G==="y"?$[1]=H[1]=M.c2p(0,!0):G==="x"&&($[0]=H[0]=A.c2p(0,!0)),S(N).attr("d","M"+H+"L"+$+"L"+ee.substr(1)).call(s.singleFillStyle,p)):S(N).attr("d",ee+"Z").call(s.singleFillStyle,p))):B&&(E.fill.substr(0,6)==="tonext"&&ee&&te?(E.fill==="tonext"?S(B).attr("d",ee+"Z"+te+"Z").call(s.singleFillStyle,p):S(B).attr("d",ee+"L"+te.substr(1)+"Z").call(s.singleFillStyle,p),E._polygons=E._polygons.concat(Y)):(fe(B),E._polygons=null)),E._prevRevpath=ie,E._prevPolygons=Q):(N?fe(N):B&&fe(B),E._polygons=E._prevRevpath=E._prevPolygons=null),L.datum(x),P.datum(x),function(ye,Me,ke){var Ee,ze=ke[0].trace,Fe=u.hasMarkers(ze),Ve=u.hasText(ze),Ke=Oe(ze),Re=de,qe=de;if(Fe||Ve){var We=i,Ye=ze.stackgroup,nt=Ye&&p._fullLayout._scatterStackOpts[A._id+M._id][Ye].stackgaps==="infer zero";ze.marker.maxdisplayed||ze._needsCull?We=nt?_e:me:Ye&&!nt&&(We=we),Fe&&(Re=We),Ve&&(qe=We)}var ft,vt=(Ee=ye.selectAll("path.point").data(Re,Ke)).enter().append("path").classed("point",!0);_&&vt.call(s.pointStyle,ze,p).call(s.translatePoints,A,M).style("opacity",0).transition().style("opacity",1),Ee.order(),Fe&&(ft=s.makePointStyleFns(ze)),Ee.each(function(Pt){var At=r.select(this),at=S(At);s.translatePoint(Pt,at,A,M)?(s.singlePointStyle(Pt,at,ze,ft,p),y.layerClipId&&s.hideOutsideRangePoint(Pt,at,A,M,ze.xcalendar,ze.ycalendar),ze.customdata&&At.classed("plotly-customdata",Pt.data!==null&&Pt.data!==void 0)):at.remove()}),_?Ee.exit().transition().style("opacity",0).remove():Ee.exit().remove(),(Ee=Me.selectAll("g").data(qe,Ke)).enter().append("g").classed("textpoint",!0).append("text"),Ee.order(),Ee.each(function(Pt){var At=r.select(this),at=S(At.select("text"));s.translatePoint(Pt,at,A,M)?y.layerClipId&&s.hideOutsideRangePoint(Pt,At,A,M,ze.xcalendar,ze.ycalendar):At.remove()}),Ee.selectAll("text").call(s.textPointStyle,ze,p).each(function(Pt){var At=A.c2p(Pt.x),at=M.c2p(Pt.y);r.select(this).selectAll("tspan.line").each(function(){S(r.select(this)).attr({x:At,y:at})})}),Ee.exit().remove()}(L,P,x);var ge=E.cliponaxis===!1?null:y.layerClipId;s.setClipUrl(L,ge,p),s.setClipUrl(P,ge,p)}function fe(ye){S(ye).attr("d","M0,0Z")}function me(ye){return ye.filter(function(Me){return!Me.gap&&Me.vis})}function _e(ye){return ye.filter(function(Me){return Me.vis})}function we(ye){return ye.filter(function(Me){return!Me.gap})}function Te(ye){return ye.id}function Oe(ye){if(ye.ids)return Te}function de(){return!1}}o.exports=function(p,v,y,x,w,k){var b,T,_=!w,S=!!w&&w.duration>0,A=h(p,v,y);(b=x.selectAll("g.trace").data(A,function(M){return M[0].trace.uid})).enter().append("g").attr("class",function(M){return"trace scatter trace"+M[0].trace.uid}).style("stroke-miterlimit",2),b.order(),function(M,E,D){E.each(function(O){var R=c(r.select(this),"g","fills");s.setClipUrl(R,D.layerClipId,M);var z=O[0].trace,L=[];z._ownfill&&L.push("_ownFill"),z._nexttrace&&L.push("_nextFill");var P=R.selectAll("g").data(L,i);P.enter().append("g"),P.exit().each(function(N){z[N]=null}).remove(),P.order().each(function(N){z[N]=c(r.select(this),"path","js-fill")})})}(p,b,v),S?(k&&(T=k()),r.transition().duration(w.duration).ease(w.easing).each("end",function(){T&&T()}).each("interrupt",function(){T&&T()}).each(function(){x.selectAll("g.trace").each(function(M,E){g(p,E,v,M,A,this,w)})})):b.each(function(M,E){g(p,E,v,M,A,this,w)}),_&&b.exit().remove(),x.selectAll("path:not([d])").remove()}},{"../../components/drawing":388,"../../lib":503,"../../lib/polygon":515,"../../registry":638,"./line_points":941,"./link_traces":943,"./subtypes":952,"@plotly/d3":58}],949:[function(e,o,f){var r=e("./subtypes");o.exports=function(a,l){var c,i,s,u,d=a.cd,h=a.xaxis,m=a.yaxis,g=[],p=d[0].trace;if(!r.hasMarkers(p)&&!r.hasText(p))return[];if(l===!1)for(c=0;c0){var y=s.c2l(p);s._lowerLogErrorBound||(s._lowerLogErrorBound=y),s._lowerErrorBound=Math.min(s._lowerLogErrorBound,y)}}else d[h]=[-m[0]*i,m[1]*i]}return d}o.exports=function(l,c,i){var s=[a(l.x,l.error_x,c[0],i.xaxis),a(l.y,l.error_y,c[1],i.yaxis),a(l.z,l.error_z,c[2],i.zaxis)],u=function(v){for(var y=0;y-1?-1:D.indexOf("right")>-1?1:0}function b(D){return D==null?0:D.indexOf("top")>-1?-1:D.indexOf("bottom")>-1?1:0}function T(D,O){return O(4*D)}function _(D){return g[D]}function S(D,O,R,z,L){var P=null;if(s.isArrayOrTypedArray(D)){P=[];for(var N=0;N=0){var W=function(K,te,Y){var Z,re=(Y+1)%3,U=(Y+2)%3,q=[],$=[];for(Z=0;Z=0&&p("surfacecolor",v||y);for(var x=["x","y","z"],w=0;w<3;++w){var k="projection."+x[w];p(k+".show")&&(p(k+".opacity"),p(k+".scale"))}var b=r.getComponentMethod("errorbars","supplyDefaults");b(d,h,v||y||m,{axis:"z"}),b(d,h,v||y||m,{axis:"y",inherit:"z"}),b(d,h,v||y||m,{axis:"x",inherit:"z"})}else h.visible=!1}},{"../../lib":503,"../../registry":638,"../scatter/line_defaults":940,"../scatter/marker_defaults":946,"../scatter/subtypes":952,"../scatter/text_defaults":953,"./attributes":955}],960:[function(e,o,f){o.exports={plot:e("./convert"),attributes:e("./attributes"),markerSymbols:e("../../constants/gl3d_markers"),supplyDefaults:e("./defaults"),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:e("./calc"),moduleType:"trace",name:"scatter3d",basePlotModule:e("../../plots/gl3d"),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},{"../../constants/gl3d_markers":477,"../../plots/gl3d":598,"./attributes":955,"./calc":956,"./convert":958,"./defaults":959}],961:[function(e,o,f){var r=e("../scatter/attributes"),a=e("../../plots/attributes"),l=e("../../plots/template_attributes").hovertemplateAttrs,c=e("../../plots/template_attributes").texttemplateAttrs,i=e("../../components/colorscale/attributes"),s=e("../../lib/extend").extendFlat,u=r.marker,d=r.line,h=u.line;o.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:s({},r.mode,{dflt:"markers"}),text:s({},r.text,{}),texttemplate:c({editType:"plot"},{keys:["a","b","text"]}),hovertext:s({},r.hovertext,{}),line:{color:d.color,width:d.width,dash:d.dash,shape:s({},d.shape,{values:["linear","spline"]}),smoothing:d.smoothing,editType:"calc"},connectgaps:r.connectgaps,fill:s({},r.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:r.fillcolor,marker:s({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:s({width:h.width,editType:"calc"},i("marker.line")),gradient:u.gradient,editType:"calc"},i("marker")),textfont:r.textfont,textposition:r.textposition,selected:r.selected,unselected:r.unselected,hoverinfo:s({},a.hoverinfo,{flags:["a","b","text","name"]}),hoveron:r.hoveron,hovertemplate:l()}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":927}],962:[function(e,o,f){var r=e("fast-isnumeric"),a=e("../scatter/colorscale_calc"),l=e("../scatter/arrays_to_calcdata"),c=e("../scatter/calc_selection"),i=e("../scatter/calc").calcMarkerSize,s=e("../carpet/lookup_carpetid");o.exports=function(u,d){var h=d._carpetTrace=s(u,d);if(h&&h.visible&&h.visible!=="legendonly"){var m;d.xaxis=h.xaxis,d.yaxis=h.yaxis;var g,p,v=d._length,y=new Array(v),x=!1;for(m=0;m")}return u}function T(_,S){var A;A=_.labelprefix&&_.labelprefix.length>0?_.labelprefix.replace(/ = $/,""):_._hovertitle,k.push(A+": "+S.toFixed(3)+_.labelsuffix)}}},{"../../lib":503,"../scatter/hover":938}],967:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../scatter/select"),eventData:e("./event_data"),moduleType:"trace",name:"scattercarpet",basePlotModule:e("../../plots/cartesian"),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../scatter/marker_colorbar":945,"../scatter/select":949,"../scatter/style":951,"./attributes":961,"./calc":962,"./defaults":963,"./event_data":964,"./format_labels":965,"./hover":966,"./plot":968}],968:[function(e,o,f){var r=e("../scatter/plot"),a=e("../../plots/cartesian/axes"),l=e("../../components/drawing");o.exports=function(c,i,s,u){var d,h,m,g=s[0][0].carpet,p={xaxis:a.getFromId(c,g.xaxis||"x"),yaxis:a.getFromId(c,g.yaxis||"y"),plot:i.plot};for(r(c,p,s,u),d=0;d")}(m,w,s,h[0].t.labels),s.hovertemplate=m.hovertemplate,[s]}}},{"../../components/fx":406,"../../constants/numerical":479,"../../lib":503,"../scatter/get_trace_color":937,"./attributes":969}],975:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),calcGeoJSON:e("./plot").calcGeoJSON,plot:e("./plot").plot,style:e("./style"),styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("./select"),moduleType:"trace",name:"scattergeo",basePlotModule:e("../../plots/geo"),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/geo":589,"../scatter/marker_colorbar":945,"../scatter/style":951,"./attributes":969,"./calc":970,"./defaults":971,"./event_data":972,"./format_labels":973,"./hover":974,"./plot":976,"./select":977,"./style":978}],976:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),l=e("../../lib/topojson_utils").getTopojsonFeatures,c=e("../../lib/geojson_utils"),i=e("../../lib/geo_location_utils"),s=e("../../plots/cartesian/autorange").findExtremes,u=e("../../constants/numerical").BADNUM,d=e("../scatter/calc").calcMarkerSize,h=e("../scatter/subtypes"),m=e("./style");o.exports={calcGeoJSON:function(g,p){var v,y,x=g[0].trace,w=p[x.geo],k=w._subplot,b=x._length;if(Array.isArray(x.locations)){var T=x.locationmode,_=T==="geojson-id"?i.extractTraceFeature(g):l(x,k.topojson);for(v=0;v=y,D=2*M,O={},R=_.makeCalcdata(k,"x"),z=S.makeCalcdata(k,"y"),L=i(k,_,"x",R),P=i(k,S,"y",z),N=L.vals,B=P.vals;k._x=N,k._y=B,k.xperiodalignment&&(k._origX=R,k._xStarts=L.starts,k._xEnds=L.ends),k.yperiodalignment&&(k._origY=z,k._yStarts=P.starts,k._yEnds=P.ends);var G=new Array(D),W=new Array(M);for(b=0;b1&&a.extendFlat(H.line,g.linePositions(Z,U,q)),H.errorX||H.errorY){var Q=g.errorBarPositions(Z,U,q,$,ne);H.errorX&&a.extendFlat(H.errorX,Q.x),H.errorY&&a.extendFlat(H.errorY,Q.y)}return H.text&&(a.extendFlat(H.text,{positions:q},g.textPosition(Z,U,H.text,H.marker)),a.extendFlat(H.textSel,{positions:q},g.textPosition(Z,U,H.text,H.markerSel)),a.extendFlat(H.textUnsel,{positions:q},g.textPosition(Z,U,H.text,H.markerUnsel))),H}(w,0,k,G,N,B),Y=p(w,A);return h(T,k),E?te.marker&&(K=te.marker.sizeAvg||Math.max(te.marker.size,3)):K=u(k,M),d(w,k,_,S,N,B,K),te.errorX&&x(k,_,te.errorX),te.errorY&&x(k,S,te.errorY),te.fill&&!Y.fill2d&&(Y.fill2d=!0),te.marker&&!Y.scatter2d&&(Y.scatter2d=!0),te.line&&!Y.line2d&&(Y.line2d=!0),!te.errorX&&!te.errorY||Y.error2d||(Y.error2d=!0),te.text&&!Y.glText&&(Y.glText=!0),te.marker&&(te.marker.snap=M),Y.lineOptions.push(te.line),Y.errorXOptions.push(te.errorX),Y.errorYOptions.push(te.errorY),Y.fillOptions.push(te.fill),Y.markerOptions.push(te.marker),Y.markerSelectedOptions.push(te.markerSel),Y.markerUnselectedOptions.push(te.markerUnsel),Y.textOptions.push(te.text),Y.textSelectedOptions.push(te.textSel),Y.textUnselectedOptions.push(te.textUnsel),Y.selectBatch.push([]),Y.unselectBatch.push([]),O._scene=Y,O.index=Y.count,O.x=N,O.y=B,O.positions=G,Y.count++,[{x:!1,y:!1,t:O,trace:k}]}},{"../../constants/numerical":479,"../../lib":503,"../../plots/cartesian/align_period":551,"../../plots/cartesian/autorange":553,"../../plots/cartesian/axis_ids":558,"../scatter/calc":928,"../scatter/colorscale_calc":930,"./constants":982,"./convert":983,"./scene_update":991,"@plotly/point-cluster":59}],982:[function(e,o,f){o.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,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]}}},{}],983:[function(e,o,f){var r=e("fast-isnumeric"),a=e("svg-path-sdf"),l=e("color-normalize"),c=e("../../registry"),i=e("../../lib"),s=e("../../components/drawing"),u=e("../../plots/cartesian/axis_ids"),d=e("../../lib/gl_format_color").formatColor,h=e("../scatter/subtypes"),m=e("../scatter/make_bubble_size_func"),g=e("./helpers"),p=e("./constants"),v=e("../../constants/interactions").DESELECTDIM,y={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},x=e("../../components/fx/helpers").appendArrayPointValue;function w(R,z){var L,P=R._fullLayout,N=z._length,B=z.textfont,G=z.textposition,W=Array.isArray(G)?G:[G],K=B.color,te=B.size,Y=B.family,Z={},re=R._context.plotGlPixelRatio,U=z.texttemplate;if(U){Z.text=[];var q=P._d3locale,$=Array.isArray(U),ne=$?Math.min(U.length,N):N,H=$?function(ge){return U[ge]}:function(){return U};for(L=0;Lp.TOO_MANY_POINTS||h.hasMarkers(z)?"rect":"round";if(te&&z.connectgaps){var Z=P[0],re=P[1];for(N=0;N1?K[N]:K[0]:K,U=Array.isArray(te)?te.length>1?te[N]:te[0]:te,q=y[re],$=y[U],ne=Y?Y/.8+1:0,H=-$*ne-.5*$;G.offset[N]=[q*ne/Z,H/Z]}}return G}}},{"../../components/drawing":388,"../../components/fx/helpers":402,"../../constants/interactions":478,"../../lib":503,"../../lib/gl_format_color":499,"../../plots/cartesian/axis_ids":558,"../../registry":638,"../scatter/make_bubble_size_func":944,"../scatter/subtypes":952,"./constants":982,"./helpers":987,"color-normalize":89,"fast-isnumeric":190,"svg-path-sdf":310}],984:[function(e,o,f){var r=e("../../lib"),a=e("../../registry"),l=e("./helpers"),c=e("./attributes"),i=e("../scatter/constants"),s=e("../scatter/subtypes"),u=e("../scatter/xy_defaults"),d=e("../scatter/period_defaults"),h=e("../scatter/marker_defaults"),m=e("../scatter/line_defaults"),g=e("../scatter/fillcolor_defaults"),p=e("../scatter/text_defaults");o.exports=function(v,y,x,w){function k(D,O){return r.coerce(v,y,c,D,O)}var b=!!v.marker&&l.isOpenSymbol(v.marker.symbol),T=s.isBubble(v),_=u(v,y,w,k);if(_){d(v,y,w,k),k("xhoverformat"),k("yhoverformat");var S=_100},f.isDotSymbol=function(a){return typeof a=="string"?r.DOT_RE.test(a):a>200}},{"./constants":982}],988:[function(e,o,f){var r=e("../../registry"),a=e("../../lib"),l=e("../scatter/get_trace_color");function c(i,s,u,d){var h=i.xa,m=i.ya,g=i.distance,p=i.dxy,v=i.index,y={pointNumber:v,x:s[v],y:u[v]};y.tx=Array.isArray(d.text)?d.text[v]:d.text,y.htx=Array.isArray(d.hovertext)?d.hovertext[v]:d.hovertext,y.data=Array.isArray(d.customdata)?d.customdata[v]:d.customdata,y.tp=Array.isArray(d.textposition)?d.textposition[v]:d.textposition;var x=d.textfont;x&&(y.ts=a.isArrayOrTypedArray(x.size)?x.size[v]:x.size,y.tc=Array.isArray(x.color)?x.color[v]:x.color,y.tf=Array.isArray(x.family)?x.family[v]:x.family);var w=d.marker;w&&(y.ms=a.isArrayOrTypedArray(w.size)?w.size[v]:w.size,y.mo=a.isArrayOrTypedArray(w.opacity)?w.opacity[v]:w.opacity,y.mx=a.isArrayOrTypedArray(w.symbol)?w.symbol[v]:w.symbol,y.mc=a.isArrayOrTypedArray(w.color)?w.color[v]:w.color);var k=w&&w.line;k&&(y.mlc=Array.isArray(k.color)?k.color[v]:k.color,y.mlw=a.isArrayOrTypedArray(k.width)?k.width[v]:k.width);var b=w&&w.gradient;b&&b.type!=="none"&&(y.mgt=Array.isArray(b.type)?b.type[v]:b.type,y.mgc=Array.isArray(b.color)?b.color[v]:b.color);var T=h.c2p(y.x,!0),_=m.c2p(y.y,!0),S=y.mrc||1,A=d.hoverlabel;A&&(y.hbg=Array.isArray(A.bgcolor)?A.bgcolor[v]:A.bgcolor,y.hbc=Array.isArray(A.bordercolor)?A.bordercolor[v]:A.bordercolor,y.hts=a.isArrayOrTypedArray(A.font.size)?A.font.size[v]:A.font.size,y.htc=Array.isArray(A.font.color)?A.font.color[v]:A.font.color,y.htf=Array.isArray(A.font.family)?A.font.family[v]:A.font.family,y.hnl=a.isArrayOrTypedArray(A.namelength)?A.namelength[v]:A.namelength);var M=d.hoverinfo;M&&(y.hi=Array.isArray(M)?M[v]:M);var E=d.hovertemplate;E&&(y.ht=Array.isArray(E)?E[v]:E);var D={};D[i.index]=y;var O=d._origX,R=d._origY,z=a.extendFlat({},i,{color:l(d,y),x0:T-S,x1:T+S,xLabelVal:O?O[v]:y.x,y0:_-S,y1:_+S,yLabelVal:R?R[v]:y.y,cd:D,distance:g,spikeDistance:p,hovertemplate:y.ht});return y.htx?z.text=y.htx:y.tx?z.text=y.tx:d.text&&(z.text=d.text),a.fillText(y,d,z),r.getComponentMethod("errorbars","hoverInfo")(y,d,z),z}o.exports={hoverPoints:function(i,s,u,d){var h,m,g,p,v,y,x,w,k,b,T=i.cd,_=T[0].t,S=T[0].trace,A=i.xa,M=i.ya,E=_.x,D=_.y,O=A.c2p(s),R=M.c2p(u),z=i.distance;if(_.tree){var L=A.p2c(O-z),P=A.p2c(O+z),N=M.p2c(R-z),B=M.p2c(R+z);h=d==="x"?_.tree.range(Math.min(L,P),Math.min(M._rl[0],M._rl[1]),Math.max(L,P),Math.max(M._rl[0],M._rl[1])):_.tree.range(Math.min(L,P),Math.min(N,B),Math.max(L,P),Math.max(N,B))}else h=_.ids;var G=z;if(d==="x"){var W=!!S.xperiodalignment,K=!!S.yperiodalignment;for(y=0;y=Math.min(te,Y)&&O<=Math.max(te,Y)?0:1/0}if(x=Math.min(Z,re)&&R<=Math.max(Z,re)?0:1/0}b=Math.sqrt(x*x+w*w),g=h[y]}}}else for(y=h.length-1;y>-1;y--)p=E[m=h[y]],v=D[m],x=A.c2p(p)-O,w=M.c2p(v)-R,(k=Math.sqrt(x*x+w*w))T.glText.length){var E=A-T.glText.length;for(w=0;wie&&(isNaN(ee[ae])||isNaN(ee[ae+1]));)ae-=2;Q.positions=ee.slice(ie,ae+2)}return Q}),T.line2d.update(T.lineOptions)),T.error2d){var O=(T.errorXOptions||[]).concat(T.errorYOptions||[]);T.error2d.update(O)}T.scatter2d&&T.scatter2d.update(T.markerOptions),T.fillOrder=i.repeat(null,A),T.fill2d&&(T.fillOptions=T.fillOptions.map(function(Q,ee){var ie=x[ee];if(Q&&ie&&ie[0]&&ie[0].trace){var ae,ue,le=ie[0],ge=le.trace,fe=le.t,me=T.lineOptions[ee],_e=[];ge._ownfill&&_e.push(ee),ge._nexttrace&&_e.push(ee+1),_e.length&&(T.fillOrder[ee]=_e);var we,Te,Oe=[],de=me&&me.positions||fe.positions;if(ge.fill==="tozeroy"){for(we=0;wewe&&isNaN(de[Te+1]);)Te-=2;de[we+1]!==0&&(Oe=[de[we],0]),Oe=Oe.concat(de.slice(we,Te+2)),de[Te+1]!==0&&(Oe=Oe.concat([de[Te],0]))}else if(ge.fill==="tozerox"){for(we=0;wewe&&isNaN(de[Te]);)Te-=2;de[we]!==0&&(Oe=[0,de[we+1]]),Oe=Oe.concat(de.slice(we,Te+2)),de[Te]!==0&&(Oe=Oe.concat([0,de[Te+1]]))}else if(ge.fill==="toself"||ge.fill==="tonext"){for(Oe=[],ae=0,Q.splitNull=!0,ue=0;ue-1;for(w=0;w")}function w(k){return k+"\xB0"}}o.exports={hoverPoints:function(u,d,h){var m=u.cd,g=m[0].trace,p=u.xa,v=u.ya,y=u.subplot,x=360*(d>=0?Math.floor((d+180)/360):Math.ceil((d-180)/360)),w=d-x;if(r.getClosest(m,function(D){var O=D.lonlat;if(O[0]===i)return 1/0;var R=a.modHalf(O[0],360),z=O[1],L=y.project([R,z]),P=L.x-p.c2p([w,z]),N=L.y-v.c2p([R,h]),B=Math.max(3,D.mrc||0);return Math.max(Math.sqrt(P*P+N*N)-B,1-3/B)},u),u.index!==!1){var k=m[u.index],b=k.lonlat,T=[a.modHalf(b[0],360)+x,b[1]],_=p.c2p(T),S=v.c2p(T),A=k.mrc||1;u.x0=_-A,u.x1=_+A,u.y0=S-A,u.y1=S+A;var M={};M[g.subplot]={_subplot:y};var E=g._module.formatLabels(k,g,M);return u.lonLabel=E.lonLabel,u.latLabel=E.latLabel,u.color=l(g,k),u.extraText=s(g,k,m[0].t.labels),u.hovertemplate=g.hovertemplate,[u]}},getExtraText:s}},{"../../components/fx":406,"../../constants/numerical":479,"../../lib":503,"../scatter/get_trace_color":937}],999:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("../scattergeo/calc"),plot:e("./plot"),hoverPoints:e("./hover").hoverPoints,eventData:e("./event_data"),selectPoints:e("./select"),styleOnSelect:function(r,a){a&&a[0].trace._glTrace.update(a)},moduleType:"trace",name:"scattermapbox",basePlotModule:e("../../plots/mapbox"),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/mapbox":613,"../scatter/marker_colorbar":945,"../scattergeo/calc":970,"./attributes":993,"./defaults":995,"./event_data":996,"./format_labels":997,"./hover":998,"./plot":1e3,"./select":1001}],1e3:[function(e,o,f){var r=e("./convert"),a=e("../../plots/mapbox/constants").traceLayerPrefix,l=["fill","line","circle","symbol"];function c(s,u){this.type="scattermapbox",this.subplot=s,this.uid=u,this.sourceIds={fill:"source-"+u+"-fill",line:"source-"+u+"-line",circle:"source-"+u+"-circle",symbol:"source-"+u+"-symbol"},this.layerIds={fill:a+u+"-fill",line:a+u+"-line",circle:a+u+"-circle",symbol:a+u+"-symbol"},this.below=null}var i=c.prototype;i.addSource=function(s,u){this.subplot.map.addSource(this.sourceIds[s],{type:"geojson",data:u.geojson})},i.setSourceData=function(s,u){this.subplot.map.getSource(this.sourceIds[s]).setData(u.geojson)},i.addLayer=function(s,u,d){this.subplot.addLayer({type:s,id:this.layerIds[s],source:this.sourceIds[s],layout:u.layout,paint:u.paint},d)},i.update=function(s){var u,d,h,m=this.subplot,g=m.map,p=r(m.gd,s),v=m.belowLookup["trace-"+this.uid];if(v!==this.below){for(u=l.length-1;u>=0;u--)d=l[u],g.removeLayer(this.layerIds[d]);for(u=0;u=0;u--){var d=l[u];s.removeLayer(this.layerIds[d]),s.removeSource(this.sourceIds[d])}},o.exports=function(s,u){for(var d=u[0].trace,h=new c(s,d.uid),m=r(s.gd,u),g=h.below=s.belowLookup["trace-"+d.uid],p=0;p")}}o.exports={hoverPoints:function(l,c,i,s){var u=r(l,c,i,s);if(u&&u[0].index!==!1){var d=u[0];if(d.index===void 0)return u;var h=l.subplot,m=d.cd[d.index],g=d.trace;if(h.isPtInside(m))return d.xLabelVal=void 0,d.yLabelVal=void 0,a(m,g,h,d),d.hovertemplate=g.hovertemplate,u}},makeHoverPointText:a}},{"../scatter/hover":938}],1007:[function(e,o,f){o.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:e("../../plots/polar"),categories:["polar","symbols","showLegend","scatter-like"],attributes:e("./attributes"),supplyDefaults:e("./defaults").supplyDefaults,colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover").hoverPoints,selectPoints:e("../scatter/select"),meta:{}}},{"../../plots/polar":622,"../scatter/marker_colorbar":945,"../scatter/select":949,"../scatter/style":951,"./attributes":1002,"./calc":1003,"./defaults":1004,"./format_labels":1005,"./hover":1006,"./plot":1008}],1008:[function(e,o,f){var r=e("../scatter/plot"),a=e("../../constants/numerical").BADNUM;o.exports=function(l,c,i){for(var s=c.layers.frontplot.select("g.scatterlayer"),u={xaxis:c.xaxis,yaxis:c.yaxis,plot:c.framework,layerClipId:c._hasClipOnAxisFalse?c.clipIds.forTraces:null},d=c.radialAxis,h=c.angularAxis,m=0;m=u&&(A.marker.cluster=b.tree),A.marker&&(A.markerSel.positions=A.markerUnsel.positions=A.marker.positions=D),A.line&&D.length>1&&s.extendFlat(A.line,i.linePositions(d,k,D)),A.text&&(s.extendFlat(A.text,{positions:D},i.textPosition(d,k,A.text,A.marker)),s.extendFlat(A.textSel,{positions:D},i.textPosition(d,k,A.text,A.markerSel)),s.extendFlat(A.textUnsel,{positions:D},i.textPosition(d,k,A.text,A.markerUnsel))),A.fill&&!v.fill2d&&(v.fill2d=!0),A.marker&&!v.scatter2d&&(v.scatter2d=!0),A.line&&!v.line2d&&(v.line2d=!0),A.text&&!v.glText&&(v.glText=!0),v.lineOptions.push(A.line),v.fillOptions.push(A.fill),v.markerOptions.push(A.marker),v.markerSelectedOptions.push(A.markerSel),v.markerUnselectedOptions.push(A.markerUnsel),v.textOptions.push(A.text),v.textSelectedOptions.push(A.textSel),v.textUnselectedOptions.push(A.textUnsel),v.selectBatch.push([]),v.unselectBatch.push([]),b.x=O,b.y=R,b.rawx=O,b.rawy=R,b.r=_,b.theta=S,b.positions=D,b._scene=v,b.index=v.count,v.count++}}),l(d,h,m)}},o.exports.reglPrecompiled={}},{"../../lib":503,"../scattergl/constants":982,"../scattergl/convert":983,"../scattergl/plot":990,"../scattergl/scene_update":991,"@plotly/point-cluster":59,"fast-isnumeric":190}],1017:[function(e,o,f){var r=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../../plots/template_attributes").texttemplateAttrs,l=e("../../lib/extend").extendFlat,c=e("../scatter/attributes"),i=e("../../plots/attributes"),s=c.line;o.exports={mode:c.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:c.text,texttemplate:a({editType:"plot"},{keys:["real","imag","text"]}),hovertext:c.hovertext,line:{color:s.color,width:s.width,dash:s.dash,shape:l({},s.shape,{values:["linear","spline"]}),smoothing:s.smoothing,editType:"calc"},connectgaps:c.connectgaps,marker:c.marker,cliponaxis:l({},c.cliponaxis,{dflt:!1}),textposition:c.textposition,textfont:c.textfont,fill:l({},c.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:c.fillcolor,hoverinfo:l({},i.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:c.hoveron,hovertemplate:r(),selected:c.selected,unselected:c.unselected}},{"../../lib/extend":493,"../../plots/attributes":550,"../../plots/template_attributes":633,"../scatter/attributes":927}],1018:[function(e,o,f){var r=e("fast-isnumeric"),a=e("../../constants/numerical").BADNUM,l=e("../scatter/colorscale_calc"),c=e("../scatter/arrays_to_calcdata"),i=e("../scatter/calc_selection"),s=e("../scatter/calc").calcMarkerSize;o.exports=function(u,d){for(var h=u._fullLayout,m=d.subplot,g=h[m].realaxis,p=h[m].imaginaryaxis,v=g.makeCalcdata(d,"real"),y=p.makeCalcdata(d,"imag"),x=d._length,w=new Array(x),k=0;k")}}o.exports={hoverPoints:function(l,c,i,s){var u=r(l,c,i,s);if(u&&u[0].index!==!1){var d=u[0];if(d.index===void 0)return u;var h=l.subplot,m=d.cd[d.index],g=d.trace;if(h.isPtInside(m))return d.xLabelVal=void 0,d.yLabelVal=void 0,a(m,g,h,d),d.hovertemplate=g.hovertemplate,u}},makeHoverPointText:a}},{"../scatter/hover":938}],1022:[function(e,o,f){o.exports={moduleType:"trace",name:"scattersmith",basePlotModule:e("../../plots/smith"),categories:["smith","symbols","showLegend","scatter-like"],attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover").hoverPoints,selectPoints:e("../scatter/select"),meta:{}}},{"../../plots/smith":629,"../scatter/marker_colorbar":945,"../scatter/select":949,"../scatter/style":951,"./attributes":1017,"./calc":1018,"./defaults":1019,"./format_labels":1020,"./hover":1021,"./plot":1023}],1023:[function(e,o,f){var r=e("../scatter/plot"),a=e("../../constants/numerical").BADNUM,l=e("../../plots/smith/helpers").smith;o.exports=function(c,i,s){for(var u=i.layers.frontplot.select("g.scatterlayer"),d={xaxis:i.xaxis,yaxis:i.yaxis,plot:i.framework,layerClipId:i._hasClipOnAxisFalse?i.clipIds.forTraces:null},h=0;h"),u.hovertemplate=v.hovertemplate,s}function _(S,A){b.push(S._hovertitle+": "+A)}}},{"../scatter/hover":938}],1030:[function(e,o,f){o.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../scatter/select"),eventData:e("./event_data"),moduleType:"trace",name:"scatterternary",basePlotModule:e("../../plots/ternary"),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/ternary":634,"../scatter/marker_colorbar":945,"../scatter/select":949,"../scatter/style":951,"./attributes":1024,"./calc":1025,"./defaults":1026,"./event_data":1027,"./format_labels":1028,"./hover":1029,"./plot":1031}],1031:[function(e,o,f){var r=e("../scatter/plot");o.exports=function(a,l,c){var i=l.plotContainer;i.select(".scatterlayer").selectAll("*").remove();var s={xaxis:l.xaxis,yaxis:l.yaxis,plot:i,layerClipId:l._hasClipOnAxisFalse?l.clipIdRelative:null},u=l.layers.frontplot.select("g.scatterlayer");r(a,s,c,u)}},{"../scatter/plot":948}],1032:[function(e,o,f){var r=e("../scatter/attributes"),a=e("../../components/colorscale/attributes"),l=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,c=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../scattergl/attributes"),s=e("../../plots/cartesian/constants").idRegex,u=e("../../plot_api/plot_template").templatedArray,d=e("../../lib/extend").extendFlat,h=r.marker,m=h.line,g=d(a("marker.line",{editTypeOverride:"calc"}),{width:d({},m.width,{editType:"calc"}),editType:"calc"}),p=d(a("marker"),{symbol:h.symbol,size:d({},h.size,{editType:"markerSize"}),sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,opacity:h.opacity,colorbar:h.colorbar,line:g,editType:"calc"});function v(y){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:s[y],editType:"plot"}}}p.color.editType=p.cmin.editType=p.cmax.editType="style",o.exports={dimensions:u("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:d({},i.text,{}),hovertext:d({},i.hovertext,{}),hovertemplate:c(),xhoverformat:l("x"),yhoverformat:l("y"),marker:p,xaxes:v("x"),yaxes:v("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:i.selected.marker,editType:"calc"},unselected:{marker:i.unselected.marker,editType:"calc"},opacity:i.opacity}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/plot_template":543,"../../plots/cartesian/axis_format_attributes":557,"../../plots/cartesian/constants":561,"../../plots/template_attributes":633,"../scatter/attributes":927,"../scattergl/attributes":979}],1033:[function(e,o,f){var r=e("../../registry"),a=e("../../components/grid");o.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),calc:e("./calc"),plot:e("./plot"),hoverPoints:e("./hover").hoverPoints,selectPoints:e("./select"),editStyle:e("./edit_style"),meta:{}},r.register(a)},{"../../components/grid":410,"../../registry":638,"../scatter/marker_colorbar":945,"./attributes":1032,"./calc":1035,"./defaults":1036,"./edit_style":1037,"./hover":1039,"./plot":1041,"./select":1043}],1034:[function(e,o,f){var r=e("regl-line2d"),a=e("../../registry"),l=e("../../lib/prepare_regl"),c=e("../../plots/get_data").getModuleCalcData,i=e("../../plots/cartesian"),s=e("../../plots/cartesian/axis_ids").getFromId,u=e("../../plots/cartesian/axes").shouldShowZeroLine,d={};function h(g,p,v){for(var y=v.matrixOptions.data.length,x=p._visibleDims,w=v.viewOpts.ranges=new Array(y),k=0;km?S.sizeAvg||Math.max(S.size,3):l(p,_),y=0;yD&&z||E-1,G=!0;if(c(S)||!!x.selectedpoints||B){var W=x._length;if(x.selectedpoints){k.selectBatch=x.selectedpoints;var K=x.selectedpoints,te={};for(m=0;m1&&(y=T[A-1],w=_[A-1],b=S[A-1]),u=0;uy?"-":"+")+"x")).replace("y",(x>w?"-":"+")+"y")).replace("z",(k>b?"-":"+")+"z");var G=function(){A=0,P=[],N=[],B=[]};(!A||A2?v.slice(1,y-1):y===2?[(v[0]+v[1])/2]:v}function g(v){var y=v.length;return y===1?[.5,.5]:[v[1]-v[0],v[y-1]-v[y-2]]}function p(v,y){var x=v.fullSceneLayout,w=v.dataScale,k=y._len,b={};function T(U,q){var $=x[q],ne=w[u[q]];return l.simpleMap(U,function(H){return $.d2l(H)*ne})}if(b.vectors=s(T(y._u,"xaxis"),T(y._v,"yaxis"),T(y._w,"zaxis"),k),!k)return{positions:[],cells:[]};var _=T(y._Xs,"xaxis"),S=T(y._Ys,"yaxis"),A=T(y._Zs,"zaxis");if(b.meshgrid=[_,S,A],b.gridFill=y._gridFill,y._slen)b.startingPositions=s(T(y._startsX,"xaxis"),T(y._startsY,"yaxis"),T(y._startsZ,"zaxis"));else{for(var M=S[0],E=m(_),D=m(A),O=new Array(E.length*D.length),R=0,z=0;z=0};A?(y=Math.min(S.length,E.length),x=function(ee){return P(S[ee])&&N(ee)},w=function(ee){return String(S[ee])}):(y=Math.min(M.length,E.length),x=function(ee){return P(M[ee])&&N(ee)},w=function(ee){return String(M[ee])}),O&&(y=Math.min(y,D.length));for(var B=0;B1){for(var te=l.randstr(),Y=0;Y"),name:P||re("name")?M.name:void 0,color:L("hoverlabel.bgcolor")||E.color,borderColor:L("hoverlabel.bordercolor"),fontFamily:L("hoverlabel.font.family"),fontSize:L("hoverlabel.font.size"),fontColor:L("hoverlabel.font.color"),nameLength:L("hoverlabel.namelength"),textAlign:L("hoverlabel.align"),hovertemplate:P,hovertemplateLabels:te,eventData:A};b&&($.x0=G-_.rInscribed*_.rpx1,$.x1=G+_.rInscribed*_.rpx1,$.idealAlign=_.pxmid[0]<0?"left":"right"),T&&($.x=G,$.idealAlign=G<0?"left":"right");var ne=[];c.loneHover($,{container:S._hoverlayer.node(),outerContainer:S._paper.node(),gd:p,inOut_bbox:ne}),A[0].bbox=ne[0],w._hasHoverLabel=!0}if(T){var H=m.select("path.surface");y.styleOne(H,_,M,{hovered:!0})}w._hasHoverEvent=!0,p.emit("plotly_hover",{points:A||[h(_,M,y.eventDataKeys)],event:r.event})}}),m.on("mouseout",function(_){var S=p._fullLayout,A=p._fullData[w.index],M=r.select(this).datum();if(w._hasHoverEvent&&(_.originalEvent=r.event,p.emit("plotly_unhover",{points:[h(M,A,y.eventDataKeys)],event:r.event}),w._hasHoverEvent=!1),w._hasHoverLabel&&(c.loneUnhover(S._hoverlayer.node()),w._hasHoverLabel=!1),T){var E=m.select("path.surface");y.styleOne(E,M,A,{hovered:!1})}}),m.on("click",function(_){var S=p._fullLayout,A=p._fullData[w.index],M=b&&(u.isHierarchyRoot(_)||u.isLeaf(_)),E=u.getPtId(_),D=u.isEntry(_)?u.findEntryWithChild(k,E):u.findEntryWithLevel(k,E),O=u.getPtId(D),R={points:[h(_,A,y.eventDataKeys)],event:r.event};M||(R.nextLevel=O);var z=s.triggerHandler(p,"plotly_"+w.type+"click",R);if(z!==!1&&S.hovermode&&(p._hoverdata=[h(_,A,y.eventDataKeys)],c.click(p,r.event)),!M&&z!==!1&&!p._dragging&&!p._transitioning){a.call("_storeDirectGUIEdit",A,S._tracePreGUI[A.uid],{level:A.level});var L={data:[{level:O}],traces:[w.index]},P={frame:{redraw:!1,duration:y.transitionTime},transition:{duration:y.transitionTime,easing:y.transitionEasing},mode:"immediate",fromcurrent:!0};c.loneUnhover(S._hoverlayer.node()),a.call("animate",p,L,P)}})}},{"../../components/fx":406,"../../components/fx/helpers":402,"../../lib":503,"../../lib/events":492,"../../registry":638,"../pie/helpers":906,"./helpers":1055,"@plotly/d3":58}],1055:[function(e,o,f){var r=e("../../lib"),a=e("../../components/color"),l=e("../../lib/setcursor"),c=e("../pie/helpers");function i(s){return s.data.data.pid}f.findEntryWithLevel=function(s,u){var d;return u&&s.eachAfter(function(h){if(f.getPtId(h)===u)return d=h.copy()}),d||s},f.findEntryWithChild=function(s,u){var d;return s.eachAfter(function(h){for(var m=h.children||[],g=0;g0)},f.getMaxDepth=function(s){return s.maxdepth>=0?s.maxdepth:1/0},f.isHeader=function(s,u){return!(f.isLeaf(s)||s.depth===u._maxDepth-1)},f.getParent=function(s,u){return f.findEntryWithLevel(s,i(u))},f.listPath=function(s,u){var d=s.parent;if(!d)return[];var h=u?[d.data[u]]:[d];return f.listPath(d,u).concat(h)},f.getPath=function(s){return f.listPath(s,"label").join("/")+"/"},f.formatValue=c.formatPieValue,f.formatPercent=function(s,u){var d=r.formatPercent(s,0);return d==="0%"&&(d=c.formatPiePercent(s,u)),d}},{"../../components/color":366,"../../lib":503,"../../lib/setcursor":524,"../pie/helpers":906}],1056:[function(e,o,f){o.exports={moduleType:"trace",name:"sunburst",basePlotModule:e("./base_plot"),categories:[],animatable:!0,attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot").plot,style:e("./style").style,colorbar:e("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":945,"./attributes":1049,"./base_plot":1050,"./calc":1051,"./defaults":1053,"./layout_attributes":1057,"./layout_defaults":1058,"./plot":1059,"./style":1060}],1057:[function(e,o,f){o.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1058:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes");o.exports=function(l,c){function i(s,u){return r.coerce(l,c,a,s,u)}i("sunburstcolorway",c.colorway),i("extendsunburstcolors")}},{"../../lib":503,"./layout_attributes":1057}],1059:[function(e,o,f){var r=e("@plotly/d3"),a=e("d3-hierarchy"),l=e("d3-interpolate").interpolate,c=e("../../components/drawing"),i=e("../../lib"),s=e("../../lib/svg_text_utils"),u=e("../bar/uniform_text"),d=u.recordMinTextSize,h=u.clearMinTextSize,m=e("../pie/plot"),g=e("../pie/helpers").getRotationAngle,p=m.computeTransform,v=m.transformInsideText,y=e("./style").styleOne,x=e("../bar/style").resizeText,w=e("./fx"),k=e("./constants"),b=e("./helpers");function T(S,A,M,E){var D=S._fullLayout,O=!D.uniformtext.mode&&b.hasTransition(E),R=r.select(M).selectAll("g.slice"),z=A[0],L=z.trace,P=z.hierarchy,N=b.findEntryWithLevel(P,L.level),B=b.getMaxDepth(L),G=D._size,W=L.domain,K=G.w*(W.x[1]-W.x[0]),te=G.h*(W.y[1]-W.y[0]),Y=.5*Math.min(K,te),Z=z.cx=G.l+G.w*(W.x[1]+W.x[0])/2,re=z.cy=G.t+G.h*(1-W.y[0])-te/2;if(!N)return R.remove();var U=null,q={};O&&R.each(function(Oe){q[b.getPtId(Oe)]={rpx0:Oe.rpx0,rpx1:Oe.rpx1,x0:Oe.x0,x1:Oe.x1,transform:Oe.transform},!U&&b.isEntry(Oe)&&(U=Oe)});var $=function(Oe){return a.partition().size([2*Math.PI,Oe.height+1])(Oe)}(N).descendants(),ne=N.height+1,H=0,Q=B;z.hasMultipleRoots&&b.isHierarchyRoot(N)&&($=$.slice(1),ne-=1,H=1,Q+=1),$=$.filter(function(Oe){return Oe.y1<=Q});var ee=g(L.rotation);ee&&$.forEach(function(Oe){Oe.x0+=ee,Oe.x1+=ee});var ie=Math.min(ne,B),ae=function(Oe){return(Oe-H)/ie*Y},ue=function(Oe,de){return[Oe*Math.cos(de),-Oe*Math.sin(de)]},le=function(Oe){return i.pathAnnulus(Oe.rpx0,Oe.rpx1,Oe.x0,Oe.x1,Z,re)},ge=function(Oe){return Z+_(Oe)[0]*(Oe.transform.rCenter||0)+(Oe.transform.x||0)},fe=function(Oe){return re+_(Oe)[1]*(Oe.transform.rCenter||0)+(Oe.transform.y||0)};(R=R.data($,b.getPtId)).enter().append("g").classed("slice",!0),O?R.exit().transition().each(function(){var Oe=r.select(this);Oe.select("path.surface").transition().attrTween("d",function(de){var ye=function(Me){var ke,Ee=b.getPtId(Me),ze=q[Ee],Fe=q[b.getPtId(N)];if(Fe){var Ve=(Me.x1>Fe.x1?2*Math.PI:0)+ee;ke=Me.rpx1me?2*Math.PI:0)+ee;qe={x0:nt,x1:nt}}else qe={rpx0:Y,rpx1:Y},i.extendFlat(qe,Te(Re));else qe={rpx0:0,rpx1:0};else qe={x0:ee,x1:ee};return l(qe,Ye)}(Ve);return function(Re){return le(Ke(Re))}}):ye.attr("d",le),de.call(w,N,S,A,{eventDataKeys:k.eventDataKeys,transitionTime:k.CLICK_TRANSITION_TIME,transitionEasing:k.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,S,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:S._transitioning}),ye.call(y,Oe,L);var Me=i.ensureSingle(de,"g","slicetext"),ke=i.ensureSingle(Me,"text","",function(Ve){Ve.attr("data-notex",1)}),Ee=i.ensureUniformFontSize(S,b.determineTextFont(L,Oe,D.font));ke.text(f.formatSliceLabel(Oe,N,L,A,D)).classed("slicetext",!0).attr("text-anchor","middle").call(c.font,Ee).call(s.convertToTspans,S);var ze=c.bBox(ke.node());Oe.transform=v(ze,Oe,z),Oe.transform.targetX=ge(Oe),Oe.transform.targetY=fe(Oe);var Fe=function(Ve,Ke){var Re=Ve.transform;return p(Re,Ke),Re.fontSize=Ee.size,d(L.type,Re,D),i.getTextTransform(Re)};O?ke.transition().attrTween("transform",function(Ve){var Ke=function(Re){var qe,We=q[b.getPtId(Re)],Ye=Re.transform;if(We)qe=We;else if(qe={rpx1:Re.rpx1,transform:{textPosAngle:Ye.textPosAngle,scale:0,rotate:Ye.rotate,rCenter:Ye.rCenter,x:Ye.x,y:Ye.y}},U)if(Re.parent)if(me){var nt=Re.x1>me?2*Math.PI:0;qe.x0=qe.x1=nt}else i.extendFlat(qe,Te(Re));else qe.x0=qe.x1=ee;else qe.x0=qe.x1=ee;var ft=l(qe.transform.textPosAngle,Re.transform.textPosAngle),vt=l(qe.rpx1,Re.rpx1),Pt=l(qe.x0,Re.x0),At=l(qe.x1,Re.x1),at=l(qe.transform.scale,Ye.scale),et=l(qe.transform.rotate,Ye.rotate),Ot=Ye.rCenter===0?3:qe.transform.rCenter===0?1/3:1,Wt=l(qe.transform.rCenter,Ye.rCenter);return function(Jt){var Be=vt(Jt),Ge=Pt(Jt),Tt=At(Jt),dt=function(Ie){return Wt(Math.pow(Ie,Ot))}(Jt),Pe={pxmid:ue(Be,(Ge+Tt)/2),rpx1:Be,transform:{textPosAngle:ft(Jt),rCenter:dt,x:Ye.x,y:Ye.y}};return d(L.type,Ye,D),{transform:{targetX:ge(Pe),targetY:fe(Pe),scale:at(Jt),rotate:et(Jt),rCenter:dt}}}}(Ve);return function(Re){return Fe(Ke(Re),ze)}}):ke.attr("transform",Fe(Oe,ze))})}function _(S){return A=S.rpx1,M=S.transform.textPosAngle,[A*Math.sin(M),-A*Math.cos(M)];var A,M}f.plot=function(S,A,M,E){var D,O,R=S._fullLayout,z=R._sunburstlayer,L=!M,P=!R.uniformtext.mode&&b.hasTransition(M);h("sunburst",R),(D=z.selectAll("g.trace.sunburst").data(A,function(N){return N[0].trace.uid})).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),D.order(),P?(E&&(O=E()),r.transition().duration(M.duration).ease(M.easing).each("end",function(){O&&O()}).each("interrupt",function(){O&&O()}).each(function(){z.selectAll("g.trace").each(function(N){T(S,N,this,M)})})):(D.each(function(N){T(S,N,this,M)}),R.uniformtext.mode&&x(S,R._sunburstlayer.selectAll(".trace"),"sunburst")),L&&D.exit().remove()},f.formatSliceLabel=function(S,A,M,E,D){var O=M.texttemplate,R=M.textinfo;if(!(O||R&&R!=="none"))return"";var z=D.separators,L=E[0],P=S.data.data,N=L.hierarchy,B=b.isHierarchyRoot(S),G=b.getParent(N,S),W=b.getValue(S);if(!O){var K,te=R.split("+"),Y=function(ee){return te.indexOf(ee)!==-1},Z=[];if(Y("label")&&P.label&&Z.push(P.label),P.hasOwnProperty("v")&&Y("value")&&Z.push(b.formatValue(P.v,z)),!B){Y("current path")&&Z.push(b.getPath(S.data));var re=0;Y("percent parent")&&re++,Y("percent entry")&&re++,Y("percent root")&&re++;var U=re>1;if(re){var q,$=function(ee){K=b.formatPercent(q,z),U&&(K+=" of "+ee),Z.push(K)};Y("percent parent")&&!B&&(q=W/b.getValue(G),$("parent")),Y("percent entry")&&(q=W/b.getValue(A),$("entry")),Y("percent root")&&(q=W/b.getValue(N),$("root"))}}return Y("text")&&(K=i.castOption(M,P.i,"text"),i.isValidTextValue(K)&&Z.push(K)),Z.join("
")}var ne=i.castOption(M,P.i,"texttemplate");if(!ne)return"";var H={};P.label&&(H.label=P.label),P.hasOwnProperty("v")&&(H.value=P.v,H.valueLabel=b.formatValue(P.v,z)),H.currentPath=b.getPath(S.data),B||(H.percentParent=W/b.getValue(G),H.percentParentLabel=b.formatPercent(H.percentParent,z),H.parent=b.getPtLabel(G)),H.percentEntry=W/b.getValue(A),H.percentEntryLabel=b.formatPercent(H.percentEntry,z),H.entry=b.getPtLabel(A),H.percentRoot=W/b.getValue(N),H.percentRootLabel=b.formatPercent(H.percentRoot,z),H.root=b.getPtLabel(N),P.hasOwnProperty("color")&&(H.color=P.color);var Q=i.castOption(M,P.i,"text");return(i.isValidTextValue(Q)||Q==="")&&(H.text=Q),H.customdata=i.castOption(M,P.i,"customdata"),i.texttemplateString(ne,H,D._d3locale,H,M._meta||{})}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../bar/style":662,"../bar/uniform_text":664,"../pie/helpers":906,"../pie/plot":910,"./constants":1052,"./fx":1054,"./helpers":1055,"./style":1060,"@plotly/d3":58,"d3-hierarchy":115,"d3-interpolate":116}],1060:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../components/color"),l=e("../../lib"),c=e("../bar/uniform_text").resizeText;function i(s,u,d){var h=u.data.data,m=!u.children,g=h.i,p=l.castOption(d,g,"marker.line.color")||a.defaultLine,v=l.castOption(d,g,"marker.line.width")||0;s.style("stroke-width",v).call(a.fill,h.color).call(a.stroke,p).style("opacity",m?d.leaf.opacity:null)}o.exports={style:function(s){var u=s._fullLayout._sunburstlayer.selectAll(".trace");c(s,u,"sunburst"),u.each(function(d){var h=r.select(this),m=d[0].trace;h.style("opacity",m.opacity),h.selectAll("path.surface").each(function(g){r.select(this).call(i,g,m)})})},styleOne:i}},{"../../components/color":366,"../../lib":503,"../bar/uniform_text":664,"@plotly/d3":58}],1061:[function(e,o,f){var r=e("../../components/color"),a=e("../../components/colorscale/attributes"),l=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat,c=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat,u=e("../../plot_api/edit_types").overrideAll;function d(m){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:{valType:"boolean",dflt:!1},y:{valType:"boolean",dflt:!1},z:{valType:"boolean",dflt:!1}},color:{valType:"color",dflt:r.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:r.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var h=o.exports=u(s({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:c(),xhoverformat:l("x"),yhoverformat:l("y"),zhoverformat:l("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},a("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:d(),y:d(),z:d()},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},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:s({},a.zauto,{}),zmin:s({},a.zmin,{}),zmax:s({},a.zmax,{})},hoverinfo:s({},i.hoverinfo),showlegend:s({},i.showlegend,{dflt:!1})}),"calc","nested");h.x.editType=h.y.editType=h.z.editType="calc+clearAxisTypes",h.transforms=void 0},{"../../components/color":366,"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plot_api/edit_types":536,"../../plots/attributes":550,"../../plots/cartesian/axis_format_attributes":557,"../../plots/template_attributes":633}],1062:[function(e,o,f){var r=e("../../components/colorscale/calc");o.exports=function(a,l){l.surfacecolor?r(a,l,{vals:l.surfacecolor,containerStr:"",cLetter:"c"}):r(a,l,{vals:l.z,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":374}],1063:[function(e,o,f){var r=e("../../../stackgl_modules").gl_surface3d,a=e("../../../stackgl_modules").ndarray,l=e("../../../stackgl_modules").ndarray_linear_interpolate.d2,c=e("../heatmap/interp2d"),i=e("../heatmap/find_empties"),s=e("../../lib").isArrayOrTypedArray,u=e("../../lib/gl_format_color").parseColorScale,d=e("../../lib/str2rgbarray"),h=e("../../components/colorscale").extractOpts;function m(M,E,D){this.scene=M,this.uid=D,this.surface=E,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 g=m.prototype;g.getXat=function(M,E,D,O){var R=s(this.data.x)?s(this.data.x[0])?this.data.x[E][M]:this.data.x[M]:M;return D===void 0?R:O.d2l(R,0,D)},g.getYat=function(M,E,D,O){var R=s(this.data.y)?s(this.data.y[0])?this.data.y[E][M]:this.data.y[E]:E;return D===void 0?R:O.d2l(R,0,D)},g.getZat=function(M,E,D,O){var R=this.data.z[E][M];return R===null&&this.data.connectgaps&&this.data._interpolatedZ&&(R=this.data._interpolatedZ[E][M]),D===void 0?R:O.d2l(R,0,D)},g.handlePick=function(M){if(M.object===this.surface){var E=(M.data.index[0]-1)/this.dataScaleX-1,D=(M.data.index[1]-1)/this.dataScaleY-1,O=Math.max(Math.min(Math.round(E),this.data.z[0].length-1),0),R=Math.max(Math.min(Math.round(D),this.data._ylength-1),0);M.index=[O,R],M.traceCoordinate=[this.getXat(O,R),this.getYat(O,R),this.getZat(O,R)],M.dataCoordinate=[this.getXat(O,R,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(O,R,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(O,R,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var z=0;z<3;z++){var L=M.dataCoordinate[z];L!=null&&(M.dataCoordinate[z]*=this.scene.dataScale[z])}var P=this.data.hovertext||this.data.text;return Array.isArray(P)&&P[R]&&P[R][O]!==void 0?M.textLabel=P[R][O]:M.textLabel=P||"",M.data.dataCoordinate=M.dataCoordinate.slice(),this.surface.highlight(M.data),this.scene.glplot.spikes.position=M.dataCoordinate,!0}};var p=[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 v(M,E){if(M0){D=p[O];break}return D}function w(M,E){if(!(M<1||E<1)){for(var D=y(M),O=y(E),R=1,z=0;zT;)D--,D/=x(D),++D1?O:1},g.refineCoords=function(M){for(var E=this.dataScaleX,D=this.dataScaleY,O=M[0].shape[0],R=M[0].shape[1],z=0|Math.floor(M[0].shape[0]*E+1),L=0|Math.floor(M[0].shape[1]*D+1),P=1+O+1,N=1+R+1,B=a(new Float32Array(P*N),[P,N]),G=[1/E,0,0,0,1/D,0,0,0,1],W=0;W0&&this.contourStart[M]!==null&&this.contourEnd[M]!==null&&this.contourEnd[M]>this.contourStart[M]))for(R[M]=!0,E=this.contourStart[M];ER&&(this.minValues[E]=R),this.maxValues[E]",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"}}},{}],1070:[function(e,o,f){var r=e("./constants"),a=e("../../lib/extend").extendFlat,l=e("fast-isnumeric");function c(g){if(Array.isArray(g)){for(var p=0,v=0;v=p||_===g.length-1)&&(y[x]=k,k.key=T++,k.firstRowIndex=b,k.lastRowIndex=_,k={firstRowIndex:null,lastRowIndex:null,rows:[]},x+=w,b=_+1,w=0);return y}o.exports=function(g,p){var v=s(p.cells.values),y=function(B){return B.slice(p.header.values.length,B.length)},x=s(p.header.values);x.length&&!x[0].length&&(x[0]=[""],x=s(x));var w=x.concat(y(v).map(function(){return u((x[0]||[""]).length)})),k=p.domain,b=Math.floor(g._fullLayout._size.w*(k.x[1]-k.x[0])),T=Math.floor(g._fullLayout._size.h*(k.y[1]-k.y[0])),_=p.header.values.length?w[0].map(function(){return p.header.height}):[r.emptyHeaderHeight],S=v.length?v[0].map(function(){return p.cells.height}):[],A=_.reduce(i,0),M=m(S,T-A+r.uplift),E=h(m(_,A),[]),D=h(M,E),O={},R=p._fullInput.columnorder.concat(y(v.map(function(B,G){return G}))),z=w.map(function(B,G){var W=Array.isArray(p.columnwidth)?p.columnwidth[Math.min(G,p.columnwidth.length-1)]:p.columnwidth;return l(W)?Number(W):1}),L=z.reduce(i,0);z=z.map(function(B){return B/L*b});var P=Math.max(c(p.header.line.width),c(p.cells.line.width)),N={key:p.uid+g._context.staticPlot,translateX:k.x[0]*g._fullLayout._size.w,translateY:g._fullLayout._size.h*(1-k.y[1]),size:g._fullLayout._size,width:b,maxLineWidth:P,height:T,columnOrder:R,groupHeight:T,rowBlocks:D,headerRowBlocks:E,scrollY:0,cells:a({},p.cells,{values:v}),headerCells:a({},p.header,{values:w}),gdColumns:w.map(function(B){return B[0]}),gdColumnsOriginalOrder:w.map(function(B){return B[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:w.map(function(B,G){var W=O[B];return O[B]=(W||0)+1,{key:B+"__"+O[B],label:B,specIndex:G,xIndex:R[G],xScale:d,x:void 0,calcdata:void 0,columnWidth:z[G]}})};return N.columns.forEach(function(B){B.calcdata=N,B.x=d(B)}),N}},{"../../lib/extend":493,"./constants":1069,"fast-isnumeric":190}],1071:[function(e,o,f){var r=e("../../lib/extend").extendFlat;f.splitToPanels=function(a){var l=[0,0],c=r({},a,{key:"header",type:"header",page:0,prevPages:l,currentRepaint:[null,null],dragHandle:!0,values:a.calcdata.headerCells.values[a.specIndex],rowBlocks:a.calcdata.headerRowBlocks,calcdata:r({},a.calcdata,{cells:a.calcdata.headerCells})});return[r({},a,{key:"cells1",type:"cells",page:0,prevPages:l,currentRepaint:[null,null],dragHandle:!1,values:a.calcdata.cells.values[a.specIndex],rowBlocks:a.calcdata.rowBlocks}),r({},a,{key:"cells2",type:"cells",page:1,prevPages:l,currentRepaint:[null,null],dragHandle:!1,values:a.calcdata.cells.values[a.specIndex],rowBlocks:a.calcdata.rowBlocks}),c]},f.splitToCells=function(a){var l=function(c){var i=c.rowBlocks[c.page],s=i?i.rows[0].rowIndex:0,u=i?s+i.rows.length:0;return[s,u]}(a);return(a.values||[]).slice(l[0],l[1]).map(function(c,i){return{keyWithinBlock:i+(typeof c=="string"&&c.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:l[0]+i,column:a,calcdata:a.calcdata,page:a.page,rowBlocks:a.rowBlocks,value:c}})}},{"../../lib/extend":493}],1072:[function(e,o,f){var r=e("../../lib"),a=e("./attributes"),l=e("../../plots/domain").defaults;o.exports=function(c,i,s,u){function d(h,m){return r.coerce(c,i,a,h,m)}l(i,u,d),d("columnwidth"),d("header.values"),d("header.format"),d("header.align"),d("header.prefix"),d("header.suffix"),d("header.height"),d("header.line.width"),d("header.line.color"),d("header.fill.color"),r.coerceFont(d,"header.font",r.extendFlat({},u.font)),function(h,m){for(var g=h.columnorder||[],p=h.header.values.length,v=g.slice(0,p),y=v.slice().sort(function(k,b){return k-b}),x=v.map(function(k){return y.indexOf(k)}),w=x.length;w/i),ie=!Q||ee;q.mayHaveMarkup=Q&&H.match(/[<&>]/);var ae,ue=typeof(ae=H)=="string"&&ae.match(r.latexCheck);q.latex=ue;var le,ge,fe=ue?"":S(q.calcdata.cells.prefix,$,ne)||"",me=ue?"":S(q.calcdata.cells.suffix,$,ne)||"",_e=ue?null:S(q.calcdata.cells.format,$,ne)||null,we=fe+(_e?l(_e)(q.value):q.value)+me;if(q.wrappingNeeded=!q.wrapped&&!ie&&!ue&&(le=_(we)),q.cellHeightMayIncrease=ee||ue||q.mayHaveMarkup||(le===void 0?_(we):le),q.needsConvertToTspans=q.mayHaveMarkup||q.wrappingNeeded||q.latex,q.wrappingNeeded){var Te=(r.wrapSplitCharacter===" "?we.replace(/ge&&le.push(fe),ge+=we}return le}(q,Q,H);ee.length===1&&(ee[0]===q.length-1?ee.unshift(ee[0]-1):ee.push(ee[0]+1)),ee[0]%2&&ee.reverse(),Z.each(function(ie,ae){ie.page=ee[ae],ie.scrollY=Q}),Z.attr("transform",function(ie){var ae=G(ie.rowBlocks,ie.page)-ie.scrollY;return d(0,ae)}),Y&&(z(Y,re,Z,ee,U.prevPages,U,0),z(Y,re,Z,ee,U.prevPages,U,1),k(re,Y))}}function R(Y,Z,re,U){return function(q){var $=q.calcdata?q.calcdata:q,ne=Z.filter(function(ie){return $.key===ie.key}),H=re||$.scrollbarState.dragMultiplier,Q=$.scrollY;$.scrollY=U===void 0?$.scrollY+H*a.event.dy:U;var ee=ne.selectAll("."+r.cn.yColumn).selectAll("."+r.cn.columnBlock).filter(M);return O(Y,ee,ne),$.scrollY===Q}}function z(Y,Z,re,U,q,$,ne){U[ne]!==q[ne]&&(clearTimeout($.currentRepaint[ne]),$.currentRepaint[ne]=setTimeout(function(){var H=re.filter(function(Q,ee){return ee===ne&&U[ee]!==q[ee]});b(Y,Z,H,re),q[ne]=U[ne]}))}function L(Y,Z,re,U){return function(){var q=a.select(Z.parentNode);q.each(function($){var ne=$.fragments;q.selectAll("tspan.line").each(function(ge,fe){ne[fe].width=this.getComputedTextLength()});var H,Q,ee=ne[ne.length-1].width,ie=ne.slice(0,-1),ae=[],ue=0,le=$.column.columnWidth-2*r.cellPad;for($.value="";ie.length;)ue+(Q=(H=ie.shift()).width+ee)>le&&($.value+=ae.join(r.wrapSpacer)+r.lineBreaker,ae=[],ue=0),ae.push(H.text),ue+=Q;ue&&($.value+=ae.join(r.wrapSpacer)),$.wrapped=!0}),q.selectAll("tspan.line").remove(),T(q.select("."+r.cn.cellText),re,Y,U),a.select(Z.parentNode.parentNode).call(B)}}function P(Y,Z,re,U,q){return function(){if(!q.settledY){var $=a.select(Z.parentNode),ne=te(q),H=q.key-ne.firstRowIndex,Q=ne.rows[H].rowHeight,ee=q.cellHeightMayIncrease?Z.parentNode.getBoundingClientRect().height+2*r.cellPad:Q,ie=Math.max(ee,Q);ie-ne.rows[H].rowHeight&&(ne.rows[H].rowHeight=ie,Y.selectAll("."+r.cn.columnCell).call(B),O(null,Y.filter(M),0),k(re,U,!0)),$.attr("transform",function(){var ae=this.parentNode.getBoundingClientRect(),ue=a.select(this.parentNode).select("."+r.cn.cellRect).node().getBoundingClientRect(),le=this.transform.baseVal.consolidate(),ge=ue.top-ae.top+(le?le.matrix.f:r.cellPad);return d(N(q,a.select(this.parentNode).select("."+r.cn.cellTextHolder).node().getBoundingClientRect().width),ge)}),q.settledY=!0}}}function N(Y,Z){switch(Y.align){case"left":return r.cellPad;case"right":return Y.column.columnWidth-(Z||0)-r.cellPad;case"center":return(Y.column.columnWidth-(Z||0))/2;default:return r.cellPad}}function B(Y){Y.attr("transform",function(Z){var re=Z.rowBlocks[0].auxiliaryBlocks.reduce(function(q,$){return q+W($,1/0)},0),U=W(te(Z),Z.key);return d(0,U+re)}).selectAll("."+r.cn.cellRect).attr("height",function(Z){return(re=te(Z),U=Z.key,re.rows[U-re.firstRowIndex]).rowHeight;var re,U})}function G(Y,Z){for(var re=0,U=Z-1;U>=0;U--)re+=K(Y[U]);return re}function W(Y,Z){for(var re=0,U=0;U","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:d({},i.textfont,{}),editType:"calc"},text:i.text,textinfo:s.textinfo,texttemplate:a({editType:"plot"},{keys:u.eventDataKeys.concat(["label","value"])}),hovertext:i.hovertext,hoverinfo:s.hoverinfo,hovertemplate:r({},{keys:u.eventDataKeys}),textfont:i.textfont,insidetextfont:i.insidetextfont,outsidetextfont:d({},i.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:i.sort,root:s.root,domain:c({name:"treemap",trace:!0,editType:"calc"})}},{"../../components/colorscale/attributes":373,"../../lib/extend":493,"../../plots/domain":584,"../../plots/template_attributes":633,"../pie/attributes":901,"../sunburst/attributes":1049,"./constants":1078}],1076:[function(e,o,f){var r=e("../../plots/plots");f.name="treemap",f.plot=function(a,l,c,i){r.plotBasePlot(f.name,a,l,c,i)},f.clean=function(a,l,c,i){r.cleanBasePlot(f.name,a,l,c,i)}},{"../../plots/plots":619}],1077:[function(e,o,f){var r=e("../sunburst/calc");f.calc=function(a,l){return r.calc(a,l)},f.crossTraceCalc=function(a){return r._runCrossTraceCalc("treemap",a)}},{"../sunburst/calc":1051}],1078:[function(e,o,f){o.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},{}],1079:[function(e,o,f){var r=e("../../lib"),a=e("./attributes"),l=e("../../components/color"),c=e("../../plots/domain").defaults,i=e("../bar/defaults").handleText,s=e("../bar/constants").TEXTPAD,u=e("../../components/colorscale"),d=u.hasColorscale,h=u.handleDefaults;o.exports=function(m,g,p,v){function y(M,E){return r.coerce(m,g,a,M,E)}var x=y("labels"),w=y("parents");if(x&&x.length&&w&&w.length){var k=y("values");k&&k.length?y("branchvalues"):y("count"),y("level"),y("maxdepth"),y("tiling.packing")==="squarify"&&y("tiling.squarifyratio"),y("tiling.flip"),y("tiling.pad");var b=y("text");y("texttemplate"),g.texttemplate||y("textinfo",Array.isArray(b)?"text+label":"label"),y("hovertext"),y("hovertemplate");var T=y("pathbar.visible");i(m,g,v,y,"auto",{hasPathbar:T,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),y("textposition");var _=g.textposition.indexOf("bottom")!==-1;y("marker.line.width")&&y("marker.line.color",v.paper_bgcolor);var S=y("marker.colors");(g._hasColorscale=d(m,"marker","colors")||(m.marker||{}).coloraxis)?h(m,g,v,y,{prefix:"marker.",cLetter:"c"}):y("marker.depthfade",!(S||[]).length);var A=2*g.textfont.size;y("marker.pad.t",_?A/4:A),y("marker.pad.l",A/4),y("marker.pad.r",A/4),y("marker.pad.b",_?A:A/4),g._hovered={marker:{line:{width:2,color:l.contrast(v.paper_bgcolor)}}},T&&(y("pathbar.thickness",g.pathbar.textfont.size+2*s),y("pathbar.side"),y("pathbar.edgeshape")),y("sort"),y("root.color"),c(g,v,y),g._length=null}else g.visible=!1}},{"../../components/color":366,"../../components/colorscale":378,"../../lib":503,"../../plots/domain":584,"../bar/constants":650,"../bar/defaults":652,"./attributes":1075}],1080:[function(e,o,f){var r=e("@plotly/d3"),a=e("../sunburst/helpers"),l=e("../bar/uniform_text").clearMinTextSize,c=e("../bar/style").resizeText,i=e("./plot_one");o.exports=function(s,u,d,h,m){var g,p,v=m.type,y=m.drawDescendants,x=s._fullLayout,w=x["_"+v+"layer"],k=!d;l(v,x),(g=w.selectAll("g.trace."+v).data(u,function(b){return b[0].trace.uid})).enter().append("g").classed("trace",!0).classed(v,!0),g.order(),!x.uniformtext.mode&&a.hasTransition(d)?(h&&(p=h()),r.transition().duration(d.duration).ease(d.easing).each("end",function(){p&&p()}).each("interrupt",function(){p&&p()}).each(function(){w.selectAll("g.trace").each(function(b){i(s,b,this,d,y)})})):(g.each(function(b){i(s,b,this,d,y)}),x.uniformtext.mode&&c(s,w.selectAll(".trace"),v)),k&&g.exit().remove()}},{"../bar/style":662,"../bar/uniform_text":664,"../sunburst/helpers":1055,"./plot_one":1089,"@plotly/d3":58}],1081:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),l=e("../../components/drawing"),c=e("../../lib/svg_text_utils"),i=e("./partition"),s=e("./style").styleOne,u=e("./constants"),d=e("../sunburst/helpers"),h=e("../sunburst/fx");o.exports=function(m,g,p,v,y){var x=y.barDifY,w=y.width,k=y.height,b=y.viewX,T=y.viewY,_=y.pathSlice,S=y.toMoveInsideSlice,A=y.strTransform,M=y.hasTransition,E=y.handleSlicesExit,D=y.makeUpdateSliceInterpolator,O=y.makeUpdateTextInterpolator,R={},z=m._fullLayout,L=g[0],P=L.trace,N=L.hierarchy,B=w/P._entryDepth,G=d.listPath(p.data,"id"),W=i(N.copy(),[w,k],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(W=W.filter(function(te){var Y=G.indexOf(te.data.id);return Y!==-1&&(te.x0=B*Y,te.x1=B*(Y+1),te.y0=x,te.y1=x+k,te.onPathbar=!0,!0)})).reverse(),(v=v.data(W,d.getPtId)).enter().append("g").classed("pathbar",!0),E(v,!0,R,[w,k],_),v.order();var K=v;M&&(K=K.transition().each("end",function(){var te=r.select(this);d.setSliceCursor(te,m,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),K.each(function(te){te._x0=b(te.x0),te._x1=b(te.x1),te._y0=T(te.y0),te._y1=T(te.y1),te._hoverX=b(te.x1-Math.min(w,k)/2),te._hoverY=T(te.y1-k/2);var Y=r.select(this),Z=a.ensureSingle(Y,"path","surface",function($){$.style("pointer-events","all")});M?Z.transition().attrTween("d",function($){var ne=D($,!0,R,[w,k]);return function(H){return _(ne(H))}}):Z.attr("d",_),Y.call(h,p,m,g,{styleOne:s,eventDataKeys:u.eventDataKeys,transitionTime:u.CLICK_TRANSITION_TIME,transitionEasing:u.CLICK_TRANSITION_EASING}).call(d.setSliceCursor,m,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:m._transitioning}),Z.call(s,te,P,{hovered:!1}),te._text=(d.getPtLabel(te)||"").split("
").join(" ")||"";var re=a.ensureSingle(Y,"g","slicetext"),U=a.ensureSingle(re,"text","",function($){$.attr("data-notex",1)}),q=a.ensureUniformFontSize(m,d.determineTextFont(P,te,z.font,{onPathbar:!0}));U.text(te._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(l.font,q).call(c.convertToTspans,m),te.textBB=l.bBox(U.node()),te.transform=S(te,{fontSize:q.size,onPathbar:!0}),te.transform.fontSize=q.size,M?U.transition().attrTween("transform",function($){var ne=O($,!0,R,[w,k]);return function(H){return A(ne(H))}}):U.attr("transform",A(te))})}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../sunburst/fx":1054,"../sunburst/helpers":1055,"./constants":1078,"./partition":1087,"./style":1090,"@plotly/d3":58}],1082:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),l=e("../../components/drawing"),c=e("../../lib/svg_text_utils"),i=e("./partition"),s=e("./style").styleOne,u=e("./constants"),d=e("../sunburst/helpers"),h=e("../sunburst/fx"),m=e("../sunburst/plot").formatSliceLabel;o.exports=function(g,p,v,y,x){var w=x.width,k=x.height,b=x.viewX,T=x.viewY,_=x.pathSlice,S=x.toMoveInsideSlice,A=x.strTransform,M=x.hasTransition,E=x.handleSlicesExit,D=x.makeUpdateSliceInterpolator,O=x.makeUpdateTextInterpolator,R=x.prevEntry,z=g._fullLayout,L=p[0].trace,P=L.textposition.indexOf("left")!==-1,N=L.textposition.indexOf("right")!==-1,B=L.textposition.indexOf("bottom")!==-1,G=!B&&!L.marker.pad.t||B&&!L.marker.pad.b,W=i(v,[w,k],{packing:L.tiling.packing,squarifyratio:L.tiling.squarifyratio,flipX:L.tiling.flip.indexOf("x")>-1,flipY:L.tiling.flip.indexOf("y")>-1,pad:{inner:L.tiling.pad,top:L.marker.pad.t,left:L.marker.pad.l,right:L.marker.pad.r,bottom:L.marker.pad.b}}).descendants(),K=1/0,te=-1/0;W.forEach(function(q){var $=q.depth;$>=L._maxDepth?(q.x0=q.x1=(q.x0+q.x1)/2,q.y0=q.y1=(q.y0+q.y1)/2):(K=Math.min(K,$),te=Math.max(te,$))}),y=y.data(W,d.getPtId),L._maxVisibleLayers=isFinite(te)?te-K+1:0,y.enter().append("g").classed("slice",!0),E(y,!1,{},[w,k],_),y.order();var Y=null;if(M&&R){var Z=d.getPtId(R);y.each(function(q){Y===null&&d.getPtId(q)===Z&&(Y={x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1})})}var re=function(){return Y||{x0:0,x1:w,y0:0,y1:k}},U=y;return M&&(U=U.transition().each("end",function(){var q=r.select(this);d.setSliceCursor(q,g,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),U.each(function(q){var $=d.isHeader(q,L);q._x0=b(q.x0),q._x1=b(q.x1),q._y0=T(q.y0),q._y1=T(q.y1),q._hoverX=b(q.x1-L.marker.pad.r),q._hoverY=T(B?q.y1-L.marker.pad.b/2:q.y0+L.marker.pad.t/2);var ne=r.select(this),H=a.ensureSingle(ne,"path","surface",function(ae){ae.style("pointer-events","all")});M?H.transition().attrTween("d",function(ae){var ue=D(ae,!1,re(),[w,k]);return function(le){return _(ue(le))}}):H.attr("d",_),ne.call(h,v,g,p,{styleOne:s,eventDataKeys:u.eventDataKeys,transitionTime:u.CLICK_TRANSITION_TIME,transitionEasing:u.CLICK_TRANSITION_EASING}).call(d.setSliceCursor,g,{isTransitioning:g._transitioning}),H.call(s,q,L,{hovered:!1}),q.x0===q.x1||q.y0===q.y1?q._text="":q._text=$?G?"":d.getPtLabel(q)||"":m(q,v,L,p,z)||"";var Q=a.ensureSingle(ne,"g","slicetext"),ee=a.ensureSingle(Q,"text","",function(ae){ae.attr("data-notex",1)}),ie=a.ensureUniformFontSize(g,d.determineTextFont(L,q,z.font));ee.text(q._text||" ").classed("slicetext",!0).attr("text-anchor",N?"end":P||$?"start":"middle").call(l.font,ie).call(c.convertToTspans,g),q.textBB=l.bBox(ee.node()),q.transform=S(q,{fontSize:ie.size,isHeader:$}),q.transform.fontSize=ie.size,M?ee.transition().attrTween("transform",function(ae){var ue=O(ae,!1,re(),[w,k]);return function(le){return A(ue(le))}}):ee.attr("transform",A(q))}),Y}},{"../../components/drawing":388,"../../lib":503,"../../lib/svg_text_utils":529,"../sunburst/fx":1054,"../sunburst/helpers":1055,"../sunburst/plot":1059,"./constants":1078,"./partition":1087,"./style":1090,"@plotly/d3":58}],1083:[function(e,o,f){o.exports=function r(a,l,c){var i;c.swapXY&&(i=a.x0,a.x0=a.y0,a.y0=i,i=a.x1,a.x1=a.y1,a.y1=i),c.flipX&&(i=a.x0,a.x0=l[0]-a.x1,a.x1=l[0]-i),c.flipY&&(i=a.y0,a.y0=l[1]-a.y1,a.y1=l[1]-i);var s=a.children;if(s)for(var u=0;u-1?N+W:-(G+W):0,te={x0:B,x1:B,y0:K,y1:K+G},Y=function(Ee,ze,Fe){var Ve=b.tiling.pad,Ke=function(Ye){return Ye-Ve<=ze.x0},Re=function(Ye){return Ye+Ve>=ze.x1},qe=function(Ye){return Ye-Ve<=ze.y0},We=function(Ye){return Ye+Ve>=ze.y1};return Ee.x0===ze.x0&&Ee.x1===ze.x1&&Ee.y0===ze.y0&&Ee.y1===ze.y1?{x0:Ee.x0,x1:Ee.x1,y0:Ee.y0,y1:Ee.y1}:{x0:Ke(Ee.x0-Ve)?0:Re(Ee.x0-Ve)?Fe[0]:Ee.x0,x1:Ke(Ee.x1+Ve)?0:Re(Ee.x1+Ve)?Fe[0]:Ee.x1,y0:qe(Ee.y0-Ve)?0:We(Ee.y0-Ve)?Fe[1]:Ee.y0,y1:qe(Ee.y1+Ve)?0:We(Ee.y1+Ve)?Fe[1]:Ee.y1}},Z=null,re={},U={},q=null,$=function(Ee,ze){return ze?re[m(Ee)]:U[m(Ee)]},ne=function(Ee,ze,Fe,Ve){if(ze)return re[m(_)]||te;var Ke=U[b.level]||Fe;return function(Re){return Re.data.depth-S.data.depth=(Ve-=(T?Pt:Pt.r)-i)){var At=(Fe+Ve)/2;Fe=At,Ve=At}var at;Ye?Ke<(at=Re-(T?Pt:Pt.b))&&at"?(Ye.x-=Re,nt.x-=Re,ft.x-=Re,vt.x-=Re):we==="/"?(ft.x-=Re,vt.x-=Re,qe.x-=Re/2,We.x-=Re/2):we==="\\"?(Ye.x-=Re,nt.x-=Re,qe.x-=Re/2,We.x-=Re/2):we==="<"&&(qe.x-=Re,We.x-=Re),_e(Ye),_e(vt),_e(qe),_e(nt),_e(ft),_e(We),"M"+fe(Ye.x,Ye.y)+"L"+fe(nt.x,nt.y)+"L"+fe(We.x,We.y)+"L"+fe(ft.x,ft.y)+"L"+fe(vt.x,vt.y)+"L"+fe(qe.x,qe.y)+"Z"},toMoveInsideSlice:Te,makeUpdateSliceInterpolator:de,makeUpdateTextInterpolator:ye,handleSlicesExit:Me,hasTransition:O,strTransform:ke}):M.remove()}},{"../../lib":503,"../bar/constants":650,"../bar/plot":659,"../bar/uniform_text":664,"../sunburst/helpers":1055,"./constants":1078,"./draw_ancestors":1081,"@plotly/d3":58,"d3-interpolate":116}],1090:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../components/color"),l=e("../../lib"),c=e("../sunburst/helpers"),i=e("../bar/uniform_text").resizeText;function s(u,d,h,m){var g,p,v=(m||{}).hovered,y=d.data.data,x=y.i,w=y.color,k=c.isHierarchyRoot(d),b=1;if(v)g=h._hovered.marker.line.color,p=h._hovered.marker.line.width;else if(k&&w===h.root.color)b=100,g="rgba(0,0,0,0)",p=0;else if(g=l.castOption(h,x,"marker.line.color")||a.defaultLine,p=l.castOption(h,x,"marker.line.width")||0,!h._hasColorscale&&!d.onPathbar){var T=h.marker.depthfade;if(T){var _,S=a.combine(a.addOpacity(h._backgroundColor,.75),w);if(T===!0){var A=c.getMaxDepth(h);_=isFinite(A)?c.isLeaf(d)?0:h._maxVisibleLayers-(d.data.depth-h._entryDepth):d.data.height+1}else _=d.data.depth-h._entryDepth,h._atRootLevel||_++;if(_>0)for(var M=0;M<_;M++){var E=.5*M/_;w=a.combine(a.addOpacity(S,E),w)}}}u.style("stroke-width",p).call(a.fill,w).call(a.stroke,g).style("opacity",b)}o.exports={style:function(u){var d=u._fullLayout._treemaplayer.selectAll(".trace");i(u,d,"treemap"),d.each(function(h){var m=r.select(this),g=h[0].trace;m.style("opacity",g.opacity),m.selectAll("path.surface").each(function(p){r.select(this).call(s,p,g,{hovered:!1})})})},styleOne:s}},{"../../components/color":366,"../../lib":503,"../bar/uniform_text":664,"../sunburst/helpers":1055,"@plotly/d3":58}],1091:[function(e,o,f){var r=e("../box/attributes"),a=e("../../lib/extend").extendFlat,l=e("../../plots/cartesian/axis_format_attributes").axisHoverFormat;o.exports={y:r.y,x:r.x,x0:r.x0,y0:r.y0,xhoverformat:l("x"),yhoverformat:l("y"),name:a({},r.name,{}),orientation:a({},r.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:r.fillcolor,points:a({},r.boxpoints,{}),jitter:a({},r.jitter,{}),pointpos:a({},r.pointpos,{}),width:a({},r.width,{}),marker:r.marker,text:r.text,hovertext:r.hovertext,hovertemplate:r.hovertemplate,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:r.offsetgroup,alignmentgroup:r.alignmentgroup,selected:r.selected,unselected:r.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"}}},{"../../lib/extend":493,"../../plots/cartesian/axis_format_attributes":557,"../box/attributes":673}],1092:[function(e,o,f){var r=e("../../lib"),a=e("../../plots/cartesian/axes"),l=e("../box/calc"),c=e("./helpers"),i=e("../../constants/numerical").BADNUM;function s(d,h,m){var g=h.max-h.min;if(!g)return d.bandwidth?d.bandwidth:0;if(d.bandwidth)return Math.max(d.bandwidth,g/1e4);var p=m.length,v=r.stdev(m,p-1,h.mean);return Math.max(function(y,x,w){return 1.059*Math.min(x,w/1.349)*Math.pow(y,-.2)}(p,v,h.q3-h.q1),g/100)}function u(d,h,m,g){var p,v=d.spanmode,y=d.span||[],x=[h.min,h.max],w=[h.min-2*g,h.max+2*g];function k(T){var _=y[T],S=m.type==="multicategory"?m.r2c(_):m.d2c(_,0,d[h.valLetter+"calendar"]);return S===i?w[T]:S}var b={type:"linear",range:p=v==="soft"?w:v==="hard"?x:[k(0),k(1)]};return a.setConvert(b),b.cleanRange(),p}o.exports=function(d,h){var m=l(d,h);if(m[0].t.empty)return m;for(var g=d._fullLayout,p=a.getFromId(d,h[h.orientation==="h"?"xaxis":"yaxis"]),v=1/0,y=-1/0,x=0,w=0,k=0;k0){var _,S,A,M,E,D=i.xa,O=i.ya;y.orientation==="h"?(E=s,_="y",A=O,S="x",M=D):(E=u,_="x",A=D,S="y",M=O);var R=v[i.index];if(E>=R.span[0]&&E<=R.span[1]){var z=r.extendFlat({},i),L=M.c2p(E,!0),P=c.getKdeValue(R,y,E),N=c.getPositionOnKdePath(R,y,L),B=A._offset,G=A._length;z[_+"0"]=N[0],z[_+"1"]=N[1],z[S+"0"]=z[S+"1"]=L,z[S+"Label"]=S+": "+a.hoverLabelText(M,E,y[S+"hoverformat"])+", "+v[0].t.labels.kde+" "+P.toFixed(3),z.spikeDistance=T[0].spikeDistance;var W=_+"Spike";z[W]=T[0][W],T[0].spikeDistance=void 0,T[0][W]=void 0,z.hovertemplate=!1,b.push(z),(g={stroke:i.color})[_+"1"]=r.constrain(B+N[0],B,B+G),g[_+"2"]=r.constrain(B+N[1],B,B+G),g[S+"1"]=g[S+"2"]=M._offset+L}}w&&(b=b.concat(T))}x.indexOf("points")!==-1&&(m=l.hoverOnPoints(i,s,u));var K=p.selectAll(".violinline-"+y.uid).data(g?[0]:[]);return K.enter().append("line").classed("violinline-"+y.uid,!0).attr("stroke-width",1.5),K.exit().remove(),K.attr(g),d==="closest"?m?[m]:b:(m&&b.push(m),b)}},{"../../lib":503,"../../plots/cartesian/axes":554,"../box/hover":678,"./helpers":1095}],1097:[function(e,o,f){o.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("../box/defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc"),plot:e("./plot"),style:e("./style"),styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../box/select"),moduleType:"trace",name:"violin",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../box/defaults":676,"../box/select":683,"../scatter/style":951,"./attributes":1091,"./calc":1092,"./cross_trace_calc":1093,"./defaults":1094,"./hover":1096,"./layout_attributes":1098,"./layout_defaults":1099,"./plot":1100,"./style":1101}],1098:[function(e,o,f){var r=e("../box/layout_attributes"),a=e("../../lib").extendFlat;o.exports={violinmode:a({},r.boxmode,{}),violingap:a({},r.boxgap,{}),violingroupgap:a({},r.boxgroupgap,{})}},{"../../lib":503,"../box/layout_attributes":680}],1099:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes"),l=e("../box/layout_defaults");o.exports=function(c,i,s){l._supply(c,i,s,function(u,d){return r.coerce(c,i,a,u,d)},"violin")}},{"../../lib":503,"../box/layout_defaults":681,"./layout_attributes":1098}],1100:[function(e,o,f){var r=e("@plotly/d3"),a=e("../../lib"),l=e("../../components/drawing"),c=e("../box/plot"),i=e("../scatter/line_points"),s=e("./helpers");o.exports=function(u,d,h,m){var g=u._fullLayout,p=d.xaxis,v=d.yaxis;function y(x){var w=i(x,{xaxis:p,yaxis:v,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return l.smoothopen(w[0],1)}a.makeTraceGroups(m,h,"trace violins").each(function(x){var w=r.select(this),k=x[0],b=k.t,T=k.trace;if(T.visible!==!0||b.empty)w.remove();else{var _=b.bPos,S=b.bdPos,A=d[b.valLetter+"axis"],M=d[b.posLetter+"axis"],E=T.side==="both",D=E||T.side==="positive",O=E||T.side==="negative",R=w.selectAll("path.violin").data(a.identity);R.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","violin"),R.exit().remove(),R.each(function(K){var te,Y,Z,re,U,q,$,ne,H=r.select(this),Q=K.density,ee=Q.length,ie=M.c2l(K.pos+_,!0),ae=M.l2p(ie);if(T.width)te=b.maxKDE/S;else{var ue=g._violinScaleGroupStats[T.scalegroup];te=T.scalemode==="count"?ue.maxKDE/S*(ue.maxCount/K.pts.length):ue.maxKDE/S}if(D){for($=new Array(ee),U=0;U")),p.color=function(R,z){var L=R[z.dir].marker,P=L.color,N=L.line.color,B=L.line.width;if(a(P))return P;if(a(N)&&B)return N}(y,b),[p]}function O(R){return r(k,R,y[w+"hoverformat"])}}},{"../../components/color":366,"../../constants/delta.js":473,"../../plots/cartesian/axes":554,"../bar/hover":655}],1113:[function(e,o,f){o.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults").supplyDefaults,crossTraceDefaults:e("./defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc"),plot:e("./plot"),style:e("./style").style,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("../bar/select"),moduleType:"trace",name:"waterfall",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":568,"../bar/select":660,"./attributes":1106,"./calc":1107,"./cross_trace_calc":1109,"./defaults":1110,"./event_data":1111,"./hover":1112,"./layout_attributes":1114,"./layout_defaults":1115,"./plot":1116,"./style":1117}],1114:[function(e,o,f){o.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"}}},{}],1115:[function(e,o,f){var r=e("../../lib"),a=e("./layout_attributes");o.exports=function(l,c,i){var s=!1;function u(m,g){return r.coerce(l,c,a,m,g)}for(var d=0;d0&&(N+=A?"M"+L[0]+","+P[1]+"V"+P[0]:"M"+L[1]+","+P[0]+"H"+L[0]),M!=="between"&&(O.isSum||R path").each(function(x){if(!x.isBlank){var w=y[x.dir].marker;r.select(this).call(l.fill,w.color).call(l.stroke,w.line.color).call(a.dashLine,w.line.dash,w.line.width).style("opacity",y.selectedpoints&&!x.selected?c:1)}}),u(v,y,d),v.selectAll(".lines").each(function(){var x=y.connector.line;a.lineGroupStyle(r.select(this).selectAll("path"),x.width,x.color,x.dash)})})}}},{"../../components/color":366,"../../components/drawing":388,"../../constants/interactions":478,"../bar/style":662,"../bar/uniform_text":664,"@plotly/d3":58}],1118:[function(e,o,f){var r=e("../plots/cartesian/axes"),a=e("../lib"),l=e("../plot_api/plot_schema"),c=e("./helpers").pointsAccessorFunction,i=e("../constants/numerical").BADNUM;f.moduleType="transform",f.name="aggregate";var s=f.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},u=s.aggregations;function d(p,v,y,x){if(x.enabled){for(var w=x.target,k=a.nestedProperty(v,w),b=k.get(),T=function(A,M){var E=A.func,D=M.d2c,O=M.c2d;switch(E){case"count":return h;case"first":return m;case"last":return g;case"sum":return function(R,z){for(var L=0,P=0;PP&&(P=W,N=G)}}return P?O(N):i};case"rms":return function(R,z){for(var L=0,P=0,N=0;N":return function(Z){return Y(Z)>K};case">=":return function(Z){return Y(Z)>=K};case"[]":return function(Z){var re=Y(Z);return re>=K[0]&&re<=K[1]};case"()":return function(Z){var re=Y(Z);return re>K[0]&&re=K[0]&&reK[0]&&re<=K[1]};case"][":return function(Z){var re=Y(Z);return re<=K[0]||re>=K[1]};case")(":return function(Z){var re=Y(Z);return reK[1]};case"](":return function(Z){var re=Y(Z);return re<=K[0]||re>K[1]};case")[":return function(Z){var re=Y(Z);return re=K[1]};case"{}":return function(Z){return K.indexOf(Y(Z))!==-1};case"}{":return function(Z){return K.indexOf(Y(Z))===-1}}}(g,l.getDataToCoordFunc(h,m,v,p),x),A={},M={},E=0;k?(T=function(z){A[z.astr]=r.extendDeep([],z.get()),z.set(new Array(y))},_=function(z,L){var P=A[z.astr][L];z.get()[L]=P}):(T=function(z){A[z.astr]=r.extendDeep([],z.get()),z.set([])},_=function(z,L){var P=A[z.astr][L];z.get().push(P)}),R(T);for(var D=c(m.transforms,g),O=0;O1?"%{group} (%{trace})":"%{group}");var p=s.styles,v=m.styles=[];if(p)for(h=0;h0?k-4:k;for(x=0;x>16&255,T[_++]=y>>8&255,T[_++]=255&y;return b===2&&(y=s[v.charCodeAt(x)]<<2|s[v.charCodeAt(x+1)]>>4,T[_++]=255&y),b===1&&(y=s[v.charCodeAt(x)]<<10|s[v.charCodeAt(x+1)]<<4|s[v.charCodeAt(x+2)]>>2,T[_++]=y>>8&255,T[_++]=255&y),T},c.fromByteArray=function(v){for(var y,x=v.length,w=x%3,k=[],b=0,T=x-w;bT?T:b+16383));return w===1?(y=v[x-1],k.push(i[y>>2]+i[y<<4&63]+"==")):w===2&&(y=(v[x-2]<<8)+v[x-1],k.push(i[y>>10]+i[y>>4&63]+i[y<<2&63]+"=")),k.join("")};for(var i=[],s=[],u=typeof Uint8Array<"u"?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,m=d.length;h0)throw new Error("Invalid string. Length must be a multiple of 4");var x=v.indexOf("=");return x===-1&&(x=y),[x,x===y?0:4-x%4]}function p(v,y,x){for(var w,k,b=[],T=y;T>18&63]+i[k>>12&63]+i[k>>6&63]+i[63&k]);return b.join("")}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},{}],2:[function(a,l,c){},{}],3:[function(a,l,c){(function(i){(function(){var s=a("base64-js"),u=a("ieee754");c.Buffer=h,c.SlowBuffer=function(H){return+H!=H&&(H=0),h.alloc(+H)},c.INSPECT_MAX_BYTES=50;function d(H){if(H>2147483647)throw new RangeError('The value "'+H+'" is invalid for option "size"');var Q=new Uint8Array(H);return Q.__proto__=h.prototype,Q}function h(H,Q,ee){if(typeof H=="number"){if(typeof Q=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(H)}return m(H,Q,ee)}function m(H,Q,ee){if(typeof H=="string")return function(ue,le){if(typeof le=="string"&&le!==""||(le="utf8"),!h.isEncoding(le))throw new TypeError("Unknown encoding: "+le);var ge=0|x(ue,le),fe=d(ge),me=fe.write(ue,le);return me!==ge&&(fe=fe.slice(0,me)),fe}(H,Q);if(ArrayBuffer.isView(H))return v(H);if(H==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H);if($(H,ArrayBuffer)||H&&$(H.buffer,ArrayBuffer))return function(ue,le,ge){if(le<0||ue.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|H}function x(H,Q){if(h.isBuffer(H))return H.length;if(ArrayBuffer.isView(H)||$(H,ArrayBuffer))return H.byteLength;if(typeof H!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof H);var ee=H.length,ie=arguments.length>2&&arguments[2]===!0;if(!ie&&ee===0)return 0;for(var ae=!1;;)switch(Q){case"ascii":case"latin1":case"binary":return ee;case"utf8":case"utf-8":return re(H).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*ee;case"hex":return ee>>>1;case"base64":return U(H).length;default:if(ae)return ie?-1:re(H).length;Q=(""+Q).toLowerCase(),ae=!0}}function w(H,Q,ee){var ie=!1;if((Q===void 0||Q<0)&&(Q=0),Q>this.length||((ee===void 0||ee>this.length)&&(ee=this.length),ee<=0)||(ee>>>=0)<=(Q>>>=0))return"";for(H||(H="utf8");;)switch(H){case"hex":return P(this,Q,ee);case"utf8":case"utf-8":return R(this,Q,ee);case"ascii":return z(this,Q,ee);case"latin1":case"binary":return L(this,Q,ee);case"base64":return O(this,Q,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,Q,ee);default:if(ie)throw new TypeError("Unknown encoding: "+H);H=(H+"").toLowerCase(),ie=!0}}function k(H,Q,ee){var ie=H[Q];H[Q]=H[ee],H[ee]=ie}function b(H,Q,ee,ie,ae){if(H.length===0)return-1;if(typeof ee=="string"?(ie=ee,ee=0):ee>2147483647?ee=2147483647:ee<-2147483648&&(ee=-2147483648),ne(ee=+ee)&&(ee=ae?0:H.length-1),ee<0&&(ee=H.length+ee),ee>=H.length){if(ae)return-1;ee=H.length-1}else if(ee<0){if(!ae)return-1;ee=0}if(typeof Q=="string"&&(Q=h.from(Q,ie)),h.isBuffer(Q))return Q.length===0?-1:T(H,Q,ee,ie,ae);if(typeof Q=="number")return Q&=255,typeof Uint8Array.prototype.indexOf=="function"?ae?Uint8Array.prototype.indexOf.call(H,Q,ee):Uint8Array.prototype.lastIndexOf.call(H,Q,ee):T(H,[Q],ee,ie,ae);throw new TypeError("val must be string, number or Buffer")}function T(H,Q,ee,ie,ae){var ue,le=1,ge=H.length,fe=Q.length;if(ie!==void 0&&((ie=String(ie).toLowerCase())==="ucs2"||ie==="ucs-2"||ie==="utf16le"||ie==="utf-16le")){if(H.length<2||Q.length<2)return-1;le=2,ge/=2,fe/=2,ee/=2}function me(Oe,de){return le===1?Oe[de]:Oe.readUInt16BE(de*le)}if(ae){var _e=-1;for(ue=ee;uege&&(ee=ge-fe),ue=ee;ue>=0;ue--){for(var we=!0,Te=0;Teae&&(ie=ae):ie=ae;var ue=Q.length;ie>ue/2&&(ie=ue/2);for(var le=0;le>8,fe=le%256,me.push(fe),me.push(ge);return me}(Q,H.length-ee),H,ee,ie)}function O(H,Q,ee){return Q===0&&ee===H.length?s.fromByteArray(H):s.fromByteArray(H.slice(Q,ee))}function R(H,Q,ee){ee=Math.min(H.length,ee);for(var ie=[],ae=Q;ae239?4:me>223?3:me>191?2:1;if(ae+we<=ee)switch(we){case 1:me<128&&(_e=me);break;case 2:(192&(ue=H[ae+1]))==128&&(fe=(31&me)<<6|63&ue)>127&&(_e=fe);break;case 3:ue=H[ae+1],le=H[ae+2],(192&ue)==128&&(192&le)==128&&(fe=(15&me)<<12|(63&ue)<<6|63&le)>2047&&(fe<55296||fe>57343)&&(_e=fe);break;case 4:ue=H[ae+1],le=H[ae+2],ge=H[ae+3],(192&ue)==128&&(192&le)==128&&(192&ge)==128&&(fe=(15&me)<<18|(63&ue)<<12|(63&le)<<6|63&ge)>65535&&fe<1114112&&(_e=fe)}_e===null?(_e=65533,we=1):_e>65535&&(_e-=65536,ie.push(_e>>>10&1023|55296),_e=56320|1023&_e),ie.push(_e),ae+=we}return function(Te){var Oe=Te.length;if(Oe<=4096)return String.fromCharCode.apply(String,Te);for(var de="",ye=0;ye"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."),Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),h.poolSize=8192,h.from=function(H,Q,ee){return m(H,Q,ee)},h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,h.alloc=function(H,Q,ee){return function(ie,ae,ue){return g(ie),ie<=0?d(ie):ae!==void 0?typeof ue=="string"?d(ie).fill(ae,ue):d(ie).fill(ae):d(ie)}(H,Q,ee)},h.allocUnsafe=function(H){return p(H)},h.allocUnsafeSlow=function(H){return p(H)},h.isBuffer=function(H){return H!=null&&H._isBuffer===!0&&H!==h.prototype},h.compare=function(H,Q){if($(H,Uint8Array)&&(H=h.from(H,H.offset,H.byteLength)),$(Q,Uint8Array)&&(Q=h.from(Q,Q.offset,Q.byteLength)),!h.isBuffer(H)||!h.isBuffer(Q))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(H===Q)return 0;for(var ee=H.length,ie=Q.length,ae=0,ue=Math.min(ee,ie);aeQ&&(H+=" ... "),""},h.prototype.compare=function(H,Q,ee,ie,ae){if($(H,Uint8Array)&&(H=h.from(H,H.offset,H.byteLength)),!h.isBuffer(H))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof H);if(Q===void 0&&(Q=0),ee===void 0&&(ee=H?H.length:0),ie===void 0&&(ie=0),ae===void 0&&(ae=this.length),Q<0||ee>H.length||ie<0||ae>this.length)throw new RangeError("out of range index");if(ie>=ae&&Q>=ee)return 0;if(ie>=ae)return-1;if(Q>=ee)return 1;if(this===H)return 0;for(var ue=(ae>>>=0)-(ie>>>=0),le=(ee>>>=0)-(Q>>>=0),ge=Math.min(ue,le),fe=this.slice(ie,ae),me=H.slice(Q,ee),_e=0;_e>>=0,isFinite(ee)?(ee>>>=0,ie===void 0&&(ie="utf8")):(ie=ee,ee=void 0)}var ae=this.length-Q;if((ee===void 0||ee>ae)&&(ee=ae),H.length>0&&(ee<0||Q<0)||Q>this.length)throw new RangeError("Attempt to write outside buffer bounds");ie||(ie="utf8");for(var ue=!1;;)switch(ie){case"hex":return _(this,H,Q,ee);case"utf8":case"utf-8":return S(this,H,Q,ee);case"ascii":return A(this,H,Q,ee);case"latin1":case"binary":return M(this,H,Q,ee);case"base64":return E(this,H,Q,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,H,Q,ee);default:if(ue)throw new TypeError("Unknown encoding: "+ie);ie=(""+ie).toLowerCase(),ue=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function z(H,Q,ee){var ie="";ee=Math.min(H.length,ee);for(var ae=Q;aeie)&&(ee=ie);for(var ae="",ue=Q;ueee)throw new RangeError("Trying to access beyond buffer length")}function G(H,Q,ee,ie,ae,ue){if(!h.isBuffer(H))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>ae||QH.length)throw new RangeError("Index out of range")}function W(H,Q,ee,ie,ae,ue){if(ee+ie>H.length)throw new RangeError("Index out of range");if(ee<0)throw new RangeError("Index out of range")}function K(H,Q,ee,ie,ae){return Q=+Q,ee>>>=0,ae||W(H,0,ee,4),u.write(H,Q,ee,ie,23,4),ee+4}function te(H,Q,ee,ie,ae){return Q=+Q,ee>>>=0,ae||W(H,0,ee,8),u.write(H,Q,ee,ie,52,8),ee+8}h.prototype.slice=function(H,Q){var ee=this.length;(H=~~H)<0?(H+=ee)<0&&(H=0):H>ee&&(H=ee),(Q=Q===void 0?ee:~~Q)<0?(Q+=ee)<0&&(Q=0):Q>ee&&(Q=ee),Q>>=0,Q>>>=0,ee||B(H,Q,this.length);for(var ie=this[H],ae=1,ue=0;++ue>>=0,Q>>>=0,ee||B(H,Q,this.length);for(var ie=this[H+--Q],ae=1;Q>0&&(ae*=256);)ie+=this[H+--Q]*ae;return ie},h.prototype.readUInt8=function(H,Q){return H>>>=0,Q||B(H,1,this.length),this[H]},h.prototype.readUInt16LE=function(H,Q){return H>>>=0,Q||B(H,2,this.length),this[H]|this[H+1]<<8},h.prototype.readUInt16BE=function(H,Q){return H>>>=0,Q||B(H,2,this.length),this[H]<<8|this[H+1]},h.prototype.readUInt32LE=function(H,Q){return H>>>=0,Q||B(H,4,this.length),(this[H]|this[H+1]<<8|this[H+2]<<16)+16777216*this[H+3]},h.prototype.readUInt32BE=function(H,Q){return H>>>=0,Q||B(H,4,this.length),16777216*this[H]+(this[H+1]<<16|this[H+2]<<8|this[H+3])},h.prototype.readIntLE=function(H,Q,ee){H>>>=0,Q>>>=0,ee||B(H,Q,this.length);for(var ie=this[H],ae=1,ue=0;++ue=(ae*=128)&&(ie-=Math.pow(2,8*Q)),ie},h.prototype.readIntBE=function(H,Q,ee){H>>>=0,Q>>>=0,ee||B(H,Q,this.length);for(var ie=Q,ae=1,ue=this[H+--ie];ie>0&&(ae*=256);)ue+=this[H+--ie]*ae;return ue>=(ae*=128)&&(ue-=Math.pow(2,8*Q)),ue},h.prototype.readInt8=function(H,Q){return H>>>=0,Q||B(H,1,this.length),128&this[H]?-1*(255-this[H]+1):this[H]},h.prototype.readInt16LE=function(H,Q){H>>>=0,Q||B(H,2,this.length);var ee=this[H]|this[H+1]<<8;return 32768&ee?4294901760|ee:ee},h.prototype.readInt16BE=function(H,Q){H>>>=0,Q||B(H,2,this.length);var ee=this[H+1]|this[H]<<8;return 32768&ee?4294901760|ee:ee},h.prototype.readInt32LE=function(H,Q){return H>>>=0,Q||B(H,4,this.length),this[H]|this[H+1]<<8|this[H+2]<<16|this[H+3]<<24},h.prototype.readInt32BE=function(H,Q){return H>>>=0,Q||B(H,4,this.length),this[H]<<24|this[H+1]<<16|this[H+2]<<8|this[H+3]},h.prototype.readFloatLE=function(H,Q){return H>>>=0,Q||B(H,4,this.length),u.read(this,H,!0,23,4)},h.prototype.readFloatBE=function(H,Q){return H>>>=0,Q||B(H,4,this.length),u.read(this,H,!1,23,4)},h.prototype.readDoubleLE=function(H,Q){return H>>>=0,Q||B(H,8,this.length),u.read(this,H,!0,52,8)},h.prototype.readDoubleBE=function(H,Q){return H>>>=0,Q||B(H,8,this.length),u.read(this,H,!1,52,8)},h.prototype.writeUIntLE=function(H,Q,ee,ie){H=+H,Q>>>=0,ee>>>=0,ie||G(this,H,Q,ee,Math.pow(2,8*ee)-1,0);var ae=1,ue=0;for(this[Q]=255&H;++ue>>=0,ee>>>=0,ie||G(this,H,Q,ee,Math.pow(2,8*ee)-1,0);var ae=ee-1,ue=1;for(this[Q+ae]=255&H;--ae>=0&&(ue*=256);)this[Q+ae]=H/ue&255;return Q+ee},h.prototype.writeUInt8=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,1,255,0),this[Q]=255&H,Q+1},h.prototype.writeUInt16LE=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,2,65535,0),this[Q]=255&H,this[Q+1]=H>>>8,Q+2},h.prototype.writeUInt16BE=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,2,65535,0),this[Q]=H>>>8,this[Q+1]=255&H,Q+2},h.prototype.writeUInt32LE=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,4,4294967295,0),this[Q+3]=H>>>24,this[Q+2]=H>>>16,this[Q+1]=H>>>8,this[Q]=255&H,Q+4},h.prototype.writeUInt32BE=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,4,4294967295,0),this[Q]=H>>>24,this[Q+1]=H>>>16,this[Q+2]=H>>>8,this[Q+3]=255&H,Q+4},h.prototype.writeIntLE=function(H,Q,ee,ie){if(H=+H,Q>>>=0,!ie){var ae=Math.pow(2,8*ee-1);G(this,H,Q,ee,ae-1,-ae)}var ue=0,le=1,ge=0;for(this[Q]=255&H;++ue>0)-ge&255;return Q+ee},h.prototype.writeIntBE=function(H,Q,ee,ie){if(H=+H,Q>>>=0,!ie){var ae=Math.pow(2,8*ee-1);G(this,H,Q,ee,ae-1,-ae)}var ue=ee-1,le=1,ge=0;for(this[Q+ue]=255&H;--ue>=0&&(le*=256);)H<0&&ge===0&&this[Q+ue+1]!==0&&(ge=1),this[Q+ue]=(H/le>>0)-ge&255;return Q+ee},h.prototype.writeInt8=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,1,127,-128),H<0&&(H=255+H+1),this[Q]=255&H,Q+1},h.prototype.writeInt16LE=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,2,32767,-32768),this[Q]=255&H,this[Q+1]=H>>>8,Q+2},h.prototype.writeInt16BE=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,2,32767,-32768),this[Q]=H>>>8,this[Q+1]=255&H,Q+2},h.prototype.writeInt32LE=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,4,2147483647,-2147483648),this[Q]=255&H,this[Q+1]=H>>>8,this[Q+2]=H>>>16,this[Q+3]=H>>>24,Q+4},h.prototype.writeInt32BE=function(H,Q,ee){return H=+H,Q>>>=0,ee||G(this,H,Q,4,2147483647,-2147483648),H<0&&(H=4294967295+H+1),this[Q]=H>>>24,this[Q+1]=H>>>16,this[Q+2]=H>>>8,this[Q+3]=255&H,Q+4},h.prototype.writeFloatLE=function(H,Q,ee){return K(this,H,Q,!0,ee)},h.prototype.writeFloatBE=function(H,Q,ee){return K(this,H,Q,!1,ee)},h.prototype.writeDoubleLE=function(H,Q,ee){return te(this,H,Q,!0,ee)},h.prototype.writeDoubleBE=function(H,Q,ee){return te(this,H,Q,!1,ee)},h.prototype.copy=function(H,Q,ee,ie){if(!h.isBuffer(H))throw new TypeError("argument should be a Buffer");if(ee||(ee=0),ie||ie===0||(ie=this.length),Q>=H.length&&(Q=H.length),Q||(Q=0),ie>0&&ie=this.length)throw new RangeError("Index out of range");if(ie<0)throw new RangeError("sourceEnd out of bounds");ie>this.length&&(ie=this.length),H.length-Q=0;--ue)H[ue+Q]=this[ue+ee];else Uint8Array.prototype.set.call(H,this.subarray(ee,ie),Q);return ae},h.prototype.fill=function(H,Q,ee,ie){if(typeof H=="string"){if(typeof Q=="string"?(ie=Q,Q=0,ee=this.length):typeof ee=="string"&&(ie=ee,ee=this.length),ie!==void 0&&typeof ie!="string")throw new TypeError("encoding must be a string");if(typeof ie=="string"&&!h.isEncoding(ie))throw new TypeError("Unknown encoding: "+ie);if(H.length===1){var ae=H.charCodeAt(0);(ie==="utf8"&&ae<128||ie==="latin1")&&(H=ae)}}else typeof H=="number"&&(H&=255);if(Q<0||this.length>>=0,ee=ee===void 0?this.length:ee>>>0,H||(H=0),typeof H=="number")for(ue=Q;ue55295&&ee<57344){if(!ae){if(ee>56319){(Q-=3)>-1&&ue.push(239,191,189);continue}if(le+1===ie){(Q-=3)>-1&&ue.push(239,191,189);continue}ae=ee;continue}if(ee<56320){(Q-=3)>-1&&ue.push(239,191,189),ae=ee;continue}ee=65536+(ae-55296<<10|ee-56320)}else ae&&(Q-=3)>-1&&ue.push(239,191,189);if(ae=null,ee<128){if((Q-=1)<0)break;ue.push(ee)}else if(ee<2048){if((Q-=2)<0)break;ue.push(ee>>6|192,63&ee|128)}else if(ee<65536){if((Q-=3)<0)break;ue.push(ee>>12|224,ee>>6&63|128,63&ee|128)}else{if(!(ee<1114112))throw new Error("Invalid code point");if((Q-=4)<0)break;ue.push(ee>>18|240,ee>>12&63|128,ee>>6&63|128,63&ee|128)}}return ue}function U(H){return s.toByteArray(function(Q){if((Q=(Q=Q.split("=")[0]).trim().replace(Y,"")).length<2)return"";for(;Q.length%4!=0;)Q+="=";return Q}(H))}function q(H,Q,ee,ie){for(var ae=0;ae=Q.length||ae>=H.length);++ae)Q[ae+ee]=H[ae];return ae}function $(H,Q){return H instanceof Q||H!=null&&H.constructor!=null&&H.constructor.name!=null&&H.constructor.name===Q.name}function ne(H){return H!=H}}).call(this)}).call(this,a("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:4}],4:[function(a,l,c){c.read=function(i,s,u,d,h){var m,g,p=8*h-d-1,v=(1<>1,x=-7,w=u?h-1:0,k=u?-1:1,b=i[s+w];for(w+=k,m=b&(1<<-x)-1,b>>=-x,x+=p;x>0;m=256*m+i[s+w],w+=k,x-=8);for(g=m&(1<<-x)-1,m>>=-x,x+=d;x>0;g=256*g+i[s+w],w+=k,x-=8);if(m===0)m=1-y;else{if(m===v)return g?NaN:1/0*(b?-1:1);g+=Math.pow(2,d),m-=y}return(b?-1:1)*g*Math.pow(2,m-d)},c.write=function(i,s,u,d,h,m){var g,p,v,y=8*m-h-1,x=(1<>1,k=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=d?0:m-1,T=d?1:-1,_=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(p=isNaN(s)?1:0,g=x):(g=Math.floor(Math.log(s)/Math.LN2),s*(v=Math.pow(2,-g))<1&&(g--,v*=2),(s+=g+w>=1?k/v:k*Math.pow(2,1-w))*v>=2&&(g++,v/=2),g+w>=x?(p=0,g=x):g+w>=1?(p=(s*v-1)*Math.pow(2,h),g+=w):(p=s*Math.pow(2,w-1)*Math.pow(2,h),g=0));h>=8;i[u+b]=255&p,b+=T,p/=256,h-=8);for(g=g<0;i[u+b]=255&g,b+=T,g/=256,y-=8);i[u+b-T]|=128*_}},{}],5:[function(a,l,c){var i,s,u=l.exports={};function d(){throw new Error("setTimeout has not been defined")}function h(){throw new Error("clearTimeout has not been defined")}function m(T){if(i===setTimeout)return setTimeout(T,0);if((i===d||!i)&&setTimeout)return i=setTimeout,setTimeout(T,0);try{return i(T,0)}catch{try{return i.call(null,T,0)}catch{return i.call(this,T,0)}}}(function(){try{i=typeof setTimeout=="function"?setTimeout:d}catch{i=d}try{s=typeof clearTimeout=="function"?clearTimeout:h}catch{s=h}})();var g,p=[],v=!1,y=-1;function x(){v&&g&&(v=!1,g.length?p=g.concat(p):y=-1,p.length&&w())}function w(){if(!v){var T=m(x);v=!0;for(var _=p.length;_;){for(g=p,p=[];++y<_;)g&&g[y].run();y=-1,_=p.length}g=null,v=!1,function(S){if(s===clearTimeout)return clearTimeout(S);if((s===h||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(S);try{s(S)}catch{try{return s.call(null,S)}catch{return s.call(this,S)}}}(T)}}function k(T,_){this.fun=T,this.array=_}function b(){}u.nextTick=function(T){var _=new Array(arguments.length-1);if(arguments.length>1)for(var S=1;S"u"?a("weak-map"):WeakMap,s=a("gl-buffer"),u=a("gl-vao"),d=new i;l.exports=function(h){var m=d.get(h),g=m&&(m._triangleBuffer.handle||m._triangleBuffer.buffer);if(!g||!h.isBuffer(g)){var p=s(h,new Float32Array([-1,-1,-1,4,4,-1]));(m=u(h,[{buffer:p,type:h.FLOAT,size:2}]))._triangleBuffer=p,d.set(h,m)}m.bind(),h.drawArrays(h.TRIANGLES,0,3),m.unbind()}},{"gl-buffer":78,"gl-vao":150,"weak-map":313}],9:[function(a,l,c){var i=a("pad-left");l.exports=function(s,u,d){u=typeof u=="number"?u:1,d=d||": ";var h=s.split(/\r?\n/),m=String(h.length+u-1).length;return h.map(function(g,p){var v=p+u,y=String(v).length;return i(v,m-y)+d+g}).join(` +`)}},{"pad-left":264}],10:[function(a,l,c){l.exports=function(u){var d=u.length;if(d===0)return[];if(d===1)return[0];for(var h=u[0].length,m=[u[0]],g=[0],p=1;p0?y=y.ushln(w):w<0&&(x=x.ushln(-w)),h(y,x)}},{"./div":17,"./is-rat":19,"./lib/is-bn":23,"./lib/num-to-bn":24,"./lib/rationalize":25,"./lib/str-to-bn":26}],19:[function(a,l,c){var i=a("./lib/is-bn");l.exports=function(s){return Array.isArray(s)&&s.length===2&&i(s[0])&&i(s[1])}},{"./lib/is-bn":23}],20:[function(a,l,c){var i=a("bn.js");l.exports=function(s){return s.cmp(new i(0))}},{"bn.js":33}],21:[function(a,l,c){var i=a("./bn-sign");l.exports=function(s){var u=s.length,d=s.words,h=0;if(u===1)h=d[0];else if(u===2)h=d[0]+67108864*d[1];else for(var m=0;m20?52:h+32}},{"bit-twiddle":32,"double-bits":64}],23:[function(a,l,c){a("bn.js"),l.exports=function(i){return i&&typeof i=="object"&&Boolean(i.words)}},{"bn.js":33}],24:[function(a,l,c){var i=a("bn.js"),s=a("double-bits");l.exports=function(u){var d=s.exponent(u);return d<52?new i(u):new i(u*Math.pow(2,52-d)).ushln(d-52)}},{"bn.js":33,"double-bits":64}],25:[function(a,l,c){var i=a("./num-to-bn"),s=a("./bn-sign");l.exports=function(u,d){var h=s(u),m=s(d);if(h===0)return[i(0),i(1)];if(m===0)return[i(0),i(0)];m<0&&(u=u.neg(),d=d.neg());var g=u.gcd(d);return g.cmpn(1)?[u.div(g),d.div(g)]:[u,d]}},{"./bn-sign":20,"./num-to-bn":24}],26:[function(a,l,c){var i=a("bn.js");l.exports=function(s){return new i(s)}},{"bn.js":33}],27:[function(a,l,c){var i=a("./lib/rationalize");l.exports=function(s,u){return i(s[0].mul(u[0]),s[1].mul(u[1]))}},{"./lib/rationalize":25}],28:[function(a,l,c){var i=a("./lib/bn-sign");l.exports=function(s){return i(s[0])*i(s[1])}},{"./lib/bn-sign":20}],29:[function(a,l,c){var i=a("./lib/rationalize");l.exports=function(s,u){return i(s[0].mul(u[1]).sub(s[1].mul(u[0])),s[1].mul(u[1]))}},{"./lib/rationalize":25}],30:[function(a,l,c){var i=a("./lib/bn-to-num"),s=a("./lib/ctz");l.exports=function(u){var d=u[0],h=u[1];if(d.cmpn(0)===0)return 0;var m=d.abs().divmod(h.abs()),g=m.div,p=i(g),v=m.mod,y=d.negative!==h.negative?-1:1;if(v.cmpn(0)===0)return y*p;if(p){var x=s(p)+4,w=i(v.ushln(x).divRound(h));return y*(p+w*Math.pow(2,-x))}var k=h.bitLength()-v.bitLength()+53;return w=i(v.ushln(k).divRound(h)),k<1023?y*w*Math.pow(2,-k):(w*=Math.pow(2,-1023),y*w*Math.pow(2,1023-k))}},{"./lib/bn-to-num":21,"./lib/ctz":22}],31:[function(a,l,c){function i(g,p,v,y,x){for(var w=x+1;y<=x;){var k=y+x>>>1,b=g[k];(v!==void 0?v(b,p):b-p)>=0?(w=k,x=k-1):y=k+1}return w}function s(g,p,v,y,x){for(var w=x+1;y<=x;){var k=y+x>>>1,b=g[k];(v!==void 0?v(b,p):b-p)>0?(w=k,x=k-1):y=k+1}return w}function u(g,p,v,y,x){for(var w=y-1;y<=x;){var k=y+x>>>1,b=g[k];(v!==void 0?v(b,p):b-p)<0?(w=k,y=k+1):x=k-1}return w}function d(g,p,v,y,x){for(var w=y-1;y<=x;){var k=y+x>>>1,b=g[k];(v!==void 0?v(b,p):b-p)<=0?(w=k,y=k+1):x=k-1}return w}function h(g,p,v,y,x){for(;y<=x;){var w=y+x>>>1,k=g[w],b=v!==void 0?v(k,p):k-p;if(b===0)return w;b<=0?y=w+1:x=w-1}return-1}function m(g,p,v,y,x,w){return typeof v=="function"?w(g,p,v,y===void 0?0:0|y,x===void 0?g.length-1:0|x):w(g,p,void 0,v===void 0?0:0|v,y===void 0?g.length-1:0|y)}l.exports={ge:function(g,p,v,y,x){return m(g,p,v,y,x,i)},gt:function(g,p,v,y,x){return m(g,p,v,y,x,s)},lt:function(g,p,v,y,x){return m(g,p,v,y,x,u)},le:function(g,p,v,y,x){return m(g,p,v,y,x,d)},eq:function(g,p,v,y,x){return m(g,p,v,y,x,h)}}},{}],32:[function(a,l,c){function i(u){var d=32;return(u&=-u)&&d--,65535&u&&(d-=16),16711935&u&&(d-=8),252645135&u&&(d-=4),858993459&u&&(d-=2),1431655765&u&&(d-=1),d}c.INT_BITS=32,c.INT_MAX=2147483647,c.INT_MIN=-1<<31,c.sign=function(u){return(u>0)-(u<0)},c.abs=function(u){var d=u>>31;return(u^d)-d},c.min=function(u,d){return d^(u^d)&-(u65535)<<4,d|=h=((u>>>=d)>255)<<3,d|=h=((u>>>=h)>15)<<2,(d|=h=((u>>>=h)>3)<<1)|(u>>>=h)>>1},c.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},c.popCount=function(u){return 16843009*((u=(858993459&(u-=u>>>1&1431655765))+(u>>>2&858993459))+(u>>>4)&252645135)>>>24},c.countTrailingZeros=i,c.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,(u|=u>>>16)+1},c.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,(u|=u>>>16)-(u>>>1)},c.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,27030>>>(u&=15)&1};var s=new Array(256);(function(u){for(var d=0;d<256;++d){var h=d,m=d,g=7;for(h>>>=1;h;h>>>=1)m<<=1,m|=1&h,--g;u[d]=m<>>8&255]<<16|s[u>>>16&255]<<8|s[u>>>24&255]},c.interleave2=function(u,d){return(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u&=65535)|u<<8))|u<<4))|u<<2))|u<<1))|(d=1431655765&((d=858993459&((d=252645135&((d=16711935&((d&=65535)|d<<8))|d<<4))|d<<2))|d<<1))<<1},c.deinterleave2=function(u,d){return(u=65535&((u=16711935&((u=252645135&((u=858993459&((u=u>>>d&1431655765)|u>>>1))|u>>>2))|u>>>4))|u>>>16))<<16>>16},c.interleave3=function(u,d,h){return u=1227133513&((u=3272356035&((u=251719695&((u=4278190335&((u&=1023)|u<<16))|u<<8))|u<<4))|u<<2),(u|=(d=1227133513&((d=3272356035&((d=251719695&((d=4278190335&((d&=1023)|d<<16))|d<<8))|d<<4))|d<<2))<<1)|(h=1227133513&((h=3272356035&((h=251719695&((h=4278190335&((h&=1023)|h<<16))|h<<8))|h<<4))|h<<2))<<2},c.deinterleave3=function(u,d){return(u=1023&((u=4278190335&((u=251719695&((u=3272356035&((u=u>>>d&1227133513)|u>>>2))|u>>>4))|u>>>8))|u>>>16))<<22>>22},c.nextCombination=function(u){var d=u|u-1;return d+1|(~d&-~d)-1>>>i(u)+1}},{}],33:[function(a,l,c){(function(i,s){function u(L,P){if(!L)throw new Error(P||"Assertion failed")}function d(L,P){L.super_=P;var N=function(){};N.prototype=P.prototype,L.prototype=new N,L.prototype.constructor=L}function h(L,P,N){if(h.isBN(L))return L;this.negative=0,this.words=null,this.length=0,this.red=null,L!==null&&(P!=="le"&&P!=="be"||(N=P,P=10),this._init(L||0,P||10,N||"be"))}var m;typeof i=="object"?i.exports=h:s.BN=h,h.BN=h,h.wordSize=26;try{m=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:a("buffer").Buffer}catch{}function g(L,P){var N=L.charCodeAt(P);return N>=65&&N<=70?N-55:N>=97&&N<=102?N-87:N-48&15}function p(L,P,N){var B=g(L,N);return N-1>=P&&(B|=g(L,N-1)<<4),B}function v(L,P,N,B){for(var G=0,W=Math.min(L.length,N),K=P;K=49?te-49+10:te>=17?te-17+10:te}return G}h.isBN=function(L){return L instanceof h||L!==null&&typeof L=="object"&&L.constructor.wordSize===h.wordSize&&Array.isArray(L.words)},h.max=function(L,P){return L.cmp(P)>0?L:P},h.min=function(L,P){return L.cmp(P)<0?L:P},h.prototype._init=function(L,P,N){if(typeof L=="number")return this._initNumber(L,P,N);if(typeof L=="object")return this._initArray(L,P,N);P==="hex"&&(P=16),u(P===(0|P)&&P>=2&&P<=36);var B=0;(L=L.toString().replace(/\s+/g,""))[0]==="-"&&(B++,this.negative=1),B=0;B-=3)W=L[B]|L[B-1]<<8|L[B-2]<<16,this.words[G]|=W<>>26-K&67108863,(K+=24)>=26&&(K-=26,G++);else if(N==="le")for(B=0,G=0;B>>26-K&67108863,(K+=24)>=26&&(K-=26,G++);return this.strip()},h.prototype._parseHex=function(L,P,N){this.length=Math.ceil((L.length-P)/6),this.words=new Array(this.length);for(var B=0;B=P;B-=2)G=p(L,P,B)<=18?(W-=18,K+=1,this.words[K]|=G>>>26):W+=8;else for(B=(L.length-P)%2==0?P+1:P;B=18?(W-=18,K+=1,this.words[K]|=G>>>26):W+=8;this.strip()},h.prototype._parseBase=function(L,P,N){this.words=[0],this.length=1;for(var B=0,G=1;G<=67108863;G*=P)B++;B--,G=G/P|0;for(var W=L.length-N,K=W%B,te=Math.min(W,W-K)+N,Y=0,Z=N;Z1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},h.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},h.prototype.inspect=function(){return(this.red?""};var y=["","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"],x=[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],w=[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];function k(L,P,N){N.negative=P.negative^L.negative;var B=L.length+P.length|0;N.length=B,B=B-1|0;var G=0|L.words[0],W=0|P.words[0],K=G*W,te=67108863&K,Y=K/67108864|0;N.words[0]=te;for(var Z=1;Z>>26,U=67108863&Y,q=Math.min(Z,P.length-1),$=Math.max(0,Z-L.length+1);$<=q;$++){var ne=Z-$|0;re+=(K=(G=0|L.words[ne])*(W=0|P.words[$])+U)/67108864|0,U=67108863&K}N.words[Z]=0|U,Y=0|re}return Y!==0?N.words[Z]=0|Y:N.length--,N.strip()}h.prototype.toString=function(L,P){var N;if(P=0|P||1,(L=L||10)===16||L==="hex"){N="";for(var B=0,G=0,W=0;W>>24-B&16777215)!==0||W!==this.length-1?y[6-te.length]+te+N:te+N,(B+=2)>=26&&(B-=26,W--)}for(G!==0&&(N=G.toString(16)+N);N.length%P!=0;)N="0"+N;return this.negative!==0&&(N="-"+N),N}if(L===(0|L)&&L>=2&&L<=36){var Y=x[L],Z=w[L];N="";var re=this.clone();for(re.negative=0;!re.isZero();){var U=re.modn(Z).toString(L);N=(re=re.idivn(Z)).isZero()?U+N:y[Y-U.length]+U+N}for(this.isZero()&&(N="0"+N);N.length%P!=0;)N="0"+N;return this.negative!==0&&(N="-"+N),N}u(!1,"Base should be between 2 and 36")},h.prototype.toNumber=function(){var L=this.words[0];return this.length===2?L+=67108864*this.words[1]:this.length===3&&this.words[2]===1?L+=4503599627370496+67108864*this.words[1]:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-L:L},h.prototype.toJSON=function(){return this.toString(16)},h.prototype.toBuffer=function(L,P){return u(m!==void 0),this.toArrayLike(m,L,P)},h.prototype.toArray=function(L,P){return this.toArrayLike(Array,L,P)},h.prototype.toArrayLike=function(L,P,N){var B=this.byteLength(),G=N||Math.max(1,B);u(B<=G,"byte array longer than desired length"),u(G>0,"Requested array length <= 0"),this.strip();var W,K,te=P==="le",Y=new L(G),Z=this.clone();if(te){for(K=0;!Z.isZero();K++)W=Z.andln(255),Z.iushrn(8),Y[K]=W;for(;K=4096&&(N+=13,P>>>=13),P>=64&&(N+=7,P>>>=7),P>=8&&(N+=4,P>>>=4),P>=2&&(N+=2,P>>>=2),N+P},h.prototype._zeroBits=function(L){if(L===0)return 26;var P=L,N=0;return(8191&P)==0&&(N+=13,P>>>=13),(127&P)==0&&(N+=7,P>>>=7),(15&P)==0&&(N+=4,P>>>=4),(3&P)==0&&(N+=2,P>>>=2),(1&P)==0&&N++,N},h.prototype.bitLength=function(){var L=this.words[this.length-1],P=this._countBits(L);return 26*(this.length-1)+P},h.prototype.zeroBits=function(){if(this.isZero())return 0;for(var L=0,P=0;PL.length?this.clone().ior(L):L.clone().ior(this)},h.prototype.uor=function(L){return this.length>L.length?this.clone().iuor(L):L.clone().iuor(this)},h.prototype.iuand=function(L){var P;P=this.length>L.length?L:this;for(var N=0;NL.length?this.clone().iand(L):L.clone().iand(this)},h.prototype.uand=function(L){return this.length>L.length?this.clone().iuand(L):L.clone().iuand(this)},h.prototype.iuxor=function(L){var P,N;this.length>L.length?(P=this,N=L):(P=L,N=this);for(var B=0;BL.length?this.clone().ixor(L):L.clone().ixor(this)},h.prototype.uxor=function(L){return this.length>L.length?this.clone().iuxor(L):L.clone().iuxor(this)},h.prototype.inotn=function(L){u(typeof L=="number"&&L>=0);var P=0|Math.ceil(L/26),N=L%26;this._expand(P),N>0&&P--;for(var B=0;B0&&(this.words[B]=~this.words[B]&67108863>>26-N),this.strip()},h.prototype.notn=function(L){return this.clone().inotn(L)},h.prototype.setn=function(L,P){u(typeof L=="number"&&L>=0);var N=L/26|0,B=L%26;return this._expand(N+1),this.words[N]=P?this.words[N]|1<L.length?(N=this,B=L):(N=L,B=this);for(var G=0,W=0;W>>26;for(;G!==0&&W>>26;if(this.length=N.length,G!==0)this.words[this.length]=G,this.length++;else if(N!==this)for(;WL.length?this.clone().iadd(L):L.clone().iadd(this)},h.prototype.isub=function(L){if(L.negative!==0){L.negative=0;var P=this.iadd(L);return L.negative=1,P._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(L),this.negative=1,this._normSign();var N,B,G=this.cmp(L);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;G>0?(N=this,B=L):(N=L,B=this);for(var W=0,K=0;K>26,this.words[K]=67108863&P;for(;W!==0&&K>26,this.words[K]=67108863&P;if(W===0&&K>>13,$=0|K[1],ne=8191&$,H=$>>>13,Q=0|K[2],ee=8191&Q,ie=Q>>>13,ae=0|K[3],ue=8191&ae,le=ae>>>13,ge=0|K[4],fe=8191&ge,me=ge>>>13,_e=0|K[5],we=8191&_e,Te=_e>>>13,Oe=0|K[6],de=8191&Oe,ye=Oe>>>13,Me=0|K[7],ke=8191&Me,Ee=Me>>>13,ze=0|K[8],Fe=8191&ze,Ve=ze>>>13,Ke=0|K[9],Re=8191&Ke,qe=Ke>>>13,We=0|te[0],Ye=8191&We,nt=We>>>13,ft=0|te[1],vt=8191&ft,Pt=ft>>>13,At=0|te[2],at=8191&At,et=At>>>13,Ot=0|te[3],Wt=8191&Ot,Jt=Ot>>>13,Be=0|te[4],Ge=8191&Be,Tt=Be>>>13,dt=0|te[5],Pe=8191&dt,Ie=dt>>>13,Ae=0|te[6],De=8191&Ae,He=Ae>>>13,rt=0|te[7],lt=8191&rt,ot=rt>>>13,kt=0|te[8],wt=8191&kt,Vt=kt>>>13,Ut=0|te[9],tt=8191&Ut,bt=Ut>>>13;N.negative=L.negative^P.negative,N.length=19;var zt=(Z+(B=Math.imul(U,Ye))|0)+((8191&(G=(G=Math.imul(U,nt))+Math.imul(q,Ye)|0))<<13)|0;Z=((W=Math.imul(q,nt))+(G>>>13)|0)+(zt>>>26)|0,zt&=67108863,B=Math.imul(ne,Ye),G=(G=Math.imul(ne,nt))+Math.imul(H,Ye)|0,W=Math.imul(H,nt);var St=(Z+(B=B+Math.imul(U,vt)|0)|0)+((8191&(G=(G=G+Math.imul(U,Pt)|0)+Math.imul(q,vt)|0))<<13)|0;Z=((W=W+Math.imul(q,Pt)|0)+(G>>>13)|0)+(St>>>26)|0,St&=67108863,B=Math.imul(ee,Ye),G=(G=Math.imul(ee,nt))+Math.imul(ie,Ye)|0,W=Math.imul(ie,nt),B=B+Math.imul(ne,vt)|0,G=(G=G+Math.imul(ne,Pt)|0)+Math.imul(H,vt)|0,W=W+Math.imul(H,Pt)|0;var Dt=(Z+(B=B+Math.imul(U,at)|0)|0)+((8191&(G=(G=G+Math.imul(U,et)|0)+Math.imul(q,at)|0))<<13)|0;Z=((W=W+Math.imul(q,et)|0)+(G>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,B=Math.imul(ue,Ye),G=(G=Math.imul(ue,nt))+Math.imul(le,Ye)|0,W=Math.imul(le,nt),B=B+Math.imul(ee,vt)|0,G=(G=G+Math.imul(ee,Pt)|0)+Math.imul(ie,vt)|0,W=W+Math.imul(ie,Pt)|0,B=B+Math.imul(ne,at)|0,G=(G=G+Math.imul(ne,et)|0)+Math.imul(H,at)|0,W=W+Math.imul(H,et)|0;var Le=(Z+(B=B+Math.imul(U,Wt)|0)|0)+((8191&(G=(G=G+Math.imul(U,Jt)|0)+Math.imul(q,Wt)|0))<<13)|0;Z=((W=W+Math.imul(q,Jt)|0)+(G>>>13)|0)+(Le>>>26)|0,Le&=67108863,B=Math.imul(fe,Ye),G=(G=Math.imul(fe,nt))+Math.imul(me,Ye)|0,W=Math.imul(me,nt),B=B+Math.imul(ue,vt)|0,G=(G=G+Math.imul(ue,Pt)|0)+Math.imul(le,vt)|0,W=W+Math.imul(le,Pt)|0,B=B+Math.imul(ee,at)|0,G=(G=G+Math.imul(ee,et)|0)+Math.imul(ie,at)|0,W=W+Math.imul(ie,et)|0,B=B+Math.imul(ne,Wt)|0,G=(G=G+Math.imul(ne,Jt)|0)+Math.imul(H,Wt)|0,W=W+Math.imul(H,Jt)|0;var Je=(Z+(B=B+Math.imul(U,Ge)|0)|0)+((8191&(G=(G=G+Math.imul(U,Tt)|0)+Math.imul(q,Ge)|0))<<13)|0;Z=((W=W+Math.imul(q,Tt)|0)+(G>>>13)|0)+(Je>>>26)|0,Je&=67108863,B=Math.imul(we,Ye),G=(G=Math.imul(we,nt))+Math.imul(Te,Ye)|0,W=Math.imul(Te,nt),B=B+Math.imul(fe,vt)|0,G=(G=G+Math.imul(fe,Pt)|0)+Math.imul(me,vt)|0,W=W+Math.imul(me,Pt)|0,B=B+Math.imul(ue,at)|0,G=(G=G+Math.imul(ue,et)|0)+Math.imul(le,at)|0,W=W+Math.imul(le,et)|0,B=B+Math.imul(ee,Wt)|0,G=(G=G+Math.imul(ee,Jt)|0)+Math.imul(ie,Wt)|0,W=W+Math.imul(ie,Jt)|0,B=B+Math.imul(ne,Ge)|0,G=(G=G+Math.imul(ne,Tt)|0)+Math.imul(H,Ge)|0,W=W+Math.imul(H,Tt)|0;var st=(Z+(B=B+Math.imul(U,Pe)|0)|0)+((8191&(G=(G=G+Math.imul(U,Ie)|0)+Math.imul(q,Pe)|0))<<13)|0;Z=((W=W+Math.imul(q,Ie)|0)+(G>>>13)|0)+(st>>>26)|0,st&=67108863,B=Math.imul(de,Ye),G=(G=Math.imul(de,nt))+Math.imul(ye,Ye)|0,W=Math.imul(ye,nt),B=B+Math.imul(we,vt)|0,G=(G=G+Math.imul(we,Pt)|0)+Math.imul(Te,vt)|0,W=W+Math.imul(Te,Pt)|0,B=B+Math.imul(fe,at)|0,G=(G=G+Math.imul(fe,et)|0)+Math.imul(me,at)|0,W=W+Math.imul(me,et)|0,B=B+Math.imul(ue,Wt)|0,G=(G=G+Math.imul(ue,Jt)|0)+Math.imul(le,Wt)|0,W=W+Math.imul(le,Jt)|0,B=B+Math.imul(ee,Ge)|0,G=(G=G+Math.imul(ee,Tt)|0)+Math.imul(ie,Ge)|0,W=W+Math.imul(ie,Tt)|0,B=B+Math.imul(ne,Pe)|0,G=(G=G+Math.imul(ne,Ie)|0)+Math.imul(H,Pe)|0,W=W+Math.imul(H,Ie)|0;var Et=(Z+(B=B+Math.imul(U,De)|0)|0)+((8191&(G=(G=G+Math.imul(U,He)|0)+Math.imul(q,De)|0))<<13)|0;Z=((W=W+Math.imul(q,He)|0)+(G>>>13)|0)+(Et>>>26)|0,Et&=67108863,B=Math.imul(ke,Ye),G=(G=Math.imul(ke,nt))+Math.imul(Ee,Ye)|0,W=Math.imul(Ee,nt),B=B+Math.imul(de,vt)|0,G=(G=G+Math.imul(de,Pt)|0)+Math.imul(ye,vt)|0,W=W+Math.imul(ye,Pt)|0,B=B+Math.imul(we,at)|0,G=(G=G+Math.imul(we,et)|0)+Math.imul(Te,at)|0,W=W+Math.imul(Te,et)|0,B=B+Math.imul(fe,Wt)|0,G=(G=G+Math.imul(fe,Jt)|0)+Math.imul(me,Wt)|0,W=W+Math.imul(me,Jt)|0,B=B+Math.imul(ue,Ge)|0,G=(G=G+Math.imul(ue,Tt)|0)+Math.imul(le,Ge)|0,W=W+Math.imul(le,Tt)|0,B=B+Math.imul(ee,Pe)|0,G=(G=G+Math.imul(ee,Ie)|0)+Math.imul(ie,Pe)|0,W=W+Math.imul(ie,Ie)|0,B=B+Math.imul(ne,De)|0,G=(G=G+Math.imul(ne,He)|0)+Math.imul(H,De)|0,W=W+Math.imul(H,He)|0;var It=(Z+(B=B+Math.imul(U,lt)|0)|0)+((8191&(G=(G=G+Math.imul(U,ot)|0)+Math.imul(q,lt)|0))<<13)|0;Z=((W=W+Math.imul(q,ot)|0)+(G>>>13)|0)+(It>>>26)|0,It&=67108863,B=Math.imul(Fe,Ye),G=(G=Math.imul(Fe,nt))+Math.imul(Ve,Ye)|0,W=Math.imul(Ve,nt),B=B+Math.imul(ke,vt)|0,G=(G=G+Math.imul(ke,Pt)|0)+Math.imul(Ee,vt)|0,W=W+Math.imul(Ee,Pt)|0,B=B+Math.imul(de,at)|0,G=(G=G+Math.imul(de,et)|0)+Math.imul(ye,at)|0,W=W+Math.imul(ye,et)|0,B=B+Math.imul(we,Wt)|0,G=(G=G+Math.imul(we,Jt)|0)+Math.imul(Te,Wt)|0,W=W+Math.imul(Te,Jt)|0,B=B+Math.imul(fe,Ge)|0,G=(G=G+Math.imul(fe,Tt)|0)+Math.imul(me,Ge)|0,W=W+Math.imul(me,Tt)|0,B=B+Math.imul(ue,Pe)|0,G=(G=G+Math.imul(ue,Ie)|0)+Math.imul(le,Pe)|0,W=W+Math.imul(le,Ie)|0,B=B+Math.imul(ee,De)|0,G=(G=G+Math.imul(ee,He)|0)+Math.imul(ie,De)|0,W=W+Math.imul(ie,He)|0,B=B+Math.imul(ne,lt)|0,G=(G=G+Math.imul(ne,ot)|0)+Math.imul(H,lt)|0,W=W+Math.imul(H,ot)|0;var Zt=(Z+(B=B+Math.imul(U,wt)|0)|0)+((8191&(G=(G=G+Math.imul(U,Vt)|0)+Math.imul(q,wt)|0))<<13)|0;Z=((W=W+Math.imul(q,Vt)|0)+(G>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,B=Math.imul(Re,Ye),G=(G=Math.imul(Re,nt))+Math.imul(qe,Ye)|0,W=Math.imul(qe,nt),B=B+Math.imul(Fe,vt)|0,G=(G=G+Math.imul(Fe,Pt)|0)+Math.imul(Ve,vt)|0,W=W+Math.imul(Ve,Pt)|0,B=B+Math.imul(ke,at)|0,G=(G=G+Math.imul(ke,et)|0)+Math.imul(Ee,at)|0,W=W+Math.imul(Ee,et)|0,B=B+Math.imul(de,Wt)|0,G=(G=G+Math.imul(de,Jt)|0)+Math.imul(ye,Wt)|0,W=W+Math.imul(ye,Jt)|0,B=B+Math.imul(we,Ge)|0,G=(G=G+Math.imul(we,Tt)|0)+Math.imul(Te,Ge)|0,W=W+Math.imul(Te,Tt)|0,B=B+Math.imul(fe,Pe)|0,G=(G=G+Math.imul(fe,Ie)|0)+Math.imul(me,Pe)|0,W=W+Math.imul(me,Ie)|0,B=B+Math.imul(ue,De)|0,G=(G=G+Math.imul(ue,He)|0)+Math.imul(le,De)|0,W=W+Math.imul(le,He)|0,B=B+Math.imul(ee,lt)|0,G=(G=G+Math.imul(ee,ot)|0)+Math.imul(ie,lt)|0,W=W+Math.imul(ie,ot)|0,B=B+Math.imul(ne,wt)|0,G=(G=G+Math.imul(ne,Vt)|0)+Math.imul(H,wt)|0,W=W+Math.imul(H,Vt)|0;var Kt=(Z+(B=B+Math.imul(U,tt)|0)|0)+((8191&(G=(G=G+Math.imul(U,bt)|0)+Math.imul(q,tt)|0))<<13)|0;Z=((W=W+Math.imul(q,bt)|0)+(G>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,B=Math.imul(Re,vt),G=(G=Math.imul(Re,Pt))+Math.imul(qe,vt)|0,W=Math.imul(qe,Pt),B=B+Math.imul(Fe,at)|0,G=(G=G+Math.imul(Fe,et)|0)+Math.imul(Ve,at)|0,W=W+Math.imul(Ve,et)|0,B=B+Math.imul(ke,Wt)|0,G=(G=G+Math.imul(ke,Jt)|0)+Math.imul(Ee,Wt)|0,W=W+Math.imul(Ee,Jt)|0,B=B+Math.imul(de,Ge)|0,G=(G=G+Math.imul(de,Tt)|0)+Math.imul(ye,Ge)|0,W=W+Math.imul(ye,Tt)|0,B=B+Math.imul(we,Pe)|0,G=(G=G+Math.imul(we,Ie)|0)+Math.imul(Te,Pe)|0,W=W+Math.imul(Te,Ie)|0,B=B+Math.imul(fe,De)|0,G=(G=G+Math.imul(fe,He)|0)+Math.imul(me,De)|0,W=W+Math.imul(me,He)|0,B=B+Math.imul(ue,lt)|0,G=(G=G+Math.imul(ue,ot)|0)+Math.imul(le,lt)|0,W=W+Math.imul(le,ot)|0,B=B+Math.imul(ee,wt)|0,G=(G=G+Math.imul(ee,Vt)|0)+Math.imul(ie,wt)|0,W=W+Math.imul(ie,Vt)|0;var Ht=(Z+(B=B+Math.imul(ne,tt)|0)|0)+((8191&(G=(G=G+Math.imul(ne,bt)|0)+Math.imul(H,tt)|0))<<13)|0;Z=((W=W+Math.imul(H,bt)|0)+(G>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,B=Math.imul(Re,at),G=(G=Math.imul(Re,et))+Math.imul(qe,at)|0,W=Math.imul(qe,et),B=B+Math.imul(Fe,Wt)|0,G=(G=G+Math.imul(Fe,Jt)|0)+Math.imul(Ve,Wt)|0,W=W+Math.imul(Ve,Jt)|0,B=B+Math.imul(ke,Ge)|0,G=(G=G+Math.imul(ke,Tt)|0)+Math.imul(Ee,Ge)|0,W=W+Math.imul(Ee,Tt)|0,B=B+Math.imul(de,Pe)|0,G=(G=G+Math.imul(de,Ie)|0)+Math.imul(ye,Pe)|0,W=W+Math.imul(ye,Ie)|0,B=B+Math.imul(we,De)|0,G=(G=G+Math.imul(we,He)|0)+Math.imul(Te,De)|0,W=W+Math.imul(Te,He)|0,B=B+Math.imul(fe,lt)|0,G=(G=G+Math.imul(fe,ot)|0)+Math.imul(me,lt)|0,W=W+Math.imul(me,ot)|0,B=B+Math.imul(ue,wt)|0,G=(G=G+Math.imul(ue,Vt)|0)+Math.imul(le,wt)|0,W=W+Math.imul(le,Vt)|0;var mn=(Z+(B=B+Math.imul(ee,tt)|0)|0)+((8191&(G=(G=G+Math.imul(ee,bt)|0)+Math.imul(ie,tt)|0))<<13)|0;Z=((W=W+Math.imul(ie,bt)|0)+(G>>>13)|0)+(mn>>>26)|0,mn&=67108863,B=Math.imul(Re,Wt),G=(G=Math.imul(Re,Jt))+Math.imul(qe,Wt)|0,W=Math.imul(qe,Jt),B=B+Math.imul(Fe,Ge)|0,G=(G=G+Math.imul(Fe,Tt)|0)+Math.imul(Ve,Ge)|0,W=W+Math.imul(Ve,Tt)|0,B=B+Math.imul(ke,Pe)|0,G=(G=G+Math.imul(ke,Ie)|0)+Math.imul(Ee,Pe)|0,W=W+Math.imul(Ee,Ie)|0,B=B+Math.imul(de,De)|0,G=(G=G+Math.imul(de,He)|0)+Math.imul(ye,De)|0,W=W+Math.imul(ye,He)|0,B=B+Math.imul(we,lt)|0,G=(G=G+Math.imul(we,ot)|0)+Math.imul(Te,lt)|0,W=W+Math.imul(Te,ot)|0,B=B+Math.imul(fe,wt)|0,G=(G=G+Math.imul(fe,Vt)|0)+Math.imul(me,wt)|0,W=W+Math.imul(me,Vt)|0;var zn=(Z+(B=B+Math.imul(ue,tt)|0)|0)+((8191&(G=(G=G+Math.imul(ue,bt)|0)+Math.imul(le,tt)|0))<<13)|0;Z=((W=W+Math.imul(le,bt)|0)+(G>>>13)|0)+(zn>>>26)|0,zn&=67108863,B=Math.imul(Re,Ge),G=(G=Math.imul(Re,Tt))+Math.imul(qe,Ge)|0,W=Math.imul(qe,Tt),B=B+Math.imul(Fe,Pe)|0,G=(G=G+Math.imul(Fe,Ie)|0)+Math.imul(Ve,Pe)|0,W=W+Math.imul(Ve,Ie)|0,B=B+Math.imul(ke,De)|0,G=(G=G+Math.imul(ke,He)|0)+Math.imul(Ee,De)|0,W=W+Math.imul(Ee,He)|0,B=B+Math.imul(de,lt)|0,G=(G=G+Math.imul(de,ot)|0)+Math.imul(ye,lt)|0,W=W+Math.imul(ye,ot)|0,B=B+Math.imul(we,wt)|0,G=(G=G+Math.imul(we,Vt)|0)+Math.imul(Te,wt)|0,W=W+Math.imul(Te,Vt)|0;var pn=(Z+(B=B+Math.imul(fe,tt)|0)|0)+((8191&(G=(G=G+Math.imul(fe,bt)|0)+Math.imul(me,tt)|0))<<13)|0;Z=((W=W+Math.imul(me,bt)|0)+(G>>>13)|0)+(pn>>>26)|0,pn&=67108863,B=Math.imul(Re,Pe),G=(G=Math.imul(Re,Ie))+Math.imul(qe,Pe)|0,W=Math.imul(qe,Ie),B=B+Math.imul(Fe,De)|0,G=(G=G+Math.imul(Fe,He)|0)+Math.imul(Ve,De)|0,W=W+Math.imul(Ve,He)|0,B=B+Math.imul(ke,lt)|0,G=(G=G+Math.imul(ke,ot)|0)+Math.imul(Ee,lt)|0,W=W+Math.imul(Ee,ot)|0,B=B+Math.imul(de,wt)|0,G=(G=G+Math.imul(de,Vt)|0)+Math.imul(ye,wt)|0,W=W+Math.imul(ye,Vt)|0;var tn=(Z+(B=B+Math.imul(we,tt)|0)|0)+((8191&(G=(G=G+Math.imul(we,bt)|0)+Math.imul(Te,tt)|0))<<13)|0;Z=((W=W+Math.imul(Te,bt)|0)+(G>>>13)|0)+(tn>>>26)|0,tn&=67108863,B=Math.imul(Re,De),G=(G=Math.imul(Re,He))+Math.imul(qe,De)|0,W=Math.imul(qe,He),B=B+Math.imul(Fe,lt)|0,G=(G=G+Math.imul(Fe,ot)|0)+Math.imul(Ve,lt)|0,W=W+Math.imul(Ve,ot)|0,B=B+Math.imul(ke,wt)|0,G=(G=G+Math.imul(ke,Vt)|0)+Math.imul(Ee,wt)|0,W=W+Math.imul(Ee,Vt)|0;var nn=(Z+(B=B+Math.imul(de,tt)|0)|0)+((8191&(G=(G=G+Math.imul(de,bt)|0)+Math.imul(ye,tt)|0))<<13)|0;Z=((W=W+Math.imul(ye,bt)|0)+(G>>>13)|0)+(nn>>>26)|0,nn&=67108863,B=Math.imul(Re,lt),G=(G=Math.imul(Re,ot))+Math.imul(qe,lt)|0,W=Math.imul(qe,ot),B=B+Math.imul(Fe,wt)|0,G=(G=G+Math.imul(Fe,Vt)|0)+Math.imul(Ve,wt)|0,W=W+Math.imul(Ve,Vt)|0;var sn=(Z+(B=B+Math.imul(ke,tt)|0)|0)+((8191&(G=(G=G+Math.imul(ke,bt)|0)+Math.imul(Ee,tt)|0))<<13)|0;Z=((W=W+Math.imul(Ee,bt)|0)+(G>>>13)|0)+(sn>>>26)|0,sn&=67108863,B=Math.imul(Re,wt),G=(G=Math.imul(Re,Vt))+Math.imul(qe,wt)|0,W=Math.imul(qe,Vt);var gn=(Z+(B=B+Math.imul(Fe,tt)|0)|0)+((8191&(G=(G=G+Math.imul(Fe,bt)|0)+Math.imul(Ve,tt)|0))<<13)|0;Z=((W=W+Math.imul(Ve,bt)|0)+(G>>>13)|0)+(gn>>>26)|0,gn&=67108863;var bn=(Z+(B=Math.imul(Re,tt))|0)+((8191&(G=(G=Math.imul(Re,bt))+Math.imul(qe,tt)|0))<<13)|0;return Z=((W=Math.imul(qe,bt))+(G>>>13)|0)+(bn>>>26)|0,bn&=67108863,Y[0]=zt,Y[1]=St,Y[2]=Dt,Y[3]=Le,Y[4]=Je,Y[5]=st,Y[6]=Et,Y[7]=It,Y[8]=Zt,Y[9]=Kt,Y[10]=Ht,Y[11]=mn,Y[12]=zn,Y[13]=pn,Y[14]=tn,Y[15]=nn,Y[16]=sn,Y[17]=gn,Y[18]=bn,Z!==0&&(Y[19]=Z,N.length++),N};function T(L,P,N){return new _().mulp(L,P,N)}function _(L,P){this.x=L,this.y=P}Math.imul||(b=k),h.prototype.mulTo=function(L,P){var N=this.length+L.length;return this.length===10&&L.length===10?b(this,L,P):N<63?k(this,L,P):N<1024?function(B,G,W){W.negative=G.negative^B.negative,W.length=B.length+G.length;for(var K=0,te=0,Y=0;Y>>26)|0)>>>26,Z&=67108863}W.words[Y]=re,K=Z,Z=te}return K!==0?W.words[Y]=K:W.length--,W.strip()}(this,L,P):T(this,L,P)},_.prototype.makeRBT=function(L){for(var P=new Array(L),N=h.prototype._countBits(L)-1,B=0;B>=1;return B},_.prototype.permute=function(L,P,N,B,G,W){for(var K=0;K>>=1)G++;return 1<>>=13,N[2*W+1]=8191&G,G>>>=13;for(W=2*P;W>=26,P+=B/67108864|0,P+=G>>>26,this.words[N]=67108863&G}return P!==0&&(this.words[N]=P,this.length++),this},h.prototype.muln=function(L){return this.clone().imuln(L)},h.prototype.sqr=function(){return this.mul(this)},h.prototype.isqr=function(){return this.imul(this.clone())},h.prototype.pow=function(L){var P=function(W){for(var K=new Array(W.bitLength()),te=0;te>>Z}return K}(L);if(P.length===0)return new h(1);for(var N=this,B=0;B=0);var P,N=L%26,B=(L-N)/26,G=67108863>>>26-N<<26-N;if(N!==0){var W=0;for(P=0;P>>26-N}W&&(this.words[P]=W,this.length++)}if(B!==0){for(P=this.length-1;P>=0;P--)this.words[P+B]=this.words[P];for(P=0;P=0),B=P?(P-P%26)/26:0;var G=L%26,W=Math.min((L-G)/26,this.length),K=67108863^67108863>>>G<W)for(this.length-=W,Y=0;Y=0&&(Z!==0||Y>=B);Y--){var re=0|this.words[Y];this.words[Y]=Z<<26-G|re>>>G,Z=re&K}return te&&Z!==0&&(te.words[te.length++]=Z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},h.prototype.ishrn=function(L,P,N){return u(this.negative===0),this.iushrn(L,P,N)},h.prototype.shln=function(L){return this.clone().ishln(L)},h.prototype.ushln=function(L){return this.clone().iushln(L)},h.prototype.shrn=function(L){return this.clone().ishrn(L)},h.prototype.ushrn=function(L){return this.clone().iushrn(L)},h.prototype.testn=function(L){u(typeof L=="number"&&L>=0);var P=L%26,N=(L-P)/26,B=1<=0);var P=L%26,N=(L-P)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=N)return this;if(P!==0&&N++,this.length=Math.min(N,this.length),P!==0){var B=67108863^67108863>>>P<=67108864;P++)this.words[P]-=67108864,P===this.length-1?this.words[P+1]=1:this.words[P+1]++;return this.length=Math.max(this.length,P+1),this},h.prototype.isubn=function(L){if(u(typeof L=="number"),u(L<67108864),L<0)return this.iaddn(-L);if(this.negative!==0)return this.negative=0,this.iaddn(L),this.negative=1,this;if(this.words[0]-=L,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var P=0;P>26)-(te/67108864|0),this.words[B+N]=67108863&G}for(;B>26,this.words[B+N]=67108863&G;if(K===0)return this.strip();for(u(K===-1),K=0,B=0;B>26,this.words[B]=67108863&G;return this.negative=1,this.strip()},h.prototype._wordDiv=function(L,P){var N=(this.length,L.length),B=this.clone(),G=L,W=0|G.words[G.length-1];(N=26-this._countBits(W))!==0&&(G=G.ushln(N),B.iushln(N),W=0|G.words[G.length-1]);var K,te=B.length-G.length;if(P!=="mod"){(K=new h(null)).length=te+1,K.words=new Array(K.length);for(var Y=0;Y=0;re--){var U=67108864*(0|B.words[G.length+re])+(0|B.words[G.length+re-1]);for(U=Math.min(U/W|0,67108863),B._ishlnsubmul(G,U,re);B.negative!==0;)U--,B.negative=0,B._ishlnsubmul(G,1,re),B.isZero()||(B.negative^=1);K&&(K.words[re]=U)}return K&&K.strip(),B.strip(),P!=="div"&&N!==0&&B.iushrn(N),{div:K||null,mod:B}},h.prototype.divmod=function(L,P,N){return u(!L.isZero()),this.isZero()?{div:new h(0),mod:new h(0)}:this.negative!==0&&L.negative===0?(W=this.neg().divmod(L,P),P!=="mod"&&(B=W.div.neg()),P!=="div"&&(G=W.mod.neg(),N&&G.negative!==0&&G.iadd(L)),{div:B,mod:G}):this.negative===0&&L.negative!==0?(W=this.divmod(L.neg(),P),P!=="mod"&&(B=W.div.neg()),{div:B,mod:W.mod}):(this.negative&L.negative)!=0?(W=this.neg().divmod(L.neg(),P),P!=="div"&&(G=W.mod.neg(),N&&G.negative!==0&&G.isub(L)),{div:W.div,mod:G}):L.length>this.length||this.cmp(L)<0?{div:new h(0),mod:this}:L.length===1?P==="div"?{div:this.divn(L.words[0]),mod:null}:P==="mod"?{div:null,mod:new h(this.modn(L.words[0]))}:{div:this.divn(L.words[0]),mod:new h(this.modn(L.words[0]))}:this._wordDiv(L,P);var B,G,W},h.prototype.div=function(L){return this.divmod(L,"div",!1).div},h.prototype.mod=function(L){return this.divmod(L,"mod",!1).mod},h.prototype.umod=function(L){return this.divmod(L,"mod",!0).mod},h.prototype.divRound=function(L){var P=this.divmod(L);if(P.mod.isZero())return P.div;var N=P.div.negative!==0?P.mod.isub(L):P.mod,B=L.ushrn(1),G=L.andln(1),W=N.cmp(B);return W<0||G===1&&W===0?P.div:P.div.negative!==0?P.div.isubn(1):P.div.iaddn(1)},h.prototype.modn=function(L){u(L<=67108863);for(var P=(1<<26)%L,N=0,B=this.length-1;B>=0;B--)N=(P*N+(0|this.words[B]))%L;return N},h.prototype.idivn=function(L){u(L<=67108863);for(var P=0,N=this.length-1;N>=0;N--){var B=(0|this.words[N])+67108864*P;this.words[N]=B/L|0,P=B%L}return this.strip()},h.prototype.divn=function(L){return this.clone().idivn(L)},h.prototype.egcd=function(L){u(L.negative===0),u(!L.isZero());var P=this,N=L.clone();P=P.negative!==0?P.umod(L):P.clone();for(var B=new h(1),G=new h(0),W=new h(0),K=new h(1),te=0;P.isEven()&&N.isEven();)P.iushrn(1),N.iushrn(1),++te;for(var Y=N.clone(),Z=P.clone();!P.isZero();){for(var re=0,U=1;(P.words[0]&U)==0&&re<26;++re,U<<=1);if(re>0)for(P.iushrn(re);re-- >0;)(B.isOdd()||G.isOdd())&&(B.iadd(Y),G.isub(Z)),B.iushrn(1),G.iushrn(1);for(var q=0,$=1;(N.words[0]&$)==0&&q<26;++q,$<<=1);if(q>0)for(N.iushrn(q);q-- >0;)(W.isOdd()||K.isOdd())&&(W.iadd(Y),K.isub(Z)),W.iushrn(1),K.iushrn(1);P.cmp(N)>=0?(P.isub(N),B.isub(W),G.isub(K)):(N.isub(P),W.isub(B),K.isub(G))}return{a:W,b:K,gcd:N.iushln(te)}},h.prototype._invmp=function(L){u(L.negative===0),u(!L.isZero());var P=this,N=L.clone();P=P.negative!==0?P.umod(L):P.clone();for(var B,G=new h(1),W=new h(0),K=N.clone();P.cmpn(1)>0&&N.cmpn(1)>0;){for(var te=0,Y=1;(P.words[0]&Y)==0&&te<26;++te,Y<<=1);if(te>0)for(P.iushrn(te);te-- >0;)G.isOdd()&&G.iadd(K),G.iushrn(1);for(var Z=0,re=1;(N.words[0]&re)==0&&Z<26;++Z,re<<=1);if(Z>0)for(N.iushrn(Z);Z-- >0;)W.isOdd()&&W.iadd(K),W.iushrn(1);P.cmp(N)>=0?(P.isub(N),G.isub(W)):(N.isub(P),W.isub(G))}return(B=P.cmpn(1)===0?G:W).cmpn(0)<0&&B.iadd(L),B},h.prototype.gcd=function(L){if(this.isZero())return L.abs();if(L.isZero())return this.abs();var P=this.clone(),N=L.clone();P.negative=0,N.negative=0;for(var B=0;P.isEven()&&N.isEven();B++)P.iushrn(1),N.iushrn(1);for(;;){for(;P.isEven();)P.iushrn(1);for(;N.isEven();)N.iushrn(1);var G=P.cmp(N);if(G<0){var W=P;P=N,N=W}else if(G===0||N.cmpn(1)===0)break;P.isub(N)}return N.iushln(B)},h.prototype.invm=function(L){return this.egcd(L).a.umod(L)},h.prototype.isEven=function(){return(1&this.words[0])==0},h.prototype.isOdd=function(){return(1&this.words[0])==1},h.prototype.andln=function(L){return this.words[0]&L},h.prototype.bincn=function(L){u(typeof L=="number");var P=L%26,N=(L-P)/26,B=1<>>26,K&=67108863,this.words[W]=K}return G!==0&&(this.words[W]=G,this.length++),this},h.prototype.isZero=function(){return this.length===1&&this.words[0]===0},h.prototype.cmpn=function(L){var P,N=L<0;if(this.negative!==0&&!N)return-1;if(this.negative===0&&N)return 1;if(this.strip(),this.length>1)P=1;else{N&&(L=-L),u(L<=67108863,"Number is too big");var B=0|this.words[0];P=B===L?0:BL.length)return 1;if(this.length=0;N--){var B=0|this.words[N],G=0|L.words[N];if(B!==G){BG&&(P=1);break}}return P},h.prototype.gtn=function(L){return this.cmpn(L)===1},h.prototype.gt=function(L){return this.cmp(L)===1},h.prototype.gten=function(L){return this.cmpn(L)>=0},h.prototype.gte=function(L){return this.cmp(L)>=0},h.prototype.ltn=function(L){return this.cmpn(L)===-1},h.prototype.lt=function(L){return this.cmp(L)===-1},h.prototype.lten=function(L){return this.cmpn(L)<=0},h.prototype.lte=function(L){return this.cmp(L)<=0},h.prototype.eqn=function(L){return this.cmpn(L)===0},h.prototype.eq=function(L){return this.cmp(L)===0},h.red=function(L){return new R(L)},h.prototype.toRed=function(L){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),L.convertTo(this)._forceRed(L)},h.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},h.prototype._forceRed=function(L){return this.red=L,this},h.prototype.forceRed=function(L){return u(!this.red,"Already a number in reduction context"),this._forceRed(L)},h.prototype.redAdd=function(L){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,L)},h.prototype.redIAdd=function(L){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,L)},h.prototype.redSub=function(L){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,L)},h.prototype.redISub=function(L){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,L)},h.prototype.redShl=function(L){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,L)},h.prototype.redMul=function(L){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.mul(this,L)},h.prototype.redIMul=function(L){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.imul(this,L)},h.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},h.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},h.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},h.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},h.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},h.prototype.redPow=function(L){return u(this.red&&!L.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,L)};var S={k256:null,p224:null,p192:null,p25519:null};function A(L,P){this.name=L,this.p=new h(P,16),this.n=this.p.bitLength(),this.k=new h(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function M(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function D(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function O(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function R(L){if(typeof L=="string"){var P=h._prime(L);this.m=P.p,this.prime=P}else u(L.gtn(1),"modulus must be greater than 1"),this.m=L,this.prime=null}function z(L){R.call(this,L),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new h(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)}A.prototype._tmp=function(){var L=new h(null);return L.words=new Array(Math.ceil(this.n/13)),L},A.prototype.ireduce=function(L){var P,N=L;do this.split(N,this.tmp),P=(N=(N=this.imulK(N)).iadd(this.tmp)).bitLength();while(P>this.n);var B=P0?N.isub(this.p):N.strip!==void 0?N.strip():N._strip(),N},A.prototype.split=function(L,P){L.iushrn(this.n,0,P)},A.prototype.imulK=function(L){return L.imul(this.k)},d(M,A),M.prototype.split=function(L,P){for(var N=Math.min(L.length,9),B=0;B>>22,G=W}G>>>=22,L.words[B-10]=G,G===0&&L.length>10?L.length-=10:L.length-=9},M.prototype.imulK=function(L){L.words[L.length]=0,L.words[L.length+1]=0,L.length+=2;for(var P=0,N=0;N>>=26,L.words[N]=G,P=B}return P!==0&&(L.words[L.length++]=P),L},h._prime=function(L){if(S[L])return S[L];var P;if(L==="k256")P=new M;else if(L==="p224")P=new E;else if(L==="p192")P=new D;else{if(L!=="p25519")throw new Error("Unknown prime "+L);P=new O}return S[L]=P,P},R.prototype._verify1=function(L){u(L.negative===0,"red works only with positives"),u(L.red,"red works only with red numbers")},R.prototype._verify2=function(L,P){u((L.negative|P.negative)==0,"red works only with positives"),u(L.red&&L.red===P.red,"red works only with red numbers")},R.prototype.imod=function(L){return this.prime?this.prime.ireduce(L)._forceRed(this):L.umod(this.m)._forceRed(this)},R.prototype.neg=function(L){return L.isZero()?L.clone():this.m.sub(L)._forceRed(this)},R.prototype.add=function(L,P){this._verify2(L,P);var N=L.add(P);return N.cmp(this.m)>=0&&N.isub(this.m),N._forceRed(this)},R.prototype.iadd=function(L,P){this._verify2(L,P);var N=L.iadd(P);return N.cmp(this.m)>=0&&N.isub(this.m),N},R.prototype.sub=function(L,P){this._verify2(L,P);var N=L.sub(P);return N.cmpn(0)<0&&N.iadd(this.m),N._forceRed(this)},R.prototype.isub=function(L,P){this._verify2(L,P);var N=L.isub(P);return N.cmpn(0)<0&&N.iadd(this.m),N},R.prototype.shl=function(L,P){return this._verify1(L),this.imod(L.ushln(P))},R.prototype.imul=function(L,P){return this._verify2(L,P),this.imod(L.imul(P))},R.prototype.mul=function(L,P){return this._verify2(L,P),this.imod(L.mul(P))},R.prototype.isqr=function(L){return this.imul(L,L.clone())},R.prototype.sqr=function(L){return this.mul(L,L)},R.prototype.sqrt=function(L){if(L.isZero())return L.clone();var P=this.m.andln(3);if(u(P%2==1),P===3){var N=this.m.add(new h(1)).iushrn(2);return this.pow(L,N)}for(var B=this.m.subn(1),G=0;!B.isZero()&&B.andln(1)===0;)G++,B.iushrn(1);u(!B.isZero());var W=new h(1).toRed(this),K=W.redNeg(),te=this.m.subn(1).iushrn(1),Y=this.m.bitLength();for(Y=new h(2*Y*Y).toRed(this);this.pow(Y,te).cmp(K)!==0;)Y.redIAdd(K);for(var Z=this.pow(Y,B),re=this.pow(L,B.addn(1).iushrn(1)),U=this.pow(L,B),q=G;U.cmp(W)!==0;){for(var $=U,ne=0;$.cmp(W)!==0;ne++)$=$.redSqr();u(ne=0;B--){for(var Y=P.words[B],Z=te-1;Z>=0;Z--){var re=Y>>Z&1;G!==N[0]&&(G=this.sqr(G)),re!==0||W!==0?(W<<=1,W|=re,(++K===4||B===0&&Z===0)&&(G=this.mul(G,N[W]),K=0,W=0)):K=0}te=26}return G},R.prototype.convertTo=function(L){var P=L.umod(this.m);return P===L?P.clone():P},R.prototype.convertFrom=function(L){var P=L.clone();return P.red=null,P},h.mont=function(L){return new z(L)},d(z,R),z.prototype.convertTo=function(L){return this.imod(L.ushln(this.shift))},z.prototype.convertFrom=function(L){var P=this.imod(L.mul(this.rinv));return P.red=null,P},z.prototype.imul=function(L,P){if(L.isZero()||P.isZero())return L.words[0]=0,L.length=1,L;var N=L.imul(P),B=N.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),G=N.isub(B).iushrn(this.shift),W=G;return G.cmp(this.m)>=0?W=G.isub(this.m):G.cmpn(0)<0&&(W=G.iadd(this.m)),W._forceRed(this)},z.prototype.mul=function(L,P){if(L.isZero()||P.isZero())return new h(0)._forceRed(this);var N=L.mul(P),B=N.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),G=N.isub(B).iushrn(this.shift),W=G;return G.cmp(this.m)>=0?W=G.isub(this.m):G.cmpn(0)<0&&(W=G.iadd(this.m)),W._forceRed(this)},z.prototype.invm=function(L){return this.imod(L._invmp(this.m).mul(this.r2))._forceRed(this)}})(l===void 0||l,this)},{buffer:2}],34:[function(a,l,c){l.exports=function(i){var s,u,d,h=i.length,m=0;for(s=0;s>>1;if(!(S<=0)){var A,M=s.mallocDouble(2*S*T),E=s.mallocInt32(T);if((T=m(x,S,M,E))>0){if(S===1&&b)u.init(T),A=u.sweepComplete(S,k,0,T,M,E,0,T,M,E);else{var D=s.mallocDouble(2*S*_),O=s.mallocInt32(_);(_=m(w,S,D,O))>0&&(u.init(T+_),A=S===1?u.sweepBipartite(S,k,0,T,M,E,0,_,D,O):d(S,k,b,T,M,E,_,D,O),s.free(D),s.free(O))}s.free(M),s.free(E)}return A}}}function p(x,w){i.push([x,w])}function v(x){return i=[],g(x,x,p,!0),i}function y(x,w){return i=[],g(x,w,p,!1),i}},{"./lib/intersect":37,"./lib/sweep":41,"typedarray-pool":308}],36:[function(a,l,c){function i(s){return s?function(u,d,h,m,g,p,v,y,x,w,k){return g-m>x-y?function(b,T,_,S,A,M,E,D,O,R,z){for(var L=2*b,P=S,N=L*S;Pw-x?m?function(T,_,S,A,M,E,D,O,R,z,L){for(var P=2*T,N=A,B=P*A;N0;){var te=6*(W-=1),Y=T[te],Z=T[te+1],re=T[te+2],U=T[te+3],q=T[te+4],$=T[te+5],ne=2*W,H=_[ne],Q=_[ne+1],ee=1&$,ie=!!(16&$),ae=z,ue=L,le=N,ge=B;if(ee&&(ae=N,ue=B,le=z,ge=L),!(2&$&&(re=x(E,Y,Z,re,ae,ue,Q),Z>=re)||4&$&&(Z=w(E,Y,Z,re,ae,ue,H))>=re)){var fe=re-Z,me=q-U;if(ie){if(E*fe*(fe+me)<1<<22){if((G=m.scanComplete(E,Y,D,Z,re,ae,ue,U,q,le,ge))!==void 0)return G;continue}}else{if(E*Math.min(fe,me)<128){if((G=d(E,Y,D,ee,Z,re,ae,ue,U,q,le,ge))!==void 0)return G;continue}if(E*fe*me<1<<22){if((G=m.scanBipartite(E,Y,D,ee,Z,re,ae,ue,U,q,le,ge))!==void 0)return G;continue}}var _e=v(E,Y,Z,re,ae,ue,H,Q);if(Z<_e)if(E*(_e-Z)<128){if((G=h(E,Y+1,D,Z,_e,ae,ue,U,q,le,ge))!==void 0)return G}else if(Y===E-2){if((G=ee?m.sweepBipartite(E,D,U,q,le,ge,Z,_e,ae,ue):m.sweepBipartite(E,D,Z,_e,ae,ue,U,q,le,ge))!==void 0)return G}else S(W++,Y+1,Z,_e,U,q,ee,-1/0,1/0),S(W++,Y+1,U,q,Z,_e,1^ee,-1/0,1/0);if(_e=p0)&&!(p1>=hi)"),y=p("lo===p0"),x=p("lo>>1,w=2*u,k=x,b=g[w*x+d];v=M?(k=A,b=M):S>=D?(k=_,b=S):(k=E,b=D):M>=D?(k=A,b=M):D>=S?(k=_,b=S):(k=E,b=D);for(var O=w*(y-1),R=w*k,z=0;zh&&g[b+d]>w;--k,b-=v){for(var T=b,_=b+v,S=0;Sb;++b,y+=v)if(m[y+k]===p)if(w===b)w+=1,x+=v;else{for(var T=0;v>T;++T){var _=m[y+T];m[y+T]=m[x],m[x++]=_}var S=g[b];g[b]=g[w],g[w++]=S}return w},"lob;++b,y+=v)if(m[y+k]T;++T){var _=m[y+T];m[y+T]=m[x],m[x++]=_}var S=g[b];g[b]=g[w],g[w++]=S}return w},"lo<=p0":function(s,u,d,h,m,g,p){for(var v=2*s,y=v*d,x=y,w=d,k=s+u,b=d;h>b;++b,y+=v)if(m[y+k]<=p)if(w===b)w+=1,x+=v;else{for(var T=0;v>T;++T){var _=m[y+T];m[y+T]=m[x],m[x++]=_}var S=g[b];g[b]=g[w],g[w++]=S}return w},"hi<=p0":function(s,u,d,h,m,g,p){for(var v=2*s,y=v*d,x=y,w=d,k=s+u,b=d;h>b;++b,y+=v)if(m[y+k]<=p)if(w===b)w+=1,x+=v;else{for(var T=0;v>T;++T){var _=m[y+T];m[y+T]=m[x],m[x++]=_}var S=g[b];g[b]=g[w],g[w++]=S}return w},"loT;++T,y+=v){var _=m[y+k],S=m[y+b];if(_A;++A){var M=m[y+A];m[y+A]=m[x],m[x++]=M}var E=g[T];g[T]=g[w],g[w++]=E}}return w},"lo<=p0&&p0<=hi":function(s,u,d,h,m,g,p){for(var v=2*s,y=v*d,x=y,w=d,k=u,b=s+u,T=d;h>T;++T,y+=v){var _=m[y+k],S=m[y+b];if(_<=p&&p<=S)if(w===T)w+=1,x+=v;else{for(var A=0;v>A;++A){var M=m[y+A];m[y+A]=m[x],m[x++]=M}var E=g[T];g[T]=g[w],g[w++]=E}}return w},"!(lo>=p0)&&!(p1>=hi)":function(s,u,d,h,m,g,p,v){for(var y=2*s,x=y*d,w=x,k=d,b=u,T=s+u,_=d;h>_;++_,x+=y){var S=m[x+b],A=m[x+T];if(!(S>=p||v>=A))if(k===_)k+=1,w+=y;else{for(var M=0;y>M;++M){var E=m[x+M];m[x+M]=m[w],m[w++]=E}var D=g[_];g[_]=g[k],g[k++]=D}}return k}}},{}],40:[function(a,l,c){l.exports=function(p,v){v<=128?i(0,v-1,p):function y(x,w,k){var b=(w-x+1)/6|0,T=x+b,_=w-b,S=x+w>>1,A=S-b,M=S+b,E=T,D=A,O=S,R=M,z=_,L=x+1,P=w-1,N=0;m(E,D,k)&&(N=E,E=D,D=N),m(R,z,k)&&(N=R,R=z,z=N),m(E,O,k)&&(N=E,E=O,O=N),m(D,O,k)&&(N=D,D=O,O=N),m(E,R,k)&&(N=E,E=R,R=N),m(O,R,k)&&(N=O,O=R,R=N),m(D,z,k)&&(N=D,D=z,z=N),m(D,O,k)&&(N=D,D=O,O=N),m(R,z,k)&&(N=R,R=z,z=N);for(var B=k[2*D],G=k[2*D+1],W=k[2*R],K=k[2*R+1],te=2*E,Y=2*O,Z=2*z,re=2*T,U=2*S,q=2*_,$=0;$<2;++$){var ne=k[te+$],H=k[Y+$],Q=k[Z+$];k[re+$]=ne,k[U+$]=H,k[q+$]=Q}u(A,x,k),u(M,w,k);for(var ee=L;ee<=P;++ee)if(g(ee,B,G,k))ee!==L&&s(ee,L,k),++L;else if(!g(ee,W,K,k))for(;;){if(g(P,W,K,k)){g(P,B,G,k)?(d(ee,L,P,k),++L,--P):(s(ee,P,k),--P);break}if(--Pp;){var S=y[_-2],A=y[_-1];if(Sy[v+1])}function g(p,v,y,x){var w=x[p*=2];return w>>1;u(y,K);var te=0,Y=0;for(N=0;N=1<<28)x(m,g,Y--,Z=Z-(1<<28)|0);else if(Z>=0)x(d,h,te--,Z);else if(Z<=-(1<<28)){Z=-Z-(1<<28)|0;for(var re=0;re>>1;u(y,K);var te=0,Y=0,Z=0;for(N=0;N>1==y[2*N+3]>>1&&(U=2,N+=1),re<0){for(var q=-(re>>1)-1,$=0;$>1)-1,U===0?x(d,h,te--,q):U===1?x(m,g,Y--,q):U===2&&x(p,v,Z--,q)}},scanBipartite:function(k,b,T,_,S,A,M,E,D,O,R,z){var L=0,P=2*k,N=b,B=b+k,G=1,W=1;_?W=1<<28:G=1<<28;for(var K=S;K>>1;u(y,re);var U=0;for(K=0;K=1<<28?($=!_,te-=1<<28):($=!!_,te-=1),$)w(d,h,U++,te);else{var ne=z[te],H=P*te,Q=R[H+b+1],ee=R[H+b+1+k];e:for(var ie=0;ie>>1;u(y,te);var Y=0;for(B=0;B=1<<28)d[Y++]=G-(1<<28);else{var re=R[G-=1],U=L*G,q=O[U+b+1],$=O[U+b+1+k];e:for(var ne=0;ne=0;--ne)if(d[ne]===G){for(ie=ne+1;ie0;){for(var b=h.pop(),T=(p=h.pop(),x=-1,w=-1,v=g[p],1);T=0||(d.flip(p,b),s(u,d,h,x,p,w),s(u,d,h,p,w,x),s(u,d,h,w,b,x),s(u,d,h,b,x,w))}}},{"binary-search-bounds":31,"robust-in-sphere":282}],44:[function(a,l,c){var i,s=a("binary-search-bounds");function u(h,m,g,p,v,y,x){this.cells=h,this.neighbor=m,this.flags=p,this.constraint=g,this.active=v,this.next=y,this.boundary=x}function d(h,m){return h[0]-m[0]||h[1]-m[1]||h[2]-m[2]}l.exports=function(h,m,g){var p=function(D,O){for(var R=D.cells(),z=R.length,L=0;L0||x.length>0;){for(;y.length>0;){var _=y.pop();if(w[_]!==-v){w[_]=v,k[_];for(var S=0;S<3;++S){var A=T[3*_+S];A>=0&&w[A]===0&&(b[3*_+S]?x.push(A):(y.push(A),w[A]=v))}}}var M=x;x=y,y=M,x.length=0,v=-v}var E=function(D,O,R){for(var z=0,L=0;L1&&s(k[E[D-2]],k[E[D-1]],b)>0;)x.push([E[D-1],E[D-2],T]),D-=1;E.length=D,E.push(T);var O=M.upperIds;for(D=O.length;D>1&&s(k[O[D-2]],k[O[D-1]],b)<0;)x.push([O[D-2],O[D-1],T]),D-=1;O.length=D,O.push(T)}}function p(x,w){var k;return(k=x.a[0]M[0]&&T.push(new d(M,A,2,_),new d(A,M,1,_))}T.sort(h);for(var E=T[0].a[0]-(1+Math.abs(T[0].a[0]))*Math.pow(2,-52),D=[new u([E,1],[E,0],-1,[],[],[],[])],O=[],R=(_=0,T.length);_=0}}(),u.removeTriangle=function(h,m,g){var p=this.stars;d(p[h],m,g),d(p[m],g,h),d(p[g],h,m)},u.addTriangle=function(h,m,g){var p=this.stars;p[h].push(m,g),p[m].push(g,h),p[g].push(h,m)},u.opposite=function(h,m){for(var g=this.stars[m],p=1,v=g.length;pA[2]?1:0)}function T(S,A,M){if(S.length!==0){if(A)for(var E=0;E=0;--W){var ne=P[K=(ge=B[W])[0]],H=ne[0],Q=ne[1],ee=L[H],ie=L[Q];if((ee[0]-ie[0]||ee[1]-ie[1])<0){var ae=H;H=Q,Q=ae}ne[0]=H;var ue,le=ne[1]=ge[1];for(G&&(ue=ne[2]);W>0&&B[W-1][0]===K;){var ge,fe=(ge=B[--W])[1];G?P.push([le,fe,ue]):P.push([le,fe]),le=fe}G?P.push([le,Q,ue]):P.push([le,Q])}return te}(S,A,D,R,M));return T(A,z,M),!!z||D.length>0||R.length>0}},{"./lib/rat-seg-intersect":51,"big-rat":18,"big-rat/cmp":16,"big-rat/to-float":30,"box-intersect":35,nextafter:260,"rat-vec":273,"robust-segment-intersect":287,"union-find":309}],51:[function(a,l,c){l.exports=function(v,y,x,w){var k=h(y,v),b=h(w,x),T=p(k,b);if(d(T)===0)return null;var _=h(v,x),S=p(b,_),A=s(S,T),M=g(k,A);return m(v,M)};var i=a("big-rat/mul"),s=a("big-rat/div"),u=a("big-rat/sub"),d=a("big-rat/sign"),h=a("rat-vec/sub"),m=a("rat-vec/add"),g=a("rat-vec/muls");function p(v,y){return u(i(v[0],y[1]),i(v[1],y[0]))}},{"big-rat/div":17,"big-rat/mul":27,"big-rat/sign":28,"big-rat/sub":29,"rat-vec/add":272,"rat-vec/muls":274,"rat-vec/sub":275}],52:[function(a,l,c){l.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],53:[function(a,l,c){var i=a("./colorScale"),s=a("lerp");function u(m){return[m[0]/255,m[1]/255,m[2]/255,m[3]]}function d(m){for(var g,p="#",v=0;v<3;++v)p+=("00"+(g=(g=m[v]).toString(16))).substr(g.length);return p}function h(m){return"rgba("+m.join(",")+")"}l.exports=function(m){var g,p,v,y,x,w,k,b,T,_;if(m||(m={}),b=(m.nshades||72)-1,k=m.format||"hex",(w=m.colormap)||(w="jet"),typeof w=="string"){if(w=w.toLowerCase(),!i[w])throw Error(w+" not a supported colorscale");x=i[w]}else{if(!Array.isArray(w))throw Error("unsupported colormap option",w);x=w.slice()}if(x.length>b+1)throw new Error(w+" map requires nshades to be at least size "+x.length);T=Array.isArray(m.alpha)?m.alpha.length!==2?[1,1]:m.alpha.slice():typeof m.alpha=="number"?[m.alpha,m.alpha]:[1,1],g=x.map(function(D){return Math.round(D.index*b)}),T[0]=Math.min(Math.max(T[0],0),1),T[1]=Math.min(Math.max(T[1],0),1);var S=x.map(function(D,O){var R=x[O].index,z=x[O].rgb.slice();return z.length===4&&z[3]>=0&&z[3]<=1||(z[3]=T[0]+(T[1]-T[0])*R),z}),A=[];for(_=0;_0||m(g,p,y)?-1:1:w===0?k>0||m(g,p,v)?1:-1:s(k-w)}var _=i(g,p,v);return _>0?x>0&&i(g,p,y)>0?1:-1:_<0?x>0||i(g,p,y)>0?1:-1:i(g,p,y)>0||m(g,p,v)?1:-1};var i=a("robust-orientation"),s=a("signum"),u=a("two-sum"),d=a("robust-product"),h=a("robust-sum");function m(g,p,v){var y=u(g[0],-p[0]),x=u(g[1],-p[1]),w=u(v[0],-p[0]),k=u(v[1],-p[1]),b=h(d(y,w),d(x,k));return b[b.length-1]>=0}},{"robust-orientation":284,"robust-product":285,"robust-sum":289,signum:55,"two-sum":307}],55:[function(a,l,c){l.exports=function(i){return i<0?-1:i>0?1:0}},{}],56:[function(a,l,c){l.exports=function(u,d){var h=u.length,m=u.length-d.length;if(m)return m;switch(h){case 0:return 0;case 1:return u[0]-d[0];case 2:return u[0]+u[1]-d[0]-d[1]||i(u[0],u[1])-i(d[0],d[1]);case 3:var g=u[0]+u[1],p=d[0]+d[1];if(m=g+u[2]-(p+d[2]))return m;var v=i(u[0],u[1]),y=i(d[0],d[1]);return i(v,u[2])-i(y,d[2])||i(v+u[2],g)-i(y+d[2],p);case 4:var x=u[0],w=u[1],k=u[2],b=u[3],T=d[0],_=d[1],S=d[2],A=d[3];return x+w+k+b-(T+_+S+A)||i(x,w,k,b)-i(T,_,S,A,T)||i(x+w,x+k,x+b,w+k,w+b,k+b)-i(T+_,T+S,T+A,_+S,_+A,S+A)||i(x+w+k,x+w+b,x+k+b,w+k+b)-i(T+_+S,T+_+A,T+S+A,_+S+A);default:for(var M=u.slice().sort(s),E=d.slice().sort(s),D=0;Di[u][0]&&(u=d);return su?[[u],[s]]:[[s]]}},{}],60:[function(a,l,c){l.exports=function(s){var u=i(s),d=u.length;if(d<=2)return[];for(var h=new Array(d),m=u[d-1],g=0;g=v[_]&&(T+=1);k[b]=T}}return p}(i(m,!0),h)}};var i=a("incremental-convex-hull"),s=a("affine-hull")},{"affine-hull":10,"incremental-convex-hull":233}],62:[function(a,l,c){l.exports=function(i,s,u,d,h,m){var g=h-1,p=h*h,v=g*g,y=(1+2*h)*v,x=h*v,w=p*(3-2*h),k=p*g;if(i.length){m||(m=new Array(i.length));for(var b=i.length-1;b>=0;--b)m[b]=y*i[b]+x*s[b]+w*u[b]+k*d[b];return m}return y*i+x*s+w*u+k*d},l.exports.derivative=function(i,s,u,d,h,m){var g=6*h*h-6*h,p=3*h*h-4*h+1,v=-6*h*h+6*h,y=3*h*h-2*h;if(i.length){m||(m=new Array(i.length));for(var x=i.length-1;x>=0;--x)m[x]=g*i[x]+p*s[x]+v*u[x]+y*d[x];return m}return g*i+p*s+v*u[x]+y*d}},{}],63:[function(a,l,c){var i=a("incremental-convex-hull"),s=a("uniq");function u(h,m){this.point=h,this.index=m}function d(h,m){for(var g=h.point,p=m.point,v=g.length,y=0;y=2)return!1;R[L]=P}return!0}):O.filter(function(R){for(var z=0;z<=p;++z){var L=A[R[z]];if(L<0)return!1;R[z]=L}return!0}),1&p)for(x=0;x>>31},l.exports.exponent=function(m){return(l.exports.hi(m)<<1>>>21)-1023},l.exports.fraction=function(m){var g=l.exports.lo(m),p=l.exports.hi(m),v=1048575&p;return 2146435072&p&&(v+=1<<20),[g,v]},l.exports.denormalized=function(m){return!(2146435072&l.exports.hi(m))}}).call(this)}).call(this,a("buffer").Buffer)},{buffer:3}],65:[function(a,l,c){l.exports=function(i,s){switch(s===void 0&&(s=0),typeof i){case"number":if(i>0)return function(u,d){var h,m;for(h=new Array(u),m=0;m=v-1){_=w.length-1;var A=g-p[v-1];for(S=0;S=v-1)for(var T=w.length-1,_=(p[v-1],0);_=0;--v)if(g[--p])return!1;return!0},h.jump=function(g){var p=this.lastT(),v=this.dimension;if(!(g0;--S)y.push(u(b[S-1],T[S-1],arguments[S])),x.push(0)}},h.push=function(g){var p=this.lastT(),v=this.dimension;if(!(g1e-6?1/k:0;this._time.push(g);for(var A=v;A>0;--A){var M=u(T[A-1],_[A-1],arguments[A]);y.push(M),x.push((M-y[w++])*S)}}},h.set=function(g){var p=this.dimension;if(!(g0;--b)v.push(u(w[b-1],k[b-1],arguments[b])),y.push(0)}},h.move=function(g){var p=this.lastT(),v=this.dimension;if(!(g<=p||arguments.length!==v+1)){var y=this._state,x=this._velocity,w=y.length-this.dimension,k=this.bounds,b=k[0],T=k[1],_=g-p,S=_>1e-6?1/_:0;this._time.push(g);for(var A=v;A>0;--A){var M=arguments[A];y.push(u(b[A-1],T[A-1],y[w++]+M)),x.push(M*S)}}},h.idle=function(g){var p=this.lastT();if(!(g=0;--S)y.push(u(b[S],T[S],y[w]+_*x[w])),x.push(0),w+=1}}},{"binary-search-bounds":31,"cubic-hermite":62}],69:[function(a,l,c){l.exports=function(b){return new h(b||k,null)};function i(b,T,_,S,A,M){this._color=b,this.key=T,this.value=_,this.left=S,this.right=A,this._count=M}function s(b){return new i(b._color,b.key,b.value,b.left,b.right,b._count)}function u(b,T){return new i(b,T.key,T.value,T.left,T.right,T._count)}function d(b){b._count=1+(b.left?b.left._count:0)+(b.right?b.right._count:0)}function h(b,T){this._compare=b,this.root=T}var m=h.prototype;function g(b,T){var _;return T.left&&(_=g(b,T.left))?_:(_=b(T.key,T.value))||(T.right?g(b,T.right):void 0)}function p(b,T,_,S){if(T(b,S.key)<=0){var A;if(S.left&&(A=p(b,T,_,S.left))||(A=_(S.key,S.value)))return A}if(S.right)return p(b,T,_,S.right)}function v(b,T,_,S,A){var M,E=_(b,A.key),D=_(T,A.key);if(E<=0&&(A.left&&(M=v(b,T,_,S,A.left))||D>0&&(M=S(A.key,A.value))))return M;if(D>0&&A.right)return v(b,T,_,S,A.right)}function y(b,T){this.tree=b,this._stack=T}Object.defineProperty(m,"keys",{get:function(){var b=[];return this.forEach(function(T,_){b.push(T)}),b}}),Object.defineProperty(m,"values",{get:function(){var b=[];return this.forEach(function(T,_){b.push(_)}),b}}),Object.defineProperty(m,"length",{get:function(){return this.root?this.root._count:0}}),m.insert=function(b,T){for(var _=this._compare,S=this.root,A=[],M=[];S;){var E=_(b,S.key);A.push(S),M.push(E),S=E<=0?S.left:S.right}A.push(new i(0,b,T,null,null,1));for(var D=A.length-2;D>=0;--D)S=A[D],M[D]<=0?A[D]=new i(S._color,S.key,S.value,A[D+1],S.right,S._count+1):A[D]=new i(S._color,S.key,S.value,S.left,A[D+1],S._count+1);for(D=A.length-1;D>1;--D){var O=A[D-1];if(S=A[D],O._color===1||S._color===1)break;var R=A[D-2];if(R.left===O)if(O.left===S){if(!(z=R.right)||z._color!==0){R._color=0,R.left=O.right,O._color=1,O.right=R,A[D-2]=O,A[D-1]=S,d(R),d(O),D>=3&&((L=A[D-3]).left===R?L.left=O:L.right=O);break}O._color=1,R.right=u(1,z),R._color=0,D-=1}else{if(!(z=R.right)||z._color!==0){O.right=S.left,R._color=0,R.left=S.right,S._color=1,S.left=O,S.right=R,A[D-2]=S,A[D-1]=O,d(R),d(O),d(S),D>=3&&((L=A[D-3]).left===R?L.left=S:L.right=S);break}O._color=1,R.right=u(1,z),R._color=0,D-=1}else if(O.right===S){if(!(z=R.left)||z._color!==0){R._color=0,R.right=O.left,O._color=1,O.left=R,A[D-2]=O,A[D-1]=S,d(R),d(O),D>=3&&((L=A[D-3]).right===R?L.right=O:L.left=O);break}O._color=1,R.left=u(1,z),R._color=0,D-=1}else{var z;if(!(z=R.left)||z._color!==0){var L;O.left=S.right,R._color=0,R.right=S.left,S._color=1,S.right=O,S.left=R,A[D-2]=S,A[D-1]=O,d(R),d(O),d(S),D>=3&&((L=A[D-3]).right===R?L.right=S:L.left=S);break}O._color=1,R.left=u(1,z),R._color=0,D-=1}}return A[0]._color=1,new h(_,A[0])},m.forEach=function(b,T,_){if(this.root)switch(arguments.length){case 1:return g(b,this.root);case 2:return p(T,this._compare,b,this.root);case 3:return this._compare(T,_)>=0?void 0:v(T,_,this._compare,b,this.root)}},Object.defineProperty(m,"begin",{get:function(){for(var b=[],T=this.root;T;)b.push(T),T=T.left;return new y(this,b)}}),Object.defineProperty(m,"end",{get:function(){for(var b=[],T=this.root;T;)b.push(T),T=T.right;return new y(this,b)}}),m.at=function(b){if(b<0)return new y(this,[]);for(var T=this.root,_=[];;){if(_.push(T),T.left){if(b=T.right._count)break;T=T.right}return new y(this,[])},m.ge=function(b){for(var T=this._compare,_=this.root,S=[],A=0;_;){var M=T(b,_.key);S.push(_),M<=0&&(A=S.length),_=M<=0?_.left:_.right}return S.length=A,new y(this,S)},m.gt=function(b){for(var T=this._compare,_=this.root,S=[],A=0;_;){var M=T(b,_.key);S.push(_),M<0&&(A=S.length),_=M<0?_.left:_.right}return S.length=A,new y(this,S)},m.lt=function(b){for(var T=this._compare,_=this.root,S=[],A=0;_;){var M=T(b,_.key);S.push(_),M>0&&(A=S.length),_=M<=0?_.left:_.right}return S.length=A,new y(this,S)},m.le=function(b){for(var T=this._compare,_=this.root,S=[],A=0;_;){var M=T(b,_.key);S.push(_),M>=0&&(A=S.length),_=M<0?_.left:_.right}return S.length=A,new y(this,S)},m.find=function(b){for(var T=this._compare,_=this.root,S=[];_;){var A=T(b,_.key);if(S.push(_),A===0)return new y(this,S);_=A<=0?_.left:_.right}return new y(this,[])},m.remove=function(b){var T=this.find(b);return T?T.remove():this},m.get=function(b){for(var T=this._compare,_=this.root;_;){var S=T(b,_.key);if(S===0)return _.value;_=S<=0?_.left:_.right}};var x=y.prototype;function w(b,T){b.key=T.key,b.value=T.value,b.left=T.left,b.right=T.right,b._color=T._color,b._count=T._count}function k(b,T){return bT?1:0}Object.defineProperty(x,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(x,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),x.clone=function(){return new y(this.tree,this._stack.slice())},x.remove=function(){var b=this._stack;if(b.length===0)return this.tree;var T=new Array(b.length),_=b[b.length-1];T[T.length-1]=new i(_._color,_.key,_.value,_.left,_.right,_._count);for(var S=b.length-2;S>=0;--S)(_=b[S]).left===b[S+1]?T[S]=new i(_._color,_.key,_.value,T[S+1],_.right,_._count):T[S]=new i(_._color,_.key,_.value,_.left,T[S+1],_._count);if((_=T[T.length-1]).left&&_.right){var A=T.length;for(_=_.left;_.right;)T.push(_),_=_.right;var M=T[A-1];for(T.push(new i(_._color,M.key,M.value,_.left,_.right,_._count)),T[A-1].key=_.key,T[A-1].value=_.value,S=T.length-2;S>=A;--S)_=T[S],T[S]=new i(_._color,_.key,_.value,_.left,T[S+1],_._count);T[A-1].left=T[A]}if((_=T[T.length-1])._color===0){var E=T[T.length-2];for(E.left===_?E.left=null:E.right===_&&(E.right=null),T.pop(),S=0;S=0;--N){if(R=O[N],N===0)return void(R._color=1);if((z=O[N-1]).left===R){if((L=z.right).right&&L.right._color===0)return P=(L=z.right=s(L)).right=s(L.right),z.right=L.left,L.left=z,L.right=P,L._color=z._color,R._color=1,z._color=1,P._color=1,d(z),d(L),N>1&&((B=O[N-2]).left===z?B.left=L:B.right=L),void(O[N-1]=L);if(L.left&&L.left._color===0)return P=(L=z.right=s(L)).left=s(L.left),z.right=P.left,L.left=P.right,P.left=z,P.right=L,P._color=z._color,z._color=1,L._color=1,R._color=1,d(z),d(L),d(P),N>1&&((B=O[N-2]).left===z?B.left=P:B.right=P),void(O[N-1]=P);if(L._color===1){if(z._color===0)return z._color=1,void(z.right=u(0,L));z.right=u(0,L);continue}L=s(L),z.right=L.left,L.left=z,L._color=z._color,z._color=0,d(z),d(L),N>1&&((B=O[N-2]).left===z?B.left=L:B.right=L),O[N-1]=L,O[N]=z,N+11&&((B=O[N-2]).right===z?B.right=L:B.left=L),void(O[N-1]=L);if(L.right&&L.right._color===0)return P=(L=z.left=s(L)).right=s(L.right),z.left=P.right,L.right=P.left,P.right=z,P.left=L,P._color=z._color,z._color=1,L._color=1,R._color=1,d(z),d(L),d(P),N>1&&((B=O[N-2]).right===z?B.right=P:B.left=P),void(O[N-1]=P);if(L._color===1){if(z._color===0)return z._color=1,void(z.left=u(0,L));z.left=u(0,L);continue}var B;L=s(L),z.left=L.right,L.right=z,L._color=z._color,z._color=0,d(z),d(L),N>1&&((B=O[N-2]).right===z?B.right=L:B.left=L),O[N-1]=L,O[N]=z,N+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(x,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(x,"index",{get:function(){var b=0,T=this._stack;if(T.length===0){var _=this.tree.root;return _?_._count:0}T[T.length-1].left&&(b=T[T.length-1].left._count);for(var S=T.length-2;S>=0;--S)T[S+1]===T[S].right&&(++b,T[S].left&&(b+=T[S].left._count));return b},enumerable:!0}),x.next=function(){var b=this._stack;if(b.length!==0){var T=b[b.length-1];if(T.right)for(T=T.right;T;)b.push(T),T=T.left;else for(b.pop();b.length>0&&b[b.length-1].right===T;)T=b[b.length-1],b.pop()}},Object.defineProperty(x,"hasNext",{get:function(){var b=this._stack;if(b.length===0)return!1;if(b[b.length-1].right)return!0;for(var T=b.length-1;T>0;--T)if(b[T-1].left===b[T])return!0;return!1}}),x.update=function(b){var T=this._stack;if(T.length===0)throw new Error("Can't update empty node!");var _=new Array(T.length),S=T[T.length-1];_[_.length-1]=new i(S._color,S.key,b,S.left,S.right,S._count);for(var A=T.length-2;A>=0;--A)(S=T[A]).left===T[A+1]?_[A]=new i(S._color,S.key,S.value,_[A+1],S.right,S._count):_[A]=new i(S._color,S.key,S.value,S.left,_[A+1],S._count);return new h(this.tree._compare,_[0])},x.prev=function(){var b=this._stack;if(b.length!==0){var T=b[b.length-1];if(T.left)for(T=T.left;T;)b.push(T),T=T.right;else for(b.pop();b.length>0&&b[b.length-1].left===T;)T=b[b.length-1],b.pop()}},Object.defineProperty(x,"hasPrev",{get:function(){var b=this._stack;if(b.length===0)return!1;if(b[b.length-1].left)return!0;for(var T=b.length-1;T>0;--T)if(b[T-1].right===b[T])return!0;return!1}})},{}],70:[function(a,l,c){l.exports=function(A,M){var E=new p(A);return E.update(M),E};var i=a("./lib/text.js"),s=a("./lib/lines.js"),u=a("./lib/background.js"),d=a("./lib/cube.js"),h=a("./lib/ticks.js"),m=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function g(A,M){return A[0]=M[0],A[1]=M[1],A[2]=M[2],A}function p(A){this.gl=A,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.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",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=u(A)}var v=p.prototype;function y(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}v.update=function(A){function M(K,te,Y){if(Y in A){var Z,re=A[Y],U=this[Y];(K?Array.isArray(re)&&Array.isArray(re[0]):Array.isArray(re))?this[Y]=Z=[te(re[0]),te(re[1]),te(re[2])]:this[Y]=Z=[te(re),te(re),te(re)];for(var q=0;q<3;++q)if(Z[q]!==U[q])return!0}return!1}A=A||{};var E,D=M.bind(this,!1,Number),O=M.bind(this,!1,Boolean),R=M.bind(this,!1,String),z=M.bind(this,!0,function(K){if(Array.isArray(K)){if(K.length===3)return[+K[0],+K[1],+K[2],1];if(K.length===4)return[+K[0],+K[1],+K[2],+K[3]]}return[0,0,0,1]}),L=!1,P=!1;if("bounds"in A)for(var N=A.bounds,B=0;B<2;++B)for(var G=0;G<3;++G)N[B][G]!==this.bounds[B][G]&&(P=!0),this.bounds[B][G]=N[B][G];if("ticks"in A)for(E=A.ticks,L=!0,this.autoTicks=!1,B=0;B<3;++B)this.tickSpacing[B]=0;else D("tickSpacing")&&(this.autoTicks=!0,P=!0);if(this._firstInit&&("ticks"in A||"tickSpacing"in A||(this.autoTicks=!0),P=!0,L=!0,this._firstInit=!1),P&&this.autoTicks&&(E=h.create(this.bounds,this.tickSpacing),L=!0),L){for(B=0;B<3;++B)E[B].sort(function(K,te){return K.x-te.x});h.equal(E,this.ticks)?L=!1:this.ticks=E}O("tickEnable"),R("tickFont")&&(L=!0),D("tickSize"),D("tickAngle"),D("tickPad"),z("tickColor");var W=R("labels");R("labelFont")&&(W=!0),O("labelEnable"),D("labelSize"),D("labelPad"),z("labelColor"),O("lineEnable"),O("lineMirror"),D("lineWidth"),z("lineColor"),O("lineTickEnable"),O("lineTickMirror"),D("lineTickLength"),D("lineTickWidth"),z("lineTickColor"),O("gridEnable"),D("gridWidth"),z("gridColor"),O("zeroEnable"),z("zeroLineColor"),D("zeroLineWidth"),O("backgroundEnable"),z("backgroundColor"),this._text?this._text&&(W||L)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=i(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&L&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=s(this.gl,this.bounds,this.ticks))};var x=[new y,new y,new y];function w(A,M,E,D,O){for(var R=A.primalOffset,z=A.primalMinor,L=A.mirrorOffset,P=A.mirrorMinor,N=D[M],B=0;B<3;++B)if(M!==B){var G=R,W=L,K=z,te=P;N&1<0?(K[B]=-1,te[B]=0):(K[B]=0,te[B]=1)}}var k=[0,0,0],b={model:m,view:m,projection:m,_ortho:!1};v.isOpaque=function(){return!0},v.isTransparent=function(){return!1},v.drawTransparent=function(A){};var T=[0,0,0],_=[0,0,0],S=[0,0,0];v.draw=function(A){A=A||b;for(var M=this.gl,E=A.model||m,D=A.view||m,O=A.projection||m,R=this.bounds,z=A._ortho||!1,L=d(E,D,O,R,z),P=L.cubeEdges,N=L.axis,B=D[12],G=D[13],W=D[14],K=D[15],te=(z?2:1)*this.pixelRatio*(O[3]*B+O[7]*G+O[11]*W+O[15]*K)/M.drawingBufferHeight,Y=0;Y<3;++Y)this.lastCubeProps.cubeEdges[Y]=P[Y],this.lastCubeProps.axis[Y]=N[Y];var Z=x;for(Y=0;Y<3;++Y)w(x[Y],Y,this.bounds,P,N);M=this.gl;var re,U=k;for(Y=0;Y<3;++Y)this.backgroundEnable[Y]?U[Y]=N[Y]:U[Y]=0;for(this._background.draw(E,D,O,R,U,this.backgroundColor),this._lines.bind(E,D,O,this),Y=0;Y<3;++Y){var q=[0,0,0];N[Y]>0?q[Y]=R[1][Y]:q[Y]=R[0][Y];for(var $=0;$<2;++$){var ne=(Y+1+$)%3,H=(Y+1+(1^$))%3;this.gridEnable[ne]&&this._lines.drawGrid(ne,H,this.bounds,q,this.gridColor[ne],this.gridWidth[ne]*this.pixelRatio)}for($=0;$<2;++$)ne=(Y+1+$)%3,H=(Y+1+(1^$))%3,this.zeroEnable[H]&&Math.min(R[0][H],R[1][H])<=0&&Math.max(R[0][H],R[1][H])>=0&&this._lines.drawZero(ne,H,this.bounds,q,this.zeroLineColor[H],this.zeroLineWidth[H]*this.pixelRatio)}for(Y=0;Y<3;++Y){this.lineEnable[Y]&&this._lines.drawAxisLine(Y,this.bounds,Z[Y].primalOffset,this.lineColor[Y],this.lineWidth[Y]*this.pixelRatio),this.lineMirror[Y]&&this._lines.drawAxisLine(Y,this.bounds,Z[Y].mirrorOffset,this.lineColor[Y],this.lineWidth[Y]*this.pixelRatio);var Q=g(T,Z[Y].primalMinor),ee=g(_,Z[Y].mirrorMinor),ie=this.lineTickLength;for($=0;$<3;++$){var ae=te/E[5*$];Q[$]*=ie[$]*ae,ee[$]*=ie[$]*ae}this.lineTickEnable[Y]&&this._lines.drawAxisTicks(Y,Z[Y].primalOffset,Q,this.lineTickColor[Y],this.lineTickWidth[Y]*this.pixelRatio),this.lineTickMirror[Y]&&this._lines.drawAxisTicks(Y,Z[Y].mirrorOffset,ee,this.lineTickColor[Y],this.lineTickWidth[Y]*this.pixelRatio)}this._lines.unbind(),this._text.bind(E,D,O,this.pixelRatio);var ue,le;function ge(Oe){(le=[0,0,0])[Oe]=1}function fe(Oe,de,ye){var Me=(Oe+1)%3,ke=(Oe+2)%3,Ee=de[Me],ze=de[ke],Fe=ye[Me],Ve=ye[ke];Ee>0&&Ve>0||Ee>0&&Ve<0||Ee<0&&Ve>0||Ee<0&&Ve<0?ge(Me):(ze>0&&Fe>0||ze>0&&Fe<0||ze<0&&Fe>0||ze<0&&Fe<0)&&ge(ke)}for(Y=0;Y<3;++Y){var me=Z[Y].primalMinor,_e=Z[Y].mirrorMinor,we=g(S,Z[Y].primalOffset);for($=0;$<3;++$)this.lineTickEnable[Y]&&(we[$]+=te*me[$]*Math.max(this.lineTickLength[$],0)/E[5*$]);var Te=[0,0,0];if(Te[Y]=1,this.tickEnable[Y]){for(this.tickAngle[Y]===-3600?(this.tickAngle[Y]=0,this.tickAlign[Y]="auto"):this.tickAlign[Y]=-1,ue=1,(re=[this.tickAlign[Y],.5,ue])[0]==="auto"?re[0]=0:re[0]=parseInt(""+re[0]),le=[0,0,0],fe(Y,me,_e),$=0;$<3;++$)we[$]+=te*me[$]*this.tickPad[$]/E[5*$];this._text.drawTicks(Y,this.tickSize[Y],this.tickAngle[Y],we,this.tickColor[Y],Te,le,re)}if(this.labelEnable[Y]){for(ue=0,le=[0,0,0],this.labels[Y].length>4&&(ge(Y),ue=1),(re=[this.labelAlign[Y],.5,ue])[0]==="auto"?re[0]=0:re[0]=parseInt(""+re[0]),$=0;$<3;++$)we[$]+=te*me[$]*this.labelPad[$]/E[5*$];we[Y]+=.5*(R[0][Y]+R[1][Y]),this._text.drawLabel(Y,this.labelSize[Y],this.labelAngle[Y],we,this.labelColor[Y],[0,0,0],le,re)}}this._text.unbind()},v.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":71,"./lib/cube.js":72,"./lib/lines.js":73,"./lib/text.js":75,"./lib/ticks.js":76}],71:[function(a,l,c){l.exports=function(m){for(var g=[],p=[],v=0,y=0;y<3;++y)for(var x=(y+1)%3,w=(y+2)%3,k=[0,0,0],b=[0,0,0],T=-1;T<=1;T+=2){p.push(v,v+2,v+1,v+1,v+2,v+3),k[y]=T,b[y]=T;for(var _=-1;_<=1;_+=2){k[x]=_;for(var S=-1;S<=1;S+=2)k[w]=S,g.push(k[0],k[1],k[2],b[0],b[1],b[2]),v+=1}var A=x;x=w,w=A}var M=i(m,new Float32Array(g)),E=i(m,new Uint16Array(p),m.ELEMENT_ARRAY_BUFFER),D=s(m,[{buffer:M,type:m.FLOAT,size:3,offset:0,stride:24},{buffer:M,type:m.FLOAT,size:3,offset:12,stride:24}],E),O=u(m);return O.attributes.position.location=0,O.attributes.normal.location=1,new d(m,M,D,O)};var i=a("gl-buffer"),s=a("gl-vao"),u=a("./shaders").bg;function d(m,g,p,v){this.gl=m,this.buffer=g,this.vao=p,this.shader=v}var h=d.prototype;h.draw=function(m,g,p,v,y,x){for(var w=!1,k=0;k<3;++k)w=w||y[k];if(w){var b=this.gl;b.enable(b.POLYGON_OFFSET_FILL),b.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:m,view:g,projection:p,bounds:v,enable:y,colors:x},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),b.disable(b.POLYGON_OFFSET_FILL)}},h.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":74,"gl-buffer":78,"gl-vao":150}],72:[function(a,l,c){l.exports=function(_,S,A,M,E){s(h,S,_),s(h,A,h);for(var D=0,O=0;O<2;++O){p[2]=M[O][2];for(var R=0;R<2;++R){p[1]=M[R][1];for(var z=0;z<2;++z)p[0]=M[z][0],y(m[D],p,h),D+=1}}var L=-1;for(O=0;O<8;++O){for(var P=m[O][3],N=0;N<3;++N)g[O][N]=m[O][N]/P;E&&(g[O][2]*=-1),P<0&&(L<0||g[O][2]K&&(L|=1<K&&(L|=1<g[O][1])&&(ne=O);var H=-1;for(O=0;O<3;++O)(ee=ne^1<g[Q][0]&&(Q=ee))}var ie=k;ie[0]=ie[1]=ie[2]=0,ie[i.log2(H^ne)]=ne&H,ie[i.log2(ne^Q)]=ne&Q;var ae=7^Q;ae===L||ae===$?(ae=7^H,ie[i.log2(Q^ae)]=ae&Q):ie[i.log2(H^ae)]=ae&H;var ue=b,le=L;for(B=0;B<3;++B)ue[B]=le&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ? + b - PI : + b; +} + +float look_horizontal_or_vertical(float a, float ratio) { + // ratio controls the ratio between being horizontal to (vertical + horizontal) + // if ratio is set to 0.5 then it is 50%, 50%. + // when using a higher ratio e.g. 0.75 the result would + // likely be more horizontal than vertical. + + float b = positive_angle(a); + + return + (b < ( ratio) * HALF_PI) ? 0.0 : + (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI : + (b < (2.0 + ratio) * HALF_PI) ? 0.0 : + (b < (4.0 - ratio) * HALF_PI) ? HALF_PI : + 0.0; +} + +float roundTo(float a, float b) { + return float(b * floor((a + 0.5 * b) / b)); +} + +float look_round_n_directions(float a, int n) { + float b = positive_angle(a); + float div = TWO_PI / float(n); + float c = roundTo(b, div); + return look_upwards(c); +} + +float applyAlignOption(float rawAngle, float delta) { + return + (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions + (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical + (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis + (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards + (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal + rawAngle; // otherwise return back raw input angle +} + +bool isAxisTitle = (axis.x == 0.0) && + (axis.y == 0.0) && + (axis.z == 0.0); + +void main() { + //Compute world offset + float axisDistance = position.z; + vec3 dataPosition = axisDistance * axis + offset; + + float beta = angle; // i.e. user defined attributes for each tick + + float axisAngle; + float clipAngle; + float flip; + + if (enableAlign) { + axisAngle = (isAxisTitle) ? HALF_PI : + computeViewAngle(dataPosition, dataPosition + axis); + clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir); + + axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0; + clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0; + + flip = (dot(vec2(cos(axisAngle), sin(axisAngle)), + vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0; + + beta += applyAlignOption(clipAngle, flip * PI); + } + + //Compute plane offset + vec2 planeCoord = position.xy * pixelScale; + + mat2 planeXform = scale * mat2( + cos(beta), sin(beta), + -sin(beta), cos(beta) + ); + + vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution; + + //Compute clip position + vec3 clipPosition = project(dataPosition); + + //Apply text offset in clip coordinates + clipPosition += vec3(viewOffset, 0.0); + + //Done + gl_Position = vec4(clipPosition, 1.0); +}`]),m=i([`precision highp float; +#define GLSLIFY 1 + +uniform vec4 color; +void main() { + gl_FragColor = color; +}`]);c.text=function(v){return s(v,h,m,null,[{name:"position",type:"vec3"}])};var g=i([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec3 normal; + +uniform mat4 model, view, projection; +uniform vec3 enable; +uniform vec3 bounds[2]; + +varying vec3 colorChannel; + +void main() { + + vec3 signAxis = sign(bounds[1] - bounds[0]); + + vec3 realNormal = signAxis * normal; + + if(dot(realNormal, enable) > 0.0) { + vec3 minRange = min(bounds[0], bounds[1]); + vec3 maxRange = max(bounds[0], bounds[1]); + vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0)); + gl_Position = projection * view * model * vec4(nPosition, 1.0); + } else { + gl_Position = vec4(0,0,0,0); + } + + colorChannel = abs(realNormal); +}`]),p=i([`precision highp float; +#define GLSLIFY 1 + +uniform vec4 colors[3]; + +varying vec3 colorChannel; + +void main() { + gl_FragColor = colorChannel.x * colors[0] + + colorChannel.y * colors[1] + + colorChannel.z * colors[2]; +}`]);c.bg=function(v){return s(v,g,p,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":132,glslify:231}],75:[function(a,l,c){(function(i){(function(){l.exports=function(x,w,k,b,T,_){var S=s(x),A=u(x,[{buffer:S,size:3}]),M=h(x);M.attributes.position.location=0;var E=new p(x,M,S,A);return E.update(w,k,b,T,_),E};var s=a("gl-buffer"),u=a("gl-vao"),d=a("vectorize-text"),h=a("./shaders").text,m=window||i.global||{},g=m.__TEXT_CACHE||{};m.__TEXT_CACHE={};function p(x,w,k,b){this.gl=x,this.shader=w,this.buffer=k,this.vao=b,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var v=p.prototype,y=[0,0];v.bind=function(x,w,k,b){this.vao.bind(),this.shader.bind();var T=this.shader.uniforms;T.model=x,T.view=w,T.projection=k,T.pixelScale=b,y[0]=this.gl.drawingBufferWidth,y[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=y},v.unbind=function(){this.vao.unbind()},v.update=function(x,w,k,b,T){var _=[];function S(L,P,N,B,G,W){var K=g[N];K||(K=g[N]={});var te=K[P];te||(te=K[P]=function(Q,ee){try{return d(Q,ee)}catch(ie){return console.warn('error vectorizing text:"'+Q+'" error:',ie),{cells:[],positions:[]}}}(P,{triangles:!0,font:N,textAlign:"center",textBaseline:"middle",lineSpacing:G,styletags:W}));for(var Y=(B||12)/12,Z=te.positions,re=te.cells,U=0,q=re.length;U=0;--ne){var H=Z[$[ne]];_.push(Y*H[0],-Y*H[1],L)}}for(var A=[0,0,0],M=[0,0,0],E=[0,0,0],D=[0,0,0],O={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},R=0;R<3;++R){E[R]=_.length/3|0,S(.5*(x[0][R]+x[1][R]),w[R],k[R],12,1.25,O),D[R]=(_.length/3|0)-E[R],A[R]=_.length/3|0;for(var z=0;z=0&&(m=d.length-h-1);var g=Math.pow(10,m),p=Math.round(s*u*g),v=p+"";if(v.indexOf("e")>=0)return v;var y=p/g,x=p%g;p<0?(y=0|-Math.ceil(y),x=0|-x):(y=0|Math.floor(y),x|=0);var w=""+y;if(p<0&&(w="-"+w),m){for(var k=""+x;k.length=s[0][h];--g)m.push({x:g*u[h],text:i(u[h],g)});d.push(m)}return d},c.equal=function(s,u){for(var d=0;d<3;++d){if(s[d].length!==u[d].length)return!1;for(var h=0;hx)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return v.bufferSubData(y,b,k),x}function p(v,y){for(var x=i.malloc(v.length,y),w=v.length,k=0;k=0;--A){if(_[A]!==S)return!1;S*=T[A]}return!0}(v.shape,v.stride))v.offset===0&&v.data.length===v.shape[0]?this.length=g(this.gl,this.type,this.length,this.usage,v.data,y):this.length=g(this.gl,this.type,this.length,this.usage,v.data.subarray(v.offset,v.shape[0]),y);else{var w=i.malloc(v.size,x),k=u(w,v.shape);s.assign(k,v),this.length=g(this.gl,this.type,this.length,this.usage,y<0?w:w.subarray(0,v.size),y),i.free(w)}}else if(Array.isArray(v)){var b;b=this.type===this.gl.ELEMENT_ARRAY_BUFFER?p(v,"uint16"):p(v,"float32"),this.length=g(this.gl,this.type,this.length,this.usage,y<0?b:b.subarray(0,v.length),y),i.free(b)}else if(typeof v=="object"&&typeof v.length=="number")this.length=g(this.gl,this.type,this.length,this.usage,v,y);else{if(typeof v!="number"&&v!==void 0)throw new Error("gl-buffer: Invalid data type");if(y>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(v|=0)<=0&&(v=1),this.gl.bufferData(this.type,0|v,this.usage),this.length=v}},l.exports=function(v,y,x,w){if(x=x||v.ARRAY_BUFFER,w=w||v.DYNAMIC_DRAW,x!==v.ARRAY_BUFFER&&x!==v.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(w!==v.DYNAMIC_DRAW&&w!==v.STATIC_DRAW&&w!==v.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 k=v.createBuffer(),b=new h(v,x,k,0,w);return b.update(y),b}},{ndarray:259,"ndarray-ops":254,"typedarray-pool":308}],79:[function(a,l,c){var i=a("gl-vec3");l.exports=function(u,d){var h=u.positions,m=u.vectors,g={positions:[],vertexIntensity:[],vertexIntensityBounds:u.vertexIntensityBounds,vectors:[],cells:[],coneOffset:u.coneOffset,colormap:u.colormap};if(u.positions.length===0)return d&&(d[0]=[0,0,0],d[1]=[0,0,0]),g;for(var p=0,v=1/0,y=-1/0,x=1/0,w=-1/0,k=1/0,b=-1/0,T=null,_=null,S=[],A=1/0,M=!1,E=0;Ep&&(p=i.length(O)),E){var R=2*i.distance(T,D)/(i.length(_)+i.length(O));R?(A=Math.min(A,R),M=!1):M=!0}M||(T=D,_=O),S.push(O)}var z=[v,x,k],L=[y,w,b];d&&(d[0]=z,d[1]=L),p===0&&(p=1);var P=1/p;isFinite(A)||(A=1),g.vectorScale=A;var N=u.coneSize||.5;u.absoluteConeSize&&(N=u.absoluteConeSize*P),g.coneScale=N,E=0;for(var B=0;E=1},x.isTransparent=function(){return this.opacity<1},x.pickSlots=1,x.setPickBase=function(b){this.pickId=b},x.update=function(b){b=b||{};var T=this.gl;this.dirty=!0,"lightPosition"in b&&(this.lightPosition=b.lightPosition),"opacity"in b&&(this.opacity=b.opacity),"ambient"in b&&(this.ambientLight=b.ambient),"diffuse"in b&&(this.diffuseLight=b.diffuse),"specular"in b&&(this.specularLight=b.specular),"roughness"in b&&(this.roughness=b.roughness),"fresnel"in b&&(this.fresnel=b.fresnel),b.tubeScale!==void 0&&(this.tubeScale=b.tubeScale),b.vectorScale!==void 0&&(this.vectorScale=b.vectorScale),b.coneScale!==void 0&&(this.coneScale=b.coneScale),b.coneOffset!==void 0&&(this.coneOffset=b.coneOffset),b.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=T.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=T.LINEAR,this.texture.setPixels(function(ne){for(var H=p({colormap:ne,nshades:256,format:"rgba"}),Q=new Uint8Array(1024),ee=0;ee<256;++ee){for(var ie=H[ee],ae=0;ae<3;++ae)Q[4*ee+ae]=ie[ae];Q[4*ee+3]=255*ie[3]}return g(Q,[256,256,4],[4,0,1])}(b.colormap)),this.texture.generateMipmap());var _=b.cells,S=b.positions,A=b.vectors;if(S&&_&&A){var M=[],E=[],D=[],O=[],R=[];this.cells=_,this.positions=S,this.vectors=A;var z=b.meshColor||[1,1,1,1],L=b.vertexIntensity,P=1/0,N=-1/0;if(L)if(b.vertexIntensityBounds)P=+b.vertexIntensityBounds[0],N=+b.vertexIntensityBounds[1];else for(var B=0;B0){var P=this.triShader;P.bind(),P.uniforms=D,this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},x.drawPick=function(b){b=b||{};for(var T=this.gl,_=b.model||v,S=b.view||v,A=b.projection||v,M=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],E=0;E<3;++E)M[0][E]=Math.max(M[0][E],this.clipBounds[0][E]),M[1][E]=Math.min(M[1][E],this.clipBounds[1][E]);this._model=[].slice.call(_),this._view=[].slice.call(S),this._projection=[].slice.call(A),this._resolution=[T.drawingBufferWidth,T.drawingBufferHeight];var D={model:_,view:S,projection:A,clipBounds:M,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},O=this.pickShader;O.bind(),O.uniforms=D,this.triangleCount>0&&(this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},x.pick=function(b){if(!b||b.id!==this.pickId)return null;var T=b.value[0]+256*b.value[1]+65536*b.value[2],_=this.cells[T],S=this.positions[_[1]].slice(0,3),A={position:S,dataCoordinate:S,index:Math.floor(_[1]/48)};return this.traceType==="cone"?A.index=Math.floor(_[1]/48):this.traceType==="streamtube"&&(A.intensity=this.intensity[_[1]],A.velocity=this.vectors[_[1]].slice(0,3),A.divergence=this.vectors[_[1]][3],A.index=T),A},x.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()},l.exports=function(b,T,_){var S=_.shaders;arguments.length===1&&(b=(T=b).gl);var A=w(b,S),M=k(b,S),E=d(b,g(new Uint8Array([255,255,255,255]),[1,1,4]));E.generateMipmap(),E.minFilter=b.LINEAR_MIPMAP_LINEAR,E.magFilter=b.LINEAR;var D=s(b),O=s(b),R=s(b),z=s(b),L=s(b),P=u(b,[{buffer:D,type:b.FLOAT,size:4},{buffer:L,type:b.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:R,type:b.FLOAT,size:4},{buffer:z,type:b.FLOAT,size:2},{buffer:O,type:b.FLOAT,size:4}]),N=new y(b,E,A,M,D,O,L,R,z,P,_.traceType||"cone");return N.update(T),N}},{colormap:53,"gl-buffer":78,"gl-mat4/invert":98,"gl-mat4/multiply":100,"gl-shader":132,"gl-texture2d":146,"gl-vao":150,ndarray:259}],81:[function(a,l,c){var i=a("glslify"),s=i([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the cone vertex and normal at the given index. +// +// The returned vertex is for a cone with its top at origin and height of 1.0, +// pointing in the direction of the vector attribute. +// +// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. +// These vertices are used to make up the triangles of the cone by the following: +// segment + 0 top vertex +// segment + 1 perimeter vertex a+1 +// segment + 2 perimeter vertex a +// segment + 3 center base vertex +// segment + 4 perimeter vertex a +// segment + 5 perimeter vertex a+1 +// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. +// To go from index to segment, floor(index / 6) +// To go from segment to angle, 2*pi * (segment/segmentCount) +// To go from index to segment index, index - (segment*6) +// +vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { + + const float segmentCount = 8.0; + + float index = rawIndex - floor(rawIndex / + (segmentCount * 6.0)) * + (segmentCount * 6.0); + + float segment = floor(0.001 + index/6.0); + float segmentIndex = index - (segment*6.0); + + normal = -normalize(d); + + if (segmentIndex > 2.99 && segmentIndex < 3.01) { + return mix(vec3(0.0), -d, coneOffset); + } + + float nextAngle = ( + (segmentIndex > 0.99 && segmentIndex < 1.01) || + (segmentIndex > 4.99 && segmentIndex < 5.01) + ) ? 1.0 : 0.0; + float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); + + vec3 v1 = mix(d, vec3(0.0), coneOffset); + vec3 v2 = v1 - d; + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d)*0.25; + vec3 y = v * sin(angle) * length(d)*0.25; + vec3 v3 = v2 + x + y; + if (segmentIndex < 3.0) { + vec3 tx = u * sin(angle); + vec3 ty = v * -cos(angle); + vec3 tangent = tx + ty; + normal = normalize(cross(v3 - v1, tangent)); + } + + if (segmentIndex == 0.0) { + return mix(d, vec3(0.0), coneOffset); + } + return v3; +} + +attribute vec3 vector; +attribute vec4 color, position; +attribute vec2 uv; + +uniform float vectorScale, coneScale, coneOffset; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 eyePosition, lightPosition; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + // Scale the vector magnitude to stay constant with + // model & view changes. + vec3 normal; + vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal); + vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * conePosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + // vec4 m_position = model * vec4(conePosition, 1.0); + vec4 t_position = view * conePosition; + gl_Position = projection * t_position; + + f_color = color; + f_data = conePosition.xyz; + f_position = position.xyz; + f_uv = uv; +} +`]),u=i([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform sampler2D texture; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = f_color * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * opacity; +} +`]),d=i([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the cone vertex and normal at the given index. +// +// The returned vertex is for a cone with its top at origin and height of 1.0, +// pointing in the direction of the vector attribute. +// +// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. +// These vertices are used to make up the triangles of the cone by the following: +// segment + 0 top vertex +// segment + 1 perimeter vertex a+1 +// segment + 2 perimeter vertex a +// segment + 3 center base vertex +// segment + 4 perimeter vertex a +// segment + 5 perimeter vertex a+1 +// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. +// To go from index to segment, floor(index / 6) +// To go from segment to angle, 2*pi * (segment/segmentCount) +// To go from index to segment index, index - (segment*6) +// +vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { + + const float segmentCount = 8.0; + + float index = rawIndex - floor(rawIndex / + (segmentCount * 6.0)) * + (segmentCount * 6.0); + + float segment = floor(0.001 + index/6.0); + float segmentIndex = index - (segment*6.0); + + normal = -normalize(d); + + if (segmentIndex > 2.99 && segmentIndex < 3.01) { + return mix(vec3(0.0), -d, coneOffset); + } + + float nextAngle = ( + (segmentIndex > 0.99 && segmentIndex < 1.01) || + (segmentIndex > 4.99 && segmentIndex < 5.01) + ) ? 1.0 : 0.0; + float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); + + vec3 v1 = mix(d, vec3(0.0), coneOffset); + vec3 v2 = v1 - d; + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d)*0.25; + vec3 y = v * sin(angle) * length(d)*0.25; + vec3 v3 = v2 + x + y; + if (segmentIndex < 3.0) { + vec3 tx = u * sin(angle); + vec3 ty = v * -cos(angle); + vec3 tangent = tx + ty; + normal = normalize(cross(v3 - v1, tangent)); + } + + if (segmentIndex == 0.0) { + return mix(d, vec3(0.0), coneOffset); + } + return v3; +} + +attribute vec4 vector; +attribute vec4 position; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform float vectorScale, coneScale, coneOffset; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + vec3 normal; + vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal); + vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + gl_Position = projection * view * conePosition; + f_id = id; + f_position = position.xyz; +} +`]),h=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]);c.meshShader={vertex:s,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},c.pickShader={vertex:d,fragment:h,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},{glslify:231}],82:[function(a,l,c){l.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},{}],83:[function(a,l,c){var i=a("./1.0/numbers");l.exports=function(s){return i[s]}},{"./1.0/numbers":82}],84:[function(a,l,c){l.exports=function(y){var x=y.gl,w=i(x),k=s(x,[{buffer:w,type:x.FLOAT,size:3,offset:0,stride:40},{buffer:w,type:x.FLOAT,size:4,offset:12,stride:40},{buffer:w,type:x.FLOAT,size:3,offset:28,stride:40}]),b=u(x);b.attributes.position.location=0,b.attributes.color.location=1,b.attributes.offset.location=2;var T=new h(x,w,k,b);return T.update(y),T};var i=a("gl-buffer"),s=a("gl-vao"),u=a("./shaders/index"),d=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(y,x,w,k){this.gl=y,this.shader=k,this.buffer=x,this.vao=w,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 m=h.prototype;function g(y,x){for(var w=0;w<3;++w)y[0][w]=Math.min(y[0][w],x[w]),y[1][w]=Math.max(y[1][w],x[w])}m.isOpaque=function(){return!this.hasAlpha},m.isTransparent=function(){return this.hasAlpha},m.drawTransparent=m.draw=function(y){var x=this.gl,w=this.shader.uniforms;this.shader.bind();var k=w.view=y.view||d,b=w.projection=y.projection||d;w.model=y.model||d,w.clipBounds=this.clipBounds,w.opacity=this.opacity;var T=k[12],_=k[13],S=k[14],A=k[15],M=(y._ortho?2:1)*this.pixelRatio*(b[3]*T+b[7]*_+b[11]*S+b[15]*A)/x.drawingBufferHeight;this.vao.bind();for(var E=0;E<3;++E)x.lineWidth(this.lineWidth[E]*this.pixelRatio),w.capSize=this.capSize[E]*M,this.lineCount[E]&&x.drawArrays(x.LINES,this.lineOffset[E],this.lineCount[E]);this.vao.unbind()};var p=function(){for(var y=new Array(3),x=0;x<3;++x){for(var w=[],k=1;k<=2;++k)for(var b=-1;b<=1;b+=2){var T=[0,0,0];T[(k+x)%3]=b,w.push(T)}y[x]=w}return y}();function v(y,x,w,k){for(var b=p[k],T=0;T0&&((R=M.slice())[S]+=D[1][S],b.push(M[0],M[1],M[2],O[0],O[1],O[2],O[3],0,0,0,R[0],R[1],R[2],O[0],O[1],O[2],O[3],0,0,0),g(this.bounds,R),_+=2+v(b,R,O,S))}}this.lineCount[S]=_-this.lineOffset[S]}this.buffer.update(b)}},m.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":85,"gl-buffer":78,"gl-vao":150}],85:[function(a,l,c){var i=a("glslify"),s=a("gl-shader"),u=i([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position, offset; +attribute vec4 color; +uniform mat4 model, view, projection; +uniform float capSize; +varying vec4 fragColor; +varying vec3 fragPosition; + +void main() { + vec4 worldPosition = model * vec4(position, 1.0); + worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0); + gl_Position = projection * view * worldPosition; + fragColor = color; + fragPosition = position; +}`]),d=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float opacity; +varying vec3 fragPosition; +varying vec4 fragColor; + +void main() { + if ( + outOfRange(clipBounds[0], clipBounds[1], fragPosition) || + fragColor.a * opacity == 0. + ) discard; + + gl_FragColor = opacity * fragColor; +}`]);l.exports=function(h){return s(h,u,d,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},{"gl-shader":132,glslify:231}],86:[function(a,l,c){var i=a("gl-texture2d");l.exports=function(T,_,S,A){s||(s=T.FRAMEBUFFER_UNSUPPORTED,u=T.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,d=T.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,h=T.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var M=T.getExtension("WEBGL_draw_buffers");if(!m&&M&&function(P,N){var B=P.getParameter(N.MAX_COLOR_ATTACHMENTS_WEBGL);m=new Array(B+1);for(var G=0;G<=B;++G){for(var W=new Array(B),K=0;KE||S<0||S>E)throw new Error("gl-fbo: Parameters are too large for FBO");var D=1;if("color"in(A=A||{})){if((D=Math.max(0|A.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(D>1){if(!M)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(D>T.getParameter(M.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+D+" draw buffers")}}var O=T.UNSIGNED_BYTE,R=T.getExtension("OES_texture_float");if(A.float&&D>0){if(!R)throw new Error("gl-fbo: Context does not support floating point textures");O=T.FLOAT}else A.preferFloat&&D>0&&R&&(O=T.FLOAT);var z=!0;"depth"in A&&(z=!!A.depth);var L=!1;return"stencil"in A&&(L=!!A.stencil),new w(T,_,S,O,D,z,L,M)};var s,u,d,h,m=null;function g(T){return[T.getParameter(T.FRAMEBUFFER_BINDING),T.getParameter(T.RENDERBUFFER_BINDING),T.getParameter(T.TEXTURE_BINDING_2D)]}function p(T,_){T.bindFramebuffer(T.FRAMEBUFFER,_[0]),T.bindRenderbuffer(T.RENDERBUFFER,_[1]),T.bindTexture(T.TEXTURE_2D,_[2])}function v(T){switch(T){case s:throw new Error("gl-fbo: Framebuffer unsupported");case u:throw new Error("gl-fbo: Framebuffer incomplete attachment");case d:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case h:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function y(T,_,S,A,M,E){if(!A)return null;var D=i(T,_,S,M,A);return D.magFilter=T.NEAREST,D.minFilter=T.NEAREST,D.mipSamples=1,D.bind(),T.framebufferTexture2D(T.FRAMEBUFFER,E,T.TEXTURE_2D,D.handle,0),D}function x(T,_,S,A,M){var E=T.createRenderbuffer();return T.bindRenderbuffer(T.RENDERBUFFER,E),T.renderbufferStorage(T.RENDERBUFFER,A,_,S),T.framebufferRenderbuffer(T.FRAMEBUFFER,M,T.RENDERBUFFER,E),E}function w(T,_,S,A,M,E,D,O){this.gl=T,this._shape=[0|_,0|S],this._destroyed=!1,this._ext=O,this.color=new Array(M);for(var R=0;R1&&Y.drawBuffersWEBGL(m[te]);var $=B.getExtension("WEBGL_depth_texture");$?Z?P.depth=y(B,W,K,$.UNSIGNED_INT_24_8_WEBGL,B.DEPTH_STENCIL,B.DEPTH_STENCIL_ATTACHMENT):re&&(P.depth=y(B,W,K,B.UNSIGNED_SHORT,B.DEPTH_COMPONENT,B.DEPTH_ATTACHMENT)):re&&Z?P._depth_rb=x(B,W,K,B.DEPTH_STENCIL,B.DEPTH_STENCIL_ATTACHMENT):re?P._depth_rb=x(B,W,K,B.DEPTH_COMPONENT16,B.DEPTH_ATTACHMENT):Z&&(P._depth_rb=x(B,W,K,B.STENCIL_INDEX,B.STENCIL_ATTACHMENT));var ne=B.checkFramebufferStatus(B.FRAMEBUFFER);if(ne!==B.FRAMEBUFFER_COMPLETE){for(P._destroyed=!0,B.bindFramebuffer(B.FRAMEBUFFER,null),B.deleteFramebuffer(P.handle),P.handle=null,P.depth&&(P.depth.dispose(),P.depth=null),P._depth_rb&&(B.deleteRenderbuffer(P._depth_rb),P._depth_rb=null),q=0;qM||S<0||S>M)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");T._shape[0]=_,T._shape[1]=S;for(var E=g(A),D=0;D>8*z&255;this.pickOffset=k,T.bind();var L=T.uniforms;L.viewTransform=x,L.pickOffset=w,L.shape=this.shape;var P=T.attributes;return this.positionBuffer.bind(),P.position.pointer(),this.weightBuffer.bind(),P.weight.pointer(A.UNSIGNED_BYTE,!1),this.idBuffer.bind(),P.pickId.pointer(A.UNSIGNED_BYTE,!1),A.drawArrays(A.TRIANGLES,0,S),k+this.shape[0]*this.shape[1]}}}(),v.pick=function(x,w,k){var b=this.pickOffset,T=this.shape[0]*this.shape[1];if(k=b+T)return null;var _=k-b,S=this.xData,A=this.yData;return{object:this,pointId:_,dataCoord:[S[_%this.shape[0]],A[_/this.shape[0]|0]]}},v.update=function(x){var w=(x=x||{}).shape||[0,0],k=x.x||s(w[0]),b=x.y||s(w[1]),T=x.z||new Float32Array(w[0]*w[1]),_=x.zsmooth!==!1;this.xData=k,this.yData=b;var S,A,M,E,D=x.colorLevels||[0],O=x.colorValues||[0,0,0,1],R=D.length,z=this.bounds;_?(S=z[0]=k[0],A=z[1]=b[0],M=z[2]=k[k.length-1],E=z[3]=b[b.length-1]):(S=z[0]=k[0]+(k[1]-k[0])/2,A=z[1]=b[0]+(b[1]-b[0])/2,M=z[2]=k[k.length-1]+(k[k.length-1]-k[k.length-2])/2,E=z[3]=b[b.length-1]+(b[b.length-1]-b[b.length-2])/2);var L=1/(M-S),P=1/(E-A),N=w[0],B=w[1];this.shape=[N,B];var G=(_?(N-1)*(B-1):N*B)*(y.length>>>1);this.numVertices=G;for(var W=u.mallocUint8(4*G),K=u.mallocFloat32(2*G),te=u.mallocUint8(2*G),Y=u.mallocUint32(G),Z=0,re=_?N-1:N,U=_?B-1:B,q=0;q max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform sampler2D dashTexture; +uniform float dashScale; +uniform float opacity; + +varying vec3 worldPosition; +varying float pixelArcLength; +varying vec4 fragColor; + +void main() { + if ( + outOfRange(clipBounds[0], clipBounds[1], worldPosition) || + fragColor.a * opacity == 0. + ) discard; + + float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r; + if(dashWeight < 0.5) { + discard; + } + gl_FragColor = fragColor * opacity; +} +`]),h=i([`precision highp float; +#define GLSLIFY 1 + +#define FLOAT_MAX 1.70141184e38 +#define FLOAT_MIN 1.17549435e-38 + +// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl +vec4 packFloat(float v) { + float av = abs(v); + + //Handle special cases + if(av < FLOAT_MIN) { + return vec4(0.0, 0.0, 0.0, 0.0); + } else if(v > FLOAT_MAX) { + return vec4(127.0, 128.0, 0.0, 0.0) / 255.0; + } else if(v < -FLOAT_MAX) { + return vec4(255.0, 128.0, 0.0, 0.0) / 255.0; + } + + vec4 c = vec4(0,0,0,0); + + //Compute exponent and mantissa + float e = floor(log2(av)); + float m = av * pow(2.0, -e) - 1.0; + + //Unpack mantissa + c[1] = floor(128.0 * m); + m -= c[1] / 128.0; + c[2] = floor(32768.0 * m); + m -= c[2] / 32768.0; + c[3] = floor(8388608.0 * m); + + //Unpack exponent + float ebias = e + 127.0; + c[0] = floor(ebias / 2.0); + ebias -= c[0] * 2.0; + c[1] += floor(ebias) * 128.0; + + //Unpack sign bit + c[0] += 128.0 * step(0.0, -v); + + //Scale back to range + return c / 255.0; +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform float pickId; +uniform vec3 clipBounds[2]; + +varying vec3 worldPosition; +varying float pixelArcLength; +varying vec4 fragColor; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard; + + gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz); +}`]),m=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];c.createShader=function(g){return s(g,u,d,null,m)},c.createPickShader=function(g){return s(g,u,h,null,m)}},{"gl-shader":132,glslify:231}],91:[function(a,l,c){l.exports=function(S){var A=S.gl||S.scene&&S.scene.gl,M=v(A);M.attributes.position.location=0,M.attributes.nextPosition.location=1,M.attributes.arcLength.location=2,M.attributes.lineWidth.location=3,M.attributes.color.location=4;var E=y(A);E.attributes.position.location=0,E.attributes.nextPosition.location=1,E.attributes.arcLength.location=2,E.attributes.lineWidth.location=3,E.attributes.color.location=4;for(var D=i(A),O=s(A,[{buffer:D,size:3,offset:0,stride:48},{buffer:D,size:3,offset:12,stride:48},{buffer:D,size:1,offset:24,stride:48},{buffer:D,size:1,offset:28,stride:48},{buffer:D,size:4,offset:32,stride:48}]),R=g(new Array(1024),[256,1,4]),z=0;z<1024;++z)R.data[z]=255;var L=u(A,R);L.wrap=A.REPEAT;var P=new T(A,M,E,D,O,L);return P.update(S),P};var i=a("gl-buffer"),s=a("gl-vao"),u=a("gl-texture2d"),d=new Uint8Array(4),h=new Float32Array(d.buffer),m=a("binary-search-bounds"),g=a("ndarray"),p=a("./lib/shaders"),v=p.createShader,y=p.createPickShader,x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function w(S,A){for(var M=0,E=0;E<3;++E){var D=S[E]-A[E];M+=D*D}return Math.sqrt(M)}function k(S){for(var A=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],M=0;M<3;++M)A[0][M]=Math.max(S[0][M],A[0][M]),A[1][M]=Math.min(S[1][M],A[1][M]);return A}function b(S,A,M,E){this.arcLength=S,this.position=A,this.index=M,this.dataCoordinate=E}function T(S,A,M,E,D,O){this.gl=S,this.shader=A,this.pickShader=M,this.buffer=E,this.vao=D,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=O,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var _=T.prototype;_.isTransparent=function(){return this.hasAlpha},_.isOpaque=function(){return!this.hasAlpha},_.pickSlots=1,_.setPickBase=function(S){this.pickId=S},_.drawTransparent=_.draw=function(S){if(this.vertexCount){var A=this.gl,M=this.shader,E=this.vao;M.bind(),M.uniforms={model:S.model||x,view:S.view||x,projection:S.projection||x,clipBounds:k(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[A.drawingBufferWidth,A.drawingBufferHeight],pixelRatio:this.pixelRatio},E.bind(),E.draw(A.TRIANGLE_STRIP,this.vertexCount),E.unbind()}},_.drawPick=function(S){if(this.vertexCount){var A=this.gl,M=this.pickShader,E=this.vao;M.bind(),M.uniforms={model:S.model||x,view:S.view||x,projection:S.projection||x,pickId:this.pickId,clipBounds:k(this.clipBounds),screenShape:[A.drawingBufferWidth,A.drawingBufferHeight],pixelRatio:this.pixelRatio},E.bind(),E.draw(A.TRIANGLE_STRIP,this.vertexCount),E.unbind()}},_.update=function(S){var A,M;this.dirty=!0;var E=!!S.connectGaps;"dashScale"in S&&(this.dashScale=S.dashScale),this.hasAlpha=!1,"opacity"in S&&(this.opacity=+S.opacity,this.opacity<1&&(this.hasAlpha=!0));var D=[],O=[],R=[],z=0,L=0,P=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],N=S.position||S.positions;if(N){var B=S.color||S.colors||[0,0,0,1],G=S.lineWidth||1,W=!1;e:for(A=1;A0){for(var U=0;U<24;++U)D.push(D[D.length-12]);L+=2,W=!0}continue e}P[0][M]=Math.min(P[0][M],Z[M],re[M]),P[1][M]=Math.max(P[1][M],Z[M],re[M])}Array.isArray(B[0])?(K=B.length>A-1?B[A-1]:B.length>0?B[B.length-1]:[0,0,0,1],te=B.length>A?B[A]:B.length>0?B[B.length-1]:[0,0,0,1]):K=te=B,K.length===3&&(K=[K[0],K[1],K[2],1]),te.length===3&&(te=[te[0],te[1],te[2],1]),!this.hasAlpha&&K[3]<1&&(this.hasAlpha=!0),Y=Array.isArray(G)?G.length>A-1?G[A-1]:G.length>0?G[G.length-1]:[0,0,0,1]:G;var q=z;if(z+=w(Z,re),W){for(M=0;M<2;++M)D.push(Z[0],Z[1],Z[2],re[0],re[1],re[2],q,Y,K[0],K[1],K[2],K[3]);L+=2,W=!1}D.push(Z[0],Z[1],Z[2],re[0],re[1],re[2],q,Y,K[0],K[1],K[2],K[3],Z[0],Z[1],Z[2],re[0],re[1],re[2],q,-Y,K[0],K[1],K[2],K[3],re[0],re[1],re[2],Z[0],Z[1],Z[2],z,-Y,te[0],te[1],te[2],te[3],re[0],re[1],re[2],Z[0],Z[1],Z[2],z,Y,te[0],te[1],te[2],te[3]),L+=4}}if(this.buffer.update(D),O.push(z),R.push(N[N.length-1].slice()),this.bounds=P,this.vertexCount=L,this.points=R,this.arcLength=O,"dashes"in S){var $=S.dashes.slice();for($.unshift(0),A=1;A<$.length;++A)$[A]=$[A-1]+$[A];var ne=g(new Array(1024),[256,1,4]);for(A=0;A<256;++A){for(M=0;M<4;++M)ne.set(A,0,M,0);1&m.le($,$[$.length-1]*A/255)?ne.set(A,0,0,0):ne.set(A,0,0,255)}this.texture.setPixels(ne)}},_.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},_.pick=function(S){if(!S||S.id!==this.pickId)return null;var A=function(N,B,G,W){return d[0]=W,d[1]=G,d[2]=B,d[3]=N,h[0]}(S.value[0],S.value[1],S.value[2],0),M=m.le(this.arcLength,A);if(M<0)return null;if(M===this.arcLength.length-1)return new b(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),M);for(var E=this.points[M],D=this.points[Math.min(M+1,this.points.length-1)],O=(A-this.arcLength[M])/(this.arcLength[M+1]-this.arcLength[M]),R=1-O,z=[0,0,0],L=0;L<3;++L)z[L]=R*E[L]+O*D[L];var P=Math.min(O<.5?M:M+1,this.points.length-1);return new b(A,z,P,this.points[P])}},{"./lib/shaders":90,"binary-search-bounds":31,"gl-buffer":78,"gl-texture2d":146,"gl-vao":150,ndarray:259}],92:[function(a,l,c){l.exports=function(i){var s=new Float32Array(16);return s[0]=i[0],s[1]=i[1],s[2]=i[2],s[3]=i[3],s[4]=i[4],s[5]=i[5],s[6]=i[6],s[7]=i[7],s[8]=i[8],s[9]=i[9],s[10]=i[10],s[11]=i[11],s[12]=i[12],s[13]=i[13],s[14]=i[14],s[15]=i[15],s}},{}],93:[function(a,l,c){l.exports=function(){var i=new Float32Array(16);return i[0]=1,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=1,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=1,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,i}},{}],94:[function(a,l,c){l.exports=function(i){var s=i[0],u=i[1],d=i[2],h=i[3],m=i[4],g=i[5],p=i[6],v=i[7],y=i[8],x=i[9],w=i[10],k=i[11],b=i[12],T=i[13],_=i[14],S=i[15];return(s*g-u*m)*(w*S-k*_)-(s*p-d*m)*(x*S-k*T)+(s*v-h*m)*(x*_-w*T)+(u*p-d*g)*(y*S-k*b)-(u*v-h*g)*(y*_-w*b)+(d*v-h*p)*(y*T-x*b)}},{}],95:[function(a,l,c){l.exports=function(i,s){var u=s[0],d=s[1],h=s[2],m=s[3],g=u+u,p=d+d,v=h+h,y=u*g,x=d*g,w=d*p,k=h*g,b=h*p,T=h*v,_=m*g,S=m*p,A=m*v;return i[0]=1-w-T,i[1]=x+A,i[2]=k-S,i[3]=0,i[4]=x-A,i[5]=1-y-T,i[6]=b+_,i[7]=0,i[8]=k+S,i[9]=b-_,i[10]=1-y-w,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,i}},{}],96:[function(a,l,c){l.exports=function(i,s,u){var d=s[0],h=s[1],m=s[2],g=s[3],p=d+d,v=h+h,y=m+m,x=d*p,w=d*v,k=d*y,b=h*v,T=h*y,_=m*y,S=g*p,A=g*v,M=g*y;return i[0]=1-(b+_),i[1]=w+M,i[2]=k-A,i[3]=0,i[4]=w-M,i[5]=1-(x+_),i[6]=T+S,i[7]=0,i[8]=k+A,i[9]=T-S,i[10]=1-(x+b),i[11]=0,i[12]=u[0],i[13]=u[1],i[14]=u[2],i[15]=1,i}},{}],97:[function(a,l,c){l.exports=function(i){return i[0]=1,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=1,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=1,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,i}},{}],98:[function(a,l,c){l.exports=function(i,s){var u=s[0],d=s[1],h=s[2],m=s[3],g=s[4],p=s[5],v=s[6],y=s[7],x=s[8],w=s[9],k=s[10],b=s[11],T=s[12],_=s[13],S=s[14],A=s[15],M=u*p-d*g,E=u*v-h*g,D=u*y-m*g,O=d*v-h*p,R=d*y-m*p,z=h*y-m*v,L=x*_-w*T,P=x*S-k*T,N=x*A-b*T,B=w*S-k*_,G=w*A-b*_,W=k*A-b*S,K=M*W-E*G+D*B+O*N-R*P+z*L;return K?(K=1/K,i[0]=(p*W-v*G+y*B)*K,i[1]=(h*G-d*W-m*B)*K,i[2]=(_*z-S*R+A*O)*K,i[3]=(k*R-w*z-b*O)*K,i[4]=(v*N-g*W-y*P)*K,i[5]=(u*W-h*N+m*P)*K,i[6]=(S*D-T*z-A*E)*K,i[7]=(x*z-k*D+b*E)*K,i[8]=(g*G-p*N+y*L)*K,i[9]=(d*N-u*G-m*L)*K,i[10]=(T*R-_*D+A*M)*K,i[11]=(w*D-x*R-b*M)*K,i[12]=(p*P-g*B-v*L)*K,i[13]=(u*B-d*P+h*L)*K,i[14]=(_*E-T*O-S*M)*K,i[15]=(x*O-w*E+k*M)*K,i):null}},{}],99:[function(a,l,c){var i=a("./identity");l.exports=function(s,u,d,h){var m,g,p,v,y,x,w,k,b,T,_=u[0],S=u[1],A=u[2],M=h[0],E=h[1],D=h[2],O=d[0],R=d[1],z=d[2];return Math.abs(_-O)<1e-6&&Math.abs(S-R)<1e-6&&Math.abs(A-z)<1e-6?i(s):(w=_-O,k=S-R,b=A-z,T=1/Math.sqrt(w*w+k*k+b*b),m=E*(b*=T)-D*(k*=T),g=D*(w*=T)-M*b,p=M*k-E*w,(T=Math.sqrt(m*m+g*g+p*p))?(m*=T=1/T,g*=T,p*=T):(m=0,g=0,p=0),v=k*p-b*g,y=b*m-w*p,x=w*g-k*m,(T=Math.sqrt(v*v+y*y+x*x))?(v*=T=1/T,y*=T,x*=T):(v=0,y=0,x=0),s[0]=m,s[1]=v,s[2]=w,s[3]=0,s[4]=g,s[5]=y,s[6]=k,s[7]=0,s[8]=p,s[9]=x,s[10]=b,s[11]=0,s[12]=-(m*_+g*S+p*A),s[13]=-(v*_+y*S+x*A),s[14]=-(w*_+k*S+b*A),s[15]=1,s)}},{"./identity":97}],100:[function(a,l,c){l.exports=function(i,s,u){var d=s[0],h=s[1],m=s[2],g=s[3],p=s[4],v=s[5],y=s[6],x=s[7],w=s[8],k=s[9],b=s[10],T=s[11],_=s[12],S=s[13],A=s[14],M=s[15],E=u[0],D=u[1],O=u[2],R=u[3];return i[0]=E*d+D*p+O*w+R*_,i[1]=E*h+D*v+O*k+R*S,i[2]=E*m+D*y+O*b+R*A,i[3]=E*g+D*x+O*T+R*M,E=u[4],D=u[5],O=u[6],R=u[7],i[4]=E*d+D*p+O*w+R*_,i[5]=E*h+D*v+O*k+R*S,i[6]=E*m+D*y+O*b+R*A,i[7]=E*g+D*x+O*T+R*M,E=u[8],D=u[9],O=u[10],R=u[11],i[8]=E*d+D*p+O*w+R*_,i[9]=E*h+D*v+O*k+R*S,i[10]=E*m+D*y+O*b+R*A,i[11]=E*g+D*x+O*T+R*M,E=u[12],D=u[13],O=u[14],R=u[15],i[12]=E*d+D*p+O*w+R*_,i[13]=E*h+D*v+O*k+R*S,i[14]=E*m+D*y+O*b+R*A,i[15]=E*g+D*x+O*T+R*M,i}},{}],101:[function(a,l,c){l.exports=function(i,s,u,d,h,m,g){var p=1/(s-u),v=1/(d-h),y=1/(m-g);return i[0]=-2*p,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=-2*v,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=2*y,i[11]=0,i[12]=(s+u)*p,i[13]=(h+d)*v,i[14]=(g+m)*y,i[15]=1,i}},{}],102:[function(a,l,c){l.exports=function(i,s,u,d,h){var m=1/Math.tan(s/2),g=1/(d-h);return i[0]=m/u,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=m,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=(h+d)*g,i[11]=-1,i[12]=0,i[13]=0,i[14]=2*h*d*g,i[15]=0,i}},{}],103:[function(a,l,c){l.exports=function(i,s,u,d){var h,m,g,p,v,y,x,w,k,b,T,_,S,A,M,E,D,O,R,z,L,P,N,B,G=d[0],W=d[1],K=d[2],te=Math.sqrt(G*G+W*W+K*K);return Math.abs(te)<1e-6?null:(G*=te=1/te,W*=te,K*=te,h=Math.sin(u),m=Math.cos(u),g=1-m,p=s[0],v=s[1],y=s[2],x=s[3],w=s[4],k=s[5],b=s[6],T=s[7],_=s[8],S=s[9],A=s[10],M=s[11],E=G*G*g+m,D=W*G*g+K*h,O=K*G*g-W*h,R=G*W*g-K*h,z=W*W*g+m,L=K*W*g+G*h,P=G*K*g+W*h,N=W*K*g-G*h,B=K*K*g+m,i[0]=p*E+w*D+_*O,i[1]=v*E+k*D+S*O,i[2]=y*E+b*D+A*O,i[3]=x*E+T*D+M*O,i[4]=p*R+w*z+_*L,i[5]=v*R+k*z+S*L,i[6]=y*R+b*z+A*L,i[7]=x*R+T*z+M*L,i[8]=p*P+w*N+_*B,i[9]=v*P+k*N+S*B,i[10]=y*P+b*N+A*B,i[11]=x*P+T*N+M*B,s!==i&&(i[12]=s[12],i[13]=s[13],i[14]=s[14],i[15]=s[15]),i)}},{}],104:[function(a,l,c){l.exports=function(i,s,u){var d=Math.sin(u),h=Math.cos(u),m=s[4],g=s[5],p=s[6],v=s[7],y=s[8],x=s[9],w=s[10],k=s[11];return s!==i&&(i[0]=s[0],i[1]=s[1],i[2]=s[2],i[3]=s[3],i[12]=s[12],i[13]=s[13],i[14]=s[14],i[15]=s[15]),i[4]=m*h+y*d,i[5]=g*h+x*d,i[6]=p*h+w*d,i[7]=v*h+k*d,i[8]=y*h-m*d,i[9]=x*h-g*d,i[10]=w*h-p*d,i[11]=k*h-v*d,i}},{}],105:[function(a,l,c){l.exports=function(i,s,u){var d=Math.sin(u),h=Math.cos(u),m=s[0],g=s[1],p=s[2],v=s[3],y=s[8],x=s[9],w=s[10],k=s[11];return s!==i&&(i[4]=s[4],i[5]=s[5],i[6]=s[6],i[7]=s[7],i[12]=s[12],i[13]=s[13],i[14]=s[14],i[15]=s[15]),i[0]=m*h-y*d,i[1]=g*h-x*d,i[2]=p*h-w*d,i[3]=v*h-k*d,i[8]=m*d+y*h,i[9]=g*d+x*h,i[10]=p*d+w*h,i[11]=v*d+k*h,i}},{}],106:[function(a,l,c){l.exports=function(i,s,u){var d=Math.sin(u),h=Math.cos(u),m=s[0],g=s[1],p=s[2],v=s[3],y=s[4],x=s[5],w=s[6],k=s[7];return s!==i&&(i[8]=s[8],i[9]=s[9],i[10]=s[10],i[11]=s[11],i[12]=s[12],i[13]=s[13],i[14]=s[14],i[15]=s[15]),i[0]=m*h+y*d,i[1]=g*h+x*d,i[2]=p*h+w*d,i[3]=v*h+k*d,i[4]=y*h-m*d,i[5]=x*h-g*d,i[6]=w*h-p*d,i[7]=k*h-v*d,i}},{}],107:[function(a,l,c){l.exports=function(i,s,u){var d=u[0],h=u[1],m=u[2];return i[0]=s[0]*d,i[1]=s[1]*d,i[2]=s[2]*d,i[3]=s[3]*d,i[4]=s[4]*h,i[5]=s[5]*h,i[6]=s[6]*h,i[7]=s[7]*h,i[8]=s[8]*m,i[9]=s[9]*m,i[10]=s[10]*m,i[11]=s[11]*m,i[12]=s[12],i[13]=s[13],i[14]=s[14],i[15]=s[15],i}},{}],108:[function(a,l,c){l.exports=function(i,s,u){var d,h,m,g,p,v,y,x,w,k,b,T,_=u[0],S=u[1],A=u[2];return s===i?(i[12]=s[0]*_+s[4]*S+s[8]*A+s[12],i[13]=s[1]*_+s[5]*S+s[9]*A+s[13],i[14]=s[2]*_+s[6]*S+s[10]*A+s[14],i[15]=s[3]*_+s[7]*S+s[11]*A+s[15]):(d=s[0],h=s[1],m=s[2],g=s[3],p=s[4],v=s[5],y=s[6],x=s[7],w=s[8],k=s[9],b=s[10],T=s[11],i[0]=d,i[1]=h,i[2]=m,i[3]=g,i[4]=p,i[5]=v,i[6]=y,i[7]=x,i[8]=w,i[9]=k,i[10]=b,i[11]=T,i[12]=d*_+p*S+w*A+s[12],i[13]=h*_+v*S+k*A+s[13],i[14]=m*_+y*S+b*A+s[14],i[15]=g*_+x*S+T*A+s[15]),i}},{}],109:[function(a,l,c){l.exports=function(i,s){if(i===s){var u=s[1],d=s[2],h=s[3],m=s[6],g=s[7],p=s[11];i[1]=s[4],i[2]=s[8],i[3]=s[12],i[4]=u,i[6]=s[9],i[7]=s[13],i[8]=d,i[9]=m,i[11]=s[14],i[12]=h,i[13]=g,i[14]=p}else i[0]=s[0],i[1]=s[4],i[2]=s[8],i[3]=s[12],i[4]=s[1],i[5]=s[5],i[6]=s[9],i[7]=s[13],i[8]=s[2],i[9]=s[6],i[10]=s[10],i[11]=s[14],i[12]=s[3],i[13]=s[7],i[14]=s[11],i[15]=s[15];return i}},{}],110:[function(a,l,c){var i=a("barycentric"),s=a("polytope-closest-point/lib/closest_point_2d.js");function u(m,g){for(var p=[0,0,0,0],v=0;v<4;++v)for(var y=0;y<4;++y)p[y]+=m[4*v+y]*g[v];return p}function d(m,g,p,v,y){for(var x=u(v,u(p,u(g,[m[0],m[1],m[2],1]))),w=0;w<3;++w)x[w]/=x[3];return[.5*y[0]*(1+x[0]),.5*y[1]*(1-x[1])]}function h(m,g){for(var p=[0,0,0],v=0;v1.0001)return null;M+=A[k]}return Math.abs(M-1)>.001?null:[b,h(m,A),A]}},{barycentric:14,"polytope-closest-point/lib/closest_point_2d.js":270}],111:[function(a,l,c){var i=a("glslify"),s=i([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position, normal; +attribute vec4 color; +attribute vec2 uv; + +uniform mat4 model + , view + , projection + , inverseModel; +uniform vec3 eyePosition + , lightPosition; + +varying vec3 f_normal + , f_lightDirection + , f_eyeDirection + , f_data; +varying vec4 f_color; +varying vec2 f_uv; + +vec4 project(vec3 p) { + return projection * view * model * vec4(p, 1.0); +} + +void main() { + gl_Position = project(position); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * vec4(position , 1.0); + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + f_color = color; + f_data = position; + f_uv = uv; +} +`]),u=i([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness + , fresnel + , kambient + , kdiffuse + , kspecular; +uniform sampler2D texture; + +varying vec3 f_normal + , f_lightDirection + , f_eyeDirection + , f_data; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (f_color.a == 0.0 || + outOfRange(clipBounds[0], clipBounds[1], f_data) + ) discard; + + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d + + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * f_color.a; +} +`]),d=i([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec4 color; +attribute vec2 uv; + +uniform mat4 model, view, projection; + +varying vec4 f_color; +varying vec3 f_data; +varying vec2 f_uv; + +void main() { + gl_Position = projection * view * model * vec4(position, 1.0); + f_color = color; + f_data = position; + f_uv = uv; +}`]),h=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform sampler2D texture; +uniform float opacity; + +varying vec4 f_color; +varying vec3 f_data; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; + + gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; +}`]),m=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 uv; +attribute float pointSize; + +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0); + } else { + gl_Position = projection * view * model * vec4(position, 1.0); + } + gl_PointSize = pointSize; + f_color = color; + f_uv = uv; +}`]),g=i([`precision highp float; +#define GLSLIFY 1 + +uniform sampler2D texture; +uniform float opacity; + +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5); + if(dot(pointR, pointR) > 0.25) { + discard; + } + gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; +}`]),p=i([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec4 id; + +uniform mat4 model, view, projection; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + gl_Position = projection * view * model * vec4(position, 1.0); + f_id = id; + f_position = position; +}`]),v=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]),y=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute float pointSize; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0.0, 0.0, 0.0, 0.0); + } else { + gl_Position = projection * view * model * vec4(position, 1.0); + gl_PointSize = pointSize; + } + f_id = id; + f_position = position; +}`]),x=i([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; + +uniform mat4 model, view, projection; + +void main() { + gl_Position = projection * view * model * vec4(position, 1.0); +}`]),w=i([`precision highp float; +#define GLSLIFY 1 + +uniform vec3 contourColor; + +void main() { + gl_FragColor = vec4(contourColor, 1.0); +} +`]);c.meshShader={vertex:s,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},c.wireShader={vertex:d,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},c.pointShader={vertex:m,fragment:g,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},c.pickShader={vertex:p,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},c.pointPickShader={vertex:y,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},c.contourShader={vertex:x,fragment:w,attributes:[{name:"position",type:"vec3"}]}},{glslify:231}],112:[function(a,l,c){var i=a("gl-shader"),s=a("gl-buffer"),u=a("gl-vao"),d=a("gl-texture2d"),h=a("normals"),m=a("gl-mat4/multiply"),g=a("gl-mat4/invert"),p=a("ndarray"),v=a("colormap"),y=a("simplicial-complex-contour"),x=a("typedarray-pool"),w=a("./lib/shaders"),k=a("./lib/closest-point"),b=w.meshShader,T=w.wireShader,_=w.pointShader,S=w.pickShader,A=w.pointPickShader,M=w.contourShader,E=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function D(W,K,te,Y,Z,re,U,q,$,ne,H,Q,ee,ie,ae,ue,le,ge,fe,me,_e,we,Te,Oe,de,ye,Me){this.gl=W,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=K,this.dirty=!0,this.triShader=te,this.lineShader=Y,this.pointShader=Z,this.pickShader=re,this.pointPickShader=U,this.contourShader=q,this.trianglePositions=$,this.triangleColors=H,this.triangleNormals=ee,this.triangleUVs=Q,this.triangleIds=ne,this.triangleVAO=ie,this.triangleCount=0,this.lineWidth=1,this.edgePositions=ae,this.edgeColors=le,this.edgeUVs=ge,this.edgeIds=ue,this.edgeVAO=fe,this.edgeCount=0,this.pointPositions=me,this.pointColors=we,this.pointUVs=Te,this.pointSizes=Oe,this.pointIds=_e,this.pointVAO=de,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=ye,this.contourVAO=Me,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=E,this._view=E,this._projection=E,this._resolution=[1,1]}var O=D.prototype;function R(W,K){if(!K||!K.length)return 1;for(var te=0;teW&&te>0){var Y=(K[te][0]-W)/(K[te][0]-K[te-1][0]);return K[te][1]*(1-Y)+Y*K[te-1][1]}}return 1}function z(W){var K=i(W,b.vertex,b.fragment);return K.attributes.position.location=0,K.attributes.color.location=2,K.attributes.uv.location=3,K.attributes.normal.location=4,K}function L(W){var K=i(W,T.vertex,T.fragment);return K.attributes.position.location=0,K.attributes.color.location=2,K.attributes.uv.location=3,K}function P(W){var K=i(W,_.vertex,_.fragment);return K.attributes.position.location=0,K.attributes.color.location=2,K.attributes.uv.location=3,K.attributes.pointSize.location=4,K}function N(W){var K=i(W,S.vertex,S.fragment);return K.attributes.position.location=0,K.attributes.id.location=1,K}function B(W){var K=i(W,A.vertex,A.fragment);return K.attributes.position.location=0,K.attributes.id.location=1,K.attributes.pointSize.location=4,K}function G(W){var K=i(W,M.vertex,M.fragment);return K.attributes.position.location=0,K}O.isOpaque=function(){return!this.hasAlpha},O.isTransparent=function(){return this.hasAlpha},O.pickSlots=1,O.setPickBase=function(W){this.pickId=W},O.highlight=function(W){if(W&&this.contourEnable){for(var K=y(this.cells,this.intensity,W.intensity),te=K.cells,Y=K.vertexIds,Z=K.vertexWeights,re=te.length,U=x.mallocFloat32(6*re),q=0,$=0;$0&&((ne=this.triShader).bind(),ne.uniforms=q,this.triangleVAO.bind(),K.drawArrays(K.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((ne=this.lineShader).bind(),ne.uniforms=q,this.edgeVAO.bind(),K.lineWidth(this.lineWidth*this.pixelRatio),K.drawArrays(K.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((ne=this.pointShader).bind(),ne.uniforms=q,this.pointVAO.bind(),K.drawArrays(K.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((ne=this.contourShader).bind(),ne.uniforms=q,this.contourVAO.bind(),K.drawArrays(K.LINES,0,this.contourCount),this.contourVAO.unbind())},O.drawPick=function(W){W=W||{};for(var K=this.gl,te=W.model||E,Y=W.view||E,Z=W.projection||E,re=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],U=0;U<3;++U)re[0][U]=Math.max(re[0][U],this.clipBounds[0][U]),re[1][U]=Math.min(re[1][U],this.clipBounds[1][U]);this._model=[].slice.call(te),this._view=[].slice.call(Y),this._projection=[].slice.call(Z),this._resolution=[K.drawingBufferWidth,K.drawingBufferHeight];var q,$={model:te,view:Y,projection:Z,clipBounds:re,pickId:this.pickId/255};(q=this.pickShader).bind(),q.uniforms=$,this.triangleCount>0&&(this.triangleVAO.bind(),K.drawArrays(K.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),K.lineWidth(this.lineWidth*this.pixelRatio),K.drawArrays(K.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((q=this.pointPickShader).bind(),q.uniforms=$,this.pointVAO.bind(),K.drawArrays(K.POINTS,0,this.pointCount),this.pointVAO.unbind())},O.pick=function(W){if(!W||W.id!==this.pickId)return null;for(var K=W.value[0]+256*W.value[1]+65536*W.value[2],te=this.cells[K],Y=this.positions,Z=new Array(te.length),re=0;reA[Z]&&(_.uniforms.dataAxis=g,_.uniforms.screenOffset=p,_.uniforms.color=P[b],_.uniforms.angle=N[b],M.drawArrays(M.TRIANGLES,A[Z],A[re]-A[Z]))),B[b]&&Y&&(p[1^b]-=U*R*G[b],_.uniforms.dataAxis=v,_.uniforms.screenOffset=p,_.uniforms.color=W[b],_.uniforms.angle=K[b],M.drawArrays(M.TRIANGLES,te,Y)),p[1^b]=U*E[2+(1^b)]-1,z[b+2]&&(p[1^b]+=U*R*L[b+2],ZA[Z]&&(_.uniforms.dataAxis=g,_.uniforms.screenOffset=p,_.uniforms.color=P[b+2],_.uniforms.angle=N[b+2],M.drawArrays(M.TRIANGLES,A[Z],A[re]-A[Z]))),B[b+2]&&Y&&(p[1^b]+=U*R*G[b+2],_.uniforms.dataAxis=v,_.uniforms.screenOffset=p,_.uniforms.color=W[b+2],_.uniforms.angle=K[b+2],M.drawArrays(M.TRIANGLES,te,Y))}),k.drawTitle=function(){var b=[0,0],T=[0,0];return function(){var _=this.plot,S=this.shader,A=_.gl,M=_.screenBox,E=_.titleCenter,D=_.titleAngle,O=_.titleColor,R=_.pixelRatio;if(this.titleCount){for(var z=0;z<2;++z)T[z]=2*(E[z]*R-M[z])/(M[2+z]-M[z])-1;S.bind(),S.uniforms.dataAxis=b,S.uniforms.screenOffset=T,S.uniforms.angle=D,S.uniforms.color=O,A.drawArrays(A.TRIANGLES,this.titleOffset,this.titleCount)}}}(),k.bind=(y=[0,0],x=[0,0],w=[0,0],function(){var b=this.plot,T=this.shader,_=b._tickBounds,S=b.dataBox,A=b.screenBox,M=b.viewBox;T.bind();for(var E=0;E<2;++E){var D=_[E],O=_[E+2]-D,R=.5*(S[E+2]+S[E]),z=S[E+2]-S[E],L=M[E],P=M[E+2]-L,N=A[E],B=A[E+2]-N;x[E]=2*O/z*P/B,y[E]=2*(D-R)/z*P/B}w[1]=2*b.pixelRatio/(A[3]-A[1]),w[0]=w[1]*(A[3]-A[1])/(A[2]-A[0]),T.uniforms.dataScale=x,T.uniforms.dataShift=y,T.uniforms.textScale=w,this.vbo.bind(),T.attributes.textCoordinate.pointer()}),k.update=function(b){var T,_,S,A,M,E=[],D=b.ticks,O=b.bounds;for(M=0;M<2;++M){var R=[Math.floor(E.length/3)],z=[-1/0],L=D[M];for(T=0;T=0){var L=x[z]-k[z]*(x[z+2]-x[z])/(k[z+2]-k[z]);z===0?_.drawLine(L,x[1],L,x[3],R[z],O[z]):_.drawLine(x[0],L,x[2],L,R[z],O[z])}}for(z=0;z=0;--y)this.objects[y].dispose();for(this.objects.length=0,y=this.overlays.length-1;y>=0;--y)this.overlays[y].dispose();this.overlays.length=0,this.gl=null},g.addObject=function(y){this.objects.indexOf(y)<0&&(this.objects.push(y),this.setDirty())},g.removeObject=function(y){for(var x=this.objects,w=0;wMath.abs(A))y.rotate(D,0,0,-S*M*Math.PI*T.rotateSpeed/window.innerWidth);else if(!T._ortho){var O=-T.zoomSpeed*E*A/window.innerHeight*(D-y.lastT())/20;y.pan(D,0,0,w*(Math.exp(O)-1))}}},!0)},T.enableMouseListeners(),T};var i=a("right-now"),s=a("3d-view"),u=a("mouse-change"),d=a("mouse-wheel"),h=a("mouse-event-offset"),m=a("has-passive-events")},{"3d-view":7,"has-passive-events":232,"mouse-change":247,"mouse-event-offset":248,"mouse-wheel":250,"right-now":278}],120:[function(a,l,c){var i=a("glslify"),s=a("gl-shader"),u=i([`precision mediump float; +#define GLSLIFY 1 +attribute vec2 position; +varying vec2 uv; +void main() { + uv = position; + gl_Position = vec4(position, 0, 1); +}`]),d=i([`precision mediump float; +#define GLSLIFY 1 + +uniform sampler2D accumBuffer; +varying vec2 uv; + +void main() { + vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); + gl_FragColor = min(vec4(1,1,1,1), accum); +}`]);l.exports=function(h){return s(h,u,d,null,[{name:"position",type:"vec2"}])}},{"gl-shader":132,glslify:231}],121:[function(a,l,c){var i=a("./camera.js"),s=a("gl-axes3d"),u=a("gl-axes3d/properties"),d=a("gl-spikes3d"),h=a("gl-select-static"),m=a("gl-fbo"),g=a("a-big-triangle"),p=a("mouse-change"),v=a("gl-mat4/perspective"),y=a("gl-mat4/ortho"),x=a("./lib/shader"),w=a("is-mobile")({tablet:!0,featureDetect:!0});function k(){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 b(_){var S=Math.round(Math.log(Math.abs(_))/Math.log(10));if(S<0){var A=Math.round(Math.pow(10,-S));return Math.ceil(_*A)/A}return S>0?(A=Math.round(Math.pow(10,S)),Math.ceil(_/A)*A):Math.ceil(_)}function T(_){return typeof _!="boolean"||_}l.exports={createScene:function(_){(_=_||{}).camera=_.camera||{};var S=_.canvas;S||(S=document.createElement("canvas"),_.container?_.container.appendChild(S):document.body.appendChild(S));var A=_.gl;if(A||(_.glOptions&&(w=!!_.glOptions.preserveDrawingBuffer),A=function(fe,me){var _e=null;try{(_e=fe.getContext("webgl",me))||(_e=fe.getContext("experimental-webgl",me))}catch{return null}return _e}(S,_.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:w})),!A)throw new Error("webgl not supported");var M=_.bounds||[[-10,-10,-10],[10,10,10]],E=new k,D=m(A,A.drawingBufferWidth,A.drawingBufferHeight,{preferFloat:!w}),O=x(A),R=_.cameraObject&&_.cameraObject._ortho===!0||_.camera.projection&&_.camera.projection.type==="orthographic"||!1,z={eye:_.camera.eye||[2,0,0],center:_.camera.center||[0,0,0],up:_.camera.up||[0,1,0],zoomMin:_.camera.zoomMax||.1,zoomMax:_.camera.zoomMin||100,mode:_.camera.mode||"turntable",_ortho:R},L=_.axes||{},P=s(A,L);P.enable=!L.disable;var N=_.spikes||{},B=d(A,N),G=[],W=[],K=[],te=[],Y=!0,Z=!0,re=new Array(16),U=new Array(16),q={view:null,projection:re,model:U,_ortho:!1},$=(Z=!0,[A.drawingBufferWidth,A.drawingBufferHeight]),ne=_.cameraObject||i(S,z),H={gl:A,contextLost:!1,pixelRatio:_.pixelRatio||1,canvas:S,selection:E,camera:ne,axes:P,axesPixels:null,spikes:B,bounds:M,objects:G,shape:$,aspect:_.aspectRatio||[1,1,1],pickRadius:_.pickRadius||10,zNear:_.zNear||.01,zFar:_.zFar||1e3,fovy:_.fovy||Math.PI/4,clearColor:_.clearColor||[0,0,0,0],autoResize:T(_.autoResize),autoBounds:T(_.autoBounds),autoScale:!!_.autoScale,autoCenter:T(_.autoCenter),clipToBounds:T(_.clipToBounds),snapToData:!!_.snapToData,onselect:_.onselect||null,onrender:_.onrender||null,onclick:_.onclick||null,cameraParams:q,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(fe){this.aspect[0]=fe.x,this.aspect[1]=fe.y,this.aspect[2]=fe.z,Z=!0},setBounds:function(fe,me){this.bounds[0][fe]=me.min,this.bounds[1][fe]=me.max},setClearColor:function(fe){this.clearColor=fe},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)}},Q=[A.drawingBufferWidth/H.pixelRatio|0,A.drawingBufferHeight/H.pixelRatio|0];function ee(){if(!H._stopped&&H.autoResize){var fe=S.parentNode,me=1,_e=1;fe&&fe!==document.body?(me=fe.clientWidth,_e=fe.clientHeight):(me=window.innerWidth,_e=window.innerHeight);var we=0|Math.ceil(me*H.pixelRatio),Te=0|Math.ceil(_e*H.pixelRatio);if(we!==S.width||Te!==S.height){S.width=we,S.height=Te;var Oe=S.style;Oe.position=Oe.position||"absolute",Oe.left="0px",Oe.top="0px",Oe.width=me+"px",Oe.height=_e+"px",Y=!0}}}H.autoResize&&ee();function ie(){for(var fe=G.length,me=te.length,_e=0;_e0&&K[me-1]===0;)K.pop(),te.pop().dispose()}function ae(){if(H.contextLost)return!0;A.isContextLost()&&(H.contextLost=!0,H.mouseListener.enabled=!1,H.selection.object=null,H.oncontextloss&&H.oncontextloss())}window.addEventListener("resize",ee),H.update=function(fe){H._stopped||(Y=!0,Z=!0)},H.add=function(fe){H._stopped||(fe.axes=P,G.push(fe),W.push(-1),Y=!0,Z=!0,ie())},H.remove=function(fe){if(!H._stopped){var me=G.indexOf(fe);me<0||(G.splice(me,1),W.pop(),Y=!0,Z=!0,ie())}},H.dispose=function(){if(!H._stopped&&(H._stopped=!0,window.removeEventListener("resize",ee),S.removeEventListener("webglcontextlost",ae),H.mouseListener.enabled=!1,!H.contextLost)){P.dispose(),B.dispose();for(var fe=0;feE.distance)continue;for(var ke=0;ke 1.0) { + discard; + } + baseColor = mix(borderColor, color, step(radius, centerFraction)); + gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a); + } +} +`]),c.pickVertex=i([`precision mediump float; +#define GLSLIFY 1 + +attribute vec2 position; +attribute vec4 pickId; + +uniform mat3 matrix; +uniform float pointSize; +uniform vec4 pickOffset; + +varying vec4 fragId; + +void main() { + vec3 hgPosition = matrix * vec3(position, 1); + gl_Position = vec4(hgPosition.xy, 0, hgPosition.z); + gl_PointSize = pointSize; + + vec4 id = pickId + pickOffset; + id.y += floor(id.x / 256.0); + id.x -= floor(id.x / 256.0) * 256.0; + + id.z += floor(id.y / 256.0); + id.y -= floor(id.y / 256.0) * 256.0; + + id.w += floor(id.z / 256.0); + id.z -= floor(id.z / 256.0) * 256.0; + + fragId = id; +} +`]),c.pickFragment=i([`precision mediump float; +#define GLSLIFY 1 + +varying vec4 fragId; + +void main() { + float radius = length(2.0 * gl_PointCoord.xy - 1.0); + if(radius > 1.0) { + discard; + } + gl_FragColor = fragId / 255.0; +} +`])},{glslify:231}],123:[function(a,l,c){var i=a("gl-shader"),s=a("gl-buffer"),u=a("typedarray-pool"),d=a("./lib/shader");function h(v,y,x,w,k){this.plot=v,this.offsetBuffer=y,this.pickBuffer=x,this.shader=w,this.pickShader=k,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}l.exports=function(v,y){var x=v.gl,w=s(x),k=s(x),b=i(x,d.pointVertex,d.pointFragment),T=i(x,d.pickVertex,d.pickFragment),_=new h(v,w,k,b,T);return _.update(y),v.addObject(_),_};var m,g,p=h.prototype;p.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},p.update=function(v){var y;function x(A,M){return A in v?v[A]:M}v=v||{},this.sizeMin=x("sizeMin",.5),this.sizeMax=x("sizeMax",20),this.color=x("color",[1,0,0,1]).slice(),this.areaRatio=x("areaRatio",1),this.borderColor=x("borderColor",[0,0,0,1]).slice(),this.blend=x("blend",!1);var w=v.positions.length>>>1,k=v.positions instanceof Float32Array,b=v.idToIndex instanceof Int32Array&&v.idToIndex.length>=w,T=v.positions,_=k?T:u.mallocFloat32(T.length),S=b?v.idToIndex:u.mallocInt32(w);if(k||_.set(T),!b)for(_.set(T),y=0;y>>1;for(O=0;O=D[0]&&L<=D[2]&&P>=D[1]&&P<=D[3]&&R++}return R}(this.points,k),S=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(_,.33333)));m[0]=2/b,m[4]=2/T,m[6]=-2*k[0]/b-1,m[7]=-2*k[1]/T-1,this.offsetBuffer.bind(),x.bind(),x.attributes.position.pointer(),x.uniforms.matrix=m,x.uniforms.color=this.color,x.uniforms.borderColor=this.borderColor,x.uniforms.pointCloud=S<5,x.uniforms.pointSize=S,x.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),y&&(g[0]=255&v,g[1]=v>>8&255,g[2]=v>>16&255,g[3]=v>>24&255,this.pickBuffer.bind(),x.attributes.pickId.pointer(w.UNSIGNED_BYTE),x.uniforms.pickOffset=g,this.pickOffset=v);var A=w.getParameter(w.BLEND),M=w.getParameter(w.DITHER);return A&&!this.blend&&w.disable(w.BLEND),M&&w.disable(w.DITHER),w.drawArrays(w.POINTS,0,this.pointCount),A&&!this.blend&&w.enable(w.BLEND),M&&w.enable(w.DITHER),v+this.pointCount}),p.draw=p.unifiedDraw,p.drawPick=p.unifiedDraw,p.pick=function(v,y,x){var w=this.pickOffset,k=this.pointCount;if(x=w+k)return null;var b=x-w,T=this.points;return{object:this,pointId:b,dataCoord:[T[2*b],T[2*b+1]]}}},{"./lib/shader":122,"gl-buffer":78,"gl-shader":132,"typedarray-pool":308}],124:[function(a,l,c){l.exports=function(i,s,u,d){var h,m,g,p,v,y=s[0],x=s[1],w=s[2],k=s[3],b=u[0],T=u[1],_=u[2],S=u[3];return(m=y*b+x*T+w*_+k*S)<0&&(m=-m,b=-b,T=-T,_=-_,S=-S),1-m>1e-6?(h=Math.acos(m),g=Math.sin(h),p=Math.sin((1-d)*h)/g,v=Math.sin(d*h)/g):(p=1-d,v=d),i[0]=p*y+v*b,i[1]=p*x+v*T,i[2]=p*w+v*_,i[3]=p*k+v*S,i}},{}],125:[function(a,l,c){l.exports=function(i){return i||i===0?i.toString():""}},{}],126:[function(a,l,c){var i=a("vectorize-text");l.exports=function(u,d,h){var m=s[d];if(m||(m=s[d]={}),u in m)return m[u];var g={textAlign:"center",textBaseline:"middle",lineHeight:1,font:d,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},p=i(u,g);g.triangles=!1;var v,y,x=i(u,g);if(h&&h!==1){for(v=0;v max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform vec4 highlightId; +uniform float highlightScale; +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float scale = 1.0; + if(distance(highlightId, id) < 0.0001) { + scale = highlightScale; + } + + vec4 worldPosition = model * vec4(position, 1); + vec4 viewPosition = view * worldPosition; + viewPosition = viewPosition / viewPosition.w; + vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0)); + + gl_Position = clipPosition; + interpColor = color; + pickId = id; + dataCoordinate = position; + } +}`]),d=s([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform vec2 screenSize; +uniform vec3 clipBounds[2]; +uniform float highlightScale, pixelRatio; +uniform vec4 highlightId; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float scale = pixelRatio; + if(distance(highlightId.bgr, id.bgr) < 0.001) { + scale *= highlightScale; + } + + vec4 worldPosition = model * vec4(position, 1.0); + vec4 viewPosition = view * worldPosition; + vec4 clipPosition = projection * viewPosition; + clipPosition /= clipPosition.w; + + gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0); + interpColor = color; + pickId = id; + dataCoordinate = position; + } +}`]),h=s([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform float highlightScale; +uniform vec4 highlightId; +uniform vec3 axes[2]; +uniform mat4 model, view, projection; +uniform vec2 screenSize; +uniform vec3 clipBounds[2]; +uniform float scale, pixelRatio; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float lscale = pixelRatio * scale; + if(distance(highlightId, id) < 0.0001) { + lscale *= highlightScale; + } + + vec4 clipCenter = projection * view * model * vec4(position, 1); + vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y; + vec4 clipPosition = projection * view * model * vec4(dataPosition, 1); + + gl_Position = clipPosition; + interpColor = color; + pickId = id; + dataCoordinate = dataPosition; + } +} +`]),m=s([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 fragClipBounds[2]; +uniform float opacity; + +varying vec4 interpColor; +varying vec3 dataCoordinate; + +void main() { + if ( + outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) || + interpColor.a * opacity == 0. + ) discard; + gl_FragColor = interpColor * opacity; +} +`]),g=s([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 fragClipBounds[2]; +uniform float pickGroup; + +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard; + + gl_FragColor = vec4(pickGroup, pickId.bgr); +}`]),p=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],v={vertex:u,fragment:m,attributes:p},y={vertex:d,fragment:m,attributes:p},x={vertex:h,fragment:m,attributes:p},w={vertex:u,fragment:g,attributes:p},k={vertex:d,fragment:g,attributes:p},b={vertex:h,fragment:g,attributes:p};function T(_,S){var A=i(_,S),M=A.attributes;return M.position.location=0,M.color.location=1,M.glyph.location=2,M.id.location=3,A}c.createPerspective=function(_){return T(_,v)},c.createOrtho=function(_){return T(_,y)},c.createProject=function(_){return T(_,x)},c.createPickPerspective=function(_){return T(_,w)},c.createPickOrtho=function(_){return T(_,k)},c.createPickProject=function(_){return T(_,b)}},{"gl-shader":132,glslify:231}],128:[function(a,l,c){var i=a("is-string-blank"),s=a("gl-buffer"),u=a("gl-vao"),d=a("typedarray-pool"),h=a("gl-mat4/multiply"),m=a("./lib/shaders"),g=a("./lib/glyphs"),p=a("./lib/get-simple-string"),v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function y(K,te){var Y=K[0],Z=K[1],re=K[2],U=K[3];return K[0]=te[0]*Y+te[4]*Z+te[8]*re+te[12]*U,K[1]=te[1]*Y+te[5]*Z+te[9]*re+te[13]*U,K[2]=te[2]*Y+te[6]*Z+te[10]*re+te[14]*U,K[3]=te[3]*Y+te[7]*Z+te[11]*re+te[15]*U,K}function x(K,te,Y,Z){return y(Z,Z),y(Z,Z),y(Z,Z)}function w(K,te){this.index=K,this.dataCoordinate=this.position=te}function k(K){return K===!0||K>1?1:K}function b(K,te,Y,Z,re,U,q,$,ne,H,Q,ee){this.gl=K,this.pixelRatio=1,this.shader=te,this.orthoShader=Y,this.projectShader=Z,this.pointBuffer=re,this.colorBuffer=U,this.glyphBuffer=q,this.idBuffer=$,this.vao=ne,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=H,this.pickOrthoShader=Q,this.pickProjectShader=ee,this.points=[],this._selectResult=new w(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}l.exports=function(K){var te=K.gl,Y=m.createPerspective(te),Z=m.createOrtho(te),re=m.createProject(te),U=m.createPickPerspective(te),q=m.createPickOrtho(te),$=m.createPickProject(te),ne=s(te),H=s(te),Q=s(te),ee=s(te),ie=u(te,[{buffer:ne,size:3,type:te.FLOAT},{buffer:H,size:4,type:te.FLOAT},{buffer:Q,size:2,type:te.FLOAT},{buffer:ee,size:4,type:te.UNSIGNED_BYTE,normalized:!0}]),ae=new b(te,Y,Z,re,ne,H,Q,ee,ie,U,q,$);return ae.update(K),ae};var T=b.prototype;T.pickSlots=1,T.setPickBase=function(K){this.pickId=K},T.isTransparent=function(){if(this.hasAlpha)return!0;for(var K=0;K<3;++K)if(this.axesProject[K]&&this.projectHasAlpha)return!0;return!1},T.isOpaque=function(){if(!this.hasAlpha)return!0;for(var K=0;K<3;++K)if(this.axesProject[K]&&!this.projectHasAlpha)return!0;return!1};var _=[0,0],S=[0,0,0],A=[0,0,0],M=[0,0,0,1],E=[0,0,0,1],D=v.slice(),O=[0,0,0],R=[[0,0,0],[0,0,0]];function z(K){return K[0]=K[1]=K[2]=0,K}function L(K,te){return K[0]=te[0],K[1]=te[1],K[2]=te[2],K[3]=1,K}function P(K,te,Y,Z){return K[0]=te[0],K[1]=te[1],K[2]=te[2],K[Y]=Z,K}function N(K,te,Y,Z){var re,U=te.axesProject,q=te.gl,$=K.uniforms,ne=Y.model||v,H=Y.view||v,Q=Y.projection||v,ee=te.axesBounds,ie=function(ke){for(var Ee=R,ze=0;ze<2;++ze)for(var Fe=0;Fe<3;++Fe)Ee[ze][Fe]=Math.max(Math.min(ke[ze][Fe],1e8),-1e8);return Ee}(te.clipBounds);re=te.axes&&te.axes.lastCubeProps?te.axes.lastCubeProps.axis:[1,1,1],_[0]=2/q.drawingBufferWidth,_[1]=2/q.drawingBufferHeight,K.bind(),$.view=H,$.projection=Q,$.screenSize=_,$.highlightId=te.highlightId,$.highlightScale=te.highlightScale,$.clipBounds=ie,$.pickGroup=te.pickId/255,$.pixelRatio=Z;for(var ae=0;ae<3;++ae)if(U[ae]){$.scale=te.projectScale[ae],$.opacity=te.projectOpacity[ae];for(var ue=D,le=0;le<16;++le)ue[le]=0;for(le=0;le<4;++le)ue[5*le]=1;ue[5*ae]=0,re[ae]<0?ue[12+ae]=ee[0][ae]:ue[12+ae]=ee[1][ae],h(ue,ne,ue),$.model=ue;var ge=(ae+1)%3,fe=(ae+2)%3,me=z(S),_e=z(A);me[ge]=1,_e[fe]=1;var we=x(0,0,0,L(M,me)),Te=x(0,0,0,L(E,_e));if(Math.abs(we[1])>Math.abs(Te[1])){var Oe=we;we=Te,Te=Oe,Oe=me,me=_e,_e=Oe;var de=ge;ge=fe,fe=de}we[0]<0&&(me[ge]=-1),Te[1]>0&&(_e[fe]=-1);var ye=0,Me=0;for(le=0;le<4;++le)ye+=Math.pow(ne[4*ge+le],2),Me+=Math.pow(ne[4*fe+le],2);me[ge]/=Math.sqrt(ye),_e[fe]/=Math.sqrt(Me),$.axes[0]=me,$.axes[1]=_e,$.fragClipBounds[0]=P(O,ie[0],ae,-1e8),$.fragClipBounds[1]=P(O,ie[1],ae,1e8),te.vao.bind(),te.vao.draw(q.TRIANGLES,te.vertexCount),te.lineWidth>0&&(q.lineWidth(te.lineWidth*Z),te.vao.draw(q.LINES,te.lineVertexCount,te.vertexCount)),te.vao.unbind()}}var B=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function G(K,te,Y,Z,re,U,q){var $=Y.gl;if((U===Y.projectHasAlpha||q)&&N(te,Y,Z,re),U===Y.hasAlpha||q){K.bind();var ne=K.uniforms;ne.model=Z.model||v,ne.view=Z.view||v,ne.projection=Z.projection||v,_[0]=2/$.drawingBufferWidth,_[1]=2/$.drawingBufferHeight,ne.screenSize=_,ne.highlightId=Y.highlightId,ne.highlightScale=Y.highlightScale,ne.fragClipBounds=B,ne.clipBounds=Y.axes.bounds,ne.opacity=Y.opacity,ne.pickGroup=Y.pickId/255,ne.pixelRatio=re,Y.vao.bind(),Y.vao.draw($.TRIANGLES,Y.vertexCount),Y.lineWidth>0&&($.lineWidth(Y.lineWidth*re),Y.vao.draw($.LINES,Y.lineVertexCount,Y.vertexCount)),Y.vao.unbind()}}function W(K,te,Y,Z){var re;re=Array.isArray(K)?te=this.pointCount||te<0)return null;var Y=this.points[te],Z=this._selectResult;Z.index=te;for(var re=0;re<3;++re)Z.position[re]=Z.dataCoordinate[re]=Y[re];return Z},T.highlight=function(K){if(K){var te=K.index,Y=255&te,Z=te>>8&255,re=te>>16&255;this.highlightId=[Y/255,Z/255,re/255,0]}else this.highlightId=[1,1,1,1]},T.update=function(K){if("perspective"in(K=K||{})&&(this.useOrtho=!K.perspective),"orthographic"in K&&(this.useOrtho=!!K.orthographic),"lineWidth"in K&&(this.lineWidth=K.lineWidth),"project"in K)if(Array.isArray(K.project))this.axesProject=K.project;else{var te=!!K.project;this.axesProject=[te,te,te]}if("projectScale"in K)if(Array.isArray(K.projectScale))this.projectScale=K.projectScale.slice();else{var Y=+K.projectScale;this.projectScale=[Y,Y,Y]}if(this.projectHasAlpha=!1,"projectOpacity"in K){Array.isArray(K.projectOpacity)?this.projectOpacity=K.projectOpacity.slice():(Y=+K.projectOpacity,this.projectOpacity=[Y,Y,Y]);for(var Z=0;Z<3;++Z)this.projectOpacity[Z]=k(this.projectOpacity[Z]),this.projectOpacity[Z]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in K&&(this.opacity=k(K.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var re,U,q=K.position,$=K.font||"normal",ne=K.alignment||[0,0];if(ne.length===2)re=ne[0],U=ne[1];else for(re=[],U=[],Z=0;Z0){var Ve=0,Ke=fe,Re=[0,0,0,1],qe=[0,0,0,1],We=Array.isArray(ie)&&Array.isArray(ie[0]),Ye=Array.isArray(le)&&Array.isArray(le[0]);e:for(Z=0;Z<_e;++Z){for(ge+=1,we=q[Z],Te=0;Te<3;++Te){if(isNaN(we[Te])||!isFinite(we[Te]))continue e;Q[Te]=Math.max(Q[Te],we[Te]),H[Te]=Math.min(H[Te],we[Te])}Oe=(nt=W(ee,Z,$,this.pixelRatio)).mesh,de=nt.lines,ye=nt.bounds;var nt,ft=nt.visible;if(ft)if(Array.isArray(ie)){if((vt=We?Z0?1-ye[0][0]:Ot<0?1+ye[1][0]:1,Wt*=Wt>0?1-ye[0][1]:Wt<0?1+ye[1][1]:1],Be=Oe.cells||[],Ge=Oe.positions||[];for(Te=0;Te0){var R=p*_;w.drawBox(S-R,A-R,M+R,A+R,x),w.drawBox(S-R,E-R,M+R,E+R,x),w.drawBox(S-R,A-R,S+R,E+R,x),w.drawBox(M-R,A-R,M+R,E+R,x)}}}},h.update=function(m){m=m||{},this.innerFill=!!m.innerFill,this.outerFill=!!m.outerFill,this.innerColor=(m.innerColor||[0,0,0,.5]).slice(),this.outerColor=(m.outerColor||[0,0,0,.5]).slice(),this.borderColor=(m.borderColor||[0,0,0,1]).slice(),this.borderWidth=m.borderWidth||0,this.selectBox=(m.selectBox||this.selectBox).slice()},h.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":129,"gl-buffer":78,"gl-shader":132}],131:[function(a,l,c){l.exports=function(p,v){var y=v[0],x=v[1],w=i(p,y,x,{}),k=s.mallocUint8(y*x*4);return new m(p,w,k)};var i=a("gl-fbo"),s=a("typedarray-pool"),u=a("ndarray"),d=a("bit-twiddle").nextPow2;function h(p,v,y,x,w){this.coord=[p,v],this.id=y,this.value=x,this.distance=w}function m(p,v,y){this.gl=p,this.fbo=v,this.buffer=y,this._readTimeout=null;var x=this;this._readCallback=function(){x.gl&&(v.bind(),p.readPixels(0,0,v.shape[0],v.shape[1],p.RGBA,p.UNSIGNED_BYTE,x.buffer),x._readTimeout=null)}}var g=m.prototype;Object.defineProperty(g,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(p){if(this.gl){this.fbo.shape=p;var v=this.fbo.shape[0],y=this.fbo.shape[1];if(y*v*4>this.buffer.length){s.free(this.buffer);for(var x=this.buffer=s.mallocUint8(d(y*v*4)),w=0;ww)for(y=w;yx)for(y=x;y=0){for(var P=0|L.type.charAt(L.type.length-1),N=new Array(P),B=0;B=0;)G+=1;z[D]=G}var W=new Array(w.length);function K(){T.program=d.program(_,T._vref,T._fref,R,z);for(var te=0;te=0){if((A=_.charCodeAt(_.length-1)-48)<2||A>4)throw new i("","Invalid data type for attribute "+T+": "+_);h(g,p,S[0],y,A,x,T)}else{if(!(_.indexOf("mat")>=0))throw new i("","Unknown data type for attribute "+T+": "+_);var A;if((A=_.charCodeAt(_.length-1)-48)<2||A>4)throw new i("","Invalid data type for attribute "+T+": "+_);m(g,p,S,y,A,x,T)}}}return x};var i=a("./GLError");function s(g,p,v,y,x,w){this._gl=g,this._wrapper=p,this._index=v,this._locations=y,this._dimension=x,this._constFunc=w}var u=s.prototype;u.pointer=function(g,p,v,y){var x=this._gl,w=this._locations[this._index];x.vertexAttribPointer(w,this._dimension,g||x.FLOAT,!!p,v||0,y||0),x.enableVertexAttribArray(w)},u.set=function(g,p,v,y){return this._constFunc(this._locations[this._index],g,p,v,y)},Object.defineProperty(u,"location",{get:function(){return this._locations[this._index]},set:function(g){return g!==this._locations[this._index]&&(this._locations[this._index]=0|g,this._wrapper.program=null),0|g}});var d=[function(g,p,v){return v.length===void 0?g.vertexAttrib1f(p,v):g.vertexAttrib1fv(p,v)},function(g,p,v,y){return v.length===void 0?g.vertexAttrib2f(p,v,y):g.vertexAttrib2fv(p,v)},function(g,p,v,y,x){return v.length===void 0?g.vertexAttrib3f(p,v,y,x):g.vertexAttrib3fv(p,v)},function(g,p,v,y,x,w){return v.length===void 0?g.vertexAttrib4f(p,v,y,x,w):g.vertexAttrib4fv(p,v)}];function h(g,p,v,y,x,w,k){var b=d[x],T=new s(g,p,v,y,x,b);Object.defineProperty(w,k,{set:function(_){return g.disableVertexAttribArray(y[v]),b(g,y[v],_),_},get:function(){return T},enumerable:!0})}function m(g,p,v,y,x,w,k){for(var b=new Array(x),T=new Array(x),_=0;_4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+P);h["uniformMatrix"+L+"fv"](p[M],!1,E);break}throw new s("","Unknown uniform data type for "+name+": "+P)}if((L=P.charCodeAt(P.length-1)-48)<2||L>4)throw new s("","Invalid data type");switch(P.charAt(0)){case"b":case"i":h["uniform"+L+"iv"](p[M],E);break;case"v":h["uniform"+L+"fv"](p[M],E);break;default:throw new s("","Unrecognized data type for vector "+name+": "+P)}}}}}}function y(k,b,T){if(typeof T=="object"){var _=x(T);Object.defineProperty(k,b,{get:u(_),set:v(T),enumerable:!0,configurable:!1})}else p[T]?Object.defineProperty(k,b,{get:(S=T,function(A,M,E){return A.getUniform(M.program,E[S])}),set:v(T),enumerable:!0,configurable:!1}):k[b]=function(A){switch(A){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var M=A.indexOf("vec");if(0<=M&&M<=1&&A.length===4+M){if((E=A.charCodeAt(A.length-1)-48)<2||E>4)throw new s("","Invalid data type");return A.charAt(0)==="b"?d(E,!1):d(E,0)}if(A.indexOf("mat")===0&&A.length===4){var E;if((E=A.charCodeAt(A.length-1)-48)<2||E>4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+A);return d(E*E,0)}throw new s("","Unknown uniform data type for "+name+": "+A)}}(g[T].type);var S}function x(k){var b;if(Array.isArray(k)){b=new Array(k.length);for(var T=0;T1){p[0]in m||(m[p[0]]=[]),m=m[p[0]];for(var v=1;v1)for(var x=0;x"u"?a("weakmap-shim"):WeakMap),d=0;function h(v,y,x,w,k,b,T){this.id=v,this.src=y,this.type=x,this.shader=w,this.count=b,this.programs=[],this.cache=T}function m(v){this.gl=v,this.shaders=[{},{}],this.programs={}}h.prototype.dispose=function(){if(--this.count==0){for(var v=this.cache,y=v.gl,x=this.programs,w=0,k=x.length;w 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the tube vertex and normal at the given index. +// +// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. +// +// Each tube segment is made up of a ring of vertices. +// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. +// The indexes of tube segments run from 0 to 8. +// +vec3 getTubePosition(vec3 d, float index, out vec3 normal) { + float segmentCount = 8.0; + + float angle = 2.0 * 3.14159 * (index / segmentCount); + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d); + vec3 y = v * sin(angle) * length(d); + vec3 v3 = x + y; + + normal = normalize(v3); + + return v3; +} + +attribute vec4 vector; +attribute vec4 color, position; +attribute vec2 uv; + +uniform float vectorScale, tubeScale; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 eyePosition, lightPosition; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + // Scale the vector magnitude to stay constant with + // model & view changes. + vec3 normal; + vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); + vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * tubePosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + // vec4 m_position = model * vec4(tubePosition, 1.0); + vec4 t_position = view * tubePosition; + gl_Position = projection * t_position; + + f_color = color; + f_data = tubePosition.xyz; + f_position = position.xyz; + f_uv = uv; +} +`]),u=i([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform sampler2D texture; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = f_color * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * opacity; +} +`]),d=i([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the tube vertex and normal at the given index. +// +// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. +// +// Each tube segment is made up of a ring of vertices. +// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. +// The indexes of tube segments run from 0 to 8. +// +vec3 getTubePosition(vec3 d, float index, out vec3 normal) { + float segmentCount = 8.0; + + float angle = 2.0 * 3.14159 * (index / segmentCount); + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d); + vec3 y = v * sin(angle) * length(d); + vec3 v3 = x + y; + + normal = normalize(v3); + + return v3; +} + +attribute vec4 vector; +attribute vec4 position; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform float tubeScale; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + vec3 normal; + vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); + vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + gl_Position = projection * view * tubePosition; + f_id = id; + f_position = position.xyz; +} +`]),h=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]);c.meshShader={vertex:s,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},c.pickShader={vertex:d,fragment:h,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},{glslify:231}],143:[function(a,l,c){var i=a("gl-vec3"),s=a("gl-vec4"),u=["xyz","xzy","yxz","yzx","zxy","zyx"],d=function(y,x,w,k){for(var b=0,T=0;T0)for(_e=0;_e<8;_e++){var we=(_e+1)%8;U.push(ne[_e],H[_e],H[we],H[we],ne[we],ne[_e]),$.push(ue,ae,ae,ae,ue,ue),Q.push(ee,ie,ie,ie,ee,ee);var Te=U.length;q.push([Te-6,Te-5,Te-4],[Te-3,Te-2,Te-1])}var Oe=ne;ne=H,H=Oe;var de=ue;ue=ae,ae=de;var ye=ee;ee=ie,ie=ye}return{positions:U,cells:q,vectors:$,vertexIntensity:Q}}(B,w,k,b)}),M=[],E=[],D=[],O=[];for(T=0;Tx)return w-1}return w},m=function(y,x,w){return yw?w:y},g=function(y){var x=1/0;y.sort(function(T,_){return T-_});for(var w=y.length,k=1;kye-1||Ke>Me-1||Re>ke-1)return i.create();var qe,We,Ye,nt,ft,vt,Pt=we[0][Ee],At=we[0][Ve],at=we[1][ze],et=we[1][Ke],Ot=we[2][Fe],Wt=(Te-Pt)/(At-Pt),Jt=(Oe-at)/(et-at),Be=(de-Ot)/(we[2][Re]-Ot);switch(isFinite(Wt)||(Wt=.5),isFinite(Jt)||(Jt=.5),isFinite(Be)||(Be=.5),me.reversedX&&(Ee=ye-1-Ee,Ve=ye-1-Ve),me.reversedY&&(ze=Me-1-ze,Ke=Me-1-Ke),me.reversedZ&&(Fe=ke-1-Fe,Re=ke-1-Re),me.filled){case 5:ft=Fe,vt=Re,Ye=ze*ke,nt=Ke*ke,qe=Ee*ke*Me,We=Ve*ke*Me;break;case 4:ft=Fe,vt=Re,qe=Ee*ke,We=Ve*ke,Ye=ze*ke*ye,nt=Ke*ke*ye;break;case 3:Ye=ze,nt=Ke,ft=Fe*Me,vt=Re*Me,qe=Ee*Me*ke,We=Ve*Me*ke;break;case 2:Ye=ze,nt=Ke,qe=Ee*Me,We=Ve*Me,ft=Fe*Me*ye,vt=Re*Me*ye;break;case 1:qe=Ee,We=Ve,ft=Fe*ye,vt=Re*ye,Ye=ze*ye*ke,nt=Ke*ye*ke;break;default:qe=Ee,We=Ve,Ye=ze*ye,nt=Ke*ye,ft=Fe*ye*Me,vt=Re*ye*Me}var Ge=_e[qe+Ye+ft],Tt=_e[qe+Ye+vt],dt=_e[qe+nt+ft],Pe=_e[qe+nt+vt],Ie=_e[We+Ye+ft],Ae=_e[We+Ye+vt],De=_e[We+nt+ft],He=_e[We+nt+vt],rt=i.create(),lt=i.create(),ot=i.create(),kt=i.create();i.lerp(rt,Ge,Ie,Wt),i.lerp(lt,Tt,Ae,Wt),i.lerp(ot,dt,De,Wt),i.lerp(kt,Pe,He,Wt);var wt=i.create(),Vt=i.create();i.lerp(wt,rt,ot,Jt),i.lerp(Vt,lt,kt,Jt);var Ut=i.create();return i.lerp(Ut,wt,Vt,Be),Ut}(le,y,S)},M=y.getDivergence||function(le,ge){var fe=i.create(),me=1e-4;i.add(fe,le,[me,0,0]);var _e=A(fe);i.subtract(_e,_e,ge),i.scale(_e,_e,1/me),i.add(fe,le,[0,me,0]);var we=A(fe);i.subtract(we,we,ge),i.scale(we,we,1/me),i.add(fe,le,[0,0,me]);var Te=A(fe);return i.subtract(Te,Te,ge),i.scale(Te,Te,1/me),i.add(fe,_e,we),i.add(fe,fe,Te),fe},E=[],D=x[0][0],O=x[0][1],R=x[0][2],z=x[1][0],L=x[1][1],P=x[1][2],N=function(le){var ge=le[0],fe=le[1],me=le[2];return!(gez||feL||meP)},B=10*i.distance(x[0],x[1])/k,G=B*B,W=1,K=0,te=w.length;te>1&&(W=function(le){for(var ge=[],fe=[],me=[],_e={},we={},Te={},Oe=le.length,de=0;deK&&(K=Q),ne.push(Q),E.push({points:re,velocities:U,divergences:ne});for(var ee=0;ee<100*k&&re.lengthG&&i.scale(ie,ie,B/Math.sqrt(ae)),i.add(ie,ie,Z),q=A(ie),i.squaredDistance($,ie)-G>-1e-4*G&&(re.push(ie),$=ie,U.push(q),H=M(ie,q),Q=i.length(H),isFinite(Q)&&Q>K&&(K=Q),ne.push(Q)),Z=ie}}var ue=d(E,y.colormap,K,W);return T?ue.tubeScale=T:(K===0&&(K=1),ue.tubeScale=.5*b*W/K),ue};var p=a("./lib/shaders"),v=a("gl-cone3d").createMesh;l.exports.createTubeMesh=function(y,x){return v(y,x,{shaders:p,traceType:"streamtube"})}},{"./lib/shaders":142,"gl-cone3d":79,"gl-vec3":169,"gl-vec4":205}],144:[function(a,l,c){var i=a("gl-shader"),s=a("glslify"),u=s([`precision highp float; +#define GLSLIFY 1 + +attribute vec4 uv; +attribute vec3 f; +attribute vec3 normal; + +uniform vec3 objectOffset; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 lightPosition, eyePosition; +uniform sampler2D colormap; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + vec3 localCoordinate = vec3(uv.zw, f.x); + worldCoordinate = objectOffset + localCoordinate; + vec4 worldPosition = model * vec4(worldCoordinate, 1.0); + vec4 clipPosition = projection * view * worldPosition; + gl_Position = clipPosition; + kill = f.y; + value = f.z; + planeCoordinate = uv.xy; + + vColor = texture2D(colormap, vec2(value, value)); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * worldPosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + lightDirection = lightPosition - cameraCoordinate.xyz; + eyeDirection = eyePosition - cameraCoordinate.xyz; + surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); +} +`]),d=s([`precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float beckmannSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness) { + return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 lowerBound, upperBound; +uniform float contourTint; +uniform vec4 contourColor; +uniform sampler2D colormap; +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform float vertexColor; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + if ( + kill > 0.0 || + vColor.a == 0.0 || + outOfRange(clipBounds[0], clipBounds[1], worldCoordinate) + ) discard; + + vec3 N = normalize(surfaceNormal); + vec3 V = normalize(eyeDirection); + vec3 L = normalize(lightDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = max(beckmannSpecular(L, V, N, roughness), 0.); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + //decide how to interpolate color \u2014 in vertex or in fragment + vec4 surfaceColor = + step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + + step(.5, vertexColor) * vColor; + + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; +} +`]),h=s([`precision highp float; +#define GLSLIFY 1 + +attribute vec4 uv; +attribute float f; + +uniform vec3 objectOffset; +uniform mat3 permutation; +uniform mat4 model, view, projection; +uniform float height, zOffset; +uniform sampler2D colormap; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + vec3 dataCoordinate = permutation * vec3(uv.xy, height); + worldCoordinate = objectOffset + dataCoordinate; + vec4 worldPosition = model * vec4(worldCoordinate, 1.0); + + vec4 clipPosition = projection * view * worldPosition; + clipPosition.z += zOffset; + + gl_Position = clipPosition; + value = f + objectOffset.z; + kill = -1.0; + planeCoordinate = uv.zw; + + vColor = texture2D(colormap, vec2(value, value)); + + //Don't do lighting for contours + surfaceNormal = vec3(1,0,0); + eyeDirection = vec3(0,1,0); + lightDirection = vec3(0,0,1); +} +`]),m=s([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec2 shape; +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 surfaceNormal; + +vec2 splitFloat(float v) { + float vh = 255.0 * v; + float upper = floor(vh); + float lower = fract(vh); + return vec2(upper / 255.0, floor(lower * 16.0) / 16.0); +} + +void main() { + if ((kill > 0.0) || + (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard; + + vec2 ux = splitFloat(planeCoordinate.x / shape.x); + vec2 uy = splitFloat(planeCoordinate.y / shape.y); + gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); +} +`]);c.createShader=function(g){var p=i(g,u,d,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},c.createPickShader=function(g){var p=i(g,u,m,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},c.createContourShader=function(g){var p=i(g,h,d,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p},c.createPickContourShader=function(g){var p=i(g,h,m,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p}},{"gl-shader":132,glslify:231}],145:[function(a,l,c){l.exports=function(q){var $=q.gl,ne=_($),H=A($),Q=S($),ee=M($),ie=s($),ae=u($,[{buffer:ie,size:4,stride:40,offset:0},{buffer:ie,size:3,stride:40,offset:16},{buffer:ie,size:3,stride:40,offset:28}]),ue=s($),le=u($,[{buffer:ue,size:4,stride:20,offset:0},{buffer:ue,size:1,stride:20,offset:16}]),ge=s($),fe=u($,[{buffer:ge,size:2,type:$.FLOAT}]),me=d($,1,256,$.RGBA,$.UNSIGNED_BYTE);me.minFilter=$.LINEAR,me.magFilter=$.LINEAR;var _e=new z($,[0,0],[[0,0,0],[0,0,0]],ne,H,ie,ae,me,Q,ee,ue,le,ge,fe,[0,0,0]),we={levels:[[],[],[]]};for(var Te in q)we[Te]=q[Te];return we.colormap=we.colormap||"jet",_e.update(we),_e};var i=a("bit-twiddle"),s=a("gl-buffer"),u=a("gl-vao"),d=a("gl-texture2d"),h=a("typedarray-pool"),m=a("colormap"),g=a("ndarray-ops"),p=a("ndarray-pack"),v=a("ndarray"),y=a("surface-nets"),x=a("gl-mat4/multiply"),w=a("gl-mat4/invert"),k=a("binary-search-bounds"),b=a("ndarray-gradient"),T=a("./lib/shaders"),_=T.createShader,S=T.createContourShader,A=T.createPickShader,M=T.createPickContourShader,E=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],D=[[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 R(q,$,ne,H,Q){this.position=q,this.index=$,this.uv=ne,this.level=H,this.dataCoordinate=Q}(function(){for(var q=0;q<3;++q){var $=O[q],ne=(q+2)%3;$[(q+1)%3+0]=1,$[ne+3]=1,$[q+6]=1}})();function z(q,$,ne,H,Q,ee,ie,ae,ue,le,ge,fe,me,_e,we){this.gl=q,this.shape=$,this.bounds=ne,this.objectOffset=we,this.intensityBounds=[],this._shader=H,this._pickShader=Q,this._coordinateBuffer=ee,this._vao=ie,this._colorMap=ae,this._contourShader=ue,this._contourPickShader=le,this._contourBuffer=ge,this._contourVAO=fe,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new R([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=me,this._dynamicVAO=_e,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(h.mallocFloat(1024),[0,0]),v(h.mallocFloat(1024),[0,0]),v(h.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 L=z.prototype;L.genColormap=function(q,$){var ne=!1,H=p([m({colormap:q,nshades:256,format:"rgba"}).map(function(Q,ee){var ie=$?function(ae,ue){if(!ue||!ue.length)return 1;for(var le=0;leae&&le>0){var ge=(ue[le][0]-ae)/(ue[le][0]-ue[le-1][0]);return ue[le][1]*(1-ge)+ge*ue[le-1][1]}}return 1}(ee/255,$):Q[3];return ie<1&&(ne=!0),[Q[0],Q[1],Q[2],255*ie]})]);return g.divseq(H,255),this.hasAlphaScale=ne,H},L.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},L.isOpaque=function(){return!this.isTransparent()},L.pickSlots=1,L.setPickBase=function(q){this.pickId=q};var P=[0,0,0],N={showSurface:!1,showContour:!1,projections:[E.slice(),E.slice(),E.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function B(q,$){var ne,H,Q,ee=$.axes&&$.axes.lastCubeProps.axis||P,ie=$.showSurface,ae=$.showContour;for(ne=0;ne<3;++ne)for(ie=ie||$.surfaceProject[ne],H=0;H<3;++H)ae=ae||$.contourProject[ne][H];for(ne=0;ne<3;++ne){var ue=N.projections[ne];for(H=0;H<16;++H)ue[H]=0;for(H=0;H<4;++H)ue[5*H]=1;ue[5*ne]=0,ue[12+ne]=$.axesBounds[+(ee[ne]>0)][ne],x(ue,q.model,ue);var le=N.clipBounds[ne];for(Q=0;Q<2;++Q)for(H=0;H<3;++H)le[Q][H]=q.clipBounds[Q][H];le[0][ne]=-1e8,le[1][ne]=1e8}return N.showSurface=ie,N.showContour=ae,N}var G={model:E,view:E,projection:E,inverseModel:E.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},W=E.slice(),K=[1,0,0,0,1,0,0,0,1];function te(q,$){q=q||{};var ne=this.gl;ne.disable(ne.CULL_FACE),this._colorMap.bind(0);var H=G;H.model=q.model||E,H.view=q.view||E,H.projection=q.projection||E,H.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],H.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],H.objectOffset=this.objectOffset,H.contourColor=this.contourColor[0],H.inverseModel=w(H.inverseModel,H.model);for(var Q=0;Q<2;++Q)for(var ee=H.clipBounds[Q],ie=0;ie<3;++ie)ee[ie]=Math.min(Math.max(this.clipBounds[Q][ie],-1e8),1e8);H.kambient=this.ambientLight,H.kdiffuse=this.diffuseLight,H.kspecular=this.specularLight,H.roughness=this.roughness,H.fresnel=this.fresnel,H.opacity=this.opacity,H.height=0,H.permutation=K,H.vertexColor=this.vertexColor;var ae=W;for(x(ae,H.view,H.model),x(ae,H.projection,ae),w(ae,ae),Q=0;Q<3;++Q)H.eyePosition[Q]=ae[12+Q]/ae[15];var ue=ae[15];for(Q=0;Q<3;++Q)ue+=this.lightPosition[Q]*ae[4*Q+3];for(Q=0;Q<3;++Q){var le=ae[12+Q];for(ie=0;ie<3;++ie)le+=ae[4*ie+Q]*this.lightPosition[ie];H.lightPosition[Q]=le/ue}var ge=B(H,this);if(ge.showSurface){for(this._shader.bind(),this._shader.uniforms=H,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ne.TRIANGLES,this._vertexCount),Q=0;Q<3;++Q)this.surfaceProject[Q]&&this.vertexCount&&(this._shader.uniforms.model=ge.projections[Q],this._shader.uniforms.clipBounds=ge.clipBounds[Q],this._vao.draw(ne.TRIANGLES,this._vertexCount));this._vao.unbind()}if(ge.showContour){var fe=this._contourShader;H.kambient=1,H.kdiffuse=0,H.kspecular=0,H.opacity=1,fe.bind(),fe.uniforms=H;var me=this._contourVAO;for(me.bind(),Q=0;Q<3;++Q)for(fe.uniforms.permutation=O[Q],ne.lineWidth(this.contourWidth[Q]*this.pixelRatio),ie=0;ie>4)/16)/255,Q=Math.floor(H),ee=H-Q,ie=$[1]*(q.value[1]+(15&q.value[2])/16)/255,ae=Math.floor(ie),ue=ie-ae;Q+=1,ae+=1;var le=ne.position;le[0]=le[1]=le[2]=0;for(var ge=0;ge<2;++ge)for(var fe=ge?ee:1-ee,me=0;me<2;++me)for(var _e=Q+ge,we=ae+me,Te=fe*(me?ue:1-ue),Oe=0;Oe<3;++Oe)le[Oe]+=this._field[Oe].get(_e,we)*Te;for(var de=this._pickResult.level,ye=0;ye<3;++ye)if(de[ye]=k.le(this.contourLevels[ye],le[ye]),de[ye]<0)this.contourLevels[ye].length>0&&(de[ye]=0);else if(de[ye]Math.abs(ke-le[ye])&&(de[ye]+=1)}for(ne.index[0]=ee<.5?Q:Q+1,ne.index[1]=ue<.5?ae:ae+1,ne.uv[0]=H/$[0],ne.uv[1]=ie/$[1],Oe=0;Oe<3;++Oe)ne.dataCoordinate[Oe]=this._field[Oe].get(ne.index[0],ne.index[1]);return ne},L.padField=function(q,$){var ne=$.shape.slice(),H=q.shape.slice();g.assign(q.lo(1,1).hi(ne[0],ne[1]),$),g.assign(q.lo(1).hi(ne[0],1),$.hi(ne[0],1)),g.assign(q.lo(1,H[1]-1).hi(ne[0],1),$.lo(0,ne[1]-1).hi(ne[0],1)),g.assign(q.lo(0,1).hi(1,ne[1]),$.hi(1)),g.assign(q.lo(H[0]-1,1).hi(1,ne[1]),$.lo(ne[0]-1)),q.set(0,0,$.get(0,0)),q.set(0,H[1]-1,$.get(0,ne[1]-1)),q.set(H[0]-1,0,$.get(ne[0]-1,0)),q.set(H[0]-1,H[1]-1,$.get(ne[0]-1,ne[1]-1))},L.update=function(q){q=q||{},this.objectOffset=q.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in q&&(this.contourWidth=Z(q.contourWidth,Number)),"showContour"in q&&(this.showContour=Z(q.showContour,Boolean)),"showSurface"in q&&(this.showSurface=!!q.showSurface),"contourTint"in q&&(this.contourTint=Z(q.contourTint,Boolean)),"contourColor"in q&&(this.contourColor=U(q.contourColor)),"contourProject"in q&&(this.contourProject=Z(q.contourProject,function(Kt){return Z(Kt,Boolean)})),"surfaceProject"in q&&(this.surfaceProject=q.surfaceProject),"dynamicColor"in q&&(this.dynamicColor=U(q.dynamicColor)),"dynamicTint"in q&&(this.dynamicTint=Z(q.dynamicTint,Number)),"dynamicWidth"in q&&(this.dynamicWidth=Z(q.dynamicWidth,Number)),"opacity"in q&&(this.opacity=q.opacity),"opacityscale"in q&&(this.opacityscale=q.opacityscale),"colorBounds"in q&&(this.colorBounds=q.colorBounds),"vertexColor"in q&&(this.vertexColor=q.vertexColor?1:0),"colormap"in q&&this._colorMap.setPixels(this.genColormap(q.colormap,this.opacityscale));var $=q.field||q.coords&&q.coords[2]||null,ne=!1;if($||($=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in q||"coords"in q){var H=($.shape[0]+2)*($.shape[1]+2);H>this._field[2].data.length&&(h.freeFloat(this._field[2].data),this._field[2].data=h.mallocFloat(i.nextPow2(H))),this._field[2]=v(this._field[2].data,[$.shape[0]+2,$.shape[1]+2]),this.padField(this._field[2],$),this.shape=$.shape.slice();for(var Q=this.shape,ee=0;ee<2;++ee)this._field[2].size>this._field[ee].data.length&&(h.freeFloat(this._field[ee].data),this._field[ee].data=h.mallocFloat(this._field[2].size)),this._field[ee]=v(this._field[ee].data,[Q[0]+2,Q[1]+2]);if(q.coords){var ie=q.coords;if(!Array.isArray(ie)||ie.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(ee=0;ee<2;++ee){var ae=ie[ee];for(me=0;me<2;++me)if(ae.shape[me]!==Q[me])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[ee],ae)}}else if(q.ticks){var ue=q.ticks;if(!Array.isArray(ue)||ue.length!==2)throw new Error("gl-surface: invalid ticks");for(ee=0;ee<2;++ee){var le=ue[ee];if((Array.isArray(le)||le.length)&&(le=v(le)),le.shape[0]!==Q[ee])throw new Error("gl-surface: invalid tick length");var ge=v(le.data,Q);ge.stride[ee]=le.stride[0],ge.stride[1^ee]=0,this.padField(this._field[ee],ge)}}else{for(ee=0;ee<2;++ee){var fe=[0,0];fe[ee]=1,this._field[ee]=v(this._field[ee].data,[Q[0]+2,Q[1]+2],fe,0)}this._field[0].set(0,0,0);for(var me=0;me0){for(var It=0;It<5;++It)Pe.pop();Pt-=1}continue e}Pe.push(rt[0],rt[1],kt[0],kt[1],rt[2]),Pt+=1}}He.push(Pt)}this._contourOffsets[Ie]=De,this._contourCounts[Ie]=He}var Zt=h.mallocFloat(Pe.length);for(ee=0;eeO||E<0||E>O)throw new Error("gl-texture2d: Invalid texture size");return A._shape=[M,E],A.bind(),D.texImage2D(D.TEXTURE_2D,0,A.format,M,E,0,A.format,A.type,null),A._mipLevels=[0],A}function x(A,M,E,D,O,R){this.gl=A,this.handle=M,this.format=O,this.type=R,this._shape=[E,D],this._mipLevels=[0],this._magFilter=A.NEAREST,this._minFilter=A.NEAREST,this._wrapS=A.CLAMP_TO_EDGE,this._wrapT=A.CLAMP_TO_EDGE,this._anisoSamples=1;var z=this,L=[this._wrapS,this._wrapT];Object.defineProperties(L,[{get:function(){return z._wrapS},set:function(N){return z.wrapS=N}},{get:function(){return z._wrapT},set:function(N){return z.wrapT=N}}]),this._wrapVector=L;var P=[this._shape[0],this._shape[1]];Object.defineProperties(P,[{get:function(){return z._shape[0]},set:function(N){return z.width=N}},{get:function(){return z._shape[1]},set:function(N){return z.height=N}}]),this._shapeVector=P}var w=x.prototype;function k(A,M){return A.length===3?M[2]===1&&M[1]===A[0]*A[2]&&M[0]===A[2]:M[0]===1&&M[1]===A[0]}function b(A){var M=A.createTexture();return A.bindTexture(A.TEXTURE_2D,M),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE),M}function T(A,M,E,D,O){var R=A.getParameter(A.MAX_TEXTURE_SIZE);if(M<0||M>R||E<0||E>R)throw new Error("gl-texture2d: Invalid texture shape");if(O===A.FLOAT&&!A.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var z=b(A);return A.texImage2D(A.TEXTURE_2D,0,D,M,E,0,D,O,null),new x(A,z,M,E,D,O)}function _(A,M,E,D,O,R){var z=b(A);return A.texImage2D(A.TEXTURE_2D,0,O,O,R,M),new x(A,z,E,D,O,R)}function S(A,M){var E=M.dtype,D=M.shape.slice(),O=A.getParameter(A.MAX_TEXTURE_SIZE);if(D[0]<0||D[0]>O||D[1]<0||D[1]>O)throw new Error("gl-texture2d: Invalid texture size");var R=k(D,M.stride.slice()),z=0;E==="float32"?z=A.FLOAT:E==="float64"?(z=A.FLOAT,R=!1,E="float32"):E==="uint8"?z=A.UNSIGNED_BYTE:(z=A.UNSIGNED_BYTE,R=!1,E="uint8");var L,P,N=0;if(D.length===2)N=A.LUMINANCE,D=[D[0],D[1],1],M=i(M.data,D,[M.stride[0],M.stride[1],1],M.offset);else{if(D.length!==3)throw new Error("gl-texture2d: Invalid shape for texture");if(D[2]===1)N=A.ALPHA;else if(D[2]===2)N=A.LUMINANCE_ALPHA;else if(D[2]===3)N=A.RGB;else{if(D[2]!==4)throw new Error("gl-texture2d: Invalid shape for pixel coords");N=A.RGBA}}z!==A.FLOAT||A.getExtension("OES_texture_float")||(z=A.UNSIGNED_BYTE,R=!1);var B=M.size;if(R)L=M.offset===0&&M.data.length===B?M.data:M.data.subarray(M.offset,M.offset+B);else{var G=[D[2],D[2]*D[0],1];P=u.malloc(B,E);var W=i(P,D,G,0);E!=="float32"&&E!=="float64"||z!==A.UNSIGNED_BYTE?s.assign(W,M):v(W,M),L=P.subarray(0,B)}var K=b(A);return A.texImage2D(A.TEXTURE_2D,0,N,D[0],D[1],0,N,z,L),R||u.free(P),new x(A,K,D[0],D[1],N,z)}Object.defineProperties(w,{minFilter:{get:function(){return this._minFilter},set:function(A){this.bind();var M=this.gl;if(this.type===M.FLOAT&&d.indexOf(A)>=0&&(M.getExtension("OES_texture_float_linear")||(A=M.NEAREST)),h.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MIN_FILTER,A),this._minFilter=A}},magFilter:{get:function(){return this._magFilter},set:function(A){this.bind();var M=this.gl;if(this.type===M.FLOAT&&d.indexOf(A)>=0&&(M.getExtension("OES_texture_float_linear")||(A=M.NEAREST)),h.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MAG_FILTER,A),this._magFilter=A}},mipSamples:{get:function(){return this._anisoSamples},set:function(A){var M=this._anisoSamples;if(this._anisoSamples=0|Math.max(A,1),M!==this._anisoSamples){var E=this.gl.getExtension("EXT_texture_filter_anisotropic");E&&this.gl.texParameterf(this.gl.TEXTURE_2D,E.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(A){if(this.bind(),m.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,A),this._wrapS=A}},wrapT:{get:function(){return this._wrapT},set:function(A){if(this.bind(),m.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,A),this._wrapT=A}},wrap:{get:function(){return this._wrapVector},set:function(A){if(Array.isArray(A)||(A=[A,A]),A.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var M=0;M<2;++M)if(m.indexOf(A[M])<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);this._wrapS=A[0],this._wrapT=A[1];var E=this.gl;return this.bind(),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_S,this._wrapS),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_T,this._wrapT),A}},shape:{get:function(){return this._shapeVector},set:function(A){if(Array.isArray(A)){if(A.length!==2)throw new Error("gl-texture2d: Invalid texture shape")}else A=[0|A,0|A];return y(this,0|A[0],0|A[1]),[0|A[0],0|A[1]]}},width:{get:function(){return this._shape[0]},set:function(A){return y(this,A|=0,this._shape[1]),A}},height:{get:function(){return this._shape[1]},set:function(A){return A|=0,y(this,this._shape[0],A),A}}}),w.bind=function(A){var M=this.gl;return A!==void 0&&M.activeTexture(M.TEXTURE0+(0|A)),M.bindTexture(M.TEXTURE_2D,this.handle),A!==void 0?0|A:M.getParameter(M.ACTIVE_TEXTURE)-M.TEXTURE0},w.dispose=function(){this.gl.deleteTexture(this.handle)},w.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var A=Math.min(this._shape[0],this._shape[1]),M=0;A>0;++M,A>>>=1)this._mipLevels.indexOf(M)<0&&this._mipLevels.push(M)},w.setPixels=function(A,M,E,D){var O=this.gl;this.bind(),Array.isArray(M)?(D=E,E=0|M[1],M=0|M[0]):(M=M||0,E=E||0),D=D||0;var R=p(A)?A:A.raw;if(R)this._mipLevels.indexOf(D)<0?(O.texImage2D(O.TEXTURE_2D,0,this.format,this.format,this.type,R),this._mipLevels.push(D)):O.texSubImage2D(O.TEXTURE_2D,D,M,E,this.format,this.type,R);else{if(!(A.shape&&A.stride&&A.data))throw new Error("gl-texture2d: Unsupported data type");if(A.shape.length<2||M+A.shape[1]>this._shape[1]>>>D||E+A.shape[0]>this._shape[0]>>>D||M<0||E<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");(function(z,L,P,N,B,G,W,K){var te=K.dtype,Y=K.shape.slice();if(Y.length<2||Y.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var Z=0,re=0,U=k(Y,K.stride.slice());if(te==="float32"?Z=z.FLOAT:te==="float64"?(Z=z.FLOAT,U=!1,te="float32"):te==="uint8"?Z=z.UNSIGNED_BYTE:(Z=z.UNSIGNED_BYTE,U=!1,te="uint8"),Y.length===2)re=z.LUMINANCE,Y=[Y[0],Y[1],1],K=i(K.data,Y,[K.stride[0],K.stride[1],1],K.offset);else{if(Y.length!==3)throw new Error("gl-texture2d: Invalid shape for texture");if(Y[2]===1)re=z.ALPHA;else if(Y[2]===2)re=z.LUMINANCE_ALPHA;else if(Y[2]===3)re=z.RGB;else{if(Y[2]!==4)throw new Error("gl-texture2d: Invalid shape for pixel coords");re=z.RGBA}Y[2]}if(re!==z.LUMINANCE&&re!==z.ALPHA||B!==z.LUMINANCE&&B!==z.ALPHA||(re=B),re!==B)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var q=K.size,$=W.indexOf(N)<0;if($&&W.push(N),Z===G&&U)K.offset===0&&K.data.length===q?$?z.texImage2D(z.TEXTURE_2D,N,B,Y[0],Y[1],0,B,G,K.data):z.texSubImage2D(z.TEXTURE_2D,N,L,P,Y[0],Y[1],B,G,K.data):$?z.texImage2D(z.TEXTURE_2D,N,B,Y[0],Y[1],0,B,G,K.data.subarray(K.offset,K.offset+q)):z.texSubImage2D(z.TEXTURE_2D,N,L,P,Y[0],Y[1],B,G,K.data.subarray(K.offset,K.offset+q));else{var ne;ne=G===z.FLOAT?u.mallocFloat32(q):u.mallocUint8(q);var H=i(ne,Y,[Y[2],Y[2]*Y[0],1]);Z===z.FLOAT&&G===z.UNSIGNED_BYTE?v(H,K):s.assign(H,K),$?z.texImage2D(z.TEXTURE_2D,N,B,Y[0],Y[1],0,B,G,ne.subarray(0,q)):z.texSubImage2D(z.TEXTURE_2D,N,L,P,Y[0],Y[1],B,G,ne.subarray(0,q)),G===z.FLOAT?u.freeFloat32(ne):u.freeUint8(ne)}})(O,M,E,D,this.format,this.type,this._mipLevels,A)}}},{ndarray:259,"ndarray-ops":254,"typedarray-pool":308}],147:[function(a,l,c){l.exports=function(i,s,u){s?s.bind():i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,null);var d=0|i.getParameter(i.MAX_VERTEX_ATTRIBS);if(u){if(u.length>d)throw new Error("gl-vao: Too many vertex attributes");for(var h=0;h1?0:Math.acos(p)};var i=a("./fromValues"),s=a("./normalize"),u=a("./dot")},{"./dot":162,"./fromValues":168,"./normalize":179}],153:[function(a,l,c){l.exports=function(i,s){return i[0]=Math.ceil(s[0]),i[1]=Math.ceil(s[1]),i[2]=Math.ceil(s[2]),i}},{}],154:[function(a,l,c){l.exports=function(i){var s=new Float32Array(3);return s[0]=i[0],s[1]=i[1],s[2]=i[2],s}},{}],155:[function(a,l,c){l.exports=function(i,s){return i[0]=s[0],i[1]=s[1],i[2]=s[2],i}},{}],156:[function(a,l,c){l.exports=function(){var i=new Float32Array(3);return i[0]=0,i[1]=0,i[2]=0,i}},{}],157:[function(a,l,c){l.exports=function(i,s,u){var d=s[0],h=s[1],m=s[2],g=u[0],p=u[1],v=u[2];return i[0]=h*v-m*p,i[1]=m*g-d*v,i[2]=d*p-h*g,i}},{}],158:[function(a,l,c){l.exports=a("./distance")},{"./distance":159}],159:[function(a,l,c){l.exports=function(i,s){var u=s[0]-i[0],d=s[1]-i[1],h=s[2]-i[2];return Math.sqrt(u*u+d*d+h*h)}},{}],160:[function(a,l,c){l.exports=a("./divide")},{"./divide":161}],161:[function(a,l,c){l.exports=function(i,s,u){return i[0]=s[0]/u[0],i[1]=s[1]/u[1],i[2]=s[2]/u[2],i}},{}],162:[function(a,l,c){l.exports=function(i,s){return i[0]*s[0]+i[1]*s[1]+i[2]*s[2]}},{}],163:[function(a,l,c){l.exports=1e-6},{}],164:[function(a,l,c){l.exports=function(s,u){var d=s[0],h=s[1],m=s[2],g=u[0],p=u[1],v=u[2];return Math.abs(d-g)<=i*Math.max(1,Math.abs(d),Math.abs(g))&&Math.abs(h-p)<=i*Math.max(1,Math.abs(h),Math.abs(p))&&Math.abs(m-v)<=i*Math.max(1,Math.abs(m),Math.abs(v))};var i=a("./epsilon")},{"./epsilon":163}],165:[function(a,l,c){l.exports=function(i,s){return i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]}},{}],166:[function(a,l,c){l.exports=function(i,s){return i[0]=Math.floor(s[0]),i[1]=Math.floor(s[1]),i[2]=Math.floor(s[2]),i}},{}],167:[function(a,l,c){l.exports=function(s,u,d,h,m,g){var p,v;for(u||(u=3),d||(d=0),v=h?Math.min(h*u+d,s.length):s.length,p=d;p0&&(m=1/Math.sqrt(m),i[0]=s[0]*m,i[1]=s[1]*m,i[2]=s[2]*m),i}},{}],180:[function(a,l,c){l.exports=function(i,s){s=s||1;var u=2*Math.random()*Math.PI,d=2*Math.random()-1,h=Math.sqrt(1-d*d)*s;return i[0]=Math.cos(u)*h,i[1]=Math.sin(u)*h,i[2]=d*s,i}},{}],181:[function(a,l,c){l.exports=function(i,s,u,d){var h=u[1],m=u[2],g=s[1]-h,p=s[2]-m,v=Math.sin(d),y=Math.cos(d);return i[0]=s[0],i[1]=h+g*y-p*v,i[2]=m+g*v+p*y,i}},{}],182:[function(a,l,c){l.exports=function(i,s,u,d){var h=u[0],m=u[2],g=s[0]-h,p=s[2]-m,v=Math.sin(d),y=Math.cos(d);return i[0]=h+p*v+g*y,i[1]=s[1],i[2]=m+p*y-g*v,i}},{}],183:[function(a,l,c){l.exports=function(i,s,u,d){var h=u[0],m=u[1],g=s[0]-h,p=s[1]-m,v=Math.sin(d),y=Math.cos(d);return i[0]=h+g*y-p*v,i[1]=m+g*v+p*y,i[2]=s[2],i}},{}],184:[function(a,l,c){l.exports=function(i,s){return i[0]=Math.round(s[0]),i[1]=Math.round(s[1]),i[2]=Math.round(s[2]),i}},{}],185:[function(a,l,c){l.exports=function(i,s,u){return i[0]=s[0]*u,i[1]=s[1]*u,i[2]=s[2]*u,i}},{}],186:[function(a,l,c){l.exports=function(i,s,u,d){return i[0]=s[0]+u[0]*d,i[1]=s[1]+u[1]*d,i[2]=s[2]+u[2]*d,i}},{}],187:[function(a,l,c){l.exports=function(i,s,u,d){return i[0]=s,i[1]=u,i[2]=d,i}},{}],188:[function(a,l,c){l.exports=a("./squaredDistance")},{"./squaredDistance":190}],189:[function(a,l,c){l.exports=a("./squaredLength")},{"./squaredLength":191}],190:[function(a,l,c){l.exports=function(i,s){var u=s[0]-i[0],d=s[1]-i[1],h=s[2]-i[2];return u*u+d*d+h*h}},{}],191:[function(a,l,c){l.exports=function(i){var s=i[0],u=i[1],d=i[2];return s*s+u*u+d*d}},{}],192:[function(a,l,c){l.exports=a("./subtract")},{"./subtract":193}],193:[function(a,l,c){l.exports=function(i,s,u){return i[0]=s[0]-u[0],i[1]=s[1]-u[1],i[2]=s[2]-u[2],i}},{}],194:[function(a,l,c){l.exports=function(i,s,u){var d=s[0],h=s[1],m=s[2];return i[0]=d*u[0]+h*u[3]+m*u[6],i[1]=d*u[1]+h*u[4]+m*u[7],i[2]=d*u[2]+h*u[5]+m*u[8],i}},{}],195:[function(a,l,c){l.exports=function(i,s,u){var d=s[0],h=s[1],m=s[2],g=u[3]*d+u[7]*h+u[11]*m+u[15];return g=g||1,i[0]=(u[0]*d+u[4]*h+u[8]*m+u[12])/g,i[1]=(u[1]*d+u[5]*h+u[9]*m+u[13])/g,i[2]=(u[2]*d+u[6]*h+u[10]*m+u[14])/g,i}},{}],196:[function(a,l,c){l.exports=function(i,s,u){var d=s[0],h=s[1],m=s[2],g=u[0],p=u[1],v=u[2],y=u[3],x=y*d+p*m-v*h,w=y*h+v*d-g*m,k=y*m+g*h-p*d,b=-g*d-p*h-v*m;return i[0]=x*y+b*-g+w*-v-k*-p,i[1]=w*y+b*-p+k*-g-x*-v,i[2]=k*y+b*-v+x*-p-w*-g,i}},{}],197:[function(a,l,c){l.exports=function(i,s,u){return i[0]=s[0]+u[0],i[1]=s[1]+u[1],i[2]=s[2]+u[2],i[3]=s[3]+u[3],i}},{}],198:[function(a,l,c){l.exports=function(i){var s=new Float32Array(4);return s[0]=i[0],s[1]=i[1],s[2]=i[2],s[3]=i[3],s}},{}],199:[function(a,l,c){l.exports=function(i,s){return i[0]=s[0],i[1]=s[1],i[2]=s[2],i[3]=s[3],i}},{}],200:[function(a,l,c){l.exports=function(){var i=new Float32Array(4);return i[0]=0,i[1]=0,i[2]=0,i[3]=0,i}},{}],201:[function(a,l,c){l.exports=function(i,s){var u=s[0]-i[0],d=s[1]-i[1],h=s[2]-i[2],m=s[3]-i[3];return Math.sqrt(u*u+d*d+h*h+m*m)}},{}],202:[function(a,l,c){l.exports=function(i,s,u){return i[0]=s[0]/u[0],i[1]=s[1]/u[1],i[2]=s[2]/u[2],i[3]=s[3]/u[3],i}},{}],203:[function(a,l,c){l.exports=function(i,s){return i[0]*s[0]+i[1]*s[1]+i[2]*s[2]+i[3]*s[3]}},{}],204:[function(a,l,c){l.exports=function(i,s,u,d){var h=new Float32Array(4);return h[0]=i,h[1]=s,h[2]=u,h[3]=d,h}},{}],205:[function(a,l,c){l.exports={create:a("./create"),clone:a("./clone"),fromValues:a("./fromValues"),copy:a("./copy"),set:a("./set"),add:a("./add"),subtract:a("./subtract"),multiply:a("./multiply"),divide:a("./divide"),min:a("./min"),max:a("./max"),scale:a("./scale"),scaleAndAdd:a("./scaleAndAdd"),distance:a("./distance"),squaredDistance:a("./squaredDistance"),length:a("./length"),squaredLength:a("./squaredLength"),negate:a("./negate"),inverse:a("./inverse"),normalize:a("./normalize"),dot:a("./dot"),lerp:a("./lerp"),random:a("./random"),transformMat4:a("./transformMat4"),transformQuat:a("./transformQuat")}},{"./add":197,"./clone":198,"./copy":199,"./create":200,"./distance":201,"./divide":202,"./dot":203,"./fromValues":204,"./inverse":206,"./length":207,"./lerp":208,"./max":209,"./min":210,"./multiply":211,"./negate":212,"./normalize":213,"./random":214,"./scale":215,"./scaleAndAdd":216,"./set":217,"./squaredDistance":218,"./squaredLength":219,"./subtract":220,"./transformMat4":221,"./transformQuat":222}],206:[function(a,l,c){l.exports=function(i,s){return i[0]=1/s[0],i[1]=1/s[1],i[2]=1/s[2],i[3]=1/s[3],i}},{}],207:[function(a,l,c){l.exports=function(i){var s=i[0],u=i[1],d=i[2],h=i[3];return Math.sqrt(s*s+u*u+d*d+h*h)}},{}],208:[function(a,l,c){l.exports=function(i,s,u,d){var h=s[0],m=s[1],g=s[2],p=s[3];return i[0]=h+d*(u[0]-h),i[1]=m+d*(u[1]-m),i[2]=g+d*(u[2]-g),i[3]=p+d*(u[3]-p),i}},{}],209:[function(a,l,c){l.exports=function(i,s,u){return i[0]=Math.max(s[0],u[0]),i[1]=Math.max(s[1],u[1]),i[2]=Math.max(s[2],u[2]),i[3]=Math.max(s[3],u[3]),i}},{}],210:[function(a,l,c){l.exports=function(i,s,u){return i[0]=Math.min(s[0],u[0]),i[1]=Math.min(s[1],u[1]),i[2]=Math.min(s[2],u[2]),i[3]=Math.min(s[3],u[3]),i}},{}],211:[function(a,l,c){l.exports=function(i,s,u){return i[0]=s[0]*u[0],i[1]=s[1]*u[1],i[2]=s[2]*u[2],i[3]=s[3]*u[3],i}},{}],212:[function(a,l,c){l.exports=function(i,s){return i[0]=-s[0],i[1]=-s[1],i[2]=-s[2],i[3]=-s[3],i}},{}],213:[function(a,l,c){l.exports=function(i,s){var u=s[0],d=s[1],h=s[2],m=s[3],g=u*u+d*d+h*h+m*m;return g>0&&(g=1/Math.sqrt(g),i[0]=u*g,i[1]=d*g,i[2]=h*g,i[3]=m*g),i}},{}],214:[function(a,l,c){var i=a("./normalize"),s=a("./scale");l.exports=function(u,d){return d=d||1,u[0]=Math.random(),u[1]=Math.random(),u[2]=Math.random(),u[3]=Math.random(),i(u,u),s(u,u,d),u}},{"./normalize":213,"./scale":215}],215:[function(a,l,c){l.exports=function(i,s,u){return i[0]=s[0]*u,i[1]=s[1]*u,i[2]=s[2]*u,i[3]=s[3]*u,i}},{}],216:[function(a,l,c){l.exports=function(i,s,u,d){return i[0]=s[0]+u[0]*d,i[1]=s[1]+u[1]*d,i[2]=s[2]+u[2]*d,i[3]=s[3]+u[3]*d,i}},{}],217:[function(a,l,c){l.exports=function(i,s,u,d,h){return i[0]=s,i[1]=u,i[2]=d,i[3]=h,i}},{}],218:[function(a,l,c){l.exports=function(i,s){var u=s[0]-i[0],d=s[1]-i[1],h=s[2]-i[2],m=s[3]-i[3];return u*u+d*d+h*h+m*m}},{}],219:[function(a,l,c){l.exports=function(i){var s=i[0],u=i[1],d=i[2],h=i[3];return s*s+u*u+d*d+h*h}},{}],220:[function(a,l,c){l.exports=function(i,s,u){return i[0]=s[0]-u[0],i[1]=s[1]-u[1],i[2]=s[2]-u[2],i[3]=s[3]-u[3],i}},{}],221:[function(a,l,c){l.exports=function(i,s,u){var d=s[0],h=s[1],m=s[2],g=s[3];return i[0]=u[0]*d+u[4]*h+u[8]*m+u[12]*g,i[1]=u[1]*d+u[5]*h+u[9]*m+u[13]*g,i[2]=u[2]*d+u[6]*h+u[10]*m+u[14]*g,i[3]=u[3]*d+u[7]*h+u[11]*m+u[15]*g,i}},{}],222:[function(a,l,c){l.exports=function(i,s,u){var d=s[0],h=s[1],m=s[2],g=u[0],p=u[1],v=u[2],y=u[3],x=y*d+p*m-v*h,w=y*h+v*d-g*m,k=y*m+g*h-p*d,b=-g*d-p*h-v*m;return i[0]=x*y+b*-g+w*-v-k*-p,i[1]=w*y+b*-p+k*-g-x*-v,i[2]=k*y+b*-v+x*-p-w*-g,i[3]=s[3],i}},{}],223:[function(a,l,c){var i=a("glsl-tokenizer"),s=a("atob-lite");l.exports=function(u){for(var d=Array.isArray(u)?u:i(u),h=0;h0)continue;ne=q.slice(0,1).join("")}return P(ne),A+=ne.length,(b=b.slice(ne.length)).length}}function Y(){return/[^a-fA-F0-9]/.test(p)?(P(b.join("")),k=999,x):(b.push(p),v=p,x+1)}function Z(){return p==="."||/[eE]/.test(p)?(b.push(p),k=5,v=p,x+1):p==="x"&&b.length===1&&b[0]==="0"?(k=11,b.push(p),v=p,x+1):/[^\d]/.test(p)?(P(b.join("")),k=999,x):(b.push(p),v=p,x+1)}function re(){return p==="f"&&(b.push(p),v=p,x+=1),/[eE]/.test(p)?(b.push(p),v=p,x+1):(p!=="-"&&p!=="+"||!/[eE]/.test(v))&&/[^\d]/.test(p)?(P(b.join("")),k=999,x):(b.push(p),v=p,x+1)}function U(){if(/[^\d\w_]/.test(p)){var q=b.join("");return k=L[q]?8:z[q]?7:6,P(b.join("")),k=999,x}return b.push(p),v=p,x+1}};var i=a("./lib/literals"),s=a("./lib/operators"),u=a("./lib/builtins"),d=a("./lib/literals-300es"),h=a("./lib/builtins-300es"),m=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":226,"./lib/builtins-300es":225,"./lib/literals":228,"./lib/literals-300es":227,"./lib/operators":229}],225:[function(a,l,c){var i=a("./builtins");i=i.slice().filter(function(s){return!/^(gl\_|texture)/.test(s)}),l.exports=i.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"])},{"./builtins":226}],226:[function(a,l,c){l.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},{}],227:[function(a,l,c){var i=a("./literals");l.exports=i.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"])},{"./literals":228}],228:[function(a,l,c){l.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"]},{}],229:[function(a,l,c){l.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],230:[function(a,l,c){var i=a("./index");l.exports=function(s,u){var d=i(u),h=[];return h=(h=h.concat(d(s))).concat(d(null))}},{"./index":224}],231:[function(a,l,c){l.exports=function(i){typeof i=="string"&&(i=[i]);for(var s=[].slice.call(arguments,1),u=[],d=0;d0;)for(var _=(v=T.pop()).adjacent,S=0;S<=x;++S){var A=_[S];if(A.boundary&&!(A.lastVisited<=-w)){for(var M=A.vertices,E=0;E<=x;++E){var D=M[E];k[E]=D<0?y:b[D]}var O=this.orient();if(O>0)return A;A.lastVisited=-w,O===0&&T.push(A)}}return null},p.walk=function(v,y){var x=this.vertices.length-1,w=this.dimension,k=this.vertices,b=this.tuple,T=y?this.interior.length*Math.random()|0:this.interior.length-1,_=this.interior[T];e:for(;!_.boundary;){for(var S=_.vertices,A=_.adjacent,M=0;M<=w;++M)b[M]=k[S[M]];for(_.lastVisited=x,M=0;M<=w;++M){var E=A[M];if(!(E.lastVisited>=x)){var D=b[M];b[M]=v;var O=this.orient();if(b[M]=D,O<0){_=E;continue e}E.boundary?E.lastVisited=-x:E.lastVisited=x}}return}return _},p.addPeaks=function(v,y){var x=this.vertices.length-1,w=this.dimension,k=this.vertices,b=this.tuple,T=this.interior,_=this.simplices,S=[y];y.lastVisited=x,y.vertices[y.vertices.indexOf(-1)]=x,y.boundary=!1,T.push(y);for(var A=[];S.length>0;){var M=(y=S.pop()).vertices,E=y.adjacent,D=M.indexOf(x);if(!(D<0)){for(var O=0;O<=w;++O)if(O!==D){var R=E[O];if(R.boundary&&!(R.lastVisited>=x)){var z=R.vertices;if(R.lastVisited!==-x){for(var L=0,P=0;P<=w;++P)z[P]<0?(L=P,b[P]=v):b[P]=k[z[P]];if(this.orient()>0){z[L]=x,R.boundary=!1,T.push(R),S.push(R),R.lastVisited=x;continue}R.lastVisited=-x}var N=R.adjacent,B=M.slice(),G=E.slice(),W=new u(B,G,!0);_.push(W);var K=N.indexOf(y);if(!(K<0))for(N[K]=W,G[D]=R,B[O]=-1,G[O]=y,E[O]=W,W.flip(),P=0;P<=w;++P){var te=B[P];if(!(te<0||te===x)){for(var Y=new Array(w-1),Z=0,re=0;re<=w;++re){var U=B[re];U<0||re===P||(Y[Z++]=U)}A.push(new d(Y,W,P))}}}}}}for(A.sort(h),O=0;O+1=0?T[S++]=_[M]:A=1&M;if(A===(1&v)){var E=T[0];T[0]=T[1],T[1]=E}y.push(T)}}return y}},{"robust-orientation":284,"simplicial-complex":293}],234:[function(a,l,c){var i=a("binary-search-bounds");function s(S,A,M,E,D){this.mid=S,this.left=A,this.right=M,this.leftPoints=E,this.rightPoints=D,this.count=(A?A.count:0)+(M?M.count:0)+E.length}l.exports=function(S){return!S||S.length===0?new T(null):new T(b(S))};var u=s.prototype;function d(S,A){S.mid=A.mid,S.left=A.left,S.right=A.right,S.leftPoints=A.leftPoints,S.rightPoints=A.rightPoints,S.count=A.count}function h(S,A){var M=b(A);S.mid=M.mid,S.left=M.left,S.right=M.right,S.leftPoints=M.leftPoints,S.rightPoints=M.rightPoints,S.count=M.count}function m(S,A){var M=S.intervals([]);M.push(A),h(S,M)}function g(S,A){var M=S.intervals([]),E=M.indexOf(A);return E<0?0:(M.splice(E,1),h(S,M),1)}function p(S,A,M){for(var E=0;E=0&&S[E][1]>=A;--E){var D=M(S[E]);if(D)return D}}function y(S,A){for(var M=0;M>1],D=[],O=[],R=[];for(M=0;M3*(A+1)?m(this,S):this.left.insert(S):this.left=b([S]);else if(S[0]>this.mid)this.right?4*(this.right.count+1)>3*(A+1)?m(this,S):this.right.insert(S):this.right=b([S]);else{var M=i.ge(this.leftPoints,S,w),E=i.ge(this.rightPoints,S,k);this.leftPoints.splice(M,0,S),this.rightPoints.splice(E,0,S)}},u.remove=function(S){var A=this.count-this.leftPoints;if(S[1]3*(A-1)?g(this,S):(O=this.left.remove(S))===2?(this.left=null,this.count-=1,1):(O===1&&(this.count-=1),O):0;if(S[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(A-1)?g(this,S):(O=this.right.remove(S))===2?(this.right=null,this.count-=1,1):(O===1&&(this.count-=1),O):0;if(this.count===1)return this.leftPoints[0]===S?2:0;if(this.leftPoints.length===1&&this.leftPoints[0]===S){if(this.left&&this.right){for(var M=this,E=this.left;E.right;)M=E,E=E.right;if(M===this)E.right=this.right;else{var D=this.left,O=this.right;M.count-=E.count,M.right=E.left,E.left=D,E.right=O}d(this,E),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?d(this,this.left):d(this,this.right);return 1}for(D=i.ge(this.leftPoints,S,w);Dthis.mid){var M;return this.right&&(M=this.right.queryPoint(S,A))?M:v(this.rightPoints,S,A)}return y(this.leftPoints,A)},u.queryInterval=function(S,A,M){var E;return Sthis.mid&&this.right&&(E=this.right.queryInterval(S,A,M))?E:Athis.mid?v(this.rightPoints,S,M):y(this.leftPoints,M)};var _=T.prototype;_.insert=function(S){this.root?this.root.insert(S):this.root=new s(S[0],null,null,[S],[S])},_.remove=function(S){if(this.root){var A=this.root.remove(S);return A===2&&(this.root=null),A!==0}return!1},_.queryPoint=function(S,A){if(this.root)return this.root.queryPoint(S,A)},_.queryInterval=function(S,A,M){if(S<=A&&this.root)return this.root.queryInterval(S,A,M)},Object.defineProperty(_,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(_,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":31}],235:[function(a,l,c){l.exports=function(i){for(var s=new Array(i),u=0;u + * @license MIT + */l.exports=function(s){return s!=null&&(i(s)||function(u){return typeof u.readFloatLE=="function"&&typeof u.slice=="function"&&i(u.slice(0,0))}(s)||!!s._isBuffer)}},{}],238:[function(a,l,c){l.exports=u,l.exports.isMobile=u,l.exports.default=u;var i=/(android|bb\d+|meego).+mobile|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|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,s=/(android|bb\d+|meego).+mobile|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|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function u(d){d||(d={});var h=d.ua;if(h||typeof navigator>"u"||(h=navigator.userAgent),h&&h.headers&&typeof h.headers["user-agent"]=="string"&&(h=h.headers["user-agent"]),typeof h!="string")return!1;var m=d.tablet?s.test(h):i.test(h);return!m&&d.tablet&&d.featureDetect&&navigator&&navigator.maxTouchPoints>1&&h.indexOf("Macintosh")!==-1&&h.indexOf("Safari")!==-1&&(m=!0),m}},{}],239:[function(a,l,c){l.exports=function(i){for(var s,u=i.length,d=0;d13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}},{}],240:[function(a,l,c){l.exports=function(i,s,u){return i*(1-u)+s*u}},{}],241:[function(a,l,c){var i=a("./normalize"),s=a("gl-mat4/create"),u=a("gl-mat4/clone"),d=a("gl-mat4/determinant"),h=a("gl-mat4/invert"),m=a("gl-mat4/transpose"),g={length:a("gl-vec3/length"),normalize:a("gl-vec3/normalize"),dot:a("gl-vec3/dot"),cross:a("gl-vec3/cross")},p=s(),v=s(),y=[0,0,0,0],x=[[0,0,0],[0,0,0],[0,0,0]],w=[0,0,0];function k(b,T,_,S,A){b[0]=T[0]*S+_[0]*A,b[1]=T[1]*S+_[1]*A,b[2]=T[2]*S+_[2]*A}l.exports=function(b,T,_,S,A,M){if(T||(T=[0,0,0]),_||(_=[0,0,0]),S||(S=[0,0,0]),A||(A=[0,0,0,1]),M||(M=[0,0,0,1]),!i(p,b)||(u(v,p),v[3]=0,v[7]=0,v[11]=0,v[15]=1,Math.abs(d(v)<1e-8)))return!1;var E,D,O,R,z,L,P,N=p[3],B=p[7],G=p[11],W=p[12],K=p[13],te=p[14],Y=p[15];if(N!==0||B!==0||G!==0){if(y[0]=N,y[1]=B,y[2]=G,y[3]=Y,!h(v,v))return!1;m(v,v),E=A,O=v,R=(D=y)[0],z=D[1],L=D[2],P=D[3],E[0]=O[0]*R+O[4]*z+O[8]*L+O[12]*P,E[1]=O[1]*R+O[5]*z+O[9]*L+O[13]*P,E[2]=O[2]*R+O[6]*z+O[10]*L+O[14]*P,E[3]=O[3]*R+O[7]*z+O[11]*L+O[15]*P}else A[0]=A[1]=A[2]=0,A[3]=1;if(T[0]=W,T[1]=K,T[2]=te,function(re,U){re[0][0]=U[0],re[0][1]=U[1],re[0][2]=U[2],re[1][0]=U[4],re[1][1]=U[5],re[1][2]=U[6],re[2][0]=U[8],re[2][1]=U[9],re[2][2]=U[10]}(x,p),_[0]=g.length(x[0]),g.normalize(x[0],x[0]),S[0]=g.dot(x[0],x[1]),k(x[1],x[1],x[0],1,-S[0]),_[1]=g.length(x[1]),g.normalize(x[1],x[1]),S[0]/=_[1],S[1]=g.dot(x[0],x[2]),k(x[2],x[2],x[0],1,-S[1]),S[2]=g.dot(x[1],x[2]),k(x[2],x[2],x[1],1,-S[2]),_[2]=g.length(x[2]),g.normalize(x[2],x[2]),S[1]/=_[2],S[2]/=_[2],g.cross(w,x[1],x[2]),g.dot(x[0],w)<0)for(var Z=0;Z<3;Z++)_[Z]*=-1,x[Z][0]*=-1,x[Z][1]*=-1,x[Z][2]*=-1;return M[0]=.5*Math.sqrt(Math.max(1+x[0][0]-x[1][1]-x[2][2],0)),M[1]=.5*Math.sqrt(Math.max(1-x[0][0]+x[1][1]-x[2][2],0)),M[2]=.5*Math.sqrt(Math.max(1-x[0][0]-x[1][1]+x[2][2],0)),M[3]=.5*Math.sqrt(Math.max(1+x[0][0]+x[1][1]+x[2][2],0)),x[2][1]>x[1][2]&&(M[0]=-M[0]),x[0][2]>x[2][0]&&(M[1]=-M[1]),x[1][0]>x[0][1]&&(M[2]=-M[2]),!0}},{"./normalize":242,"gl-mat4/clone":92,"gl-mat4/create":93,"gl-mat4/determinant":94,"gl-mat4/invert":98,"gl-mat4/transpose":109,"gl-vec3/cross":157,"gl-vec3/dot":162,"gl-vec3/length":172,"gl-vec3/normalize":179}],242:[function(a,l,c){l.exports=function(i,s){var u=s[15];if(u===0)return!1;for(var d=1/u,h=0;h<16;h++)i[h]=s[h]*d;return!0}},{}],243:[function(a,l,c){var i=a("gl-vec3/lerp"),s=a("mat4-recompose"),u=a("mat4-decompose"),d=a("gl-mat4/determinant"),h=a("quat-slerp"),m=v(),g=v(),p=v();function v(){return{translate:y(),scale:y(1),skew:y(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function y(x){return[x||0,x||0,x||0]}l.exports=function(x,w,k,b){if(d(w)===0||d(k)===0)return!1;var T=u(w,m.translate,m.scale,m.skew,m.perspective,m.quaternion),_=u(k,g.translate,g.scale,g.skew,g.perspective,g.quaternion);return!(!T||!_)&&(i(p.translate,m.translate,g.translate,b),i(p.skew,m.skew,g.skew,b),i(p.scale,m.scale,g.scale,b),i(p.perspective,m.perspective,g.perspective,b),h(p.quaternion,m.quaternion,g.quaternion,b),s(x,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}},{"gl-mat4/determinant":94,"gl-vec3/lerp":173,"mat4-decompose":241,"mat4-recompose":244,"quat-slerp":271}],244:[function(a,l,c){var i={identity:a("gl-mat4/identity"),translate:a("gl-mat4/translate"),multiply:a("gl-mat4/multiply"),create:a("gl-mat4/create"),scale:a("gl-mat4/scale"),fromRotationTranslation:a("gl-mat4/fromRotationTranslation")},s=(i.create(),i.create());l.exports=function(u,d,h,m,g,p){return i.identity(u),i.fromRotationTranslation(u,p,d),u[3]=g[0],u[7]=g[1],u[11]=g[2],u[15]=g[3],i.identity(s),m[2]!==0&&(s[9]=m[2],i.multiply(u,u,s)),m[1]!==0&&(s[9]=0,s[8]=m[1],i.multiply(u,u,s)),m[0]!==0&&(s[8]=0,s[4]=m[0],i.multiply(u,u,s)),i.scale(u,u,h),u}},{"gl-mat4/create":93,"gl-mat4/fromRotationTranslation":96,"gl-mat4/identity":97,"gl-mat4/multiply":100,"gl-mat4/scale":107,"gl-mat4/translate":108}],245:[function(a,l,c){var i=a("binary-search-bounds"),s=a("mat4-interpolate"),u=a("gl-mat4/invert"),d=a("gl-mat4/rotateX"),h=a("gl-mat4/rotateY"),m=a("gl-mat4/rotateZ"),g=a("gl-mat4/lookAt"),p=a("gl-mat4/translate"),v=(a("gl-mat4/scale"),a("gl-vec3/normalize")),y=[0,0,0];function x(b){this._components=b.slice(),this._time=[0],this.prevMatrix=b.slice(),this.nextMatrix=b.slice(),this.computedMatrix=b.slice(),this.computedInverse=b.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}l.exports=function(b){return new x((b=b||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var w=x.prototype;w.recalcMatrix=function(b){var T=this._time,_=i.le(T,b),S=this.computedMatrix;if(!(_<0)){var A=this._components;if(_===T.length-1)for(var M=16*_,E=0;E<16;++E)S[E]=A[M++];else{var D=T[_+1]-T[_],O=(M=16*_,this.prevMatrix),R=!0;for(E=0;E<16;++E)O[E]=A[M++];var z=this.nextMatrix;for(E=0;E<16;++E)z[E]=A[M++],R=R&&O[E]===z[E];if(D<1e-6||R)for(E=0;E<16;++E)S[E]=O[E];else s(S,O,z,(b-T[_])/D)}var L=this.computedUp;L[0]=S[1],L[1]=S[5],L[2]=S[9],v(L,L);var P=this.computedInverse;u(P,S);var N=this.computedEye,B=P[15];N[0]=P[12]/B,N[1]=P[13]/B,N[2]=P[14]/B;var G=this.computedCenter,W=Math.exp(this.computedRadius[0]);for(E=0;E<3;++E)G[E]=N[E]-S[2+4*E]*W}},w.idle=function(b){if(!(b1&&i(s[g[x-2]],s[g[x-1]],y)<=0;)x-=1,g.pop();for(g.push(v),x=p.length;x>1&&i(s[p[x-2]],s[p[x-1]],y)>=0;)x-=1,p.pop();p.push(v)}d=new Array(p.length+g.length-2);for(var w=0,k=(h=0,g.length);h0;--b)d[w++]=p[b];return d};var i=a("robust-orientation")[3]},{"robust-orientation":284}],247:[function(a,l,c){l.exports=function(s,u){u||(u=s,s=window);var d=0,h=0,m=0,g={shift:!1,alt:!1,control:!1,meta:!1},p=!1;function v(M){var E=!1;return"altKey"in M&&(E=E||M.altKey!==g.alt,g.alt=!!M.altKey),"shiftKey"in M&&(E=E||M.shiftKey!==g.shift,g.shift=!!M.shiftKey),"ctrlKey"in M&&(E=E||M.ctrlKey!==g.control,g.control=!!M.ctrlKey),"metaKey"in M&&(E=E||M.metaKey!==g.meta,g.meta=!!M.metaKey),E}function y(M,E){var D=i.x(E),O=i.y(E);"buttons"in E&&(M=0|E.buttons),(M!==d||D!==h||O!==m||v(E))&&(d=0|M,h=D||0,m=O||0,u&&u(d,h,m,g))}function x(M){y(0,M)}function w(){(d||h||m||g.shift||g.alt||g.meta||g.control)&&(h=m=0,d=0,g.shift=g.alt=g.control=g.meta=!1,u&&u(0,0,0,g))}function k(M){v(M)&&u&&u(d,h,m,g)}function b(M){i.buttons(M)===0?y(0,M):y(d,M)}function T(M){y(d|i.buttons(M),M)}function _(M){y(d&~i.buttons(M),M)}function S(){p||(p=!0,s.addEventListener("mousemove",b),s.addEventListener("mousedown",T),s.addEventListener("mouseup",_),s.addEventListener("mouseleave",x),s.addEventListener("mouseenter",x),s.addEventListener("mouseout",x),s.addEventListener("mouseover",x),s.addEventListener("blur",w),s.addEventListener("keyup",k),s.addEventListener("keydown",k),s.addEventListener("keypress",k),s!==window&&(window.addEventListener("blur",w),window.addEventListener("keyup",k),window.addEventListener("keydown",k),window.addEventListener("keypress",k)))}S();var A={element:s};return Object.defineProperties(A,{enabled:{get:function(){return p},set:function(M){M?S():function(){!p||(p=!1,s.removeEventListener("mousemove",b),s.removeEventListener("mousedown",T),s.removeEventListener("mouseup",_),s.removeEventListener("mouseleave",x),s.removeEventListener("mouseenter",x),s.removeEventListener("mouseout",x),s.removeEventListener("mouseover",x),s.removeEventListener("blur",w),s.removeEventListener("keyup",k),s.removeEventListener("keydown",k),s.removeEventListener("keypress",k),s!==window&&(window.removeEventListener("blur",w),window.removeEventListener("keyup",k),window.removeEventListener("keydown",k),window.removeEventListener("keypress",k)))}()},enumerable:!0},buttons:{get:function(){return d},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return g},enumerable:!0}}),A};var i=a("mouse-event")},{"mouse-event":249}],248:[function(a,l,c){var i={left:0,top:0};l.exports=function(s,u,d){u=u||s.currentTarget||s.srcElement,Array.isArray(d)||(d=[0,0]);var h=s.clientX||0,m=s.clientY||0,g=(p=u,p===window||p===document||p===document.body?i:p.getBoundingClientRect()),p;return d[0]=h-g.left,d[1]=m-g.top,d}},{}],249:[function(a,l,c){function i(s){return s.target||s.srcElement||window}c.buttons=function(s){if(typeof s=="object"){if("buttons"in s)return s.buttons;if("which"in s){if((u=s.which)===2)return 4;if(u===3)return 2;if(u>0)return 1<=0)return 1< 0"),typeof u.vertex!="function"&&d("Must specify vertex creation function"),typeof u.cell!="function"&&d("Must specify cell creation function"),typeof u.phase!="function"&&d("Must specify phase function");for(var p=u.getters||[],v=new Array(m),y=0;y=0?v[y]=!0:v[y]=!1;return function(x,w,k,b,T,_){var S=[_,T].join(",");return(0,s[S])(x,w,k,i.mallocUint32,i.freeUint32)}(u.vertex,u.cell,u.phase,0,h,v)};var s={"false,0,1":function(u,d,h,m,g){return function(p,v,y,x){var w,k=0|p.shape[0],b=0|p.shape[1],T=p.data,_=0|p.offset,S=0|p.stride[0],A=0|p.stride[1],M=_,E=0|-S,D=0,O=0|-A,R=0,z=-S-A|0,L=0,P=0|S,N=A-S*k|0,B=0,G=0,W=0,K=2*k|0,te=m(K),Y=m(K),Z=0,re=0,U=-1,q=-1,$=0,ne=0|-k,H=0|k,Q=0,ee=-k-1|0,ie=k-1|0,ae=0,ue=0,le=0;for(B=0;B0){if(G=1,te[Z++]=h(T[M],v,y,x),M+=P,k>0)for(B=1,w=T[M],re=te[Z]=h(w,v,y,x),$=te[Z+U],Q=te[Z+ne],ae=te[Z+ee],re===$&&re===Q&&re===ae||(D=T[M+E],R=T[M+O],L=T[M+z],u(B,G,w,D,R,L,re,$,Q,ae,v,y,x),ue=Y[Z]=W++),Z+=1,M+=P,B=2;B0)for(B=1,w=T[M],re=te[Z]=h(w,v,y,x),$=te[Z+U],Q=te[Z+ne],ae=te[Z+ee],re===$&&re===Q&&re===ae||(D=T[M+E],R=T[M+O],L=T[M+z],u(B,G,w,D,R,L,re,$,Q,ae,v,y,x),ue=Y[Z]=W++,ae!==Q&&d(Y[Z+ne],ue,R,L,Q,ae,v,y,x)),Z+=1,M+=P,B=2;B0){if(B=1,te[Z++]=h(T[M],v,y,x),M+=P,b>0)for(G=1,w=T[M],re=te[Z]=h(w,v,y,x),Q=te[Z+ne],$=te[Z+U],ae=te[Z+ee],re===Q&&re===$&&re===ae||(D=T[M+E],R=T[M+O],L=T[M+z],u(B,G,w,D,R,L,re,Q,$,ae,v,y,x),ue=Y[Z]=W++),Z+=1,M+=P,G=2;G0)for(G=1,w=T[M],re=te[Z]=h(w,v,y,x),Q=te[Z+ne],$=te[Z+U],ae=te[Z+ee],re===Q&&re===$&&re===ae||(D=T[M+E],R=T[M+O],L=T[M+z],u(B,G,w,D,R,L,re,Q,$,ae,v,y,x),ue=Y[Z]=W++,ae!==Q&&d(Y[Z+ne],ue,L,D,ae,Q,v,y,x)),Z+=1,M+=P,G=2;G2&&M[1]>2&&_(A.pick(-1,-1).lo(1,1).hi(M[0]-2,M[1]-2),S.pick(-1,-1,0).lo(1,1).hi(M[0]-2,M[1]-2),S.pick(-1,-1,1).lo(1,1).hi(M[0]-2,M[1]-2)),M[1]>2&&(T(A.pick(0,-1).lo(1).hi(M[1]-2),S.pick(0,-1,1).lo(1).hi(M[1]-2)),b(S.pick(0,-1,0).lo(1).hi(M[1]-2))),M[1]>2&&(T(A.pick(M[0]-1,-1).lo(1).hi(M[1]-2),S.pick(M[0]-1,-1,1).lo(1).hi(M[1]-2)),b(S.pick(M[0]-1,-1,0).lo(1).hi(M[1]-2))),M[0]>2&&(T(A.pick(-1,0).lo(1).hi(M[0]-2),S.pick(-1,0,0).lo(1).hi(M[0]-2)),b(S.pick(-1,0,1).lo(1).hi(M[0]-2))),M[0]>2&&(T(A.pick(-1,M[1]-1).lo(1).hi(M[0]-2),S.pick(-1,M[1]-1,0).lo(1).hi(M[0]-2)),b(S.pick(-1,M[1]-1,1).lo(1).hi(M[0]-2))),S.set(0,0,0,0),S.set(0,0,1,0),S.set(M[0]-1,0,0,0),S.set(M[0]-1,0,1,0),S.set(0,M[1]-1,0,0),S.set(0,M[1]-1,1,0),S.set(M[0]-1,M[1]-1,0,0),S.set(M[0]-1,M[1]-1,1,0),S}}l.exports=function(k,b,T){return Array.isArray(T)||(T=i(b.dimension,typeof T=="string"?T:"clamp")),b.size===0?k:b.dimension===0?(k.set(0),k):function(_){var S=_.join();if(D=p[S])return D;for(var A=_.length,M=[v,y],E=1;E<=A;++E)M.push(x(E));var D=w.apply(void 0,M);return p[S]=D,D}(T)(k,b)}},{dup:65}],253:[function(a,l,c){function i(h,m){var g=Math.floor(m),p=m-g,v=0<=g&&g0;){L<64?(b=L,L=0):(b=64,L-=64);for(var P=0|m[1];P>0;){P<64?(T=P,P=0):(T=64,P-=64),v=R+L*S+P*A,w=z+L*E+P*D;var N=0,B=0,G=0,W=M,K=S-_*M,te=A-b*S,Y=O,Z=E-_*O,re=D-b*E;for(G=0;G0;){D<64?(b=D,D=0):(b=64,D-=64);for(var O=0|m[0];O>0;){O<64?(k=O,O=0):(k=64,O-=64),v=M+D*_+O*T,w=E+D*A+O*S;var R=0,z=0,L=_,P=T-b*_,N=A,B=S-b*A;for(z=0;z0;){z<64?(T=z,z=0):(T=64,z-=64);for(var L=0|m[0];L>0;){L<64?(k=L,L=0):(k=64,L-=64);for(var P=0|m[1];P>0;){P<64?(b=P,P=0):(b=64,P-=64),v=O+z*A+L*_+P*S,w=R+z*D+L*M+P*E;var N=0,B=0,G=0,W=A,K=_-T*A,te=S-k*_,Y=D,Z=M-T*D,re=E-k*M;for(G=0;Gp;){R=0,z=D-w;t:for(O=0;OP)break t;z+=S,R+=A}for(R=D,z=D-w,O=0;O>1,_e=me-le,we=me+le,Te=ge,Oe=_e,de=me,ye=we,Me=fe,ke=y+1,Ee=x-1,ze=!0,Fe=0,Ve=0,Ke=0,Re=S,qe=g(Re),We=g(Re);K=b*Te,te=b*Oe,ue=k;e:for(W=0;W0){O=Te,Te=Oe,Oe=O;break e}if(Ke<0)break e;ue+=M}K=b*ye,te=b*Me,ue=k;e:for(W=0;W0){O=ye,ye=Me,Me=O;break e}if(Ke<0)break e;ue+=M}K=b*Te,te=b*de,ue=k;e:for(W=0;W0){O=Te,Te=de,de=O;break e}if(Ke<0)break e;ue+=M}K=b*Oe,te=b*de,ue=k;e:for(W=0;W0){O=Oe,Oe=de,de=O;break e}if(Ke<0)break e;ue+=M}K=b*Te,te=b*ye,ue=k;e:for(W=0;W0){O=Te,Te=ye,ye=O;break e}if(Ke<0)break e;ue+=M}K=b*de,te=b*ye,ue=k;e:for(W=0;W0){O=de,de=ye,ye=O;break e}if(Ke<0)break e;ue+=M}K=b*Oe,te=b*Me,ue=k;e:for(W=0;W0){O=Oe,Oe=Me,Me=O;break e}if(Ke<0)break e;ue+=M}K=b*Oe,te=b*de,ue=k;e:for(W=0;W0){O=Oe,Oe=de,de=O;break e}if(Ke<0)break e;ue+=M}K=b*ye,te=b*Me,ue=k;e:for(W=0;W0){O=ye,ye=Me,Me=O;break e}if(Ke<0)break e;ue+=M}for(K=b*Te,te=b*Oe,Y=b*de,Z=b*ye,re=b*Me,U=b*ge,q=b*me,$=b*fe,ae=0,ue=k,W=0;W0)){if(Ke<0){for(K=b*P,te=b*ke,Y=b*Ee,ue=k,W=0;W0)for(;;){for(N=k+Ee*b,ae=0,W=0;W0)){for(N=k+Ee*b,ae=0,W=0;Wfe){e:for(;;){for(N=k+ke*b,ae=0,ue=k,W=0;W1&&T?S(b,T[0],T[1]):S(b)}(m,g,y);return v(y,x)}},{"typedarray-pool":308}],258:[function(a,l,c){var i=a("./lib/compile_sort.js"),s={};l.exports=function(u){var d=u.order,h=u.dtype,m=[d,h].join(":"),g=s[m];return g||(s[m]=g=i(d,h)),g(u),u}},{"./lib/compile_sort.js":257}],259:[function(a,l,c){var i=a("is-buffer"),s=typeof Float64Array<"u";function u(p,v){return p[0]-v[0]}function d(){var p,v=this.stride,y=new Array(v.length);for(p=0;p=0&&(b+=S*(T=0|k),_-=T),new x(this.data,_,S,b)},w.step=function(k){var b=this.shape[0],T=this.stride[0],_=this.offset,S=0,A=Math.ceil;return typeof k=="number"&&((S=0|k)<0?(_+=T*(b-1),b=A(-b/S)):b=A(b/S),T*=S),new x(this.data,b,T,_)},w.transpose=function(k){k=k===void 0?0:0|k;var b=this.shape,T=this.stride;return new x(this.data,b[k],T[k],this.offset)},w.pick=function(k){var b=[],T=[],_=this.offset;return typeof k=="number"&&k>=0?_=_+this.stride[0]*k|0:(b.push(this.shape[0]),T.push(this.stride[0])),(0,v[b.length+1])(this.data,b,T,_)},function(k,b,T,_){return new x(k,b[0],T[0],_)}},2:function(p,v,y){function x(k,b,T,_,S,A){this.data=k,this.shape=[b,T],this.stride=[_,S],this.offset=0|A}var w=x.prototype;return w.dtype=p,w.dimension=2,Object.defineProperty(w,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(w,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),w.set=function(k,b,T){return p==="generic"?this.data.set(this.offset+this.stride[0]*k+this.stride[1]*b,T):this.data[this.offset+this.stride[0]*k+this.stride[1]*b]=T},w.get=function(k,b){return p==="generic"?this.data.get(this.offset+this.stride[0]*k+this.stride[1]*b):this.data[this.offset+this.stride[0]*k+this.stride[1]*b]},w.index=function(k,b){return this.offset+this.stride[0]*k+this.stride[1]*b},w.hi=function(k,b){return new x(this.data,typeof k!="number"||k<0?this.shape[0]:0|k,typeof b!="number"||b<0?this.shape[1]:0|b,this.stride[0],this.stride[1],this.offset)},w.lo=function(k,b){var T=this.offset,_=0,S=this.shape[0],A=this.shape[1],M=this.stride[0],E=this.stride[1];return typeof k=="number"&&k>=0&&(T+=M*(_=0|k),S-=_),typeof b=="number"&&b>=0&&(T+=E*(_=0|b),A-=_),new x(this.data,S,A,M,E,T)},w.step=function(k,b){var T=this.shape[0],_=this.shape[1],S=this.stride[0],A=this.stride[1],M=this.offset,E=0,D=Math.ceil;return typeof k=="number"&&((E=0|k)<0?(M+=S*(T-1),T=D(-T/E)):T=D(T/E),S*=E),typeof b=="number"&&((E=0|b)<0?(M+=A*(_-1),_=D(-_/E)):_=D(_/E),A*=E),new x(this.data,T,_,S,A,M)},w.transpose=function(k,b){k=k===void 0?0:0|k,b=b===void 0?1:0|b;var T=this.shape,_=this.stride;return new x(this.data,T[k],T[b],_[k],_[b],this.offset)},w.pick=function(k,b){var T=[],_=[],S=this.offset;return typeof k=="number"&&k>=0?S=S+this.stride[0]*k|0:(T.push(this.shape[0]),_.push(this.stride[0])),typeof b=="number"&&b>=0?S=S+this.stride[1]*b|0:(T.push(this.shape[1]),_.push(this.stride[1])),(0,v[T.length+1])(this.data,T,_,S)},function(k,b,T,_){return new x(k,b[0],b[1],T[0],T[1],_)}},3:function(p,v,y){function x(k,b,T,_,S,A,M,E){this.data=k,this.shape=[b,T,_],this.stride=[S,A,M],this.offset=0|E}var w=x.prototype;return w.dtype=p,w.dimension=3,Object.defineProperty(w,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(w,"order",{get:function(){var k=Math.abs(this.stride[0]),b=Math.abs(this.stride[1]),T=Math.abs(this.stride[2]);return k>b?b>T?[2,1,0]:k>T?[1,2,0]:[1,0,2]:k>T?[2,0,1]:T>b?[0,1,2]:[0,2,1]}}),w.set=function(k,b,T,_){return p==="generic"?this.data.set(this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T,_):this.data[this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T]=_},w.get=function(k,b,T){return p==="generic"?this.data.get(this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T):this.data[this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T]},w.index=function(k,b,T){return this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T},w.hi=function(k,b,T){return new x(this.data,typeof k!="number"||k<0?this.shape[0]:0|k,typeof b!="number"||b<0?this.shape[1]:0|b,typeof T!="number"||T<0?this.shape[2]:0|T,this.stride[0],this.stride[1],this.stride[2],this.offset)},w.lo=function(k,b,T){var _=this.offset,S=0,A=this.shape[0],M=this.shape[1],E=this.shape[2],D=this.stride[0],O=this.stride[1],R=this.stride[2];return typeof k=="number"&&k>=0&&(_+=D*(S=0|k),A-=S),typeof b=="number"&&b>=0&&(_+=O*(S=0|b),M-=S),typeof T=="number"&&T>=0&&(_+=R*(S=0|T),E-=S),new x(this.data,A,M,E,D,O,R,_)},w.step=function(k,b,T){var _=this.shape[0],S=this.shape[1],A=this.shape[2],M=this.stride[0],E=this.stride[1],D=this.stride[2],O=this.offset,R=0,z=Math.ceil;return typeof k=="number"&&((R=0|k)<0?(O+=M*(_-1),_=z(-_/R)):_=z(_/R),M*=R),typeof b=="number"&&((R=0|b)<0?(O+=E*(S-1),S=z(-S/R)):S=z(S/R),E*=R),typeof T=="number"&&((R=0|T)<0?(O+=D*(A-1),A=z(-A/R)):A=z(A/R),D*=R),new x(this.data,_,S,A,M,E,D,O)},w.transpose=function(k,b,T){k=k===void 0?0:0|k,b=b===void 0?1:0|b,T=T===void 0?2:0|T;var _=this.shape,S=this.stride;return new x(this.data,_[k],_[b],_[T],S[k],S[b],S[T],this.offset)},w.pick=function(k,b,T){var _=[],S=[],A=this.offset;return typeof k=="number"&&k>=0?A=A+this.stride[0]*k|0:(_.push(this.shape[0]),S.push(this.stride[0])),typeof b=="number"&&b>=0?A=A+this.stride[1]*b|0:(_.push(this.shape[1]),S.push(this.stride[1])),typeof T=="number"&&T>=0?A=A+this.stride[2]*T|0:(_.push(this.shape[2]),S.push(this.stride[2])),(0,v[_.length+1])(this.data,_,S,A)},function(k,b,T,_){return new x(k,b[0],b[1],b[2],T[0],T[1],T[2],_)}},4:function(p,v,y){function x(k,b,T,_,S,A,M,E,D,O){this.data=k,this.shape=[b,T,_,S],this.stride=[A,M,E,D],this.offset=0|O}var w=x.prototype;return w.dtype=p,w.dimension=4,Object.defineProperty(w,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(w,"order",{get:y}),w.set=function(k,b,T,_,S){return p==="generic"?this.data.set(this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_,S):this.data[this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_]=S},w.get=function(k,b,T,_){return p==="generic"?this.data.get(this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_):this.data[this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_]},w.index=function(k,b,T,_){return this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_},w.hi=function(k,b,T,_){return new x(this.data,typeof k!="number"||k<0?this.shape[0]:0|k,typeof b!="number"||b<0?this.shape[1]:0|b,typeof T!="number"||T<0?this.shape[2]:0|T,typeof _!="number"||_<0?this.shape[3]:0|_,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},w.lo=function(k,b,T,_){var S=this.offset,A=0,M=this.shape[0],E=this.shape[1],D=this.shape[2],O=this.shape[3],R=this.stride[0],z=this.stride[1],L=this.stride[2],P=this.stride[3];return typeof k=="number"&&k>=0&&(S+=R*(A=0|k),M-=A),typeof b=="number"&&b>=0&&(S+=z*(A=0|b),E-=A),typeof T=="number"&&T>=0&&(S+=L*(A=0|T),D-=A),typeof _=="number"&&_>=0&&(S+=P*(A=0|_),O-=A),new x(this.data,M,E,D,O,R,z,L,P,S)},w.step=function(k,b,T,_){var S=this.shape[0],A=this.shape[1],M=this.shape[2],E=this.shape[3],D=this.stride[0],O=this.stride[1],R=this.stride[2],z=this.stride[3],L=this.offset,P=0,N=Math.ceil;return typeof k=="number"&&((P=0|k)<0?(L+=D*(S-1),S=N(-S/P)):S=N(S/P),D*=P),typeof b=="number"&&((P=0|b)<0?(L+=O*(A-1),A=N(-A/P)):A=N(A/P),O*=P),typeof T=="number"&&((P=0|T)<0?(L+=R*(M-1),M=N(-M/P)):M=N(M/P),R*=P),typeof _=="number"&&((P=0|_)<0?(L+=z*(E-1),E=N(-E/P)):E=N(E/P),z*=P),new x(this.data,S,A,M,E,D,O,R,z,L)},w.transpose=function(k,b,T,_){k=k===void 0?0:0|k,b=b===void 0?1:0|b,T=T===void 0?2:0|T,_=_===void 0?3:0|_;var S=this.shape,A=this.stride;return new x(this.data,S[k],S[b],S[T],S[_],A[k],A[b],A[T],A[_],this.offset)},w.pick=function(k,b,T,_){var S=[],A=[],M=this.offset;return typeof k=="number"&&k>=0?M=M+this.stride[0]*k|0:(S.push(this.shape[0]),A.push(this.stride[0])),typeof b=="number"&&b>=0?M=M+this.stride[1]*b|0:(S.push(this.shape[1]),A.push(this.stride[1])),typeof T=="number"&&T>=0?M=M+this.stride[2]*T|0:(S.push(this.shape[2]),A.push(this.stride[2])),typeof _=="number"&&_>=0?M=M+this.stride[3]*_|0:(S.push(this.shape[3]),A.push(this.stride[3])),(0,v[S.length+1])(this.data,S,A,M)},function(k,b,T,_){return new x(k,b[0],b[1],b[2],b[3],T[0],T[1],T[2],T[3],_)}},5:function(p,v,y){function x(k,b,T,_,S,A,M,E,D,O,R,z){this.data=k,this.shape=[b,T,_,S,A],this.stride=[M,E,D,O,R],this.offset=0|z}var w=x.prototype;return w.dtype=p,w.dimension=5,Object.defineProperty(w,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(w,"order",{get:y}),w.set=function(k,b,T,_,S,A){return p==="generic"?this.data.set(this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_+this.stride[4]*S,A):this.data[this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_+this.stride[4]*S]=A},w.get=function(k,b,T,_,S){return p==="generic"?this.data.get(this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_+this.stride[4]*S):this.data[this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_+this.stride[4]*S]},w.index=function(k,b,T,_,S){return this.offset+this.stride[0]*k+this.stride[1]*b+this.stride[2]*T+this.stride[3]*_+this.stride[4]*S},w.hi=function(k,b,T,_,S){return new x(this.data,typeof k!="number"||k<0?this.shape[0]:0|k,typeof b!="number"||b<0?this.shape[1]:0|b,typeof T!="number"||T<0?this.shape[2]:0|T,typeof _!="number"||_<0?this.shape[3]:0|_,typeof S!="number"||S<0?this.shape[4]:0|S,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},w.lo=function(k,b,T,_,S){var A=this.offset,M=0,E=this.shape[0],D=this.shape[1],O=this.shape[2],R=this.shape[3],z=this.shape[4],L=this.stride[0],P=this.stride[1],N=this.stride[2],B=this.stride[3],G=this.stride[4];return typeof k=="number"&&k>=0&&(A+=L*(M=0|k),E-=M),typeof b=="number"&&b>=0&&(A+=P*(M=0|b),D-=M),typeof T=="number"&&T>=0&&(A+=N*(M=0|T),O-=M),typeof _=="number"&&_>=0&&(A+=B*(M=0|_),R-=M),typeof S=="number"&&S>=0&&(A+=G*(M=0|S),z-=M),new x(this.data,E,D,O,R,z,L,P,N,B,G,A)},w.step=function(k,b,T,_,S){var A=this.shape[0],M=this.shape[1],E=this.shape[2],D=this.shape[3],O=this.shape[4],R=this.stride[0],z=this.stride[1],L=this.stride[2],P=this.stride[3],N=this.stride[4],B=this.offset,G=0,W=Math.ceil;return typeof k=="number"&&((G=0|k)<0?(B+=R*(A-1),A=W(-A/G)):A=W(A/G),R*=G),typeof b=="number"&&((G=0|b)<0?(B+=z*(M-1),M=W(-M/G)):M=W(M/G),z*=G),typeof T=="number"&&((G=0|T)<0?(B+=L*(E-1),E=W(-E/G)):E=W(E/G),L*=G),typeof _=="number"&&((G=0|_)<0?(B+=P*(D-1),D=W(-D/G)):D=W(D/G),P*=G),typeof S=="number"&&((G=0|S)<0?(B+=N*(O-1),O=W(-O/G)):O=W(O/G),N*=G),new x(this.data,A,M,E,D,O,R,z,L,P,N,B)},w.transpose=function(k,b,T,_,S){k=k===void 0?0:0|k,b=b===void 0?1:0|b,T=T===void 0?2:0|T,_=_===void 0?3:0|_,S=S===void 0?4:0|S;var A=this.shape,M=this.stride;return new x(this.data,A[k],A[b],A[T],A[_],A[S],M[k],M[b],M[T],M[_],M[S],this.offset)},w.pick=function(k,b,T,_,S){var A=[],M=[],E=this.offset;return typeof k=="number"&&k>=0?E=E+this.stride[0]*k|0:(A.push(this.shape[0]),M.push(this.stride[0])),typeof b=="number"&&b>=0?E=E+this.stride[1]*b|0:(A.push(this.shape[1]),M.push(this.stride[1])),typeof T=="number"&&T>=0?E=E+this.stride[2]*T|0:(A.push(this.shape[2]),M.push(this.stride[2])),typeof _=="number"&&_>=0?E=E+this.stride[3]*_|0:(A.push(this.shape[3]),M.push(this.stride[3])),typeof S=="number"&&S>=0?E=E+this.stride[4]*S|0:(A.push(this.shape[4]),M.push(this.stride[4])),(0,v[A.length+1])(this.data,A,M,E)},function(k,b,T,_){return new x(k,b[0],b[1],b[2],b[3],b[4],T[0],T[1],T[2],T[3],T[4],_)}}};function m(p,v){var y=v===-1?"T":String(v),x=h[y];return v===-1?x(p):v===0?x(p,g[p][0]):x(p,g[p],d)}var g={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};l.exports=function(p,v,y,x){if(p===void 0)return(0,g.array[0])([]);typeof p=="number"&&(p=[p]),v===void 0&&(v=[p.length]);var w=v.length;if(y===void 0){y=new Array(w);for(var k=w-1,b=1;k>=0;--k)y[k]=b,b*=v[k]}if(x===void 0)for(x=0,k=0;ku==u>0?m===-1>>>0?(h+=1,m=0):m+=1:m===0?(m=-1>>>0,h-=1):m-=1,i.pack(m,h)}},{"double-bits":64}],261:[function(a,l,c){c.vertexNormals=function(i,s,u){for(var d=s.length,h=new Array(d),m=u===void 0?1e-6:u,g=0;gm){var D=h[y],O=1/Math.sqrt(S*M);for(E=0;E<3;++E){var R=(E+1)%3,z=(E+2)%3;D[E]+=O*(A[R]*_[z]-A[z]*_[R])}}}for(g=0;gm)for(O=1/Math.sqrt(L),E=0;E<3;++E)D[E]*=O;else for(E=0;E<3;++E)D[E]=0}return h},c.faceNormals=function(i,s,u){for(var d=i.length,h=new Array(d),m=u===void 0?1e-6:u,g=0;gm?1/Math.sqrt(b):0,y=0;y<3;++y)k[y]*=b;h[g]=k}return h}},{}],262:[function(a,l,c){l.exports=function(i,s,u,d,h,m,g,p,v,y){var x=s+m+y;if(w>0){var w=Math.sqrt(x+1);i[0]=.5*(g-v)/w,i[1]=.5*(p-d)/w,i[2]=.5*(u-m)/w,i[3]=.5*w}else{var k=Math.max(s,m,y);w=Math.sqrt(2*k-x+1),s>=k?(i[0]=.5*w,i[1]=.5*(h+u)/w,i[2]=.5*(p+d)/w,i[3]=.5*(g-v)/w):m>=k?(i[0]=.5*(u+h)/w,i[1]=.5*w,i[2]=.5*(v+g)/w,i[3]=.5*(p-d)/w):(i[0]=.5*(d+p)/w,i[1]=.5*(g+v)/w,i[2]=.5*w,i[3]=.5*(u-h)/w)}return i}},{}],263:[function(a,l,c){l.exports=function(x){var w=(x=x||{}).center||[0,0,0],k=x.rotation||[0,0,0,1],b=x.radius||1;w=[].slice.call(w,0,3),p(k=[].slice.call(k,0,4),k);var T=new v(k,w,Math.log(b));return T.setDistanceLimits(x.zoomMin,x.zoomMax),("eye"in x||"up"in x)&&T.lookAt(0,x.eye,x.center,x.up),T};var i=a("filtered-vector"),s=a("gl-mat4/lookAt"),u=a("gl-mat4/fromQuat"),d=a("gl-mat4/invert"),h=a("./lib/quatFromFrame");function m(x,w,k){return Math.sqrt(Math.pow(x,2)+Math.pow(w,2)+Math.pow(k,2))}function g(x,w,k,b){return Math.sqrt(Math.pow(x,2)+Math.pow(w,2)+Math.pow(k,2)+Math.pow(b,2))}function p(x,w){var k=w[0],b=w[1],T=w[2],_=w[3],S=g(k,b,T,_);S>1e-6?(x[0]=k/S,x[1]=b/S,x[2]=T/S,x[3]=_/S):(x[0]=x[1]=x[2]=0,x[3]=1)}function v(x,w,k){this.radius=i([k]),this.center=i(w),this.rotation=i(x),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 y=v.prototype;y.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},y.recalcMatrix=function(x){this.radius.curve(x),this.center.curve(x),this.rotation.curve(x);var w=this.computedRotation;p(w,w);var k=this.computedMatrix;u(k,w);var b=this.computedCenter,T=this.computedEye,_=this.computedUp,S=Math.exp(this.computedRadius[0]);T[0]=b[0]+S*k[2],T[1]=b[1]+S*k[6],T[2]=b[2]+S*k[10],_[0]=k[1],_[1]=k[5],_[2]=k[9];for(var A=0;A<3;++A){for(var M=0,E=0;E<3;++E)M+=k[A+4*E]*T[E];k[12+A]=-M}},y.getMatrix=function(x,w){this.recalcMatrix(x);var k=this.computedMatrix;if(w){for(var b=0;b<16;++b)w[b]=k[b];return w}return k},y.idle=function(x){this.center.idle(x),this.radius.idle(x),this.rotation.idle(x)},y.flush=function(x){this.center.flush(x),this.radius.flush(x),this.rotation.flush(x)},y.pan=function(x,w,k,b){w=w||0,k=k||0,b=b||0,this.recalcMatrix(x);var T=this.computedMatrix,_=T[1],S=T[5],A=T[9],M=m(_,S,A);_/=M,S/=M,A/=M;var E=T[0],D=T[4],O=T[8],R=E*_+D*S+O*A,z=m(E-=_*R,D-=S*R,O-=A*R);E/=z,D/=z,O/=z,T[2],T[6],T[10];var L=E*w+_*k,P=D*w+S*k,N=O*w+A*k;this.center.move(x,L,P,N);var B=Math.exp(this.computedRadius[0]);B=Math.max(1e-4,B+b),this.radius.set(x,Math.log(B))},y.rotate=function(x,w,k,b){this.recalcMatrix(x),w=w||0,k=k||0;var T=this.computedMatrix,_=T[0],S=T[4],A=T[8],M=T[1],E=T[5],D=T[9],O=T[2],R=T[6],z=T[10],L=w*_+k*M,P=w*S+k*E,N=w*A+k*D,B=-(R*N-z*P),G=-(z*L-O*N),W=-(O*P-R*L),K=Math.sqrt(Math.max(0,1-Math.pow(B,2)-Math.pow(G,2)-Math.pow(W,2))),te=g(B,G,W,K);te>1e-6?(B/=te,G/=te,W/=te,K/=te):(B=G=W=0,K=1);var Y=this.computedRotation,Z=Y[0],re=Y[1],U=Y[2],q=Y[3],$=Z*K+q*B+re*W-U*G,ne=re*K+q*G+U*B-Z*W,H=U*K+q*W+Z*G-re*B,Q=q*K-Z*B-re*G-U*W;if(b){B=O,G=R,W=z;var ee=Math.sin(b)/m(B,G,W);B*=ee,G*=ee,W*=ee,Q=Q*(K=Math.cos(w))-($=$*K+Q*B+ne*W-H*G)*B-(ne=ne*K+Q*G+H*B-$*W)*G-(H=H*K+Q*W+$*G-ne*B)*W}var ie=g($,ne,H,Q);ie>1e-6?($/=ie,ne/=ie,H/=ie,Q/=ie):($=ne=H=0,Q=1),this.rotation.set(x,$,ne,H,Q)},y.lookAt=function(x,w,k,b){this.recalcMatrix(x),k=k||this.computedCenter,w=w||this.computedEye,b=b||this.computedUp;var T=this.computedMatrix;s(T,w,k,b);var _=this.computedRotation;h(_,T[0],T[1],T[2],T[4],T[5],T[6],T[8],T[9],T[10]),p(_,_),this.rotation.set(x,_[0],_[1],_[2],_[3]);for(var S=0,A=0;A<3;++A)S+=Math.pow(k[A]-w[A],2);this.radius.set(x,.5*Math.log(Math.max(S,1e-6))),this.center.set(x,k[0],k[1],k[2])},y.translate=function(x,w,k,b){this.center.move(x,w||0,k||0,b||0)},y.setMatrix=function(x,w){var k=this.computedRotation;h(k,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),p(k,k),this.rotation.set(x,k[0],k[1],k[2],k[3]);var b=this.computedMatrix;d(b,w);var T=b[15];if(Math.abs(T)>1e-6){var _=b[12]/T,S=b[13]/T,A=b[14]/T;this.recalcMatrix(x);var M=Math.exp(this.computedRadius[0]);this.center.set(x,_-b[2]*M,S-b[6]*M,A-b[10]*M),this.radius.idle(x)}else this.center.idle(x),this.radius.idle(x)},y.setDistance=function(x,w){w>0&&this.radius.set(x,Math.log(w))},y.setDistanceLimits=function(x,w){x=x>0?Math.log(x):-1/0,w=w>0?Math.log(w):1/0,w=Math.max(w,x),this.radius.bounds[0][0]=x,this.radius.bounds[1][0]=w},y.getDistanceLimits=function(x){var w=this.radius.bounds;return x?(x[0]=Math.exp(w[0][0]),x[1]=Math.exp(w[1][0]),x):[Math.exp(w[0][0]),Math.exp(w[1][0])]},y.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]}},y.fromJSON=function(x){var w=this.lastT(),k=x.center;k&&this.center.set(w,k[0],k[1],k[2]);var b=x.rotation;b&&this.rotation.set(w,b[0],b[1],b[2],b[3]);var T=x.distance;T&&T>0&&this.radius.set(w,Math.log(T)),this.setDistanceLimits(x.zoomMin,x.zoomMax)}},{"./lib/quatFromFrame":262,"filtered-vector":68,"gl-mat4/fromQuat":95,"gl-mat4/invert":98,"gl-mat4/lookAt":99}],264:[function(a,l,c){var i=a("repeat-string");l.exports=function(s,u,d){return i(d=d!==void 0?d+"":" ",u)+s}},{"repeat-string":277}],265:[function(a,l,c){l.exports=function(i,s){s||(s=[0,""]),i=String(i);var u=parseFloat(i,10);return s[0]=u,s[1]=i.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}},{}],266:[function(a,l,c){l.exports=function(s,u){for(var d=0|u.length,h=s.length,m=[new Array(d),new Array(d)],g=0;g0){E=m[R][A][0],O=R;break}D=E[1^O];for(var z=0;z<2;++z)for(var L=m[z][A],P=0;P0&&(E=N,D=B,O=z)}return M||E&&y(E,O),D}function w(S,A){var M=m[A][S][0],E=[S];y(M,A);for(var D=M[1^A];;){for(;D!==S;)E.push(D),D=x(E[E.length-2],D,!1);if(m[0][S].length+m[1][S].length===0)break;var O=E[E.length-1],R=S,z=E[1],L=x(O,R,!0);if(i(u[O],u[R],u[z],u[L])<0)break;E.push(S),D=x(O,R)}return E}function k(S,A){return A[1]===A[A.length-1]}for(g=0;g0;){m[0][g].length;var _=w(g,b);k(0,_)?T.push.apply(T,_):(T.length>0&&v.push(T),T=_)}T.length>0&&v.push(T)}return v};var i=a("compare-angle")},{"compare-angle":54}],267:[function(a,l,c){l.exports=function(s,u){for(var d=i(s,u.length),h=new Array(u.length),m=new Array(u.length),g=[],p=0;p0;){var y=g.pop();h[y]=!1;var x=d[y];for(p=0;p0})).length,S=new Array(_),A=new Array(_);for(b=0;b<_;++b){S[b]=b;var M=new Array(_),E=T[b].map(function(le){return y[le]}),D=u([E]),O=0;e:for(var R=0;R<_;++R)if(M[R]=0,b!==R){for(var z=(ae=T[R]).length,L=0;L0;){var ne=q.pop(),H=G[ne];m(H,function(le,ge){return le-ge});var Q,ee=H.length,ie=$[ne];if(ie===0){var ae=T[ne];Q=[ae]}for(b=0;b=0||($[ue]=1^ie,q.push(ue),ie===0&&(U(ae=T[ue])||(ae.reverse(),Q.push(ae))))}ie===0&&x.push(Q)}return x};var i=a("edges-to-adjacency-list"),s=a("planar-dual"),u=a("point-in-big-polygon"),d=a("two-product"),h=a("robust-sum"),m=a("uniq"),g=a("./lib/trim-leaves");function p(v,y){for(var x=new Array(v),w=0;w0&&R[L]===z[0]))return 1;P=O[L-1]}for(var N=1;P;){var B=P.key,G=i(z,B[0],B[1]);if(B[0][0]0))return 0;N=-1,P=P.right}else if(G>0)P=P.left;else{if(!(G<0))return 0;N=1,P=P.right}}return N}}(E.slabs,E.coordinates);return x.length===0?D:function(O,R){return function(z){return O(z[0],z[1])?0:R(z)}}(m(x),D)};var i=a("robust-orientation")[3],s=a("slab-decomposition"),u=a("interval-tree-1d"),d=a("binary-search-bounds");function h(){return!0}function m(p){for(var v={},y=0;y=y?(L=1,M=y+2*k+T):M=k*(L=-k/y)+T):(L=0,b>=0?(P=0,M=T):-b>=w?(P=1,M=w+2*b+T):M=b*(P=-b/w)+T);else if(P<0)P=0,k>=0?(L=0,M=T):-k>=y?(L=1,M=y+2*k+T):M=k*(L=-k/y)+T;else{var N=1/z;M=(L*=N)*(y*L+x*(P*=N)+2*k)+P*(x*L+w*P+2*b)+T}else L<0?(D=w+b)>(E=x+k)?(O=D-E)>=(R=y-2*x+w)?(L=1,P=0,M=y+2*k+T):M=(L=O/R)*(y*L+x*(P=1-L)+2*k)+P*(x*L+w*P+2*b)+T:(L=0,D<=0?(P=1,M=w+2*b+T):b>=0?(P=0,M=T):M=b*(P=-b/w)+T):P<0?(D=y+k)>(E=x+b)?(O=D-E)>=(R=y-2*x+w)?(P=1,L=0,M=w+2*b+T):M=(L=1-(P=O/R))*(y*L+x*P+2*k)+P*(x*L+w*P+2*b)+T:(P=0,D<=0?(L=1,M=y+2*k+T):k>=0?(L=0,M=T):M=k*(L=-k/y)+T):(O=w+b-x-k)<=0?(L=0,P=1,M=w+2*b+T):O>=(R=y-2*x+w)?(L=1,P=0,M=y+2*k+T):M=(L=O/R)*(y*L+x*(P=1-L)+2*k)+P*(x*L+w*P+2*b)+T;var B=1-L-P;for(v=0;v0){var y=d[m-1];if(i(p,y)===0&&u(y)!==v){m-=1;continue}}d[m++]=p}}return d.length=m,d}},{"cell-orientation":47,"compare-cell":56,"compare-oriented-cell":57}],277:[function(a,l,c){var i,s="";l.exports=function(u,d){if(typeof u!="string")throw new TypeError("expected a string");if(d===1)return u;if(d===2)return u+u;var h=u.length*d;if(i!==u||i===void 0)i=u,s="";else if(s.length>=h)return s.substr(0,h);for(;h>s.length&&d>1;)1&d&&(s+=u),d>>=1,u+=u;return s=(s+=u).substr(0,h)}},{}],278:[function(a,l,c){(function(i){(function(){l.exports=i.performance&&i.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this)}).call(this,r!==void 0?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}],279:[function(a,l,c){l.exports=function(i){for(var s=i.length,u=i[i.length-1],d=s,h=s-2;h>=0;--h){var m=u,g=i[h];(v=g-((u=m+g)-m))&&(i[--d]=u,u=v)}var p=0;for(h=d;h0){if(M<=0)return E;S=A+M}else{if(!(A<0)||M>=0)return E;S=-(A+M)}var D=33306690738754716e-32*S;return E>=D||E<=-D?E:v(b,T,_)},function(b,T,_,S){var A=b[0]-S[0],M=T[0]-S[0],E=_[0]-S[0],D=b[1]-S[1],O=T[1]-S[1],R=_[1]-S[1],z=b[2]-S[2],L=T[2]-S[2],P=_[2]-S[2],N=M*R,B=E*O,G=E*D,W=A*R,K=A*O,te=M*D,Y=z*(N-B)+L*(G-W)+P*(K-te),Z=7771561172376103e-31*((Math.abs(N)+Math.abs(B))*Math.abs(z)+(Math.abs(G)+Math.abs(W))*Math.abs(L)+(Math.abs(K)+Math.abs(te))*Math.abs(P));return Y>Z||-Y>Z?Y:y(b,T,_,S)}];function w(b){var T=x[b.length];return T||(T=x[b.length]=p(b.length)),T.apply(void 0,b)}function k(b,T,_,S,A,M,E){return function(D,O,R,z,L){switch(arguments.length){case 0:case 1:return 0;case 2:return S(D,O);case 3:return A(D,O,R);case 4:return M(D,O,R,z);case 5:return E(D,O,R,z,L)}for(var P=new Array(arguments.length),N=0;N0&&g>0||m<0&&g<0)return!1;var p=i(d,s,u),v=i(h,s,u);return p>0&&v>0||p<0&&v<0?!1:m===0&&g===0&&p===0&&v===0?function(y,x,w,k){for(var b=0;b<2;++b){var T=y[b],_=x[b],S=Math.min(T,_),A=Math.max(T,_),M=w[b],E=k[b],D=Math.min(M,E);if(Math.max(M,E)=d?(h=w,(v+=1)=d?(h=w,(v+=1)>1,w=d[2*x+1];if(w===p)return x;p>1,w=d[2*x+1];if(w===p)return x;p>1,w=d[2*x+1];if(w===p)return x;p>1,_=u(y[T],x);_<=0?(_===0&&(b=T),w=T+1):_>0&&(k=T-1)}return b}function p(y,x){for(var w=new Array(y.length),k=0,b=w.length;k=y.length||u(y[R],T)!==0););}return w}function v(y,x){if(x<0)return[];for(var w=[],k=(1<>>M&1&&A.push(b[M]);x.push(A)}return h(x)},c.skeleton=v,c.boundary=function(y){for(var x=[],w=0,k=y.length;w>1:(te>>1)-1}function E(te){for(var Y=A(te);;){var Z=Y,re=2*te+1,U=2*(te+1),q=te;if(re0;){var Z=M(te);if(Z>=0&&Y0){var te=L[0];return S(0,N-1),N-=1,E(0),te}return-1}function R(te,Y){var Z=L[te];return y[Z]===Y?te:(y[Z]=-1/0,D(te),O(),y[Z]=Y,D((N+=1)-1))}function z(te){if(!x[te]){x[te]=!0;var Y=p[te],Z=v[te];p[Z]>=0&&(p[Z]=Y),v[Y]>=0&&(v[Y]=Z),P[Y]>=0&&R(P[Y],_(Y)),P[Z]>=0&&R(P[Z],_(Z))}}var L=[],P=new Array(m);for(w=0;w>1;w>=0;--w)E(w);for(;;){var B=O();if(B<0||y[B]>h)break;z(B)}var G=[];for(w=0;w=0&&Z>=0&&Y!==Z){var re=P[Y],U=P[Z];re!==U&&K.push([re,U])}}),s.unique(s.normalize(K)),{positions:G,edges:K}};var i=a("robust-orientation"),s=a("simplicial-complex")},{"robust-orientation":284,"simplicial-complex":295}],298:[function(a,l,c){l.exports=function(u,d){var h,m,g,p;if(d[0][0]d[1][0]))return s(d,u);h=d[1],m=d[0]}if(u[0][0]u[1][0]))return-s(u,d);g=u[1],p=u[0]}var v=i(h,m,p),y=i(h,m,g);if(v<0){if(y<=0)return v}else if(v>0){if(y>=0)return v}else if(y)return y;if(v=i(p,g,m),y=i(p,g,h),v<0){if(y<=0)return v}else if(v>0){if(y>=0)return v}else if(y)return y;return m[0]-p[0]};var i=a("robust-orientation");function s(u,d){var h,m,g,p;if(d[0][0]d[1][0])){var v=Math.min(u[0][1],u[1][1]),y=Math.max(u[0][1],u[1][1]),x=Math.min(d[0][1],d[1][1]),w=Math.max(d[0][1],d[1][1]);return yw?v-w:y-w}h=d[1],m=d[0]}u[0][1]0)if(x[0]!==T[1][0])w=y,y=y.right;else{if(S=g(y.right,x))return S;y=y.left}else{if(x[0]!==T[1][0])return y;var S;if(S=g(y.right,x))return S;y=y.left}}return w}function p(y,x,w,k){this.y=y,this.index=x,this.start=w,this.closed=k}function v(y,x,w,k){this.x=y,this.segment=x,this.create=w,this.index=k}h.prototype.castUp=function(y){var x=i.le(this.coordinates,y[0]);if(x<0)return-1;this.slabs[x];var w=g(this.slabs[x],y),k=-1;if(w&&(k=w.value),this.coordinates[x]===y[0]){var b=null;if(w&&(b=w.key),x>0){var T=g(this.slabs[x-1],y);T&&(b?d(T.key,b)>0&&(b=T.key,k=T.value):(k=T.value,b=T.key))}var _=this.horizontal[x];if(_.length>0){var S=i.ge(_,y[1],m);if(S<_.length){var A=_[S];if(y[1]===A.y){if(A.closed)return A.index;for(;S<_.length-1&&_[S+1].y===y[1];)if((A=_[S+=1]).closed)return A.index;if(A.y===y[1]&&!A.start){if((S+=1)>=_.length)return k;A=_[S]}}if(A.start)if(b){var M=u(b[0],b[1],[y[0],A.y]);b[0][0]>b[1][0]&&(M=-M),M>0&&(k=A.index)}else k=A.index;else A.y!==y[1]&&(k=A.index)}}}return k}},{"./lib/order-segments":298,"binary-search-bounds":31,"functional-red-black-tree":69,"robust-orientation":284}],300:[function(a,l,c){var i=a("robust-dot-product"),s=a("robust-sum");function u(h,m){var g=s(i(h,m),[m[m.length-1]]);return g[g.length-1]}function d(h,m,g,p){var v=-m/(p-m);v<0?v=0:v>1&&(v=1);for(var y=1-v,x=h.length,w=new Array(x),k=0;k0||v>0&&k<0){var b=d(y,k,x,v);g.push(b),p.push(b.slice())}k<0?p.push(x.slice()):k>0?g.push(x.slice()):(g.push(x.slice()),p.push(x.slice())),v=k}return{positive:g,negative:p}},l.exports.positive=function(h,m){for(var g=[],p=u(h[h.length-1],m),v=h[h.length-1],y=h[0],x=0;x0||p>0&&w<0)&&g.push(d(v,w,y,p)),w>=0&&g.push(y.slice()),p=w}return g},l.exports.negative=function(h,m){for(var g=[],p=u(h[h.length-1],m),v=h[h.length-1],y=h[0],x=0;x0||p>0&&w<0)&&g.push(d(v,w,y,p)),w<=0&&g.push(y.slice()),p=w}return g}},{"robust-dot-product":281,"robust-sum":289}],301:[function(a,l,c){(function(){var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function s(g){return d(m(g),arguments)}function u(g,p){return s.apply(null,[g].concat(p||[]))}function d(g,p){var v,y,x,w,k,b,T,_,S,A=1,M=g.length,E="";for(y=0;y=0),w.type){case"b":v=parseInt(v,10).toString(2);break;case"c":v=String.fromCharCode(parseInt(v,10));break;case"d":case"i":v=parseInt(v,10);break;case"j":v=JSON.stringify(v,null,w.width?parseInt(w.width):0);break;case"e":v=w.precision?parseFloat(v).toExponential(w.precision):parseFloat(v).toExponential();break;case"f":v=w.precision?parseFloat(v).toFixed(w.precision):parseFloat(v);break;case"g":v=w.precision?String(Number(v.toPrecision(w.precision))):parseFloat(v);break;case"o":v=(parseInt(v,10)>>>0).toString(8);break;case"s":v=String(v),v=w.precision?v.substring(0,w.precision):v;break;case"t":v=String(!!v),v=w.precision?v.substring(0,w.precision):v;break;case"T":v=Object.prototype.toString.call(v).slice(8,-1).toLowerCase(),v=w.precision?v.substring(0,w.precision):v;break;case"u":v=parseInt(v,10)>>>0;break;case"v":v=v.valueOf(),v=w.precision?v.substring(0,w.precision):v;break;case"x":v=(parseInt(v,10)>>>0).toString(16);break;case"X":v=(parseInt(v,10)>>>0).toString(16).toUpperCase()}i.json.test(w.type)?E+=v:(!i.number.test(w.type)||_&&!w.sign?S="":(S=_?"+":"-",v=v.toString().replace(i.sign,"")),b=w.pad_char?w.pad_char==="0"?"0":w.pad_char.charAt(1):" ",T=w.width-(S+v).length,k=w.width&&T>0?b.repeat(T):"",E+=w.align?S+v+k:b==="0"?S+k+v:k+S+v)}return E}var h=Object.create(null);function m(g){if(h[g])return h[g];for(var p,v=g,y=[],x=0;v;){if((p=i.text.exec(v))!==null)y.push(p[0]);else if((p=i.modulo.exec(v))!==null)y.push("%");else{if((p=i.placeholder.exec(v))===null)throw new SyntaxError("[sprintf] unexpected placeholder");if(p[2]){x|=1;var w=[],k=p[2],b=[];if((b=i.key.exec(k))===null)throw new SyntaxError("[sprintf] failed to parse named argument key");for(w.push(b[1]);(k=k.substring(b[0].length))!=="";)if((b=i.key_access.exec(k))!==null)w.push(b[1]);else{if((b=i.index_access.exec(k))===null)throw new SyntaxError("[sprintf] failed to parse named argument key");w.push(b[1])}p[2]=w}else x|=2;if(x===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");y.push({placeholder:p[0],param_no:p[1],keys:p[2],sign:p[3],pad_char:p[4],align:p[5],width:p[6],precision:p[7],type:p[8]})}v=v.substring(p[0].length)}return h[g]=y}c!==void 0&&(c.sprintf=s,c.vsprintf=u),typeof window<"u"&&(window.sprintf=s,window.vsprintf=u)})()},{}],302:[function(a,l,c){l.exports=function(h,m){if(h.dimension<=0)return{positions:[],cells:[]};if(h.dimension===1)return function(v,y){for(var x=s(v,y),w=x.length,k=new Array(w),b=new Array(w),T=0;Tw|0},vertex:function(v,y,x,w,k,b,T,_,S,A,M,E,D){var O=(T<<0)+(_<<1)+(S<<2)+(A<<3)|0;if(O!==0&&O!==15)switch(O){case 0:M.push([v-.5,y-.5]);break;case 1:M.push([v-.25-.25*(w+x-2*D)/(x-w),y-.25-.25*(k+x-2*D)/(x-k)]);break;case 2:M.push([v-.75-.25*(-w-x+2*D)/(w-x),y-.25-.25*(b+w-2*D)/(w-b)]);break;case 3:M.push([v-.5,y-.5-.5*(k+x+b+w-4*D)/(x-k+w-b)]);break;case 4:M.push([v-.25-.25*(b+k-2*D)/(k-b),y-.75-.25*(-k-x+2*D)/(k-x)]);break;case 5:M.push([v-.5-.5*(w+x+b+k-4*D)/(x-w+k-b),y-.5]);break;case 6:M.push([v-.5-.25*(-w-x+b+k)/(w-x+k-b),y-.5-.25*(-k-x+b+w)/(k-x+w-b)]);break;case 7:M.push([v-.75-.25*(b+k-2*D)/(k-b),y-.75-.25*(b+w-2*D)/(w-b)]);break;case 8:M.push([v-.75-.25*(-b-k+2*D)/(b-k),y-.75-.25*(-b-w+2*D)/(b-w)]);break;case 9:M.push([v-.5-.25*(w+x+-b-k)/(x-w+b-k),y-.5-.25*(k+x+-b-w)/(x-k+b-w)]);break;case 10:M.push([v-.5-.5*(-w-x-b-k+4*D)/(w-x+b-k),y-.5]);break;case 11:M.push([v-.25-.25*(-b-k+2*D)/(b-k),y-.75-.25*(k+x-2*D)/(x-k)]);break;case 12:M.push([v-.5,y-.5-.5*(-k-x-b-w+4*D)/(k-x+b-w)]);break;case 13:M.push([v-.75-.25*(w+x-2*D)/(x-w),y-.25-.25*(-b-w+2*D)/(b-w)]);break;case 14:M.push([v-.25-.25*(-w-x+2*D)/(w-x),y-.25-.25*(-k-x+2*D)/(k-x)]);break;case 15:M.push([v-.5,y-.5])}},cell:function(v,y,x,w,k,b,T,_,S){k?_.push([v,y]):_.push([y,v])}});return function(v,y){var x=[],w=[];return p(v,x,w,y),{positions:x,cells:w}}}},d={}},{"ndarray-extract-contour":251,"zero-crossings":318}],303:[function(a,l,c){(function(i){(function(){l.exports=function h(m,g,p){p=p||{};var v=d[m];v||(v=d[m]={" ":{data:new Float32Array(0),shape:.2}});var y=v[g];if(!y)if(g.length<=1||!/\d/.test(g))y=v[g]=function(D){for(var O=D.cells,R=D.positions,z=new Float32Array(6*O.length),L=0,P=0,N=0;N0&&(b+=.02);var _=new Float32Array(k),S=0,A=-.5*b;for(T=0;TMath.max(T,_)?S[2]=1:T>Math.max(b,_)?S[0]=1:S[1]=1;for(var A=0,M=0,E=0;E<3;++E)A+=k[E]*k[E],M+=S[E]*k[E];for(E=0;E<3;++E)S[E]-=M/A*k[E];return h(S,S),S}function y(k,b,T,_,S,A,M,E){this.center=i(T),this.up=i(_),this.right=i(S),this.radius=i([A]),this.angle=i([M,E]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(k,b),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 D=0;D<16;++D)this.computedMatrix[D]=.5;this.recalcMatrix(0)}var x=y.prototype;x.setDistanceLimits=function(k,b){k=k>0?Math.log(k):-1/0,b=b>0?Math.log(b):1/0,b=Math.max(b,k),this.radius.bounds[0][0]=k,this.radius.bounds[1][0]=b},x.getDistanceLimits=function(k){var b=this.radius.bounds[0];return k?(k[0]=Math.exp(b[0][0]),k[1]=Math.exp(b[1][0]),k):[Math.exp(b[0][0]),Math.exp(b[1][0])]},x.recalcMatrix=function(k){this.center.curve(k),this.up.curve(k),this.right.curve(k),this.radius.curve(k),this.angle.curve(k);for(var b=this.computedUp,T=this.computedRight,_=0,S=0,A=0;A<3;++A)S+=b[A]*T[A],_+=b[A]*b[A];var M=Math.sqrt(_),E=0;for(A=0;A<3;++A)T[A]-=b[A]*S/_,E+=T[A]*T[A],b[A]/=M;var D=Math.sqrt(E);for(A=0;A<3;++A)T[A]/=D;var O=this.computedToward;d(O,b,T),h(O,O);var R=Math.exp(this.computedRadius[0]),z=this.computedAngle[0],L=this.computedAngle[1],P=Math.cos(z),N=Math.sin(z),B=Math.cos(L),G=Math.sin(L),W=this.computedCenter,K=P*B,te=N*B,Y=G,Z=-P*G,re=-N*G,U=B,q=this.computedEye,$=this.computedMatrix;for(A=0;A<3;++A){var ne=K*T[A]+te*O[A]+Y*b[A];$[4*A+1]=Z*T[A]+re*O[A]+U*b[A],$[4*A+2]=ne,$[4*A+3]=0}var H=$[1],Q=$[5],ee=$[9],ie=$[2],ae=$[6],ue=$[10],le=Q*ue-ee*ae,ge=ee*ie-H*ue,fe=H*ae-Q*ie,me=g(le,ge,fe);for(le/=me,ge/=me,fe/=me,$[0]=le,$[4]=ge,$[8]=fe,A=0;A<3;++A)q[A]=W[A]+$[2+4*A]*R;for(A=0;A<3;++A){E=0;for(var _e=0;_e<3;++_e)E+=$[A+4*_e]*q[_e];$[12+A]=-E}$[15]=1},x.getMatrix=function(k,b){this.recalcMatrix(k);var T=this.computedMatrix;if(b){for(var _=0;_<16;++_)b[_]=T[_];return b}return T};var w=[0,0,0];x.rotate=function(k,b,T,_){if(this.angle.move(k,b,T),_){this.recalcMatrix(k);var S=this.computedMatrix;w[0]=S[2],w[1]=S[6],w[2]=S[10];for(var A=this.computedUp,M=this.computedRight,E=this.computedToward,D=0;D<3;++D)S[4*D]=A[D],S[4*D+1]=M[D],S[4*D+2]=E[D];for(u(S,S,_,w),D=0;D<3;++D)A[D]=S[4*D],M[D]=S[4*D+1];this.up.set(k,A[0],A[1],A[2]),this.right.set(k,M[0],M[1],M[2])}},x.pan=function(k,b,T,_){b=b||0,T=T||0,_=_||0,this.recalcMatrix(k);var S=this.computedMatrix,A=(Math.exp(this.computedRadius[0]),S[1]),M=S[5],E=S[9],D=g(A,M,E);A/=D,M/=D,E/=D;var O=S[0],R=S[4],z=S[8],L=O*A+R*M+z*E,P=g(O-=A*L,R-=M*L,z-=E*L),N=(O/=P)*b+A*T,B=(R/=P)*b+M*T,G=(z/=P)*b+E*T;this.center.move(k,N,B,G);var W=Math.exp(this.computedRadius[0]);W=Math.max(1e-4,W+_),this.radius.set(k,Math.log(W))},x.translate=function(k,b,T,_){this.center.move(k,b||0,T||0,_||0)},x.setMatrix=function(k,b,T,_){var S=1;typeof T=="number"&&(S=0|T),(S<0||S>3)&&(S=1);var A=(S+2)%3;b||(this.recalcMatrix(k),b=this.computedMatrix);var M=b[S],E=b[S+4],D=b[S+8];if(_){var O=Math.abs(M),R=Math.abs(E),z=Math.abs(D),L=Math.max(O,R,z);O===L?(M=M<0?-1:1,E=D=0):z===L?(D=D<0?-1:1,M=E=0):(E=E<0?-1:1,M=D=0)}else{var P=g(M,E,D);M/=P,E/=P,D/=P}var N,B,G=b[A],W=b[A+4],K=b[A+8],te=G*M+W*E+K*D,Y=g(G-=M*te,W-=E*te,K-=D*te),Z=E*(K/=Y)-D*(W/=Y),re=D*(G/=Y)-M*K,U=M*W-E*G,q=g(Z,re,U);if(Z/=q,re/=q,U/=q,this.center.jump(k,de,ye,Me),this.radius.idle(k),this.up.jump(k,M,E,D),this.right.jump(k,G,W,K),S===2){var $=b[1],ne=b[5],H=b[9],Q=$*G+ne*W+H*K,ee=$*Z+ne*re+H*U;N=le<0?-Math.PI/2:Math.PI/2,B=Math.atan2(ee,Q)}else{var ie=b[2],ae=b[6],ue=b[10],le=ie*M+ae*E+ue*D,ge=ie*G+ae*W+ue*K,fe=ie*Z+ae*re+ue*U;N=Math.asin(p(le)),B=Math.atan2(fe,ge)}this.angle.jump(k,B,N),this.recalcMatrix(k);var me=b[2],_e=b[6],we=b[10],Te=this.computedMatrix;s(Te,b);var Oe=Te[15],de=Te[12]/Oe,ye=Te[13]/Oe,Me=Te[14]/Oe,ke=Math.exp(this.computedRadius[0]);this.center.jump(k,de-me*ke,ye-_e*ke,Me-we*ke)},x.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},x.idle=function(k){this.center.idle(k),this.up.idle(k),this.right.idle(k),this.radius.idle(k),this.angle.idle(k)},x.flush=function(k){this.center.flush(k),this.up.flush(k),this.right.flush(k),this.radius.flush(k),this.angle.flush(k)},x.setDistance=function(k,b){b>0&&this.radius.set(k,Math.log(b))},x.lookAt=function(k,b,T,_){this.recalcMatrix(k),b=b||this.computedEye,T=T||this.computedCenter;var S=(_=_||this.computedUp)[0],A=_[1],M=_[2],E=g(S,A,M);if(!(E<1e-6)){S/=E,A/=E,M/=E;var D=b[0]-T[0],O=b[1]-T[1],R=b[2]-T[2],z=g(D,O,R);if(!(z<1e-6)){D/=z,O/=z,R/=z;var L=this.computedRight,P=L[0],N=L[1],B=L[2],G=S*P+A*N+M*B,W=g(P-=G*S,N-=G*A,B-=G*M);if(!(W<.01&&(W=g(P=A*R-M*O,N=M*D-S*R,B=S*O-A*D))<1e-6)){P/=W,N/=W,B/=W,this.up.set(k,S,A,M),this.right.set(k,P,N,B),this.center.set(k,T[0],T[1],T[2]),this.radius.set(k,Math.log(z));var K=A*B-M*N,te=M*P-S*B,Y=S*N-A*P,Z=g(K,te,Y),re=S*D+A*O+M*R,U=P*D+N*O+B*R,q=(K/=Z)*D+(te/=Z)*O+(Y/=Z)*R,$=Math.asin(p(re)),ne=Math.atan2(q,U),H=this.angle._state,Q=H[H.length-1],ee=H[H.length-2];Q%=2*Math.PI;var ie=Math.abs(Q+2*Math.PI-ne),ae=Math.abs(Q-ne),ue=Math.abs(Q-2*Math.PI-ne);ie0?B.pop():new ArrayBuffer(P)}function k(P){return new Uint8Array(w(P),0,P)}function b(P){return new Uint16Array(w(2*P),0,P)}function T(P){return new Uint32Array(w(4*P),0,P)}function _(P){return new Int8Array(w(P),0,P)}function S(P){return new Int16Array(w(2*P),0,P)}function A(P){return new Int32Array(w(4*P),0,P)}function M(P){return new Float32Array(w(4*P),0,P)}function E(P){return new Float64Array(w(8*P),0,P)}function D(P){return h?new Uint8ClampedArray(w(P),0,P):k(P)}function O(P){return m?new BigUint64Array(w(8*P),0,P):null}function R(P){return g?new BigInt64Array(w(8*P),0,P):null}function z(P){return new DataView(w(P),0,P)}function L(P){P=s.nextPow2(P);var N=s.log2(P),B=y[N];return B.length>0?B.pop():new d(P)}c.free=function(P){if(d.isBuffer(P))y[s.log2(P.length)].push(P);else{if(Object.prototype.toString.call(P)!=="[object ArrayBuffer]"&&(P=P.buffer),!P)return;var N=P.length||P.byteLength,B=0|s.log2(N);v[B].push(P)}},c.freeUint8=c.freeUint16=c.freeUint32=c.freeBigUint64=c.freeInt8=c.freeInt16=c.freeInt32=c.freeBigInt64=c.freeFloat32=c.freeFloat=c.freeFloat64=c.freeDouble=c.freeUint8Clamped=c.freeDataView=function(P){x(P.buffer)},c.freeArrayBuffer=x,c.freeBuffer=function(P){y[s.log2(P.length)].push(P)},c.malloc=function(P,N){if(N===void 0||N==="arraybuffer")return w(P);switch(N){case"uint8":return k(P);case"uint16":return b(P);case"uint32":return T(P);case"int8":return _(P);case"int16":return S(P);case"int32":return A(P);case"float":case"float32":return M(P);case"double":case"float64":return E(P);case"uint8_clamped":return D(P);case"bigint64":return R(P);case"biguint64":return O(P);case"buffer":return L(P);case"data":case"dataview":return z(P);default:return null}return null},c.mallocArrayBuffer=w,c.mallocUint8=k,c.mallocUint16=b,c.mallocUint32=T,c.mallocInt8=_,c.mallocInt16=S,c.mallocInt32=A,c.mallocFloat32=c.mallocFloat=M,c.mallocFloat64=c.mallocDouble=E,c.mallocUint8Clamped=D,c.mallocBigUint64=O,c.mallocBigInt64=R,c.mallocDataView=z,c.mallocBuffer=L,c.clearCache=function(){for(var P=0;P<32;++P)p.UINT8[P].length=0,p.UINT16[P].length=0,p.UINT32[P].length=0,p.INT8[P].length=0,p.INT16[P].length=0,p.INT32[P].length=0,p.FLOAT[P].length=0,p.DOUBLE[P].length=0,p.BIGUINT64[P].length=0,p.BIGINT64[P].length=0,p.UINT8C[P].length=0,v[P].length=0,y[P].length=0}}).call(this)}).call(this,r!==void 0?r:typeof self<"u"?self:typeof window<"u"?window:{})},{"bit-twiddle":32,buffer:3,dup:65}],309:[function(a,l,c){function i(u){this.roots=new Array(u),this.ranks=new Array(u);for(var d=0;d0&&(T=b.size),b.lineSpacing&&b.lineSpacing>0&&(_=b.lineSpacing),b.styletags&&b.styletags.breaklines&&(S.breaklines=!!b.styletags.breaklines),b.styletags&&b.styletags.bolds&&(S.bolds=!!b.styletags.bolds),b.styletags&&b.styletags.italics&&(S.italics=!!b.styletags.italics),b.styletags&&b.styletags.subscripts&&(S.subscripts=!!b.styletags.subscripts),b.styletags&&b.styletags.superscripts&&(S.superscripts=!!b.styletags.superscripts)),k.font=[b.fontStyle,b.fontVariant,b.fontWeight,T+"px",b.font].filter(function(A){return A}).join(" "),k.textAlign="start",k.textBaseline="alphabetic",k.direction="ltr",y(function(A,M,E,D,O,R){E=E.replace(/\n/g,""),E=R.breaklines===!0?E.replace(/\/g,` +`):E.replace(/\/g," ");var z="",L=[];for(G=0;G-1?parseInt(_e[1+Oe]):0,Me=de>-1?parseInt(we[1+de]):0;ye!==Me&&(Te=Te.replace(ie(),"?px "),te*=Math.pow(.75,Me-ye),Te=Te.replace("?px ",ie())),K+=.25*re*(Me-ye)}if(R.superscripts===!0){var ke=_e.indexOf("+"),Ee=we.indexOf("+"),ze=ke>-1?parseInt(_e[1+ke]):0,Fe=Ee>-1?parseInt(we[1+Ee]):0;ze!==Fe&&(Te=Te.replace(ie(),"?px "),te*=Math.pow(.75,Fe-ze),Te=Te.replace("?px ",ie())),K-=.25*re*(Fe-ze)}if(R.bolds===!0){var Ve=_e.indexOf("b|")>-1,Ke=we.indexOf("b|")>-1;!Ve&&Ke&&(Te=Re?Te.replace("italic ","italic bold "):"bold "+Te),Ve&&!Ke&&(Te=Te.replace("bold ",""))}if(R.italics===!0){var Re=_e.indexOf("i|")>-1,qe=we.indexOf("i|")>-1;!Re&&qe&&(Te="italic "+Te),Re&&!qe&&(Te=Te.replace("italic ",""))}M.font=Te}for(B=0;B",_="",S=T.length,A=_.length,M=w[0]==="+"||w[0]==="-",E=0,D=-A;E>-1&&(E=k.indexOf(T,E))!==-1&&(D=k.indexOf(_,E+S))!==-1&&!(D<=E);){for(var O=E;O=D)b[O]=null,k=k.substr(0,O)+" "+k.substr(O+1);else if(b[O]!==null){var R=b[O].indexOf(w[0]);R===-1?b[O]+=w:M&&(b[O]=b[O].substr(0,R+1)+(1+parseInt(b[O][R+1]))+b[O].substr(R+2))}var z=E+S,L=k.substr(z,D-z).indexOf(T);E=L!==-1?L:D+A}return b}function p(x,w){var k=i(x,128);return w?u(k.cells,k.positions,.25):{edges:k.cells,positions:k.positions}}function v(x,w,k,b){var T=p(x,b),_=function(B,G,W){for(var K=G.textAlign||"start",te=G.textBaseline||"alphabetic",Y=[1<<30,1<<30],Z=[0,0],re=B.length,U=0;U"u"||!ses.ok||ses.ok()){typeof ses<"u"&&(ses.weakMapPermitHostObjects=T);var i=!1;if(typeof WeakMap=="function"){var s=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var u=new s,d=Object.freeze({});if(u.set(d,1),u.get(d)===1)return void(l.exports=WeakMap);i=!0}}var h=Object.getOwnPropertyNames,m=Object.defineProperty,g=Object.isExtensible,p="weakmap:ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var v=new ArrayBuffer(25),y=new Uint8Array(v);crypto.getRandomValues(y),p="weakmap:rand:"+Array.prototype.map.call(y,function(E){return(E%36).toString(36)}).join("")+"___"}if(m(Object,"getOwnPropertyNames",{value:function(E){return h(E).filter(_)}}),"getPropertyNames"in Object){var x=Object.getPropertyNames;m(Object,"getPropertyNames",{value:function(E){return x(E).filter(_)}})}(function(){var E=Object.freeze;m(Object,"freeze",{value:function(R){return S(R),E(R)}});var D=Object.seal;m(Object,"seal",{value:function(R){return S(R),D(R)}});var O=Object.preventExtensions;m(Object,"preventExtensions",{value:function(R){return S(R),O(R)}})})();var w=!1,k=0,b=function(){this instanceof b||M();var E=[],D=[],O=k++;return Object.create(b.prototype,{get___:{value:A(function(R,z){var L,P=S(R);return P?O in P?P[O]:z:(L=E.indexOf(R))>=0?D[L]:z})},has___:{value:A(function(R){var z=S(R);return z?O in z:E.indexOf(R)>=0})},set___:{value:A(function(R,z){var L,P=S(R);return P?P[O]=z:(L=E.indexOf(R))>=0?D[L]=z:(L=E.length,D[L]=z,E[L]=R),this})},delete___:{value:A(function(R){var z,L,P=S(R);return P?O in P&&delete P[O]:!((z=E.indexOf(R))<0)&&(L=E.length-1,E[z]=void 0,D[z]=D[L],E[z]=E[L],E.length=L,D.length=L,!0)})}})};b.prototype=Object.create(Object.prototype,{get:{value:function(E,D){return this.get___(E,D)},writable:!0,configurable:!0},has:{value:function(E){return this.has___(E)},writable:!0,configurable:!0},set:{value:function(E,D){return this.set___(E,D)},writable:!0,configurable:!0},delete:{value:function(E){return this.delete___(E)},writable:!0,configurable:!0}}),typeof s=="function"?function(){function E(){this instanceof b||M();var D,O=new s,R=void 0,z=!1;return D=i?function(L,P){return O.set(L,P),O.has(L)||(R||(R=new b),R.set(L,P)),this}:function(L,P){if(z)try{O.set(L,P)}catch{R||(R=new b),R.set___(L,P)}else O.set(L,P);return this},Object.create(b.prototype,{get___:{value:A(function(L,P){return R?O.has(L)?O.get(L):R.get___(L,P):O.get(L,P)})},has___:{value:A(function(L){return O.has(L)||!!R&&R.has___(L)})},set___:{value:A(D)},delete___:{value:A(function(L){var P=!!O.delete(L);return R&&R.delete___(L)||P})},permitHostObjects___:{value:A(function(L){if(L!==T)throw new Error("bogus call to permitHostObjects___");z=!0})}})}i&&typeof Proxy<"u"&&(Proxy=void 0),E.prototype=b.prototype,l.exports=E,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),l.exports=b)}function T(E){E.permitHostObjects___&&E.permitHostObjects___(T)}function _(E){return!(E.substr(0,8)=="weakmap:"&&E.substr(E.length-3)==="___")}function S(E){if(E!==Object(E))throw new TypeError("Not an object: "+E);var D=E[p];if(D&&D.key===E)return D;if(g(E)){D={key:E};try{return m(E,p,{value:D,writable:!1,enumerable:!1,configurable:!1}),D}catch{return}}}function A(E){return E.prototype=null,Object.freeze(E)}function M(){w||typeof console>"u"||(w=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}})()},{}],314:[function(a,l,c){var i=a("./hidden-store.js");l.exports=function(){var s={};return function(u){if((typeof u!="object"||u===null)&&typeof u!="function")throw new Error("Weakmap-shim: Key must be object");var d=u.valueOf(s);return d&&d.identity===s?d:i(u,s)}}},{"./hidden-store.js":315}],315:[function(a,l,c){l.exports=function(i,s){var u={identity:s},d=i.valueOf;return Object.defineProperty(i,"valueOf",{value:function(h){return h!==s?d.apply(this,arguments):u},writable:!0}),u}},{}],316:[function(a,l,c){var i=a("./create-store.js");l.exports=function(){var s=i();return{get:function(u,d){var h=s(u);return h.hasOwnProperty("value")?h.value:d},set:function(u,d){return s(u).value=d,this},has:function(u){return"value"in s(u)},delete:function(u){return delete s(u).value}}}},{"./create-store.js":314}],317:[function(a,l,c){var i,s=function(){return function(u,d,h,m,g,p){var v=u[0],y=h[0],x=[0],w=y;m|=0;var k=0,b=y;for(k=0;k=0!=_>=0&&g.push(x[0]+.5+.5*(T+_)/(T-_)),m+=b,++x[0]}}};l.exports=(i={funcName:"zeroCrossings"},function(u){var d={};return function(h,m,g){var p=h.dtype,v=h.order,y=[p,v.join()].join(),x=d[y];return x||(d[y]=x=u([p,v])),x(h.shape.slice(0),h.data,h.stride,0|h.offset,m,g)}}(s.bind(void 0,i)))},{}],318:[function(a,l,c){l.exports=function(s,u){var d=[];return u=+u||0,i(s.hi(s.shape[0]-1),d,u),d};var i=a("./lib/zc-core")},{"./lib/zc-core":317}]},{},[6])(6)})}).call(this)}).call(this,typeof Ro<"u"?Ro:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[27])(27)})})(HD);var gW=NG(HD.exports);/*! + * https://github.com/Starcounter-Jack/JSON-Patch + * (c) 2017-2022 Joachim Wester + * MIT licensed + */var mW=globalThis&&globalThis.__extends||function(){var t=function(n,e){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,f){o.__proto__=f}||function(o,f){for(var r in f)f.hasOwnProperty(r)&&(o[r]=f[r])},t(n,e)};return function(n,e){t(n,e);function o(){this.constructor=n}n.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}}(),vW=Object.prototype.hasOwnProperty;function nk(t,n){return vW.call(t,n)}function rk(t){if(Array.isArray(t)){for(var n=new Array(t.length),e=0;e=48&&o<=57){n++;continue}return!1}return!0}function Jp(t){return t.indexOf("/")===-1&&t.indexOf("~")===-1?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function $D(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function ak(t){if(t===void 0)return!0;if(t){if(Array.isArray(t)){for(var n=0,e=t.length;n0&&c[s-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(e&&d===void 0&&(i[h]===void 0?d=c.slice(0,s).join("/"):s==u-1&&(d=n.path),d!==void 0&&m(n,0,t,d)),s++,Array.isArray(i)){if(h==="-")h=i.length;else{if(e&&!ik(h))throw new vs("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",r,n,t);ik(h)&&(h=~~h)}if(s>=u){if(e&&n.op==="add"&&h>i.length)throw new vs("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",r,n,t);var a=xW[n.op].call(n,i,h,t);if(a.test===!1)throw new vs("Test operation failed","TEST_OPERATION_FAILED",r,n,t);return a}}else if(s>=u){var a=$g[n.op].call(n,i,h,t);if(a.test===!1)throw new vs("Test operation failed","TEST_OPERATION_FAILED",r,n,t);return a}if(i=i[h],e&&s0)throw new vs('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",n,t,e);if((t.op==="move"||t.op==="copy")&&typeof t.from!="string")throw new vs("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",n,t,e);if((t.op==="add"||t.op==="replace"||t.op==="test")&&t.value===void 0)throw new vs("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",n,t,e);if((t.op==="add"||t.op==="replace"||t.op==="test")&&ak(t.value))throw new vs("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",n,t,e);if(e){if(t.op=="add"){var f=t.path.split("/").length,r=o.split("/").length;if(f!==r+1&&f!==r)throw new vs("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",n,t,e)}else if(t.op==="replace"||t.op==="remove"||t.op==="_get"){if(t.path!==o)throw new vs("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",n,t,e)}else if(t.op==="move"||t.op==="copy"){var a={op:"_get",path:t.from,value:void 0},l=WD([a],e);if(l&&l.name==="OPERATION_PATH_UNRESOLVABLE")throw new vs("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",n,t,e)}}}else throw new vs("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",n,t,e)}function WD(t,n,e){try{if(!Array.isArray(t))throw new vs("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(n)X2(Zu(n),Zu(t),e||!0);else{e=e||d_;for(var o=0;o0&&(t.patches=[],t.callback&&t.callback(o)),o}function wA(t,n,e,o,f){if(n!==t){typeof n.toJSON=="function"&&(n=n.toJSON());for(var r=rk(n),a=rk(t),l=!1,c=a.length-1;c>=0;c--){var i=a[c],s=t[i];if(nk(n,i)&&!(n[i]===void 0&&s!==void 0&&Array.isArray(n)===!1)){var u=n[i];typeof s=="object"&&s!=null&&typeof u=="object"&&u!=null&&Array.isArray(s)===Array.isArray(u)?wA(s,u,e,o+"/"+Jp(i),f):s!==u&&(f&&e.push({op:"test",path:o+"/"+Jp(i),value:Zu(s)}),e.push({op:"replace",path:o+"/"+Jp(i),value:Zu(u)}))}else Array.isArray(t)===Array.isArray(n)?(f&&e.push({op:"test",path:o+"/"+Jp(i),value:Zu(s)}),e.push({op:"remove",path:o+"/"+Jp(i)}),l=!0):(f&&e.push({op:"test",path:o,value:t}),e.push({op:"replace",path:o,value:n}))}if(!(!l&&r.length==a.length))for(var c=0;c0)return[x,o+d.join(`, +`+v),s].join(` +`+c)}return w}(n,"",0)};function Nu(t,n,e){return t.fields=n||[],t.fname=e,t}function xs(t){return t==null?null:t.fname}function Bl(t){return t==null?null:t.fields}function YD(t){return t.length===1?PW(t[0]):DW(t)}const PW=t=>function(n){return n[t]},DW=t=>{const n=t.length;return function(e){for(let o=0;oa?i():a=l+1:c==="["?(l>a&&i(),f=a=l+1):c==="]"&&(f||Pr("Access path missing open bracket: "+t),f>0&&i(),f=0,a=l+1)}return f&&Pr("Access path missing closing bracket: "+t),o&&Pr("Access path missing closing quote: "+t),l>a&&(l++,i()),n}function Lu(t,n,e){const o=ih(t);return t=o.length===1?o[0]:t,Nu((e&&e.get||YD)(o),[t],n||t)}const Ay=Lu("id"),Hl=Nu(t=>t,[],"identity"),Td=Nu(()=>0,[],"zero"),jm=Nu(()=>1,[],"one"),mc=Nu(()=>!0,[],"true"),md=Nu(()=>!1,[],"false");function IW(t,n,e){const o=[n].concat([].slice.call(e));console[t].apply(console,o)}const XD=0,kA=1,TA=2,ZD=3,JD=4;function AA(t,n,e=IW){let o=t||XD;return{level(f){return arguments.length?(o=+f,this):o},error(){return o>=kA&&e(n||"error","ERROR",arguments),this},warn(){return o>=TA&&e(n||"warn","WARN",arguments),this},info(){return o>=ZD&&e(n||"log","INFO",arguments),this},debug(){return o>=JD&&e(n||"log","DEBUG",arguments),this}}}var Ir=Array.isArray;function Ei(t){return t===Object(t)}const SC=t=>t!=="__proto__";function Um(...t){return t.reduce((n,e)=>{for(const o in e)if(o==="signals")n.signals=zW(n.signals,e.signals);else{const f=o==="legend"?{layout:1}:o==="style"?!0:null;Vm(n,o,e[o],f)}return n},{})}function Vm(t,n,e,o){if(!SC(n))return;let f,r;if(Ei(e)&&!Ir(e)){r=Ei(t[n])?t[n]:t[n]={};for(f in e)o&&(o===!0||o[f])?Vm(r,f,e[f]):SC(f)&&(r[f]=e[f])}else t[n]=e}function zW(t,n){if(t==null)return n;const e={},o=[];function f(r){e[r.name]||(e[r.name]=1,o.push(r))}return n.forEach(f),t.forEach(f),o}function Na(t){return t[t.length-1]}function Rl(t){return t==null||t===""?null:+t}const KD=t=>n=>t*Math.exp(n),QD=t=>n=>Math.log(t*n),eI=t=>n=>Math.sign(n)*Math.log1p(Math.abs(n/t)),tI=t=>n=>Math.sign(n)*Math.expm1(Math.abs(n))*t,p_=t=>n=>n<0?-Math.pow(-n,t):Math.pow(n,t);function Z2(t,n,e,o){const f=e(t[0]),r=e(Na(t)),a=(r-f)*n;return[o(f-a),o(r-a)]}function nI(t,n){return Z2(t,n,Rl,Hl)}function rI(t,n){var e=Math.sign(t[0]);return Z2(t,n,QD(e),KD(e))}function iI(t,n,e){return Z2(t,n,p_(e),p_(1/e))}function aI(t,n,e){return Z2(t,n,eI(e),tI(e))}function J2(t,n,e,o,f){const r=o(t[0]),a=o(Na(t)),l=n!=null?o(n):(r+a)/2;return[f(l+(r-l)*e),f(l+(a-l)*e)]}function MA(t,n,e){return J2(t,n,e,Rl,Hl)}function SA(t,n,e){const o=Math.sign(t[0]);return J2(t,n,e,QD(o),KD(o))}function g_(t,n,e,o){return J2(t,n,e,p_(o),p_(1/o))}function EA(t,n,e,o){return J2(t,n,e,eI(o),tI(o))}function oI(t){return 1+~~(new Date(t).getMonth()/3)}function sI(t){return 1+~~(new Date(t).getUTCMonth()/3)}function ki(t){return t!=null?Ir(t)?t:[t]:[]}function lI(t,n,e){let o=t[0],f=t[1],r;return f=e-n?[n,e]:[o=Math.min(Math.max(o,n),e-r),o+r]}function ga(t){return typeof t=="function"}const RW="descending";function CA(t,n,e){e=e||{},n=ki(n)||[];const o=[],f=[],r={},a=e.comparator||FW;return ki(t).forEach((l,c)=>{l!=null&&(o.push(n[c]===RW?-1:1),f.push(l=ga(l)?l:Lu(l,null,e)),(Bl(l)||[]).forEach(i=>r[i]=1))}),f.length===0?null:Nu(a(f,o),Object.keys(r))}const K2=(t,n)=>(tn||n==null)&&t!=null?1:(n=n instanceof Date?+n:n,(t=t instanceof Date?+t:t)!==t&&n===n?-1:n!==n&&t===t?1:0),FW=(t,n)=>t.length===1?NW(t[0],n[0]):BW(t,n,t.length),NW=(t,n)=>function(e,o){return K2(t(e),t(o))*n},BW=(t,n,e)=>(n.push(0),function(o,f){let r,a=0,l=-1;for(;a===0&&++lt}function OA(t,n){let e;return o=>{e&&clearTimeout(e),e=setTimeout(()=>(n(o),e=null),t)}}function pa(t){for(let n,e,o=1,f=arguments.length;oa&&(a=f))}else{for(f=n(t[e]);ea&&(a=f))}return[r,a]}function uI(t,n){const e=t.length;let o=-1,f,r,a,l,c;if(n==null){for(;++o=r){f=a=r;break}if(o===e)return[-1,-1];for(l=c=o;++or&&(f=r,l=o),a=r){f=a=r;break}if(o===e)return[-1,-1];for(l=c=o;++or&&(f=r,l=o),a{f.set(r,t[r])}),f}function cI(t,n,e,o,f,r){if(!e&&e!==0)return r;const a=+e;let l=t[0],c=Na(t),i;cr&&(a=f,f=r,r=a),e=e===void 0||e,o=o===void 0||o,(e?f<=t:fl.replace(/\\(.)/g,"$1")):ki(t));const o=t&&t.length,f=e&&e.get||YD,r=l=>f(n?[l]:ih(l));let a;if(!o)a=function(){return""};else if(o===1){const l=r(t[0]);a=function(c){return""+l(c)}}else{const l=t.map(r);a=function(c){let i=""+l[0](c),s=0;for(;++s{n={},e={},o=0},r=(a,l)=>(++o>t&&(e=n,n={},o=1),n[a]=l);return f(),{clear:f,has:a=>qi(n,a)||qi(e,a),get:a=>qi(n,a)?n[a]:qi(e,a)?r(a,e[a]):void 0,set:(a,l)=>qi(n,a)?n[a]=l:r(a,l)}}function gI(t,n,e,o){const f=n.length,r=e.length;if(!r)return n;if(!f)return e;const a=o||new n.constructor(f+r);let l=0,c=0,i=0;for(;l0?e[c++]:n[l++];for(;l=0;)e+=t;return e}function mI(t,n,e,o){const f=e||" ",r=t+"",a=n-r.length;return a<=0?r:o==="left"?av(f,a)+r:o==="center"?av(f,~~(a/2))+r+av(f,Math.ceil(a/2)):r+av(f,a)}function My(t){return t&&Na(t)-t[0]||0}function oi(t){return Ir(t)?"["+t.map(oi)+"]":Ei(t)||bi(t)?JSON.stringify(t).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):t}function PA(t){return t==null||t===""?null:!t||t==="false"||t==="0"?!1:!!t}const VW=t=>wo(t)||Bd(t)?t:Date.parse(t);function DA(t,n){return n=n||VW,t==null||t===""?null:n(t)}function IA(t){return t==null||t===""?null:t+""}function uf(t){const n={},e=t.length;for(let o=0;o1)o=ZW(t,n,e);else for(f=0,o=new Array(r=t.arcs.length);f=a&&(o=a-f,f+=o/++e,r+=o*(a-f));else{let a=-1;for(let l of t)(l=n(l,++a,t))!=null&&(l=+l)>=l&&(o=l-f,f+=o/++e,r+=o*(l-f))}if(e>1)return r/(e-1)}function KW(t,n){const e=JW(t,n);return e&&Math.sqrt(e)}class cu{constructor(){this._partials=new Float64Array(32),this._n=0}add(n){const e=this._partials;let o=0;for(let f=0;f0){for(a=n[--e];e>0&&(o=a,f=n[--e],a=o+f,r=f-(a-o),!r););e>0&&(r<0&&n[e-1]<0||r>0&&n[e-1]>0)&&(f=r*2,o=a+f,f==o-a&&(a=o))}return a}}class CC extends Map{constructor(n,e=_I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),n!=null)for(const[o,f]of n)this.set(o,f)}get(n){return super.get(sk(this,n))}has(n){return super.has(sk(this,n))}set(n,e){return super.set(xI(this,n),e)}delete(n){return super.delete(bI(this,n))}}class m_ extends Set{constructor(n,e=_I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),n!=null)for(const o of n)this.add(o)}has(n){return super.has(sk(this,n))}add(n){return super.add(xI(this,n))}delete(n){return super.delete(bI(this,n))}}function sk({_intern:t,_key:n},e){const o=n(e);return t.has(o)?t.get(o):e}function xI({_intern:t,_key:n},e){const o=n(e);return t.has(o)?t.get(o):(t.set(o,e),e)}function bI({_intern:t,_key:n},e){const o=n(e);return t.has(o)&&(e=t.get(o),t.delete(o)),e}function _I(t){return t!==null&&typeof t=="object"?t.valueOf():t}function QW(t,n){return Array.from(n,e=>t[e])}function eY(t=qv){if(t===qv)return wI;if(typeof t!="function")throw new TypeError("compare is not a function");return(n,e)=>{const o=t(n,e);return o||o===0?o:(t(e,e)===0)-(t(n,n)===0)}}function wI(t,n){return(t==null||!(t>=t))-(n==null||!(n>=n))||(tn?1:0)}function f0(t,n){let e;if(n===void 0)for(const o of t)o!=null&&(e=o)&&(e=o);else{let o=-1;for(let f of t)(f=n(f,++o,t))!=null&&(e=f)&&(e=f)}return e}function lk(t,n){let e;if(n===void 0)for(const o of t)o!=null&&(e>o||e===void 0&&o>=o)&&(e=o);else{let o=-1;for(let f of t)(f=n(f,++o,t))!=null&&(e>f||e===void 0&&f>=f)&&(e=f)}return e}function kI(t,n,e=0,o=t.length-1,f){for(f=f===void 0?wI:eY(f);o>e;){if(o-e>600){const c=o-e+1,i=n-e+1,s=Math.log(c),u=.5*Math.exp(2*s/3),d=.5*Math.sqrt(s*u*(c-u)/c)*(i-c/2<0?-1:1),h=Math.max(e,Math.floor(n-i*u/c+d)),m=Math.min(o,Math.floor(n+(c-i)*u/c+d));kI(t,n,h,m,f)}const r=t[n];let a=e,l=o;for(P1(t,e,n),f(t[o],r)>0&&P1(t,e,o);a0;)--l}f(t[e],r)===0?P1(t,e,l):(++l,P1(t,l,o)),l<=n&&(e=l+1),n<=l&&(o=l-1)}return t}function P1(t,n,e){const o=t[n];t[n]=t[e],t[e]=o}function uk(t,n,e){if(t=Float64Array.from(UG(t,e)),!!(o=t.length)){if((n=+n)<=0||o<2)return lk(t);if(n>=1)return f0(t);var o,f=(o-1)*n,r=Math.floor(f),a=f0(kI(t,r).subarray(0,r+1)),l=lk(t.subarray(r+1));return a+(l-a)*(f-r)}}function TI(t,n,e=jG){if(!!(o=t.length)){if((n=+n)<=0||o<2)return+e(t[0],0,t);if(n>=1)return+e(t[o-1],o-1,t);var o,f=(o-1)*n,r=Math.floor(f),a=+e(t[r],r,t),l=+e(t[r+1],r+1,t);return a+(l-a)*(f-r)}}function tY(t,n){let e=0,o=0;if(n===void 0)for(let f of t)f!=null&&(f=+f)>=f&&(++e,o+=f);else{let f=-1;for(let r of t)(r=n(r,++f,t))!=null&&(r=+r)>=r&&(++e,o+=r)}if(e)return o/e}function AI(t,n){return uk(t,.5,n)}function*nY(t){for(const n of t)yield*n}function MI(t){return Array.from(nY(t))}function Ju(t,n,e){t=+t,n=+n,e=(f=arguments.length)<2?(n=t,t=0,1):f<3?1:+e;for(var o=-1,f=Math.max(0,Math.ceil((n-t)/e))|0,r=new Array(f);++o0))return c;do c.push(i=new Date(+r)),n(r,l),t(r);while(i=a)for(;t(a),!r(a);)a.setTime(a-1)},function(a,l){if(a>=a)if(l<0)for(;++l<=0;)for(;n(a,-1),!r(a););else for(;--l>=0;)for(;n(a,1),!r(a););})},e&&(f.count=function(r,a){return C5.setTime(+r),O5.setTime(+a),t(C5),t(O5),Math.floor(e(C5,O5))},f.every=function(r){return r=Math.floor(r),!isFinite(r)||!(r>0)?null:r>1?f.filter(o?function(a){return o(a)%r===0}:function(a){return f.count(0,a)%r===0}):f}),f}var ck=ul(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});ck.every=function(t){return t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?ul(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):ck};var zA=ck;const zh=1e3,cc=zh*60,Rh=cc*60,b0=Rh*24,RA=b0*7,OC=b0*30,L5=b0*365;var oY=ul(function(t){t.setTime(t-t.getMilliseconds())},function(t,n){t.setTime(+t+n*zh)},function(t,n){return(n-t)/zh},function(t){return t.getUTCSeconds()}),Sd=oY,sY=ul(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*zh)},function(t,n){t.setTime(+t+n*cc)},function(t,n){return(n-t)/cc},function(t){return t.getMinutes()}),FA=sY,lY=ul(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*zh-t.getMinutes()*cc)},function(t,n){t.setTime(+t+n*Rh)},function(t,n){return(n-t)/Rh},function(t){return t.getHours()}),NA=lY,uY=ul(t=>t.setHours(0,0,0,0),(t,n)=>t.setDate(t.getDate()+n),(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*cc)/b0,t=>t.getDate()-1),jd=uY;function U0(t){return ul(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+e*7)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*cc)/RA})}var Sy=U0(0),fk=U0(1);U0(2);U0(3);var $v=U0(4);U0(5);U0(6);var cY=ul(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+(n.getFullYear()-t.getFullYear())*12},function(t){return t.getMonth()}),v_=cY,EI=ul(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});EI.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:ul(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)})};var Yd=EI,fY=ul(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*cc)},function(t,n){return(n-t)/cc},function(t){return t.getUTCMinutes()}),BA=fY,hY=ul(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+n*Rh)},function(t,n){return(n-t)/Rh},function(t){return t.getUTCHours()}),jA=hY,dY=ul(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/b0},function(t){return t.getUTCDate()-1}),Ud=dY;function V0(t){return ul(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCDate(n.getUTCDate()+e*7)},function(n,e){return(e-n)/RA})}var Ey=V0(0),hk=V0(1);V0(2);V0(3);var Gv=V0(4);V0(5);V0(6);var pY=ul(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+(n.getUTCFullYear()-t.getUTCFullYear())*12},function(t){return t.getUTCMonth()}),y_=pY,CI=ul(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});CI.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:ul(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})};var Xd=CI;function OI(t,n,e,o,f,r){const a=[[Sd,1,zh],[Sd,5,5*zh],[Sd,15,15*zh],[Sd,30,30*zh],[r,1,cc],[r,5,5*cc],[r,15,15*cc],[r,30,30*cc],[f,1,Rh],[f,3,3*Rh],[f,6,6*Rh],[f,12,12*Rh],[o,1,b0],[o,2,2*b0],[e,1,RA],[n,1,OC],[n,3,3*OC],[t,1,L5]];function l(i,s,u){const d=sp).right(a,d);if(h===a.length)return t.every(x0(i/L5,s/L5,u));if(h===0)return zA.every(Math.max(x0(i,s,u),1));const[m,g]=a[d/a[h-1][2](t[n]=1+e,t),{});function VA(t){const n=ki(t).slice(),e={};return n.length||Pr("Missing time unit."),n.forEach(f=>{qi(P5,f)?e[f]=1:Pr("Invalid time unit: ".concat(f,"."))}),(e[Gs]||e[Il]?1:0)+(e[Pu]||e[jl]||e[Du]?1:0)+(e[Jf]?1:0)>1&&Pr("Incompatible time units: ".concat(t)),n.sort((f,r)=>P5[f]-P5[r]),n}const xY={[wl]:"%Y ",[Pu]:"Q%q ",[jl]:"%b ",[Du]:"%d ",[Gs]:"W%U ",[Il]:"%a ",[Jf]:"%j ",[Qu]:"%H:00",[ec]:"00:%M",[vc]:":%S",[cf]:".%L",["".concat(wl,"-").concat(jl)]:"%Y-%m ",["".concat(wl,"-").concat(jl,"-").concat(Du)]:"%Y-%m-%d ",["".concat(Qu,"-").concat(ec)]:"%H:%M"};function LI(t,n){const e=pa({},xY,n),o=VA(t),f=o.length;let r="",a=0,l,c;for(a=0;aa;--l)if(c=o.slice(a,l).join("-"),e[c]!=null){r+=e[c],a=l;break}return r.trim()}const Qp=new Date;function qA(t){return Qp.setFullYear(t),Qp.setMonth(0),Qp.setDate(1),Qp.setHours(0,0,0,0),Qp}function PI(t){return II(new Date(t))}function DI(t){return dk(new Date(t))}function II(t){return jd.count(qA(t.getFullYear())-1,t)}function dk(t){return Sy.count(qA(t.getFullYear())-1,t)}function pk(t){return qA(t).getDay()}function bY(t,n,e,o,f,r,a){if(0<=t&&t<100){const l=new Date(-1,n,e,o,f,r,a);return l.setFullYear(t),l}return new Date(t,n,e,o,f,r,a)}function zI(t){return FI(new Date(t))}function RI(t){return gk(new Date(t))}function FI(t){const n=Date.UTC(t.getUTCFullYear(),0,1);return Ud.count(n-1,t)}function gk(t){const n=Date.UTC(t.getUTCFullYear(),0,1);return Ey.count(n-1,t)}function mk(t){return Qp.setTime(Date.UTC(t,0,1)),Qp.getUTCDay()}function _Y(t,n,e,o,f,r,a){if(0<=t&&t<100){const l=new Date(Date.UTC(-1,n,e,o,f,r,a));return l.setUTCFullYear(e.y),l}return new Date(Date.UTC(t,n,e,o,f,r,a))}function NI(t,n,e,o,f){const r=n||1,a=Na(t),l=(v,y,x)=>(x=x||v,wY(e[x],o[x],v===a&&r,y)),c=new Date,i=uf(t),s=i[wl]?l(wl):$l(2012),u=i[jl]?l(jl):i[Pu]?l(Pu):Td,d=i[Gs]&&i[Il]?l(Il,1,Gs+Il):i[Gs]?l(Gs,1):i[Il]?l(Il,1):i[Du]?l(Du,1):i[Jf]?l(Jf,1):jm,h=i[Qu]?l(Qu):Td,m=i[ec]?l(ec):Td,g=i[vc]?l(vc):Td,p=i[cf]?l(cf):Td;return function(v){c.setTime(+v);const y=s(c);return f(y,u(c),d(c,y),h(c),m(c),g(c),p(c))}}function wY(t,n,e,o){const f=e<=1?t:o?(r,a)=>o+e*Math.floor((t(r,a)-o)/e):(r,a)=>e*Math.floor(t(r,a)/e);return n?(r,a)=>n(f(r,a),a):f}function lm(t,n,e){return n+t*7-(e+6)%7}const kY={[wl]:t=>t.getFullYear(),[Pu]:t=>Math.floor(t.getMonth()/3),[jl]:t=>t.getMonth(),[Du]:t=>t.getDate(),[Qu]:t=>t.getHours(),[ec]:t=>t.getMinutes(),[vc]:t=>t.getSeconds(),[cf]:t=>t.getMilliseconds(),[Jf]:t=>II(t),[Gs]:t=>dk(t),[Gs+Il]:(t,n)=>lm(dk(t),t.getDay(),pk(n)),[Il]:(t,n)=>lm(1,t.getDay(),pk(n))},TY={[Pu]:t=>3*t,[Gs]:(t,n)=>lm(t,0,pk(n))};function BI(t,n){return NI(t,n||1,kY,TY,bY)}const AY={[wl]:t=>t.getUTCFullYear(),[Pu]:t=>Math.floor(t.getUTCMonth()/3),[jl]:t=>t.getUTCMonth(),[Du]:t=>t.getUTCDate(),[Qu]:t=>t.getUTCHours(),[ec]:t=>t.getUTCMinutes(),[vc]:t=>t.getUTCSeconds(),[cf]:t=>t.getUTCMilliseconds(),[Jf]:t=>FI(t),[Gs]:t=>gk(t),[Il]:(t,n)=>lm(1,t.getUTCDay(),mk(n)),[Gs+Il]:(t,n)=>lm(gk(t),t.getUTCDay(),mk(n))},MY={[Pu]:t=>3*t,[Gs]:(t,n)=>lm(t,0,mk(n))};function jI(t,n){return NI(t,n||1,AY,MY,_Y)}const SY={[wl]:Yd,[Pu]:v_.every(3),[jl]:v_,[Gs]:Sy,[Du]:jd,[Il]:jd,[Jf]:jd,[Qu]:NA,[ec]:FA,[vc]:Sd,[cf]:zA},EY={[wl]:Xd,[Pu]:y_.every(3),[jl]:y_,[Gs]:Ey,[Du]:Ud,[Il]:Ud,[Jf]:Ud,[Qu]:jA,[ec]:BA,[vc]:Sd,[cf]:zA};function Hm(t){return SY[t]}function $m(t){return EY[t]}function UI(t,n,e){return t?t.offset(n,e):void 0}function VI(t,n,e){return UI(Hm(t),n,e)}function qI(t,n,e){return UI($m(t),n,e)}function HI(t,n,e,o){return t?t.range(n,e,o):void 0}function $I(t,n,e,o){return HI(Hm(t),n,e,o)}function GI(t,n,e,o){return HI($m(t),n,e,o)}const ov=1e3,sv=ov*60,lv=sv*60,Q2=lv*24,CY=Q2*7,LC=Q2*30,vk=Q2*365,WI=[wl,jl,Du,Qu,ec,vc,cf],uv=WI.slice(0,-1),cv=uv.slice(0,-1),fv=cv.slice(0,-1),OY=fv.slice(0,-1),LY=[wl,Gs],PC=[wl,jl],YI=[wl],D1=[[uv,1,ov],[uv,5,5*ov],[uv,15,15*ov],[uv,30,30*ov],[cv,1,sv],[cv,5,5*sv],[cv,15,15*sv],[cv,30,30*sv],[fv,1,lv],[fv,3,3*lv],[fv,6,6*lv],[fv,12,12*lv],[OY,1,Q2],[LY,1,CY],[PC,1,LC],[PC,3,3*LC],[YI,1,vk]];function XI(t){const n=t.extent,e=t.maxbins||40,o=Math.abs(My(n))/e;let f=q2(l=>l[2]).right(D1,o),r,a;return f===D1.length?(r=YI,a=x0(n[0]/vk,n[1]/vk,e)):f?(f=D1[o/D1[f-1][2]53)return null;"w"in H||(H.w=1),"Z"in H?(ee=I5(I1(H.y,0,1)),ie=ee.getUTCDay(),ee=ie>4||ie===0?hk.ceil(ee):hk(ee),ee=Ud.offset(ee,(H.V-1)*7),H.y=ee.getUTCFullYear(),H.m=ee.getUTCMonth(),H.d=ee.getUTCDate()+(H.w+6)%7):(ee=D5(I1(H.y,0,1)),ie=ee.getDay(),ee=ie>4||ie===0?fk.ceil(ee):fk(ee),ee=jd.offset(ee,(H.V-1)*7),H.y=ee.getFullYear(),H.m=ee.getMonth(),H.d=ee.getDate()+(H.w+6)%7)}else("W"in H||"U"in H)&&("w"in H||(H.w="u"in H?H.u%7:"W"in H?1:0),ie="Z"in H?I5(I1(H.y,0,1)).getUTCDay():D5(I1(H.y,0,1)).getDay(),H.m=0,H.d="W"in H?(H.w+6)%7+H.W*7-(ie+5)%7:H.w+H.U*7-(ie+6)%7);return"Z"in H?(H.H+=H.Z/100|0,H.M+=H.Z%100,I5(H)):D5(H)}}function _(q,$,ne,H){for(var Q=0,ee=$.length,ie=ne.length,ae,ue;Q=ie)return-1;if(ae=$.charCodeAt(Q++),ae===37){if(ae=$.charAt(Q++),ue=k[ae in DC?$.charAt(Q++):ae],!ue||(H=ue(q,ne,H))<0)return-1}else if(ae!=ne.charCodeAt(H++))return-1}return H}function S(q,$,ne){var H=i.exec($.slice(ne));return H?(q.p=s.get(H[0].toLowerCase()),ne+H[0].length):-1}function A(q,$,ne){var H=h.exec($.slice(ne));return H?(q.w=m.get(H[0].toLowerCase()),ne+H[0].length):-1}function M(q,$,ne){var H=u.exec($.slice(ne));return H?(q.w=d.get(H[0].toLowerCase()),ne+H[0].length):-1}function E(q,$,ne){var H=v.exec($.slice(ne));return H?(q.m=y.get(H[0].toLowerCase()),ne+H[0].length):-1}function D(q,$,ne){var H=g.exec($.slice(ne));return H?(q.m=p.get(H[0].toLowerCase()),ne+H[0].length):-1}function O(q,$,ne){return _(q,n,$,ne)}function R(q,$,ne){return _(q,e,$,ne)}function z(q,$,ne){return _(q,o,$,ne)}function L(q){return a[q.getDay()]}function P(q){return r[q.getDay()]}function N(q){return c[q.getMonth()]}function B(q){return l[q.getMonth()]}function G(q){return f[+(q.getHours()>=12)]}function W(q){return 1+~~(q.getMonth()/3)}function K(q){return a[q.getUTCDay()]}function te(q){return r[q.getUTCDay()]}function Y(q){return c[q.getUTCMonth()]}function Z(q){return l[q.getUTCMonth()]}function re(q){return f[+(q.getUTCHours()>=12)]}function U(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var $=b(q+="",x);return $.toString=function(){return q},$},parse:function(q){var $=T(q+="",!1);return $.toString=function(){return q},$},utcFormat:function(q){var $=b(q+="",w);return $.toString=function(){return q},$},utcParse:function(q){var $=T(q+="",!0);return $.toString=function(){return q},$}}}var DC={"-":"",_:" ","0":"0"},cl=/^\s*\d+/,PY=/^%/,DY=/[\\^$*+?|[\]().{}]/g;function Ya(t,n,e){var o=t<0?"-":"",f=(o?-t:t)+"",r=f.length;return o+(r[n.toLowerCase(),e]))}function zY(t,n,e){var o=cl.exec(n.slice(e,e+1));return o?(t.w=+o[0],e+o[0].length):-1}function RY(t,n,e){var o=cl.exec(n.slice(e,e+1));return o?(t.u=+o[0],e+o[0].length):-1}function FY(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.U=+o[0],e+o[0].length):-1}function NY(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.V=+o[0],e+o[0].length):-1}function BY(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.W=+o[0],e+o[0].length):-1}function IC(t,n,e){var o=cl.exec(n.slice(e,e+4));return o?(t.y=+o[0],e+o[0].length):-1}function zC(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.y=+o[0]+(+o[0]>68?1900:2e3),e+o[0].length):-1}function jY(t,n,e){var o=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return o?(t.Z=o[1]?0:-(o[2]+(o[3]||"00")),e+o[0].length):-1}function UY(t,n,e){var o=cl.exec(n.slice(e,e+1));return o?(t.q=o[0]*3-3,e+o[0].length):-1}function VY(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.m=o[0]-1,e+o[0].length):-1}function RC(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.d=+o[0],e+o[0].length):-1}function qY(t,n,e){var o=cl.exec(n.slice(e,e+3));return o?(t.m=0,t.d=+o[0],e+o[0].length):-1}function FC(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.H=+o[0],e+o[0].length):-1}function HY(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.M=+o[0],e+o[0].length):-1}function $Y(t,n,e){var o=cl.exec(n.slice(e,e+2));return o?(t.S=+o[0],e+o[0].length):-1}function GY(t,n,e){var o=cl.exec(n.slice(e,e+3));return o?(t.L=+o[0],e+o[0].length):-1}function WY(t,n,e){var o=cl.exec(n.slice(e,e+6));return o?(t.L=Math.floor(o[0]/1e3),e+o[0].length):-1}function YY(t,n,e){var o=PY.exec(n.slice(e,e+1));return o?e+o[0].length:-1}function XY(t,n,e){var o=cl.exec(n.slice(e));return o?(t.Q=+o[0],e+o[0].length):-1}function ZY(t,n,e){var o=cl.exec(n.slice(e));return o?(t.s=+o[0],e+o[0].length):-1}function NC(t,n){return Ya(t.getDate(),n,2)}function JY(t,n){return Ya(t.getHours(),n,2)}function KY(t,n){return Ya(t.getHours()%12||12,n,2)}function QY(t,n){return Ya(1+jd.count(Yd(t),t),n,3)}function JI(t,n){return Ya(t.getMilliseconds(),n,3)}function eX(t,n){return JI(t,n)+"000"}function tX(t,n){return Ya(t.getMonth()+1,n,2)}function nX(t,n){return Ya(t.getMinutes(),n,2)}function rX(t,n){return Ya(t.getSeconds(),n,2)}function iX(t){var n=t.getDay();return n===0?7:n}function aX(t,n){return Ya(Sy.count(Yd(t)-1,t),n,2)}function KI(t){var n=t.getDay();return n>=4||n===0?$v(t):$v.ceil(t)}function oX(t,n){return t=KI(t),Ya($v.count(Yd(t),t)+(Yd(t).getDay()===4),n,2)}function sX(t){return t.getDay()}function lX(t,n){return Ya(fk.count(Yd(t)-1,t),n,2)}function uX(t,n){return Ya(t.getFullYear()%100,n,2)}function cX(t,n){return t=KI(t),Ya(t.getFullYear()%100,n,2)}function fX(t,n){return Ya(t.getFullYear()%1e4,n,4)}function hX(t,n){var e=t.getDay();return t=e>=4||e===0?$v(t):$v.ceil(t),Ya(t.getFullYear()%1e4,n,4)}function dX(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Ya(n/60|0,"0",2)+Ya(n%60,"0",2)}function BC(t,n){return Ya(t.getUTCDate(),n,2)}function pX(t,n){return Ya(t.getUTCHours(),n,2)}function gX(t,n){return Ya(t.getUTCHours()%12||12,n,2)}function mX(t,n){return Ya(1+Ud.count(Xd(t),t),n,3)}function QI(t,n){return Ya(t.getUTCMilliseconds(),n,3)}function vX(t,n){return QI(t,n)+"000"}function yX(t,n){return Ya(t.getUTCMonth()+1,n,2)}function xX(t,n){return Ya(t.getUTCMinutes(),n,2)}function bX(t,n){return Ya(t.getUTCSeconds(),n,2)}function _X(t){var n=t.getUTCDay();return n===0?7:n}function wX(t,n){return Ya(Ey.count(Xd(t)-1,t),n,2)}function ez(t){var n=t.getUTCDay();return n>=4||n===0?Gv(t):Gv.ceil(t)}function kX(t,n){return t=ez(t),Ya(Gv.count(Xd(t),t)+(Xd(t).getUTCDay()===4),n,2)}function TX(t){return t.getUTCDay()}function AX(t,n){return Ya(hk.count(Xd(t)-1,t),n,2)}function MX(t,n){return Ya(t.getUTCFullYear()%100,n,2)}function SX(t,n){return t=ez(t),Ya(t.getUTCFullYear()%100,n,2)}function EX(t,n){return Ya(t.getUTCFullYear()%1e4,n,4)}function CX(t,n){var e=t.getUTCDay();return t=e>=4||e===0?Gv(t):Gv.ceil(t),Ya(t.getUTCFullYear()%1e4,n,4)}function OX(){return"+0000"}function jC(){return"%"}function UC(t){return+t}function VC(t){return Math.floor(+t/1e3)}var Cg,HA,tz,$A,nz;LX({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 LX(t){return Cg=ZI(t),HA=Cg.format,tz=Cg.parse,$A=Cg.utcFormat,nz=Cg.utcParse,Cg}function hv(t){const n={};return e=>n[e]||(n[e]=t(e))}function PX(t,n){return e=>{const o=t(e),f=o.indexOf(n);if(f<0)return o;let r=DX(o,f);const a=rf;)if(o[r]!=="0"){++r;break}return o.slice(0,r)+a}}function DX(t,n){let e=t.lastIndexOf("e"),o;if(e>0)return e;for(e=t.length;--e>n;)if(o=t.charCodeAt(e),o>=48&&o<=57)return e+1}function rz(t){const n=hv(t.format),e=t.formatPrefix;return{format:n,formatPrefix:e,formatFloat(o){const f=Q4(o||",");if(f.precision==null){switch(f.precision=12,f.type){case"%":f.precision-=2;break;case"e":f.precision-=1;break}return PX(n(f),n(".1f")(1)[1])}else return n(f)},formatSpan(o,f,r,a){a=Q4(a??",f");const l=x0(o,f,r),c=Math.max(Math.abs(o),Math.abs(f));let i;if(a.precision==null)switch(a.type){case"s":return isNaN(i=HG(l,c))||(a.precision=i),e(a,c);case"":case"e":case"g":case"p":case"r":{isNaN(i=qG(l,c))||(a.precision=i-(a.type==="e"));break}case"f":case"%":{isNaN(i=VG(l))||(a.precision=i-(a.type==="%")*2);break}}return n(a)}}}let yk;iz();function iz(){return yk=rz({format:BD,formatPrefix:$G})}function az(t){return rz(GG(t))}function x_(t){return arguments.length?yk=az(t):yk}function qC(t,n,e){e=e||{},Ei(e)||Pr("Invalid time multi-format specifier: ".concat(e));const o=n(vc),f=n(ec),r=n(Qu),a=n(Du),l=n(Gs),c=n(jl),i=n(Pu),s=n(wl),u=t(e[cf]||".%L"),d=t(e[vc]||":%S"),h=t(e[ec]||"%I:%M"),m=t(e[Qu]||"%I %p"),g=t(e[Du]||e[Il]||"%a %d"),p=t(e[Gs]||"%b %d"),v=t(e[jl]||"%B"),y=t(e[Pu]||"%B"),x=t(e[wl]||"%Y");return w=>(o(w)bi(o)?n(o):qC(n,Hm,o),utcFormat:o=>bi(o)?e(o):qC(e,$m,o),timeParse:hv(t.parse),utcParse:hv(t.utcParse)}}let xk;sz();function sz(){return xk=oz({format:HA,parse:tz,utcFormat:$A,utcParse:nz})}function lz(t){return oz(ZI(t))}function Wv(t){return arguments.length?xk=lz(t):xk}const bk=(t,n)=>pa({},t,n);function uz(t,n){const e=t?az(t):x_(),o=n?lz(n):Wv();return bk(e,o)}function GA(t,n){const e=arguments.length;return e&&e!==2&&Pr("defaultLocale expects either zero or two arguments."),e?bk(x_(t),Wv(n)):bk(x_(),Wv())}function IX(){return iz(),sz(),GA()}const zX=/^(data:|([A-Za-z]+:)?\/\/)/,RX=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,FX=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,HC="file://";function NX(t,n){return e=>({options:e||{},sanitize:jX,load:BX,fileAccess:!!n,file:UX(n),http:qX(t)})}async function BX(t,n){const e=await this.sanitize(t,n),o=e.href;return e.localFile?this.file(o):this.http(o,n)}async function jX(t,n){n=pa({},this.options,n);const e=this.fileAccess,o={href:null};let f,r,a;const l=RX.test(t.replace(FX,""));(t==null||typeof t!="string"||!l)&&Pr("Sanitize failure, invalid URI: "+oi(t));const c=zX.test(t);return(a=n.baseURL)&&!c&&(!t.startsWith("/")&&!a.endsWith("/")&&(t="/"+t),t=a+t),r=(f=t.startsWith(HC))||n.mode==="file"||n.mode!=="http"&&!c&&e,f?t=t.slice(HC.length):t.startsWith("//")&&(n.defaultProtocol==="file"?(t=t.slice(2),r=!0):t=(n.defaultProtocol||"http")+":"+t),Object.defineProperty(o,"localFile",{value:!!r}),o.href=t,n.target&&(o.target=n.target+""),n.rel&&(o.rel=n.rel+""),n.context==="image"&&n.crossOrigin&&(o.crossOrigin=n.crossOrigin+""),o}function UX(t){return t?n=>new Promise((e,o)=>{t.readFile(n,(f,r)=>{f?o(f):e(r)})}):VX}async function VX(){Pr("No file system access.")}function qX(t){return t?async function(n,e){const o=pa({},this.options.http,e),f=e&&e.response,r=await t(n,o);return r.ok?ga(r[f])?r[f]():r.text():Pr(r.status+""+r.statusText)}:HX}async function HX(){Pr("No HTTP fetch method available.")}const $X=t=>t!=null&&t===t,GX=t=>t==="true"||t==="false"||t===!0||t===!1,WX=t=>!Number.isNaN(Date.parse(t)),cz=t=>!Number.isNaN(+t)&&!(t instanceof Date),YX=t=>cz(t)&&Number.isInteger(+t),_k={boolean:PA,integer:Rl,number:Rl,date:DA,string:IA,unknown:Hl},eb=[GX,YX,cz,WX],XX=["boolean","integer","number","date"];function fz(t,n){if(!t||!t.length)return"unknown";const e=t.length,o=eb.length,f=eb.map((r,a)=>a+1);for(let r=0,a=0,l,c;rr===0?a:r,0)-1]}function hz(t,n){return n.reduce((e,o)=>(e[o]=fz(t,o),e),{})}function $C(t){const n=function(e,o){const f={delimiter:t};return WA(e,o?pa(o,f):f)};return n.responseType="text",n}function WA(t,n){return n.header&&(t=n.header.map(oi).join(n.delimiter)+` +`+t),cW(n.delimiter).parse(t+"")}WA.responseType="text";function ZX(t){return typeof Buffer=="function"&&ga(Buffer.isBuffer)?Buffer.isBuffer(t):!1}function YA(t,n){const e=n&&n.property?Lu(n.property):Hl;return Ei(t)&&!ZX(t)?JX(e(t),n):e(JSON.parse(t))}YA.responseType="json";function JX(t,n){return!Ir(t)&&fI(t)&&(t=[...t]),n&&n.copy?JSON.parse(JSON.stringify(t)):t}const KX={interior:(t,n)=>t!==n,exterior:(t,n)=>t===n};function dz(t,n){let e,o,f,r;return t=YA(t,n),n&&n.feature?(e=GW,f=n.feature):n&&n.mesh?(e=YW,f=n.mesh,r=KX[n.filter]):Pr("Missing TopoJSON feature or mesh parameter."),o=(o=t.objects[f])?e(t,o,r):Pr("Invalid TopoJSON object: "+f),o&&o.features||[o]}dz.responseType="json";const jb={dsv:WA,csv:$C(","),tsv:$C(" "),json:YA,topojson:dz};function XA(t,n){return arguments.length>1?(jb[t]=n,this):qi(jb,t)?jb[t]:null}function pz(t){const n=XA(t);return n&&n.responseType||"text"}function gz(t,n,e,o){n=n||{};const f=XA(n.type||"json");return f||Pr("Unknown data format type: "+n.type),t=f(t,n),n.parse&&QX(t,n.parse,e,o),qi(t,"columns")&&delete t.columns,t}function QX(t,n,e,o){if(!t.length)return;const f=Wv();e=e||f.timeParse,o=o||f.utcParse;let r=t.columns||Object.keys(t[0]),a,l,c,i,s,u;n==="auto"&&(n=hz(t,r)),r=Object.keys(n);const d=r.map(h=>{const m=n[h];let g,p;if(m&&(m.startsWith("date:")||m.startsWith("utc:")))return g=m.split(/:(.+)?/,2),p=g[1],(p[0]==="'"&&p[p.length-1]==="'"||p[0]==='"'&&p[p.length-1]==='"')&&(p=p.slice(1,-1)),(g[0]==="utc"?o:e)(p);if(!_k[m])throw Error("Illegal format pattern: "+h+":"+m);return _k[m]});for(c=0,s=t.length,u=r.length;c{const r=n(f);return o[r]||(o[r]=1,e.push(f)),e},e.remove=f=>{const r=n(f);if(o[r]){o[r]=0;const a=e.indexOf(f);a>=0&&e.splice(a,1)}return e},e}async function Ub(t,n){try{await n(t)}catch(e){t.error(e)}}const mz=Symbol("vega_id");let eZ=1;function nw(t){return!!(t&&$i(t))}function $i(t){return t[mz]}function vz(t,n){return t[mz]=n,t}function ro(t){const n=t===Object(t)?t:{data:t};return $i(n)?n:vz(n,eZ++)}function ZA(t){return rw(t,ro({}))}function rw(t,n){for(const e in t)n[e]=t[e];return n}function yz(t,n){return vz(n,$i(t))}function q0(t,n){return t?n?(e,o)=>t(e,o)||$i(n(e))-$i(n(o)):(e,o)=>t(e,o)||$i(e)-$i(o):null}function xz(t){return t&&t.constructor===H0}function H0(){const t=[],n=[],e=[],o=[],f=[];let r=null,a=!1;return{constructor:H0,insert(l){const c=ki(l),i=c.length;for(let s=0;s{m(y)&&(i[$i(y)]=-1)});for(u=0,d=t.length;u0&&(v(g,m,h.value),l.modifies(m));for(u=0,d=f.length;u{m(y)&&i[$i(y)]>0&&v(y,h.field,h.value)}),l.modifies(h.field);if(a)l.mod=n.length||o.length?c.filter(y=>i[$i(y)]>0):c.slice();else for(p in s)l.mod.push(s[p]);return(r||r==null&&(n.length||o.length))&&l.clean(!0),l}}}const Vb="_:mod:_";function iw(){Object.defineProperty(this,Vb,{writable:!0,value:{}})}iw.prototype={set(t,n,e,o){const f=this,r=f[t],a=f[Vb];return n!=null&&n>=0?(r[n]!==e||o)&&(r[n]=e,a[n+":"+t]=-1,a[t]=-1):(r!==e||o)&&(f[t]=e,a[t]=Ir(e)?1+e.length:-1),f},modified(t,n){const e=this[Vb];if(arguments.length){if(Ir(t)){for(let o=0;o=0?n+1{h instanceof Co?(h!==this&&(n&&h.targets().add(this),r.push(h)),f.push({op:h,name:u,index:d})):o.set(u,d,h)};for(a in t)if(l=t[a],a===nZ)ki(l).forEach(u=>{u instanceof Co?u!==this&&(u.targets().add(this),r.push(u)):Pr("Pulse parameters must be operator instances.")}),this.source=l;else if(Ir(l))for(o.set(a,-1,Array(c=l.length)),i=0;i{const e=Date.now();return e-n>t?(n=e,1):0})},debounce(t){const n=vd();return this.targets().add(vd(null,null,OA(t,e=>{const o=e.dataflow;n.receive(e),o&&o.run&&o.run()}))),n},between(t,n){let e=!1;return t.targets().add(vd(null,null,()=>e=!0)),n.targets().add(vd(null,null,()=>e=!1)),this.filter(()=>e)},detach(){this._filter=mc,this._targets=null}};function uZ(t,n,e,o){const f=this,r=vd(e,o),a=function(i){i.dataflow=f;try{r.receive(i)}catch(s){f.error(s)}finally{f.run()}};let l;typeof t=="string"&&typeof document<"u"?l=document.querySelectorAll(t):l=ki(t);const c=l.length;for(let i=0;in=o);return e.requests=0,e.done=()=>{--e.requests===0&&(t._pending=null,n(t))},t._pending=e}const gZ={skip:!0};function mZ(t,n,e,o,f){return(t instanceof Co?yZ:vZ)(this,t,n,e,o,f),this}function vZ(t,n,e,o,f,r){const a=pa({},r,gZ);let l,c;ga(e)||(e=$l(e)),o===void 0?l=i=>t.touch(e(i)):ga(o)?(c=new Co(null,o,f,!1),l=i=>{c.evaluate(i);const s=e(i),u=c.value;xz(u)?t.pulse(s,u,r):t.update(s,u,a)}):l=i=>t.update(e(i),o,a),n.apply(l)}function yZ(t,n,e,o,f,r){if(o===void 0)n.targets().add(e);else{const a=r||{},l=new Co(null,xZ(e,o),f,!1);l.modified(a.force),l.rank=n.rank,n.targets().add(l),e&&(l.skip(!0),l.value=e.value,l.targets().add(e),t.connect(e,[l]))}}function xZ(t,n){return n=ga(n)?n:$l(n),t?function(e,o){const f=n(e,o);return t.skip()||(t.skip(f!==this.value).value=f),f}:n}function bZ(t){t.rank=++this._rank}function _Z(t){const n=[t];let e,o,f;for(;n.length;)if(this.rank(e=n.pop()),o=e._targets)for(f=o.length;--f>=0;)n.push(e=o[f]),e===t&&Pr("Cycle detected in dataflow graph.")}const b_={},Of=1<<0,bd=1<<1,Eh=1<<2,wZ=Of|bd,WC=Of|Eh,Og=Of|bd|Eh,YC=1<<3,F1=1<<4,XC=1<<5,ZC=1<<6;function Vd(t,n,e){this.dataflow=t,this.stamp=n??-1,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=e||null}function z5(t,n){const e=[];return xd(t,n,o=>e.push(o)),e}function JC(t,n){const e={};return t.visit(n,o=>{e[$i(o)]=1}),o=>e[$i(o)]?null:o}function tb(t,n){return t?(e,o)=>t(e,o)&&n(e,o):n}Vd.prototype={StopPropagation:b_,ADD:Of,REM:bd,MOD:Eh,ADD_REM:wZ,ADD_MOD:WC,ALL:Og,REFLOW:YC,SOURCE:F1,NO_SOURCE:XC,NO_FIELDS:ZC,fork(t){return new Vd(this.dataflow).init(this,t)},clone(){const t=this.fork(Og);return t.add=t.add.slice(),t.rem=t.rem.slice(),t.mod=t.mod.slice(),t.source&&(t.source=t.source.slice()),t.materialize(Og|F1)},addAll(){let t=this;return!t.source||t.add===t.rem||!t.rem.length&&t.source.length===t.add.length||(t=new Vd(this.dataflow).init(this),t.add=t.source,t.rem=[]),t},init(t,n){const e=this;return e.stamp=t.stamp,e.encode=t.encode,t.fields&&!(n&ZC)&&(e.fields=t.fields),n&Of?(e.addF=t.addF,e.add=t.add):(e.addF=null,e.add=[]),n&bd?(e.remF=t.remF,e.rem=t.rem):(e.remF=null,e.rem=[]),n&Eh?(e.modF=t.modF,e.mod=t.mod):(e.modF=null,e.mod=[]),n&XC?(e.srcF=null,e.source=null):(e.srcF=t.srcF,e.source=t.source,t.cleans&&(e.cleans=t.cleans)),e},runAfter(t){this.dataflow.runAfter(t)},changed(t){const n=t||Og;return n&Of&&this.add.length||n&bd&&this.rem.length||n&Eh&&this.mod.length},reflow(t){if(t)return this.fork(Og).reflow();const n=this.add.length,e=this.source&&this.source.length;return e&&e!==n&&(this.mod=this.source,n&&this.filter(Eh,JC(this,Of))),this},clean(t){return arguments.length?(this.cleans=!!t,this):this.cleans},modifies(t){const n=this.fields||(this.fields={});return Ir(t)?t.forEach(e=>n[e]=!0):n[t]=!0,this},modified(t,n){const e=this.fields;return(n||this.mod.length)&&e?arguments.length?Ir(t)?t.some(o=>e[o]):e[t]:!!e:!1},filter(t,n){const e=this;return t&Of&&(e.addF=tb(e.addF,n)),t&bd&&(e.remF=tb(e.remF,n)),t&Eh&&(e.modF=tb(e.modF,n)),t&F1&&(e.srcF=tb(e.srcF,n)),e},materialize(t){t=t||Og;const n=this;return t&Of&&n.addF&&(n.add=z5(n.add,n.addF),n.addF=null),t&bd&&n.remF&&(n.rem=z5(n.rem,n.remF),n.remF=null),t&Eh&&n.modF&&(n.mod=z5(n.mod,n.modF),n.modF=null),t&F1&&n.srcF&&(n.source=n.source.filter(n.srcF),n.srcF=null),n},visit(t,n){const e=this,o=n;if(t&F1)return xd(e.source,e.srcF,o),e;t&Of&&xd(e.add,e.addF,o),t&bd&&xd(e.rem,e.remF,o),t&Eh&&xd(e.mod,e.modF,o);const f=e.source;if(t&YC&&f){const r=e.add.length+e.mod.length;r===f.length||(r?xd(f,JC(e,WC),o):xd(f,e.srcF,o))}return e}};function JA(t,n,e,o){const f=this,r=e.length;let a=0;this.dataflow=t,this.stamp=n,this.fields=null,this.encode=o||null,this.pulses=e;for(let l=0;ln.add.push(e)),t&n.REM&&this.visit(n.REM,e=>n.rem.push(e)),t&n.MOD&&this.visit(n.MOD,e=>n.mod.push(e))),n},changed(t){return this.changes&t},modified(t){const n=this,e=n.fields;return e&&n.changes&n.MOD?Ir(t)?t.some(o=>e[o]):e[t]:0},filter(){Pr("MultiPulse does not support filtering.")},materialize(){Pr("MultiPulse does not support materialization.")},visit(t,n){const e=this,o=e.pulses,f=o.length;let r=0;if(t&e.SOURCE)for(;ro._enqueue(s,!0)),o._touched=tw(Ay);let a=0,l,c,i;try{for(;o._heap.size()>0;){if(l=o._heap.pop(),l.rank!==l.qrank){o._enqueue(l,!0);continue}c=l.run(o._getPulse(l,t)),c.then?c=await c:c.async&&(f.push(c.async),c=b_),c!==b_&&l._targets&&l._targets.forEach(s=>o._enqueue(s)),++a}}catch(s){o._heap.clear(),i=s}if(o._input={},o._pulse=null,o.debug(`Pulse ${r}: ${a} operators`),i&&(o._postrun=[],o.error(i)),o._postrun.length){const s=o._postrun.sort((u,d)=>d.priority-u.priority);o._postrun=[];for(let u=0;uo.runAsync(null,()=>{s.forEach(u=>{try{u(o)}catch(d){o.error(d)}})})),o}async function TZ(t,n,e){for(;this._running;)await this._running;const o=()=>this._running=null;return(this._running=this.evaluate(t,n,e)).then(o,o),this._running}function AZ(t,n,e){return this._pulse?bz(this):(this.evaluate(t,n,e),this)}function MZ(t,n,e){if(this._pulse||n)this._postrun.push({priority:e||0,callback:t});else try{t(this)}catch(o){this.error(o)}}function bz(t){return t.error("Dataflow already running. Use runAsync() to chain invocations."),t}function SZ(t,n){const e=t.stampf.pulse),n):this._input[t.id]||CZ(this._pulse,e&&e.pulse)}function CZ(t,n){return n&&n.stamp===t.stamp?n:(t=t.fork(),n&&n!==b_&&(t.source=n.source),t)}const KA={skip:!1,force:!1};function OZ(t,n){const e=n||KA;return this._pulse?this._enqueue(t):this._touched.add(t),e.skip&&t.skip(!0),this}function LZ(t,n,e){const o=e||KA;return(t.set(n)||o.force)&&this.touch(t,o),this}function PZ(t,n,e){this.touch(t,e||KA);const o=new Vd(this,this._clock+(this._pulse?0:1)),f=t.pulse&&t.pulse.source||[];return o.target=t,this._input[t.id]=n.pulse(o,f),this}function DZ(t){let n=[];return{clear:()=>n=[],size:()=>n.length,peek:()=>n[0],push:e=>(n.push(e),_z(n,0,n.length-1,t)),pop:()=>{const e=n.pop();let o;return n.length?(o=n[0],n[0]=e,IZ(n,0,t)):o=e,o}}}function _z(t,n,e,o){let f,r;const a=t[e];for(;e>n;){if(r=e-1>>1,f=t[r],o(a,f)<0){t[e]=f,e=r;continue}break}return t[e]=a}function IZ(t,n,e){const o=n,f=t.length,r=t[n];let a=(n<<1)+1,l;for(;a=0&&(a=l),t[n]=t[a],n=a,a=(n<<1)+1;return t[n]=r,_z(t,o,n,e)}function Kg(){this.logger(AA()),this.logLevel(kA),this._clock=0,this._rank=0,this._locale=GA();try{this._loader=ew()}catch{}this._touched=tw(Ay),this._input={},this._pulse=null,this._heap=DZ((t,n)=>t.qrank-n.qrank),this._postrun=[]}function N1(t){return function(){return this._log[t].apply(this,arguments)}}Kg.prototype={stamp(){return this._clock},loader(t){return arguments.length?(this._loader=t,this):this._loader},locale(t){return arguments.length?(this._locale=t,this):this._locale},logger(t){return arguments.length?(this._log=t,this):this._log},error:N1("error"),warn:N1("warn"),info:N1("info"),debug:N1("debug"),logLevel:N1("level"),cleanThreshold:1e4,add:oZ,connect:sZ,rank:bZ,rerank:_Z,pulse:PZ,touch:OZ,update:LZ,changeset:H0,ingest:fZ,parse:cZ,preload:dZ,request:hZ,events:uZ,on:mZ,evaluate:kZ,run:AZ,runAsync:TZ,runAfter:MZ,_enqueue:SZ,_getPulse:EZ};function _r(t,n){Co.call(this,t,null,n)}ni(_r,Co,{run(t){if(t.stampthis.pulse=e):n!==t.StopPropagation&&(this.pulse=n),n},evaluate(t){const n=this.marshall(t.stamp),e=this.transform(n,t);return n.clear(),e},transform(){}});const um={};function wz(t){const n=kz(t);return n&&n.Definition||null}function kz(t){return t=t&&t.toLowerCase(),qi(um,t)?um[t]:null}function*Tz(t,n){if(n==null)for(let e of t)e!=null&&e!==""&&(e=+e)>=e&&(yield e);else{let e=-1;for(let o of t)o=n(o,++e,t),o!=null&&o!==""&&(o=+o)>=o&&(yield o)}}function QA(t,n,e){const o=Float64Array.from(Tz(t,e));return o.sort(qv),n.map(f=>TI(o,f))}function e6(t,n){return QA(t,[.25,.5,.75],n)}function t6(t,n){const e=t.length,o=KW(t,n),f=e6(t,n),r=(f[2]-f[0])/1.34,a=Math.min(o,r)||o||Math.abs(f[0])||1;return 1.06*a*Math.pow(e,-.2)}function Az(t){const n=t.maxbins||20,e=t.base||10,o=Math.log(e),f=t.divide||[5,2];let r=t.extent[0],a=t.extent[1],l,c,i,s,u,d;const h=t.span||a-r||Math.abs(r)||1;if(t.step)l=t.step;else if(t.steps){for(s=h/n,u=0,d=t.steps.length;un;)l*=e;for(u=0,d=f.length;u=i&&h/s<=n&&(l=s)}s=Math.log(l);const m=s>=0?0:~~(-s/o)+1,g=Math.pow(e,-m-1);return(t.nice||t.nice===void 0)&&(s=Math.floor(r/l+g)*l,r=rd);const f=t.length,r=new Float64Array(f);let a=0,l=1,c=o(t[0]),i=c,s=c+n,u;for(;l=s){for(i=(c+i)/2;a>1);af;)t[a--]=t[o]}o=f,f=r}return t}function FZ(t){return function(){return t=(1103515245*t+12345)%2147483647,t/2147483647}}function NZ(t,n){n==null&&(n=t,t=0);let e,o,f;const r={min(a){return arguments.length?(e=a||0,f=o-e,r):e},max(a){return arguments.length?(o=a||0,f=o-e,r):o},sample(){return e+Math.floor(f*yc())},pdf(a){return a===Math.floor(a)&&a>=e&&a=o?1:(l-e+1)/f},icdf(a){return a>=0&&a<=1?e-1+Math.floor(a*f):NaN}};return r.min(t).max(n)}const Ez=Math.sqrt(2*Math.PI),BZ=Math.SQRT2;let B1=NaN;function ow(t,n){t=t||0,n=n??1;let e=0,o=0,f,r;if(B1===B1)e=B1,B1=NaN;else{do e=yc()*2-1,o=yc()*2-1,f=e*e+o*o;while(f===0||f>1);r=Math.sqrt(-2*Math.log(f)/f),e*=r,B1=o*r}return t+e*n}function n6(t,n,e){e=e??1;const o=(t-(n||0))/e;return Math.exp(-.5*o*o)/(e*Ez)}function sw(t,n,e){n=n||0,e=e??1;const o=(t-n)/e,f=Math.abs(o);let r;if(f>37)r=0;else{const a=Math.exp(-f*f/2);let l;f<7.07106781186547?(l=.0352624965998911*f+.700383064443688,l=l*f+6.37396220353165,l=l*f+33.912866078383,l=l*f+112.079291497871,l=l*f+221.213596169931,l=l*f+220.206867912376,r=a*l,l=.0883883476483184*f+1.75566716318264,l=l*f+16.064177579207,l=l*f+86.7807322029461,l=l*f+296.564248779674,l=l*f+637.333633378831,l=l*f+793.826512519948,l=l*f+440.413735824752,r=r/l):(l=f+.65,l=f+4/l,l=f+3/l,l=f+2/l,l=f+1/l,r=a/l/2.506628274631)}return o>0?1-r:r}function lw(t,n,e){return t<0||t>1?NaN:(n||0)+(e??1)*BZ*jZ(2*t-1)}function jZ(t){let n=-Math.log((1-t)*(1+t)),e;return n<6.25?(n-=3.125,e=-364441206401782e-35,e=-16850591381820166e-35+e*n,e=128584807152564e-32+e*n,e=11157877678025181e-33+e*n,e=-1333171662854621e-31+e*n,e=20972767875968562e-33+e*n,e=6637638134358324e-30+e*n,e=-4054566272975207e-29+e*n,e=-8151934197605472e-29+e*n,e=26335093153082323e-28+e*n,e=-12975133253453532e-27+e*n,e=-5415412054294628e-26+e*n,e=10512122733215323e-25+e*n,e=-4112633980346984e-24+e*n,e=-29070369957882005e-24+e*n,e=42347877827932404e-23+e*n,e=-13654692000834679e-22+e*n,e=-13882523362786469e-21+e*n,e=.00018673420803405714+e*n,e=-.000740702534166267+e*n,e=-.006033670871430149+e*n,e=.24015818242558962+e*n,e=1.6536545626831027+e*n):n<16?(n=Math.sqrt(n)-3.25,e=22137376921775787e-25,e=9075656193888539e-23+e*n,e=-27517406297064545e-23+e*n,e=18239629214389228e-24+e*n,e=15027403968909828e-22+e*n,e=-4013867526981546e-21+e*n,e=29234449089955446e-22+e*n,e=12475304481671779e-21+e*n,e=-47318229009055734e-21+e*n,e=6828485145957318e-20+e*n,e=24031110387097894e-21+e*n,e=-.0003550375203628475+e*n,e=.0009532893797373805+e*n,e=-.0016882755560235047+e*n,e=.002491442096107851+e*n,e=-.003751208507569241+e*n,e=.005370914553590064+e*n,e=1.0052589676941592+e*n,e=3.0838856104922208+e*n):Number.isFinite(n)?(n=Math.sqrt(n)-5,e=-27109920616438573e-27,e=-2555641816996525e-25+e*n,e=15076572693500548e-25+e*n,e=-3789465440126737e-24+e*n,e=761570120807834e-23+e*n,e=-1496002662714924e-23+e*n,e=2914795345090108e-23+e*n,e=-6771199775845234e-23+e*n,e=22900482228026655e-23+e*n,e=-99298272942317e-20+e*n,e=4526062597223154e-21+e*n,e=-1968177810553167e-20+e*n,e=7599527703001776e-20+e*n,e=-.00021503011930044477+e*n,e=-.00013871931833623122+e*n,e=1.0103004648645344+e*n,e=4.849906401408584+e*n):e=1/0,e*t}function r6(t,n){let e,o;const f={mean(r){return arguments.length?(e=r||0,f):e},stdev(r){return arguments.length?(o=r??1,f):o},sample:()=>ow(e,o),pdf:r=>n6(r,e,o),cdf:r=>sw(r,e,o),icdf:r=>lw(r,e,o)};return f.mean(t).stdev(n)}function i6(t,n){const e=r6();let o=0;const f={data(r){return arguments.length?(t=r,o=r?r.length:0,f.bandwidth(n)):t},bandwidth(r){return arguments.length?(n=r,!n&&t&&(n=t6(t)),f):n},sample(){return t[~~(yc()*o)]+n*e.sample()},pdf(r){let a=0,l=0;for(;la6(e,o),pdf:r=>o6(r,e,o),cdf:r=>s6(r,e,o),icdf:r=>l6(r,e,o)};return f.mean(t).stdev(n)}function Oz(t,n){let e=0,o;function f(a){const l=[];let c=0,i;for(i=0;i=n&&t<=e?1/(e-n):0}function f6(t,n,e){return e==null&&(e=n??1,n=0),te?1:(t-n)/(e-n)}function h6(t,n,e){return e==null&&(e=n??1,n=0),t>=0&&t<=1?n+t*(e-n):NaN}function Lz(t,n){let e,o;const f={min(r){return arguments.length?(e=r||0,f):e},max(r){return arguments.length?(o=r??1,f):o},sample:()=>u6(e,o),pdf:r=>c6(r,e,o),cdf:r=>f6(r,e,o),icdf:r=>h6(r,e,o)};return n==null&&(n=t??1,t=0),f.min(t).max(n)}function Cy(t,n,e,o){const f=o-t*t,r=Math.abs(f)<1e-24?0:(e-t*n)/f;return[n-r*t,r]}function uw(t,n,e,o){t=t.filter(h=>{let m=n(h),g=e(h);return m!=null&&(m=+m)>=m&&g!=null&&(g=+g)>=g}),o&&t.sort((h,m)=>n(h)-n(m));const f=t.length,r=new Float64Array(f),a=new Float64Array(f);let l=0,c=0,i=0,s,u,d;for(d of t)r[l]=s=+n(d),a[l]=u=+e(d),++l,c+=(s-c)/l,i+=(u-i)/l;for(l=0;l=r&&a!=null&&(a=+a)>=a&&o(r,a,++f)}function Gm(t,n,e,o,f){let r=0,a=0;return Oy(t,n,e,(l,c)=>{const i=c-f(l),s=c-o;r+=i*i,a+=s*s}),1-r/a}function d6(t,n,e){let o=0,f=0,r=0,a=0,l=0;Oy(t,n,e,(s,u)=>{++l,o+=(s-o)/l,f+=(u-f)/l,r+=(s*u-r)/l,a+=(s*s-a)/l});const c=Cy(o,f,r,a),i=s=>c[0]+c[1]*s;return{coef:c,predict:i,rSquared:Gm(t,n,e,f,i)}}function Pz(t,n,e){let o=0,f=0,r=0,a=0,l=0;Oy(t,n,e,(s,u)=>{++l,s=Math.log(s),o+=(s-o)/l,f+=(u-f)/l,r+=(s*u-r)/l,a+=(s*s-a)/l});const c=Cy(o,f,r,a),i=s=>c[0]+c[1]*Math.log(s);return{coef:c,predict:i,rSquared:Gm(t,n,e,f,i)}}function Dz(t,n,e){const[o,f,r,a]=uw(t,n,e);let l=0,c=0,i=0,s=0,u=0,d,h,m;Oy(t,n,e,(y,x)=>{d=o[u++],h=Math.log(x),m=d*x,l+=(x*h-l)/u,c+=(m-c)/u,i+=(m*h-i)/u,s+=(d*m-s)/u});const[g,p]=Cy(c/a,l/a,i/a,s/a),v=y=>Math.exp(g+p*(y-r));return{coef:[Math.exp(g-p*r),p],predict:v,rSquared:Gm(t,n,e,a,v)}}function Iz(t,n,e){let o=0,f=0,r=0,a=0,l=0,c=0;Oy(t,n,e,(u,d)=>{const h=Math.log(u),m=Math.log(d);++c,o+=(h-o)/c,f+=(m-f)/c,r+=(h*m-r)/c,a+=(h*h-a)/c,l+=(d-l)/c});const i=Cy(o,f,r,a),s=u=>i[0]*Math.pow(u,i[1]);return i[0]=Math.exp(i[0]),{coef:i,predict:s,rSquared:Gm(t,n,e,l,s)}}function p6(t,n,e){const[o,f,r,a]=uw(t,n,e),l=o.length;let c=0,i=0,s=0,u=0,d=0,h,m,g,p;for(h=0;h(T=T-r,x*T*T+w*T+k+a);return{coef:[k-w*r+x*r*r+a,w-2*x*r,x],predict:b,rSquared:Gm(t,n,e,a,b)}}function zz(t,n,e,o){if(o===1)return d6(t,n,e);if(o===2)return p6(t,n,e);const[f,r,a,l]=uw(t,n,e),c=f.length,i=[],s=[],u=o+1;let d,h,m,g,p;for(d=0;d{x-=a;let w=l+v[0]+v[1]*x+v[2]*x*x;for(d=3;d=0;--r)for(l=n[r],c=1,f[r]+=l,a=1;a<=r;++a)c*=(r+1-a)/a,f[r-a]+=l*Math.pow(e,a)*c;return f[0]+=o,f}function VZ(t){const n=t.length-1,e=[];let o,f,r,a,l;for(o=0;oMath.abs(t[o][a])&&(a=f);for(r=o;r=o;r--)t[r][f]-=t[r][o]*t[o][f]/t[o][o]}for(f=n-1;f>=0;--f){for(l=0,r=f+1;rf[x]-v?y:x;let k=0,b=0,T=0,_=0,S=0;const A=1/Math.abs(f[w]-v||1);for(let D=y;D<=x;++D){const O=f[D],R=r[D],z=qZ(Math.abs(v-O)*A)*d[D],L=O*z;k+=z,b+=L,T+=R*z,_+=R*L,S+=O*L}const[M,E]=Cy(b/k,T/k,_/k,S/k);s[p]=M+E*v,u[p]=Math.abs(r[p]-s[p]),HZ(f,p+1,m)}if(h===KC)break;const g=AI(u);if(Math.abs(g)=1?QC:(y=1-v*v)*y}return $Z(f,s,a,l)}function qZ(t){return(t=1-t*t*t)*t*t}function HZ(t,n,e){const o=t[n];let f=e[0],r=e[1]+1;if(!(r>=t.length))for(;n>f&&t[r]-o<=o-t[f];)e[0]=++f,e[1]=r,++r}function $Z(t,n,e,o){const f=t.length,r=[];let a=0,l=0,c=[],i;for(;a[g,t(g)],r=n[0],a=n[1],l=a-r,c=l/o,i=[f(r)],s=[];if(e===o){for(let g=1;g0;)s.push(f(r+g/e*l))}let u=i[0],d=s[s.length-1];const h=1/l,m=WZ(u[1],s);for(;d;){const g=f((u[0]+d[0])/2);g[0]-u[0]>=c&&YZ(u,g,d,h,m)>GZ?s.push(g):(u=d,i.push(d),s.pop()),d=s[s.length-1]}return i}function WZ(t,n){let e=t,o=t;const f=n.length;for(let r=0;ro&&(o=a)}return 1/(o-e)}function YZ(t,n,e,o,f){const r=Math.atan2(f*(e[1]-t[1]),o*(e[0]-t[0])),a=Math.atan2(f*(n[1]-t[1]),o*(n[0]-t[0]));return Math.abs(r-a)}function XZ(t){return n=>{const e=t.length;let o=1,f=String(t[0](n));for(;o{},ZZ={init:R5,add:R5,rem:R5,idx:0},Yv={values:{init:t=>t.cell.store=!0,value:t=>t.cell.data.values(),idx:-1},count:{value:t=>t.cell.num},__count__:{value:t=>t.missing+t.valid},missing:{value:t=>t.missing},valid:{value:t=>t.valid},sum:{init:t=>t.sum=0,value:t=>t.sum,add:(t,n)=>t.sum+=+n,rem:(t,n)=>t.sum-=n},product:{init:t=>t.product=1,value:t=>t.valid?t.product:void 0,add:(t,n)=>t.product*=n,rem:(t,n)=>t.product/=n},mean:{init:t=>t.mean=0,value:t=>t.valid?t.mean:void 0,add:(t,n)=>(t.mean_d=n-t.mean,t.mean+=t.mean_d/t.valid),rem:(t,n)=>(t.mean_d=n-t.mean,t.mean-=t.valid?t.mean_d/t.valid:t.mean)},average:{value:t=>t.valid?t.mean:void 0,req:["mean"],idx:1},variance:{init:t=>t.dev=0,value:t=>t.valid>1?t.dev/(t.valid-1):void 0,add:(t,n)=>t.dev+=t.mean_d*(n-t.mean),rem:(t,n)=>t.dev-=t.mean_d*(n-t.mean),req:["mean"],idx:1},variancep:{value:t=>t.valid>1?t.dev/t.valid:void 0,req:["variance"],idx:2},stdev:{value:t=>t.valid>1?Math.sqrt(t.dev/(t.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:t=>t.valid>1?Math.sqrt(t.dev/t.valid):void 0,req:["variance"],idx:2},stderr:{value:t=>t.valid>1?Math.sqrt(t.dev/(t.valid*(t.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:t=>t.cell.data.distinct(t.get),req:["values"],idx:3},ci0:{value:t=>t.cell.data.ci0(t.get),req:["values"],idx:3},ci1:{value:t=>t.cell.data.ci1(t.get),req:["values"],idx:3},median:{value:t=>t.cell.data.q2(t.get),req:["values"],idx:3},q1:{value:t=>t.cell.data.q1(t.get),req:["values"],idx:3},q3:{value:t=>t.cell.data.q3(t.get),req:["values"],idx:3},min:{init:t=>t.min=void 0,value:t=>t.min=Number.isNaN(t.min)?t.cell.data.min(t.get):t.min,add:(t,n)=>{(n{n<=t.min&&(t.min=NaN)},req:["values"],idx:4},max:{init:t=>t.max=void 0,value:t=>t.max=Number.isNaN(t.max)?t.cell.data.max(t.get):t.max,add:(t,n)=>{(n>t.max||t.max===void 0)&&(t.max=n)},rem:(t,n)=>{n>=t.max&&(t.max=NaN)},req:["values"],idx:4},argmin:{init:t=>t.argmin=void 0,value:t=>t.argmin||t.cell.data.argmin(t.get),add:(t,n,e)=>{n{n<=t.min&&(t.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:t=>t.argmax=void 0,value:t=>t.argmax||t.cell.data.argmax(t.get),add:(t,n,e)=>{n>t.max&&(t.argmax=e)},rem:(t,n)=>{n>=t.max&&(t.argmax=void 0)},req:["max","values"],idx:3}},Ly=Object.keys(Yv);function JZ(t,n){return e=>pa({name:t,out:e||t},ZZ,n)}Ly.forEach(t=>{Yv[t]=JZ(t,Yv[t])});function Nz(t,n){return Yv[t](n)}function Bz(t,n){return t.idx-n.idx}function KZ(t){const n={};t.forEach(o=>n[o.name]=o);const e=o=>{!o.req||o.req.forEach(f=>{n[f]||e(n[f]=Yv[f]())})};return t.forEach(e),Object.values(n).sort(Bz)}function QZ(){this.valid=0,this.missing=0,this._ops.forEach(t=>t.init(this))}function eJ(t,n){if(t==null||t===""){++this.missing;return}t===t&&(++this.valid,this._ops.forEach(e=>e.add(this,t,n)))}function tJ(t,n){if(t==null||t===""){--this.missing;return}t===t&&(--this.valid,this._ops.forEach(e=>e.rem(this,t,n)))}function nJ(t){return this._out.forEach(n=>t[n.out]=n.value(this)),t}function jz(t,n){const e=n||Hl,o=KZ(t),f=t.slice().sort(Bz);function r(a){this._ops=o,this._out=f,this.cell=a,this.init()}return r.prototype.init=QZ,r.prototype.add=eJ,r.prototype.rem=tJ,r.prototype.set=nJ,r.prototype.get=e,r.fields=t.map(a=>a.out),r}function g6(t){this._key=t?Lu(t):$i,this.reset()}const Tl=g6.prototype;Tl.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null};Tl.add=function(t){this._add.push(t)};Tl.rem=function(t){this._rem.push(t)};Tl.values=function(){if(this._get=null,this._rem.length===0)return this._add;const t=this._add,n=this._rem,e=this._key,o=t.length,f=n.length,r=Array(o-f),a={};let l,c,i;for(l=0;l=0;)r=t(n[o])+"",qi(e,r)||(e[r]=1,++f);return f};Tl.extent=function(t){if(this._get!==t||!this._ext){const n=this.values(),e=uI(n,t);this._ext=[n[e[0]],n[e[1]]],this._get=t}return this._ext};Tl.argmin=function(t){return this.extent(t)[0]||{}};Tl.argmax=function(t){return this.extent(t)[1]||{}};Tl.min=function(t){const n=this.extent(t)[0];return n!=null?t(n):void 0};Tl.max=function(t){const n=this.extent(t)[1];return n!=null?t(n):void 0};Tl.quartile=function(t){return(this._get!==t||!this._q)&&(this._q=e6(this.values(),t),this._get=t),this._q};Tl.q1=function(t){return this.quartile(t)[0]};Tl.q2=function(t){return this.quartile(t)[1]};Tl.q3=function(t){return this.quartile(t)[2]};Tl.ci=function(t){return(this._get!==t||!this._ci)&&(this._ci=Mz(this.values(),1e3,.05,t),this._get=t),this._ci};Tl.ci0=function(t){return this.ci(t)[0]};Tl.ci1=function(t){return this.ci(t)[1]};function Zd(t){_r.call(this,null,t),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}Zd.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:Ly},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]};ni(Zd,_r,{transform(t,n){const e=this,o=n.fork(n.NO_SOURCE|n.NO_FIELDS),f=t.modified();return e.stamp=o.stamp,e.value&&(f||n.modified(e._inputs,!0))?(e._prev=e.value,e.value=f?e.init(t):{},n.visit(n.SOURCE,r=>e.add(r))):(e.value=e.value||e.init(t),n.visit(n.REM,r=>e.rem(r)),n.visit(n.ADD,r=>e.add(r))),o.modifies(e._outputs),e._drop=t.drop!==!1,t.cross&&e._dims.length>1&&(e._drop=!1,e.cross()),n.clean()&&e._drop&&o.clean(!0).runAfter(()=>this.clean()),e.changes(o)},cross(){const t=this,n=t.value,e=t._dnames,o=e.map(()=>({})),f=e.length;function r(l){let c,i,s,u;for(c in l)for(s=l[c].tuple,i=0;i{const v=xs(p);return f(p),e.push(v),v}),this.cellkey=t.key?t.key:wk(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const r=t.fields||[null],a=t.ops||["count"],l=t.as||[],c=r.length,i={};let s,u,d,h,m,g;for(c!==a.length&&Pr("Unmatched number of fields and aggregate ops."),g=0;gjz(p,p.field)),{}},cellkey:wk(),cell(t,n){let e=this.value[t];return e?e.num===0&&this._drop&&e.stamp{const u=o(s);s[l]=u,s[c]=u==null?null:f+r*(1+(u-f)/r)}:s=>s[l]=o(s)),n.modifies(e?a:l)},_bins(t){if(this.value&&!t.modified())return this.value;const n=t.field,e=Az(t),o=e.step;let f=e.start,r=f+Math.ceil((e.stop-f)/o)*o,a,l;(a=t.anchor)!=null&&(l=a-(f+o*Math.floor((a-f)/o)),f+=l,r+=l);const c=function(i){let s=Rl(n(i));return s==null?null:sr?1/0:(s=Math.max(f,Math.min(s,r-o)),f+o*Math.floor(rJ+(s-f)/o))};return c.start=f,c.stop=e.stop,c.step=o,this.value=Nu(c,Bl(n),t.name||"bin_"+xs(n))}});function Uz(t,n,e){const o=t;let f=n||[],r=e||[],a={},l=0;return{add:c=>r.push(c),remove:c=>a[o(c)]=++l,size:()=>f.length,data:(c,i)=>(l&&(f=f.filter(s=>!a[o(s)]),a={},l=0),i&&c&&f.sort(c),r.length&&(f=c?gI(c,f,r.sort(c)):f.concat(r),r=[]),f)}}function v6(t){_r.call(this,[],t)}v6.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]};ni(v6,_r,{transform(t,n){const e=n.fork(n.ALL),o=Uz($i,this.value,e.materialize(e.ADD).add),f=t.sort,r=n.changed()||f&&(t.modified("sort")||n.modified(f.fields));return e.visit(e.REM,o.remove),this.modified(r),this.value=e.source=o.data(q0(f),r),n.source&&n.source.root&&(this.value.root=n.source.root),e}});function Vz(t){Co.call(this,null,iJ,t)}ni(Vz,Co);function iJ(t){return this.value&&!t.modified()?this.value:CA(t.fields,t.orders)}function y6(t){_r.call(this,null,t)}y6.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]};function aJ(t,n,e){switch(n){case"upper":t=t.toUpperCase();break;case"lower":t=t.toLowerCase();break}return t.match(e)}ni(y6,_r,{transform(t,n){const e=u=>d=>{for(var h=aJ(l(d),t.case,r)||[],m,g=0,p=h.length;gf[u]=1+(f[u]||0)),s=e(u=>f[u]-=1);return o?n.visit(n.SOURCE,i):(n.visit(n.ADD,i),n.visit(n.REM,s)),this._finish(n,c)},_parameterCheck(t,n){let e=!1;return(t.modified("stopwords")||!this._stop)&&(this._stop=new RegExp("^"+(t.stopwords||"")+"$","i"),e=!0),(t.modified("pattern")||!this._match)&&(this._match=new RegExp(t.pattern||"[\\w']+","g"),e=!0),(t.modified("field")||n.modified(t.field.fields))&&(e=!0),e&&(this._counts={}),e},_finish(t,n){const e=this._counts,o=this._tuples||(this._tuples={}),f=n[0],r=n[1],a=t.fork(t.NO_SOURCE|t.NO_FIELDS);let l,c,i;for(l in e)c=o[l],i=e[l]||0,!c&&i?(o[l]=c=ro({}),c[f]=l,c[r]=i,a.add.push(c)):i===0?(c&&a.rem.push(c),e[l]=null,o[l]=null):c[r]!==i&&(c[r]=i,a.mod.push(c));return a.modifies(n)}});function x6(t){_r.call(this,null,t)}x6.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]};ni(x6,_r,{transform(t,n){const e=n.fork(n.NO_SOURCE),o=t.as||["a","b"],f=o[0],r=o[1],a=!this.value||n.changed(n.ADD_REM)||t.modified("as")||t.modified("filter");let l=this.value;return a?(l&&(e.rem=l),l=n.materialize(n.SOURCE).source,e.add=this.value=oJ(l,f,r,t.filter||mc)):e.mod=l,e.source=this.value,e.modifies(o)}});function oJ(t,n,e,o){for(var f=[],r={},a=t.length,l=0,c,i;lqz(r,n))):typeof o[f]===t7&&o[f](t[f]);return o}function b6(t){_r.call(this,null,t)}const Hz=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:!0},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}],uJ={key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:Hz},{name:"weights",type:"number",array:!0}]};b6.Definition={type:"Density",metadata:{generates:!0},params:[{name:"extent",type:"number",array:!0,length:2},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"method",type:"string",default:"pdf",values:["pdf","cdf"]},{name:"distribution",type:"param",params:Hz.concat(uJ)},{name:"as",type:"string",array:!0,default:["value","density"]}]};ni(b6,_r,{transform(t,n){const e=n.fork(n.NO_SOURCE|n.NO_FIELDS);if(!this.value||n.changed()||t.modified()){const o=qz(t.distribution,cJ(n)),f=t.steps||t.minsteps||25,r=t.steps||t.maxsteps||200;let a=t.method||"pdf";a!=="pdf"&&a!=="cdf"&&Pr("Invalid density method: "+a),!t.extent&&!o.data&&Pr("Missing density extent parameter."),a=o[a];const l=t.as||["value","density"],c=t.extent||Zf(o.data()),i=cw(a,c,f,r).map(s=>{const u={};return u[l[0]]=s[0],u[l[1]]=s[1],ro(u)});this.value&&(e.rem=this.value),this.value=e.add=e.source=i}return e}});function cJ(t){return()=>t.materialize(t.SOURCE).source}function $z(t,n){return t?t.map((e,o)=>n[o]||xs(e)):null}function _6(t,n,e){const o=[],f=u=>u(c);let r,a,l,c,i,s;if(n==null)o.push(t.map(e));else for(r={},a=0,l=t.length;aMy(Zf(t,n))/30;ni(w6,_r,{transform(t,n){if(this.value&&!(t.modified()||n.changed()))return n;const e=n.materialize(n.SOURCE).source,o=_6(n.source,t.groupby,Hl),f=t.smooth||!1,r=t.field,a=t.step||fJ(e,r),l=q0((m,g)=>r(m)-r(g)),c=t.as||Gz,i=o.length;let s=1/0,u=-1/0,d=0,h;for(;du&&(u=g),m[++h][c]=g}return this.value={start:s,stop:u,step:a},n.reflow(!0).modifies(c)}});function Wz(t){Co.call(this,null,hJ,t),this.modified(!0)}ni(Wz,Co);function hJ(t){const n=t.expr;return this.value&&!t.modified("expr")?this.value:Nu(e=>n(e,t),Bl(n),xs(n))}function k6(t){_r.call(this,[void 0,void 0],t)}k6.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]};ni(k6,_r,{transform(t,n){const e=this.value,o=t.field,f=n.changed()||n.modified(o.fields)||t.modified("field");let r=e[0],a=e[1];if((f||r==null)&&(r=1/0,a=-1/0),n.visit(f?n.SOURCE:n.ADD,l=>{const c=Rl(o(l));c!=null&&(ca&&(a=c))}),!Number.isFinite(r)||!Number.isFinite(a)){let l=xs(o);l&&(l=' for field "'.concat(l,'"')),n.dataflow.warn("Infinite extent".concat(l,": [").concat(r,", ").concat(a,"]")),r=a=void 0}this.value=[r,a]}});function T6(t,n){Co.call(this,t),this.parent=n,this.count=0}ni(T6,Co,{connect(t){return this.detachSubflow=t.detachSubflow,this.targets().add(t),t.source=this},add(t){this.count+=1,this.value.add.push(t)},rem(t){this.count-=1,this.value.rem.push(t)},mod(t){this.value.mod.push(t)},init(t){this.value.init(t,t.NO_SOURCE)},evaluate(){return this.value}});function fw(t){_r.call(this,{},t),this._keys=qm();const n=this._targets=[];n.active=0,n.forEach=e=>{for(let o=0,f=n.active;oo&&o.count>0);this.initTargets(e)}},initTargets(t){const n=this._targets,e=n.length,o=t?t.length:0;let f=0;for(;fthis.subflow(c,f,n);return this._group=t.group||{},this.initTargets(),n.visit(n.REM,c=>{const i=$i(c),s=r.get(i);s!==void 0&&(r.delete(i),l(s).rem(c))}),n.visit(n.ADD,c=>{const i=o(c);r.set($i(c),i),l(i).add(c)}),a||n.modified(o.fields)?n.visit(n.MOD,c=>{const i=$i(c),s=r.get(i),u=o(c);s===u?l(u).mod(c):(r.set(i,u),l(s).rem(c),l(u).add(c))}):n.changed(n.MOD)&&n.visit(n.MOD,c=>{l(r.get($i(c))).mod(c)}),a&&n.visit(n.REFLOW,c=>{const i=$i(c),s=r.get(i),u=o(c);s!==u&&(r.set(i,u),l(s).rem(c),l(u).add(c))}),n.clean()?e.runAfter(()=>{this.clean(),r.clean()}):r.empty>e.cleanThreshold&&e.runAfter(r.clean),n}});function Yz(t){Co.call(this,null,dJ,t)}ni(Yz,Co);function dJ(t){return this.value&&!t.modified()?this.value:Ir(t.name)?ki(t.name).map(n=>Lu(n)):Lu(t.name,t.as)}function A6(t){_r.call(this,qm(),t)}A6.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]};ni(A6,_r,{transform(t,n){const e=n.dataflow,o=this.value,f=n.fork(),r=f.add,a=f.rem,l=f.mod,c=t.expr;let i=!0;n.visit(n.REM,u=>{const d=$i(u);o.has(d)?o.delete(d):a.push(u)}),n.visit(n.ADD,u=>{c(u,t)?r.push(u):o.set($i(u),1)});function s(u){const d=$i(u),h=c(u,t),m=o.get(d);h&&m?(o.delete(d),r.push(u)):!h&&!m?(o.set(d,1),a.push(u)):i&&h&&!m&&l.push(u)}return n.visit(n.MOD,s),t.modified()&&(i=!1,n.visit(n.REFLOW,s)),o.empty>e.cleanThreshold&&e.runAfter(o.clean),f}});function M6(t){_r.call(this,[],t)}M6.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]};ni(M6,_r,{transform(t,n){const e=n.fork(n.NO_SOURCE),o=t.fields,f=$z(o,t.as||[]),r=t.index||null,a=f.length;return e.rem=this.value,n.visit(n.SOURCE,l=>{const c=o.map(m=>m(l)),i=c.reduce((m,g)=>Math.max(m,g.length),0);let s=0,u,d,h;for(;s{for(let s=0,u;sa[o]=e(a,t))}});function Xz(t){_r.call(this,[],t)}ni(Xz,_r,{transform(t,n){const e=n.fork(n.ALL),o=t.generator;let f=this.value,r=t.size-f.length,a,l,c;if(r>0){for(a=[];--r>=0;)a.push(c=ro(o(t))),f.push(c);e.add=e.add.length?e.materialize(e.ADD).add.concat(a):a}else l=f.slice(0,-r),e.rem=e.rem.length?e.materialize(e.REM).rem.concat(l):l,f=f.slice(-r);return e.source=this.value=f,e}});const nb={value:"value",median:AI,mean:tY,min:lk,max:f0},pJ=[];function C6(t){_r.call(this,[],t)}C6.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]};function gJ(t){var n=t.method||nb.value,e;if(nb[n]==null)Pr("Unrecognized imputation method: "+n);else return n===nb.value?(e=t.value!==void 0?t.value:0,()=>e):nb[n]}function mJ(t){const n=t.field;return e=>e?n(e):NaN}ni(C6,_r,{transform(t,n){var e=n.fork(n.ALL),o=gJ(t),f=mJ(t),r=xs(t.field),a=xs(t.key),l=(t.groupby||[]).map(xs),c=vJ(n.source,t.groupby,t.key,t.keyvals),i=[],s=this.value,u=c.domain.length,d,h,m,g,p,v,y,x,w,k;for(p=0,x=c.length;pv(p),r=[],a=o?o.slice():[],l={},c={},i,s,u,d,h,m,g,p;for(a.forEach((v,y)=>l[v]=y+1),d=0,g=t.length;de.add(r))):(f=e.value=e.value||this.init(t),n.visit(n.REM,r=>e.rem(r)),n.visit(n.ADD,r=>e.add(r))),e.changes(),n.visit(n.SOURCE,r=>{pa(r,f[e.cellkey(r)].tuple)}),n.reflow(o).modifies(this._outputs)},changes(){const t=this._adds,n=this._mods;let e,o;for(e=0,o=this._alen;e{const m=i6(h,a)[l],g=t.counts?h.length:1,p=s||Zf(h);cw(m,p,u,d).forEach(v=>{const y={};for(let x=0;x(this._pending=ki(f.data),r=>r.touch(this)))}:e.request(t.url,t.format).then(o=>F5(this,n,ki(o.data)))}});function xJ(t){return t.modified("async")&&!(t.modified("values")||t.modified("url")||t.modified("format"))}function F5(t,n,e){e.forEach(ro);const o=n.fork(n.NO_FIELDS&n.NO_SOURCE);return o.rem=t.value,t.value=o.source=o.add=e,t._pending=null,o.rem.length&&o.clean(!0),o}function P6(t){_r.call(this,{},t)}P6.Definition={type:"Lookup",metadata:{modifies:!0},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:!0},{name:"key",type:"field",required:!0}]},{name:"values",type:"field",array:!0},{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0},{name:"default",default:null}]};ni(P6,_r,{transform(t,n){const e=t.fields,o=t.index,f=t.values,r=t.default==null?null:t.default,a=t.modified(),l=e.length;let c=a?n.SOURCE:n.ADD,i=n,s=t.as,u,d,h;return f?(d=f.length,l>1&&!s&&Pr('Multi-field lookup requires explicit "as" parameter.'),s&&s.length!==l*d&&Pr('The "as" parameter has too few output field names.'),s=s||f.map(xs),u=function(m){for(var g=0,p=0,v,y;gn.modified(m.fields)),c|=h?n.MOD:0),n.visit(c,u),i.modifies(s)}});function Kz(t){Co.call(this,null,bJ,t)}ni(Kz,Co);function bJ(t){if(this.value&&!t.modified())return this.value;const n=t.extents,e=n.length;let o=1/0,f=-1/0,r,a;for(r=0;rf&&(f=a[1]);return[o,f]}function Qz(t){Co.call(this,null,_J,t)}ni(Qz,Co);function _J(t){return this.value&&!t.modified()?this.value:t.values.reduce((n,e)=>n.concat(e),[])}function eR(t){_r.call(this,null,t)}ni(eR,_r,{transform(t,n){return this.modified(t.modified()),this.value=t,n.fork(n.NO_SOURCE|n.NO_FIELDS)}});function D6(t){Zd.call(this,t)}D6.Definition={type:"Pivot",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"value",type:"field",required:!0},{name:"op",type:"enum",values:Ly,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]};ni(D6,Zd,{_transform:Zd.prototype.transform,transform(t,n){return this._transform(wJ(t,n),n)}});function wJ(t,n){const e=t.field,o=t.value,f=(t.op==="count"?"__count__":t.op)||"sum",r=Bl(e).concat(Bl(o)),a=TJ(e,t.limit||0,n);return n.changed()&&t.set("__pivot__",null,null,!0),{key:t.key,groupby:t.groupby,ops:a.map(()=>f),fields:a.map(l=>kJ(l,e,o,r)),as:a.map(l=>l+""),modified:t.modified.bind(t)}}function kJ(t,n,e,o){return Nu(f=>n(f)===t?e(f):NaN,o,t+"")}function TJ(t,n,e){const o={},f=[];return e.visit(e.SOURCE,r=>{const a=t(r);o[a]||(o[a]=1,f.push(a))}),f.sort(K2),n?f.slice(0,n):f}function tR(t){fw.call(this,t)}ni(tR,fw,{transform(t,n){const e=t.subflow,o=t.field,f=r=>this.subflow($i(r),e,n,r);return(t.modified("field")||o&&n.modified(Bl(o)))&&Pr("PreFacet does not support field modification."),this.initTargets(),o?(n.visit(n.MOD,r=>{const a=f(r);o(r).forEach(l=>a.mod(l))}),n.visit(n.ADD,r=>{const a=f(r);o(r).forEach(l=>a.add(ro(l)))}),n.visit(n.REM,r=>{const a=f(r);o(r).forEach(l=>a.rem(l))})):(n.visit(n.MOD,r=>f(r).mod(r)),n.visit(n.ADD,r=>f(r).add(r)),n.visit(n.REM,r=>f(r).rem(r))),n.clean()&&n.runAfter(()=>this.clean()),n}});function I6(t){_r.call(this,null,t)}I6.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]};ni(I6,_r,{transform(t,n){const e=n.fork(n.NO_SOURCE),o=t.fields,f=$z(t.fields,t.as||[]),r=o?(l,c)=>AJ(l,c,o,f):rw;let a;return this.value?a=this.value:(n=n.addAll(),a=this.value={}),n.visit(n.REM,l=>{const c=$i(l);e.rem.push(a[c]),a[c]=null}),n.visit(n.ADD,l=>{const c=r(l,ro({}));a[$i(l)]=c,e.add.push(c)}),n.visit(n.MOD,l=>{e.mod.push(r(l,a[$i(l)]))}),e}});function AJ(t,n,e,o){for(let f=0,r=e.length;f{const d=QA(u,i);for(let h=0;h{const r=$i(f);e.rem.push(o[r]),o[r]=null}),n.visit(n.ADD,f=>{const r=ZA(f);o[$i(f)]=r,e.add.push(r)}),n.visit(n.MOD,f=>{const r=o[$i(f)];for(const a in f)r[a]=f[a],e.modifies(a);e.mod.push(r)})),e}});function R6(t){_r.call(this,[],t),this.count=0}R6.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]};ni(R6,_r,{transform(t,n){const e=n.fork(n.NO_SOURCE),o=t.modified("size"),f=t.size,r=this.value.reduce((s,u)=>(s[$i(u)]=1,s),{});let a=this.value,l=this.count,c=0;function i(s){let u,d;a.length=c&&(u=a[d],r[$i(u)]&&e.rem.push(u),a[d]=s)),++l}if(n.rem.length&&(n.visit(n.REM,s=>{const u=$i(s);r[u]&&(r[u]=-1,e.rem.push(s)),--l}),a=a.filter(s=>r[$i(s)]!==-1)),(n.rem.length||o)&&a.length{r[$i(s)]||i(s)}),c=-1),o&&a.length>f){const s=a.length-f;for(let u=0;u{r[$i(s)]&&e.mod.push(s)}),n.add.length&&n.visit(n.ADD,i),(n.add.length||c<0)&&(e.add=a.filter(s=>!r[$i(s)])),this.count=l,this.value=e.source=a,e}});function F6(t){_r.call(this,null,t)}F6.Definition={type:"Sequence",metadata:{generates:!0,changes:!0},params:[{name:"start",type:"number",required:!0},{name:"stop",type:"number",required:!0},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]};ni(F6,_r,{transform(t,n){if(this.value&&!t.modified())return;const e=n.materialize().fork(n.MOD),o=t.as||"data";return e.rem=this.value?n.rem.concat(this.value):n.rem,this.value=Ju(t.start,t.stop,t.step||1).map(f=>{const r={};return r[o]=f,ro(r)}),e.add=n.add.concat(this.value),e}});function iR(t){_r.call(this,null,t),this.modified(!0)}ni(iR,_r,{transform(t,n){return this.value=n.source,n.changed()?n.fork(n.NO_SOURCE|n.NO_FIELDS):n.StopPropagation}});function N6(t){_r.call(this,null,t)}const aR=["unit0","unit1"];N6.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:UA,array:!0},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:!0},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:!0,length:2,default:aR}]};ni(N6,_r,{transform(t,n){const e=t.field,o=t.interval!==!1,f=t.timezone==="utc",r=this._floor(t,n),a=(f?$m:Hm)(r.unit).offset,l=t.as||aR,c=l[0],i=l[1],s=r.step;let u=r.start||1/0,d=r.stop||-1/0,h=n.ADD;return(t.modified()||n.changed(n.REM)||n.modified(Bl(e)))&&(n=n.reflow(!0),h=n.SOURCE,u=1/0,d=-1/0),n.visit(h,m=>{const g=e(m);let p,v;g==null?(m[c]=null,o&&(m[i]=null)):(m[c]=p=v=r(g),o&&(m[i]=v=a(p,s)),pd&&(d=v))}),r.start=u,r.stop=d,n.modifies(o?l:c)},_floor(t,n){const e=t.timezone==="utc",{units:o,step:f}=t.units?{units:t.units,step:t.step||1}:XI({extent:t.extent||Zf(n.materialize(n.SOURCE).source,t.field),maxbins:t.maxbins}),r=VA(o),a=this.value||{},l=(e?jI:BI)(r,f);return l.unit=Na(r),l.units=r,l.step=f,l.start=a.start,l.stop=a.stop,this.value=l}});function oR(t){_r.call(this,qm(),t)}ni(oR,_r,{transform(t,n){const e=n.dataflow,o=t.field,f=this.value,r=l=>f.set(o(l),l);let a=!0;return t.modified("field")||n.modified(o.fields)?(f.clear(),n.visit(n.SOURCE,r)):n.changed()?(n.visit(n.REM,l=>f.delete(o(l))),n.visit(n.ADD,r)):a=!1,this.modified(a),f.empty>e.cleanThreshold&&e.runAfter(f.clean),n.fork()}});function sR(t){_r.call(this,null,t)}ni(sR,_r,{transform(t,n){(!this.value||t.modified("field")||t.modified("sort")||n.changed()||t.sort&&n.modified(t.sort.fields))&&(this.value=(t.sort?n.source.slice().sort(q0(t.sort)):n.source).map(t.field))}});function SJ(t,n,e,o){const f=Xv[t](n,e);return{init:f.init||Td,update:function(r,a){a[o]=f.next(r)}}}const Xv={row_number:function(){return{next:t=>t.index+1}},rank:function(){let t;return{init:()=>t=1,next:n=>{const e=n.index,o=n.data;return e&&n.compare(o[e-1],o[e])?t=e+1:t}}},dense_rank:function(){let t;return{init:()=>t=1,next:n=>{const e=n.index,o=n.data;return e&&n.compare(o[e-1],o[e])?++t:t}}},percent_rank:function(){const t=Xv.rank(),n=t.next;return{init:t.init,next:e=>(n(e)-1)/(e.data.length-1)}},cume_dist:function(){let t;return{init:()=>t=0,next:n=>{const e=n.data,o=n.compare;let f=n.index;if(t0||Pr("ntile num must be greater than zero.");const e=Xv.cume_dist(),o=e.next;return{init:e.init,next:f=>Math.ceil(n*o(f))}},lag:function(t,n){return n=+n||1,{next:e=>{const o=e.index-n;return o>=0?t(e.data[o]):null}}},lead:function(t,n){return n=+n||1,{next:e=>{const o=e.index+n,f=e.data;return ot(n.data[n.i0])}},last_value:function(t){return{next:n=>t(n.data[n.i1-1])}},nth_value:function(t,n){return n=+n,n>0||Pr("nth_value nth must be greater than zero."),{next:e=>{const o=e.i0+(n-1);return on=null,next:e=>{const o=t(e.data[e.index]);return o!=null?n=o:n}}},next_value:function(t){let n,e;return{init:()=>(n=null,e=-1),next:o=>{const f=o.data;return o.index<=e?n:(e=EJ(t,f,o.index))<0?(e=f.length,n=null):n=t(f[e])}}}};function EJ(t,n,e){for(let o=n.length;el[m]=1)}d(t.sort),n.forEach((h,m)=>{const g=e[m],p=xs(g),v=Fz(h,p,f[m]);if(d(g),r.push(v),qi(Xv,h))a.push(SJ(h,e[m],o[m],v));else{if(g==null&&h!=="count"&&Pr("Null aggregate field specified."),h==="count"){i.push(v);return}u=!1;let y=c[p];y||(y=c[p]=[],y.field=g,s.push(y)),y.push(Nz(h,v))}}),(i.length||s.length)&&(this.cell=OJ(s,i,u)),this.inputs=Object.keys(l)}const uR=lR.prototype;uR.init=function(){this.windows.forEach(t=>t.init()),this.cell&&this.cell.init()};uR.update=function(t,n){const e=this.cell,o=this.windows,f=t.data,r=o&&o.length;let a;if(e){for(a=t.p0;ajz(c,c.field));const o={num:0,agg:null,store:!1,count:n};if(!e)for(var f=t.length,r=o.agg=Array(f),a=0;athis.group(f(l));let a=this.state;(!a||e)&&(a=this.state=new lR(t)),e||n.modified(a.inputs)?(this.value={},n.visit(n.SOURCE,l=>r(l).add(l))):(n.visit(n.REM,l=>r(l).remove(l)),n.visit(n.ADD,l=>r(l).add(l)));for(let l=0,c=this._mlen;l0&&!f(r[e],r[e-1])&&(t.i0=n.left(r,r[e])),o1?0:t<-1?cm:Math.acos(t)}function r7(t){return t>=1?__:t<=-1?-__:Math.asin(t)}function FJ(t){return t.innerRadius}function NJ(t){return t.outerRadius}function BJ(t){return t.startAngle}function jJ(t){return t.endAngle}function UJ(t){return t&&t.padAngle}function VJ(t,n,e,o,f,r,a,l){var c=e-t,i=o-n,s=a-f,u=l-r,d=u*c-s*i;if(!(d*dO*O+R*R&&(_=A,S=M),{cx:_,cy:S,x01:-s,y01:-u,x11:_*(f/k-1),y11:S*(f/k-1)}}function qJ(){var t=FJ,n=NJ,e=Yo(0),o=null,f=BJ,r=jJ,a=UJ,l=null;function c(){var i,s,u=+t.apply(this,arguments),d=+n.apply(this,arguments),h=f.apply(this,arguments)-__,m=r.apply(this,arguments)-__,g=n7(m-h),p=m>h;if(l||(l=i=Nm()),dLl))l.moveTo(0,0);else if(g>cR-Ll)l.moveTo(d*Bp(h),d*Sf(h)),l.arc(0,0,d,h,m,!p),u>Ll&&(l.moveTo(u*Bp(m),u*Sf(m)),l.arc(0,0,u,m,h,p));else{var v=h,y=m,x=h,w=m,k=g,b=g,T=a.apply(this,arguments)/2,_=T>Ll&&(o?+o.apply(this,arguments):a0(u*u+d*d)),S=N5(n7(d-u)/2,+e.apply(this,arguments)),A=S,M=S,E,D;if(_>Ll){var O=r7(_/u*Sf(T)),R=r7(_/d*Sf(T));(k-=O*2)>Ll?(O*=p?1:-1,x+=O,w-=O):(k=0,x=w=(h+m)/2),(b-=R*2)>Ll?(R*=p?1:-1,v+=R,y-=R):(b=0,v=y=(h+m)/2)}var z=d*Bp(v),L=d*Sf(v),P=u*Bp(w),N=u*Sf(w);if(S>Ll){var B=d*Bp(y),G=d*Sf(y),W=u*Bp(x),K=u*Sf(x),te;if(gLl?M>Ll?(E=rb(W,K,z,L,d,M,p),D=rb(B,G,P,N,d,M,p),l.moveTo(E.cx+E.x01,E.cy+E.y01),MLl)||!(k>Ll)?l.lineTo(P,N):A>Ll?(E=rb(P,N,B,G,u,-A,p),D=rb(z,L,W,K,u,-A,p),l.lineTo(E.cx+E.x01,E.cy+E.y01),A=d;--h)l.point(y[h],x[h]);l.lineEnd(),l.areaEnd()}p&&(y[u]=+t(g,u,s),x[u]=+n(g,u,s),l.point(o?+o(g,u,s):y[u],e?+e(g,u,s):x[u]))}if(v)return l=null,v+""||null}function i(){return jD().defined(f).curve(a).context(r)}return c.x=function(s){return arguments.length?(t=typeof s=="function"?s:Yo(+s),o=null,c):t},c.x0=function(s){return arguments.length?(t=typeof s=="function"?s:Yo(+s),c):t},c.x1=function(s){return arguments.length?(o=s==null?null:typeof s=="function"?s:Yo(+s),c):o},c.y=function(s){return arguments.length?(n=typeof s=="function"?s:Yo(+s),e=null,c):n},c.y0=function(s){return arguments.length?(n=typeof s=="function"?s:Yo(+s),c):n},c.y1=function(s){return arguments.length?(e=s==null?null:typeof s=="function"?s:Yo(+s),c):e},c.lineX0=c.lineY0=function(){return i().x(t).y(n)},c.lineY1=function(){return i().x(t).y(e)},c.lineX1=function(){return i().x(o).y(n)},c.defined=function(s){return arguments.length?(f=typeof s=="function"?s:Yo(!!s),c):f},c.curve=function(s){return arguments.length?(a=s,r!=null&&(l=a(r)),c):a},c.context=function(s){return arguments.length?(s==null?r=l=null:l=a(r=s),c):r},c}var HJ={draw(t,n){const e=a0(n/cm);t.moveTo(e,0),t.arc(0,0,e,0,cR)}};function $J(t,n){let e=null;t=typeof t=="function"?t:Yo(t||HJ),n=typeof n=="function"?n:Yo(n===void 0?64:+n);function o(){let f;if(e||(e=f=Nm()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),f)return e=null,f+""||null}return o.type=function(f){return arguments.length?(t=typeof f=="function"?f:Yo(f),o):t},o.size=function(f){return arguments.length?(n=typeof f=="function"?f:Yo(+f),o):n},o.context=function(f){return arguments.length?(e=f??null,o):e},o}function Jd(){}function w_(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function hw(t){this._context=t}hw.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:w_(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(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);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:w_(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function GJ(t){return new hw(t)}function hR(t){this._context=t}hR.prototype={areaStart:Jd,areaEnd:Jd,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(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:w_(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function WJ(t){return new hR(t)}function dR(t){this._context=t}dR.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(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,o=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,o):this._context.moveTo(e,o);break;case 3:this._point=4;default:w_(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function YJ(t){return new dR(t)}function pR(t,n){this._basis=new hw(t),this._beta=n}pR.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var o=t[0],f=n[0],r=t[e]-o,a=n[e]-f,l=-1,c;++l<=e;)c=l/e,this._basis.point(this._beta*t[l]+(1-this._beta)*(o+c*r),this._beta*n[l]+(1-this._beta)*(f+c*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var XJ=function t(n){function e(o){return n===1?new hw(o):new pR(o,n)}return e.beta=function(o){return t(+o)},e}(.85);function k_(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function j6(t,n){this._context=t,this._k=(1-n)/6}j6.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:k_(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:k_(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var ZJ=function t(n){function e(o){return new j6(o,n)}return e.tension=function(o){return t(+o)},e}(0);function U6(t,n){this._context=t,this._k=(1-n)/6}U6.prototype={areaStart:Jd,areaEnd:Jd,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(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:k_(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var JJ=function t(n){function e(o){return new U6(o,n)}return e.tension=function(o){return t(+o)},e}(0);function V6(t,n){this._context=t,this._k=(1-n)/6}V6.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(t,n){switch(t=+t,n=+n,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:k_(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var KJ=function t(n){function e(o){return new V6(o,n)}return e.tension=function(o){return t(+o)},e}(0);function q6(t,n,e){var o=t._x1,f=t._y1,r=t._x2,a=t._y2;if(t._l01_a>Ll){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);o=(o*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,f=(f*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Ll){var i=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);r=(r*i+t._x1*t._l23_2a-n*t._l12_2a)/s,a=(a*i+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(o,f,r,a,t._x2,t._y2)}function gR(t,n){this._context=t,this._alpha=n}gR.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(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,o=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+o*o,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:q6(this,t,n);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var QJ=function t(n){function e(o){return n?new gR(o,n):new j6(o,0)}return e.alpha=function(o){return t(+o)},e}(.5);function mR(t,n){this._context=t,this._alpha=n}mR.prototype={areaStart:Jd,areaEnd:Jd,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(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,o=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+o*o,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:q6(this,t,n);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var eK=function t(n){function e(o){return n?new mR(o,n):new U6(o,0)}return e.alpha=function(o){return t(+o)},e}(.5);function vR(t,n){this._context=t,this._alpha=n}vR.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(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,o=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+o*o,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:q6(this,t,n);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var tK=function t(n){function e(o){return n?new vR(o,n):new V6(o,0)}return e.alpha=function(o){return t(+o)},e}(.5);function yR(t){this._context=t}yR.prototype={areaStart:Jd,areaEnd:Jd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};function nK(t){return new yR(t)}function i7(t){return t<0?-1:1}function a7(t,n,e){var o=t._x1-t._x0,f=n-t._x1,r=(t._y1-t._y0)/(o||f<0&&-0),a=(e-t._y1)/(f||o<0&&-0),l=(r*f+a*o)/(o+f);return(i7(r)+i7(a))*Math.min(Math.abs(r),Math.abs(a),.5*Math.abs(l))||0}function o7(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function B5(t,n,e){var o=t._x0,f=t._y0,r=t._x1,a=t._y1,l=(r-o)/3;t._context.bezierCurveTo(o+l,f+l*n,r-l,a-l*e,r,a)}function T_(t){this._context=t}T_.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:B5(this,this._t0,o7(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(t=+t,n=+n,!(t===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,B5(this,o7(this,e=a7(this,t,n)),e);break;default:B5(this,this._t0,e=a7(this,t,n));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}};function xR(t){this._context=new bR(t)}(xR.prototype=Object.create(T_.prototype)).point=function(t,n){T_.prototype.point.call(this,n,t)};function bR(t){this._context=t}bR.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,o,f,r){this._context.bezierCurveTo(n,t,o,e,r,f)}};function rK(t){return new T_(t)}function iK(t){return new xR(t)}function _R(t){this._context=t}_R.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),e===2)this._context.lineTo(t[1],n[1]);else for(var o=s7(t),f=s7(n),r=0,a=1;a=0;--n)f[n]=(a[n]-f[n+1])/r[n];for(r[e-1]=(t[e]+f[e-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}break}}this._x=t,this._y=n}};function oK(t){return new dw(t,.5)}function sK(t){return new dw(t,0)}function lK(t){return new dw(t,1)}function qd(t,n){if(typeof document<"u"&&document.createElement){const e=document.createElement("canvas");if(e&&e.getContext)return e.width=t,e.height=n,e}return null}const uK=()=>typeof Image<"u"?Image:null,kk=Symbol("implicit");function H6(){var t=new CC,n=[],e=[],o=kk;function f(r){let a=t.get(r);if(a===void 0){if(o!==kk)return o;t.set(r,a=n.push(r)-1)}return e[a%e.length]}return f.domain=function(r){if(!arguments.length)return n.slice();n=[],t=new CC;for(const a of r)t.has(a)||t.set(a,n.push(a)-1);return f},f.range=function(r){return arguments.length?(e=Array.from(r),f):e.slice()},f.unknown=function(r){return arguments.length?(o=r,f):o},f.copy=function(){return H6(n,e).unknown(o)},Yh.apply(f,arguments),f}const wR=Math.PI/180,kR=180/Math.PI,A_=18,TR=.96422,AR=1,MR=.82521,SR=4/29,Qg=6/29,ER=3*Qg*Qg,cK=Qg*Qg*Qg;function CR(t){if(t instanceof qf)return new qf(t.l,t.a,t.b,t.opacity);if(t instanceof Fh)return OR(t);t instanceof H2||(t=VD(t));var n=q5(t.r),e=q5(t.g),o=q5(t.b),f=j5((.2225045*n+.7168786*e+.0606169*o)/AR),r,a;return n===e&&e===o?r=a=f:(r=j5((.4360747*n+.3850649*e+.1430804*o)/TR),a=j5((.0139322*n+.0971045*e+.7141733*o)/MR)),new qf(116*f-16,500*(r-f),200*(f-a),t.opacity)}function M_(t,n,e,o){return arguments.length===1?CR(t):new qf(t,n,e,o??1)}function qf(t,n,e,o){this.l=+t,this.a=+n,this.b=+e,this.opacity=+o}vA(qf,M_,yA(xA,{brighter:function(t){return new qf(this.l+A_*(t??1),this.a,this.b,this.opacity)},darker:function(t){return new qf(this.l-A_*(t??1),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return n=TR*U5(n),t=AR*U5(t),e=MR*U5(e),new H2(V5(3.1338561*n-1.6168667*t-.4906146*e),V5(-.9787684*n+1.9161415*t+.033454*e),V5(.0719453*n-.2289914*t+1.4052427*e),this.opacity)}}));function j5(t){return t>cK?Math.pow(t,1/3):t/ER+SR}function U5(t){return t>Qg?t*t*t:ER*(t-SR)}function V5(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function q5(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function fK(t){if(t instanceof Fh)return new Fh(t.h,t.c,t.l,t.opacity);if(t instanceof qf||(t=CR(t)),t.a===0&&t.b===0)return new Fh(NaN,0180?s+=360:s-i>180&&(i+=360),d.push({i:u.push(f(u)+"rotate(",null,o)-2,x:Zp(i,s)})):s&&u.push(f(u)+"rotate("+s+o)}function l(i,s,u,d){i!==s?d.push({i:u.push(f(u)+"skewX(",null,o)-2,x:Zp(i,s)}):s&&u.push(f(u)+"skewX("+s+o)}function c(i,s,u,d,h,m){if(i!==u||s!==d){var g=h.push(f(h)+"scale(",null,",",null,")");m.push({i:g-4,x:Zp(i,u)},{i:g-2,x:Zp(s,d)})}else(u!==1||d!==1)&&h.push(f(h)+"scale("+u+","+d+")")}return function(i,s){var u=[],d=[];return i=t(i),s=t(s),r(i.translateX,i.translateY,s.translateX,s.translateY,u,d),a(i.rotate,s.rotate,u,d),l(i.skewX,s.skewX,u,d),c(i.scaleX,i.scaleY,s.scaleX,s.scaleY,u,d),i=s=null,function(h){for(var m=-1,g=d.length,p;++mMath.pow(t,n)}function RK(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),n=>Math.log(n)/t)}function g7(t){return(n,e)=>-t(-n,e)}function Y6(t){const n=t(d7,p7),e=n.domain;let o=10,f,r;function a(){return f=RK(o),r=zK(o),e()[0]<0?(f=g7(f),r=g7(r),t(PK,DK)):t(d7,p7),n}return n.base=function(l){return arguments.length?(o=+l,a()):o},n.domain=function(l){return arguments.length?(e(l),a()):e()},n.ticks=l=>{const c=e();let i=c[0],s=c[c.length-1];const u=s0){for(;d<=h;++d)for(m=1;ms)break;v.push(g)}}else for(;d<=h;++d)for(m=o-1;m>=1;--m)if(g=d>0?m/r(-d):m*r(d),!(gs)break;v.push(g)}v.length*2{if(l==null&&(l=10),c==null&&(c=o===10?"s":","),typeof c!="function"&&(!(o%1)&&(c=Q4(c)).precision==null&&(c.trim=!0),c=BD(c)),l===1/0)return c;const i=Math.max(1,o*l/n.ticks().length);return s=>{let u=s/r(Math.round(f(s)));return u*oe(NR(e(),{floor:l=>r(Math.floor(f(l))),ceil:l=>r(Math.ceil(f(l)))})),n}function BR(){const t=Y6(bA()).domain([1,10]);return t.copy=()=>W2(t,BR()).base(t.base()),Yh.apply(t,arguments),t}function m7(t){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/t))}}function v7(t){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*t}}function X6(t){var n=1,e=t(m7(n),v7(n));return e.constant=function(o){return arguments.length?t(m7(n=+o),v7(n)):n},Bm(e)}function jR(){var t=X6(bA());return t.copy=function(){return W2(t,jR()).constant(t.constant())},Yh.apply(t,arguments)}function y7(t){return function(n){return n<0?-Math.pow(-n,t):Math.pow(n,t)}}function FK(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function NK(t){return t<0?-t*t:t*t}function Z6(t){var n=t(Md,Md),e=1;function o(){return e===1?t(Md,Md):e===.5?t(FK,NK):t(y7(e),y7(1/e))}return n.exponent=function(f){return arguments.length?(e=+f,o()):e},Bm(n)}function J6(){var t=Z6(bA());return t.copy=function(){return W2(t,J6()).exponent(t.exponent())},Yh.apply(t,arguments),t}function BK(){return J6.apply(null,arguments).exponent(.5)}function UR(){var t=[],n=[],e=[],o;function f(){var a=0,l=Math.max(1,n.length);for(e=new Array(l-1);++a0?e[l-1]:t[0],l=e?[o[e-1],n]:[o[i-1],o[i]]},a.unknown=function(c){return arguments.length&&(r=c),a},a.thresholds=function(){return o.slice()},a.copy=function(){return VR().domain([t,n]).range(f).unknown(r)},Yh.apply(Bm(a),arguments)}function qR(){var t=[.5],n=[0,1],e,o=1;function f(r){return r!=null&&r<=r?n[Y2(t,r,0,o)]:e}return f.domain=function(r){return arguments.length?(t=Array.from(r),o=Math.min(t.length,n.length-1),f):t.slice()},f.range=function(r){return arguments.length?(n=Array.from(r),o=Math.min(t.length,n.length-1),f):n.slice()},f.invertExtent=function(r){var a=n.indexOf(r);return[t[a-1],t[a]]},f.unknown=function(r){return arguments.length?(e=r,f):e},f.copy=function(){return qR().domain(t).range(n).unknown(e)},Yh.apply(f,arguments)}function jK(t){return new Date(t)}function UK(t){return t instanceof Date?+t:+new Date(+t)}function K6(t,n,e,o,f,r,a,l,c,i){var s=oW(),u=s.invert,d=s.domain,h=i(".%L"),m=i(":%S"),g=i("%I:%M"),p=i("%I %p"),v=i("%a %d"),y=i("%b %d"),x=i("%B"),w=i("%Y");function k(b){return(c(b)0?o:1:0}const GK="identity",fm="linear",$h="log",Py="pow",Dy="sqrt",vw="symlog",_0="time",w0="utc",Hf="sequential",Wm="diverging",hm="quantile",yw="quantize",xw="threshold",rM="ordinal",Mk="point",XR="band",iM="bin-ordinal",Xs="continuous",Iy="discrete",zy="discretizing",kc="interpolating",aM="temporal";function WK(t){return function(n){let e=n[0],o=n[1],f;return o=o&&e[c]<=f&&(r<0&&(r=c),a=c);if(!(r<0))return o=t.invertExtent(e[r]),f=t.invertExtent(e[a]),[o[0]===void 0?o[1]:o[0],f[1]===void 0?f[0]:f[1]]}}function oM(){const t=H6().unknown(void 0),n=t.domain,e=t.range;let o=[0,1],f,r,a=!1,l=0,c=0,i=.5;delete t.unknown;function s(){const u=n().length,d=o[1]g+f*v);return e(d?p.reverse():p)}return t.domain=function(u){return arguments.length?(n(u),s()):n()},t.range=function(u){return arguments.length?(o=[+u[0],+u[1]],s()):o.slice()},t.rangeRound=function(u){return o=[+u[0],+u[1]],a=!0,s()},t.bandwidth=function(){return r},t.step=function(){return f},t.round=function(u){return arguments.length?(a=!!u,s()):a},t.padding=function(u){return arguments.length?(c=Math.max(0,Math.min(1,u)),l=c,s()):l},t.paddingInner=function(u){return arguments.length?(l=Math.max(0,Math.min(1,u)),s()):l},t.paddingOuter=function(u){return arguments.length?(c=Math.max(0,Math.min(1,u)),s()):c},t.align=function(u){return arguments.length?(i=Math.max(0,Math.min(1,u)),s()):i},t.invertRange=function(u){if(u[0]==null||u[1]==null)return;const d=o[1]o[1-d])))return v=Math.max(0,tk(h,g)-1),y=g===p?v:tk(h,p)-1,g-h[v]>r+1e-10&&++v,d&&(x=v,v=m-y,y=m-x),v>y?void 0:n().slice(v,y+1)},t.invert=function(u){const d=t.invertRange([u,u]);return d&&d[0]},t.copy=function(){return oM().domain(n()).range(o).round(a).paddingInner(l).paddingOuter(c).align(i)},s()}function ZR(t){const n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,t.copy=function(){return ZR(n())},t}function XK(){return ZR(oM().paddingInner(1))}var ZK=Array.prototype.map;function JK(t){return ZK.call(t,Rl)}const KK=Array.prototype.slice;function JR(){let t=[],n=[];function e(o){return o==null||o!==o?void 0:n[(Y2(t,o)-1)%n.length]}return e.domain=function(o){return arguments.length?(t=JK(o),e):t.slice()},e.range=function(o){return arguments.length?(n=KK.call(o),e):n.slice()},e.tickFormat=function(o,f){return lW(t[0],Na(t),o??10,f)},e.copy=function(){return JR().domain(e.domain()).range(e.range())},e}const E_={};function QK(t,n,e){const o=function(){const r=n();return r.invertRange||(r.invertRange=r.invert?WK(r):r.invertExtent?YK(r):void 0),r.type=t,r};return o.metadata=uf(ki(e)),o}function Xa(t,n,e){return arguments.length>1?(E_[t]=QK(t,n,e),this):KR(t)?E_[t]:void 0}Xa(GK,FR);Xa(fm,sW,Xs);Xa($h,BR,[Xs,$h]);Xa(Py,J6,Xs);Xa(Dy,BK,Xs);Xa(vw,jR,Xs);Xa(_0,VK,[Xs,aM]);Xa(w0,qK,[Xs,aM]);Xa(Hf,Q6,[Xs,kc]);Xa("".concat(Hf,"-").concat(fm),Q6,[Xs,kc]);Xa("".concat(Hf,"-").concat($h),HR,[Xs,kc,$h]);Xa("".concat(Hf,"-").concat(Py),eM,[Xs,kc]);Xa("".concat(Hf,"-").concat(Dy),HK,[Xs,kc]);Xa("".concat(Hf,"-").concat(vw),$R,[Xs,kc]);Xa("".concat(Wm,"-").concat(fm),GR,[Xs,kc]);Xa("".concat(Wm,"-").concat($h),WR,[Xs,kc,$h]);Xa("".concat(Wm,"-").concat(Py),tM,[Xs,kc]);Xa("".concat(Wm,"-").concat(Dy),$K,[Xs,kc]);Xa("".concat(Wm,"-").concat(vw),YR,[Xs,kc]);Xa(hm,UR,[zy,hm]);Xa(yw,VR,zy);Xa(xw,qR,zy);Xa(iM,JR,[Iy,zy]);Xa(rM,H6,Iy);Xa(XR,oM,Iy);Xa(Mk,XK,Iy);function KR(t){return qi(E_,t)}function $0(t,n){const e=E_[t];return e&&e.metadata[n]}function sM(t){return $0(t,Xs)}function dm(t){return $0(t,Iy)}function Sk(t){return $0(t,zy)}function QR(t){return $0(t,$h)}function eQ(t){return $0(t,aM)}function eF(t){return $0(t,kc)}function tF(t){return $0(t,hm)}const tQ=["clamp","base","constant","exponent"];function nF(t,n){const e=n[0],o=Na(n)-e;return function(f){return t(e+f*o)}}function bw(t,n,e){return W6(lM(n||"rgb",e),t)}function rF(t,n){const e=new Array(n),o=n+1;for(let f=0;ft[l]?a[l](t[l]()):0),a)}function lM(t,n){const e=LK[nQ(t)];return n!=null&&e&&e.gamma?e.gamma(n):e}function nQ(t){return"interpolate"+t.toLowerCase().split("-").map(n=>n[0].toUpperCase()+n.slice(1)).join("")}const rQ={blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},iQ={category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"};function aF(t){const n=t.length/6|0,e=new Array(n);for(let o=0;obw(aF(t)));function uM(t,n){return t=t&&t.toLowerCase(),arguments.length>1?(x7[t]=n,this):x7[t]}const qb="symbol",aQ="discrete",oQ="gradient",sQ=t=>Ir(t)?t.map(n=>String(n)):String(t),lQ=(t,n)=>t[1]-n[1],uQ=(t,n)=>n[1]-t[1];function cM(t,n,e){let o;return wo(n)&&(t.bins&&(n=Math.max(n,t.bins.length)),e!=null&&(n=Math.min(n,Math.floor(My(t.domain())/e||1)))),Ei(n)&&(o=n.step,n=n.interval),bi(n)&&(n=t.type===_0?Hm(n):t.type==w0?$m(n):Pr("Only time and utc scales accept interval strings."),o&&(n=n.every(o))),n}function sF(t,n,e){let o=t.range(),f=o[0],r=Na(o),a=lQ;if(f>r&&(o=r,r=f,f=o,a=uQ),f=Math.floor(f),r=Math.ceil(r),n=n.map(l=>[l,t(l)]).filter(l=>f<=l[1]&&l[1]<=r).sort(a).map(l=>l[0]),e>0&&n.length>1){const l=[n[0],Na(n)];for(;n.length>e&&n.length>=3;)n=n.filter((c,i)=>!(i%2));n.length<3&&(n=l)}return n}function fM(t,n){return t.bins?sF(t,t.bins):t.ticks?t.ticks(n):t.domain()}function lF(t,n,e,o,f,r){const a=n.type;let l=sQ;if(a===_0||f===_0)l=t.timeFormat(o);else if(a===w0||f===w0)l=t.utcFormat(o);else if(QR(a)){const c=t.formatFloat(o);if(r||n.bins)l=c;else{const i=uF(n,e,!1);l=s=>i(s)?c(s):""}}else if(n.tickFormat){const c=n.domain();l=t.formatSpan(c[0],c[c.length-1],e,o)}else o&&(l=t.format(o));return l}function uF(t,n,e){const o=fM(t,n),f=t.base(),r=Math.log(f),a=Math.max(1,f*n/o.length),l=c=>{let i=c/Math.pow(f,Math.round(Math.log(c)/r));return i*f1?o[1]-o[0]:o[0],a;for(a=1;aEk[t.type]||t.bins;function hF(t,n,e,o,f,r,a){const l=cF[n.type]&&r!==_0&&r!==w0?cQ(t,n,f):lF(t,n,e,f,r,a);return o===qb&&dQ(n)?pQ(l):o===aQ?gQ(l):mQ(l)}const pQ=t=>(n,e,o)=>{const f=b7(o[e+1],b7(o.max,1/0)),r=_7(n,t),a=_7(f,t);return r&&a?r+" \u2013 "+a:a?"< "+a:"\u2265 "+r},b7=(t,n)=>t??n,gQ=t=>(n,e)=>e?t(n):null,mQ=t=>n=>t(n),_7=(t,n)=>Number.isFinite(t)?n(t):null;function vQ(t){const n=t.domain(),e=n.length-1;let o=+n[0],f=+Na(n),r=f-o;if(t.type===xw){const a=e?r/e:.1;o-=a,f+=a,r=f-o}return a=>(a-o)/r}function yQ(t,n,e,o){const f=o||n.type;return bi(e)&&eQ(f)&&(e=e.replace(/%a/g,"%A").replace(/%b/g,"%B")),!e&&f===_0?t.timeFormat("%A, %d %B %Y, %X"):!e&&f===w0?t.utcFormat("%A, %d %B %Y, %X UTC"):hF(t,n,5,null,e,o,!0)}function dF(t,n,e){e=e||{};const o=Math.max(3,e.maxlen||7),f=yQ(t,n,e.format,e.formatType);if(Sk(n.type)){const r=fF(n).slice(1).map(f),a=r.length;return"".concat(a," boundar").concat(a===1?"y":"ies",": ").concat(r.join(", "))}else if(dm(n.type)){const r=n.domain(),a=r.length,l=a>o?r.slice(0,o-2).map(f).join(", ")+", ending with "+r.slice(-1).map(f):r.map(f).join(", ");return"".concat(a," value").concat(a===1?"":"s",": ").concat(l)}else{const r=n.domain();return"values from ".concat(f(r[0])," to ").concat(f(Na(r)))}}let pF=0;function xQ(){pF=0}const C_="p_";function hM(t){return t&&t.gradient}function gF(t,n,e){const o=t.gradient;let f=t.id,r=o==="radial"?C_:"";return f||(f=t.id="gradient_"+pF++,o==="radial"?(t.x1=Ef(t.x1,.5),t.y1=Ef(t.y1,.5),t.r1=Ef(t.r1,0),t.x2=Ef(t.x2,.5),t.y2=Ef(t.y2,.5),t.r2=Ef(t.r2,.5),r=C_):(t.x1=Ef(t.x1,0),t.y1=Ef(t.y1,0),t.x2=Ef(t.x2,1),t.y2=Ef(t.y2,0))),n[f]=t,"url("+(e||"")+"#"+r+f+")"}function Ef(t,n){return t??n}function mF(t,n){var e=[],o;return o={gradient:"linear",x1:t?t[0]:0,y1:t?t[1]:0,x2:n?n[0]:1,y2:n?n[1]:0,stops:e,stop:function(f,r){return e.push({offset:f,color:r}),o}}}const w7={basis:{curve:GJ},"basis-closed":{curve:WJ},"basis-open":{curve:YJ},bundle:{curve:XJ,tension:"beta",value:.85},cardinal:{curve:ZJ,tension:"tension",value:0},"cardinal-open":{curve:KJ,tension:"tension",value:0},"cardinal-closed":{curve:JJ,tension:"tension",value:0},"catmull-rom":{curve:QJ,tension:"alpha",value:.5},"catmull-rom-closed":{curve:eK,tension:"alpha",value:.5},"catmull-rom-open":{curve:tK,tension:"alpha",value:.5},linear:{curve:UD},"linear-closed":{curve:nK},monotone:{horizontal:iK,vertical:rK},natural:{curve:aK},step:{curve:oK},"step-after":{curve:lK},"step-before":{curve:sK}};function dM(t,n,e){var o=qi(w7,t)&&w7[t],f=null;return o&&(f=o.curve||o[n||"vertical"],o.tension&&e!=null&&(f=f[o.tension](e))),f}const bQ={m:2,l:2,h:1,v:1,z:0,c:6,s:4,q:4,t:2,a:7},_Q=/[mlhvzcsqta]([^mlhvzcsqta]+|$)/gi,wQ=/^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/,kQ=/^((\s+,?\s*)|(,\s*))/,TQ=/^[01]/;function pm(t){const n=[];return(t.match(_Q)||[]).forEach(o=>{let f=o[0];const r=f.toLowerCase(),a=bQ[r],l=AQ(r,a,o.slice(1).trim()),c=l.length;if(c1&&(g=Math.sqrt(g),e*=g,o*=g);const p=d/e,v=u/e,y=-u/o,x=d/o,w=p*l+v*c,k=y*l+x*c,b=p*t+v*n,T=y*t+x*n,_=(b-w)*(b-w)+(T-k)*(T-k);let S=1/_-.25;S<0&&(S=0);let A=Math.sqrt(S);r==f&&(A=-A);const M=.5*(w+b)-A*(T-k),E=.5*(k+T)+A*(b-w),D=Math.atan2(k-E,w-M);let R=Math.atan2(T-E,b-M)-D;R<0&&r===1?R+=Df:R>0&&r===0&&(R-=Df);const z=Math.ceil(Math.abs(R/(e0+.001))),L=[];for(let P=0;P+t}function ab(t,n,e){return Math.max(n,Math.min(t,e))}function xF(){var t=LQ,n=PQ,e=DQ,o=IQ,f=Th(0),r=f,a=f,l=f,c=null;function i(s,u,d){var h,m=u??+t.call(this,s),g=d??+n.call(this,s),p=+e.call(this,s),v=+o.call(this,s),y=Math.min(p,v)/2,x=ab(+f.call(this,s),0,y),w=ab(+r.call(this,s),0,y),k=ab(+a.call(this,s),0,y),b=ab(+l.call(this,s),0,y);if(c||(c=h=Nm()),x<=0&&w<=0&&k<=0&&b<=0)c.rect(m,g,p,v);else{var T=m+p,_=g+v;c.moveTo(m+x,g),c.lineTo(T-w,g),c.bezierCurveTo(T-pd*w,g,T,g+pd*w,T,g+w),c.lineTo(T,_-b),c.bezierCurveTo(T,_-pd*b,T-pd*b,_,T-b,_),c.lineTo(m+k,_),c.bezierCurveTo(m+pd*k,_,m,_-pd*k,m,_-k),c.lineTo(m,g+x),c.bezierCurveTo(m,g+pd*x,m+pd*x,g,m+x,g),c.closePath()}if(h)return c=null,h+""||null}return i.x=function(s){return arguments.length?(t=Th(s),i):t},i.y=function(s){return arguments.length?(n=Th(s),i):n},i.width=function(s){return arguments.length?(e=Th(s),i):e},i.height=function(s){return arguments.length?(o=Th(s),i):o},i.cornerRadius=function(s,u,d,h){return arguments.length?(f=Th(s),r=u!=null?Th(u):f,l=d!=null?Th(d):f,a=h!=null?Th(h):r,i):f},i.context=function(s){return arguments.length?(c=s??null,i):c},i}function bF(){var t,n,e,o,f=null,r,a,l,c;function i(u,d,h){const m=h/2;if(r){var g=l-d,p=u-a;if(g||p){var v=Math.sqrt(g*g+p*p),y=(g/=v)*c,x=(p/=v)*c,w=Math.atan2(p,g);f.moveTo(a-y,l-x),f.lineTo(u-g*m,d-p*m),f.arc(u,d,m,w-Math.PI,w),f.lineTo(a+y,l+x),f.arc(a,l,c,w,w+Math.PI)}else f.arc(u,d,m,0,Df);f.closePath()}else r=1;a=u,l=d,c=m}function s(u){var d,h=u.length,m,g=!1,p;for(f==null&&(f=p=Nm()),d=0;d<=h;++d)!(dt.x||0,Ny=t=>t.y||0,zQ=t=>t.width||0,RQ=t=>t.height||0,FQ=t=>(t.x||0)+(t.width||0),NQ=t=>(t.y||0)+(t.height||0),BQ=t=>t.startAngle||0,jQ=t=>t.endAngle||0,UQ=t=>t.padAngle||0,VQ=t=>t.innerRadius||0,qQ=t=>t.outerRadius||0,HQ=t=>t.cornerRadius||0,$Q=t=>Ry(t.cornerRadiusTopLeft,t.cornerRadius)||0,GQ=t=>Ry(t.cornerRadiusTopRight,t.cornerRadius)||0,WQ=t=>Ry(t.cornerRadiusBottomRight,t.cornerRadius)||0,YQ=t=>Ry(t.cornerRadiusBottomLeft,t.cornerRadius)||0,XQ=t=>Ry(t.size,64),ZQ=t=>t.size||1,_w=t=>t.defined!==!1,JQ=t=>yF(t.shape||"circle"),KQ=qJ().startAngle(BQ).endAngle(jQ).padAngle(UQ).innerRadius(VQ).outerRadius(qQ).cornerRadius(HQ),QQ=fR().x(Fy).y1(Ny).y0(NQ).defined(_w),eee=fR().y(Ny).x1(Fy).x0(FQ).defined(_w),tee=jD().x(Fy).y(Ny).defined(_w),nee=xF().x(Fy).y(Ny).width(zQ).height(RQ).cornerRadius($Q,GQ,WQ,YQ),ree=$J().type(JQ).size(XQ),iee=bF().x(Fy).y(Ny).defined(_w).size(ZQ);function pM(t){return t.cornerRadius||t.cornerRadiusTopLeft||t.cornerRadiusTopRight||t.cornerRadiusBottomRight||t.cornerRadiusBottomLeft}function aee(t,n){return KQ.context(t)(n)}function oee(t,n){const e=n[0],o=e.interpolate||"linear";return(e.orient==="horizontal"?eee:QQ).curve(dM(o,e.orient,e.tension)).context(t)(n)}function see(t,n){const e=n[0],o=e.interpolate||"linear";return tee.curve(dM(o,e.orient,e.tension)).context(t)(n)}function Ym(t,n,e,o){return nee.context(t)(n,e,o)}function lee(t,n){return(n.mark.shape||n.shape).context(t)(n)}function uee(t,n){return ree.context(t)(n)}function cee(t,n){return iee.context(t)(n)}var _F=1;function wF(){_F=1}function gM(t,n,e){var o=n.clip,f=t._defs,r=n.clip_id||(n.clip_id="clip"+_F++),a=f.clipping[r]||(f.clipping[r]={id:r});return ga(o)?a.path=o(null):pM(e)?a.path=Ym(null,e,0,0):(a.width=e.width||0,a.height=e.height||0),"url(#"+r+")"}function zs(t){this.clear(),t&&this.union(t)}zs.prototype={clone(){return new zs(this)},clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},equals(t){return this.x1===t.x1&&this.y1===t.y1&&this.x2===t.x2&&this.y2===t.y2},set(t,n,e,o){return ethis.x2&&(this.x2=t),n>this.y2&&(this.y2=n),this},expand(t){return this.x1-=t,this.y1-=t,this.x2+=t,this.y2+=t,this},round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},scale(t){return this.x1*=t,this.y1*=t,this.x2*=t,this.y2*=t,this},translate(t,n){return this.x1+=t,this.x2+=t,this.y1+=n,this.y2+=n,this},rotate(t,n,e){const o=this.rotatedPoints(t,n,e);return this.clear().add(o[0],o[1]).add(o[2],o[3]).add(o[4],o[5]).add(o[6],o[7])},rotatedPoints(t,n,e){var{x1:o,y1:f,x2:r,y2:a}=this,l=Math.cos(t),c=Math.sin(t),i=n-n*l+e*c,s=e-n*c-e*l;return[l*o-c*f+i,c*o+l*f+s,l*o-c*a+i,c*o+l*a+s,l*r-c*f+i,c*r+l*f+s,l*r-c*a+i,c*r+l*a+s]},union(t){return t.x1this.x2&&(this.x2=t.x2),t.y2>this.y2&&(this.y2=t.y2),this},intersect(t){return t.x1>this.x1&&(this.x1=t.x1),t.y1>this.y1&&(this.y1=t.y1),t.x2=t.x2&&this.y1<=t.y1&&this.y2>=t.y2},alignsWith(t){return t&&(this.x1==t.x1||this.x2==t.x2||this.y1==t.y1||this.y2==t.y2)},intersects(t){return t&&!(this.x2t.x2||this.y2t.y2)},contains(t,n){return!(tthis.x2||nthis.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}};function ww(t){this.mark=t,this.bounds=this.bounds||new zs}function kw(t){ww.call(this,t),this.items=this.items||[]}ni(kw,ww);function mM(t){this._pending=0,this._loader=t||ew()}function M7(t){t._pending+=1}function j1(t){t._pending-=1}mM.prototype={pending(){return this._pending},sanitizeURL(t){const n=this;return M7(n),n._loader.sanitize(t,{context:"href"}).then(e=>(j1(n),e)).catch(()=>(j1(n),null))},loadImage(t){const n=this,e=uK();return M7(n),n._loader.sanitize(t,{context:"image"}).then(o=>{const f=o.href;if(!f||!e)throw{url:f};const r=new e,a=qi(o,"crossOrigin")?o.crossOrigin:"anonymous";return a!=null&&(r.crossOrigin=a),r.onload=()=>j1(n),r.onerror=()=>j1(n),r.src=f,r}).catch(o=>(j1(n),{complete:!1,width:0,height:0,src:o&&o.url||""}))},ready(){const t=this;return new Promise(n=>{function e(o){t.pending()?setTimeout(()=>{e(!0)},10):n(o)}e(!1)})}};function Xh(t,n,e){if(n.stroke&&n.opacity!==0&&n.strokeOpacity!==0){const o=n.strokeWidth!=null?+n.strokeWidth:1;t.expand(o+(e?fee(n,o):0))}return t}function fee(t,n){return t.strokeJoin&&t.strokeJoin!=="miter"?0:n}const hee=Df-1e-8;let Tw,Hb,$b,o0,Ck,Gb,Ok,Lk;const Ed=(t,n)=>Tw.add(t,n),Wb=(t,n)=>Ed(Hb=t,$b=n),S7=t=>Ed(t,Tw.y1),E7=t=>Ed(Tw.x1,t),t0=(t,n)=>Ck*t+Ok*n,n0=(t,n)=>Gb*t+Lk*n,W5=(t,n)=>Ed(t0(t,n),n0(t,n)),Y5=(t,n)=>Wb(t0(t,n),n0(t,n));function By(t,n){return Tw=t,n?(o0=n*Kd,Ck=Lk=Math.cos(o0),Gb=Math.sin(o0),Ok=-Gb):(Ck=Lk=1,o0=Gb=Ok=0),dee}const dee={beginPath(){},closePath(){},moveTo:Y5,lineTo:Y5,rect(t,n,e,o){o0?(W5(t+e,n),W5(t+e,n+o),W5(t,n+o),Y5(t,n)):(Ed(t+e,n+o),Wb(t,n))},quadraticCurveTo(t,n,e,o){const f=t0(t,n),r=n0(t,n),a=t0(e,o),l=n0(e,o);C7(Hb,f,a,S7),C7($b,r,l,E7),Wb(a,l)},bezierCurveTo(t,n,e,o,f,r){const a=t0(t,n),l=n0(t,n),c=t0(e,o),i=n0(e,o),s=t0(f,r),u=n0(f,r);O7(Hb,a,c,s,S7),O7($b,l,i,u,E7),Wb(s,u)},arc(t,n,e,o,f,r){if(o+=o0,f+=o0,Hb=e*Math.cos(f)+t,$b=e*Math.sin(f)+n,Math.abs(f-o)>hee)Ed(t-e,n-e),Ed(t+e,n+e);else{const a=i=>Ed(e*Math.cos(i)+t,e*Math.sin(i)+n);let l,c;if(a(o),a(f),f!==o)if(o=o%Df,o<0&&(o+=Df),f=f%Df,f<0&&(f+=Df),ff;++c,l-=e0)a(l);else for(l=o-o%e0+e0,c=0;c<4&&lMQ?(s=a*a+l*r,s>=0&&(s=Math.sqrt(s),c=(-a+s)/r,i=(-a-s)/r)):c=.5*l/a,0d)return!1;g>u&&(u=g)}else if(h>0){if(g0?(t.globalAlpha=e,t.fillStyle=AF(t,n,n.fill),!0):!1}var gee=[];function mm(t,n,e){var o=(o=n.strokeWidth)!=null?o:1;return o<=0?!1:(e*=n.strokeOpacity==null?1:n.strokeOpacity,e>0?(t.globalAlpha=e,t.strokeStyle=AF(t,n,n.stroke),t.lineWidth=o,t.lineCap=n.strokeCap||"butt",t.lineJoin=n.strokeJoin||"miter",t.miterLimit=n.strokeMiterLimit||10,t.setLineDash&&(t.setLineDash(n.strokeDash||gee),t.lineDashOffset=n.strokeDashOffset||0),!0):!1)}function mee(t,n){return t.zindex-n.zindex||t.index-n.index}function xM(t){if(!t.zdirty)return t.zitems;var n=t.items,e=[],o,f,r;for(f=0,r=n.length;f=0;)if(o=n(e[f]))return o;if(e===r){for(e=t.items,f=e.length;--f>=0;)if(!e[f].zindex&&(o=n(e[f])))return o}return null}function bM(t){return function(n,e,o){ff(e,f=>{(!o||o.intersects(f.bounds))&&MF(t,n,f,f)})}}function vee(t){return function(n,e,o){e.items.length&&(!o||o.intersects(e.bounds))&&MF(t,n,e.items[0],e.items)}}function MF(t,n,e,o){var f=e.opacity==null?1:e.opacity;f!==0&&(t(n,o)||(gm(n,e),e.fill&&O_(n,e,f)&&n.fill(),e.stroke&&mm(n,e,f)&&n.stroke()))}function Aw(t){return t=t||mc,function(n,e,o,f,r,a){return o*=n.pixelRatio,f*=n.pixelRatio,L_(e,l=>{const c=l.bounds;if(!(c&&!c.contains(r,a)||!c)&&t(n,l,o,f,r,a))return l})}}function jy(t,n){return function(e,o,f,r){var a=Array.isArray(o)?o[0]:o,l=n??a.fill,c=a.stroke&&e.isPointInStroke,i,s;return c&&(i=a.strokeWidth,s=a.strokeCap,e.lineWidth=i??1,e.lineCap=s??"butt"),t(e,o)?!1:l&&e.isPointInPath(f,r)||c&&e.isPointInStroke(f,r)}}function _M(t){return Aw(jy(t))}function d0(t,n){return"translate("+t+","+n+")"}function wM(t){return"rotate("+t+")"}function yee(t,n){return"scale("+t+","+n+")"}function SF(t){return d0(t.x||0,t.y||0)}function xee(t){return d0(t.x||0,t.y||0)+(t.angle?" "+wM(t.angle):"")}function bee(t){return d0(t.x||0,t.y||0)+(t.angle?" "+wM(t.angle):"")+(t.scaleX||t.scaleY?" "+yee(t.scaleX||1,t.scaleY||1):"")}function kM(t,n,e){function o(a,l){a("transform",xee(l)),a("d",n(null,l))}function f(a,l){return n(By(a,l.angle),l),Xh(a,l).translate(l.x||0,l.y||0)}function r(a,l){var c=l.x||0,i=l.y||0,s=l.angle||0;a.translate(c,i),s&&a.rotate(s*=Kd),a.beginPath(),n(a,l),s&&a.rotate(-s),a.translate(-c,-i)}return{type:t,tag:"path",nested:!1,attr:o,bound:f,draw:bM(r),pick:_M(r),isect:e||vM(r)}}var _ee=kM("arc",aee);function wee(t,n){for(var e=t[0].orient==="horizontal"?n[1]:n[0],o=t[0].orient==="horizontal"?"y":"x",f=t.length,r=1/0,a,l;--f>=0;)t[f].defined!==!1&&(l=Math.abs(t[f][o]-e),l=0;)if(t[o].defined!==!1&&(f=t[o].x-n[0],r=t[o].y-n[1],a=f*f+r*r,a=0;)if(t[e].defined!==!1&&(o=t[e].x-n[0],f=t[e].y-n[1],r=o*o+f*f,o=t[e].size||1,r.5&&n<1.5?.5-Math.abs(n-1):0}function See(t,n){t("transform",SF(n))}function OF(t,n){const e=CF(n);t("d",Ym(null,n,e,e))}function Eee(t,n){t("class","background"),t("aria-hidden",!0),OF(t,n)}function Cee(t,n){t("class","foreground"),t("aria-hidden",!0),n.strokeForeground?OF(t,n):t("d","")}function Oee(t,n,e){const o=n.clip?gM(e,n,n):null;t("clip-path",o)}function Lee(t,n){if(!n.clip&&n.items){const e=n.items,o=e.length;for(let f=0;f{const f=o.x||0,r=o.y||0,a=o.strokeForeground,l=o.opacity==null?1:o.opacity;(o.stroke||o.fill)&&l&&(Kv(t,o,f,r),gm(t,o),o.fill&&O_(t,o,l)&&t.fill(),o.stroke&&!a&&mm(t,o,l)&&t.stroke()),t.save(),t.translate(f,r),o.clip&&EF(t,o),e&&e.translate(-f,-r),ff(o,c=>{this.draw(t,c,e)}),e&&e.translate(f,r),t.restore(),a&&o.stroke&&l&&(Kv(t,o,f,r),gm(t,o),mm(t,o,l)&&t.stroke())})}function Ree(t,n,e,o,f,r){if(n.bounds&&!n.bounds.contains(f,r)||!n.items)return null;const a=e*t.pixelRatio,l=o*t.pixelRatio;return L_(n,c=>{let i,s,u;const d=c.bounds;if(d&&!d.contains(f,r))return;s=c.x||0,u=c.y||0;const h=s+(c.width||0),m=u+(c.height||0),g=c.clip;if(g&&(fh||rm))return;if(t.save(),t.translate(s,u),s=f-s,u=r-u,g&&pM(c)&&!Iee(t,c,a,l))return t.restore(),null;const p=c.strokeForeground,v=n.interactive!==!1;return v&&p&&c.stroke&&Dee(t,c,a,l)?(t.restore(),c):(i=L_(c,y=>Fee(y,s,u)?this.pick(y,e,o,s,u):null),!i&&v&&(c.fill||!p&&c.stroke)&&Pee(t,c,a,l)&&(i=c),t.restore(),i||null)})}function Fee(t,n,e){return(t.interactive!==!1||t.marktype==="group")&&t.bounds&&t.bounds.contains(n,e)}var Nee={type:"group",tag:"g",nested:!1,attr:See,bound:Lee,draw:zee,pick:Ree,isect:kF,content:Oee,background:Eee,foreground:Cee},Qv={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function AM(t,n){var e=t.image;return(!e||t.url&&t.url!==e.url)&&(e={complete:!1,width:0,height:0},n.loadImage(t.url).then(o=>{t.image=o,t.image.url=t.url})),e}function MM(t,n){return t.width!=null?t.width:!n||!n.width?0:t.aspect!==!1&&t.height?t.height*n.width/n.height:n.width}function SM(t,n){return t.height!=null?t.height:!n||!n.height?0:t.aspect!==!1&&t.width?t.width*n.height/n.width:n.height}function Mw(t,n){return t==="center"?n/2:t==="right"?n:0}function Sw(t,n){return t==="middle"?n/2:t==="bottom"?n:0}function Bee(t,n,e){const o=AM(n,e),f=MM(n,o),r=SM(n,o),a=(n.x||0)-Mw(n.align,f),l=(n.y||0)-Sw(n.baseline,r),c=!o.src&&o.toDataURL?o.toDataURL():o.src||"";t("href",c,Qv["xmlns:xlink"],"xlink:href"),t("transform",d0(a,l)),t("width",f),t("height",r),t("preserveAspectRatio",n.aspect===!1?"none":"xMidYMid")}function jee(t,n){const e=n.image,o=MM(n,e),f=SM(n,e),r=(n.x||0)-Mw(n.align,o),a=(n.y||0)-Sw(n.baseline,f);return t.set(r,a,r+o,a+f)}function Uee(t,n,e){ff(n,o=>{if(e&&!e.intersects(o.bounds))return;const f=AM(o,this);let r=MM(o,f),a=SM(o,f);if(r===0||a===0)return;let l=(o.x||0)-Mw(o.align,r),c=(o.y||0)-Sw(o.baseline,a),i,s,u,d;o.aspect!==!1&&(s=f.width/f.height,u=o.width/o.height,s===s&&u===u&&s!==u&&(u{if(!(e&&!e.intersects(o.bounds))){var f=o.opacity==null?1:o.opacity;f&&LF(t,o,f)&&(gm(t,o),t.stroke())}})}function Qee(t,n,e,o){return t.isPointInStroke?LF(t,n,1)&&t.isPointInStroke(e,o):!1}var ete={type:"rule",tag:"line",nested:!1,attr:Zee,bound:Jee,draw:Kee,pick:Aw(Qee),isect:TF},tte=kM("shape",lee),nte=kM("symbol",uee,yM);const I7=pI();var af={height:ah,measureWidth:EM,estimateWidth:Dk,width:Dk,canvas:PF};PF(!0);function PF(t){af.width=t&&Hd?EM:Dk}function Dk(t,n){return DF(ep(t,n),ah(t))}function DF(t,n){return~~(.8*t.length*n)}function EM(t,n){return ah(t)<=0||!(n=ep(t,n))?0:IF(n,Ew(t))}function IF(t,n){const e="(".concat(n,") ").concat(t);let o=I7.get(e);return o===void 0&&(Hd.font=n,o=Hd.measureText(t).width,I7.set(e,o)),o}function ah(t){return t.fontSize!=null?+t.fontSize||0:11}function Qd(t){return t.lineHeight!=null?t.lineHeight:ah(t)+2}function rte(t){return Ir(t)?t.length>1?t:t[0]:t}function Uy(t){return rte(t.lineBreak&&t.text&&!Ir(t.text)?t.text.split(t.lineBreak):t.text)}function CM(t){const n=Uy(t);return(Ir(n)?n.length-1:0)*Qd(t)}function ep(t,n){const e=n==null?"":(n+"").trim();return t.limit>0&&e.length?ate(t,e):e}function ite(t){if(af.width===EM){const n=Ew(t);return e=>IF(e,n)}else{const n=ah(t);return e=>DF(e,n)}}function ate(t,n){var e=+t.limit,o=ite(t);if(o(n)>>1,o(n.slice(c))>e?a=c+1:l=c;return f+n.slice(a)}else{for(;a>>1),o(n.slice(0,c))Math.max(d,af.width(n,h)),0)):u=af.width(n,s),f==="center"?c-=u/2:f==="right"&&(c-=u),t.set(c+=a,i+=l,c+u,i+o),n.angle&&!e)t.rotate(n.angle*Kd,a,l);else if(e===2)return t.rotatedPoints(n.angle*Kd,a,l);return t}function lte(t,n,e){ff(n,o=>{var f=o.opacity==null?1:o.opacity,r,a,l,c,i,s,u;if(!(e&&!e.intersects(o.bounds)||f===0||o.fontSize<=0||o.text==null||o.text.length===0)){if(t.font=Ew(o),t.textAlign=o.align||"left",r=Cw(o),a=r.x1,l=r.y1,o.angle&&(t.save(),t.translate(a,l),t.rotate(o.angle*Kd),a=l=0),a+=o.dx||0,l+=(o.dy||0)+OM(o),s=Uy(o),gm(t,o),Ir(s))for(i=Qd(o),c=0;cn;)t.removeChild(e[--o]);return t}function jF(t){return"mark-"+t.marktype+(t.role?" role-"+t.role:"")+(t.name?" "+t.name:"")}function Ow(t,n){const e=n.getBoundingClientRect();return[t.clientX-e.left-(n.clientLeft||0),t.clientY-e.top-(n.clientTop||0)]}function pte(t,n,e,o){var f=t&&t.mark,r,a;if(f&&(r=tc[f.marktype]).tip){for(a=Ow(n,e),a[0]-=o[0],a[1]-=o[1];t=t.mark.group;)a[0]-=t.x||0,a[1]-=t.y||0;t=r.tip(f.items,a)}return t}function tp(t,n){this._active=null,this._handlers={},this._loader=t||ew(),this._tooltip=n||gte}function gte(t,n,e,o){t.element().setAttribute("title",o||"")}tp.prototype={initialize(t,n,e){return this._el=t,this._obj=e||null,this.origin(n)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},origin(t){return arguments.length?(this._origin=t||[0,0],this):this._origin.slice()},scene(t){return arguments.length?(this._scene=t,this):this._scene},on(){},off(){},_handlerIndex(t,n,e){for(let o=t?t.length:0;--o>=0;)if(t[o].type===n&&(!e||t[o].handler===e))return o;return-1},handlers(t){const n=this._handlers,e=[];if(t)e.push(...n[this.eventName(t)]);else for(const o in n)e.push(...n[o]);return e},eventName(t){const n=t.indexOf(".");return n<0?t:t.slice(0,n)},handleHref(t,n,e){this._loader.sanitize(e,{context:"href"}).then(o=>{const f=new MouseEvent(t.type,t),r=Cd(null,"a");for(const a in o)r.setAttribute(a,o[a]);r.dispatchEvent(f)}).catch(()=>{})},handleTooltip(t,n,e){if(n&&n.tooltip!=null){n=pte(n,t,this.canvas(),this._origin);const o=e&&n&&n.tooltip||null;this._tooltip.call(this._obj,this,t,n,o)}},getItemBoundingClientRect(t){const n=this.canvas();if(!n)return;const e=n.getBoundingClientRect(),o=this._origin,f=t.bounds,r=f.width(),a=f.height();let l=f.x1+o[0]+e.left,c=f.y1+o[1]+e.top;for(;t.mark&&(t=t.mark.group);)l+=t.x||0,c+=t.y||0;return{x:l,y:c,width:r,height:a,left:l,top:c,right:l+r,bottom:c+a}}};function oh(t){this._el=null,this._bgcolor=null,this._loader=new mM(t)}oh.prototype={initialize(t,n,e,o,f){return this._el=t,this.resize(n,e,o,f)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},background(t){return arguments.length===0?this._bgcolor:(this._bgcolor=t,this)},resize(t,n,e,o){return this._width=t,this._height=n,this._origin=e||[0,0],this._scale=o||1,this},dirty(){},render(t){const n=this;return n._call=function(){n._render(t)},n._call(),n._call=null,n},_render(){},renderAsync(t){const n=this.render(t);return this._ready?this._ready.then(()=>n):Promise.resolve(n)},_load(t,n){var e=this,o=e._loader[t](n);if(!e._ready){const f=e._call;e._ready=e._loader.ready().then(r=>{r&&f(),e._ready=null})}return o},sanitizeURL(t){return this._load("sanitizeURL",t)},loadImage(t){return this._load("loadImage",t)}};const mte="keydown",vte="keypress",yte="keyup",UF="dragenter",Xb="dragleave",VF="dragover",zk="mousedown",xte="mouseup",P_="mousemove",Cv="mouseout",qF="mouseover",D_="click",bte="dblclick",_te="wheel",HF="mousewheel",I_="touchstart",z_="touchmove",R_="touchend",wte=[mte,vte,yte,UF,Xb,VF,zk,xte,P_,Cv,qF,D_,bte,_te,HF,I_,z_,R_],Rk=P_,ey=Cv,Fk=D_;function qy(t,n){tp.call(this,t,n),this._down=null,this._touch=null,this._first=!0,this._events={}}const kte=t=>t===I_||t===z_||t===R_?[I_,z_,R_]:[t];function R7(t,n){kte(n).forEach(e=>Tte(t,e))}function Tte(t,n){const e=t.canvas();e&&!t._events[n]&&(t._events[n]=1,e.addEventListener(n,t[n]?o=>t[n](o):o=>t.fire(n,o)))}function F7(t,n,e){return function(o){const f=this._active,r=this.pickEvent(o);r===f?this.fire(t,o):((!f||!f.exit)&&this.fire(e,o),this._active=r,this.fire(n,o),this.fire(t,o))}}function N7(t){return function(n){this.fire(t,n),this._active=null}}ni(qy,tp,{initialize(t,n,e){return this._canvas=t&&DM(t,"canvas"),[D_,zk,P_,Cv,Xb].forEach(o=>R7(this,o)),tp.prototype.initialize.call(this,t,n,e)},canvas(){return this._canvas},context(){return this._canvas.getContext("2d")},events:wte,DOMMouseScroll(t){this.fire(HF,t)},mousemove:F7(P_,qF,Cv),dragover:F7(VF,UF,Xb),mouseout:N7(Cv),dragleave:N7(Xb),mousedown(t){this._down=this._active,this.fire(zk,t)},click(t){this._down===this._active&&(this.fire(D_,t),this._down=null)},touchstart(t){this._touch=this.pickEvent(t.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(I_,t,!0)},touchmove(t){this.fire(z_,t,!0)},touchend(t){this.fire(R_,t,!0),this._touch=null},fire(t,n,e){const o=e?this._touch:this._active,f=this._handlers[t];if(n.vegaType=t,t===Fk&&o&&o.href?this.handleHref(n,o,o.href):(t===Rk||t===ey)&&this.handleTooltip(n,o,t!==ey),f)for(let r=0,a=f.length;r=0&&o.splice(f,1),this},pickEvent(t){const n=Ow(t,this._canvas),e=this._origin;return this.pick(this._scene,n[0],n[1],n[0]-e[0],n[1]-e[1])},pick(t,n,e,o,f){const r=this.context();return tc[t.marktype].pick.call(this,r,t,n,e,o,f)}});function Ate(){return typeof window<"u"&&window.devicePixelRatio||1}var Mte=Ate();function Ste(t,n,e,o,f,r){const a=typeof HTMLElement<"u"&&t instanceof HTMLElement&&t.parentNode!=null,l=t.getContext("2d"),c=a?Mte:f;t.width=n*c,t.height=e*c;for(const i in r)l[i]=r[i];return a&&c!==1&&(t.style.width=n+"px",t.style.height=e+"px"),l.pixelRatio=c,l.setTransform(c,0,0,c,c*o[0],c*o[1]),t}function F_(t){oh.call(this,t),this._options={},this._redraw=!1,this._dirty=new zs,this._tempb=new zs}const B7=oh.prototype,Ete=(t,n,e)=>new zs().set(0,0,n,e).translate(-t[0],-t[1]);function Cte(t,n,e){return n.expand(1).round(),t.pixelRatio%1&&n.scale(t.pixelRatio).round().scale(1/t.pixelRatio),n.translate(-(e[0]%1),-(e[1]%1)),t.beginPath(),t.rect(n.x1,n.y1,n.width(),n.height()),t.clip(),n}ni(F_,oh,{initialize(t,n,e,o,f,r){return this._options=r||{},this._canvas=this._options.externalContext?null:qd(1,1,this._options.type),t&&this._canvas&&(Xc(t,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),B7.initialize.call(this,t,n,e,o,f)},resize(t,n,e,o){if(B7.resize.call(this,t,n,e,o),this._canvas)Ste(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const f=this._options.externalContext;f||Pr("CanvasRenderer is missing a valid canvas or context"),f.scale(this._scale,this._scale),f.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this},canvas(){return this._canvas},context(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)},dirty(t){const n=this._tempb.clear().union(t.bounds);let e=t.mark.group;for(;e;)n.translate(e.x||0,e.y||0),e=e.mark.group;this._dirty.union(n)},_render(t){const n=this.context(),e=this._origin,o=this._width,f=this._height,r=this._dirty,a=Ete(e,o,f);n.save();const l=this._redraw||r.empty()?(this._redraw=!1,a.expand(1)):Cte(n,a.intersect(r),e);return this.clear(-e[0],-e[1],o,f),this.draw(n,t,l),n.restore(),r.clear(),this},draw(t,n,e){const o=tc[n.marktype];n.clip&&Mee(t,n),o.draw.call(this,t,n,e),n.clip&&t.restore()},clear(t,n,e,o){const f=this._options,r=this.context();f.type!=="pdf"&&!f.externalContext&&r.clearRect(t,n,e,o),this._bgcolor!=null&&(r.fillStyle=this._bgcolor,r.fillRect(t,n,e,o))}});function IM(t,n){tp.call(this,t,n);const e=this;e._hrefHandler=Nk(e,(o,f)=>{f&&f.href&&e.handleHref(o,f,f.href)}),e._tooltipHandler=Nk(e,(o,f)=>{e.handleTooltip(o,f,o.type!==ey)})}const Nk=(t,n)=>e=>{let o=e.target.__data__;o=Array.isArray(o)?o[0]:o,e.vegaType=e.type,n.call(t._obj,e,o)};ni(IM,tp,{initialize(t,n,e){let o=this._svg;return o&&(o.removeEventListener(Fk,this._hrefHandler),o.removeEventListener(Rk,this._tooltipHandler),o.removeEventListener(ey,this._tooltipHandler)),this._svg=o=t&&DM(t,"svg"),o&&(o.addEventListener(Fk,this._hrefHandler),o.addEventListener(Rk,this._tooltipHandler),o.addEventListener(ey,this._tooltipHandler)),tp.prototype.initialize.call(this,t,n,e)},canvas(){return this._svg},on(t,n){const e=this.eventName(t),o=this._handlers;if(this._handlerIndex(o[e],t,n)<0){const r={type:t,handler:n,listener:Nk(this,n)};(o[e]||(o[e]=[])).push(r),this._svg&&this._svg.addEventListener(e,r.listener)}return this},off(t,n){const e=this.eventName(t),o=this._handlers[e],f=this._handlerIndex(o,t,n);return f>=0&&(this._svg&&this._svg.removeEventListener(e,o[f].listener),o.splice(f,1)),this}});const $F="aria-hidden",zM="aria-label",RM="role",FM="aria-roledescription",GF="graphics-object",NM="graphics-symbol",WF=(t,n,e)=>({[RM]:t,[FM]:n,[zM]:e||void 0}),Ote=uf(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),j7={axis:{desc:"axis",caption:Dte},legend:{desc:"legend",caption:Ite},"title-text":{desc:"title",caption:t=>"Title text '".concat(V7(t),"'")},"title-subtitle":{desc:"subtitle",caption:t=>"Subtitle text '".concat(V7(t),"'")}},U7={ariaRole:RM,ariaRoleDescription:FM,description:zM};function YF(t,n){const e=n.aria===!1;if(t($F,e||void 0),e||n.description==null)for(const o in U7)t(U7[o],void 0);else{const o=n.mark.marktype;t(zM,n.description),t(RM,n.ariaRole||(o==="group"?GF:NM)),t(FM,n.ariaRoleDescription||"".concat(o," mark"))}}function XF(t){return t.aria===!1?{[$F]:!0}:Ote[t.role]?null:j7[t.role]?Pte(t,j7[t.role]):Lte(t)}function Lte(t){const n=t.marktype,e=n==="group"||n==="text"||t.items.some(o=>o.description!=null&&o.aria!==!1);return WF(e?GF:NM,"".concat(n," mark container"),t.description)}function Pte(t,n){try{const e=t.items[0],o=n.caption||(()=>"");return WF(n.role||NM,n.desc,e.description||o(e))}catch{return null}}function V7(t){return ki(t.text).join(" ")}function Dte(t){const n=t.datum,e=t.orient,o=n.title?ZF(t):null,f=t.context,r=f.scales[n.scale].value,a=f.dataflow.locale(),l=r.type,c=e==="left"||e==="right"?"Y":"X";return"".concat(c,"-axis")+(o?" titled '".concat(o,"'"):"")+" for a ".concat(dm(l)?"discrete":l," scale")+" with ".concat(dF(a,r,t))}function Ite(t){const n=t.datum,e=n.title?ZF(t):null,o="".concat(n.type||""," legend").trim(),f=n.scales,r=Object.keys(f),a=t.context,l=a.scales[f[r[0]]].value,c=a.dataflow.locale();return Rte(o)+(e?" titled '".concat(e,"'"):"")+" for ".concat(zte(r))+" with ".concat(dF(c,l,t))}function ZF(t){try{return ki(Na(t.items).items[0].text).join(" ")}catch{return null}}function zte(t){return t=t.map(n=>n+(n==="fill"||n==="stroke"?" color":"")),t.length<2?t[0]:t.slice(0,-1).join(", ")+" and "+Na(t)}function Rte(t){return t.length?t[0].toUpperCase()+t.slice(1):t}const JF=t=>(t+"").replace(/&/g,"&").replace(//g,">"),Fte=t=>JF(t).replace(/"/g,""").replace(/\t/g," ").replace(/\n/g," ").replace(/\r/g," ");function BM(){let t="",n="",e="";const o=[],f=()=>n=e="",r=c=>{n&&(t+="".concat(n,">").concat(e),f()),o.push(c)},a=(c,i)=>(i!=null&&(n+=" ".concat(c,'="').concat(Fte(i),'"')),l),l={open(c){r(c),n="<"+c;for(var i=arguments.length,s=new Array(i>1?i-1:0),u=1;u".concat(e,""):"/>"):t+=""),f(),l},attr:a,text:c=>(e+=JF(c),l),toString:()=>t};return l}const KF=t=>QF(BM(),t)+"";function QF(t,n){if(t.open(n.tagName),n.hasAttributes()){const e=n.attributes,o=e.length;for(let f=0;f{i.dirty=n})),!o.zdirty){if(e.exit){r.nested&&o.items.length?(c=o.items[0],c._svg&&this._update(r,c._svg,c)):e._svg&&(c=e._svg.parentNode,c&&c.removeChild(e._svg)),e._svg=null;continue}e=r.nested?o.items[0]:e,e._update!==n&&(!e._svg||!e._svg.ownerSVGElement?(this._dirtyAll=!1,H7(e,n)):this._update(r,e._svg,e),e._update=n)}return!this._dirtyAll},mark(t,n,e){if(!this.isDirty(n))return n._svg;const o=this._svg,f=tc[n.marktype],r=n.interactive===!1?"none":null,a=f.tag==="g",l=$7(n,t,e,"g",o);l.setAttribute("class",jF(n));const c=XF(n);for(const d in c)ru(l,d,c[d]);a||ru(l,"pointer-events",r),ru(l,"clip-path",n.clip?gM(this,n,n.group):null);let i=null,s=0;const u=d=>{const h=this.isDirty(d),m=$7(d,l,i,f.tag,o);h&&(this._update(f,m,d),a&&jte(this,m,d)),i=m,++s};return f.nested?n.items.length&&u(n.items[0]):ff(n,u),Xc(l,s),l},_update(t,n,e){Nh=n,Dl=n.__values__,YF(Ov,e),t.attr(Ov,e,this);const o=Vte[t.type];o&&o.call(this,t,n,e),Nh&&this.style(Nh,e)},style(t,n){if(n!=null){for(const e in N_){let o=e==="font"?Vy(n):n[e];if(o===Dl[e])continue;const f=N_[e];o==null?t.removeAttribute(f):(hM(o)&&(o=gF(o,this._defs.gradient,tN())),t.setAttribute(f,o+"")),Dl[e]=o}for(const e in B_)Zb(t,B_[e],n[e])}},defs(){const t=this._svg,n=this._defs;let e=n.el,o=0;for(const f in n.gradient)e||(n.el=e=Tu(t,U1+1,"defs",$s)),o=Nte(e,n.gradient[f],o);for(const f in n.clipping)e||(n.el=e=Tu(t,U1+1,"defs",$s)),o=Bte(e,n.clipping[f],o);e&&(o===0?(t.removeChild(e),n.el=null):Xc(e,o))},_clearDefs(){const t=this._defs;t.gradient={},t.clipping={}}});function H7(t,n){for(;t&&t.dirty!==n;t=t.mark.group)if(t.dirty=n,t.mark&&t.mark.dirty!==n)t.mark.dirty=n;else return}function Nte(t,n,e){let o,f,r;if(n.gradient==="radial"){let a=Tu(t,e++,"pattern",$s);Od(a,{id:C_+n.id,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),a=Tu(a,0,"rect",$s),Od(a,{width:1,height:1,fill:"url(".concat(tN(),"#").concat(n.id,")")}),t=Tu(t,e++,"radialGradient",$s),Od(t,{id:n.id,fx:n.x1,fy:n.y1,fr:n.r1,cx:n.x2,cy:n.y2,r:n.r2})}else t=Tu(t,e++,"linearGradient",$s),Od(t,{id:n.id,x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2});for(o=0,f=n.stops.length;o{o=t.mark(n,r,o),++f}),Xc(n,1+f)}function $7(t,n,e,o,f){let r=t._svg,a;if(!r&&(a=n.ownerDocument,r=Cd(a,o,$s),t._svg=r,t.mark&&(r.__data__=t,r.__values__={fill:"default"},o==="g"))){const l=Cd(a,"path",$s);r.appendChild(l),l.__data__=t;const c=Cd(a,"g",$s);r.appendChild(c),c.__data__=t;const i=Cd(a,"path",$s);r.appendChild(i),i.__data__=t,i.__values__={fill:"default"}}return(r.ownerSVGElement!==f||Ute(r,e))&&n.insertBefore(r,e?e.nextSibling:n.firstChild),r}function Ute(t,n){return t.parentNode&&t.parentNode.childNodes.length>1&&t.previousSibling!=n}let Nh=null,Dl=null;const Vte={group(t,n,e){const o=Nh=n.childNodes[2];Dl=o.__values__,t.foreground(Ov,e,this),Dl=n.__values__,Nh=n.childNodes[1],t.content(Ov,e,this);const f=Nh=n.childNodes[0];t.background(Ov,e,this);const r=e.mark.interactive===!1?"none":null;if(r!==Dl.events&&(ru(o,"pointer-events",r),ru(f,"pointer-events",r),Dl.events=r),e.strokeForeground&&e.stroke){const a=e.fill;ru(o,"display",null),this.style(f,e),ru(f,"stroke",null),a&&(e.fill=null),Dl=o.__values__,this.style(o,e),a&&(e.fill=a),Nh=null}else ru(o,"display","none")},image(t,n,e){e.smooth===!1?(Zb(n,"image-rendering","optimizeSpeed"),Zb(n,"image-rendering","pixelated")):Zb(n,"image-rendering",null)},text(t,n,e){const o=Uy(e);let f,r,a,l;Ir(o)?(r=o.map(c=>ep(e,c)),f=r.join(` +`),f!==Dl.text&&(Xc(n,0),a=n.ownerDocument,l=Qd(e),r.forEach((c,i)=>{const s=Cd(a,"tspan",$s);s.__data__=e,s.textContent=c,i&&(s.setAttribute("x",0),s.setAttribute("dy",l)),n.appendChild(s)}),Dl.text=f)):(r=ep(e,o),r!==Dl.text&&(n.textContent=r,Dl.text=r)),ru(n,"font-family",Vy(e)),ru(n,"font-size",ah(e)+"px"),ru(n,"font-style",e.fontStyle),ru(n,"font-variant",e.fontVariant),ru(n,"font-weight",e.fontWeight)}};function Ov(t,n,e){n!==Dl[t]&&(e?qte(Nh,t,n,e):ru(Nh,t,n),Dl[t]=n)}function Zb(t,n,e){e!==Dl[n]&&(e==null?t.style.removeProperty(n):t.style.setProperty(n,e+""),Dl[n]=e)}function Od(t,n){for(const e in n)ru(t,e,n[e])}function ru(t,n,e){e!=null?t.setAttribute(n,e):t.removeAttribute(n)}function qte(t,n,e,o){e!=null?t.setAttributeNS(o,n,e):t.removeAttributeNS(o,n)}function tN(){let t;return typeof window>"u"?"":(t=window.location).hash?t.href.slice(0,-t.hash.length):t.href}function UM(t){oh.call(this,t),this._text=null,this._defs={gradient:{},clipping:{}}}ni(UM,oh,{svg(){return this._text},_render(t){const n=BM();n.open("svg",pa({},Qv,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:"0 0 ".concat(this._width," ").concat(this._height)}));const e=this._bgcolor;return e&&e!=="transparent"&&e!=="none"&&n.open("rect",{width:this._width,height:this._height,fill:e}).close(),n.open("g",eN,{transform:"translate("+this._origin+")"}),this.mark(n,t),n.close(),this.defs(n),this._text=n.close()+"",this},mark(t,n){const e=tc[n.marktype],o=e.tag,f=[YF,e.attr];t.open("g",{class:jF(n),"clip-path":n.clip?gM(this,n,n.group):null},XF(n),{"pointer-events":o!=="g"&&n.interactive===!1?"none":null});const r=a=>{const l=this.href(a);if(l&&t.open("a",l),t.open(o,this.attr(n,a,f,o!=="g"?o:null)),o==="text"){const c=Uy(a);if(Ir(c)){const i={x:0,dy:Qd(a)};for(let s=0;sthis.mark(t,u)),t.close(),c&&s?(i&&(a.fill=null),a.stroke=s,t.open("path",this.attr(n,a,e.foreground,"bgrect")).close(),i&&(a.fill=i)):t.open("path",this.attr(n,a,e.foreground,"bgfore")).close()}t.close(),l&&t.close()};return e.nested?n.items&&n.items.length&&r(n.items[0]):ff(n,r),t.close()},href(t){const n=t.href;let e;if(n){if(e=this._hrefs&&this._hrefs[n])return e;this.sanitizeURL(n).then(o=>{o["xlink:href"]=o.href,o.href=null,(this._hrefs||(this._hrefs={}))[n]=o})}return null},attr(t,n,e,o){const f={},r=(a,l,c,i)=>{f[i||a]=l};return Array.isArray(e)?e.forEach(a=>a(r,n,this)):e(r,n,this),o&&Hte(f,n,t,o,this._defs),f},defs(t){const n=this._defs.gradient,e=this._defs.clipping;if(Object.keys(n).length+Object.keys(e).length!==0){t.open("defs");for(const f in n){const r=n[f],a=r.stops;r.gradient==="radial"?(t.open("pattern",{id:C_+f,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),t.open("rect",{width:"1",height:"1",fill:"url(#"+f+")"}).close(),t.close(),t.open("radialGradient",{id:f,fx:r.x1,fy:r.y1,fr:r.r1,cx:r.x2,cy:r.y2,r:r.r2})):t.open("linearGradient",{id:f,x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2});for(let l=0;l1?(vm[t]=n,this):vm[t]}function oN(t,n,e){const o=[],f=new zs().union(n),r=t.marktype;return r?sN(t,f,e,o):r==="group"?lN(t,f,e,o):Pr("Intersect scene must be mark node or group item.")}function sN(t,n,e,o){if($te(t,n,e)){const f=t.items,r=t.marktype,a=f.length;let l=0;if(r==="group")for(;l=0;r--)if(e[r]!=o[r])return!1;for(r=e.length-1;r>=0;r--)if(f=e[r],!VM(t[f],n[f],f))return!1;return typeof t==typeof n}function Yte(){wF(),xQ()}const ym="top",Zc="left",ef="right",np="bottom",Xte="top-left",Zte="top-right",Jte="bottom-left",Kte="bottom-right",qM="start",Bk="middle",iu="end",Qte="x",ene="y",Pw="group",HM="axis",$M="title",tne="frame",nne="scope",GM="legend",hN="row-header",dN="row-footer",pN="row-title",gN="column-header",mN="column-footer",vN="column-title",rne="padding",ine="symbol",yN="fit",ane="fit-x",one="fit-y",sne="pad",WM="none",ob="all",jk="each",YM="flush",Pd="column",Dd="row";function xN(t){_r.call(this,null,t)}ni(xN,_r,{transform(t,n){const e=n.dataflow,o=t.mark,f=o.marktype,r=tc[f],a=r.bound;let l=o.bounds,c;if(r.nested)o.items.length&&e.dirty(o.items[0]),l=sb(o,a),o.items.forEach(i=>{i.bounds.clear().union(l)});else if(f===Pw||t.modified())switch(n.visit(n.MOD,i=>e.dirty(i)),l.clear(),o.items.forEach(i=>l.union(sb(i,a))),o.role){case HM:case GM:case $M:n.reflow()}else c=n.changed(n.REM),n.visit(n.ADD,i=>{l.union(sb(i,a))}),n.visit(n.MOD,i=>{c=c||l.alignsWith(i.bounds),e.dirty(i),l.union(sb(i,a))}),c&&(l.clear(),o.items.forEach(i=>l.union(i.bounds)));return cN(o),n.modifies("bounds")}});function sb(t,n,e){return n(t.bounds.clear(),t,e)}const G7=":vega_identifier:";function XM(t){_r.call(this,0,t)}XM.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]};ni(XM,_r,{transform(t,n){const e=lne(n.dataflow),o=t.as;let f=e.value;return n.visit(n.ADD,r=>r[o]=r[o]||++f),e.set(this.value=f),n}});function lne(t){return t._signals[G7]||(t._signals[G7]=t.add(0))}function bN(t){_r.call(this,null,t)}ni(bN,_r,{transform(t,n){let e=this.value;e||(e=n.dataflow.scenegraph().mark(t.markdef,une(t),t.index),e.group.context=t.context,t.context.group||(t.context.group=e.group),e.source=this.source,e.clip=t.clip,e.interactive=t.interactive,this.value=e);const o=e.marktype===Pw?kw:ww;return n.visit(n.ADD,f=>o.call(f,e)),(t.modified("clip")||t.modified("interactive"))&&(e.clip=t.clip,e.interactive=!!t.interactive,e.zdirty=!0,n.reflow()),e.items=n.source,n}});function une(t){const n=t.groups,e=t.parent;return n&&n.size===1?n.get(Object.keys(n.object)[0]):n&&e?n.lookup(e):null}function _N(t){_r.call(this,null,t)}const W7={parity:t=>t.filter((n,e)=>e%2?n.opacity=0:1),greedy:(t,n)=>{let e;return t.filter((o,f)=>!f||!wN(e.bounds,o.bounds,n)?(e=o,1):o.opacity=0)}},wN=(t,n,e)=>e>Math.max(n.x1-t.x2,t.x1-n.x2,n.y1-t.y2,t.y1-n.y2),Y7=(t,n)=>{for(var e=1,o=t.length,f=t[0].bounds,r;e{const n=t.bounds;return n.width()>1&&n.height()>1},fne=(t,n,e)=>{var o=t.range(),f=new zs;return n===ym||n===np?f.set(o[0],-1/0,o[1],1/0):f.set(-1/0,o[0],1/0,o[1]),f.expand(e||1),r=>f.encloses(r.bounds)},X7=t=>(t.forEach(n=>n.opacity=1),t),Z7=(t,n)=>t.reflow(n.modified()).modifies("opacity");ni(_N,_r,{transform(t,n){const e=W7[t.method]||W7.parity,o=t.separation||0;let f=n.materialize(n.SOURCE).source,r,a;if(!f||!f.length)return;if(!t.method)return t.modified("method")&&(X7(f),n=Z7(n,t)),n;if(f=f.filter(cne),!f.length)return;if(t.sort&&(f=f.slice().sort(t.sort)),r=X7(f),n=Z7(n,t),r.length>=3&&Y7(r,o)){do r=e(r,o);while(r.length>=3&&Y7(r,o));r.length<3&&!Na(f).opacity&&(r.length>1&&(Na(r).opacity=0),Na(f).opacity=1)}t.boundScale&&t.boundTolerance>=0&&(a=fne(t.boundScale,t.boundOrient,+t.boundTolerance),f.forEach(c=>{a(c)||(c.opacity=0)}));const l=r[0].mark.bounds.clear();return f.forEach(c=>{c.opacity&&l.union(c.bounds)}),n}});function kN(t){_r.call(this,null,t)}ni(kN,_r,{transform(t,n){const e=n.dataflow;if(n.visit(n.ALL,o=>e.dirty(o)),n.fields&&n.fields.zindex){const o=n.source&&n.source[0];o&&(o.mark.zdirty=!0)}}});const Pl=new zs;function Yg(t,n,e){return t[n]===e?0:(t[n]=e,1)}function hne(t){var n=t.items[0].orient;return n===Zc||n===ef}function dne(t){let n=+t.grid;return[t.ticks?n++:-1,t.labels?n++:-1,n+ +t.domain]}function pne(t,n,e,o){var f=n.items[0],r=f.datum,a=f.translate!=null?f.translate:.5,l=f.orient,c=dne(r),i=f.range,s=f.offset,u=f.position,d=f.minExtent,h=f.maxExtent,m=r.title&&f.items[c[2]].items[0],g=f.titlePadding,p=f.bounds,v=m&&CM(m),y=0,x=0,w,k;switch(Pl.clear().union(p),p.clear(),(w=c[0])>-1&&p.union(f.items[w].bounds),(w=c[1])>-1&&p.union(f.items[w].bounds),l){case ym:y=u||0,x=-s,k=Math.max(d,Math.min(h,-p.y1)),p.add(0,-k).add(i,0),m&&lb(t,m,k,g,v,0,-1,p);break;case Zc:y=-s,x=u||0,k=Math.max(d,Math.min(h,-p.x1)),p.add(-k,0).add(0,i),m&&lb(t,m,k,g,v,1,-1,p);break;case ef:y=e+s,x=u||0,k=Math.max(d,Math.min(h,p.x2)),p.add(0,0).add(k,i),m&&lb(t,m,k,g,v,1,1,p);break;case np:y=u||0,x=o+s,k=Math.max(d,Math.min(h,p.y2)),p.add(0,0).add(i,k),m&&lb(t,m,k,g,0,0,1,p);break;default:y=f.x,x=f.y}return Xh(p.translate(y,x),f),Yg(f,"x",y+a)|Yg(f,"y",x+a)&&(f.bounds=Pl,t.dirty(f),f.bounds=p,t.dirty(f)),f.mark.bounds.clear().union(p)}function lb(t,n,e,o,f,r,a,l){const c=n.bounds;if(n.auto){const i=a*(e+f+o);let s=0,u=0;t.dirty(n),r?s=(n.x||0)-(n.x=i):u=(n.y||0)-(n.y=i),n.mark.bounds.clear().union(c.translate(-s,-u)),t.dirty(n)}l.union(c)}const J7=(t,n)=>Math.floor(Math.min(t,n)),K7=(t,n)=>Math.ceil(Math.max(t,n));function gne(t){var n=t.items,e=n.length,o=0,f,r;const a={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};for(;o1)for(T=0;T0&&(x[T]+=O/2);if(l&&Wo(e.center,Dd)&&s!==1)for(T=0;T0&&(w[T]+=R/2);for(T=0;Tf&&(t.warn("Grid headers exceed limit: "+f),n=n.slice(0,f)),g+=r,y=0,w=n.length;y=0&&(T=e[x])==null;x-=d);l?(_=h==null?T.x:Math.round(T.bounds.x1+h*T.bounds.width()),S=g):(_=g,S=h==null?T.y:Math.round(T.bounds.y1+h*T.bounds.height())),k.union(b.bounds.translate(_-(b.x||0),S-(b.y||0))),b.x=_,b.y=S,t.dirty(b),p=a(p,k[i])}return p}function eO(t,n,e,o,f,r){if(!!n){t.dirty(n);var a=e,l=e;o?a=Math.round(f.x1+r*f.width()):l=Math.round(f.y1+r*f.height()),n.bounds.translate(a-(n.x||0),l-(n.y||0)),n.mark.bounds.clear().union(n.bounds),n.x=a,n.y=l,t.dirty(n)}}function _ne(t,n){const e=t[n]||{};return(o,f)=>e[o]!=null?e[o]:t[o]!=null?t[o]:f}function wne(t,n){let e=-1/0;return t.forEach(o=>{o.offset!=null&&(e=Math.max(e,o.offset))}),e>-1/0?e:n}function kne(t,n,e,o,f,r,a){const l=_ne(e,n),c=wne(t,l("offset",0)),i=l("anchor",qM),s=i===iu?1:i===Bk?.5:0,u={align:jk,bounds:l("bounds",YM),columns:l("direction")==="vertical"?1:t.length,padding:l("margin",8),center:l("center"),nodirty:!0};switch(n){case Zc:u.anchor={x:Math.floor(o.x1)-c,column:iu,y:s*(a||o.height()+2*o.y1),row:i};break;case ef:u.anchor={x:Math.ceil(o.x2)+c,y:s*(a||o.height()+2*o.y1),row:i};break;case ym:u.anchor={y:Math.floor(f.y1)-c,row:iu,x:s*(r||f.width()+2*f.x1),column:i};break;case np:u.anchor={y:Math.ceil(f.y2)+c,x:s*(r||f.width()+2*f.x1),column:i};break;case Xte:u.anchor={x:c,y:c};break;case Zte:u.anchor={x:r-c,y:c,column:iu};break;case Jte:u.anchor={x:c,y:a-c,row:iu};break;case Kte:u.anchor={x:r-c,y:a-c,column:iu,row:iu};break}return u}function Tne(t,n){var e=n.items[0],o=e.datum,f=e.orient,r=e.bounds,a=e.x,l=e.y,c,i;return e._bounds?e._bounds.clear().union(r):e._bounds=r.clone(),r.clear(),Mne(t,e,e.items[0].items[0]),r=Ane(e,r),c=2*e.padding,i=2*e.padding,r.empty()||(c=Math.ceil(r.width()+c),i=Math.ceil(r.height()+i)),o.type===ine&&Sne(e.items[0].items[0].items[0].items),f!==WM&&(e.x=a=0,e.y=l=0),e.width=c,e.height=i,Xh(r.set(a,l,a+c,l+i),e),e.mark.bounds.clear().union(r),e}function Ane(t,n){return t.items.forEach(e=>n.union(e.bounds)),n.x1=t.padding,n.y1=t.padding,n}function Mne(t,n,e){var o=n.padding,f=o-e.x,r=o-e.y;if(!n.datum.title)(f||r)&&V1(t,e,f,r);else{var a=n.items[1].items[0],l=a.anchor,c=n.titlePadding||0,i=o-a.x,s=o-a.y;switch(a.orient){case Zc:f+=Math.ceil(a.bounds.width())+c;break;case ef:case np:break;default:r+=a.bounds.height()+c}switch((f||r)&&V1(t,e,f,r),a.orient){case Zc:s+=Pg(n,e,a,l,1,1);break;case ef:i+=Pg(n,e,a,iu,0,0)+c,s+=Pg(n,e,a,l,1,1);break;case np:i+=Pg(n,e,a,l,0,0),s+=Pg(n,e,a,iu,-1,0,1)+c;break;default:i+=Pg(n,e,a,l,0,0)}(i||s)&&V1(t,a,i,s),(i=Math.round(a.bounds.x1-o))<0&&(V1(t,e,-i,0),V1(t,a,-i,0))}}function Pg(t,n,e,o,f,r,a){const l=t.datum.type!=="symbol",c=e.datum.vgrad,i=l&&(r||!c)&&!a?n.items[0]:n,s=i.bounds[f?"y2":"x2"]-t.padding,u=c&&r?s:0,d=c&&r?0:s,h=f<=0?0:CM(e);return Math.round(o===qM?u:o===iu?d-h:.5*(s-h))}function V1(t,n,e,o){n.x+=e,n.y+=o,n.bounds.translate(e,o),n.mark.bounds.translate(e,o),t.dirty(n)}function Sne(t){const n=t.reduce((e,o)=>(e[o.column]=Math.max(o.bounds.x2-o.x,e[o.column]||0),e),{});t.forEach(e=>{e.width=n[e.column],e.height=e.bounds.y2-e.y})}function Ene(t,n,e,o,f){var r=n.items[0],a=r.frame,l=r.orient,c=r.anchor,i=r.offset,s=r.padding,u=r.items[0].items[0],d=r.items[1]&&r.items[1].items[0],h=l===Zc||l===ef?o:e,m=0,g=0,p=0,v=0,y=0,x;if(a!==Pw?l===Zc?(m=f.y2,h=f.y1):l===ef?(m=f.y1,h=f.y2):(m=f.x1,h=f.x2):l===Zc&&(m=o,h=0),x=c===qM?m:c===iu?h:(m+h)/2,d&&d.text){switch(l){case ym:case np:y=u.bounds.height()+s;break;case Zc:v=u.bounds.width()+s;break;case ef:v=-u.bounds.width()-s;break}Pl.clear().union(d.bounds),Pl.translate(v-(d.x||0),y-(d.y||0)),Yg(d,"x",v)|Yg(d,"y",y)&&(t.dirty(d),d.bounds.clear().union(Pl),d.mark.bounds.clear().union(Pl),t.dirty(d)),Pl.clear().union(d.bounds)}else Pl.clear();switch(Pl.union(u.bounds),l){case ym:g=x,p=f.y1-Pl.height()-i;break;case Zc:g=f.x1-Pl.width()-i,p=x;break;case ef:g=f.x2+Pl.width()+i,p=x;break;case np:g=x,p=f.y2+i;break;default:g=r.x,p=r.y}return Yg(r,"x",g)|Yg(r,"y",p)&&(Pl.translate(g,p),t.dirty(r),r.bounds.clear().union(Pl),n.bounds.clear().union(Pl),t.dirty(r)),r.bounds}function AN(t){_r.call(this,null,t)}ni(AN,_r,{transform(t,n){const e=n.dataflow;return t.mark.items.forEach(o=>{t.layout&&yne(e,o,t.layout),One(e,o,t)}),Cne(t.mark.group)?n.reflow():n}});function Cne(t){return t&&t.mark.role!=="legend-entry"}function One(t,n,e){var o=n.items,f=Math.max(0,n.width||0),r=Math.max(0,n.height||0),a=new zs().set(0,0,f,r),l=a.clone(),c=a.clone(),i=[],s,u,d,h,m,g;for(m=0,g=o.length;m{d=v.orient||ef,d!==WM&&(p[d]||(p[d]=[])).push(v)});for(const v in p){const y=p[v];TN(t,y,kne(y,v,e.legends,l,c,f,r))}i.forEach(v=>{const y=v.bounds;if(y.equals(v._bounds)||(v.bounds=v._bounds,t.dirty(v),v.bounds=y,t.dirty(v)),e.autosize&&e.autosize.type===yN)switch(v.orient){case Zc:case ef:a.add(y.x1,0).add(y.x2,0);break;case ym:case np:a.add(0,y.y1).add(0,y.y2)}else a.union(y)})}a.union(l).union(c),s&&a.union(Ene(t,s,f,r,a)),n.clip&&a.set(0,0,n.width||0,n.height||0),Lne(t,n,a,e)}function Lne(t,n,e,o){const f=o.autosize||{},r=f.type;if(t._autosize<1||!r)return;let a=t._width,l=t._height,c=Math.max(0,n.width||0),i=Math.max(0,Math.ceil(-e.x1)),s=Math.max(0,n.height||0),u=Math.max(0,Math.ceil(-e.y1));const d=Math.max(0,Math.ceil(e.x2-c)),h=Math.max(0,Math.ceil(e.y2-s));if(f.contains===rne){const m=t.padding();a-=m.left+m.right,l-=m.top+m.bottom}r===WM?(i=0,u=0,c=a,s=l):r===yN?(c=Math.max(0,a-i-d),s=Math.max(0,l-u-h)):r===ane?(c=Math.max(0,a-i-d),l=s+u+h):r===one?(a=c+i+d,s=Math.max(0,l-u-h)):r===sne&&(a=c+i+d,l=s+u+h),t._resizeView(a,l,c,s,[i,u],f.resize)}var Pne=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",bound:xN,identifier:XM,mark:bN,overlap:_N,render:kN,viewlayout:AN});function MN(t){_r.call(this,null,t)}ni(MN,_r,{transform(t,n){if(this.value&&!t.modified())return n.StopPropagation;var e=n.dataflow.locale(),o=n.fork(n.NO_SOURCE|n.NO_FIELDS),f=this.value,r=t.scale,a=t.count==null?t.values?t.values.length:10:t.count,l=cM(r,a,t.minstep),c=t.format||lF(e,r,l,t.formatSpecifier,t.formatType,!!t.values),i=t.values?sF(r,t.values,l):fM(r,l);return f&&(o.rem=f),f=i.map((s,u)=>ro({index:u/(i.length-1||1),value:s,label:c(s)})),t.extra&&f.length&&f.push(ro({index:-1,extra:{value:f[0].value},label:""})),o.source=f,o.add=f,this.value=f,o}});function SN(t){_r.call(this,null,t)}function Dne(){return ro({})}function Ine(t){const n=qm().test(e=>e.exit);return n.lookup=e=>n.get(t(e)),n}ni(SN,_r,{transform(t,n){var e=n.dataflow,o=n.fork(n.NO_SOURCE|n.NO_FIELDS),f=t.item||Dne,r=t.key||$i,a=this.value;return Ir(o.encode)&&(o.encode=null),a&&(t.modified("key")||n.modified(r))&&Pr("DataJoin does not support modified key function or fields."),a||(n=n.addAll(),this.value=a=Ine(r)),n.visit(n.ADD,l=>{const c=r(l);let i=a.get(c);i?i.exit?(a.empty--,o.add.push(i)):o.mod.push(i):(i=f(l),a.set(c,i),o.add.push(i)),i.datum=l,i.exit=!1}),n.visit(n.MOD,l=>{const c=r(l),i=a.get(c);i&&(i.datum=l,o.mod.push(i))}),n.visit(n.REM,l=>{const c=r(l),i=a.get(c);l===i.datum&&!i.exit&&(o.rem.push(i),i.exit=!0,++a.empty)}),n.changed(n.ADD_MOD)&&o.modifies("datum"),(n.clean()||t.clean&&a.empty>e.cleanThreshold)&&e.runAfter(a.clean),o}});function EN(t){_r.call(this,null,t)}ni(EN,_r,{transform(t,n){var e=n.fork(n.ADD_REM),o=t.mod||!1,f=t.encoders,r=n.encode;if(Ir(r))if(e.changed()||r.every(u=>f[u]))r=r[0],e.encode=null;else return n.StopPropagation;var a=r==="enter",l=f.update||md,c=f.enter||md,i=f.exit||md,s=(r&&!a?f[r]:l)||md;if(n.changed(n.ADD)&&(n.visit(n.ADD,u=>{c(u,t),l(u,t)}),e.modifies(c.output),e.modifies(l.output),s!==md&&s!==l&&(n.visit(n.ADD,u=>{s(u,t)}),e.modifies(s.output))),n.changed(n.REM)&&i!==md&&(n.visit(n.REM,u=>{i(u,t)}),e.modifies(i.output)),a||s!==md){const u=n.MOD|(t.modified()?n.REFLOW:0);a?(n.visit(u,d=>{const h=c(d,t)||o;(s(d,t)||h)&&e.mod.push(d)}),e.mod.length&&e.modifies(c.output)):n.visit(u,d=>{(s(d,t)||o)&&e.mod.push(d)}),e.mod.length&&e.modifies(s.output)}return e.changed()?e:n.StopPropagation}});function CN(t){_r.call(this,[],t)}ni(CN,_r,{transform(t,n){if(this.value!=null&&!t.modified())return n.StopPropagation;var e=n.dataflow.locale(),o=n.fork(n.NO_SOURCE|n.NO_FIELDS),f=this.value,r=t.type||qb,a=t.scale,l=+t.limit,c=cM(a,t.count==null?5:t.count,t.minstep),i=!!t.values||r===qb,s=t.format||hF(e,a,c,r,t.formatSpecifier,t.formatType,i),u=t.values||fF(a,c),d,h,m,g,p;return f&&(o.rem=f),r===qb?(l&&u.length>l?(n.dataflow.warn("Symbol legend count exceeds limit, filtering items."),f=u.slice(0,l-1),p=!0):f=u,ga(m=t.size)?(!t.values&&a(f[0])===0&&(f=f.slice(1)),g=f.reduce((v,y)=>Math.max(v,m(y,t)),0)):m=$l(g=m||8),f=f.map((v,y)=>ro({index:y,label:s(v,y,f),value:v,offset:g,size:m(v,t)})),p&&(p=u[f.length],f.push(ro({index:f.length,label:"\u2026".concat(u.length-f.length," entries"),value:p,offset:g,size:m(p,t)})))):r===oQ?(d=a.domain(),h=iF(a,d[0],Na(d)),u.length<3&&!t.values&&d[0]!==Na(d)&&(u=[d[0],Na(d)]),f=u.map((v,y)=>ro({index:y,label:s(v,y,u),value:v,perc:h(v)}))):(m=u.length-1,h=vQ(a),f=u.map((v,y)=>ro({index:y,label:s(v,y,u),value:v,perc:y?h(v):0,perc2:y===m?1:h(u[y+1])}))),o.source=f,o.add=f,this.value=f,o}});const zne=t=>t.source.x,Rne=t=>t.source.y,Fne=t=>t.target.x,Nne=t=>t.target.y;function ZM(t){_r.call(this,{},t)}ZM.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]};ni(ZM,_r,{transform(t,n){var e=t.sourceX||zne,o=t.sourceY||Rne,f=t.targetX||Fne,r=t.targetY||Nne,a=t.as||"path",l=t.orient||"vertical",c=t.shape||"line",i=tO.get(c+"-"+l)||tO.get(c);return i||Pr("LinkPath unsupported type: "+t.shape+(t.orient?"-"+t.orient:"")),n.visit(n.SOURCE,s=>{s[a]=i(e(s),o(s),f(s),r(s))}),n.reflow(t.modified()).modifies(a)}});const ON=(t,n,e,o)=>"M"+t+","+n+"L"+e+","+o,Bne=(t,n,e,o)=>ON(n*Math.cos(t),n*Math.sin(t),o*Math.cos(e),o*Math.sin(e)),LN=(t,n,e,o)=>{var f=e-t,r=o-n,a=Math.sqrt(f*f+r*r)/2,l=180*Math.atan2(r,f)/Math.PI;return"M"+t+","+n+"A"+a+","+a+" "+l+" 0 1 "+e+","+o},jne=(t,n,e,o)=>LN(n*Math.cos(t),n*Math.sin(t),o*Math.cos(e),o*Math.sin(e)),PN=(t,n,e,o)=>{const f=e-t,r=o-n,a=.2*(f+r),l=.2*(r-f);return"M"+t+","+n+"C"+(t+a)+","+(n+l)+" "+(e+l)+","+(o-a)+" "+e+","+o},Une=(t,n,e,o)=>PN(n*Math.cos(t),n*Math.sin(t),o*Math.cos(e),o*Math.sin(e)),Vne=(t,n,e,o)=>"M"+t+","+n+"V"+o+"H"+e,qne=(t,n,e,o)=>"M"+t+","+n+"H"+e+"V"+o,Hne=(t,n,e,o)=>{const f=Math.cos(t),r=Math.sin(t),a=Math.cos(e),l=Math.sin(e),c=Math.abs(e-t)>Math.PI?e<=t:e>t;return"M"+n*f+","+n*r+"A"+n+","+n+" 0 0,"+(c?1:0)+" "+n*a+","+n*l+"L"+o*a+","+o*l},$ne=(t,n,e,o)=>{const f=(t+e)/2;return"M"+t+","+n+"C"+f+","+n+" "+f+","+o+" "+e+","+o},Gne=(t,n,e,o)=>{const f=(n+o)/2;return"M"+t+","+n+"C"+t+","+f+" "+e+","+f+" "+e+","+o},Wne=(t,n,e,o)=>{const f=Math.cos(t),r=Math.sin(t),a=Math.cos(e),l=Math.sin(e),c=(n+o)/2;return"M"+n*f+","+n*r+"C"+c*f+","+c*r+" "+c*a+","+c*l+" "+o*a+","+o*l},tO=qm({line:ON,"line-radial":Bne,arc:LN,"arc-radial":jne,curve:PN,"curve-radial":Une,"orthogonal-horizontal":Vne,"orthogonal-vertical":qne,"orthogonal-radial":Hne,"diagonal-horizontal":$ne,"diagonal-vertical":Gne,"diagonal-radial":Wne});function JM(t){_r.call(this,null,t)}JM.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]};ni(JM,_r,{transform(t,n){var e=t.as||["startAngle","endAngle"],o=e[0],f=e[1],r=t.field||jm,a=t.startAngle||0,l=t.endAngle!=null?t.endAngle:2*Math.PI,c=n.source,i=c.map(r),s=i.length,u=a,d=(l-a)/SI(i),h=Ju(s),m,g,p;for(t.sort&&h.sort((v,y)=>i[v]-i[y]),m=0;m-1)return o;var f=n.domain,r=t.type,a=n.zero||n.zero===void 0&&Xne(t),l,c;if(!f)return 0;if(DN(r)&&n.padding&&f[0]!==Na(f)&&(f=tre(r,f,n.range,n.padding,n.exponent,n.constant)),(a||n.domainMin!=null||n.domainMax!=null||n.domainMid!=null)&&(l=(f=f.slice()).length-1||1,a&&(f[0]>0&&(f[0]=0),f[l]<0&&(f[l]=0)),n.domainMin!=null&&(f[0]=n.domainMin),n.domainMax!=null&&(f[l]=n.domainMax),n.domainMid!=null)){c=n.domainMid;const i=c>f[l]?l+1:cf+(r<0?-1:r>0?1:0),0));o!==n.length&&e.warn("Log scale domain includes zero: "+oi(n))}return n}function nre(t,n,e){let o=n.bins;if(o&&!Ir(o)){const f=t.domain(),r=f[0],a=Na(f),l=o.step;let c=o.start==null?r:o.start,i=o.stop==null?a:o.stop;l||Pr("Scale bins parameter missing step property."),ca&&(i=l*Math.floor(a/l)),o=Ju(c,i+l/2,l)}return o?t.bins=o:t.bins&&delete t.bins,t.type===iM&&(o?!n.domain&&!n.domainRaw&&(t.domain(o),e=o.length):t.bins=t.domain()),e}function rre(t,n,e){var o=t.type,f=n.round||!1,r=n.range;if(n.rangeStep!=null)r=ire(o,n,e);else if(n.scheme&&(r=are(o,n,e),ga(r))){if(t.interpolator)return t.interpolator(r);Pr("Scale type ".concat(o," does not support interpolating color schemes."))}if(r&&eF(o))return t.interpolator(bw(Uk(r,n.reverse),n.interpolate,n.interpolateGamma));r&&n.interpolate&&t.interpolate?t.interpolate(lM(n.interpolate,n.interpolateGamma)):ga(t.round)?t.round(f):ga(t.rangeRound)&&t.interpolate(f?G2:Ty),r&&t.range(Uk(r,n.reverse))}function ire(t,n,e){t!==XR&&t!==Mk&&Pr("Only band and point scales support rangeStep.");var o=(n.paddingOuter!=null?n.paddingOuter:n.padding)||0,f=t===Mk?1:(n.paddingInner!=null?n.paddingInner:n.padding)||0;return[0,n.rangeStep*nM(e,f,o)]}function are(t,n,e){var o=n.schemeExtent,f,r;return Ir(n.scheme)?r=bw(n.scheme,n.interpolate,n.interpolateGamma):(f=n.scheme.toLowerCase(),r=uM(f),r||Pr("Unrecognized scheme name: ".concat(n.scheme))),e=t===xw?e+1:t===iM?e-1:t===hm||t===yw?+n.schemeCount||Yne:e,eF(t)?nO(r,o,n.reverse):ga(r)?rF(nO(r,o),e):t===rM?r:r.slice(0,e)}function nO(t,n,e){return ga(t)&&(n||e)?nF(t,Uk(n||[0,1],e)):t}function Uk(t,n){return n?t.slice().reverse():t}function RN(t){_r.call(this,null,t)}ni(RN,_r,{transform(t,n){const e=t.modified("sort")||n.changed(n.ADD)||n.modified(t.sort.fields)||n.modified("datum");return e&&n.source.sort(q0(t.sort)),this.modified(e),n}});const rO="zero",FN="center",NN="normalize",BN=["y0","y1"];function KM(t){_r.call(this,null,t)}KM.Definition={type:"Stack",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"groupby",type:"field",array:!0},{name:"sort",type:"compare"},{name:"offset",type:"enum",default:rO,values:[rO,FN,NN]},{name:"as",type:"string",array:!0,length:2,default:BN}]};ni(KM,_r,{transform(t,n){var e=t.as||BN,o=e[0],f=e[1],r=q0(t.sort),a=t.field||jm,l=t.offset===FN?ore:t.offset===NN?sre:lre,c,i,s,u;for(c=ure(n.source,t.groupby,r,a),i=0,s=c.length,u=c.max;ig(s),a,l,c,i,s,u,d,h,m;if(n==null)f.push(t.slice());else for(a={},l=0,c=t.length;lm&&(m=h),e&&d.sort(e)}return f.max=m,f}var cre=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",axisticks:MN,datajoin:SN,encode:EN,legendentries:CN,linkpath:ZM,pie:JM,scale:IN,sortitems:RN,stack:KM}),Xi=1e-6,j_=1e-12,Sa=Math.PI,ys=Sa/2,U_=Sa/4,hu=Sa*2,Os=180/Sa,Ea=Sa/180,Va=Math.abs,Xm=Math.atan,xc=Math.atan2,Zi=Math.cos,cb=Math.ceil,jN=Math.exp,Vk=Math.hypot,V_=Math.log,J5=Math.pow,Gi=Math.sin,fc=Math.sign||function(t){return t>0?1:t<0?-1:0},du=Math.sqrt,QM=Math.tan;function UN(t){return t>1?0:t<-1?Sa:Math.acos(t)}function Iu(t){return t>1?ys:t<-1?-ys:Math.asin(t)}function bl(){}function q_(t,n){t&&aO.hasOwnProperty(t.type)&&aO[t.type](t,n)}var iO={Feature:function(t,n){q_(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,o=-1,f=e.length;++o=0?1:-1,f=o*e,r=Zi(n),a=Gi(n),l=Gk*a,c=$k*r+l*Zi(f),i=l*o*Gi(f);H_.add(xc(i,c)),Hk=t,$k=r,Gk=a}function pre(t){return $_=new cu,Ih(t,Kf),$_*2}function G_(t){return[xc(t[1],t[0]),Iu(t[2])]}function k0(t){var n=t[0],e=t[1],o=Zi(e);return[o*Zi(n),o*Gi(n),Gi(e)]}function fb(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function xm(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function K5(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function hb(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function W_(t){var n=du(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var us,wu,ms,Yu,Kp,$N,GN,em,Lv,_d,Gh,Lh={point:Wk,lineStart:sO,lineEnd:lO,polygonStart:function(){Lh.point=YN,Lh.lineStart=gre,Lh.lineEnd=mre,Lv=new cu,Kf.polygonStart()},polygonEnd:function(){Kf.polygonEnd(),Lh.point=Wk,Lh.lineStart=sO,Lh.lineEnd=lO,H_<0?(us=-(ms=180),wu=-(Yu=90)):Lv>Xi?Yu=90:Lv<-Xi&&(wu=-90),Gh[0]=us,Gh[1]=ms},sphere:function(){us=-(ms=180),wu=-(Yu=90)}};function Wk(t,n){_d.push(Gh=[us=t,ms=t]),nYu&&(Yu=n)}function WN(t,n){var e=k0([t*Ea,n*Ea]);if(em){var o=xm(em,e),f=[o[1],-o[0],0],r=xm(f,o);W_(r),r=G_(r);var a=t-Kp,l=a>0?1:-1,c=r[0]*Os*l,i,s=Va(a)>180;s^(l*KpYu&&(Yu=i)):(c=(c+360)%360-180,s^(l*KpYu&&(Yu=n))),s?tWu(us,ms)&&(ms=t):Wu(t,ms)>Wu(us,ms)&&(us=t):ms>=us?(tms&&(ms=t)):t>Kp?Wu(us,t)>Wu(us,ms)&&(ms=t):Wu(t,ms)>Wu(us,ms)&&(us=t)}else _d.push(Gh=[us=t,ms=t]);nYu&&(Yu=n),em=e,Kp=t}function sO(){Lh.point=WN}function lO(){Gh[0]=us,Gh[1]=ms,Lh.point=Wk,em=null}function YN(t,n){if(em){var e=t-Kp;Lv.add(Va(e)>180?e+(e>0?360:-360):e)}else $N=t,GN=n;Kf.point(t,n),WN(t,n)}function gre(){Kf.lineStart()}function mre(){YN($N,GN),Kf.lineEnd(),Va(Lv)>Xi&&(us=-(ms=180)),Gh[0]=us,Gh[1]=ms,em=null}function Wu(t,n){return(n-=t)<0?n+360:n}function vre(t,n){return t[0]-n[0]}function uO(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nWu(o[0],o[1])&&(o[1]=f[1]),Wu(f[0],o[1])>Wu(o[0],o[1])&&(o[0]=f[0])):r.push(o=f);for(a=-1/0,e=r.length-1,n=0,o=r[e];n<=e;o=f,++n)f=r[n],(l=Wu(o[1],f[0]))>a&&(a=l,us=f[0],ms=o[1])}return _d=Gh=null,us===1/0||wu===1/0?[[NaN,NaN],[NaN,NaN]]:[[us,wu],[ms,Yu]]}var dv,Y_,X_,Z_,J_,K_,Q_,e2,Yk,Xk,Zk,XN,ZN,au,ou,su,tf={sphere:bl,point:eS,lineStart:cO,lineEnd:fO,polygonStart:function(){tf.lineStart=_re,tf.lineEnd=wre},polygonEnd:function(){tf.lineStart=cO,tf.lineEnd=fO}};function eS(t,n){t*=Ea,n*=Ea;var e=Zi(n);Hy(e*Zi(t),e*Gi(t),Gi(n))}function Hy(t,n,e){++dv,X_+=(t-X_)/dv,Z_+=(n-Z_)/dv,J_+=(e-J_)/dv}function cO(){tf.point=xre}function xre(t,n){t*=Ea,n*=Ea;var e=Zi(n);au=e*Zi(t),ou=e*Gi(t),su=Gi(n),tf.point=bre,Hy(au,ou,su)}function bre(t,n){t*=Ea,n*=Ea;var e=Zi(n),o=e*Zi(t),f=e*Gi(t),r=Gi(n),a=xc(du((a=ou*r-su*f)*a+(a=su*o-au*r)*a+(a=au*f-ou*o)*a),au*o+ou*f+su*r);Y_+=a,K_+=a*(au+(au=o)),Q_+=a*(ou+(ou=f)),e2+=a*(su+(su=r)),Hy(au,ou,su)}function fO(){tf.point=eS}function _re(){tf.point=kre}function wre(){JN(XN,ZN),tf.point=eS}function kre(t,n){XN=t,ZN=n,t*=Ea,n*=Ea,tf.point=JN;var e=Zi(n);au=e*Zi(t),ou=e*Gi(t),su=Gi(n),Hy(au,ou,su)}function JN(t,n){t*=Ea,n*=Ea;var e=Zi(n),o=e*Zi(t),f=e*Gi(t),r=Gi(n),a=ou*r-su*f,l=su*o-au*r,c=au*f-ou*o,i=Vk(a,l,c),s=Iu(i),u=i&&-s/i;Yk.add(u*a),Xk.add(u*l),Zk.add(u*c),Y_+=s,K_+=s*(au+(au=o)),Q_+=s*(ou+(ou=f)),e2+=s*(su+(su=r)),Hy(au,ou,su)}function Tre(t){dv=Y_=X_=Z_=J_=K_=Q_=e2=0,Yk=new cu,Xk=new cu,Zk=new cu,Ih(t,tf);var n=+Yk,e=+Xk,o=+Zk,f=Vk(n,e,o);return fSa?t+Math.round(-t/hu)*hu:t,n]}Kk.invert=Kk;function KN(t,n,e){return(t%=hu)?n||e?Jk(dO(t),pO(n,e)):dO(t):n||e?pO(n,e):Kk}function hO(t){return function(n,e){return n+=t,[n>Sa?n-hu:n<-Sa?n+hu:n,e]}}function dO(t){var n=hO(t);return n.invert=hO(-t),n}function pO(t,n){var e=Zi(t),o=Gi(t),f=Zi(n),r=Gi(n);function a(l,c){var i=Zi(c),s=Zi(l)*i,u=Gi(l)*i,d=Gi(c),h=d*e+s*o;return[xc(u*f-h*r,s*e-d*o),Iu(h*f+u*r)]}return a.invert=function(l,c){var i=Zi(c),s=Zi(l)*i,u=Gi(l)*i,d=Gi(c),h=d*f-u*r;return[xc(u*f+d*r,s*e+h*o),Iu(h*e-s*o)]},a}function Are(t){t=KN(t[0]*Ea,t[1]*Ea,t.length>2?t[2]*Ea:0);function n(e){return e=t(e[0]*Ea,e[1]*Ea),e[0]*=Os,e[1]*=Os,e}return n.invert=function(e){return e=t.invert(e[0]*Ea,e[1]*Ea),e[0]*=Os,e[1]*=Os,e},n}function Mre(t,n,e,o,f,r){if(!!e){var a=Zi(n),l=Gi(n),c=o*e;f==null?(f=n+o*hu,r=n-c/2):(f=gO(a,f),r=gO(a,r),(o>0?fr)&&(f+=o*hu));for(var i,s=f;o>0?s>r:s1&&t.push(t.pop().concat(t.shift()))},result:function(){var e=t;return t=[],n=null,e}}}function Jb(t,n){return Va(t[0]-n[0])=0;--l)f.point((u=s[l])[0],u[1]);else o(d.x,d.p.x,-1,f);d=d.p}d=d.o,s=d.z,h=!h}while(!d.v);f.lineEnd()}}}function mO(t){if(!!(n=t.length)){for(var n,e=0,o=t[0],f;++e=0?1:-1,A=S*_,M=A>Sa,E=p*b;if(c.add(xc(E*S*Gi(A),v*T+E*Zi(A))),a+=M?_+S*hu:_,M^m>=e^w>=e){var D=xm(k0(h),k0(x));W_(D);var O=xm(r,D);W_(O);var R=(M^_>=0?-1:1)*Iu(O[2]);(o>R||o===R&&(D[0]||D[1]))&&(l+=M^_>=0?1:-1)}}return(a<-Xi||a0){for(c||(f.polygonStart(),c=!0),f.lineStart(),b=0;b<_;++b)f.point((A=S[b])[0],A[1]);f.lineEnd()}return}T>1&&w&2&&k.push(k.pop().concat(k.shift())),s.push(k.filter(Ere))}}return d}}function Ere(t){return t.length>1}function Cre(t,n){return((t=t.x)[0]<0?t[1]-ys-Xi:ys-t[1])-((n=n.x)[0]<0?n[1]-ys-Xi:ys-n[1])}var vO=tB(function(){return!0},Ore,Pre,[-Sa,-ys]);function Ore(t){var n=NaN,e=NaN,o=NaN,f;return{lineStart:function(){t.lineStart(),f=1},point:function(r,a){var l=r>0?Sa:-Sa,c=Va(r-n);Va(c-Sa)0?ys:-ys),t.point(o,e),t.lineEnd(),t.lineStart(),t.point(l,e),t.point(r,e),f=0):o!==l&&c>=Sa&&(Va(n-o)Xi?Xm((Gi(n)*(r=Zi(o))*Gi(e)-Gi(o)*(f=Zi(n))*Gi(t))/(f*r*a)):(n+o)/2}function Pre(t,n,e,o){var f;if(t==null)f=e*ys,o.point(-Sa,f),o.point(0,f),o.point(Sa,f),o.point(Sa,0),o.point(Sa,-f),o.point(0,-f),o.point(-Sa,-f),o.point(-Sa,0),o.point(-Sa,f);else if(Va(t[0]-n[0])>Xi){var r=t[0]0,f=Va(n)>Xi;function r(s,u,d,h){Mre(h,t,e,d,s,u)}function a(s,u){return Zi(s)*Zi(u)>n}function l(s){var u,d,h,m,g;return{lineStart:function(){m=h=!1,g=1},point:function(p,v){var y=[p,v],x,w=a(p,v),k=o?w?0:i(p,v):w?i(p+(p<0?Sa:-Sa),v):0;if(!u&&(m=h=w)&&s.lineStart(),w!==h&&(x=c(u,y),(!x||Jb(u,x)||Jb(y,x))&&(y[2]=1)),w!==h)g=0,w?(s.lineStart(),x=c(y,u),s.point(x[0],x[1])):(x=c(u,y),s.point(x[0],x[1],2),s.lineEnd()),u=x;else if(f&&u&&o^w){var b;!(k&d)&&(b=c(y,u,!0))&&(g=0,o?(s.lineStart(),s.point(b[0][0],b[0][1]),s.point(b[1][0],b[1][1]),s.lineEnd()):(s.point(b[1][0],b[1][1]),s.lineEnd(),s.lineStart(),s.point(b[0][0],b[0][1],3)))}w&&(!u||!Jb(u,y))&&s.point(y[0],y[1]),u=y,h=w,d=k},lineEnd:function(){h&&s.lineEnd(),u=null},clean:function(){return g|(m&&h)<<1}}}function c(s,u,d){var h=k0(s),m=k0(u),g=[1,0,0],p=xm(h,m),v=fb(p,p),y=p[0],x=v-y*y;if(!x)return!d&&s;var w=n*v/x,k=-n*y/x,b=xm(g,p),T=hb(g,w),_=hb(p,k);K5(T,_);var S=b,A=fb(T,S),M=fb(S,S),E=A*A-M*(fb(T,T)-1);if(!(E<0)){var D=du(E),O=hb(S,(-A-D)/M);if(K5(O,T),O=G_(O),!d)return O;var R=s[0],z=u[0],L=s[1],P=u[1],N;z0^O[1]<(Va(O[0]-R)Sa^(R<=O[0]&&O[0]<=z)){var K=hb(S,(-A+D)/M);return K5(K,T),[O,G_(K)]}}}function i(s,u){var d=o?t:Sa-t,h=0;return s<-d?h|=1:s>d&&(h|=2),u<-d?h|=4:u>d&&(h|=8),h}return tB(a,l,r,o?[0,-t]:[-Sa,t-Sa])}function Ire(t,n,e,o,f,r){var a=t[0],l=t[1],c=n[0],i=n[1],s=0,u=1,d=c-a,h=i-l,m;if(m=e-a,!(!d&&m>0)){if(m/=d,d<0){if(m0){if(m>u)return;m>s&&(s=m)}if(m=f-a,!(!d&&m<0)){if(m/=d,d<0){if(m>u)return;m>s&&(s=m)}else if(d>0){if(m0)){if(m/=h,h<0){if(m0){if(m>u)return;m>s&&(s=m)}if(m=r-l,!(!h&&m<0)){if(m/=h,h<0){if(m>u)return;m>s&&(s=m)}else if(h>0){if(m0&&(t[0]=a+s*d,t[1]=l+s*h),u<1&&(n[0]=a+u*d,n[1]=l+u*h),!0}}}}}var pv=1e9,pb=-pv;function nB(t,n,e,o){function f(i,s){return t<=i&&i<=e&&n<=s&&s<=o}function r(i,s,u,d){var h=0,m=0;if(i==null||(h=a(i,u))!==(m=a(s,u))||c(i,s)<0^u>0)do d.point(h===0||h===3?t:e,h>1?o:n);while((h=(h+u+4)%4)!==m);else d.point(s[0],s[1])}function a(i,s){return Va(i[0]-t)0?0:3:Va(i[0]-e)0?2:1:Va(i[1]-n)0?1:0:s>0?3:2}function l(i,s){return c(i.x,s.x)}function c(i,s){var u=a(i,1),d=a(s,1);return u!==d?u-d:u===0?s[1]-i[1]:u===1?i[0]-s[0]:u===2?i[1]-s[1]:s[0]-i[0]}return function(i){var s=i,u=QN(),d,h,m,g,p,v,y,x,w,k,b,T={point:_,lineStart:E,lineEnd:D,polygonStart:A,polygonEnd:M};function _(R,z){f(R,z)&&s.point(R,z)}function S(){for(var R=0,z=0,L=h.length;zo&&(te-W)*(o-K)>(Y-K)*(t-W)&&++R:Y<=o&&(te-W)*(o-K)<(Y-K)*(t-W)&&--R;return R}function A(){s=u,d=[],h=[],b=!0}function M(){var R=S(),z=b&&R,L=(d=MI(d)).length;(z||L)&&(i.polygonStart(),z&&(i.lineStart(),r(null,null,1,i),i.lineEnd()),L&&eB(d,l,R,r,i),i.polygonEnd()),s=i,d=h=m=null}function E(){T.point=O,h&&h.push(m=[]),k=!0,w=!1,y=x=NaN}function D(){d&&(O(g,p),v&&w&&u.rejoin(),d.push(u.result())),T.point=_,w&&s.lineEnd()}function O(R,z){var L=f(R,z);if(h&&m.push([R,z]),k)g=R,p=z,v=L,k=!1,L&&(s.lineStart(),s.point(R,z));else if(L&&w)s.point(R,z);else{var P=[y=Math.max(pb,Math.min(pv,y)),x=Math.max(pb,Math.min(pv,x))],N=[R=Math.max(pb,Math.min(pv,R)),z=Math.max(pb,Math.min(pv,z))];Ire(P,N,t,n,e,o)?(w||(s.lineStart(),s.point(P[0],P[1])),s.point(N[0],N[1]),L||s.lineEnd(),b=!1):L&&(s.lineStart(),s.point(R,z),b=!1)}y=R,x=z,w=L}return T}}function yO(t,n,e){var o=Ju(t,n-Xi,e).concat(n);return function(f){return o.map(function(r){return[f,r]})}}function xO(t,n,e){var o=Ju(t,n-Xi,e).concat(n);return function(f){return o.map(function(r){return[r,f]})}}function zre(){var t,n,e,o,f,r,a,l,c=10,i=c,s=90,u=360,d,h,m,g,p=2.5;function v(){return{type:"MultiLineString",coordinates:y()}}function y(){return Ju(cb(o/s)*s,e,s).map(m).concat(Ju(cb(l/u)*u,a,u).map(g)).concat(Ju(cb(n/c)*c,t,c).filter(function(x){return Va(x%s)>Xi}).map(d)).concat(Ju(cb(r/i)*i,f,i).filter(function(x){return Va(x%u)>Xi}).map(h))}return v.lines=function(){return y().map(function(x){return{type:"LineString",coordinates:x}})},v.outline=function(){return{type:"Polygon",coordinates:[m(o).concat(g(a).slice(1),m(e).reverse().slice(1),g(l).reverse().slice(1))]}},v.extent=function(x){return arguments.length?v.extentMajor(x).extentMinor(x):v.extentMinor()},v.extentMajor=function(x){return arguments.length?(o=+x[0][0],e=+x[1][0],l=+x[0][1],a=+x[1][1],o>e&&(x=o,o=e,e=x),l>a&&(x=l,l=a,a=x),v.precision(p)):[[o,l],[e,a]]},v.extentMinor=function(x){return arguments.length?(n=+x[0][0],t=+x[1][0],r=+x[0][1],f=+x[1][1],n>t&&(x=n,n=t,t=x),r>f&&(x=r,r=f,f=x),v.precision(p)):[[n,r],[t,f]]},v.step=function(x){return arguments.length?v.stepMajor(x).stepMinor(x):v.stepMinor()},v.stepMajor=function(x){return arguments.length?(s=+x[0],u=+x[1],v):[s,u]},v.stepMinor=function(x){return arguments.length?(c=+x[0],i=+x[1],v):[c,i]},v.precision=function(x){return arguments.length?(p=+x,d=yO(r,f,90),h=xO(n,t,p),m=yO(l,a,90),g=xO(o,e,p),v):p},v.extentMajor([[-180,-90+Xi],[180,90-Xi]]).extentMinor([[-180,-80-Xi],[180,80+Xi]])}var ty=t=>t,e4=new cu,Qk=new cu,rB,iB,eT,tT,Ad={point:bl,lineStart:bl,lineEnd:bl,polygonStart:function(){Ad.lineStart=Rre,Ad.lineEnd=Nre},polygonEnd:function(){Ad.lineStart=Ad.lineEnd=Ad.point=bl,e4.add(Va(Qk)),Qk=new cu},result:function(){var t=e4/2;return e4=new cu,t}};function Rre(){Ad.point=Fre}function Fre(t,n){Ad.point=aB,rB=eT=t,iB=tT=n}function aB(t,n){Qk.add(tT*t-eT*n),eT=t,tT=n}function Nre(){aB(rB,iB)}var bO=Ad,bm=1/0,t2=bm,ny=-bm,n2=ny,Bre={point:jre,lineStart:bl,lineEnd:bl,polygonStart:bl,polygonEnd:bl,result:function(){var t=[[bm,t2],[ny,n2]];return ny=n2=-(t2=bm=1/0),t}};function jre(t,n){tny&&(ny=t),nn2&&(n2=n)}var r2=Bre,nT=0,rT=0,gv=0,i2=0,a2=0,Xg=0,iT=0,aT=0,mv=0,oB,sB,If,zf,Jc={point:T0,lineStart:_O,lineEnd:wO,polygonStart:function(){Jc.lineStart=qre,Jc.lineEnd=Hre},polygonEnd:function(){Jc.point=T0,Jc.lineStart=_O,Jc.lineEnd=wO},result:function(){var t=mv?[iT/mv,aT/mv]:Xg?[i2/Xg,a2/Xg]:gv?[nT/gv,rT/gv]:[NaN,NaN];return nT=rT=gv=i2=a2=Xg=iT=aT=mv=0,t}};function T0(t,n){nT+=t,rT+=n,++gv}function _O(){Jc.point=Ure}function Ure(t,n){Jc.point=Vre,T0(If=t,zf=n)}function Vre(t,n){var e=t-If,o=n-zf,f=du(e*e+o*o);i2+=f*(If+t)/2,a2+=f*(zf+n)/2,Xg+=f,T0(If=t,zf=n)}function wO(){Jc.point=T0}function qre(){Jc.point=$re}function Hre(){lB(oB,sB)}function $re(t,n){Jc.point=lB,T0(oB=If=t,sB=zf=n)}function lB(t,n){var e=t-If,o=n-zf,f=du(e*e+o*o);i2+=f*(If+t)/2,a2+=f*(zf+n)/2,Xg+=f,f=zf*t-If*n,iT+=f*(If+t),aT+=f*(zf+n),mv+=f*3,T0(If=t,zf=n)}var kO=Jc;function uB(t){this._context=t}uB.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,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(t,n){switch(this._point){case 0:{this._context.moveTo(t,n),this._point=1;break}case 1:{this._context.lineTo(t,n);break}default:{this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,hu);break}}},result:bl};var oT=new cu,t4,cB,fB,vv,yv,o2={point:bl,lineStart:function(){o2.point=Gre},lineEnd:function(){t4&&hB(cB,fB),o2.point=bl},polygonStart:function(){t4=!0},polygonEnd:function(){t4=null},result:function(){var t=+oT;return oT=new cu,t}};function Gre(t,n){o2.point=hB,cB=vv=t,fB=yv=n}function hB(t,n){vv-=t,yv-=n,oT.add(du(vv*vv+yv*yv)),vv=t,yv=n}var TO=o2;function dB(){this._string=[]}dB.prototype={_radius:4.5,_circle:AO(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,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(t,n){switch(this._point){case 0:{this._string.push("M",t,",",n),this._point=1;break}case 1:{this._string.push("L",t,",",n);break}default:{this._circle==null&&(this._circle=AO(this._radius)),this._string.push("M",t,",",n,this._circle);break}}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}else return null}};function AO(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function pB(t,n){var e=4.5,o,f;function r(a){return a&&(typeof e=="function"&&f.pointRadius(+e.apply(this,arguments)),Ih(a,o(f))),f.result()}return r.area=function(a){return Ih(a,o(bO)),bO.result()},r.measure=function(a){return Ih(a,o(TO)),TO.result()},r.bounds=function(a){return Ih(a,o(r2)),r2.result()},r.centroid=function(a){return Ih(a,o(kO)),kO.result()},r.projection=function(a){return arguments.length?(o=a==null?(t=null,ty):(t=a).stream,r):t},r.context=function(a){return arguments.length?(f=a==null?(n=null,new dB):new uB(n=a),typeof e!="function"&&f.pointRadius(e),r):n},r.pointRadius=function(a){return arguments.length?(e=typeof a=="function"?a:(f.pointRadius(+a),+a),r):e},r.projection(t).context(n)}function Dw(t){return function(n){var e=new sT;for(var o in t)e[o]=t[o];return e.stream=n,e}}function sT(){}sT.prototype={constructor:sT,point:function(t,n){this.stream.point(t,n)},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 tS(t,n,e){var o=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),o!=null&&t.clipExtent(null),Ih(e,t.stream(r2)),n(r2.result()),o!=null&&t.clipExtent(o),t}function Iw(t,n,e){return tS(t,function(o){var f=n[1][0]-n[0][0],r=n[1][1]-n[0][1],a=Math.min(f/(o[1][0]-o[0][0]),r/(o[1][1]-o[0][1])),l=+n[0][0]+(f-a*(o[1][0]+o[0][0]))/2,c=+n[0][1]+(r-a*(o[1][1]+o[0][1]))/2;t.scale(150*a).translate([l,c])},e)}function nS(t,n,e){return Iw(t,[[0,0],n],e)}function rS(t,n,e){return tS(t,function(o){var f=+n,r=f/(o[1][0]-o[0][0]),a=(f-r*(o[1][0]+o[0][0]))/2,l=-r*o[0][1];t.scale(150*r).translate([a,l])},e)}function iS(t,n,e){return tS(t,function(o){var f=+n,r=f/(o[1][1]-o[0][1]),a=-r*o[0][0],l=(f-r*(o[1][1]+o[0][1]))/2;t.scale(150*r).translate([a,l])},e)}var MO=16,Wre=Zi(30*Ea);function SO(t,n){return+n?Xre(t,n):Yre(t)}function Yre(t){return Dw({point:function(n,e){n=t(n,e),this.stream.point(n[0],n[1])}})}function Xre(t,n){function e(o,f,r,a,l,c,i,s,u,d,h,m,g,p){var v=i-o,y=s-f,x=v*v+y*y;if(x>4*n&&g--){var w=a+d,k=l+h,b=c+m,T=du(w*w+k*k+b*b),_=Iu(b/=T),S=Va(Va(b)-1)n||Va((v*D+y*O)/x-.5)>.3||a*d+l*h+c*m2?R[2]%360*Ea:0,D()):[l*Os,c*Os,i*Os]},M.angle=function(R){return arguments.length?(u=R%360*Ea,D()):u*Os},M.reflectX=function(R){return arguments.length?(d=R?-1:1,D()):d<0},M.reflectY=function(R){return arguments.length?(h=R?-1:1,D()):h<0},M.precision=function(R){return arguments.length?(b=SO(T,k=R*R),O()):du(k)},M.fitExtent=function(R,z){return Iw(M,R,z)},M.fitSize=function(R,z){return nS(M,R,z)},M.fitWidth=function(R,z){return rS(M,R,z)},M.fitHeight=function(R,z){return iS(M,R,z)};function D(){var R=EO(e,0,0,d,h,u).apply(null,n(r,a)),z=EO(e,o-R[0],f-R[1],d,h,u);return s=KN(l,c,i),T=Jk(n,z),_=Jk(s,T),b=SO(T,k),O()}function O(){return S=A=null,M}return function(){return n=t.apply(this,arguments),M.invert=n.invert&&E,D()}}function aS(t){var n=0,e=Sa/3,o=gB(t),f=o(n,e);return f.parallels=function(r){return arguments.length?o(n=r[0]*Ea,e=r[1]*Ea):[n*Os,e*Os]},f}function Qre(t){var n=Zi(t);function e(o,f){return[o*n,Gi(f)/n]}return e.invert=function(o,f){return[o/n,Iu(f*n)]},e}function eie(t,n){var e=Gi(t),o=(e+Gi(n))/2;if(Va(o)=.12&&p<.234&&g>=-.425&&g<-.214?f:p>=.166&&p<.234&&g>=-.214&&g<-.115?a:e).invert(d)},s.stream=function(d){return t&&n===d?t:t=tie([e.stream(n=d),f.stream(d),a.stream(d)])},s.precision=function(d){return arguments.length?(e.precision(d),f.precision(d),a.precision(d),u()):e.precision()},s.scale=function(d){return arguments.length?(e.scale(d),f.scale(d*.35),a.scale(d),s.translate(e.translate())):e.scale()},s.translate=function(d){if(!arguments.length)return e.translate();var h=e.scale(),m=+d[0],g=+d[1];return o=e.translate(d).clipExtent([[m-.455*h,g-.238*h],[m+.455*h,g+.238*h]]).stream(i),r=f.translate([m-.307*h,g+.201*h]).clipExtent([[m-.425*h+Xi,g+.12*h+Xi],[m-.214*h-Xi,g+.234*h-Xi]]).stream(i),l=a.translate([m-.205*h,g+.212*h]).clipExtent([[m-.214*h+Xi,g+.166*h+Xi],[m-.115*h-Xi,g+.234*h-Xi]]).stream(i),u()},s.fitExtent=function(d,h){return Iw(s,d,h)},s.fitSize=function(d,h){return nS(s,d,h)},s.fitWidth=function(d,h){return rS(s,d,h)},s.fitHeight=function(d,h){return iS(s,d,h)};function u(){return t=n=null,s}return s.scale(1070)}function vB(t){return function(n,e){var o=Zi(n),f=Zi(e),r=t(o*f);return r===1/0?[2,0]:[r*f*Gi(n),r*Gi(e)]}}function $y(t){return function(n,e){var o=du(n*n+e*e),f=t(o),r=Gi(f),a=Zi(f);return[xc(n*r,o*a),Iu(o&&e*r/o)]}}var yB=vB(function(t){return du(2/(1+t))});yB.invert=$y(function(t){return 2*Iu(t/2)});function rie(){return sh(yB).scale(124.75).clipAngle(180-.001)}var xB=vB(function(t){return(t=UN(t))&&t/Gi(t)});xB.invert=$y(function(t){return t});function iie(){return sh(xB).scale(79.4188).clipAngle(180-.001)}function zw(t,n){return[t,V_(QM((ys+n)/2))]}zw.invert=function(t,n){return[t,2*Xm(jN(n))-ys]};function aie(){return bB(zw).scale(961/hu)}function bB(t){var n=sh(t),e=n.center,o=n.scale,f=n.translate,r=n.clipExtent,a=null,l,c,i;n.scale=function(u){return arguments.length?(o(u),s()):o()},n.translate=function(u){return arguments.length?(f(u),s()):f()},n.center=function(u){return arguments.length?(e(u),s()):e()},n.clipExtent=function(u){return arguments.length?(u==null?a=l=c=i=null:(a=+u[0][0],l=+u[0][1],c=+u[1][0],i=+u[1][1]),s()):a==null?null:[[a,l],[c,i]]};function s(){var u=Sa*o(),d=n(Are(n.rotate()).invert([0,0]));return r(a==null?[[d[0]-u,d[1]-u],[d[0]+u,d[1]+u]]:t===zw?[[Math.max(d[0]-u,a),l],[Math.min(d[0]+u,c),i]]:[[a,Math.max(d[1]-u,l)],[c,Math.min(d[1]+u,i)]])}return s()}function gb(t){return QM((ys+t)/2)}function oie(t,n){var e=Zi(t),o=t===n?Gi(t):V_(e/Zi(n))/V_(gb(n)/gb(t)),f=e*J5(gb(t),o)/o;if(!o)return zw;function r(a,l){f>0?l<-ys+Xi&&(l=-ys+Xi):l>ys-Xi&&(l=ys-Xi);var c=f/J5(gb(l),o);return[c*Gi(o*a),f-c*Zi(o*a)]}return r.invert=function(a,l){var c=f-l,i=fc(o)*du(a*a+c*c),s=xc(a,Va(c))*fc(c);return c*o<0&&(s-=Sa*fc(a)*fc(c)),[s/o,2*Xm(J5(f/i,1/o))-ys]},r}function sie(){return aS(oie).scale(109.5).parallels([30,30])}function l2(t,n){return[t,n]}l2.invert=l2;function lie(){return sh(l2).scale(152.63)}function uie(t,n){var e=Zi(t),o=t===n?Gi(t):(e-Zi(n))/(n-t),f=e/o+t;if(Va(o)Xi&&--o>0);return[t/(.8707+(r=e*e)*(-.131979+r*(-.013791+r*r*r*(.003971-.001529*r)))),e]};function gie(){return sh(kB).scale(175.295)}function TB(t,n){return[Zi(n)*Gi(t),Gi(n)]}TB.invert=$y(Iu);function mie(){return sh(TB).scale(249.5).clipAngle(90+Xi)}function AB(t,n){var e=Zi(n),o=1+Zi(t)*e;return[e*Gi(t)/o,Gi(n)/o]}AB.invert=$y(function(t){return 2*Xm(t)});function vie(){return sh(AB).scale(250).clipAngle(142)}function MB(t,n){return[V_(QM((ys+n)/2)),-t]}MB.invert=function(t,n){return[-n,2*Xm(jN(t))-ys]};function yie(){var t=bB(MB),n=t.center,e=t.rotate;return t.center=function(o){return arguments.length?n([-o[1],o[0]]):(o=n(),[o[1],-o[0]])},t.rotate=function(o){return arguments.length?e([o[0],o[1],o.length>2?o[2]+90:90]):(o=e(),[o[0],o[1],o[2]-90])},e([0,0,90]).scale(159.155)}var xie=Math.abs,lT=Math.cos,c2=Math.sin,bie=1e-6,SB=Math.PI,uT=SB/2,CO=_ie(2);function OO(t){return t>1?uT:t<-1?-uT:Math.asin(t)}function _ie(t){return t>0?Math.sqrt(t):0}function wie(t,n){var e=t*c2(n),o=30,f;do n-=f=(n+c2(n)-e)/(1+lT(n));while(xie(f)>bie&&--o>0);return n/2}function kie(t,n,e){function o(f,r){return[t*f*lT(r=wie(e,r)),n*c2(r)]}return o.invert=function(f,r){return r=OO(r/n),[f/(t*lT(r)),OO((2*r+c2(2*r))/e)]},o}var Tie=kie(CO/uT,CO,SB);function Aie(){return sh(Tie).scale(169.529)}const Mie=pB(),cT=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function Sie(t,n){return function e(){const o=n();return o.type=t,o.path=pB().projection(o),o.copy=o.copy||function(){const f=e();return cT.forEach(r=>{o[r]&&f[r](o[r]())}),f.path.pointRadius(o.path.pointRadius()),f},o}}function oS(t,n){if(!t||typeof t!="string")throw new Error("Projection type must be a name string.");return t=t.toLowerCase(),arguments.length>1?(f2[t]=Sie(t,n),this):f2[t]||null}function EB(t){return t&&t.path||Mie}const f2={albers:mB,albersusa:nie,azimuthalequalarea:rie,azimuthalequidistant:iie,conicconformal:sie,conicequalarea:s2,conicequidistant:cie,equalEarth:hie,equirectangular:lie,gnomonic:die,identity:pie,mercator:aie,mollweide:Aie,naturalEarth1:gie,orthographic:mie,stereographic:vie,transversemercator:yie};for(const t in f2)oS(t,f2[t]);function Eie(){}const Ah=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function CB(){var t=1,n=1,e=l;function o(c,i){return i.map(s=>f(c,s))}function f(c,i){var s=[],u=[];return r(c,i,d=>{e(d,c,i),Cie(d)>0?s.push([d]):u.push(d)}),u.forEach(d=>{for(var h=0,m=s.length,g;h=i,Ah[p<<1].forEach(x);++h=i,Ah[g|p<<1].forEach(x);for(Ah[p<<0].forEach(x);++m=i,v=c[m*t]>=i,Ah[p<<1|v<<2].forEach(x);++h=i,y=v,v=c[m*t+h+1]>=i,Ah[g|p<<1|v<<2|y<<3].forEach(x);Ah[p|v<<3].forEach(x)}for(h=-1,v=c[m*t]>=i,Ah[v<<2].forEach(x);++h=i,Ah[v<<2|y<<3].forEach(x);Ah[v<<3].forEach(x);function x(w){var k=[w[0][0]+h,w[0][1]+m],b=[w[1][0]+h,w[1][1]+m],T=a(k),_=a(b),S,A;(S=d[T])?(A=u[_])?(delete d[S.end],delete u[A.start],S===A?(S.ring.push(b),s(S.ring)):u[S.start]=d[A.end]={start:S.start,end:A.end,ring:S.ring.concat(A.ring)}):(delete d[S.end],S.ring.push(b),d[S.end=_]=S):(S=u[_])?(A=d[T])?(delete u[S.start],delete d[A.end],S===A?(S.ring.push(b),s(S.ring)):u[A.start]=d[S.end]={start:A.start,end:S.end,ring:A.ring.concat(S.ring)}):(delete u[S.start],S.ring.unshift(k),u[S.start=T]=S):u[T]=d[_]={start:T,end:_,ring:[k,b]}}}function a(c){return c[0]*2+c[1]*(t+1)*4}function l(c,i,s){c.forEach(u=>{var d=u[0],h=u[1],m=d|0,g=h|0,p,v=i[g*t+m];d>0&&d0&&h=0&&s>=0||Pr("invalid size"),t=i,n=s,o},o.smooth=function(c){return arguments.length?(e=c?l:Eie,o):e===l},o}function Cie(t){for(var n=0,e=t.length,o=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++no!=h>o&&e<(d-i)*(o-s)/(h-s)+i&&(f=-f)}return f}function Pie(t,n,e){var o;return Die(t,n,e)&&Iie(t[o=+(t[0]===n[0])],e[o],n[o])}function Die(t,n,e){return(n[0]-t[0])*(e[1]-t[1])===(e[0]-t[0])*(n[1]-t[1])}function Iie(t,n,e){return t<=n&&n<=e||e<=n&&n<=t}function OB(t,n,e){return function(o){var f=Zf(o),r=e?Math.min(f[0],0):f[0],a=f[1],l=a-r,c=n?x0(r,a,t):l/(t+1);return Ju(r+c,a,c)}}function sS(t){_r.call(this,null,t)}sS.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]};ni(sS,_r,{transform(t,n){if(this.value&&!n.changed()&&!t.modified())return n.StopPropagation;var e=n.fork(n.NO_SOURCE|n.NO_FIELDS),o=n.materialize(n.SOURCE).source,f=t.field||Hl,r=CB().smooth(t.smooth!==!1),a=t.thresholds||zie(o,f,t),l=t.as===null?null:t.as||"contour",c=[];return o.forEach(i=>{const s=f(i),u=r.size([s.width,s.height])(s.values,Ir(a)?a:a(s.values));Rie(u,s,i,t),u.forEach(d=>{c.push(rw(i,ro(l!=null?{[l]:d}:d)))})}),this.value&&(e.rem=this.value),this.value=e.source=e.add=c,e}});function zie(t,n,e){const o=OB(e.levels||10,e.nice,e.zero!==!1);return e.resolve!=="shared"?o:o(t.map(f=>f0(n(f).values)))}function Rie(t,n,e,o){let f=o.scale||n.scale,r=o.translate||n.translate;if(ga(f)&&(f=f(e,o)),ga(r)&&(r=r(e,o)),(f===1||f==null)&&!r)return;const a=(wo(f)?f:f[0])||1,l=(wo(f)?f:f[1])||1,c=r&&r[0]||0,i=r&&r[1]||0;t.forEach(LB(n,a,l,c,i))}function LB(t,n,e,o,f){const r=t.x1||0,a=t.y1||0,l=n*e<0;function c(u){u.forEach(i)}function i(u){l&&u.reverse(),u.forEach(s)}function s(u){u[0]=(u[0]-r)*n+o,u[1]=(u[1]-a)*e+f}return function(u){return u.coordinates.forEach(c),u}}function LO(t,n,e){const o=t>=0?t:t6(n,e);return Math.round((Math.sqrt(4*o*o+1)-1)/2)}function n4(t){return ga(t)?t:$l(+t)}function PB(){var t=c=>c[0],n=c=>c[1],e=jm,o=[-1,-1],f=960,r=500,a=2;function l(c,i){const s=LO(o[0],c,t)>>a,u=LO(o[1],c,n)>>a,d=s?s+2:0,h=u?u+2:0,m=2*d+(f>>a),g=2*h+(r>>a),p=new Float32Array(m*g),v=new Float32Array(m*g);let y=p;c.forEach(w=>{const k=d+(+t(w)>>a),b=h+(+n(w)>>a);k>=0&&k=0&&b0&&u>0?(Dg(m,g,p,v,s),Ig(m,g,v,p,u),Dg(m,g,p,v,s),Ig(m,g,v,p,u),Dg(m,g,p,v,s),Ig(m,g,v,p,u)):s>0?(Dg(m,g,p,v,s),Dg(m,g,v,p,s),Dg(m,g,p,v,s),y=v):u>0&&(Ig(m,g,p,v,u),Ig(m,g,v,p,u),Ig(m,g,p,v,u),y=v);const x=i?Math.pow(2,-2*a):1/SI(y);for(let w=0,k=m*g;w>a),y2:h+(r>>a)}}return l.x=function(c){return arguments.length?(t=n4(c),l):t},l.y=function(c){return arguments.length?(n=n4(c),l):n},l.weight=function(c){return arguments.length?(e=n4(c),l):e},l.size=function(c){if(!arguments.length)return[f,r];var i=+c[0],s=+c[1];return i>=0&&s>=0||Pr("invalid size"),f=i,r=s,l},l.cellSize=function(c){return arguments.length?((c=+c)>=1||Pr("invalid cell size"),a=Math.floor(Math.log(c)/Math.LN2),l):1<=f&&(l>=r&&(c-=e[l-r+a*t]),o[l-f+a*t]=c/Math.min(l+1,t-1+r-l,r))}function Ig(t,n,e,o,f){const r=(f<<1)+1;for(let a=0;a=f&&(l>=r&&(c-=e[a+(l-r)*t]),o[a+(l-f)*t]=c/Math.min(l+1,n-1+r-l,r))}function lS(t){_r.call(this,null,t)}lS.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};const Fie=["x","y","weight","size","cellSize","bandwidth"];function DB(t,n){return Fie.forEach(e=>n[e]!=null?t[e](n[e]):0),t}ni(lS,_r,{transform(t,n){if(this.value&&!n.changed()&&!t.modified())return n.StopPropagation;var e=n.fork(n.NO_SOURCE|n.NO_FIELDS),o=n.materialize(n.SOURCE).source,f=Nie(o,t.groupby),r=(t.groupby||[]).map(xs),a=DB(PB(),t),l=t.as||"grid",c=[];function i(s,u){for(let d=0;dro(i({[l]:a(s,t.counts)},s.dims))),this.value&&(e.rem=this.value),this.value=e.source=e.add=c,e}});function Nie(t,n){var e=[],o=s=>s(l),f,r,a,l,c,i;if(n==null)e.push(t);else for(f={},r=0,a=t.length;re.push(l(s))),r&&a&&(n.visit(c,s=>{var u=r(s),d=a(s);u!=null&&d!=null&&(u=+u)===u&&(d=+d)===d&&o.push([u,d])}),e=e.concat({type:fT,geometry:{type:Bie,coordinates:o}})),this.value={type:cS,features:e}}});function hS(t){_r.call(this,null,t)}hS.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]};ni(hS,_r,{transform(t,n){var e=n.fork(n.ALL),o=this.value,f=t.field||Hl,r=t.as||"path",a=e.SOURCE;!o||t.modified()?(this.value=o=EB(t.projection),e.materialize().reflow()):a=f===Hl||n.modified(f.fields)?e.ADD_MOD:e.ADD;const l=jie(o,t.pointRadius);return e.visit(a,c=>c[r]=o(f(c))),o.pointRadius(l),e.modifies(r)}});function jie(t,n){const e=t.pointRadius();return t.context(null),n!=null&&t.pointRadius(n),e}function dS(t){_r.call(this,null,t)}dS.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]};ni(dS,_r,{transform(t,n){var e=t.projection,o=t.fields[0],f=t.fields[1],r=t.as||["x","y"],a=r[0],l=r[1],c;function i(s){const u=e([o(s),f(s)]);u?(s[a]=u[0],s[l]=u[1]):(s[a]=void 0,s[l]=void 0)}return t.modified()?n=n.materialize().reflow(!0).visit(n.SOURCE,i):(c=n.modified(o.fields)||n.modified(f.fields),n.visit(c?n.ADD_MOD:n.ADD,i)),n.modifies(r)}});function pS(t){_r.call(this,null,t)}pS.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]};ni(pS,_r,{transform(t,n){var e=n.fork(n.ALL),o=this.value,f=t.as||"shape",r=e.ADD;return(!o||t.modified())&&(this.value=o=Uie(EB(t.projection),t.field||Lu("datum"),t.pointRadius),e.materialize().reflow(),r=e.SOURCE),e.visit(r,a=>a[f]=o),e.modifies(f)}});function Uie(t,n,e){const o=e==null?f=>t(n(f)):f=>{var r=t.pointRadius(),a=t.pointRadius(e)(n(f));return t.pointRadius(r),a};return o.context=f=>(t.context(f),o),o}function gS(t){_r.call(this,[],t),this.generator=zre()}gS.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]};ni(gS,_r,{transform(t,n){var e=this.value,o=this.generator,f;if(!e.length||t.modified())for(const r in t)ga(o[r])&&o[r](t[r]);return f=o(),e.length?n.mod.push(yz(e[0],f)):n.add.push(ro(f)),e[0]=f,n}});function mS(t){_r.call(this,null,t)}mS.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]};ni(mS,_r,{transform(t,n){if(!n.changed()&&!t.modified())return n.StopPropagation;var e=n.materialize(n.SOURCE).source,o=t.resolve==="shared",f=t.field||Hl,r=qie(t.opacity,t),a=Vie(t.color,t),l=t.as||"image",c={$x:0,$y:0,$value:0,$max:o?f0(e.map(i=>f0(f(i).values))):0};return e.forEach(i=>{const s=f(i),u=pa({},i,c);o||(u.$max=f0(s.values||[])),i[l]=Hie(s,u,a.dep?a:$l(a(u)),r.dep?r:$l(r(u)))}),n.reflow(!0).modifies(l)}});function Vie(t,n){let e;return ga(t)?(e=o=>f_(t(o,n)),e.dep=IB(t)):e=$l(f_(t||"#888")),e}function qie(t,n){let e;return ga(t)?(e=o=>t(o,n),e.dep=IB(t)):t?e=$l(t):(e=o=>o.$value/o.$max||0,e.dep=!0),e}function IB(t){if(!ga(t))return!1;const n=uf(Bl(t));return n.$x||n.$y||n.$value||n.$max}function Hie(t,n,e,o){const f=t.width,r=t.height,a=t.x1||0,l=t.y1||0,c=t.x2||f,i=t.y2||r,s=t.values,u=s?p=>s[p]:Td,d=qd(c-a,i-l),h=d.getContext("2d"),m=h.getImageData(0,0,c-a,i-l),g=m.data;for(let p=l,v=0;p{t[o]!=null&&PO(e,o,t[o])})):cT.forEach(o=>{t.modified(o)&&PO(e,o,t[o])}),t.pointRadius!=null&&e.path.pointRadius(t.pointRadius),t.fit&&$ie(e,t),n.fork(n.NO_SOURCE|n.NO_FIELDS)}});function $ie(t,n){const e=Wie(n.fit);n.extent?t.fitExtent(n.extent,e):n.size&&t.fitSize(n.size,e)}function Gie(t){const n=oS((t||"mercator").toLowerCase());return n||Pr("Unrecognized projection type: "+t),n()}function PO(t,n,e){ga(t[n])&&t[n](e)}function Wie(t){return t=ki(t),t.length===1?t[0]:{type:cS,features:t.reduce((n,e)=>n.concat(Yie(e)),[])}}function Yie(t){return t.type===cS?t.features:ki(t).filter(n=>n!=null).map(n=>n.type===fT?n:{type:fT,geometry:n})}var Xie=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",contour:uS,geojson:fS,geopath:hS,geopoint:dS,geoshape:pS,graticule:gS,heatmap:mS,isocontour:sS,kde2d:lS,projection:zB});function Zie(t,n){var e,o=1;t==null&&(t=0),n==null&&(n=0);function f(){var r,a=e.length,l,c=0,i=0;for(r=0;r=(u=(l+i)/2))?l=u:i=u,(p=e>=(d=(c+s)/2))?c=d:s=d,f=r,!(r=r[v=p<<1|g]))return f[v]=a,t;if(h=+t._x.call(null,r.data),m=+t._y.call(null,r.data),n===h&&e===m)return a.next=r,f?f[v]=a:t._root=a,t;do f=f?f[v]=new Array(4):t._root=new Array(4),(g=n>=(u=(l+i)/2))?l=u:i=u,(p=e>=(d=(c+s)/2))?c=d:s=d;while((v=p<<1|g)===(y=(m>=d)<<1|h>=u));return f[y]=r,f[v]=a,t}function Kie(t){var n,e,o=t.length,f,r,a=new Array(o),l=new Array(o),c=1/0,i=1/0,s=-1/0,u=-1/0;for(e=0;es&&(s=f),ru&&(u=r));if(c>s||i>u)return this;for(this.cover(c,i).cover(s,u),e=0;et||t>=f||o>n||n>=r;)switch(i=(ns||(l=m.y0)>u||(c=m.x1)=v)<<1|t>=p)&&(m=d[d.length-1],d[d.length-1]=d[d.length-1-g],d[d.length-1-g]=m)}else{var y=t-+this._x.call(null,h.data),x=n-+this._y.call(null,h.data),w=y*y+x*x;if(w=(d=(a+c)/2))?a=d:c=d,(g=u>=(h=(l+i)/2))?l=h:i=h,n=e,!(e=e[p=g<<1|m]))return this;if(!e.length)break;(n[p+1&3]||n[p+2&3]||n[p+3&3])&&(o=n,v=p)}for(;e.data!==t;)if(f=e,!(e=e.next))return this;return(r=e.next)&&delete e.next,f?(r?f.next=r:delete f.next,this):n?(r?n[p]=r:delete n[p],(e=n[0]||n[1]||n[2]||n[3])&&e===(n[3]||n[2]||n[1]||n[0])&&!e.length&&(o?o[v]=e:this._root=e),this):(this._root=r,this)}function iae(t){for(var n=0,e=t.length;nd.index){var M=h-_.x-_.vx,E=m-_.y-_.vy,D=M*M+E*E;Dh+A||bm+A||Ti.r&&(i.r=i[s].r)}function c(){if(!!n){var i,s=n.length,u;for(e=new Array(s),i=0;i[n(k,b,a),k])),w;for(p=0,l=new Array(v);p{}};function FB(){for(var t=0,n=arguments.length,e={},o;t=0&&(o=e.slice(f+1),e=e.slice(0,f)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:o}})}Kb.prototype=FB.prototype={constructor:Kb,on:function(t,n){var e=this._,o=xae(t+"",e),f,r=-1,a=o.length;if(arguments.length<2){for(;++r0)for(var e=new Array(f),o=0,f,r;o=0&&t._call.call(void 0,n),t=t._next;--_m}function RO(){A0=(d2=ry.now())+Rw,_m=xv=0;try{wae()}finally{_m=0,Tae(),A0=0}}function kae(){var t=ry.now(),n=t-d2;n>NB&&(Rw-=n,d2=t)}function Tae(){for(var t,n=h2,e,o=1/0;n;)n._call?(o>n._time&&(o=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:h2=e);bv=t,hT(o)}function hT(t){if(!_m){xv&&(xv=clearTimeout(xv));var n=t-A0;n>24?(t<1/0&&(xv=setTimeout(RO,t-ry.now()-Rw)),q1&&(q1=clearInterval(q1))):(q1||(d2=ry.now(),q1=setInterval(kae,NB)),_m=1,BB(RO))}}function Aae(t,n,e){var o=new p2,f=n;return n==null?(o.restart(t,n,e),o):(o._restart=o.restart,o.restart=function(r,a,l){a=+a,l=l==null?xS():+l,o._restart(function c(i){i+=f,o._restart(c,f+=a,l),r(i)},a,l)},o.restart(t,n,e),o)}const Mae=1664525,Sae=1013904223,FO=4294967296;function Eae(){let t=1;return()=>(t=(Mae*t+Sae)%FO)/FO}function Cae(t){return t.x}function Oae(t){return t.y}var Lae=10,Pae=Math.PI*(3-Math.sqrt(5));function Dae(t){var n,e=1,o=.001,f=1-Math.pow(o,1/300),r=0,a=.6,l=new Map,c=jB(u),i=FB("tick","end"),s=Eae();t==null&&(t=[]);function u(){d(),i.call("tick",n),e1?(p==null?l.delete(g):l.set(g,m(p)),n):l.get(g)},find:function(g,p,v){var y=0,x=t.length,w,k,b,T,_;for(v==null?v=1/0:v*=v,y=0;y1?(i.on(g,p),n):i.on(g)}}}function Iae(){var t,n,e,o,f=uu(-30),r,a=1,l=1/0,c=.81;function i(h){var m,g=t.length,p=vS(t,Cae,Oae).visitAfter(u);for(o=h,m=0;m=l)return;(h.data!==n||h.next)&&(v===0&&(v=Id(e),w+=v*v),y===0&&(y=Id(e),w+=y*y),w=0;)e.tick();else if(e.stopped()&&e.restart(),!o)return n.StopPropagation}return this.finish(t,n)},finish(t,n){const e=n.dataflow;for(let l=this._argops,c=0,i=l.length,s;ct.touch(n).run()}function Bae(t,n){const e=Dae(t),o=e.stop,f=e.restart;let r=!1;return e.stopped=()=>r,e.restart=()=>(r=!1,f()),e.stop=()=>(r=!0,o()),VB(e,n,!0).on("end",()=>r=!0)}function VB(t,n,e,o){var f=ki(n.forces),r,a,l,c;for(r=0,a=dT.length;rn(o,e):n)}var qae=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",force:bS});function Hae(t,n){return t.parent===n.parent?1:2}function $ae(t){return t.reduce(Gae,0)/t.length}function Gae(t,n){return t+n.x}function Wae(t){return 1+t.reduce(Yae,0)}function Yae(t,n){return Math.max(t,n.y)}function Xae(t){for(var n;n=t.children;)t=n[0];return t}function Zae(t){for(var n;n=t.children;)t=n[n.length-1];return t}function Jae(){var t=Hae,n=1,e=1,o=!1;function f(r){var a,l=0;r.eachAfter(function(d){var h=d.children;h?(d.x=$ae(h),d.y=Wae(h)):(d.x=a?l+=t(d,a):0,d.y=0,a=d)});var c=Xae(r),i=Zae(r),s=c.x-t(c,i)/2,u=i.x+t(i,c)/2;return r.eachAfter(o?function(d){d.x=(d.x-r.x)*n,d.y=(r.y-d.y)*e}:function(d){d.x=(d.x-s)/(u-s)*n,d.y=(1-(r.y?d.y/r.y:1))*e})}return f.separation=function(r){return arguments.length?(t=r,f):t},f.size=function(r){return arguments.length?(o=!1,n=+r[0],e=+r[1],f):o?null:[n,e]},f.nodeSize=function(r){return arguments.length?(o=!0,n=+r[0],e=+r[1],f):o?[n,e]:null},f}function Kae(t){var n=0,e=t.children,o=e&&e.length;if(!o)n=1;else for(;--o>=0;)n+=e[o].value;t.value=n}function Qae(){return this.eachAfter(Kae)}function eoe(t,n){let e=-1;for(const o of this)t.call(n,o,++e,this);return this}function toe(t,n){for(var e=this,o=[e],f,r,a=-1;e=o.pop();)if(t.call(n,e,++a,this),f=e.children)for(r=f.length-1;r>=0;--r)o.push(f[r]);return this}function noe(t,n){for(var e=this,o=[e],f=[],r,a,l,c=-1;e=o.pop();)if(f.push(e),r=e.children)for(a=0,l=r.length;a=0;)e+=o[f].value;n.value=e})}function aoe(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})}function ooe(t){for(var n=this,e=soe(n,t),o=[n];n!==e;)n=n.parent,o.push(n);for(var f=o.length;t!==e;)o.splice(f,0,t),t=t.parent;return o}function soe(t,n){if(t===n)return t;var e=t.ancestors(),o=n.ancestors(),f=null;for(t=e.pop(),n=o.pop();t===n;)f=t,t=e.pop(),n=o.pop();return f}function loe(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n}function uoe(){return Array.from(this)}function coe(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t}function foe(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n}function*hoe(){var t=this,n,e=[t],o,f,r;do for(n=e.reverse(),e=[];t=n.pop();)if(yield t,o=t.children)for(f=0,r=o.length;f=0;--l)f.push(r=a[l]=new wm(a[l])),r.parent=o,r.depth=o.depth+1;return e.eachBefore(qB)}function doe(){return _S(this).eachBefore(moe)}function poe(t){return t.children}function goe(t){return Array.isArray(t)?t[1]:null}function moe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function qB(t){var n=0;do t.height=n;while((t=t.parent)&&t.height<++n)}function wm(t){this.data=t,this.depth=this.height=0,this.parent=null}wm.prototype=_S.prototype={constructor:wm,count:Qae,each:eoe,eachAfter:noe,eachBefore:toe,find:roe,sum:ioe,sort:aoe,path:ooe,ancestors:loe,descendants:uoe,leaves:coe,links:foe,copy:doe,[Symbol.iterator]:hoe};function Qb(t){return t==null?null:HB(t)}function HB(t){if(typeof t!="function")throw new Error;return t}function r0(){return 0}function qg(t){return function(){return t}}const voe=1664525,yoe=1013904223,BO=4294967296;function xoe(){let t=1;return()=>(t=(voe*t+yoe)%BO)/BO}function boe(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function _oe(t,n){let e=t.length,o,f;for(;e;)f=n()*e--|0,o=t[e],t[e]=t[f],t[f]=o;return t}function woe(t,n){for(var e=0,o=(t=_oe(Array.from(t),n)).length,f=[],r,a;e0&&e*e>o*o+f*f}function r4(t,n){for(var e=0;e1e-6?(M+Math.sqrt(M*M-4*A*E))/(2*A):E/M);return{x:o+b+T*D,y:f+_+S*D,r:D}}function jO(t,n,e){var o=t.x-n.x,f,r,a=t.y-n.y,l,c,i=o*o+a*a;i?(r=n.r+e.r,r*=r,c=t.r+e.r,c*=c,r>c?(f=(i+c-r)/(2*i),l=Math.sqrt(Math.max(0,c/i-f*f)),e.x=t.x-f*o-l*a,e.y=t.y-f*a+l*o):(f=(i+r-c)/(2*i),l=Math.sqrt(Math.max(0,r/i-f*f)),e.x=n.x+f*o-l*a,e.y=n.y+f*a+l*o)):(e.x=n.x+e.r,e.y=n.y)}function UO(t,n){var e=t.r+n.r-1e-6,o=n.x-t.x,f=n.y-t.y;return e>0&&e*e>o*o+f*f}function VO(t){var n=t._,e=t.next._,o=n.r+e.r,f=(n.x*e.r+e.x*n.r)/o,r=(n.y*e.r+e.y*n.r)/o;return f*f+r*r}function vb(t){this._=t,this.next=null,this.previous=null}function Moe(t,n){if(!(r=(t=boe(t)).length))return 0;var e,o,f,r,a,l,c,i,s,u,d;if(e=t[0],e.x=0,e.y=0,!(r>1))return e.r;if(o=t[1],e.x=-o.r,o.x=e.r,o.y=0,!(r>2))return e.r+o.r;jO(o,e,f=t[2]),e=new vb(e),o=new vb(o),f=new vb(f),e.next=f.previous=o,o.next=e.previous=f,f.next=o.previous=e;e:for(c=3;cDoe(e(w,k,f))),y=v.map(WO),x=new Set(v).add("");for(const w of y)x.has(w)||(x.add(w),v.push(w),y.push(WO(w)),r.push(a4));a=(w,k)=>v[k],l=(w,k)=>y[k]}for(s=0,c=r.length;s=0&&(h=r[v],h.data===a4);--v)h.data=null}if(u.parent=Ooe,u.eachBefore(function(v){v.depth=v.parent.depth+1,--c}).eachBefore(qB),u.parent=null,c>0)throw new Error("cycle");return u}return o.id=function(f){return arguments.length?(t=Qb(f),o):t},o.parentId=function(f){return arguments.length?(n=Qb(f),o):n},o.path=function(f){return arguments.length?(e=Qb(f),o):e},o}function Doe(t){t=`${t}`;let n=t.length;return pT(t,n-1)&&!pT(t,n-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function WO(t){let n=t.length;if(n<2)return"";for(;--n>1&&!pT(t,n););return t.slice(0,n)}function pT(t,n){if(t[n]==="/"){let e=0;for(;n>0&&t[--n]==="\\";)++e;if((e&1)===0)return!0}return!1}function Ioe(t,n){return t.parent===n.parent?1:2}function o4(t){var n=t.children;return n?n[0]:t.t}function s4(t){var n=t.children;return n?n[n.length-1]:t.t}function zoe(t,n,e){var o=e/(n.i-t.i);n.c-=o,n.s+=e,t.c+=o,n.z+=e,n.m+=e}function Roe(t){for(var n=0,e=0,o=t.children,f=o.length,r;--f>=0;)r=o[f],r.z+=n,r.m+=n,n+=r.s+(e+=r.c)}function Foe(t,n,e){return t.a.parent===n.parent?t.a:e}function e_(t,n){this._=t,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=n}e_.prototype=Object.create(wm.prototype);function Noe(t){for(var n=new e_(t,0),e,o=[n],f,r,a,l;e=o.pop();)if(r=e._.children)for(e.children=new Array(l=r.length),a=l-1;a>=0;--a)o.push(f=e.children[a]=new e_(r[a],a)),f.parent=e;return(n.parent=new e_(null,0)).children=[n],n}function Boe(){var t=Ioe,n=1,e=1,o=null;function f(i){var s=Noe(i);if(s.eachAfter(r),s.parent.m=-s.z,s.eachBefore(a),o)i.eachBefore(c);else{var u=i,d=i,h=i;i.eachBefore(function(y){y.xd.x&&(d=y),y.depth>h.depth&&(h=y)});var m=u===d?1:t(u,d)/2,g=m-u.x,p=n/(d.x+m+g),v=e/(h.depth||1);i.eachBefore(function(y){y.x=(y.x+g)*p,y.y=y.depth*v})}return i}function r(i){var s=i.children,u=i.parent.children,d=i.i?u[i.i-1]:null;if(s){Roe(i);var h=(s[0].z+s[s.length-1].z)/2;d?(i.z=d.z+t(i._,d._),i.m=i.z-h):i.z=h}else d&&(i.z=d.z+t(i._,d._));i.parent.A=l(i,d,i.parent.A||u[0])}function a(i){i._.x=i.z+i.parent.m,i.m+=i.parent.m}function l(i,s,u){if(s){for(var d=i,h=i,m=s,g=d.parent.children[0],p=d.m,v=h.m,y=m.m,x=g.m,w;m=s4(m),d=o4(d),m&&d;)g=o4(g),h=s4(h),h.a=i,w=m.z+y-d.z-p+t(m._,d._),w>0&&(zoe(Foe(m,i,u),i,w),p+=w,v+=w),y+=m.m,p+=d.m,x+=g.m,v+=h.m;m&&!s4(h)&&(h.t=m,h.m+=y-v),d&&!o4(g)&&(g.t=d,g.m+=p-x,u=i)}return u}function c(i){i.x*=n,i.y=i.depth*e}return f.separation=function(i){return arguments.length?(t=i,f):t},f.size=function(i){return arguments.length?(o=!1,n=+i[0],e=+i[1],f):o?null:[n,e]},f.nodeSize=function(i){return arguments.length?(o=!0,n=+i[0],e=+i[1],f):o?[n,e]:null},f}function Fw(t,n,e,o,f){for(var r=t.children,a,l=-1,c=r.length,i=t.value&&(f-e)/t.value;++ly&&(y=i),b=p*p*k,x=Math.max(y/b,b/v),x>w){p-=i;break}w=x}a.push(c={value:p,dice:h1?o:1)},e}(YB);function joe(){var t=ZB,n=!1,e=1,o=1,f=[0],r=r0,a=r0,l=r0,c=r0,i=r0;function s(d){return d.x0=d.y0=0,d.x1=e,d.y1=o,d.eachBefore(u),f=[0],n&&d.eachBefore(WB),d}function u(d){var h=f[d.depth],m=d.x0+h,g=d.y0+h,p=d.x1-h,v=d.y1-h;p=d-1){var y=r[u];y.x0=m,y.y0=g,y.x1=p,y.y1=v;return}for(var x=i[u],w=h/2+x,k=u+1,b=d-1;k>>1;i[T]v-g){var A=h?(m*S+p*_)/h:p;s(u,k,_,m,g,A,v),s(k,d,S,A,g,p,v)}else{var M=h?(g*S+v*_)/h:v;s(u,k,_,m,g,p,M),s(k,d,S,m,M,p,v)}}}function Voe(t,n,e,o,f){(t.depth&1?Fw:Gy)(t,n,e,o,f)}var qoe=function t(n){function e(o,f,r,a,l){if((c=o._squarify)&&c.ratio===n)for(var c,i,s,u,d=-1,h,m=c.length,g=o.value;++d1?o:1)},e}(YB);function gT(t,n,e){const o={};return t.each(f=>{const r=f.data;e(r)&&(o[n(r)]=f)}),t.lookup=o,t}function wS(t){_r.call(this,null,t)}wS.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const Hoe=t=>t.values;ni(wS,_r,{transform(t,n){n.source||Pr("Nest transform requires an upstream data source.");var e=t.generate,o=t.modified(),f=n.clone(),r=this.value;return(!r||o||n.changed())&&(r&&r.each(a=>{a.children&&nw(a.data)&&f.rem.push(a.data)}),this.value=r=_S({values:ki(t.keys).reduce((a,l)=>(a.key(l),a),$oe()).entries(f.source)},Hoe),e&&r.each(a=>{a.children&&(a=ro(a.data),f.add.push(a),f.source.push(a))}),gT(r,$i,$i)),f.source.root=r,f}});function $oe(){const t=[],n={entries:f=>o(e(f,0),0),key:f=>(t.push(f),n)};function e(f,r){if(r>=t.length)return f;const a=f.length,l=t[r++],c={},i={};let s=-1,u,d,h;for(;++st.length)return f;const a=[];for(const l in f)a.push({key:l,values:o(f[l],r)});return a}return n}function Zh(t){_r.call(this,null,t)}const Goe=(t,n)=>t.parent===n.parent?1:2;ni(Zh,_r,{transform(t,n){(!n.source||!n.source.root)&&Pr(this.constructor.name+" transform requires a backing tree data source.");const e=this.layout(t.method),o=this.fields,f=n.source.root,r=t.as||o;t.field?f.sum(t.field):f.count(),t.sort&&f.sort(q0(t.sort,a=>a.data)),Woe(e,this.params,t),e.separation&&e.separation(t.separation!==!1?Goe:jm);try{this.value=e(f)}catch(a){Pr(a)}return f.each(a=>Yoe(a,o,r)),n.reflow(t.modified()).modifies(r).modifies("leaf")}});function Woe(t,n,e){for(let o,f=0,r=n.length;fr[$i(a)]=1),o.each(a=>{const l=a.data,c=a.parent&&a.parent.data;c&&r[$i(l)]&&r[$i(c)]&&f.add.push(ro({source:c,target:l}))}),this.value=f.add):n.changed(n.MOD)&&(n.visit(n.MOD,a=>r[$i(a)]=1),e.forEach(a=>{(r[$i(a.source)]||r[$i(a.target)])&&f.mod.push(a)})),f}});const XO={binary:Uoe,dice:Gy,slice:Fw,slicedice:Voe,squarify:ZB,resquarify:qoe},xT=["x0","y0","x1","y1","depth","children"];function ES(t){Zh.call(this,t)}ES.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:xT.length,default:xT}]};ni(ES,Zh,{layout(){const t=joe();return t.ratio=n=>{const e=t.tile();e.ratio&&t.tile(e.ratio(n))},t.method=n=>{qi(XO,n)?t.tile(XO[n]):Pr("Unrecognized Treemap layout method: "+n)},t},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:xT});var Xoe=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",nest:wS,pack:kS,partition:TS,stratify:AS,tree:MS,treelinks:SS,treemap:ES});const l4=4278190080;function Zoe(t,n){const e=t.bitmap();return(n||[]).forEach(o=>e.set(t(o.boundary[0]),t(o.boundary[3]))),[e,void 0]}function Joe(t,n,e,o,f){const r=t.width,a=t.height,l=o||f,c=qd(r,a).getContext("2d"),i=qd(r,a).getContext("2d"),s=l&&qd(r,a).getContext("2d");e.forEach(_=>t_(c,_,!1)),t_(i,n,!1),l&&t_(s,n,!0);const u=u4(c,r,a),d=u4(i,r,a),h=l&&u4(s,r,a),m=t.bitmap(),g=l&&t.bitmap();let p,v,y,x,w,k,b,T;for(v=0;v{f.items.forEach(r=>t_(t,r.items,e))}):tc[o].draw(t,{items:e?n.map(Koe):n})}function Koe(t){const n=rw(t,{});return n.stroke&&n.strokeOpacity!==0||n.fill&&n.fillOpacity!==0?{...n,strokeOpacity:1,stroke:"#000",fillOpacity:0}:n}const Mh=5,tu=31,iy=32,wd=new Uint32Array(iy+1),Yc=new Uint32Array(iy+1);Yc[0]=0;wd[0]=~Yc[0];for(let t=1;t<=iy;++t)Yc[t]=Yc[t-1]<<1|1,wd[t]=~Yc[t];function Qoe(t,n){const e=new Uint32Array(~~((t*n+iy)/iy));function o(r,a){e[r]|=a}function f(r,a){e[r]&=a}return{array:e,get:(r,a)=>{const l=a*t+r;return e[l>>>Mh]&1<<(l&tu)},set:(r,a)=>{const l=a*t+r;o(l>>>Mh,1<<(l&tu))},clear:(r,a)=>{const l=a*t+r;f(l>>>Mh,~(1<<(l&tu)))},getRange:(r,a,l,c)=>{let i=c,s,u,d,h;for(;i>=a;--i)if(s=i*t+r,u=i*t+l,d=s>>>Mh,h=u>>>Mh,d===h){if(e[d]&wd[s&tu]&Yc[(u&tu)+1])return!0}else{if(e[d]&wd[s&tu]||e[h]&Yc[(u&tu)+1])return!0;for(let m=d+1;m{let i,s,u,d,h;for(;a<=c;++a)if(i=a*t+r,s=a*t+l,u=i>>>Mh,d=s>>>Mh,u===d)o(u,wd[i&tu]&Yc[(s&tu)+1]);else for(o(u,wd[i&tu]),o(d,Yc[(s&tu)+1]),h=u+1;h{let i,s,u,d,h;for(;a<=c;++a)if(i=a*t+r,s=a*t+l,u=i>>>Mh,d=s>>>Mh,u===d)f(u,Yc[i&tu]|wd[(s&tu)+1]);else for(f(u,Yc[i&tu]),f(d,wd[(s&tu)+1]),h=u+1;hr<0||a<0||c>=n||l>=t}}function ese(t,n,e){const o=Math.max(1,Math.sqrt(t*n/1e6)),f=~~((t+2*e+o)/o),r=~~((n+2*e+o)/o),a=l=>~~((l+e)/o);return a.invert=l=>l*o-e,a.bitmap=()=>Qoe(f,r),a.ratio=o,a.padding=e,a.width=t,a.height=n,a}function tse(t,n,e,o){const f=t.width,r=t.height;return function(a){const l=a.datum.datum.items[o].items,c=l.length,i=a.datum.fontSize,s=af.width(a.datum,a.datum.text);let u=0,d,h,m,g,p,v,y;for(let x=0;x=u&&(u=y,a.x=p,a.y=v);return p=s/2,v=i/2,d=a.x-p,h=a.x+p,m=a.y-v,g=a.y+v,a.align="center",d<0&&h<=f?a.align="left":0<=d&&ff||n-(a=o/2)<0||n+a>r}function zd(t,n,e,o,f,r,a,l){const c=f*r/(o*2),i=t(n-c),s=t(n+c),u=t(e-(r=r/2)),d=t(e+r);return a.outOfBounds(i,u,s,d)||a.getRange(i,u,s,d)||l&&l.getRange(i,u,s,d)}function nse(t,n,e,o){const f=t.width,r=t.height,a=n[0],l=n[1];function c(i,s,u,d,h){const m=t.invert(i),g=t.invert(s);let p=u,v=r,y;if(!g2(m,g,d,h,f,r)&&!zd(t,m,g,h,d,p,a,l)&&!zd(t,m,g,h,d,h,a,null)){for(;v-p>=1;)y=(p+v)/2,zd(t,m,g,h,d,y,a,l)?v=y:p=y;if(p>u)return[m,g,p,!0]}}return function(i){const s=i.datum.datum.items[o].items,u=s.length,d=i.datum.fontSize,h=af.width(i.datum,i.datum.text);let m=e?d:0,g=!1,p=!1,v=0,y,x,w,k,b,T,_,S,A,M,E,D,O,R,z,L,P;for(let N=0;Nx&&(P=y,y=x,x=P),w>k&&(P=w,w=k,k=P),A=t(y),E=t(x),M=~~((A+E)/2),D=t(w),R=t(k),O=~~((D+R)/2),_=M;_>=A;--_)for(S=O;S>=D;--S)L=c(_,S,m,h,d),L&&([i.x,i.y,m,g]=L);for(_=M;_<=E;++_)for(S=O;S<=R;++S)L=c(_,S,m,h,d),L&&([i.x,i.y,m,g]=L);!g&&!e&&(z=Math.abs(x-y+k-w),b=(y+x)/2,T=(w+k)/2,z>=v&&!g2(b,T,h,d,f,r)&&!zd(t,b,T,d,h,d,a,null)&&(v=z,i.x=b,i.y=T,p=!0))}return g||p?(b=h/2,T=d/2,a.setRange(t(i.x-b),t(i.y-T),t(i.x+b),t(i.y+T)),i.align="center",i.baseline="middle",!0):!1}}const rse=[-1,-1,1,1],ise=[-1,1,-1,1];function ase(t,n,e,o){const f=t.width,r=t.height,a=n[0],l=n[1],c=t.bitmap();return function(i){const s=i.datum.datum.items[o].items,u=s.length,d=i.datum.fontSize,h=af.width(i.datum,i.datum.text),m=[];let g=e?d:0,p=!1,v=!1,y=0,x,w,k,b,T,_,S,A,M,E,D,O;for(let R=0;R=1;)D=(M+E)/2,zd(t,T,_,d,h,D,a,l)?E=D:M=D;M>g&&(i.x=T,i.y=_,g=M,p=!0)}}!p&&!e&&(O=Math.abs(w-x+b-k),T=(x+w)/2,_=(k+b)/2,O>=y&&!g2(T,_,h,d,f,r)&&!zd(t,T,_,d,h,d,a,null)&&(y=O,i.x=T,i.y=_,v=!0))}return p||v?(T=h/2,_=d/2,a.setRange(t(i.x-T),t(i.y-_),t(i.x+T),t(i.y+_)),i.align="center",i.baseline="middle",!0):!1}}const ose=["right","center","left"],sse=["bottom","middle","top"];function lse(t,n,e,o){const f=t.width,r=t.height,a=n[0],l=n[1],c=o.length;return function(i){var s;const u=i.boundary,d=i.datum.fontSize;if(u[2]<0||u[5]<0||u[0]>f||u[3]>r)return!1;let h=(s=i.textWidth)!==null&&s!==void 0?s:0,m,g,p,v,y,x,w,k,b,T,_,S,A,M,E;for(let D=0;D>>2&3)-1,p=m===0&&g===0||o[D]<0,v=m&&g?Math.SQRT1_2:1,y=o[D]<0?-1:1,x=u[1+m]+o[D]*m*v,_=u[4+g]+y*d*g/2+o[D]*g*v,k=_-d/2,b=_+d/2,S=t(x),M=t(k),E=t(b),!h)if(ZO(S,S,M,E,a,l,x,x,k,b,u,p))h=af.width(i.datum,i.datum.text);else continue;if(T=x+y*h*m/2,x=T-h/2,w=T+h/2,S=t(x),A=t(w),ZO(S,A,M,E,a,l,x,w,k,b,u,p))return i.x=m?m*y<0?w:x:T,i.y=g?g*y<0?b:k:_,i.align=ose[m*y+1],i.baseline=sse[g*y+1],a.setRange(S,M,A,E),!0}return!1}}function ZO(t,n,e,o,f,r,a,l,c,i,s,u){return!(f.outOfBounds(t,e,n,o)||(u&&r||f).getRange(t,e,n,o))}const c4=0,f4=4,h4=8,d4=0,p4=1,g4=2,use={"top-left":c4+d4,top:c4+p4,"top-right":c4+g4,left:f4+d4,middle:f4+p4,right:f4+g4,"bottom-left":h4+d4,bottom:h4+p4,"bottom-right":h4+g4},cse={naive:tse,"reduced-search":nse,floodfill:ase};function fse(t,n,e,o,f,r,a,l,c,i,s){if(!t.length)return t;const u=Math.max(o.length,f.length),d=hse(o,u),h=dse(f,u),m=pse(t[0].datum),g=m==="group"&&t[0].datum.items[c].marktype,p=g==="area",v=gse(m,g,l,c),y=i===null||i===1/0,x=p&&s==="naive";let w=-1,k=-1;const b=t.map(A=>{const M=y?af.width(A,A.text):void 0;return w=Math.max(w,M),k=Math.max(k,A.fontSize),{datum:A,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:v(A),textWidth:M}});i=i===null||i===1/0?Math.max(w,k)+Math.max(...o):i;const T=ese(n[0],n[1],i);let _;if(!x){e&&b.sort((E,D)=>e(E.datum,D.datum));let A=!1;for(let E=0;EE.datum);_=r.length||M?Joe(T,M||[],r,A,p):Zoe(T,a&&b)}const S=p?cse[s](T,_,a,c):lse(T,_,h,d);return b.forEach(A=>A.opacity=+S(A)),b}function hse(t,n){const e=new Float64Array(n),o=t.length;for(let f=0;f[r.x,r.x,r.x,r.y,r.y,r.y];return t?t==="line"||t==="area"?r=>f(r.datum):n==="line"?r=>{const a=r.datum.items[o].items;return f(a.length?a[e==="start"?0:a.length-1]:{x:NaN,y:NaN})}:r=>{const a=r.datum.bounds;return[a.x1,(a.x1+a.x2)/2,a.x2,a.y1,(a.y1+a.y2)/2,a.y2]}:f}const bT=["x","y","opacity","align","baseline"],JB=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function CS(t){_r.call(this,null,t)}CS.Definition={type:"Label",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"sort",type:"compare"},{name:"anchor",type:"string",array:!0,default:JB},{name:"offset",type:"number",array:!0,default:[1]},{name:"padding",type:"number",default:0,null:!0},{name:"lineAnchor",type:"string",values:["start","end"],default:"end"},{name:"markIndex",type:"number",default:0},{name:"avoidBaseMark",type:"boolean",default:!0},{name:"avoidMarks",type:"data",array:!0},{name:"method",type:"string",default:"naive"},{name:"as",type:"string",array:!0,length:bT.length,default:bT}]};ni(CS,_r,{transform(t,n){function e(r){const a=t[r];return ga(a)&&n.modified(a.fields)}const o=t.modified();if(!(o||n.changed(n.ADD_REM)||e("sort")))return;(!t.size||t.size.length!==2)&&Pr("Size parameter should be specified as a [width, height] array.");const f=t.as||bT;return fse(n.materialize(n.SOURCE).source||[],t.size,t.sort,ki(t.offset==null?1:t.offset),ki(t.anchor||JB),t.avoidMarks||[],t.avoidBaseMark!==!1,t.lineAnchor||"end",t.markIndex||0,t.padding===void 0?0:t.padding,t.method||"naive").forEach(r=>{const a=r.datum;a[f[0]]=r.x,a[f[1]]=r.y,a[f[2]]=r.opacity,a[f[3]]=r.align,a[f[4]]=r.baseline}),n.reflow(o).modifies(f)}});var mse=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",label:CS});function KB(t,n){var e=[],o=function(s){return s(l)},f,r,a,l,c,i;if(n==null)e.push(t);else for(f={},r=0,a=t.length;r{Rz(i,t.x,t.y,t.bandwidth||.3).forEach(s=>{const u={};for(let d=0;dt==="poly"?n:t==="quad"?2:1;function LS(t){_r.call(this,null,t)}LS.Definition={type:"Regression",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"string",default:"linear",values:Object.keys(_T)},{name:"order",type:"number",default:3},{name:"extent",type:"number",array:!0,length:2},{name:"params",type:"boolean",default:!1},{name:"as",type:"string",array:!0}]};ni(LS,_r,{transform(t,n){const e=n.fork(n.NO_SOURCE|n.NO_FIELDS);if(!this.value||n.changed()||t.modified()){const o=n.materialize(n.SOURCE).source,f=KB(o,t.groupby),r=(t.groupby||[]).map(xs),a=t.method||"linear",l=t.order||3,c=vse(a,l),i=t.as||[xs(t.x),xs(t.y)],s=_T[a],u=[];let d=t.extent;qi(_T,a)||Pr("Invalid regression method: "+a),d!=null&&a==="log"&&d[0]<=0&&(n.dataflow.warn("Ignoring extent with values <= 0 for log regression."),d=null),f.forEach(h=>{if(h.length<=c){n.dataflow.warn("Skipping regression with more parameters than data points.");return}const g=s(h,t.x,t.y,l);if(t.params){u.push(ro({keys:h.dims,coef:g.coef,rSquared:g.rSquared}));return}const p=d||Zf(h,t.x),v=y=>{const x={};for(let w=0;wv([y,g.predict(y)])):cw(g.predict,p,25,200).forEach(v)}),this.value&&(e.rem=this.value),this.value=e.add=e.source=u}return e}});var yse=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",loess:OS,regression:LS});const jh=11102230246251565e-32,Ol=134217729,xse=(3+8*jh)*jh;function m4(t,n,e,o,f){let r,a,l,c,i=n[0],s=o[0],u=0,d=0;s>i==s>-i?(r=i,i=n[++u]):(r=s,s=o[++d]);let h=0;if(ui==s>-i?(a=i+r,l=r-(a-i),i=n[++u]):(a=s+r,l=r-(a-s),s=o[++d]),r=a,l!==0&&(f[h++]=l);ui==s>-i?(a=r+i,c=a-r,l=r-(a-c)+(i-c),i=n[++u]):(a=r+s,c=a-r,l=r-(a-c)+(s-c),s=o[++d]),r=a,l!==0&&(f[h++]=l);for(;u=O||-D>=O||(u=t-S,l=t-(S+u)+(u-f),u=e-A,i=e-(A+u)+(u-f),u=n-M,c=n-(M+u)+(u-r),u=o-E,s=o-(E+u)+(u-r),l===0&&c===0&&i===0&&s===0)||(O=kse*a+xse*Math.abs(D),D+=S*s+E*l-(M*i+A*c),D>=O||-D>=O))return D;w=l*E,d=Ol*l,h=d-(d-l),m=l-h,d=Ol*E,g=d-(d-E),p=E-g,k=m*p-(w-h*g-m*g-h*p),b=c*A,d=Ol*c,h=d-(d-c),m=c-h,d=Ol*A,g=d-(d-A),p=A-g,T=m*p-(b-h*g-m*g-h*p),v=k-T,u=k-v,nu[0]=k-(v+u)+(u-T),y=w+v,u=y-w,x=w-(y-u)+(v-u),v=x-b,u=x-v,nu[1]=x-(v+u)+(u-b),_=y+v,u=_-y,nu[2]=y-(_-u)+(v-u),nu[3]=_;const R=m4(4,zg,4,nu,JO);w=S*s,d=Ol*S,h=d-(d-S),m=S-h,d=Ol*s,g=d-(d-s),p=s-g,k=m*p-(w-h*g-m*g-h*p),b=M*i,d=Ol*M,h=d-(d-M),m=M-h,d=Ol*i,g=d-(d-i),p=i-g,T=m*p-(b-h*g-m*g-h*p),v=k-T,u=k-v,nu[0]=k-(v+u)+(u-T),y=w+v,u=y-w,x=w-(y-u)+(v-u),v=x-b,u=x-v,nu[1]=x-(v+u)+(u-b),_=y+v,u=_-y,nu[2]=y-(_-u)+(v-u),nu[3]=_;const z=m4(R,JO,4,nu,KO);w=l*s,d=Ol*l,h=d-(d-l),m=l-h,d=Ol*s,g=d-(d-s),p=s-g,k=m*p-(w-h*g-m*g-h*p),b=c*i,d=Ol*c,h=d-(d-c),m=c-h,d=Ol*i,g=d-(d-i),p=i-g,T=m*p-(b-h*g-m*g-h*p),v=k-T,u=k-v,nu[0]=k-(v+u)+(u-T),y=w+v,u=y-w,x=w-(y-u)+(v-u),v=x-b,u=x-v,nu[1]=x-(v+u)+(u-b),_=y+v,u=_-y,nu[2]=y-(_-u)+(v-u),nu[3]=_;const L=m4(z,KO,4,nu,QO);return QO[L-1]}function yb(t,n,e,o,f,r){const a=(n-r)*(e-f),l=(t-f)*(o-r),c=a-l;if(a===0||l===0||a>0!=l>0)return c;const i=Math.abs(a+l);return Math.abs(c)>=_se*i?c:-Tse(t,n,e,o,f,r,i)}const eL=Math.pow(2,-52),xb=new Uint32Array(512);class m2{static from(n,e=Cse,o=Ose){const f=n.length,r=new Float64Array(f*2);for(let a=0;a>1;if(e>0&&typeof n[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=n;const o=Math.max(2*e-5,0);this._triangles=new Uint32Array(o*3),this._halfedges=new Int32Array(o*3),this._hashSize=Math.ceil(Math.sqrt(e)),this._hullPrev=new Uint32Array(e),this._hullNext=new Uint32Array(e),this._hullTri=new Uint32Array(e),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(e),this._dists=new Float64Array(e),this.update()}update(){const{coords:n,_hullPrev:e,_hullNext:o,_hullTri:f,_hullHash:r}=this,a=n.length>>1;let l=1/0,c=1/0,i=-1/0,s=-1/0;for(let A=0;Ai&&(i=M),E>s&&(s=E),this._ids[A]=A}const u=(l+i)/2,d=(c+s)/2;let h=1/0,m,g,p;for(let A=0;A0&&(g=A,h=M)}let x=n[2*g],w=n[2*g+1],k=1/0;for(let A=0;AD&&(A[M++]=O,D=this._dists[O])}this.hull=A.subarray(0,M),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(yb(v,y,x,w,b,T)<0){const A=g,M=x,E=w;g=p,x=b,w=T,p=A,b=M,T=E}const _=Ese(v,y,x,w,b,T);this._cx=_.x,this._cy=_.y;for(let A=0;A0&&Math.abs(O-M)<=eL&&Math.abs(R-E)<=eL||(M=O,E=R,D===m||D===g||D===p))continue;let z=0;for(let G=0,W=this._hashKey(O,R);G=0;)if(L=P,L===z){L=-1;break}if(L===-1)continue;let N=this._addTriangle(L,D,o[L],-1,-1,f[L]);f[D]=this._legalize(N+2),f[L]=N,S++;let B=o[L];for(;P=o[B],yb(O,R,n[2*B],n[2*B+1],n[2*P],n[2*P+1])<0;)N=this._addTriangle(B,D,P,f[D],-1,f[B]),f[D]=this._legalize(N+2),o[B]=B,S--,B=P;if(L===z)for(;P=e[L],yb(O,R,n[2*P],n[2*P+1],n[2*L],n[2*L+1])<0;)N=this._addTriangle(P,D,L,-1,f[L],f[P]),this._legalize(N+2),f[P]=N,o[L]=L,S--,L=P;this._hullStart=e[D]=L,o[L]=e[B]=D,o[D]=B,r[this._hashKey(O,R)]=D,r[this._hashKey(n[2*L],n[2*L+1])]=L}this.hull=new Uint32Array(S);for(let A=0,M=this._hullStart;A0?3-e:1+e)/4}function v4(t,n,e,o){const f=t-e,r=n-o;return f*f+r*r}function Mse(t,n,e,o,f,r,a,l){const c=t-a,i=n-l,s=e-a,u=o-l,d=f-a,h=r-l,m=c*c+i*i,g=s*s+u*u,p=d*d+h*h;return c*(u*p-g*h)-i*(s*p-g*d)+m*(s*h-u*d)<0}function Sse(t,n,e,o,f,r){const a=e-t,l=o-n,c=f-t,i=r-n,s=a*a+l*l,u=c*c+i*i,d=.5/(a*i-l*c),h=(i*s-l*u)*d,m=(a*u-c*s)*d;return h*h+m*m}function Ese(t,n,e,o,f,r){const a=e-t,l=o-n,c=f-t,i=r-n,s=a*a+l*l,u=c*c+i*i,d=.5/(a*i-l*c),h=t+(i*s-l*u)*d,m=n+(a*u-c*s)*d;return{x:h,y:m}}function Zg(t,n,e,o){if(o-e<=20)for(let f=e+1;f<=o;f++){const r=t[f],a=n[r];let l=f-1;for(;l>=e&&n[t[l]]>a;)t[l+1]=t[l--];t[l+1]=r}else{const f=e+o>>1;let r=e+1,a=o;H1(t,f,r),n[t[e]]>n[t[o]]&&H1(t,e,o),n[t[r]]>n[t[o]]&&H1(t,r,o),n[t[e]]>n[t[r]]&&H1(t,e,r);const l=t[r],c=n[l];for(;;){do r++;while(n[t[r]]c);if(a=a-e?(Zg(t,n,r,o),Zg(t,n,e,a-1)):(Zg(t,n,e,a-1),Zg(t,n,r,o))}}function H1(t,n,e){const o=t[n];t[n]=t[e],t[e]=o}function Cse(t){return t[0]}function Ose(t){return t[1]}const tL=1e-6;class s0{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(n,e){this._+=`M${this._x0=this._x1=+n},${this._y0=this._y1=+e}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(n,e){this._+=`L${this._x1=+n},${this._y1=+e}`}arc(n,e,o){n=+n,e=+e,o=+o;const f=n+o,r=e;if(o<0)throw new Error("negative radius");this._x1===null?this._+=`M${f},${r}`:(Math.abs(this._x1-f)>tL||Math.abs(this._y1-r)>tL)&&(this._+="L"+f+","+r),o&&(this._+=`A${o},${o},0,1,1,${n-o},${e}A${o},${o},0,1,1,${this._x1=f},${this._y1=r}`)}rect(n,e,o,f){this._+=`M${this._x0=this._x1=+n},${this._y0=this._y1=+e}h${+o}v${+f}h${-o}Z`}value(){return this._||null}}class wT{constructor(){this._=[]}moveTo(n,e){this._.push([n,e])}closePath(){this._.push(this._[0].slice())}lineTo(n,e){this._.push([n,e])}value(){return this._.length?this._:null}}class Lse{constructor(n,[e,o,f,r]=[0,0,960,500]){if(!((f=+f)>=(e=+e))||!((r=+r)>=(o=+o)))throw new Error("invalid bounds");this.delaunay=n,this._circumcenters=new Float64Array(n.points.length*2),this.vectors=new Float64Array(n.points.length*2),this.xmax=f,this.xmin=e,this.ymax=r,this.ymin=o,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:n,hull:e,triangles:o},vectors:f}=this,r=this.circumcenters=this._circumcenters.subarray(0,o.length/3*2);for(let h=0,m=0,g=o.length,p,v;h1;)r-=2;for(let a=2;a4)for(let a=0;a0){if(e>=this.ymax)return null;(a=(this.ymax-e)/f)0){if(n>=this.xmax)return null;(a=(this.xmax-n)/o)this.xmax?2:0)|(ethis.ymax?8:0)}}const Pse=2*Math.PI,Rg=Math.pow;function Dse(t){return t[0]}function Ise(t){return t[1]}function zse(t){const{triangles:n,coords:e}=t;for(let o=0;o1e-10)return!1}return!0}function Rse(t,n,e){return[t+Math.sin(t+n)*e,n+Math.cos(t-n)*e]}class PS{static from(n,e=Dse,o=Ise,f){return new PS("length"in n?Fse(n,e,o,f):Float64Array.from(Nse(n,e,o,f)))}constructor(n){this._delaunator=new m2(n),this.inedges=new Int32Array(n.length/2),this._hullIndex=new Int32Array(n.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const n=this._delaunator,e=this.points;if(n.hull&&n.hull.length>2&&zse(n)){this.collinear=Int32Array.from({length:e.length/2},(d,h)=>h).sort((d,h)=>e[2*d]-e[2*h]||e[2*d+1]-e[2*h+1]);const c=this.collinear[0],i=this.collinear[this.collinear.length-1],s=[e[2*c],e[2*c+1],e[2*i],e[2*i+1]],u=1e-8*Math.hypot(s[3]-s[1],s[2]-s[0]);for(let d=0,h=e.length/2;d0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=f[0],a[f[0]]=1,f.length===2&&(a[f[1]]=0,this.triangles[1]=f[1],this.triangles[2]=f[1]))}voronoi(n){return new Lse(this,n)}*neighbors(n){const{inedges:e,hull:o,_hullIndex:f,halfedges:r,triangles:a,collinear:l}=this;if(l){const u=l.indexOf(n);u>0&&(yield l[u-1]),u=0&&r!==o&&r!==f;)o=r;return r}_step(n,e,o){const{inedges:f,hull:r,_hullIndex:a,halfedges:l,triangles:c,points:i}=this;if(f[n]===-1||!i.length)return(n+1)%(i.length>>1);let s=n,u=Rg(e-i[n*2],2)+Rg(o-i[n*2+1],2);const d=f[n];let h=d;do{let m=c[h];const g=Rg(e-i[m*2],2)+Rg(o-i[m*2+1],2);if(g>5,n_=1<<11;function Vse(){var t=[256,256],n,e,o,f,r,a,l,c=QB,i=[],s=Math.random,u={};u.layout=function(){for(var m=d(qd()),g=Yse((t[0]>>5)*t[1]),p=null,v=i.length,y=-1,x=[],w=i.map(b=>({text:n(b),font:e(b),style:f(b),weight:r(b),rotate:a(b),size:~~(o(b)+1e-14),padding:l(b),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:b})).sort((b,T)=>T.size-b.size);++y>1,k.y=t[1]*(s()+.5)>>1,qse(m,k,w,y),k.hasText&&h(g,k,p)&&(x.push(k),p?$se(p,k):p=[{x:k.x+k.x0,y:k.y+k.y0},{x:k.x+k.x1,y:k.y+k.y1}],k.x-=t[0]>>1,k.y-=t[1]>>1)}return x};function d(m){m.width=m.height=1;var g=Math.sqrt(m.getContext("2d").getImageData(0,0,1,1).data.length>>2);m.width=(kv<<5)/g,m.height=n_/g;var p=m.getContext("2d");return p.fillStyle=p.strokeStyle="red",p.textAlign="center",{context:p,ratio:g}}function h(m,g,p){for(var v=g.x,y=g.y,x=Math.sqrt(t[0]*t[0]+t[1]*t[1]),w=c(t),k=s()<.5?1:-1,b=-k,T,_,S;(T=w(b+=k))&&(_=~~T[0],S=~~T[1],!(Math.min(Math.abs(_),Math.abs(S))>=x));)if(g.x=v+_,g.y=y+S,!(g.x+g.x0<0||g.y+g.y0<0||g.x+g.x1>t[0]||g.y+g.y1>t[1])&&(!p||!Hse(g,m,t[0]))&&(!p||Gse(g,p))){for(var A=g.sprite,M=g.width>>5,E=t[0]>>5,D=g.x-(M<<4),O=D&127,R=32-O,z=g.y1-g.y0,L=(g.y+g.y0)*E+(D>>5),P,N=0;N>>O:0);L+=E}return g.sprite=null,!0}return!1}return u.words=function(m){return arguments.length?(i=m,u):i},u.size=function(m){return arguments.length?(t=[+m[0],+m[1]],u):t},u.font=function(m){return arguments.length?(e=jp(m),u):e},u.fontStyle=function(m){return arguments.length?(f=jp(m),u):f},u.fontWeight=function(m){return arguments.length?(r=jp(m),u):r},u.rotate=function(m){return arguments.length?(a=jp(m),u):a},u.text=function(m){return arguments.length?(n=jp(m),u):n},u.spiral=function(m){return arguments.length?(c=Xse[m]||m,u):c},u.fontSize=function(m){return arguments.length?(o=jp(m),u):o},u.padding=function(m){return arguments.length?(l=jp(m),u):l},u.random=function(m){return arguments.length?(s=m,u):s},u}function qse(t,n,e,o){if(!n.sprite){var f=t.context,r=t.ratio;f.clearRect(0,0,(kv<<5)/r,n_/r);var a=0,l=0,c=0,i=e.length,s,u,d,h,m;for(--o;++o>5<<5,d=~~Math.max(Math.abs(y+x),Math.abs(y-x))}else s=s+31>>5<<5;if(d>c&&(c=d),a+s>=kv<<5&&(a=0,l+=c,c=0),l+d>=n_)break;f.translate((a+(s>>1))/r,(l+(d>>1))/r),n.rotate&&f.rotate(n.rotate*y4),f.fillText(n.text,0,0),n.padding&&(f.lineWidth=2*n.padding,f.strokeText(n.text,0,0)),f.restore(),n.width=s,n.height=d,n.xoff=a,n.yoff=l,n.x1=s>>1,n.y1=d>>1,n.x0=-n.x1,n.y0=-n.y1,n.hasText=!0,a+=s}for(var k=f.getImageData(0,0,(kv<<5)/r,n_/r).data,b=[];--o>=0;)if(n=e[o],!!n.hasText){for(s=n.width,u=s>>5,d=n.y1-n.y0,h=0;h>5),A=k[(l+m)*(kv<<5)+(a+h)<<2]?1<<31-h%32:0;b[S]|=A,T|=A}T?_=m:(n.y0++,d--,m--,l++)}n.y1=n.y0+_,n.sprite=b.slice(0,(n.y1-n.y0)*u)}}}function Hse(t,n,e){e>>=5;for(var o=t.sprite,f=t.width>>5,r=t.x-(f<<4),a=r&127,l=32-a,c=t.y1-t.y0,i=(t.y+t.y0)*e+(r>>5),s,u=0;u>>a:0))&n[i+d])return!0;i+=e}return!1}function $se(t,n){var e=t[0],o=t[1];n.x+n.x0o.x&&(o.x=n.x+n.x1),n.y+n.y1>o.y&&(o.y=n.y+n.y1)}function Gse(t,n){return t.x+t.x1>n[0].x&&t.x+t.x0n[0].y&&t.y+t.y0g(m(p))}f.forEach(m=>{m[a[0]]=NaN,m[a[1]]=NaN,m[a[3]]=0});const i=r.words(f).text(t.text).size(t.size||[500,500]).padding(t.padding||1).spiral(t.spiral||"archimedean").rotate(t.rotate||0).font(t.font||"sans-serif").fontStyle(t.fontStyle||"normal").fontWeight(t.fontWeight||"normal").fontSize(l).random(yc).layout(),s=r.size(),u=s[0]>>1,d=s[1]>>1,h=i.length;for(let m=0,g,p;mnew Uint8Array(t),Qse=t=>new Uint16Array(t),Rv=t=>new Uint32Array(t);function ele(){let t=8,n=[],e=Rv(0),o=bb(0,t),f=bb(0,t);return{data:()=>n,seen:()=>e=tle(e,n.length),add(r){for(let a=0,l=n.length,c=r.length,i;an.length,curr:()=>o,prev:()=>f,reset:r=>f[r]=o[r],all:()=>t<257?255:t<65537?65535:4294967295,set(r,a){o[r]|=a},clear(r,a){o[r]&=~a},resize(r,a){const l=o.length;(r>l||a>t)&&(t=Math.max(a,t),o=bb(r,t,o),f=bb(r,t))}}}function tle(t,n,e){return t.length>=n?t:(e=e||new t.constructor(n),e.set(t),e)}function bb(t,n,e){const o=(n<257?Kse:n<65537?Qse:Rv)(t);return e&&o.set(e),o}function nL(t,n,e){const o=1<0)for(p=0;pt,size:()=>e}}function nle(t,n){return t.sort.call(n,(e,o)=>{const f=t[e],r=t[o];return fr?1:0}),QW(t,n)}function rle(t,n,e,o,f,r,a,l,c){let i=0,s=0,u;for(u=0;in.modified(o.fields));return e?this.reinit(t,n):this.eval(t,n)}else return this.init(t,n)},init(t,n){const e=t.fields,o=t.query,f=this._indices={},r=this._dims=[],a=o.length;let l=0,c,i;for(;l{const r=f.remove(n,e);for(const a in o)o[a].reindex(r)})},update(t,n,e){const o=this._dims,f=t.query,r=n.stamp,a=o.length;let l=0,c,i;for(e.filters=0,i=0;ih)for(p=h,v=Math.min(u,m);pm)for(p=Math.max(u,m),v=d;pu)for(m=u,g=Math.min(i,d);md)for(m=Math.max(i,d),g=s;ml[s]&e?null:a[s];return r.filter(r.MOD,i),f&f-1?(r.filter(r.ADD,s=>{const u=l[s]&e;return!u&&u^c[s]&e?a[s]:null}),r.filter(r.REM,s=>{const u=l[s]&e;return u&&!(u^(u^c[s]&e))?a[s]:null})):(r.filter(r.ADD,i),r.filter(r.REM,s=>(l[s]&e)===f?a[s]:null)),r.filter(r.SOURCE,s=>i(s._index))}});var ile=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",crossfilter:zS,resolvefilter:RS});const ale="RawCode",M0="Literal",ole="Property",sle="Identifier",lle="ArrayExpression",ule="BinaryExpression",tj="CallExpression",cle="ConditionalExpression",fle="LogicalExpression",hle="MemberExpression",dle="ObjectExpression",ple="UnaryExpression";function df(t){this.type=t}df.prototype.visit=function(t){let n,e,o;if(t(this))return 1;for(n=gle(this),e=0,o=n.length;e";lh[S0]="Identifier";lh[pp]="Keyword";lh[Bw]="Null";lh[G0]="Numeric";lh[_u]="Punctuator";lh[Xy]="String";lh[mle]="RegularExpression";var vle="ArrayExpression",yle="BinaryExpression",xle="CallExpression",ble="ConditionalExpression",nj="Identifier",_le="Literal",wle="LogicalExpression",kle="MemberExpression",Tle="ObjectExpression",Ale="Property",Mle="UnaryExpression",rl="Unexpected token %0",Sle="Unexpected number",Ele="Unexpected string",Cle="Unexpected identifier",Ole="Unexpected reserved word",Lle="Unexpected end of input",kT="Invalid regular expression",x4="Invalid regular expression: missing /",rj="Octal literals are not allowed in strict mode.",Ple="Duplicate data property in object literal not allowed in strict mode",_l="ILLEGAL",ay="Disabled.",Dle=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),Ile=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function jw(t,n){if(!t)throw new Error("ASSERT: "+n)}function Ph(t){return t>=48&&t<=57}function FS(t){return"0123456789abcdefABCDEF".indexOf(t)>=0}function Fv(t){return"01234567".indexOf(t)>=0}function zle(t){return t===32||t===9||t===11||t===12||t===160||t>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(t)>=0}function oy(t){return t===10||t===13||t===8232||t===8233}function Zy(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t===92||t>=128&&Dle.test(String.fromCharCode(t))}function v2(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===92||t>=128&&Ile.test(String.fromCharCode(t))}const Rle={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function ij(){for(;Cr1114111||t!=="}")&&Wa({},rl,_l),n<=65535?String.fromCharCode(n):(e=(n-65536>>10)+55296,o=(n-65536&1023)+56320,String.fromCharCode(e,o))}function aj(){var t,n;for(t=Ii.charCodeAt(Cr++),n=String.fromCharCode(t),t===92&&(Ii.charCodeAt(Cr)!==117&&Wa({},rl,_l),++Cr,t=TT("u"),(!t||t==="\\"||!Zy(t.charCodeAt(0)))&&Wa({},rl,_l),n=t);Cr>>=")return Cr+=4,{type:_u,value:a,start:t,end:Cr};if(r=a.substr(0,3),r===">>>"||r==="<<="||r===">>=")return Cr+=3,{type:_u,value:r,start:t,end:Cr};if(f=r.substr(0,2),o===f[1]&&"+-<>&|".indexOf(o)>=0||f==="=>")return Cr+=2,{type:_u,value:f,start:t,end:Cr};if(f==="//"&&Wa({},rl,_l),"<>=!+-*%&|^/".indexOf(o)>=0)return++Cr,{type:_u,value:o,start:t,end:Cr};Wa({},rl,_l)}function jle(t){let n="";for(;Cr=0&&Cr=0&&(e=e.replace(/\\u\{([0-9a-fA-F]+)\}/g,(o,f)=>{if(parseInt(f,16)<=1114111)return"x";Wa({},kT)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(e)}catch{Wa({},kT)}try{return new RegExp(t,n)}catch{return null}}function Hle(){var t,n,e,o,f;for(t=Ii[Cr],jw(t==="/","Regular expression literal must start with a slash"),n=Ii[Cr++],e=!1,o=!1;Cr=0&&Wa({},kT,e),{value:e,literal:n}}function Gle(){var t,n,e,o;return vo=null,ij(),t=Cr,n=Hle(),e=$le(),o=qle(n.value,e.value),{literal:n.literal+e.literal,value:o,regex:{pattern:n.value,flags:e.value},start:t,end:Cr}}function Wle(t){return t.type===S0||t.type===pp||t.type===Nw||t.type===Bw}function oj(){if(ij(),Cr>=Ul)return{type:Yy,start:Cr,end:Cr};const t=Ii.charCodeAt(Cr);return Zy(t)?Ble():t===40||t===41||t===59?b4():t===39||t===34?Vle():t===46?Ph(Ii.charCodeAt(Cr+1))?iL():b4():Ph(t)?iL():b4()}function Au(){const t=vo;return Cr=t.end,vo=oj(),Cr=t.end,t}function sj(){const t=Cr;vo=oj(),Cr=t}function Yle(t){const n=new df(vle);return n.elements=t,n}function aL(t,n,e){const o=new df(t==="||"||t==="&&"?wle:yle);return o.operator=t,o.left=n,o.right=e,o}function Xle(t,n){const e=new df(xle);return e.callee=t,e.arguments=n,e}function Zle(t,n,e){const o=new df(ble);return o.test=t,o.consequent=n,o.alternate=e,o}function NS(t){const n=new df(nj);return n.name=t,n}function Tv(t){const n=new df(_le);return n.value=t.value,n.raw=Ii.slice(t.start,t.end),t.regex&&(n.raw==="//"&&(n.raw="/(?:)/"),n.regex=t.regex),n}function oL(t,n,e){const o=new df(kle);return o.computed=t==="[",o.object=n,o.property=e,o.computed||(e.member=!0),o}function Jle(t){const n=new df(Tle);return n.properties=t,n}function sL(t,n,e){const o=new df(Ale);return o.key=n,o.value=e,o.kind=t,o}function Kle(t,n){const e=new df(Mle);return e.operator=t,e.argument=n,e.prefix=!0,e}function Wa(t,n){var e,o=Array.prototype.slice.call(arguments,2),f=n.replace(/%(\d)/g,(r,a)=>(jw(a":case"<=":case">=":case"instanceof":case"in":n=7;break;case"<<":case">>":case">>>":n=8;break;case"+":case"-":n=9;break;case"*":case"/":case"%":n=11;break}return n}function cue(){var t,n,e,o,f,r,a,l,c,i;if(t=vo,c=r_(),o=vo,f=cL(o),f===0)return c;for(o.prec=f,Au(),n=[t,vo],a=r_(),r=[c,o,a];(f=cL(vo))>0;){for(;r.length>2&&f<=r[r.length-2].prec;)a=r.pop(),l=r.pop().value,c=r.pop(),n.pop(),e=aL(l,c,a),r.push(e);o=Au(),o.prec=f,r.push(o),n.push(vo),e=r_(),r.push(e)}for(i=r.length-1,e=r[i],n.pop();i>1;)n.pop(),e=aL(r[i-1].value,r[i-2],e),i-=2;return e}function E0(){var t,n,e;return t=cue(),qo("?")&&(Au(),n=E0(),Vl(":"),e=E0(),t=Zle(t,n,e)),t}function BS(){const t=E0();if(qo(","))throw new Error(ay);return t}function jS(t){Ii=t,Cr=0,Ul=Ii.length,vo=null,sj();const n=BS();if(vo.type!==Yy)throw new Error("Unexpect token after expression.");return n}var lj={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function uj(t){function n(a,l,c,i){let s=t(l[0]);return c&&(s=c+"("+s+")",c.lastIndexOf("new ",0)===0&&(s="("+s+")")),s+"."+a+(i<0?"":i===0?"()":"("+l.slice(1).map(t).join(",")+")")}function e(a,l,c){return i=>n(a,i,l,c)}const o="new Date",f="String",r="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(a){a.length<3&&Pr("Missing arguments to clamp function."),a.length>3&&Pr("Too many arguments to clamp function.");const l=a.map(t);return"Math.max("+l[1]+", Math.min("+l[2]+","+l[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:o,date:e("getDate",o,0),day:e("getDay",o,0),year:e("getFullYear",o,0),month:e("getMonth",o,0),hours:e("getHours",o,0),minutes:e("getMinutes",o,0),seconds:e("getSeconds",o,0),milliseconds:e("getMilliseconds",o,0),time:e("getTime",o,0),timezoneoffset:e("getTimezoneOffset",o,0),utcdate:e("getUTCDate",o,0),utcday:e("getUTCDay",o,0),utcyear:e("getUTCFullYear",o,0),utcmonth:e("getUTCMonth",o,0),utchours:e("getUTCHours",o,0),utcminutes:e("getUTCMinutes",o,0),utcseconds:e("getUTCSeconds",o,0),utcmilliseconds:e("getUTCMilliseconds",o,0),length:e("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:e("toUpperCase",f,0),lower:e("toLowerCase",f,0),substring:e("substring",f),split:e("split",f),trim:e("trim",f,0),regexp:r,test:e("test",r),if:function(a){a.length<3&&Pr("Missing arguments to if function."),a.length>3&&Pr("Too many arguments to if function.");const l=a.map(t);return"("+l[0]+"?"+l[1]+":"+l[2]+")"}}}function fue(t){const n=t&&t.length-1;return n&&(t[0]==='"'&&t[n]==='"'||t[0]==="'"&&t[n]==="'")?t.slice(1,-1):t}function cj(t){t=t||{};const n=t.allowed?uf(t.allowed):{},e=t.forbidden?uf(t.forbidden):{},o=t.constants||lj,f=(t.functions||uj)(u),r=t.globalvar,a=t.fieldvar,l=ga(r)?r:m=>`${r}["${m}"]`;let c={},i={},s=0;function u(m){if(bi(m))return m;const g=d[m.type];return g==null&&Pr("Unsupported type: "+m.type),g(m)}const d={Literal:m=>m.raw,Identifier:m=>{const g=m.name;return s>0?g:qi(e,g)?Pr("Illegal identifier: "+g):qi(o,g)?o[g]:qi(n,g)?g:(c[g]=1,l(g))},MemberExpression:m=>{const g=!m.computed,p=u(m.object);g&&(s+=1);const v=u(m.property);return p===a&&(i[fue(v)]=1),g&&(s-=1),p+(g?"."+v:"["+v+"]")},CallExpression:m=>{m.callee.type!=="Identifier"&&Pr("Illegal callee type: "+m.callee.type);const g=m.callee.name,p=m.arguments,v=qi(f,g)&&f[g];return v||Pr("Unrecognized function: "+g),ga(v)?v(p):v+"("+p.map(u).join(",")+")"},ArrayExpression:m=>"["+m.elements.map(u).join(",")+"]",BinaryExpression:m=>"("+u(m.left)+" "+m.operator+" "+u(m.right)+")",UnaryExpression:m=>"("+m.operator+u(m.argument)+")",ConditionalExpression:m=>"("+u(m.test)+"?"+u(m.consequent)+":"+u(m.alternate)+")",LogicalExpression:m=>"("+u(m.left)+m.operator+u(m.right)+")",ObjectExpression:m=>"{"+m.properties.map(u).join(",")+"}",Property:m=>{s+=1;const g=u(m.key);return s-=1,g+":"+u(m.value)}};function h(m){const g={code:u(m),globals:Object.keys(c),fields:Object.keys(i)};return c={},i={},g}return h.functions=f,h.constants=o,h}const US="intersect",fL="union",hue="vlMulti",due="vlPoint",hL="or",pue="and",Pf="_vgsid_",sy=Lu(Pf),gue="E",mue="R",vue="R-E",yue="R-LE",xue="R-RE",y2="index:unit";function dL(t,n){for(var e=n.fields,o=n.values,f=e.length,r=0,a,l;rpa(n.fields?{values:n.fields.map(o=>(o.getter||(o.getter=Lu(o.field)))(e.datum))}:{[Pf]:sy(e.datum)},n))}function Aue(t,n,e,o){for(var f=this.context.data[t],r=f?f.values.value:[],a={},l={},c={},i,s,u,d,h,m,g,p,v,y,x=r.length,w=0,k,b;w(T[s[S].field]=_,T),{})))}else h=Pf,m=sy(i),g=a[h]||(a[h]={}),p=g[d]||(g[d]=[]),p.push(m),e&&(p=l[d]||(l[d]=[]),p.push({[Pf]:m}));if(n=n||fL,a[Pf]?a[Pf]=w4["".concat(Pf,"_").concat(n)](...Object.values(a[Pf])):Object.keys(a).forEach(T=>{a[T]=Object.keys(a[T]).map(_=>a[T][_]).reduce((_,S)=>_===void 0?S:w4["".concat(c[T],"_").concat(n)](_,S))}),r=Object.keys(l),e&&r.length){const T=o?due:hue;a[T]=n===fL?{[hL]:r.reduce((_,S)=>(_.push(...l[S]),_),[])}:{[pue]:r.map(_=>({[hL]:l[_]}))}}return a}var w4={["".concat(Pf,"_union")]:aY,["".concat(Pf,"_intersect")]:rY,E_union:function(t,n){if(!t.length)return n;for(var e=0,o=n.length;en.indexOf(e)>=0):n},R_union:function(t,n){var e=Rl(n[0]),o=Rl(n[1]);return e>o&&(e=n[1],o=n[0]),t.length?(t[0]>e&&(t[0]=e),t[1]o&&(e=n[1],o=n[0]),t.length?oo&&(t[1]=o),t):[e,o]}};const Mue=":",Sue="@";function VS(t,n,e,o){n[0].type!==M0&&Pr("First argument to selection functions must be a string literal.");const f=n[0].value,r=n.length>=2&&Na(n).value,a="unit",l=Sue+a,c=Mue+f;r===US&&!qi(o,l)&&(o[l]=e.getData(f).indataRef(e,a)),qi(o,c)||(o[c]=e.getData(f).tuplesRef())}function hj(t){const n=this.context.data[t];return n?n.values.value:[]}function Eue(t,n,e){const o=this.context.data[t]["index:"+n],f=o?o.value.get(e):void 0;return f&&f.count}function Cue(t,n){const e=this.context.dataflow,o=this.context.data[t],f=o.input;return e.pulse(f,e.changeset().remove(mc).insert(n)),1}function Oue(t,n,e){if(t){const o=this.context.dataflow,f=t.mark.source;o.pulse(f,o.changeset().encode(t,n))}return e!==void 0?e:t}const Jy=t=>function(n,e){return this.context.dataflow.locale()[t](e)(n)},Lue=Jy("format"),dj=Jy("timeFormat"),Pue=Jy("utcFormat"),Due=Jy("timeParse"),Iue=Jy("utcParse"),_b=new Date(2e3,0,1);function Vw(t,n,e){return!Number.isInteger(t)||!Number.isInteger(n)?"":(_b.setYear(2e3),_b.setMonth(t),_b.setDate(n),dj.call(this,_b,e))}function zue(t){return Vw.call(this,t,1,"%B")}function Rue(t){return Vw.call(this,t,1,"%b")}function Fue(t){return Vw.call(this,0,2+t,"%A")}function Nue(t){return Vw.call(this,0,2+t,"%a")}const Bue=":",jue="@",AT="%",pj="$";function qS(t,n,e,o){n[0].type!==M0&&Pr("First argument to data functions must be a string literal.");const f=n[0].value,r=Bue+f;if(!qi(r,o))try{o[r]=e.getData(f).tuplesRef()}catch{}}function Uue(t,n,e,o){n[0].type!==M0&&Pr("First argument to indata must be a string literal."),n[1].type!==M0&&Pr("Second argument to indata must be a string literal.");const f=n[0].value,r=n[1].value,a=jue+r;qi(a,o)||(o[a]=e.getData(f).indataRef(e,r))}function Su(t,n,e,o){if(n[0].type===M0)pL(e,o,n[0].value);else for(t in e.scales)pL(e,o,t)}function pL(t,n,e){const o=AT+e;if(!qi(n,o))try{n[o]=t.scaleRef(e)}catch{}}function Jh(t,n){let e;return ga(t)?t:bi(t)?(e=n.scales[t])&&e.value:void 0}function Vue(t,n,e){n.__bandwidth=f=>f&&f.bandwidth?f.bandwidth():0,e._bandwidth=Su,e._range=Su,e._scale=Su;const o=f=>"_["+(f.type===M0?oi(AT+f.value):oi(AT)+"+"+t(f))+"]";return{_bandwidth:f=>"this.__bandwidth(".concat(o(f[0]),")"),_range:f=>"".concat(o(f[0]),".range()"),_scale:f=>"".concat(o(f[0]),"(").concat(t(f[1]),")")}}function HS(t,n){return function(e,o,f){if(e){const r=Jh(e,(f||this).context);return r&&r.path[t](o)}else return n(o)}}const que=HS("area",pre),Hue=HS("bounds",yre),$ue=HS("centroid",Tre);function Gue(t){const n=this.context.group;let e=!1;if(n)for(;t;){if(t===n){e=!0;break}t=t.mark.group}return e}function $S(t,n,e){try{t[n].apply(t,["EXPRESSION"].concat([].slice.call(e)))}catch(o){t.warn(o)}return e[e.length-1]}function Wue(){return $S(this.context.dataflow,"warn",arguments)}function Yue(){return $S(this.context.dataflow,"info",arguments)}function Xue(){return $S(this.context.dataflow,"debug",arguments)}function k4(t){const n=t/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}function MT(t){const n=f_(t),e=k4(n.r),o=k4(n.g),f=k4(n.b);return .2126*e+.7152*o+.0722*f}function Zue(t,n){const e=MT(t),o=MT(n),f=Math.max(e,o),r=Math.min(e,o);return(f+.05)/(r+.05)}function Jue(){const t=[].slice.call(arguments);return t.unshift({}),pa(...t)}function gj(t,n){return t===n||t!==t&&n!==n?!0:Ir(t)?Ir(n)&&t.length===n.length?Kue(t,n):!1:Ei(t)&&Ei(n)?mj(t,n):!1}function Kue(t,n){for(let e=0,o=t.length;emj(t,n)}function Que(t,n,e,o,f,r){const a=this.context.dataflow,l=this.context.data[t],c=l.input,i=a.stamp();let s=l.changes,u,d;if(a._trigger===!1||!(c.value.length||n||o))return 0;if((!s||s.stamp{l.modified=!0,a.pulse(c,s).run()},!0,1)),e&&(u=e===!0?mc:Ir(e)||nw(e)?e:gL(e),s.remove(u)),n&&s.insert(n),o&&(u=gL(o),c.value.some(u)?s.remove(u):s.insert(o)),f)for(d in r)s.modify(f,d,r[d]);return 1}function ece(t){const n=t.touches,e=n[0].clientX-n[1].clientX,o=n[0].clientY-n[1].clientY;return Math.sqrt(e*e+o*o)}function tce(t){const n=t.touches;return Math.atan2(n[0].clientY-n[1].clientY,n[0].clientX-n[1].clientX)}const mL={};function nce(t,n){const e=mL[n]||(mL[n]=Lu(n));return Ir(t)?t.map(e):e(t)}function GS(t){return Ir(t)||ArrayBuffer.isView(t)?t:null}function WS(t){return GS(t)||(bi(t)?t:null)}function rce(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),o=1;o1?n-1:0),o=1;o1?n-1:0),o=1;o1?n-1:0),o=1;or.stop(i(s),t(s))),r}function vce(t,n,e){const o=Jh(t,(e||this).context);return function(f){return o?o.path.context(f)(n):""}}function yce(t){let n=null;return function(e){return e?Jv(e,n=n||pm(t)):t}}const vj=t=>t.data;function yj(t,n){const e=hj.call(n,t);return e.root&&e.root.lookup||{}}function xce(t,n,e){const o=yj(t,this),f=o[n],r=o[e];return f&&r?f.path(r).map(vj):void 0}function bce(t,n){const e=yj(t,this)[n];return e?e.ancestors().map(vj):void 0}const xj=()=>typeof window<"u"&&window||null;function _ce(){const t=xj();return t?t.screen:{}}function wce(){const t=xj();return t?[t.innerWidth,t.innerHeight]:[void 0,void 0]}function kce(){const t=this.context.dataflow,n=t.container&&t.container();return n?[n.clientWidth,n.clientHeight]:[void 0,void 0]}function bj(t,n,e){if(!t)return[];const[o,f]=t,r=new zs().set(o[0],o[1],f[0],f[1]),a=e||this.context.dataflow.scenegraph().root;return oN(a,r,Tce(n))}function Tce(t){let n=null;if(t){const e=ki(t.marktype),o=ki(t.markname);n=f=>(!e.length||e.some(r=>f.marktype===r))&&(!o.length||o.some(r=>f.name===r))}return n}function Ace(t,n,e){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:5;const f=t[t.length-1];return f===void 0||Math.sqrt((f[0]-n)**2+(f[1]-e)**2)>o?(t.push([n,e]),[...t]):t}function Mce(t){return(t??[]).reduce((n,e,o)=>{let[f,r]=e;return n+=o==0?"M ".concat(f,",").concat(r," "):o===t.length-1?" Z":"L ".concat(f,",").concat(r," ")},"")}function Sce(t,n,e){const{x:o,y:f,mark:r}=e,a=new zs().set(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,Number.MIN_SAFE_INTEGER);for(const[c,i]of n)ca.x2&&(a.x2=c),ia.y2&&(a.y2=i);return a.translate(o,f),bj([[a.x1,a.y1],[a.x2,a.y2]],t,r).filter(c=>Ece(c.x,c.y,n))}function Ece(t,n,e){let o=0;for(let f=0,r=e.length-1;fn!=l>n&&t<(a-c)*(n-i)/(l-i)+c&&o++}return o&1}const ly={random(){return yc()},cumulativeNormal:sw,cumulativeLogNormal:s6,cumulativeUniform:f6,densityNormal:n6,densityLogNormal:o6,densityUniform:c6,quantileNormal:lw,quantileLogNormal:l6,quantileUniform:h6,sampleNormal:ow,sampleLogNormal:a6,sampleUniform:u6,isArray:Ir,isBoolean:hp,isDate:Bd,isDefined(t){return t!==void 0},isNumber:wo,isObject:Ei,isRegExp:hI,isString:bi,isTuple:nw,isValid(t){return t!=null&&t===t},toBoolean:PA,toDate(t){return DA(t)},toNumber:Rl,toString:IA,indexof:ice,join:rce,lastindexof:ace,replace:sce,reverse:lce,slice:oce,flush:cI,lerp:dI,merge:Jue,pad:mI,peek:Na,pluck:nce,span:My,inrange:Gg,truncate:vI,rgb:f_,lab:M_,hcl:S_,hsl:ek,luminance:MT,contrast:Zue,sequence:Ju,format:Lue,utcFormat:Pue,utcParse:Iue,utcOffset:qI,utcSequence:GI,timeFormat:dj,timeParse:Due,timeOffset:VI,timeSequence:$I,timeUnitSpecifier:LI,monthFormat:zue,monthAbbrevFormat:Rue,dayFormat:Fue,dayAbbrevFormat:Nue,quarter:oI,utcquarter:sI,week:DI,utcweek:RI,dayofyear:PI,utcdayofyear:zI,warn:Wue,info:Yue,debug:Xue,extent(t){return Zf(t)},inScope:Gue,intersect:bj,clampRange:lI,pinchDistance:ece,pinchAngle:tce,screen:_ce,containerSize:kce,windowSize:wce,bandspace:uce,setdata:Cue,pathShape:yce,panLinear:nI,panLog:rI,panPow:iI,panSymlog:aI,zoomLinear:MA,zoomLog:SA,zoomPow:g_,zoomSymlog:EA,encode:Oue,modify:Que,lassoAppend:Ace,lassoPath:Mce,intersectLasso:Sce},Cce=["view","item","group","xy","x","y"],Oce="event.vega.",_j="this.",YS={},wj={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:t=>"_[".concat(oi(pj+t),"]"),functions:Lce,constants:lj,visitors:YS},ST=cj(wj);function Lce(t){const n=uj(t);Cce.forEach(e=>n[e]=Oce+e);for(const e in ly)n[e]=_j+e;return pa(n,Vue(t,ly,YS)),n}function Fs(t,n,e){return arguments.length===1?ly[t]:(ly[t]=n,e&&(YS[t]=e),ST&&(ST.functions[t]=_j+t),this)}Fs("bandwidth",cce,Su);Fs("copy",fce,Su);Fs("domain",hce,Su);Fs("range",pce,Su);Fs("invert",dce,Su);Fs("scale",gce,Su);Fs("gradient",mce,Su);Fs("geoArea",que,Su);Fs("geoBounds",Hue,Su);Fs("geoCentroid",$ue,Su);Fs("geoShape",vce,Su);Fs("indata",Eue,Uue);Fs("data",hj,qS);Fs("treePath",xce,qS);Fs("treeAncestors",bce,qS);Fs("vlSelectionTest",bue,VS);Fs("vlSelectionIdTest",kue,VS);Fs("vlSelectionResolve",Aue,VS);Fs("vlSelectionTuples",Tue);function Qf(t,n){const e={};let o;try{t=bi(t)?t:oi(t)+"",o=jS(t)}catch{Pr("Expression parse error: "+t)}o.visit(r=>{if(r.type!==tj)return;const a=r.callee.name,l=wj.visitors[a];l&&l(a,r.arguments,n,e)});const f=ST(o);return f.globals.forEach(r=>{const a=pj+r;!qi(e,a)&&n.getSignal(r)&&(e[a]=n.signalRef(r))}),{$expr:pa({code:f.code},n.options.ast?{ast:o}:null),$fields:f.fields,$params:e}}function Pce(t){const n=this,e=t.operators||[];return t.background&&(n.background=t.background),t.eventConfig&&(n.eventConfig=t.eventConfig),t.locale&&(n.locale=t.locale),e.forEach(o=>n.parseOperator(o)),e.forEach(o=>n.parseOperatorParameters(o)),(t.streams||[]).forEach(o=>n.parseStream(o)),(t.updates||[]).forEach(o=>n.parseUpdate(o)),n.resolve()}const Dce=uf(["rule"]),vL=uf(["group","image","rect"]);function Ice(t,n){let e="";return Dce[n]||(t.x2&&(t.x?(vL[n]&&(e+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),e+="o.width=o.x2-o.x;"):e+="o.x=o.x2-(o.width||0);"),t.xc&&(e+="o.x=o.xc-(o.width||0)/2;"),t.y2&&(t.y?(vL[n]&&(e+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),e+="o.height=o.y2-o.y;"):e+="o.y=o.y2-(o.height||0);"),t.yc&&(e+="o.y=o.yc-(o.height||0)/2;")),e}function XS(t){return(t+"").toLowerCase()}function zce(t){return XS(t)==="operator"}function Rce(t){return XS(t)==="collect"}function $1(t,n,e){e[e.length-1]!==";"&&(e="return("+e+");");const o=Function(...n.concat(e));return t&&t.functions?o.bind(t.functions):o}function Fce(t,n,e,o){return"((u = ".concat(t,") < (v = ").concat(n,") || u == null) && v != null ? ").concat(e,` + : (u > v || v == null) && u != null ? `).concat(o,` + : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? `).concat(e,` + : v !== v && u === u ? `).concat(o," : ")}var Nce={operator:(t,n)=>$1(t,["_"],n.code),parameter:(t,n)=>$1(t,["datum","_"],n.code),event:(t,n)=>$1(t,["event"],n.code),handler:(t,n)=>{const e="var datum=event.item&&event.item.datum;return ".concat(n.code,";");return $1(t,["_","event"],e)},encode:(t,n)=>{const{marktype:e,channels:o}=n;let f="var o=item,datum=o.datum,m=0,$;";for(const r in o){const a="o["+oi(r)+"]";f+="$=".concat(o[r].code,";if(").concat(a,"!==$)").concat(a,"=$,m=1;")}return f+=Ice(o,e),f+="return m;",$1(t,["item","_"],f)},codegen:{get(t){const n="[".concat(t.map(oi).join("]["),"]"),e=Function("_","return _".concat(n,";"));return e.path=n,e},comparator(t,n){let e;const o=(r,a)=>{const l=n[a];let c,i;return r.path?(c="a".concat(r.path),i="b".concat(r.path)):((e=e||{})["f"+a]=r,c="this.f".concat(a,"(a)"),i="this.f".concat(a,"(b)")),Fce(c,i,-l,l)},f=Function("a","b","var u, v; return "+t.map(o).join("")+"0;");return e?f.bind(e):f}}};function Bce(t){const n=this;zce(t.type)||!t.type?n.operator(t,t.update?n.operatorExpression(t.update):null):n.transform(t,t.type)}function jce(t){const n=this;if(t.params){const e=n.get(t.id);e||Pr("Invalid operator id: "+t.id),n.dataflow.connect(e,e.parameters(n.parseParameters(t.params),t.react,t.initonly))}}function Uce(t,n){n=n||{};const e=this;for(const o in t){const f=t[o];n[o]=Ir(f)?f.map(r=>yL(r,e,n)):yL(f,e,n)}return n}function yL(t,n,e){if(!t||!Ei(t))return t;for(let o=0,f=xL.length,r;of&&f.$tupleid?$i:f);return n.fn[e]||(n.fn[e]=CA(o,t.$order,n.expr.codegen))}function Wce(t,n){const e=t.$encode,o={};for(const f in e){const r=e[f];o[f]=Nu(n.encodeExpression(r.$expr),r.$fields),o[f].output=r.$output}return o}function Yce(t,n){return n}function Xce(t,n){const e=t.$subflow;return function(o,f,r){const a=n.fork().parse(e),l=a.get(e.operators[0].id),c=a.signals.parent;return c&&c.set(r),l.detachSubflow=()=>n.detach(a),l}}function Zce(){return $i}function Jce(t){var n=this,e=t.filter!=null?n.eventExpression(t.filter):void 0,o=t.stream!=null?n.get(t.stream):void 0,f;t.source?o=n.events(t.source,t.type,e):t.merge&&(f=t.merge.map(r=>n.get(r)),o=f[0].merge.apply(f[0],f.slice(1))),t.between&&(f=t.between.map(r=>n.get(r)),o=o.between(f[0],f[1])),t.filter&&(o=o.filter(e)),t.throttle!=null&&(o=o.throttle(+t.throttle)),t.debounce!=null&&(o=o.debounce(+t.debounce)),o==null&&Pr("Invalid stream definition: "+JSON.stringify(t)),t.consume&&o.consume(!0),n.stream(t,o)}function Kce(t){var n=this,e=Ei(e=t.source)?e.$ref:e,o=n.get(e),f=null,r=t.update,a=void 0;o||Pr("Source not defined: "+t.source),f=t.target&&t.target.$expr?n.eventExpression(t.target.$expr):n.get(t.target),r&&r.$expr&&(r.$params&&(a=n.parseParameters(r.$params)),r=n.handlerExpression(r.$expr)),n.update(t,o,f,r,a)}const Qce={skip:!0};function efe(t){var n=this,e={};if(t.signals){var o=e.signals={};Object.keys(n.signals).forEach(r=>{const a=n.signals[r];t.signals(r,a)&&(o[r]=a.value)})}if(t.data){var f=e.data={};Object.keys(n.data).forEach(r=>{const a=n.data[r];t.data(r,a)&&(f[r]=a.input.value)})}return n.subcontext&&t.recurse!==!1&&(e.subcontext=n.subcontext.map(r=>r.getState(t))),e}function tfe(t){var n=this,e=n.dataflow,o=t.data,f=t.signals;Object.keys(f||{}).forEach(r=>{e.update(n.signals[r],f[r],Qce)}),Object.keys(o||{}).forEach(r=>{e.pulse(n.data[r].input,e.changeset().remove(mc).insert(o[r]))}),(t.subcontext||[]).forEach((r,a)=>{const l=n.subcontext[a];l&&l.setState(r)})}function kj(t,n,e,o){return new Tj(t,n,e,o)}function Tj(t,n,e,o){this.dataflow=t,this.transforms=n,this.events=t.events.bind(t),this.expr=o||Nce,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},e&&(this.functions=Object.create(e),this.functions.context=this)}function bL(t){this.dataflow=t.dataflow,this.transforms=t.transforms,this.events=t.events,this.expr=t.expr,this.signals=Object.create(t.signals),this.scales=Object.create(t.scales),this.nodes=Object.create(t.nodes),this.data=Object.create(t.data),this.fn=Object.create(t.fn),t.functions&&(this.functions=Object.create(t.functions),this.functions.context=this)}Tj.prototype=bL.prototype={fork(){const t=new bL(this);return(this.subcontext||(this.subcontext=[])).push(t),t},detach(t){this.subcontext=this.subcontext.filter(e=>e!==t);const n=Object.keys(t.nodes);for(const e of n)t.nodes[e]._targets=null;for(const e of n)t.nodes[e].detach();t.nodes=null},get(t){return this.nodes[t]},set(t,n){return this.nodes[t]=n},add(t,n){const e=this,o=e.dataflow,f=t.value;if(e.set(t.id,n),Rce(t.type)&&f&&(f.$ingest?o.ingest(n,f.$ingest,f.$format):f.$request?o.preload(n,f.$request,f.$format):o.pulse(n,o.changeset().insert(f))),t.root&&(e.root=n),t.parent){let r=e.get(t.parent.$ref);r?(o.connect(r,[n]),n.targets().add(r)):(e.unresolved=e.unresolved||[]).push(()=>{r=e.get(t.parent.$ref),o.connect(r,[n]),n.targets().add(r)})}if(t.signal&&(e.signals[t.signal]=n),t.scale&&(e.scales[t.scale]=n),t.data)for(const r in t.data){const a=e.data[r]||(e.data[r]={});t.data[r].forEach(l=>a[l]=n)}},resolve(){return(this.unresolved||[]).forEach(t=>t()),delete this.unresolved,this},operator(t,n){this.add(t,this.dataflow.add(t.value,n))},transform(t,n){this.add(t,this.dataflow.add(this.transforms[XS(n)]))},stream(t,n){this.set(t.id,n)},update(t,n,e,o,f){this.dataflow.on(n,e,o,f,t.options)},operatorExpression(t){return this.expr.operator(this,t)},parameterExpression(t){return this.expr.parameter(this,t)},eventExpression(t){return this.expr.event(this,t)},handlerExpression(t){return this.expr.handler(this,t)},encodeExpression(t){return this.expr.encode(this,t)},parse:Pce,parseOperator:Bce,parseOperatorParameters:jce,parseParameters:Uce,parseStream:Jce,parseUpdate:Kce,getState:efe,setState:tfe};function nfe(t){const n=t.container();n&&(n.setAttribute("role","graphics-document"),n.setAttribute("aria-roleDescription","visualization"),Aj(n,t.description()))}function Aj(t,n){t&&(n==null?t.removeAttribute("aria-label"):t.setAttribute("aria-label",n))}function rfe(t){t.add(null,n=>(t._background=n.bg,t._resize=1,n.bg),{bg:t._signals.background})}const T4="default";function ife(t){const n=t._signals.cursor||(t._signals.cursor=t.add({user:T4,item:null}));t.on(t.events("view","mousemove"),n,(e,o)=>{const f=n.value,r=f?bi(f)?f:f.user:T4,a=o.item&&o.item.cursor||null;return f&&r===f.user&&a==f.item?f:{user:r,item:a}}),t.add(null,function(e){let o=e.cursor,f=this.value;return bi(o)||(f=o.item,o=o.user),ET(t,o&&o!==T4?o:f||o),f},{cursor:n})}function ET(t,n){const e=t.globalCursor()?typeof document<"u"&&document.body:t.container();if(e)return n==null?e.style.removeProperty("cursor"):e.style.cursor=n}function x2(t,n){var e=t._runtime.data;return qi(e,n)||Pr("Unrecognized data set: "+n),e[n]}function afe(t,n){return arguments.length<2?x2(this,t).values.value:qw.call(this,t,H0().remove(mc).insert(n))}function qw(t,n){xz(n)||Pr("Second argument to changes must be a changeset.");const e=x2(this,t);return e.modified=!0,this.pulse(e.input,n)}function ofe(t,n){return qw.call(this,t,H0().insert(n))}function sfe(t,n){return qw.call(this,t,H0().remove(n))}function Mj(t){var n=t.padding();return Math.max(0,t._viewWidth+n.left+n.right)}function Sj(t){var n=t.padding();return Math.max(0,t._viewHeight+n.top+n.bottom)}function Hw(t){var n=t.padding(),e=t._origin;return[n.left+e[0],n.top+e[1]]}function lfe(t){var n=Hw(t),e=Mj(t),o=Sj(t);t._renderer.background(t.background()),t._renderer.resize(e,o,n),t._handler.origin(n),t._resizeListeners.forEach(f=>{try{f(e,o)}catch(r){t.error(r)}})}function ufe(t,n,e){var o=t._renderer,f=o&&o.canvas(),r,a,l;return f&&(l=Hw(t),a=n.changedTouches?n.changedTouches[0]:n,r=Ow(a,f),r[0]-=l[0],r[1]-=l[1]),n.dataflow=t,n.item=e,n.vega=cfe(t,e,r),n}function cfe(t,n,e){const o=n?n.mark.marktype==="group"?n:n.mark.group:null;function f(a){var l=o,c;if(a){for(c=n;c;c=c.mark.group)if(c.mark.name===a){l=c;break}}return l&&l.mark&&l.mark.interactive?l:{}}function r(a){if(!a)return e;bi(a)&&(a=f(a));const l=e.slice();for(;a;)l[0]-=a.x||0,l[1]-=a.y||0,a=a.mark&&a.mark.group;return l}return{view:$l(t),item:$l(n||{}),group:f,xy:r,x:a=>r(a)[0],y:a=>r(a)[1]}}const _L="view",ffe="timer",hfe="window",dfe={trap:!1};function pfe(t){const n=pa({defaults:{}},t),e=(o,f)=>{f.forEach(r=>{Ir(o[r])&&(o[r]=uf(o[r]))})};return e(n.defaults,["prevent","allow"]),e(n,["view","window","selector"]),n}function Ej(t,n,e,o){t._eventListeners.push({type:e,sources:ki(n),handler:o})}function gfe(t,n){var e=t._eventConfig.defaults,o=e.prevent,f=e.allow;return o===!1||f===!0?!1:o===!0||f===!1?!0:o?o[n]:f?!f[n]:t.preventDefault()}function wb(t,n,e){const o=t._eventConfig&&t._eventConfig[n];return o===!1||Ei(o)&&!o[e]?(t.warn("Blocked ".concat(n," ").concat(e," event listener.")),!1):!0}function mfe(t,n,e){var o=this,f=new aw(e),r=function(i,s){o.runAsync(null,()=>{t===_L&&gfe(o,n)&&i.preventDefault(),f.receive(ufe(o,i,s))})},a;if(t===ffe)wb(o,"timer",n)&&o.timer(r,n);else if(t===_L)wb(o,"view",n)&&o.addEventListener(n,r,dfe);else if(t===hfe?wb(o,"window",n)&&typeof window<"u"&&(a=[window]):typeof document<"u"&&wb(o,"selector",n)&&(a=document.querySelectorAll(t)),!a)o.warn("Can not resolve event source: "+t);else{for(var l=0,c=a.length;l=0;)n[o].stop();for(o=e.length;--o>=0;)for(r=e[o],f=r.sources.length;--f>=0;)r.sources[f].removeEventListener(r.type,r.handler);return t&&t.call(this,this._handler,null,null,null),this}function Ku(t,n,e){const o=document.createElement(t);for(const f in n)o.setAttribute(f,n[f]);return e!=null&&(o.textContent=e),o}const xfe="vega-bind",bfe="vega-bind-name",_fe="vega-bind-radio";function wfe(t,n,e){if(!n)return;const o=e.param;let f=e.state;return f||(f=e.state={elements:null,active:!1,set:null,update:a=>{a!=t.signal(o.signal)&&t.runAsync(null,()=>{f.source=!0,t.signal(o.signal,a)})}},o.debounce&&(f.update=OA(o.debounce,f.update))),(o.input==null&&o.element?kfe:Afe)(f,n,o,t),f.active||(t.on(t._signals[o.signal],null,()=>{f.source?f.source=!1:f.set(t.signal(o.signal))}),f.active=!0),f}function kfe(t,n,e,o){const f=e.event||"input",r=()=>t.update(n.value);o.signal(e.signal,n.value),n.addEventListener(f,r),Ej(o,n,f,r),t.set=a=>{n.value=a,n.dispatchEvent(Tfe(f))}}function Tfe(t){return typeof Event<"u"?new Event(t):{type:t}}function Afe(t,n,e,o){const f=o.signal(e.signal),r=Ku("div",{class:xfe}),a=e.input==="radio"?r:r.appendChild(Ku("label"));a.appendChild(Ku("span",{class:bfe},e.name||e.signal)),n.appendChild(r);let l=Mfe;switch(e.input){case"checkbox":l=Sfe;break;case"select":l=Efe;break;case"radio":l=Cfe;break;case"range":l=Ofe;break}l(t,a,e,f)}function Mfe(t,n,e,o){const f=Ku("input");for(const r in e)r!=="signal"&&r!=="element"&&f.setAttribute(r==="input"?"type":r,e[r]);f.setAttribute("name",e.signal),f.value=o,n.appendChild(f),f.addEventListener("input",()=>t.update(f.value)),t.elements=[f],t.set=r=>f.value=r}function Sfe(t,n,e,o){const f={type:"checkbox",name:e.signal};o&&(f.checked=!0);const r=Ku("input",f);n.appendChild(r),r.addEventListener("change",()=>t.update(r.checked)),t.elements=[r],t.set=a=>r.checked=!!a||null}function Efe(t,n,e,o){const f=Ku("select",{name:e.signal}),r=e.labels||[];e.options.forEach((a,l)=>{const c={value:a};b2(a,o)&&(c.selected=!0),f.appendChild(Ku("option",c,(r[l]||a)+""))}),n.appendChild(f),f.addEventListener("change",()=>{t.update(e.options[f.selectedIndex])}),t.elements=[f],t.set=a=>{for(let l=0,c=e.options.length;l{const c={type:"radio",name:e.signal,value:a};b2(a,o)&&(c.checked=!0);const i=Ku("input",c);i.addEventListener("change",()=>t.update(a));const s=Ku("label",{},(r[l]||a)+"");return s.prepend(i),f.appendChild(s),i}),t.set=a=>{const l=t.elements,c=l.length;for(let i=0;i{c.textContent=l.value,t.update(+l.value)};l.addEventListener("input",i),l.addEventListener("change",i),t.elements=[l],t.set=s=>{l.value=s,c.textContent=s}}function b2(t,n){return t===n||t+""==n+""}function Cj(t,n,e,o,f,r){return n=n||new o(t.loader()),n.initialize(e,Mj(t),Sj(t),Hw(t),f,r).background(t.background())}function ZS(t,n){return n?function(){try{n.apply(this,arguments)}catch(e){t.error(e)}}:null}function Lfe(t,n,e,o){const f=new o(t.loader(),ZS(t,t.tooltip())).scene(t.scenegraph().root).initialize(e,Hw(t),t);return n&&n.handlers().forEach(r=>{f.on(r.type,r.handler)}),f}function Pfe(t,n){const e=this,o=e._renderType,f=e._eventConfig.bind,r=Lw(o);t=e._el=t?A4(e,t,!0):null,nfe(e),r||e.error("Unrecognized renderer type: "+o);const a=r.handler||qy,l=t?r.renderer:r.headless;return e._renderer=l?Cj(e,e._renderer,t,l):null,e._handler=Lfe(e,e._handler,t,a),e._redraw=!0,t&&f!=="none"&&(n=n?e._elBind=A4(e,n,!0):t.appendChild(Ku("form",{class:"vega-bindings"})),e._bind.forEach(c=>{c.param.element&&f!=="container"&&(c.element=A4(e,c.param.element,!!c.param.input))}),e._bind.forEach(c=>{wfe(e,c.element||n,c)})),e}function A4(t,n,e){if(typeof n=="string")if(typeof document<"u"){if(n=document.querySelector(n),!n)return t.error("Signal bind element not found: "+n),null}else return t.error("DOM document instance not found."),null;if(n&&e)try{n.textContent=""}catch(o){n=null,t.error(o)}return n}const G1=t=>+t||0,Dfe=t=>({top:t,bottom:t,left:t,right:t});function AL(t){return Ei(t)?{top:G1(t.top),bottom:G1(t.bottom),left:G1(t.left),right:G1(t.right)}:Dfe(G1(t))}async function JS(t,n,e,o){const f=Lw(n),r=f&&f.headless;return r||Pr("Unrecognized renderer type: "+n),await t.runAsync(),Cj(t,null,null,r,e,o).renderAsync(t._scenegraph.root)}async function Ife(t,n){t!==Ld.Canvas&&t!==Ld.SVG&&t!==Ld.PNG&&Pr("Unrecognized image type: "+t);const e=await JS(this,t,n);return t===Ld.SVG?zfe(e.svg(),"image/svg+xml"):e.canvas().toDataURL("image/png")}function zfe(t,n){const e=new Blob([t],{type:n});return window.URL.createObjectURL(e)}async function Rfe(t,n){return(await JS(this,Ld.Canvas,t,n)).canvas()}async function Ffe(t){return(await JS(this,Ld.SVG,t)).svg()}function Nfe(t,n,e){return kj(t,um,ly,e).parse(n)}function Bfe(t){var n=this._runtime.scales;return qi(n,t)||Pr("Unrecognized scale or projection: "+t),n[t].value}var Oj="width",Lj="height",KS="padding",ML={skip:!0};function Pj(t,n){var e=t.autosize(),o=t.padding();return n-(e&&e.contains===KS?o.left+o.right:0)}function Dj(t,n){var e=t.autosize(),o=t.padding();return n-(e&&e.contains===KS?o.top+o.bottom:0)}function jfe(t){var n=t._signals,e=n[Oj],o=n[Lj],f=n[KS];function r(){t._autosize=t._resize=1}t._resizeWidth=t.add(null,l=>{t._width=l.size,t._viewWidth=Pj(t,l.size),r()},{size:e}),t._resizeHeight=t.add(null,l=>{t._height=l.size,t._viewHeight=Dj(t,l.size),r()},{size:o});const a=t.add(null,r,{pad:f});t._resizeWidth.rank=e.rank+1,t._resizeHeight.rank=o.rank+1,a.rank=f.rank+1}function Ufe(t,n,e,o,f,r){this.runAfter(a=>{let l=0;a._autosize=0,a.width()!==e&&(l=1,a.signal(Oj,e,ML),a._resizeWidth.skip(!0)),a.height()!==o&&(l=1,a.signal(Lj,o,ML),a._resizeHeight.skip(!0)),a._viewWidth!==t&&(a._resize=1,a._viewWidth=t),a._viewHeight!==n&&(a._resize=1,a._viewHeight=n),(a._origin[0]!==f[0]||a._origin[1]!==f[1])&&(a._resize=1,a._origin=f),l&&a.run("enter"),r&&a.runAfter(c=>c.resize())},!1,1)}function Vfe(t){return this._runtime.getState(t||{data:qfe,signals:Hfe,recurse:!0})}function qfe(t,n){return n.modified&&Ir(n.input.value)&&t.indexOf("_:vega:_")}function Hfe(t,n){return!(t==="parent"||n instanceof um.proxy)}function $fe(t){return this.runAsync(null,n=>{n._trigger=!1,n._runtime.setState(t)},n=>{n._trigger=!0}),this}function Gfe(t,n){function e(o){t({timestamp:Date.now(),elapsed:o})}this._timers.push(Aae(e,n))}function Wfe(t,n,e,o){const f=t.element();f&&f.setAttribute("title",Yfe(o))}function Yfe(t){return t==null?"":Ir(t)?Ij(t):Ei(t)&&!Bd(t)?Xfe(t):t+""}function Xfe(t){return Object.keys(t).map(n=>{const e=t[n];return n+": "+(Ir(e)?Ij(e):zj(e))}).join(` +`)}function Ij(t){return"["+t.map(zj).join(", ")+"]"}function zj(t){return Ir(t)?"[\u2026]":Ei(t)&&!Bd(t)?"{\u2026}":t}function Rj(t,n){const e=this;if(n=n||{},Kg.call(e),n.loader&&e.loader(n.loader),n.logger&&e.logger(n.logger),n.logLevel!=null&&e.logLevel(n.logLevel),n.locale||t.locale){const r=pa({},t.locale,n.locale);e.locale(uz(r.number,r.time))}e._el=null,e._elBind=null,e._renderType=n.renderer||Ld.Canvas,e._scenegraph=new PM;const o=e._scenegraph.root;e._renderer=null,e._tooltip=n.tooltip||Wfe,e._redraw=!0,e._handler=new qy().scene(o),e._globalCursor=!1,e._preventDefault=!1,e._timers=[],e._eventListeners=[],e._resizeListeners=[],e._eventConfig=pfe(t.eventConfig),e.globalCursor(e._eventConfig.globalCursor);const f=Nfe(e,t,n.expr);e._runtime=f,e._signals=f.signals,e._bind=(t.bindings||[]).map(r=>({state:null,param:pa({},r)})),f.root&&f.root.set(o),o.source=f.data.root.input,e.pulse(f.data.root.input,e.changeset().insert(o.items)),e._width=e.width(),e._height=e.height(),e._viewWidth=Pj(e,e._width),e._viewHeight=Dj(e,e._height),e._origin=[0,0],e._resize=0,e._autosize=1,jfe(e),rfe(e),ife(e),e.description(t.description),n.hover&&e.hover(),n.container&&e.initialize(n.container,n.bind)}function kb(t,n){return qi(t._signals,n)?t._signals[n]:Pr("Unrecognized signal name: "+oi(n))}function Fj(t,n){const e=(t._targets||[]).filter(o=>o._update&&o._update.handler===n);return e.length?e[0]:null}function SL(t,n,e,o){let f=Fj(e,o);return f||(f=ZS(t,()=>o(n,e.value)),f.handler=o,t.on(e,null,f)),t}function EL(t,n,e){const o=Fj(n,e);return o&&n._targets.remove(o),t}ni(Rj,Kg,{async evaluate(t,n,e){if(await Kg.prototype.evaluate.call(this,t,n),this._redraw||this._resize)try{this._renderer&&(this._resize&&(this._resize=0,lfe(this)),await this._renderer.renderAsync(this._scenegraph.root)),this._redraw=!1}catch(o){this.error(o)}return e&&Ub(this,e),this},dirty(t){this._redraw=!0,this._renderer&&this._renderer.dirty(t)},description(t){if(arguments.length){const n=t!=null?t+"":null;return n!==this._desc&&Aj(this._el,this._desc=n),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(t,n,e){const o=kb(this,t);return arguments.length===1?o.value:this.update(o,n,e)},width(t){return arguments.length?this.signal("width",t):this.signal("width")},height(t){return arguments.length?this.signal("height",t):this.signal("height")},padding(t){return arguments.length?this.signal("padding",AL(t)):AL(this.signal("padding"))},autosize(t){return arguments.length?this.signal("autosize",t):this.signal("autosize")},background(t){return arguments.length?this.signal("background",t):this.signal("background")},renderer(t){return arguments.length?(Lw(t)||Pr("Unrecognized renderer type: "+t),t!==this._renderType&&(this._renderType=t,this._resetRenderer()),this):this._renderType},tooltip(t){return arguments.length?(t!==this._tooltip&&(this._tooltip=t,this._resetRenderer()),this):this._tooltip},loader(t){return arguments.length?(t!==this._loader&&(Kg.prototype.loader.call(this,t),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(kb(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:Ufe,addEventListener(t,n,e){let o=n;return e&&e.trap===!1||(o=ZS(this,n),o.raw=n),this._handler.on(t,o),this},removeEventListener(t,n){for(var e=this._handler.handlers(t),o=e.length,f,r;--o>=0;)if(r=e[o].type,f=e[o].handler,t===r&&(n===f||n===f.raw)){this._handler.off(r,f);break}return this},addResizeListener(t){const n=this._resizeListeners;return n.indexOf(t)<0&&n.push(t),this},removeResizeListener(t){var n=this._resizeListeners,e=n.indexOf(t);return e>=0&&n.splice(e,1),this},addSignalListener(t,n){return SL(this,t,kb(this,t),n)},removeSignalListener(t,n){return EL(this,kb(this,t),n)},addDataListener(t,n){return SL(this,t,x2(this,t).values,n)},removeDataListener(t,n){return EL(this,x2(this,t).values,n)},globalCursor(t){if(arguments.length){if(this._globalCursor!==!!t){const n=ET(this,null);this._globalCursor=!!t,n&&ET(this,n)}return this}else return this._globalCursor},preventDefault(t){return arguments.length?(this._preventDefault=t,this):this._preventDefault},timer:Gfe,events:mfe,finalize:yfe,hover:vfe,data:afe,change:qw,insert:ofe,remove:sfe,scale:Bfe,initialize:Pfe,toImageURL:Ife,toCanvas:Rfe,toSVG:Ffe,getState:Vfe,setState:$fe});const Zfe="view",_2="[",w2="]",Nj="{",Bj="}",Jfe=":",jj=",",Kfe="@",Qfe=">",ehe=/[[\]{}]/,the={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let Uj,Vj;function gp(t,n,e){return Uj=n||Zfe,Vj=e||the,qj(t.trim()).map(CT)}function nhe(t){return Vj[t]}function Nv(t,n,e,o,f){const r=t.length;let a=0,l;for(;n=0?--a:o&&o.indexOf(l)>=0&&++a}return n}function qj(t){const n=[],e=t.length;let o=0,f=0;for(;f' after between selector: "+t;o=o.map(CT);const f=CT(t.slice(1).trim());return f.between?{between:o,stream:f}:(f.between=o,f)}function ihe(t){const n={source:Uj},e=[];let o=[0,0],f=0,r=0,a=t.length,l=0,c,i;if(t[a-1]===Bj){if(l=t.lastIndexOf(Nj),l>=0){try{o=ahe(t.substring(l+1,a-1))}catch{throw"Invalid throttle specification: "+t}t=t.slice(0,l).trim(),a=t.length}else throw"Unmatched right brace: "+t;l=0}if(!a)throw t;if(t[0]===Kfe&&(f=++l),c=Nv(t,l,Jfe),c1?(n.type=e[1],f?n.markname=e[0].slice(1):nhe(e[0])?n.marktype=e[0]:n.source=e[0]):n.type=e[0],n.type.slice(-1)==="!"&&(n.consume=!0,n.type=n.type.slice(0,-1)),i!=null&&(n.filter=i),o[0]&&(n.throttle=o[0]),o[1]&&(n.debounce=o[1]),n}function ahe(t){const n=t.split(jj);if(!t.length||n.length>2)throw t;return n.map(e=>{const o=+e;if(o!==o)throw t;return o})}function ohe(t){return Ei(t)?t:{type:t||"pad"}}const W1=t=>+t||0,she=t=>({top:t,bottom:t,left:t,right:t});function lhe(t){return Ei(t)?t.signal?t:{top:W1(t.top),bottom:W1(t.bottom),left:W1(t.left),right:W1(t.right)}:she(W1(t))}const il=t=>Ei(t)&&!Ir(t)?pa({},t):{value:t};function CL(t,n,e,o){return e!=null?(Ei(e)&&!Ir(e)||Ir(e)&&e.length&&Ei(e[0])?t.update[n]=e:t[o||"enter"][n]={value:e},1):0}function kl(t,n,e){for(const o in n)CL(t,o,n[o]);for(const o in e)CL(t,o,e[o],"update")}function Zm(t,n,e){for(const o in n)e&&qi(e,o)||(t[o]=pa(t[o]||{},n[o]));return t}function Hg(t,n){return n&&(n.enter&&n.enter[t]||n.update&&n.update[t])}const QS="mark",eE="frame",tE="scope",uhe="axis",che="axis-domain",fhe="axis-grid",hhe="axis-label",dhe="axis-tick",phe="axis-title",ghe="legend",mhe="legend-band",vhe="legend-entry",yhe="legend-gradient",Hj="legend-label",xhe="legend-symbol",bhe="legend-title",_he="title",whe="title-text",khe="title-subtitle";function The(t,n,e,o,f){const r={},a={};let l,c,i,s;c="lineBreak",n==="text"&&f[c]!=null&&!Hg(c,t)&&M4(r,c,f[c]),(e=="legend"||String(e).startsWith("axis"))&&(e=null),s=e===eE?f.group:e===QS?pa({},f.mark,f[n]):null;for(c in s)i=Hg(c,t)||(c==="fill"||c==="stroke")&&(Hg("fill",t)||Hg("stroke",t)),i||M4(r,c,s[c]);ki(o).forEach(u=>{const d=f.style&&f.style[u];for(const h in d)Hg(h,t)||M4(r,h,d[h])}),t=pa({},t);for(c in r)s=r[c],s.signal?(l=l||{})[c]=s:a[c]=s;return t.enter=pa(a,t.enter),l&&(t.update=pa(l,t.update)),t}function M4(t,n,e){t[n]=e&&e.signal?{signal:e.signal}:{value:e}}const $j=t=>bi(t)?oi(t):t.signal?`(${t.signal})`:Gj(t);function $w(t){if(t.gradient!=null)return Mhe(t);let n=t.signal?`(${t.signal})`:t.color?Ahe(t.color):t.field!=null?Gj(t.field):t.value!==void 0?oi(t.value):void 0;return t.scale!=null&&(n=She(t,n)),n===void 0&&(n=null),t.exponent!=null&&(n=`pow(${n},${i_(t.exponent)})`),t.mult!=null&&(n+=`*${i_(t.mult)}`),t.offset!=null&&(n+=`+${i_(t.offset)}`),t.round&&(n=`round(${n})`),n}const Tb=(t,n,e,o)=>`(${t}(${[n,e,o].map($w).join(",")})+'')`;function Ahe(t){return t.c?Tb("hcl",t.h,t.c,t.l):t.h||t.s?Tb("hsl",t.h,t.s,t.l):t.l||t.a?Tb("lab",t.l,t.a,t.b):t.r||t.g||t.b?Tb("rgb",t.r,t.g,t.b):null}function Mhe(t){const n=[t.start,t.stop,t.count].map(e=>e==null?null:oi(e));for(;n.length&&Na(n)==null;)n.pop();return n.unshift($j(t.gradient)),`gradient(${n.join(",")})`}function i_(t){return Ei(t)?"("+$w(t)+")":t}function Gj(t){return Wj(Ei(t)?t:{datum:t})}function Wj(t){let n,e,o;if(t.signal)n="datum",o=t.signal;else if(t.group||t.parent){for(e=Math.max(1,t.level||1),n="item";e-- >0;)n+=".mark.group";t.parent?(o=t.parent,n+=".datum"):o=t.group}else t.datum?(n="datum",o=t.datum):Pr("Invalid field reference: "+oi(t));return t.signal||(o=bi(o)?ih(o).map(oi).join("]["):Wj(o)),n+"["+o+"]"}function She(t,n){const e=$j(t.scale);return t.range!=null?n=`lerp(_range(${e}), ${+t.range})`:(n!==void 0&&(n=`_scale(${e}, ${n})`),t.band&&(n=(n?n+"+":"")+`_bandwidth(${e})`+(+t.band==1?"":"*"+i_(t.band)),t.extra&&(n=`(datum.extra ? _scale(${e}, datum.extra.value) : ${n})`)),n==null&&(n="0")),n}function Ehe(t){let n="";return t.forEach(e=>{const o=$w(e);n+=e.test?`(${e.test})?${o}:`:o}),Na(n)===":"&&(n+="null"),n}function Yj(t,n,e,o,f,r){const a={};r=r||{},r.encoders={$encode:a},t=The(t,n,e,o,f.config);for(const l in t)a[l]=Che(t[l],n,r,f);return r}function Che(t,n,e,o){const f={},r={};for(const a in t)t[a]!=null&&(f[a]=Lhe(Ohe(t[a]),o,e,r));return{$expr:{marktype:n,channels:f},$fields:Object.keys(r),$output:Object.keys(t)}}function Ohe(t){return Ir(t)?Ehe(t):$w(t)}function Lhe(t,n,e,o){const f=Qf(t,n);return f.$fields.forEach(r=>o[r]=1),pa(e,f.$params),f.$expr}const Phe="outer",Dhe=["value","update","init","react","bind"];function OL(t,n){Pr(t+' for "outer" push: '+oi(n))}function Xj(t,n){const e=t.name;if(t.push===Phe)n.signals[e]||OL("No prior signal definition",e),Dhe.forEach(o=>{t[o]!==void 0&&OL("Invalid property ",o)});else{const o=n.addSignal(e,t.value);t.react===!1&&(o.react=!1),t.bind&&n.addBinding(e,t.bind)}}function OT(t,n,e,o){this.id=-1,this.type=t,this.value=n,this.params=e,o&&(this.parent=o)}function Gw(t,n,e,o){return new OT(t,n,e,o)}function k2(t,n){return Gw("operator",t,n)}function Hi(t){const n={$ref:t.id};return t.id<0&&(t.refs=t.refs||[]).push(n),n}function uy(t,n){return n?{$field:t,$name:n}:{$field:t}}const LT=uy("key");function LL(t,n){return{$compare:t,$order:n}}function Ihe(t,n){const e={$key:t};return n&&(e.$flat=!0),e}const zhe="ascending",Rhe="descending";function Fhe(t){return Ei(t)?(t.order===Rhe?"-":"+")+Ww(t.op,t.field):""}function Ww(t,n){return(t&&t.signal?"$"+t.signal:t||"")+(t&&n?"_":"")+(n&&n.signal?"$"+n.signal:n||"")}const nE="scope",PT="view";function Ys(t){return t&&t.signal}function Nhe(t){return t&&t.expr}function a_(t){if(Ys(t))return!0;if(Ei(t)){for(const n in t)if(a_(t[n]))return!0}return!1}function Wc(t,n){return t??n}function p0(t){return t&&t.signal||t}const PL="timer";function cy(t,n){return(t.merge?jhe:t.stream?Uhe:t.type?Vhe:Pr("Invalid stream specification: "+oi(t)))(t,n)}function Bhe(t){return t===nE?PT:t||PT}function jhe(t,n){const e=t.merge.map(f=>cy(f,n)),o=rE({merge:e},t,n);return n.addStream(o).id}function Uhe(t,n){const e=cy(t.stream,n),o=rE({stream:e},t,n);return n.addStream(o).id}function Vhe(t,n){let e;t.type===PL?(e=n.event(PL,t.throttle),t={between:t.between,filter:t.filter}):e=n.event(Bhe(t.source),t.type);const o=rE({stream:e},t,n);return Object.keys(o).length===1?e:n.addStream(o).id}function rE(t,n,e){let o=n.between;return o&&(o.length!==2&&Pr('Stream "between" parameter must have 2 entries: '+oi(n)),t.between=[cy(o[0],e),cy(o[1],e)]),o=n.filter?[].concat(n.filter):[],(n.marktype||n.markname||n.markrole)&&o.push(qhe(n.marktype,n.markname,n.markrole)),n.source===nE&&o.push("inScope(event.item)"),o.length&&(t.filter=Qf("("+o.join(")&&(")+")",e).$expr),(o=n.throttle)!=null&&(t.throttle=+o),(o=n.debounce)!=null&&(t.debounce=+o),n.consume&&(t.consume=!0),t}function qhe(t,n,e){const o="event.item";return o+(t&&t!=="*"?"&&"+o+".mark.marktype==='"+t+"'":"")+(e?"&&"+o+".mark.role==='"+e+"'":"")+(n?"&&"+o+".mark.name==='"+n+"'":"")}const Hhe={code:"_.$value",ast:{type:"Identifier",value:"value"}};function $he(t,n,e){const o=t.encode,f={target:e};let r=t.events,a=t.update,l=[];r||Pr("Signal update missing events specification."),bi(r)&&(r=gp(r,n.isSubscope()?nE:PT)),r=ki(r).filter(c=>c.signal||c.scale?(l.push(c),0):1),l.length>1&&(l=[Whe(l)]),r.length&&l.push(r.length>1?{merge:r}:r[0]),o!=null&&(a&&Pr("Signal encode and update are mutually exclusive."),a="encode(item(),"+oi(o)+")"),f.update=bi(a)?Qf(a,n):a.expr!=null?Qf(a.expr,n):a.value!=null?a.value:a.signal!=null?{$expr:Hhe,$params:{$value:n.signalRef(a.signal)}}:Pr("Invalid signal update specification."),t.force&&(f.options={force:!0}),l.forEach(c=>n.addUpdate(pa(Ghe(c,n),f)))}function Ghe(t,n){return{source:t.signal?n.signalRef(t.signal):t.scale?n.scaleRef(t.scale):cy(t,n)}}function Whe(t){return{signal:"["+t.map(n=>n.scale?'scale("'+n.scale+'")':n.signal)+"]"}}function Yhe(t,n){const e=n.getSignal(t.name);let o=t.update;t.init&&(o?Pr("Signals can not include both init and update expressions."):(o=t.init,e.initonly=!0)),o&&(o=Qf(o,n),e.update=o.$expr,e.params=o.$params),t.on&&t.on.forEach(f=>$he(f,n,e.id))}const ko=t=>(n,e,o)=>Gw(t,e,n||void 0,o),Zj=ko("aggregate"),Xhe=ko("axisticks"),Jj=ko("bound"),pf=ko("collect"),DL=ko("compare"),Zhe=ko("datajoin"),Kj=ko("encode"),Jhe=ko("expression"),Khe=ko("facet"),Qhe=ko("field"),ede=ko("key"),tde=ko("legendentries"),nde=ko("load"),rde=ko("mark"),ide=ko("multiextent"),ade=ko("multivalues"),ode=ko("overlap"),sde=ko("params"),Qj=ko("prefacet"),lde=ko("projection"),ude=ko("proxy"),cde=ko("relay"),eU=ko("render"),fde=ko("scale"),W0=ko("sieve"),hde=ko("sortitems"),tU=ko("viewlayout"),dde=ko("values");let pde=0;const nU={min:"min",max:"max",count:"sum"};function gde(t,n){const e=t.type||"linear";KR(e)||Pr("Unrecognized scale type: "+oi(e)),n.addScale(t.name,{type:e,domain:void 0})}function mde(t,n){const e=n.getScale(t.name).params;let o;e.domain=rU(t.domain,t,n),t.range!=null&&(e.range=aU(t,n,e)),t.interpolate!=null&&Mde(t.interpolate,e),t.nice!=null&&(e.nice=Ade(t.nice)),t.bins!=null&&(e.bins=Tde(t.bins,n));for(o in t)qi(e,o)||o==="name"||(e[o]=hc(t[o],n))}function hc(t,n){return Ei(t)?t.signal?n.signalRef(t.signal):Pr("Unsupported object: "+oi(t)):t}function o_(t,n){return t.signal?n.signalRef(t.signal):t.map(e=>hc(e,n))}function Yw(t){Pr("Can not find data set: "+oi(t))}function rU(t,n,e){if(!t){(n.domainMin!=null||n.domainMax!=null)&&Pr("No scale domain defined for domainMin/domainMax to override.");return}return t.signal?e.signalRef(t.signal):(Ir(t)?vde:t.fields?xde:yde)(t,n,e)}function vde(t,n,e){return t.map(o=>hc(o,e))}function yde(t,n,e){const o=e.getData(t.data);return o||Yw(t.data),dm(n.type)?o.valuesRef(e,t.field,iU(t.sort,!1)):tF(n.type)?o.domainRef(e,t.field):o.extentRef(e,t.field)}function xde(t,n,e){const o=t.data,f=t.fields.reduce((r,a)=>(a=bi(a)?{data:o,field:a}:Ir(a)||a.signal?bde(a,e):a,r.push(a),r),[]);return(dm(n.type)?_de:tF(n.type)?wde:kde)(t,e,f)}function bde(t,n){const e="_:vega:_"+pde++,o=pf({});if(Ir(t))o.value={$ingest:t};else if(t.signal){const f="setdata("+oi(e)+","+t.signal+")";o.params.input=n.signalRef(f)}return n.addDataPipeline(e,[o,W0({})]),{data:e,field:"data"}}function _de(t,n,e){const o=iU(t.sort,!0);let f,r;const a=e.map(i=>{const s=n.getData(i.data);return s||Yw(i.data),s.countsRef(n,i.field,o)}),l={groupby:LT,pulse:a};o&&(f=o.op||"count",r=o.field?Ww(f,o.field):"count",l.ops=[nU[f]],l.fields=[n.fieldRef(r)],l.as=[r]),f=n.add(Zj(l));const c=n.add(pf({pulse:Hi(f)}));return r=n.add(dde({field:LT,sort:n.sortRef(o),pulse:Hi(c)})),Hi(r)}function iU(t,n){return t&&(!t.field&&!t.op?Ei(t)?t.field="key":t={field:"key"}:!t.field&&t.op!=="count"?Pr("No field provided for sort aggregate op: "+t.op):n&&t.field&&t.op&&!nU[t.op]&&Pr("Multiple domain scales can not be sorted using "+t.op)),t}function wde(t,n,e){const o=e.map(f=>{const r=n.getData(f.data);return r||Yw(f.data),r.domainRef(n,f.field)});return Hi(n.add(ade({values:o})))}function kde(t,n,e){const o=e.map(f=>{const r=n.getData(f.data);return r||Yw(f.data),r.extentRef(n,f.field)});return Hi(n.add(ide({extents:o})))}function Tde(t,n){return t.signal||Ir(t)?o_(t,n):n.objectProperty(t)}function Ade(t){return Ei(t)?{interval:hc(t.interval),step:hc(t.step)}:hc(t)}function Mde(t,n){n.interpolate=hc(t.type||t),t.gamma!=null&&(n.interpolateGamma=hc(t.gamma))}function aU(t,n,e){const o=n.config.range;let f=t.range;if(f.signal)return n.signalRef(f.signal);if(bi(f)){if(o&&qi(o,f))return t=pa({},t,{range:o[f]}),aU(t,n,e);f==="width"?f=[0,{signal:"width"}]:f==="height"?f=dm(t.type)?[0,{signal:"height"}]:[{signal:"height"},0]:Pr("Unrecognized scale range value: "+oi(f))}else if(f.scheme){e.scheme=Ir(f.scheme)?o_(f.scheme,n):hc(f.scheme,n),f.extent&&(e.schemeExtent=o_(f.extent,n)),f.count&&(e.schemeCount=hc(f.count,n));return}else if(f.step){e.rangeStep=hc(f.step,n);return}else{if(dm(t.type)&&!Ir(f))return rU(f,t,n);Ir(f)||Pr("Unsupported range type: "+oi(f))}return f.map(r=>(Ir(r)?o_:hc)(r,n))}function Sde(t,n){const e=n.config.projection||{},o={};for(const f in t)f!=="name"&&(o[f]=DT(t[f],f,n));for(const f in e)o[f]==null&&(o[f]=DT(e[f],f,n));n.addProjection(t.name,o)}function DT(t,n,e){return Ir(t)?t.map(o=>DT(o,n,e)):Ei(t)?t.signal?e.signalRef(t.signal):n==="fit"?t:Pr("Unsupported parameter object: "+oi(t)):t}const gf="top",Jm="left",Km="right",rp="bottom",oU="center",Ede="vertical",Cde="start",Ode="middle",Lde="end",IT="index",iE="label",Pde="offset",km="perc",Dde="perc2",pc="value",Ky="guide-label",aE="guide-title",Ide="group-title",zde="group-subtitle",IL="symbol",s_="gradient",zT="discrete",RT="size",Rde="shape",Fde="fill",Nde="stroke",Bde="strokeWidth",jde="strokeDash",Ude="opacity",oE=[RT,Rde,Fde,Nde,Bde,jde,Ude],Qy={name:1,style:1,interactive:1},Ua={value:0},gc={value:1},Xw="group",sU="rect",sE="rule",Vde="symbol",Y0="text";function fy(t){return t.type=Xw,t.interactive=t.interactive||!1,t}function Bu(t,n){const e=(o,f)=>Wc(t[o],Wc(n[o],f));return e.isVertical=o=>Ede===Wc(t.direction,n.direction||(o?n.symbolDirection:n.gradientDirection)),e.gradientLength=()=>Wc(t.gradientLength,n.gradientLength||n.gradientWidth),e.gradientThickness=()=>Wc(t.gradientThickness,n.gradientThickness||n.gradientHeight),e.entryColumns=()=>Wc(t.columns,Wc(n.columns,+e.isVertical(!0))),e}function lU(t,n){const e=n&&(n.update&&n.update[t]||n.enter&&n.enter[t]);return e&&e.signal?e:e?e.value:null}function qde(t,n,e){const o=n.config.style[e];return o&&o[t]}function Zw(t,n,e){return`item.anchor === '${Cde}' ? ${t} : item.anchor === '${Lde}' ? ${n} : ${e}`}const lE=Zw(oi(Jm),oi(Km),oi(oU));function Hde(t){const n=t("tickBand");let e=t("tickOffset"),o,f;return n?n.signal?(o={signal:`(${n.signal}) === 'extent' ? 1 : 0.5`},f={signal:`(${n.signal}) === 'extent'`},Ei(e)||(e={signal:`(${n.signal}) === 'extent' ? 0 : ${e}`})):n==="extent"?(o=1,f=!0,e=0):(o=.5,f=!1):(o=t("bandPosition"),f=t("tickExtra")),{extra:f,band:o,offset:e}}function uU(t,n){return n?t?Ei(t)?Object.assign({},t,{offset:uU(t.offset,n)}):{value:t,offset:n}:n:t}function nc(t,n){return n?(t.name=n.name,t.style=n.style||t.style,t.interactive=!!n.interactive,t.encode=Zm(t.encode,n,Qy)):t.interactive=!1,t}function $de(t,n,e,o){const f=Bu(t,e),r=f.isVertical(),a=f.gradientThickness(),l=f.gradientLength();let c,i,s,u,d;r?(i=[0,1],s=[0,0],u=a,d=l):(i=[0,0],s=[1,0],u=l,d=a);const h={enter:c={opacity:Ua,x:Ua,y:Ua,width:il(u),height:il(d)},update:pa({},c,{opacity:gc,fill:{gradient:n,start:i,stop:s}}),exit:{opacity:Ua}};return kl(h,{stroke:f("gradientStrokeColor"),strokeWidth:f("gradientStrokeWidth")},{opacity:f("gradientOpacity")}),nc({type:sU,role:yhe,encode:h},o)}function Gde(t,n,e,o,f){const r=Bu(t,e),a=r.isVertical(),l=r.gradientThickness(),c=r.gradientLength();let i,s,u,d,h="";a?(i="y",u="y2",s="x",d="width",h="1-"):(i="x",u="x2",s="y",d="height");const m={opacity:Ua,fill:{scale:n,field:pc}};m[i]={signal:h+"datum."+km,mult:c},m[s]=Ua,m[u]={signal:h+"datum."+Dde,mult:c},m[d]=il(l);const g={enter:m,update:pa({},m,{opacity:gc}),exit:{opacity:Ua}};return kl(g,{stroke:r("gradientStrokeColor"),strokeWidth:r("gradientStrokeWidth")},{opacity:r("gradientOpacity")}),nc({type:sU,role:mhe,key:pc,from:f,encode:g},o)}const Wde=`datum.${km}<=0?"${Jm}":datum.${km}>=1?"${Km}":"${oU}"`,Yde=`datum.${km}<=0?"${rp}":datum.${km}>=1?"${gf}":"${Ode}"`;function zL(t,n,e,o){const f=Bu(t,n),r=f.isVertical(),a=il(f.gradientThickness()),l=f.gradientLength();let c=f("labelOverlap"),i,s,u,d,h="";const m={enter:i={opacity:Ua},update:s={opacity:gc,text:{field:iE}},exit:{opacity:Ua}};return kl(m,{fill:f("labelColor"),fillOpacity:f("labelOpacity"),font:f("labelFont"),fontSize:f("labelFontSize"),fontStyle:f("labelFontStyle"),fontWeight:f("labelFontWeight"),limit:Wc(t.labelLimit,n.gradientLabelLimit)}),r?(i.align={value:"left"},i.baseline=s.baseline={signal:Yde},u="y",d="x",h="1-"):(i.align=s.align={signal:Wde},i.baseline={value:"top"},u="x",d="y"),i[u]=s[u]={signal:h+"datum."+km,mult:l},i[d]=s[d]=a,a.offset=Wc(t.labelOffset,n.gradientLabelOffset)||0,c=c?{separation:f("labelSeparation"),method:c,order:"datum."+IT}:void 0,nc({type:Y0,role:Hj,style:Ky,key:pc,from:o,encode:m,overlap:c},e)}function Xde(t,n,e,o,f){const r=Bu(t,n),a=e.entries,l=!!(a&&a.interactive),c=a?a.name:void 0,i=r("clipHeight"),s=r("symbolOffset"),u={data:"value"},d=`(${f}) ? datum.${Pde} : datum.${RT}`,h=i?il(i):{field:RT},m=`datum.${IT}`,g=`max(1, ${f})`;let p,v,y,x,w;h.mult=.5,p={enter:v={opacity:Ua,x:{signal:d,mult:.5,offset:s},y:h},update:y={opacity:gc,x:v.x,y:v.y},exit:{opacity:Ua}};let k=null,b=null;t.fill||(k=n.symbolBaseFillColor,b=n.symbolBaseStrokeColor),kl(p,{fill:r("symbolFillColor",k),shape:r("symbolType"),size:r("symbolSize"),stroke:r("symbolStrokeColor",b),strokeDash:r("symbolDash"),strokeDashOffset:r("symbolDashOffset"),strokeWidth:r("symbolStrokeWidth")},{opacity:r("symbolOpacity")}),oE.forEach(A=>{t[A]&&(y[A]=v[A]={scale:t[A],field:pc})});const T=nc({type:Vde,role:xhe,key:pc,from:u,clip:i?!0:void 0,encode:p},e.symbols),_=il(s);_.offset=r("labelOffset"),p={enter:v={opacity:Ua,x:{signal:d,offset:_},y:h},update:y={opacity:gc,text:{field:iE},x:v.x,y:v.y},exit:{opacity:Ua}},kl(p,{align:r("labelAlign"),baseline:r("labelBaseline"),fill:r("labelColor"),fillOpacity:r("labelOpacity"),font:r("labelFont"),fontSize:r("labelFontSize"),fontStyle:r("labelFontStyle"),fontWeight:r("labelFontWeight"),limit:r("labelLimit")});const S=nc({type:Y0,role:Hj,style:Ky,key:pc,from:u,encode:p},e.labels);return p={enter:{noBound:{value:!i},width:Ua,height:i?il(i):Ua,opacity:Ua},exit:{opacity:Ua},update:y={opacity:gc,row:{signal:null},column:{signal:null}}},r.isVertical(!0)?(x=`ceil(item.mark.items.length / ${g})`,y.row.signal=`${m}%${x}`,y.column.signal=`floor(${m} / ${x})`,w={field:["row",m]}):(y.row.signal=`floor(${m} / ${g})`,y.column.signal=`${m} % ${g}`,w={field:m}),y.column.signal=`(${f})?${y.column.signal}:${m}`,o={facet:{data:o,name:"value",groupby:IT}},fy({role:tE,from:o,encode:Zm(p,a,Qy),marks:[T,S],name:c,interactive:l,sort:w})}function Zde(t,n){const e=Bu(t,n);return{align:e("gridAlign"),columns:e.entryColumns(),center:{row:!0,column:!1},padding:{row:e("rowPadding"),column:e("columnPadding")}}}const uE='item.orient === "left"',cE='item.orient === "right"',Jw=`(${uE} || ${cE})`,Jde=`datum.vgrad && ${Jw}`,Kde=Zw('"top"','"bottom"','"middle"'),Qde=Zw('"right"','"left"','"center"'),epe=`datum.vgrad && ${cE} ? (${Qde}) : (${Jw} && !(datum.vgrad && ${uE})) ? "left" : ${lE}`,tpe=`item._anchor || (${Jw} ? "middle" : "start")`,npe=`${Jde} ? (${uE} ? -90 : 90) : 0`,rpe=`${Jw} ? (datum.vgrad ? (${cE} ? "bottom" : "top") : ${Kde}) : "top"`;function ipe(t,n,e,o){const f=Bu(t,n),r={enter:{opacity:Ua},update:{opacity:gc,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:Ua}};return kl(r,{orient:f("titleOrient"),_anchor:f("titleAnchor"),anchor:{signal:tpe},angle:{signal:npe},align:{signal:epe},baseline:{signal:rpe},text:t.title,fill:f("titleColor"),fillOpacity:f("titleOpacity"),font:f("titleFont"),fontSize:f("titleFontSize"),fontStyle:f("titleFontStyle"),fontWeight:f("titleFontWeight"),limit:f("titleLimit"),lineHeight:f("titleLineHeight")},{align:f("titleAlign"),baseline:f("titleBaseline")}),nc({type:Y0,role:bhe,style:aE,from:o,encode:r},e)}function ape(t,n){let e;return Ei(t)&&(t.signal?e=t.signal:t.path?e="pathShape("+RL(t.path)+")":t.sphere&&(e="geoShape("+RL(t.sphere)+', {type: "Sphere"})')),e?n.signalRef(e):!!t}function RL(t){return Ei(t)&&t.signal?t.signal:oi(t)}function cU(t){const n=t.role||"";return!n.indexOf("axis")||!n.indexOf("legend")||!n.indexOf("title")?n:t.type===Xw?tE:n||QS}function ope(t){return{marktype:t.type,name:t.name||void 0,role:t.role||cU(t),zindex:+t.zindex||void 0,aria:t.aria,description:t.description}}function spe(t,n){return t&&t.signal?n.signalRef(t.signal):t!==!1}function fE(t,n){const e=wz(t.type);e||Pr("Unrecognized transform type: "+oi(t.type));const o=Gw(e.type.toLowerCase(),null,fU(e,t,n));return t.signal&&n.addSignal(t.signal,n.proxy(o)),o.metadata=e.metadata||{},o}function fU(t,n,e){const o={},f=t.params.length;for(let r=0;rFL(t,r,e)):FL(t,f,e)}function FL(t,n,e){const o=t.type;if(Ys(n))return BL(o)?Pr("Expression references can not be signals."):S4(o)?e.fieldRef(n):jL(o)?e.compareRef(n):e.signalRef(n.signal);{const f=t.expr||S4(o);return f&&fpe(n)?e.exprRef(n.expr,n.as):f&&hpe(n)?uy(n.field,n.as):BL(o)?Qf(n,e):dpe(o)?Hi(e.getData(n).values):S4(o)?uy(n):jL(o)?e.compareRef(n):n}}function upe(t,n,e){return bi(n.from)||Pr('Lookup "from" parameter must be a string literal.'),e.getData(n.from).lookupRef(e,n.key)}function cpe(t,n,e){const o=n[t.name];return t.array?(Ir(o)||Pr("Expected an array of sub-parameters. Instead: "+oi(o)),o.map(f=>NL(t,f,e))):NL(t,o,e)}function NL(t,n,e){const o=t.params.length;let f;for(let a=0;at&&t.expr,hpe=t=>t&&t.field,dpe=t=>t==="data",BL=t=>t==="expr",S4=t=>t==="field",jL=t=>t==="compare";function ppe(t,n,e){let o,f,r,a,l;return t?(o=t.facet)&&(n||Pr("Only group marks can be faceted."),o.field!=null?a=l=l_(o,e):(t.data?l=Hi(e.getData(t.data).aggregate):(r=fE(pa({type:"aggregate",groupby:ki(o.groupby)},o.aggregate),e),r.params.key=e.keyRef(o.groupby),r.params.pulse=l_(o,e),a=l=Hi(e.add(r))),f=e.keyRef(o.groupby,!0))):a=Hi(e.add(pf(null,[{}]))),a||(a=l_(t,e)),{key:f,pulse:a,parent:l}}function l_(t,n){return t.$ref?t:t.data&&t.data.$ref?t.data:Hi(n.getData(t.data).output)}function C0(t,n,e,o,f){this.scope=t,this.input=n,this.output=e,this.values=o,this.aggregate=f,this.index={}}C0.fromEntries=function(t,n){const e=n.length,o=n[e-1],f=n[e-2];let r=n[0],a=null,l=1;for(r&&r.type==="load"&&(r=n[1]),t.add(n[0]);lu??"null").join(",")+"),0)",s=Qf(i,n);c.update=s.$expr,c.params=s.$params}function Kw(t,n){const e=cU(t),o=t.type===Xw,f=t.from&&t.from.facet,r=t.overlap;let a=t.layout||e===tE||e===eE,l,c,i,s,u,d,h;const m=e===QS||a||f,g=ppe(t.from,o,n);c=n.add(Zhe({key:g.key||(t.key?uy(t.key):void 0),pulse:g.pulse,clean:!o}));const p=Hi(c);c=i=n.add(pf({pulse:p})),c=n.add(rde({markdef:ope(t),interactive:spe(t.interactive,n),clip:ape(t.clip,n),context:{$context:!0},groups:n.lookup(),parent:n.signals.parent?n.signalRef("parent"):null,index:n.markpath(),pulse:Hi(c)}));const v=Hi(c);c=s=n.add(Kj(Yj(t.encode,t.type,e,t.style,n,{mod:!1,pulse:v}))),c.params.parent=n.encode(),t.transform&&t.transform.forEach(b=>{const T=fE(b,n),_=T.metadata;(_.generates||_.changes)&&Pr("Mark transforms should not generate new data."),_.nomod||(s.params.mod=!0),T.params.pulse=Hi(c),n.add(c=T)}),t.sort&&(c=n.add(hde({sort:n.compareRef(t.sort),pulse:Hi(c)})));const y=Hi(c);(f||a)&&(a=n.add(tU({layout:n.objectProperty(t.layout),legends:n.legends,mark:v,pulse:y})),d=Hi(a));const x=n.add(Jj({mark:v,pulse:d||y}));h=Hi(x),o&&(m&&(l=n.operators,l.pop(),a&&l.pop()),n.pushState(y,d||h,p),f?gpe(t,n,g):m?mpe(t,n,g):n.parse(t),n.popState(),m&&(a&&l.push(a),l.push(x))),r&&(h=vpe(r,h,n));const w=n.add(eU({pulse:h})),k=n.add(W0({pulse:Hi(w)},void 0,n.parent()));t.name!=null&&(u=t.name,n.addData(u,new C0(n,i,w,k)),t.on&&t.on.forEach(b=>{(b.insert||b.remove||b.toggle)&&Pr("Marks only support modify triggers."),dU(b,n,u)}))}function vpe(t,n,e){const o=t.method,f=t.bound,r=t.separation,a={separation:Ys(r)?e.signalRef(r.signal):r,method:Ys(o)?e.signalRef(o.signal):o,pulse:n};if(t.order&&(a.sort=e.compareRef({field:t.order})),f){const l=f.tolerance;a.boundTolerance=Ys(l)?e.signalRef(l.signal):+l,a.boundScale=e.scaleRef(f.scale),a.boundOrient=f.orient}return Hi(e.add(ode(a)))}function ype(t,n){const e=n.config.legend,o=t.encode||{},f=Bu(t,e),r=o.legend||{},a=r.name||void 0,l=r.interactive,c=r.style,i={};let s=0,u,d,h;oE.forEach(x=>t[x]?(i[x]=t[x],s=s||t[x]):0),s||Pr("Missing valid scale for legend.");const m=xpe(t,n.scaleType(s)),g={title:t.title!=null,scales:i,type:m,vgrad:m!=="symbol"&&f.isVertical()},p=Hi(n.add(pf(null,[g]))),v={enter:{x:{value:0},y:{value:0}}},y=Hi(n.add(tde(d={type:m,scale:n.scaleRef(s),count:n.objectProperty(f("tickCount")),limit:n.property(f("symbolLimit")),values:n.objectProperty(t.values),minstep:n.property(t.tickMinStep),formatType:n.property(t.formatType),formatSpecifier:n.property(t.format)})));return m===s_?(h=[$de(t,s,e,o.gradient),zL(t,e,o.labels,y)],d.count=d.count||n.signalRef(`max(2,2*floor((${p0(f.gradientLength())})/100))`)):m===zT?h=[Gde(t,s,e,o.gradient,y),zL(t,e,o.labels,y)]:(u=Zde(t,e),h=[Xde(t,e,o,y,p0(u.columns))],d.size=wpe(t,n,h[0].marks)),h=[fy({role:vhe,from:p,encode:v,marks:h,layout:u,interactive:l})],g.title&&h.push(ipe(t,e,o.title,p)),Kw(fy({role:ghe,from:p,encode:Zm(_pe(f,t,e),r,Qy),marks:h,aria:f("aria"),description:f("description"),zindex:f("zindex"),name:a,interactive:l,style:c}),n)}function xpe(t,n){let e=t.type||IL;return!t.type&&bpe(t)===1&&(t.fill||t.stroke)&&(e=sM(n)?s_:Sk(n)?zT:IL),e!==s_?e:Sk(n)?zT:s_}function bpe(t){return oE.reduce((n,e)=>n+(t[e]?1:0),0)}function _pe(t,n,e){const o={enter:{},update:{}};return kl(o,{orient:t("orient"),offset:t("offset"),padding:t("padding"),titlePadding:t("titlePadding"),cornerRadius:t("cornerRadius"),fill:t("fillColor"),stroke:t("strokeColor"),strokeWidth:e.strokeWidth,strokeDash:e.strokeDash,x:t("legendX"),y:t("legendY"),format:n.format,formatType:n.formatType}),o}function wpe(t,n,e){const o=p0(VL("size",t,e)),f=p0(VL("strokeWidth",t,e)),r=p0(kpe(e[1].encode,n,Ky));return Qf(`max(ceil(sqrt(${o})+${f}),${r})`,n)}function VL(t,n,e){return n[t]?`scale("${n[t]}",datum)`:lU(t,e[0].encode)}function kpe(t,n,e){return lU("fontSize",t)||qde("fontSize",n,e)}const Tpe=`item.orient==="${Jm}"?-90:item.orient==="${Km}"?90:0`;function Ape(t,n){t=bi(t)?{text:t}:t;const e=Bu(t,n.config.title),o=t.encode||{},f=o.group||{},r=f.name||void 0,a=f.interactive,l=f.style,c=[],i={},s=Hi(n.add(pf(null,[i])));return c.push(Epe(t,e,Mpe(t),s)),t.subtitle&&c.push(Cpe(t,e,o.subtitle,s)),Kw(fy({role:_he,from:s,encode:Spe(e,f),marks:c,aria:e("aria"),description:e("description"),zindex:e("zindex"),name:r,interactive:a,style:l}),n)}function Mpe(t){const n=t.encode;return n&&n.title||pa({name:t.name,interactive:t.interactive,style:t.style},n)}function Spe(t,n){const e={enter:{},update:{}};return kl(e,{orient:t("orient"),anchor:t("anchor"),align:{signal:lE},angle:{signal:Tpe},limit:t("limit"),frame:t("frame"),offset:t("offset")||0,padding:t("subtitlePadding")}),Zm(e,n,Qy)}function Epe(t,n,e,o){const f={value:0},r=t.text,a={enter:{opacity:f},update:{opacity:{value:1}},exit:{opacity:f}};return kl(a,{text:r,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:n("dx"),dy:n("dy"),fill:n("color"),font:n("font"),fontSize:n("fontSize"),fontStyle:n("fontStyle"),fontWeight:n("fontWeight"),lineHeight:n("lineHeight")},{align:n("align"),angle:n("angle"),baseline:n("baseline")}),nc({type:Y0,role:whe,style:Ide,from:o,encode:a},e)}function Cpe(t,n,e,o){const f={value:0},r=t.subtitle,a={enter:{opacity:f},update:{opacity:{value:1}},exit:{opacity:f}};return kl(a,{text:r,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:n("dx"),dy:n("dy"),fill:n("subtitleColor"),font:n("subtitleFont"),fontSize:n("subtitleFontSize"),fontStyle:n("subtitleFontStyle"),fontWeight:n("subtitleFontWeight"),lineHeight:n("subtitleLineHeight")},{align:n("align"),angle:n("angle"),baseline:n("baseline")}),nc({type:Y0,role:khe,style:zde,from:o,encode:a},e)}function Ope(t,n){const e=[];t.transform&&t.transform.forEach(o=>{e.push(fE(o,n))}),t.on&&t.on.forEach(o=>{dU(o,n,t.name)}),n.addDataPipeline(t.name,Lpe(t,n,e))}function Lpe(t,n,e){const o=[];let f=null,r=!1,a=!1,l,c,i,s,u;for(t.values?Ys(t.values)||a_(t.format)?(o.push(qL(n,t)),o.push(f=Up())):o.push(f=Up({$ingest:t.values,$format:t.format})):t.url?a_(t.url)||a_(t.format)?(o.push(qL(n,t)),o.push(f=Up())):o.push(f=Up({$request:t.url,$format:t.format})):t.source&&(f=l=ki(t.source).map(d=>Hi(n.getData(d).output)),o.push(null)),c=0,i=e.length;ct===rp||t===gf,Qw=(t,n,e)=>Ys(t)?zpe(t.signal,n,e):t===Jm||t===gf?n:e,al=(t,n,e)=>Ys(t)?Dpe(t.signal,n,e):pU(t)?n:e,of=(t,n,e)=>Ys(t)?Ipe(t.signal,n,e):pU(t)?e:n,gU=(t,n,e)=>Ys(t)?Rpe(t.signal,n,e):t===gf?{value:n}:{value:e},Ppe=(t,n,e)=>Ys(t)?Fpe(t.signal,n,e):t===Km?{value:n}:{value:e},Dpe=(t,n,e)=>mU(`${t} === '${gf}' || ${t} === '${rp}'`,n,e),Ipe=(t,n,e)=>mU(`${t} !== '${gf}' && ${t} !== '${rp}'`,n,e),zpe=(t,n,e)=>hE(`${t} === '${Jm}' || ${t} === '${gf}'`,n,e),Rpe=(t,n,e)=>hE(`${t} === '${gf}'`,n,e),Fpe=(t,n,e)=>hE(`${t} === '${Km}'`,n,e),mU=(t,n,e)=>(n=n!=null?il(n):n,e=e!=null?il(e):e,HL(n)&&HL(e)?(n=n?n.signal||oi(n.value):null,e=e?e.signal||oi(e.value):null,{signal:`${t} ? (${n}) : (${e})`}):[pa({test:t},n)].concat(e||[])),HL=t=>t==null||Object.keys(t).length===1,hE=(t,n,e)=>({signal:`${t} ? (${Jg(n)}) : (${Jg(e)})`}),Npe=(t,n,e,o,f)=>({signal:(o!=null?`${t} === '${Jm}' ? (${Jg(o)}) : `:"")+(e!=null?`${t} === '${rp}' ? (${Jg(e)}) : `:"")+(f!=null?`${t} === '${Km}' ? (${Jg(f)}) : `:"")+(n!=null?`${t} === '${gf}' ? (${Jg(n)}) : `:"")+"(null)"}),Jg=t=>Ys(t)?t.signal:t==null?null:oi(t),Bpe=(t,n)=>n===0?0:Ys(t)?{signal:`(${t.signal}) * ${n}`}:{value:t*n},tm=(t,n)=>{const e=t.signal;return e&&e.endsWith("(null)")?{signal:e.slice(0,-6)+n.signal}:t};function Fg(t,n,e,o){let f;if(n&&qi(n,t))return n[t];if(qi(e,t))return e[t];if(t.startsWith("title")){switch(t){case"titleColor":f="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":f=t[5].toLowerCase()+t.slice(6)}return o[aE][f]}else if(t.startsWith("label")){switch(t){case"labelColor":f="fill";break;case"labelFont":case"labelFontSize":f=t[5].toLowerCase()+t.slice(6)}return o[Ky][f]}return null}function $L(t){const n={};for(const e of t)if(!!e)for(const o in e)n[o]=1;return Object.keys(n)}function jpe(t,n){var e=n.config,o=e.style,f=e.axis,r=n.scaleType(t.scale)==="band"&&e.axisBand,a=t.orient,l,c,i;if(Ys(a)){const u=$L([e.axisX,e.axisY]),d=$L([e.axisTop,e.axisBottom,e.axisLeft,e.axisRight]);l={};for(i of u)l[i]=al(a,Fg(i,e.axisX,f,o),Fg(i,e.axisY,f,o));c={};for(i of d)c[i]=Npe(a.signal,Fg(i,e.axisTop,f,o),Fg(i,e.axisBottom,f,o),Fg(i,e.axisLeft,f,o),Fg(i,e.axisRight,f,o))}else l=a===gf||a===rp?e.axisX:e.axisY,c=e["axis"+a[0].toUpperCase()+a.slice(1)];return l||c||r?pa({},f,l,c,r):f}function Upe(t,n,e,o){const f=Bu(t,n),r=t.orient;let a,l;const c={enter:a={opacity:Ua},update:l={opacity:gc},exit:{opacity:Ua}};kl(c,{stroke:f("domainColor"),strokeCap:f("domainCap"),strokeDash:f("domainDash"),strokeDashOffset:f("domainDashOffset"),strokeWidth:f("domainWidth"),strokeOpacity:f("domainOpacity")});const i=GL(t,0),s=GL(t,1);return a.x=l.x=al(r,i,Ua),a.x2=l.x2=al(r,s),a.y=l.y=of(r,i,Ua),a.y2=l.y2=of(r,s),nc({type:sE,role:che,from:o,encode:c},e)}function GL(t,n){return{scale:t.scale,range:n}}function Vpe(t,n,e,o,f){const r=Bu(t,n),a=t.orient,l=t.gridScale,c=Qw(a,1,-1),i=qpe(t.offset,c);let s,u,d;const h={enter:s={opacity:Ua},update:d={opacity:gc},exit:u={opacity:Ua}};kl(h,{stroke:r("gridColor"),strokeCap:r("gridCap"),strokeDash:r("gridDash"),strokeDashOffset:r("gridDashOffset"),strokeOpacity:r("gridOpacity"),strokeWidth:r("gridWidth")});const m={scale:t.scale,field:pc,band:f.band,extra:f.extra,offset:f.offset,round:r("tickRound")},g=al(a,{signal:"height"},{signal:"width"}),p=l?{scale:l,range:0,mult:c,offset:i}:{value:0,offset:i},v=l?{scale:l,range:1,mult:c,offset:i}:pa(g,{mult:c,offset:i});return s.x=d.x=al(a,m,p),s.y=d.y=of(a,m,p),s.x2=d.x2=of(a,v),s.y2=d.y2=al(a,v),u.x=al(a,m),u.y=of(a,m),nc({type:sE,role:fhe,key:pc,from:o,encode:h},e)}function qpe(t,n){if(n!==1)if(!Ei(t))t=Ys(n)?{signal:`(${n.signal}) * (${t||0})`}:n*(t||0);else{let e=t=pa({},t);for(;e.mult!=null;)if(Ei(e.mult))e=e.mult=pa({},e.mult);else return e.mult=Ys(n)?{signal:`(${e.mult}) * (${n.signal})`}:e.mult*n,t;e.mult=n}return t}function Hpe(t,n,e,o,f,r){const a=Bu(t,n),l=t.orient,c=Qw(l,-1,1);let i,s,u;const d={enter:i={opacity:Ua},update:u={opacity:gc},exit:s={opacity:Ua}};kl(d,{stroke:a("tickColor"),strokeCap:a("tickCap"),strokeDash:a("tickDash"),strokeDashOffset:a("tickDashOffset"),strokeOpacity:a("tickOpacity"),strokeWidth:a("tickWidth")});const h=il(f);h.mult=c;const m={scale:t.scale,field:pc,band:r.band,extra:r.extra,offset:r.offset,round:a("tickRound")};return u.y=i.y=al(l,Ua,m),u.y2=i.y2=al(l,h),s.x=al(l,m),u.x=i.x=of(l,Ua,m),u.x2=i.x2=of(l,h),s.y=of(l,m),nc({type:sE,role:dhe,key:pc,from:o,encode:d},e)}function E4(t,n,e,o,f){return{signal:'flush(range("'+t+'"), scale("'+t+'", datum.value), '+n+","+e+","+o+","+f+")"}}function $pe(t,n,e,o,f,r){const a=Bu(t,n),l=t.orient,c=t.scale,i=Qw(l,-1,1),s=p0(a("labelFlush")),u=p0(a("labelFlushOffset")),d=a("labelAlign"),h=a("labelBaseline");let m=s===0||!!s,g;const p=il(f);p.mult=i,p.offset=il(a("labelPadding")||0),p.offset.mult=i;const v={scale:c,field:pc,band:.5,offset:uU(r.offset,a("labelOffset"))},y=al(l,m?E4(c,s,'"left"','"right"','"center"'):{value:"center"},Ppe(l,"left","right")),x=al(l,gU(l,"bottom","top"),m?E4(c,s,'"top"','"bottom"','"middle"'):{value:"middle"}),w=E4(c,s,`-(${u})`,u,0);m=m&&u;const k={opacity:Ua,x:al(l,v,p),y:of(l,v,p)},b={enter:k,update:g={opacity:gc,text:{field:iE},x:k.x,y:k.y,align:y,baseline:x},exit:{opacity:Ua,x:k.x,y:k.y}};kl(b,{dx:!d&&m?al(l,w):null,dy:!h&&m?of(l,w):null}),kl(b,{angle:a("labelAngle"),fill:a("labelColor"),fillOpacity:a("labelOpacity"),font:a("labelFont"),fontSize:a("labelFontSize"),fontWeight:a("labelFontWeight"),fontStyle:a("labelFontStyle"),limit:a("labelLimit"),lineHeight:a("labelLineHeight")},{align:d,baseline:h});const T=a("labelBound");let _=a("labelOverlap");return _=_||T?{separation:a("labelSeparation"),method:_,order:"datum.index",bound:T?{scale:c,orient:l,tolerance:T}:null}:void 0,g.align!==y&&(g.align=tm(g.align,y)),g.baseline!==x&&(g.baseline=tm(g.baseline,x)),nc({type:Y0,role:hhe,style:Ky,key:pc,from:o,encode:b,overlap:_},e)}function Gpe(t,n,e,o){const f=Bu(t,n),r=t.orient,a=Qw(r,-1,1);let l,c;const i={enter:l={opacity:Ua,anchor:il(f("titleAnchor",null)),align:{signal:lE}},update:c=pa({},l,{opacity:gc,text:il(t.title)}),exit:{opacity:Ua}},s={signal:`lerp(range("${t.scale}"), ${Zw(0,1,.5)})`};return c.x=al(r,s),c.y=of(r,s),l.angle=al(r,Ua,Bpe(a,90)),l.baseline=al(r,gU(r,rp,gf),{value:rp}),c.angle=l.angle,c.baseline=l.baseline,kl(i,{fill:f("titleColor"),fillOpacity:f("titleOpacity"),font:f("titleFont"),fontSize:f("titleFontSize"),fontStyle:f("titleFontStyle"),fontWeight:f("titleFontWeight"),limit:f("titleLimit"),lineHeight:f("titleLineHeight")},{align:f("titleAlign"),angle:f("titleAngle"),baseline:f("titleBaseline")}),Wpe(f,r,i,e),i.update.align=tm(i.update.align,l.align),i.update.angle=tm(i.update.angle,l.angle),i.update.baseline=tm(i.update.baseline,l.baseline),nc({type:Y0,role:phe,style:aE,from:o,encode:i},e)}function Wpe(t,n,e,o){const f=(l,c)=>l!=null?(e.update[c]=tm(il(l),e.update[c]),!1):!Hg(c,o),r=f(t("titleX"),"x"),a=f(t("titleY"),"y");e.enter.auto=a===r?il(a):al(n,il(a),il(r))}function Ype(t,n){const e=jpe(t,n),o=t.encode||{},f=o.axis||{},r=f.name||void 0,a=f.interactive,l=f.style,c=Bu(t,e),i=Hde(c),s={scale:t.scale,ticks:!!c("ticks"),labels:!!c("labels"),grid:!!c("grid"),domain:!!c("domain"),title:t.title!=null},u=Hi(n.add(pf({},[s]))),d=Hi(n.add(Xhe({scale:n.scaleRef(t.scale),extra:n.property(i.extra),count:n.objectProperty(t.tickCount),values:n.objectProperty(t.values),minstep:n.property(t.tickMinStep),formatType:n.property(t.formatType),formatSpecifier:n.property(t.format)}))),h=[];let m;return s.grid&&h.push(Vpe(t,e,o.grid,d,i)),s.ticks&&(m=c("tickSize"),h.push(Hpe(t,e,o.ticks,d,m,i))),s.labels&&(m=s.ticks?m:0,h.push($pe(t,e,o.labels,d,m,i))),s.domain&&h.push(Upe(t,e,o.domain,u)),s.title&&h.push(Gpe(t,e,o.title,u)),Kw(fy({role:uhe,from:u,encode:Zm(Xpe(c,t),f,Qy),marks:h,aria:c("aria"),description:c("description"),zindex:c("zindex"),name:r,interactive:a,style:l}),n)}function Xpe(t,n){const e={enter:{},update:{}};return kl(e,{orient:t("orient"),offset:t("offset")||0,position:Wc(n.position,0),titlePadding:t("titlePadding"),minExtent:t("minExtent"),maxExtent:t("maxExtent"),range:{signal:`abs(span(range("${n.scale}")))`},translate:t("translate"),format:n.format,formatType:n.formatType}),e}function vU(t,n,e){const o=ki(t.signals),f=ki(t.scales);return e||o.forEach(r=>Xj(r,n)),ki(t.projections).forEach(r=>Sde(r,n)),f.forEach(r=>gde(r,n)),ki(t.data).forEach(r=>Ope(r,n)),f.forEach(r=>mde(r,n)),(e||o).forEach(r=>Yhe(r,n)),ki(t.axes).forEach(r=>Ype(r,n)),ki(t.marks).forEach(r=>Kw(r,n)),ki(t.legends).forEach(r=>ype(r,n)),t.title&&Ape(t.title,n),n.parseLambdas(),n}const Zpe=t=>Zm({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},t);function Jpe(t,n){const e=n.config,o=Hi(n.root=n.add(k2())),f=Kpe(t,e);f.forEach(i=>Xj(i,n)),n.description=t.description||e.description,n.eventConfig=e.events,n.legends=n.objectProperty(e.legend&&e.legend.layout),n.locale=e.locale;const r=n.add(pf()),a=n.add(Kj(Yj(Zpe(t.encode),Xw,eE,t.style,n,{pulse:Hi(r)}))),l=n.add(tU({layout:n.objectProperty(t.layout),legends:n.legends,autosize:n.signalRef("autosize"),mark:o,pulse:Hi(a)}));n.operators.pop(),n.pushState(Hi(a),Hi(l),null),vU(t,n,f),n.operators.push(l);let c=n.add(Jj({mark:o,pulse:Hi(l)}));return c=n.add(eU({pulse:Hi(c)})),c=n.add(W0({pulse:Hi(c)})),n.addData("root",new C0(n,r,r,c)),n}function X1(t,n){return n&&n.signal?{name:t,update:n.signal}:{name:t,value:n}}function Kpe(t,n){const e=a=>Wc(t[a],n[a]),o=[X1("background",e("background")),X1("autosize",ohe(e("autosize"))),X1("padding",lhe(e("padding"))),X1("width",e("width")||0),X1("height",e("height")||0)],f=o.reduce((a,l)=>(a[l.name]=l,a),{}),r={};return ki(t.signals).forEach(a=>{qi(f,a.name)?a=pa(f[a.name],a):o.push(a),r[a.name]=a}),ki(n.signals).forEach(a=>{!qi(r,a.name)&&!qi(f,a.name)&&o.push(a)}),o}function yU(t,n){this.config=t||{},this.options=n||{},this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this.locale=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function WL(t){this.config=t.config,this.options=t.options,this.legends=t.legends,this.field=Object.create(t.field),this.signals=Object.create(t.signals),this.lambdas=Object.create(t.lambdas),this.scales=Object.create(t.scales),this.events=Object.create(t.events),this.data=Object.create(t.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++t._nextsub[0],this._nextsub=t._nextsub,this._parent=t._parent.slice(),this._encode=t._encode.slice(),this._lookup=t._lookup.slice(),this._markpath=t._markpath}yU.prototype=WL.prototype={parse(t){return vU(t,this)},fork(){return new WL(this)},isSubscope(){return this._subid>0},toRuntime(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},id(){return(this._subid?this._subid+":":0)+this._id++},add(t){return this.operators.push(t),t.id=this.id(),t.refs&&(t.refs.forEach(n=>{n.$ref=t.id}),t.refs=null),t},proxy(t){const n=t instanceof OT?Hi(t):t;return this.add(ude({value:n}))},addStream(t){return this.streams.push(t),t.id=this.id(),t},addUpdate(t){return this.updates.push(t),t},finish(){let t,n;this.root&&(this.root.root=!0);for(t in this.signals)this.signals[t].signal=t;for(t in this.scales)this.scales[t].scale=t;function e(o,f,r){let a,l;o&&(a=o.data||(o.data={}),l=a[f]||(a[f]=[]),l.push(r))}for(t in this.data){n=this.data[t],e(n.input,t,"input"),e(n.output,t,"output"),e(n.values,t,"values");for(const o in n.index)e(n.index[o],t,"index:"+o)}return this},pushState(t,n,e){this._encode.push(Hi(this.add(W0({pulse:t})))),this._parent.push(n),this._lookup.push(e?Hi(this.proxy(e)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return Na(this._parent)},encode(){return Na(this._encode)},lookup(){return Na(this._lookup)},markpath(){const t=this._markpath;return++t[t.length-1]},fieldRef(t,n){if(bi(t))return uy(t,n);t.signal||Pr("Unsupported field reference: "+oi(t));const e=t.signal;let o=this.field[e];if(!o){const f={name:this.signalRef(e)};n&&(f.as=n),this.field[e]=o=Hi(this.add(Qhe(f)))}return o},compareRef(t){let n=!1;const e=r=>Ys(r)?(n=!0,this.signalRef(r.signal)):Nhe(r)?(n=!0,this.exprRef(r.expr)):r,o=ki(t.field).map(e),f=ki(t.order).map(e);return n?Hi(this.add(DL({fields:o,orders:f}))):LL(o,f)},keyRef(t,n){let e=!1;const o=r=>Ys(r)?(e=!0,Hi(f[r.signal])):r,f=this.signals;return t=ki(t).map(o),e?Hi(this.add(ede({fields:t,flat:n}))):Ihe(t,n)},sortRef(t){if(!t)return t;const n=Ww(t.op,t.field),e=t.order||zhe;return e.signal?Hi(this.add(DL({fields:n,orders:this.signalRef(e.signal)}))):LL(n,e)},event(t,n){const e=t+":"+n;if(!this.events[e]){const o=this.id();this.streams.push({id:o,source:t,type:n}),this.events[e]=o}return this.events[e]},hasOwnSignal(t){return qi(this.signals,t)},addSignal(t,n){this.hasOwnSignal(t)&&Pr("Duplicate signal name: "+oi(t));const e=n instanceof OT?n:this.add(k2(n));return this.signals[t]=e},getSignal(t){return this.signals[t]||Pr("Unrecognized signal name: "+oi(t)),this.signals[t]},signalRef(t){return this.signals[t]?Hi(this.signals[t]):(qi(this.lambdas,t)||(this.lambdas[t]=this.add(k2(null))),Hi(this.lambdas[t]))},parseLambdas(){const t=Object.keys(this.lambdas);for(let n=0,e=t.length;n0?",":"")+(Ei(f)?f.signal||dE(f):oi(f))}return e+"]"}function e0e(t){let n="{",e=0,o,f;for(o in t)f=t[o],n+=(++e>1?",":"")+oi(o)+":"+(Ei(f)?f.signal||dE(f):oi(f));return n+"}"}function t0e(){const t="sans-serif",o="#4c78a8",f="#000",r="#888",a="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:o},area:{fill:o},image:null,line:{stroke:o,strokeWidth:2},path:{stroke:o},rect:{fill:o},rule:{stroke:f},shape:{stroke:o},symbol:{fill:o,size:64},text:{fill:f,font:t,fontSize:11},trail:{fill:o,size:2},style:{"guide-label":{fill:f,font:t,fontSize:10},"guide-title":{fill:f,font:t,fontSize:11,fontWeight:"bold"},"group-title":{fill:f,font:t,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:f,font:t,fontSize:12},point:{size:30,strokeWidth:2,shape:"circle"},circle:{size:30,strokeWidth:2},square:{size:30,strokeWidth:2,shape:"square"},cell:{fill:"transparent",stroke:a}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:r,grid:!1,gridWidth:1,gridColor:a,labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:r,tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-.5},projection:{type:"mercator"},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:a,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolLimit:30,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:r,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}}}function n0e(t,n,e){return Ei(t)||Pr("Input Vega specification must be an object."),n=Um(t0e(),n,t.config),Jpe(t,new yU(n,e)).toRuntime()}var r0e="5.22.1";pa(um,IJ,Pne,cre,Xie,qae,mse,Xoe,yse,Use,Jse,ile);var i0e=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",version:r0e,Dataflow:Kg,EventStream:aw,MultiPulse:JA,Operator:Co,Parameters:iw,Pulse:Vd,Transform:_r,changeset:H0,definition:wz,ingest:ro,isTuple:nw,transform:kz,transforms:um,tupleid:$i,interpolate:lM,interpolateColors:bw,interpolateRange:nF,quantizeInterpolator:rF,scale:Xa,scheme:uM,projection:oS,View:Rj,defaultLocale:GA,formatLocale:x_,locale:uz,resetDefaultLocale:IX,timeFormatLocale:Wv,expressionFunction:Fs,parse:n0e,runtimeContext:kj,codegenExpression:cj,parseExpression:jS,parseSelector:gp,Debug:JD,Error:kA,Info:ZD,None:XD,Warn:TA,accessor:Nu,accessorFields:Bl,accessorName:xs,array:ki,ascending:K2,clampRange:lI,compare:CA,constant:$l,debounce:OA,error:Pr,extend:pa,extent:Zf,extentIndex:uI,falsy:md,fastmap:qm,field:Lu,flush:cI,hasOwnProperty:qi,id:Ay,identity:Hl,inherits:ni,inrange:Gg,isArray:Ir,isBoolean:hp,isDate:Bd,isFunction:ga,isIterable:fI,isNumber:wo,isObject:Ei,isRegExp:hI,isString:bi,key:LA,lerp:dI,logger:AA,lruCache:pI,merge:gI,mergeConfig:Um,one:jm,pad:mI,panLinear:nI,panLog:rI,panPow:iI,panSymlog:aI,peek:Na,quarter:oI,repeat:av,span:My,splitAccessPath:ih,stringValue:oi,toBoolean:PA,toDate:DA,toNumber:Rl,toSet:uf,toString:IA,truncate:vI,truthy:mc,utcquarter:sI,visitArray:xd,writeConfig:Vm,zero:Td,zoomLinear:MA,zoomLog:SA,zoomPow:g_,zoomSymlog:EA,bandwidthNRD:t6,bin:Az,bootstrapCI:Mz,cumulativeLogNormal:s6,cumulativeNormal:sw,cumulativeUniform:f6,densityLogNormal:o6,densityNormal:n6,densityUniform:c6,dotbin:Sz,quantileLogNormal:l6,quantileNormal:lw,quantileUniform:h6,quantiles:QA,quartiles:e6,get random(){return yc},randomInteger:NZ,randomKDE:i6,randomLCG:FZ,randomLogNormal:Cz,randomMixture:Oz,randomNormal:r6,randomUniform:Lz,regressionExp:Dz,regressionLinear:d6,regressionLoess:Rz,regressionLog:Pz,regressionPoly:zz,regressionPow:Iz,regressionQuad:p6,sampleCurve:cw,sampleLogNormal:a6,sampleNormal:ow,sampleUniform:u6,setRandom:zZ,DATE:Du,DAY:Il,DAYOFYEAR:Jf,HOURS:Qu,MILLISECONDS:cf,MINUTES:ec,MONTH:jl,QUARTER:Pu,SECONDS:vc,TIME_UNITS:UA,WEEK:Gs,YEAR:wl,dayofyear:PI,timeBin:XI,timeFloor:BI,timeInterval:Hm,timeOffset:VI,timeSequence:$I,timeUnitSpecifier:LI,timeUnits:VA,utcFloor:jI,utcInterval:$m,utcOffset:qI,utcSequence:GI,utcdayofyear:zI,utcweek:RI,week:DI,format:jb,formats:XA,inferType:fz,inferTypes:hz,loader:ew,read:gz,responseType:pz,typeParsers:_k,path:Nm,Bounds:zs,CanvasHandler:qy,CanvasRenderer:F_,Gradient:mF,GroupItem:kw,Handler:tp,Item:ww,Marks:tc,RenderType:Ld,Renderer:oh,ResourceLoader:mM,SVGHandler:IM,SVGRenderer:jM,SVGStringRenderer:UM,Scenegraph:PM,boundClip:cN,boundContext:By,boundItem:Ik,boundMark:zF,boundStroke:Xh,domChild:Tu,domClear:Xc,domCreate:Cd,domFind:DM,font:Ew,fontFamily:Vy,fontSize:ah,intersect:oN,intersectBoxLine:Wg,intersectPath:vM,intersectPoint:yM,intersectRule:TF,lineHeight:Qd,markup:BM,multiLineOffset:CM,pathCurves:dM,pathEqual:fN,pathParse:pm,pathRectangle:xF,pathRender:Jv,pathSymbols:yF,pathTrail:bF,point:Ow,renderModule:Lw,resetSVGClipId:wF,resetSVGDefIds:Yte,sceneEqual:VM,sceneFromJSON:FF,scenePickVisit:L_,sceneToJSON:RF,sceneVisit:ff,sceneZOrder:xM,serializeXML:KF,textMetrics:af});function a0e(t,n,e){let o;n.x2&&(n.x?(e&&t.x>t.x2&&(o=t.x,t.x=t.x2,t.x2=o),t.width=t.x2-t.x):t.x=t.x2-(t.width||0)),n.xc&&(t.x=t.xc-(t.width||0)/2),n.y2&&(n.y?(e&&t.y>t.y2&&(o=t.y,t.y=t.y2,t.y2=o),t.height=t.y2-t.y):t.y=t.y2-(t.height||0)),n.yc&&(t.y=t.yc-(t.height||0)/2)}var o0e={NaN:NaN,E:Math.E,LN2:Math.LN2,LN10:Math.LN10,LOG2E:Math.LOG2E,LOG10E:Math.LOG10E,PI:Math.PI,SQRT1_2:Math.SQRT1_2,SQRT2:Math.SQRT2,MIN_VALUE:Number.MIN_VALUE,MAX_VALUE:Number.MAX_VALUE},s0e={"*":(t,n)=>t*n,"+":(t,n)=>t+n,"-":(t,n)=>t-n,"/":(t,n)=>t/n,"%":(t,n)=>t%n,">":(t,n)=>t>n,"<":(t,n)=>tt<=n,">=":(t,n)=>t>=n,"==":(t,n)=>t==n,"!=":(t,n)=>t!=n,"===":(t,n)=>t===n,"!==":(t,n)=>t!==n,"&":(t,n)=>t&n,"|":(t,n)=>t|n,"^":(t,n)=>t^n,"<<":(t,n)=>t<>":(t,n)=>t>>n,">>>":(t,n)=>t>>>n},l0e={"+":t=>+t,"-":t=>-t,"~":t=>~t,"!":t=>!t};const u0e=Array.prototype.slice,Vp=(t,n,e)=>{const o=e?e(n[0]):n[0];return o[t].apply(o,u0e.call(n,1))},c0e=(t,n,e,o,f,r,a)=>new Date(t,n||0,e??1,o||0,f||0,r||0,a||0);var f0e={isNaN:Number.isNaN,isFinite:Number.isFinite,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:Math.atan2,ceil:Math.ceil,cos:Math.cos,exp:Math.exp,floor:Math.floor,log:Math.log,max:Math.max,min:Math.min,pow:Math.pow,random:Math.random,round:Math.round,sin:Math.sin,sqrt:Math.sqrt,tan:Math.tan,clamp:(t,n,e)=>Math.max(n,Math.min(e,t)),now:Date.now,utc:Date.UTC,datetime:c0e,date:t=>new Date(t).getDate(),day:t=>new Date(t).getDay(),year:t=>new Date(t).getFullYear(),month:t=>new Date(t).getMonth(),hours:t=>new Date(t).getHours(),minutes:t=>new Date(t).getMinutes(),seconds:t=>new Date(t).getSeconds(),milliseconds:t=>new Date(t).getMilliseconds(),time:t=>new Date(t).getTime(),timezoneoffset:t=>new Date(t).getTimezoneOffset(),utcdate:t=>new Date(t).getUTCDate(),utcday:t=>new Date(t).getUTCDay(),utcyear:t=>new Date(t).getUTCFullYear(),utcmonth:t=>new Date(t).getUTCMonth(),utchours:t=>new Date(t).getUTCHours(),utcminutes:t=>new Date(t).getUTCMinutes(),utcseconds:t=>new Date(t).getUTCSeconds(),utcmilliseconds:t=>new Date(t).getUTCMilliseconds(),length:t=>t.length,join:function(){return Vp("join",arguments)},indexof:function(){return Vp("indexOf",arguments)},lastindexof:function(){return Vp("lastIndexOf",arguments)},slice:function(){return Vp("slice",arguments)},reverse:t=>t.slice().reverse(),parseFloat,parseInt,upper:t=>String(t).toUpperCase(),lower:t=>String(t).toLowerCase(),substring:function(){return Vp("substring",arguments,String)},split:function(){return Vp("split",arguments,String)},replace:function(){return Vp("replace",arguments,String)},trim:t=>String(t).trim(),regexp:RegExp,test:(t,n)=>RegExp(t).test(n)};const h0e=["view","item","group","xy","x","y"],d0e={Literal:(t,n)=>n.value,Identifier:(t,n)=>{const e=n.name;return t.memberDepth>0?e:e==="datum"?t.datum:e==="event"?t.event:e==="item"?t.item:o0e[e]||t.params["$"+e]},MemberExpression:(t,n)=>{const e=!n.computed,o=t(n.object);e&&(t.memberDepth+=1);const f=t(n.property);return e&&(t.memberDepth-=1),o[f]},CallExpression:(t,n)=>{const e=n.arguments;let o=n.callee.name;return o.startsWith("_")&&(o=o.slice(1)),o==="if"?t(e[0])?t(e[1]):t(e[2]):(t.fn[o]||f0e[o]).apply(t.fn,e.map(t))},ArrayExpression:(t,n)=>n.elements.map(t),BinaryExpression:(t,n)=>s0e[n.operator](t(n.left),t(n.right)),UnaryExpression:(t,n)=>l0e[n.operator](t(n.argument)),ConditionalExpression:(t,n)=>t(n.test)?t(n.consequent):t(n.alternate),LogicalExpression:(t,n)=>n.operator==="&&"?t(n.left)&&t(n.right):t(n.left)||t(n.right),ObjectExpression:(t,n)=>n.properties.reduce((e,o)=>{t.memberDepth+=1;const f=t(o.key);return t.memberDepth-=1,e[f]=t(o.value),e},{})};function Z1(t,n,e,o,f,r){const a=l=>d0e[l.type](a,l);return a.memberDepth=0,a.fn=Object.create(n),a.params=e,a.datum=o,a.event=f,a.item=r,h0e.forEach(l=>a.fn[l]=(...c)=>f.vega[l](...c)),a(t)}var p0e={operator(t,n){const e=n.ast,o=t.functions;return f=>Z1(e,o,f)},parameter(t,n){const e=n.ast,o=t.functions;return(f,r)=>Z1(e,o,r,f)},event(t,n){const e=n.ast,o=t.functions;return f=>Z1(e,o,void 0,void 0,f)},handler(t,n){const e=n.ast,o=t.functions;return(f,r)=>{const a=r.item&&r.item.datum;return Z1(e,o,f,a,r)}},encode(t,n){const{marktype:e,channels:o}=n,f=t.functions,r=e==="group"||e==="image"||e==="rect";return(a,l)=>{const c=a.datum;let i=0,s;for(const u in o)s=Z1(o[u].ast,f,l,c,void 0,a),a[u]!==s&&(a[u]=s,i=1);return e!=="rule"&&a0e(a,o,r),i}}};const g0e="vega-lite",m0e='Dominik Moritz, Kanit "Ham" Wongsuphasawat, Arvind Satyanarayan, Jeffrey Heer',v0e="5.5.0",y0e=["Kanit Wongsuphasawat (http://kanitw.yellowpigz.com)","Dominik Moritz (https://www.domoritz.de)","Arvind Satyanarayan (https://arvindsatya.com)","Jeffrey Heer (https://jheer.org)"],x0e="https://vega.github.io/vega-lite/",b0e="Vega-Lite is a concise high-level language for interactive visualization.",_0e=["vega","chart","visualization"],w0e="build/vega-lite.js",k0e="build/vega-lite.min.js",T0e="build/vega-lite.min.js",A0e="build/src/index",M0e="build/src/index.d.ts",S0e={vl2png:"./bin/vl2png",vl2svg:"./bin/vl2svg",vl2pdf:"./bin/vl2pdf",vl2vg:"./bin/vl2vg"},E0e=["bin","build","src","vega-lite*","tsconfig.json"],C0e={changelog:"conventional-changelog -p angular -r 2",prebuild:"yarn clean:build",build:"yarn build:only","build:only":"tsc -p tsconfig.build.json && rollup -c","prebuild:examples":"yarn build:only","build:examples":"yarn data && TZ=America/Los_Angeles scripts/build-examples.sh","prebuild:examples-full":"yarn build:only","build:examples-full":"TZ=America/Los_Angeles scripts/build-examples.sh 1","build:example":"TZ=America/Los_Angeles scripts/build-example.sh","build:toc":"yarn build:jekyll && scripts/generate-toc","build:site":"rollup -c site/rollup.config.js","build:jekyll":"pushd site && bundle exec jekyll build -q && popd","build:versions":"scripts/update-version.sh",clean:"yarn clean:build && del-cli 'site/data/*' 'examples/compiled/*.png' && find site/examples ! -name 'index.md' ! -name 'data' -type f -delete","clean:build":"del-cli 'build/*' !build/vega-lite-schema.json","predeploy:site":"yarn presite","deploy:site":"gh-pages -d site",data:"rsync -r node_modules/vega-datasets/data/* site/data",schema:"mkdir -p build && ts-json-schema-generator -f tsconfig.json -p src/index.ts -t TopLevelSpec --no-type-check --no-ref-encode > build/vega-lite-schema.json && yarn renameschema && cp build/vega-lite-schema.json site/_data/",renameschema:"scripts/rename-schema.sh",presite:"yarn data && yarn schema && yarn build:site && yarn build:versions && scripts/create-example-pages.sh",site:"yarn site:only","site:only":"pushd site && bundle exec jekyll serve -I -l && popd",prettierbase:"prettier '**/*.{md,css,yml}'",eslintbase:"eslint .",format:"yarn eslintbase --fix && yarn prettierbase --write",lint:"yarn eslintbase && yarn prettierbase --check",jest:"NODE_OPTIONS=--experimental-vm-modules npx jest",test:"yarn jest test/ && yarn lint && yarn schema && yarn jest examples/ && yarn test:runtime","test:cover":"yarn jest --collectCoverage test/","test:inspect":"node --inspect-brk --experimental-vm-modules ./node_modules/.bin/jest --runInBand test","test:runtime":"NODE_OPTIONS=--experimental-vm-modules TZ=America/Los_Angeles npx jest test-runtime/ --config test-runtime/jest-config.json","test:runtime:generate":"yarn build:only && del-cli test-runtime/resources && VL_GENERATE_TESTS=true yarn test:runtime",watch:"tsc -p tsconfig.build.json -w","watch:site":"yarn build:site -w","watch:test":"yarn jest --watch test/","watch:test:runtime":"NODE_OPTIONS=--experimental-vm-modules TZ=America/Los_Angeles npx jest --watch test-runtime/ --config test-runtime/jest-config.json",release:"yarn run prebuild && yarn build && yarn shipit",shipit:"auto shipit"},O0e={type:"git",url:"https://github.com/vega/vega-lite.git"},L0e="BSD-3-Clause",P0e={url:"https://github.com/vega/vega-lite/issues"},D0e={"@auto-it/conventional-commits":"^10.37.6","@auto-it/first-time-contributor":"^10.37.6","@babel/core":"^7.19.1","@babel/preset-env":"^7.19.1","@babel/preset-typescript":"^7.18.6","@rollup/plugin-alias":"^4.0.0","@rollup/plugin-babel":"^6.0.0","@rollup/plugin-commonjs":"^23.0.0","@rollup/plugin-json":"^4.1.0","@types/jest":"^27.4.1","@rollup/plugin-node-resolve":"^14.1.0","@types/chai":"^4.3.3","@types/d3":"^7.4.0","@types/mkdirp":"^1.0.2","@types/pako":"^2.0.0","@typescript-eslint/eslint-plugin":"^5.38.0","@typescript-eslint/parser":"^5.38.0",ajv:"^8.11.0","ajv-formats":"^2.1.1",auto:"^10.37.6",chai:"^4.3.6",cheerio:"^1.0.0-rc.12","conventional-changelog-cli":"^2.2.2",d3:"^7.6.1","del-cli":"^5.0.0",eslint:"^8.23.1","eslint-config-prettier":"^8.5.0","eslint-plugin-jest":"^27.0.4","eslint-plugin-prettier":"^4.2.1","gh-pages":"^4.0.0",jest:"^27.5.1","highlight.js":"^11.6.0","jest-dev-server":"^6.1.1",mkdirp:"^1.0.4",pako:"^2.0.4",prettier:"^2.7.1",puppeteer:"^15.0.0",rollup:"^2.79.1","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-sourcemaps":"^0.6.3","rollup-plugin-terser":"^7.0.2",serve:"^14.0.1",terser:"^5.15.0","ts-jest":"^29.0.1","ts-json-schema-generator":"^1.1.1","vega-cli":"^5.22.1",typescript:"~4.8.3","vega-datasets":"~2.5.1","vega-embed":"^6.21.0","vega-tooltip":"^0.28.0","yaml-front-matter":"^4.1.1"},I0e={"@types/clone":"~2.1.1",clone:"~2.1.2","fast-deep-equal":"~3.1.3","fast-json-stable-stringify":"~2.1.0","json-stringify-pretty-compact":"~3.0.0",tslib:"~2.4.0","vega-event-selector":"~3.0.0","vega-expression":"~5.0.0","vega-util":"~1.17.0",yargs:"~17.6.0"},z0e={vega:"^5.22.0"},R0e={node:">=12"};var F0e={name:g0e,author:m0e,version:v0e,collaborators:y0e,homepage:x0e,description:b0e,keywords:_0e,main:w0e,unpkg:k0e,jsdelivr:T0e,module:A0e,types:M0e,bin:S0e,files:E0e,scripts:C0e,repository:O0e,license:L0e,bugs:P0e,devDependencies:D0e,dependencies:I0e,peerDependencies:z0e,engines:R0e},xU={exports:{}};(function(t){var n=function(){function e(d,h){return h!=null&&d instanceof h}var o;try{o=Map}catch{o=function(){}}var f;try{f=Set}catch{f=function(){}}var r;try{r=Promise}catch{r=function(){}}function a(d,h,m,g,p){typeof h=="object"&&(m=h.depth,g=h.prototype,p=h.includeNonEnumerable,h=h.circular);var v=[],y=[],x=typeof Buffer<"u";typeof h>"u"&&(h=!0),typeof m>"u"&&(m=1/0);function w(k,b){if(k===null)return null;if(b===0)return k;var T,_;if(typeof k!="object")return k;if(e(k,o))T=new o;else if(e(k,f))T=new f;else if(e(k,r))T=new r(function(L,P){k.then(function(N){L(w(N,b-1))},function(N){P(w(N,b-1))})});else if(a.__isArray(k))T=[];else if(a.__isRegExp(k))T=new RegExp(k.source,u(k)),k.lastIndex&&(T.lastIndex=k.lastIndex);else if(a.__isDate(k))T=new Date(k.getTime());else{if(x&&Buffer.isBuffer(k))return Buffer.allocUnsafe?T=Buffer.allocUnsafe(k.length):T=new Buffer(k.length),k.copy(T),T;e(k,Error)?T=Object.create(k):typeof g>"u"?(_=Object.getPrototypeOf(k),T=Object.create(_)):(T=Object.create(g),_=g)}if(h){var S=v.indexOf(k);if(S!=-1)return y[S];v.push(k),y.push(T)}e(k,o)&&k.forEach(function(L,P){var N=w(P,b-1),B=w(L,b-1);T.set(N,B)}),e(k,f)&&k.forEach(function(L){var P=w(L,b-1);T.add(P)});for(var A in k){var M;_&&(M=Object.getOwnPropertyDescriptor(_,A)),!(M&&M.set==null)&&(T[A]=w(k[A],b-1))}if(Object.getOwnPropertySymbols)for(var E=Object.getOwnPropertySymbols(k),A=0;Anm(e,n))}:gE(t)?{or:t.or.map(e=>nm(e,n))}:n(t)}const Ff=bU,ha=N0e;function _U(t){throw new Error(t)}function Tm(t,n){const e={};for(const o of n)qi(t,o)&&(e[o]=t[o]);return e}function Eu(t,n){const e=Object.assign({},t);for(const o of n)delete e[o];return e}Set.prototype.toJSON=function(){return`Set(${[...this].map(t=>pE(t)).join(",")})`};const No=pE;function Ba(t){if(wo(t))return t;const n=bi(t)?t:pE(t);if(n.length<250)return n;let e=0;for(let o=0;ol===0?a:`[${a}]`),r=f.map((a,l)=>f.slice(0,l+1).join(""));for(const a of r)n.add(a)}return n}function bE(t,n){return t===void 0||n===void 0?!0:xE(NT(t),NT(n))}function _o(t){return Xr(t).length===0}const Xr=Object.keys,ql=Object.values,ip=Object.entries;function hy(t){return t===!0||t===!1}function Xo(t){const n=t.replace(/\W/g,"_");return(t.match(/^\d+/)?"_":"")+n}function Bv(t,n){return vE(t)?`!(${Bv(t.not,n)})`:mE(t)?`(${t.and.map(e=>Bv(e,n)).join(") && (")})`:gE(t)?`(${t.or.map(e=>Bv(e,n)).join(") || (")})`:n(t)}function T2(t,n){if(n.length===0)return!0;const e=n.shift();return e in t&&T2(t[e],n)&&delete t[e],_o(t)}function ex(t){return t.charAt(0).toUpperCase()+t.substr(1)}function _E(t,n="datum"){const e=ih(t),o=[];for(let f=1;f<=e.length;f++){const r=`[${e.slice(0,f).map(oi).join("][")}]`;o.push(`${n}${r}`)}return o.join(" && ")}function TU(t,n="datum"){return`${n}[${oi(ih(t).join("."))}]`}function U0e(t){return t.replace(/(\[|\]|\.|'|")/g,"\\$1")}function bc(t){return`${ih(t).map(U0e).join("\\.")}`}function L0(t,n,e){return t.replace(new RegExp(n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),e)}function wE(t){return`${ih(t).join(".")}`}function Am(t){return t?ih(t).length:0}function Rs(...t){for(const n of t)if(n!==void 0)return n}let AU=42;function MU(t){const n=++AU;return t?String(t)+n:n}function V0e(){AU=42}function SU(t){return EU(t)?t:`__${t}`}function EU(t){return t.startsWith("__")}function dy(t){if(t!==void 0)return(t%360+360)%360}function e3(t){return wo(t)?!0:!isNaN(t)&&!isNaN(parseFloat(t))}var tx=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fl3(t[n])?Xo(`_${n}_${ip(t[n])}`):Xo(`_${n}_${t[n]}`)).join("")}function Bo(t){return t===!0||J0(t)&&!t.binned}function xl(t){return t==="binned"||J0(t)&&t.binned===!0}function J0(t){return Ei(t)}function l3(t){return t?.param}function YL(t){switch(t){case Uh:case Vh:case ed:case zu:case hh:case dh:case xp:case td:case vp:case yp:case Ru:return 6;case bp:return 4;default:return 10}}function ax(t){return!!t?.expr}function ku(t){const n=Xr(t||{}),e={};for(const o of n)e[o]=Xu(t[o]);return e}var pge=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{var f;return e.field.push(hi(o,n)),e.order.push((f=o.sort)!==null&&f!==void 0?f:"ascending"),e},{field:[],order:[]})}function WU(t,n){const e=[...t];return n.forEach(o=>{for(const f of e)if(Ff(f,o))return;e.push(o)}),e}function YU(t,n){return Ff(t,n)||!n?t:t?[...ki(t),...ki(n)].join(", "):n}function XU(t,n){const e=t.value,o=n.value;if(e==null||o===null)return{explicit:t.explicit,value:null};if((kd(e)||Vi(e))&&(kd(o)||Vi(o)))return{explicit:t.explicit,value:YU(e,o)};if(kd(e)||Vi(e))return{explicit:t.explicit,value:e};if(kd(o)||Vi(o))return{explicit:t.explicit,value:o};if(!kd(e)&&!Vi(e)&&!kd(o)&&!Vi(o))return{explicit:t.explicit,value:WU(e,o)};throw new Error("It should never reach here")}function LE(t){return`Invalid specification ${No(t)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const wge='Autosize "fit" only works for single views and layered views.';function JL(t){return`${t=="width"?"Width":"Height"} "container" only works for single views and layered views.`}function KL(t){const n=t=="width"?"Width":"Height",e=t=="width"?"x":"y";return`${n} "container" only works well with autosize "fit" or "fit-${e}".`}function QL(t){return t?`Dropping "fit-${t}" because spec has discrete ${Fu(t)}.`:'Dropping "fit" because spec has discrete size.'}function PE(t){return`Unknown field for ${t}. Cannot calculate view size.`}function eP(t){return`Cannot project a selection on encoding channel "${t}", which has no field.`}function kge(t,n){return`Cannot project a selection on encoding channel "${t}" as it uses an aggregate function ("${n}").`}function Tge(t){return`The "nearest" transform is not supported for ${t} marks.`}function ZU(t){return`Selection not supported for ${t} yet.`}function Age(t){return`Cannot find a selection named "${t}".`}const Mge="Scale bindings are currently only supported for scales with unbinned, continuous domains.",Sge="Legend bindings are only supported for selections over an individual field or encoding channel.";function Ege(t){return`Lookups can only be performed on selection parameters. "${t}" is a variable parameter.`}function Cge(t){return`Cannot define and lookup the "${t}" selection in the same view. Try moving the lookup into a second, layered view?`}const Oge="The same selection must be used to override scale domains in a layered view.",Lge='Interval selections should be initialized using "x" and/or "y" keys.';function Pge(t){return`Unknown repeated value "${t}".`}function tP(t){return`The "columns" property cannot be used when "${t}" has nested row/column.`}const Dge="Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).";function Ige(t){return`Unrecognized parse "${t}".`}function nP(t,n,e){return`An ancestor parsed field "${t}" as ${e} but a child wants to parse the field as ${n}.`}const zge="Attempt to add the same child twice.";function Rge(t){return`Ignoring an invalid transform: ${No(t)}.`}const Fge='If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.';function rP(t){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${t} are dropped.`}function Nge(t){const{parentProjection:n,projection:e}=t;return`Layer's shared projection ${No(n)} is overridden by a child projection ${No(e)}.`}const Bge="Arc marks uses theta channel rather than angle, replacing angle with theta.";function jge(t){return`${t}Offset dropped because ${t} is continuous`}function Uge(t){return`There is no ${t} encoding. Replacing ${t}Offset encoding as ${t}.`}function Vge(t,n,e){return`Channel ${t} is a ${n}. Converted to {value: ${No(e)}}.`}function JU(t){return`Invalid field type "${t}".`}function qge(t,n){return`Invalid field type "${t}" for aggregate: "${n}", using "quantitative" instead.`}function Hge(t){return`Invalid aggregation operator "${t}".`}function KU(t,n){const{fill:e,stroke:o}=n;return`Dropping color ${t} as the plot also has ${e&&o?"fill and stroke":e?"fill":"stroke"}.`}function $ge(t){return`Position range does not support relative band size for ${t}.`}function jT(t,n){return`Dropping ${No(t)} from channel "${n}" since it does not contain any data field, datum, value, or signal.`}const Gge="Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.";function u3(t,n,e){return`${t} dropped as it is incompatible with "${n}"${e?` when ${e}`:""}.`}function Wge(t){return`${t} encoding has no scale, so specified scale is ignored.`}function Yge(t){return`${t}-encoding is dropped as ${t} is not a valid encoding channel.`}function Xge(t){return`${t} encoding should be discrete (ordinal / nominal / binned).`}function Zge(t){return`${t} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function Jge(t){return`Facet encoding dropped as ${t.join(" and ")} ${t.length>1?"are":"is"} also specified.`}function O4(t,n){return`Using discrete channel "${t}" to encode "${n}" field can be misleading as it does not encode ${n==="ordinal"?"order":"magnitude"}.`}function Kge(t){return`The ${t} for range marks cannot be an expression`}function Qge(t,n){return`Line mark is for continuous lines and thus cannot be used with ${t&&n?"x2 and y2":t?"x2":"y2"}. We will use the rule mark (line segments) instead.`}function eme(t,n){return`Specified orient "${t}" overridden with "${n}".`}function tme(t){return`Cannot use the scale property "${t}" with non-color channel.`}function nme(t){return`Cannot use the relative band size with ${t} scale.`}function rme(t){return`Using unaggregated domain with raw field has no effect (${No(t)}).`}function ime(t){return`Unaggregated domain not applicable for "${t}" since it produces values outside the origin domain of the source data.`}function ame(t){return`Unaggregated domain is currently unsupported for log scale (${No(t)}).`}function ome(t){return`Cannot apply size to non-oriented mark "${t}".`}function sme(t,n,e){return`Channel "${t}" does not work with "${n}" scale. We are using "${e}" scale instead.`}function lme(t,n){return`FieldDef does not work with "${t}" scale. We are using "${n}" scale instead.`}function QU(t,n,e){return`${e}-scale's "${n}" is dropped as it does not work with ${t} scale.`}function eV(t){return`The step for "${t}" is dropped because the ${t==="width"?"x":"y"} is continuous.`}function ume(t,n,e,o){return`Conflicting ${n.toString()} property "${t.toString()}" (${No(e)} and ${No(o)}). Using ${No(e)}.`}function cme(t,n,e,o){return`Conflicting ${n.toString()} property "${t.toString()}" (${No(e)} and ${No(o)}). Using the union of the two domains.`}function fme(t){return`Setting the scale to be independent for "${t}" means we also have to set the guide (axis or legend) to be independent.`}function hme(t){return`Dropping sort property ${No(t)} as unioned domains only support boolean or op "count", "min", and "max".`}const iP="Domains that should be unioned has conflicting sort properties. Sort will be set to true.",dme="Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect.",pme="Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect.",gme="Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.";function mme(t){return`Cannot stack "${t}" if there is already "${t}2".`}function vme(t){return`Cannot stack non-linear scale (${t}).`}function yme(t){return`Stacking is applied even though the aggregate function is non-summative ("${t}").`}function M2(t,n){return`Invalid ${t}: ${No(n)}.`}function xme(t){return`Dropping day from datetime ${No(t)} as day cannot be combined with other units.`}function bme(t,n){return`${n?"extent ":""}${n&&t?"and ":""}${t?"center ":""}${n&&t?"are ":"is "}not needed when data are aggregated.`}function _me(t,n,e){return`${t} is not usually used with ${n} for ${e}.`}function wme(t,n){return`Continuous axis should not have customized aggregation function ${t}; ${n} already agregates the axis.`}function aP(t){return`1D error band does not support ${t}.`}function tV(t){return`Channel ${t} is required for "binned" bin.`}function kme(t){return`Channel ${t} should not be used with "binned" bin.`}function Tme(t){return`Domain for ${t} is required for threshold scale.`}globalThis&&globalThis.__classPrivateFieldSet;globalThis&&globalThis.__classPrivateFieldGet;const nV=AA(TA);let Mm=nV;function Ame(t){return Mm=t,Mm}function Mme(){return Mm=nV,Mm}function Kr(...t){Mm.warn(...t)}function Sme(...t){Mm.debug(...t)}function K0(t){if(t&&Ei(t)){for(const n of IE)if(n in t)return!0}return!1}const rV=["january","february","march","april","may","june","july","august","september","october","november","december"],Eme=rV.map(t=>t.substr(0,3)),iV=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],Cme=iV.map(t=>t.substr(0,3));function Ome(t){if(e3(t)&&(t=+t),wo(t))return t>4&&Kr(M2("quarter",t)),t-1;throw new Error(M2("quarter",t))}function Lme(t){if(e3(t)&&(t=+t),wo(t))return t-1;{const n=t.toLowerCase(),e=rV.indexOf(n);if(e!==-1)return e;const o=n.substr(0,3),f=Eme.indexOf(o);if(f!==-1)return f;throw new Error(M2("month",t))}}function Pme(t){if(e3(t)&&(t=+t),wo(t))return t%7;{const n=t.toLowerCase(),e=iV.indexOf(n);if(e!==-1)return e;const o=n.substr(0,3),f=Cme.indexOf(o);if(f!==-1)return f;throw new Error(M2("day",t))}}function DE(t,n){const e=[];if(n&&t.day!==void 0&&Xr(t).length>1&&(Kr(xme(t)),t=ha(t),delete t.day),t.year!==void 0?e.push(t.year):e.push(2012),t.month!==void 0){const o=n?Lme(t.month):t.month;e.push(o)}else if(t.quarter!==void 0){const o=n?Ome(t.quarter):t.quarter;e.push(wo(o)?o*3:`${o}*3`)}else e.push(0);if(t.date!==void 0)e.push(t.date);else if(t.day!==void 0){const o=n?Pme(t.day):t.day;e.push(wo(o)?o+1:`${o}+1`)}else e.push(1);for(const o of["hours","minutes","seconds","milliseconds"]){const f=t[o];e.push(typeof f>"u"?0:f)}return e}function py(t){const e=DE(t,!0).join(", ");return t.utc?`utc(${e})`:`datetime(${e})`}function Dme(t){const e=DE(t,!1).join(", ");return t.utc?`utc(${e})`:`datetime(${e})`}function Ime(t){const n=DE(t,!0);return t.utc?+new Date(Date.UTC(...n)):+new Date(...n)}var zme=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);foV(t,n))}function oV(t,n){const e=t.indexOf(n);return!(e<0||e>0&&n==="seconds"&&t.charAt(e-1)==="i"||t.length>e+3&&n==="day"&&t.charAt(e+3)==="o"||e>0&&n==="year"&&t.charAt(e-1)==="f")}function Bme(t,n,{end:e}={end:!1}){const o=_E(n),f=zE(t)?"utc":"";function r(c){return c==="quarter"?`(${f}quarter(${o})-1)`:`${f}${c}(${o})`}let a;const l={};for(const c of IE)oV(t,c)&&(l[c]=r(c),a=c);return e&&(l[a]+="+1"),Dme(l)}function sV(t){if(!t)return;const n=RE(t);return`timeUnitSpecifier(${No(n)}, ${No(Nme)})`}function jme(t,n,e){if(!t)return;const o=sV(t);return`${e||zE(t)?"utc":"time"}Format(${n}, ${o})`}function Gl(t){if(!t)return;let n;return bi(t)?n={unit:t}:Ei(t)&&(n=Object.assign(Object.assign({},t),t.unit?{unit:t.unit}:{})),zE(n.unit)&&(n.utc=!0,n.unit=Fme(n.unit)),n}function Ume(t){const n=Gl(t),{utc:e}=n,o=zme(n,["utc"]);return o.unit?(e?"utc":"")+Xr(o).map(f=>Xo(`${f==="unit"?"":`_${f}_`}${o[f]}`)).join(""):(e?"utc":"")+"timeunit"+Xr(o).map(f=>Xo(`_${f}_${o[f]}`)).join("")}function Vme(t){return t?.param}function FE(t){return!!t?.field&&t.equal!==void 0}function NE(t){return!!t?.field&&t.lt!==void 0}function BE(t){return!!t?.field&&t.lte!==void 0}function jE(t){return!!t?.field&&t.gt!==void 0}function UE(t){return!!t?.field&&t.gte!==void 0}function VE(t){if(t?.field){if(Ir(t.range)&&t.range.length===2)return!0;if(Vi(t.range))return!0}return!1}function qE(t){return!!t?.field&&(Ir(t.oneOf)||Ir(t.in))}function qme(t){return!!t?.field&&t.valid!==void 0}function lV(t){return qE(t)||FE(t)||VE(t)||NE(t)||jE(t)||BE(t)||UE(t)}function Cf(t,n){return x3(t,{timeUnit:n,wrapTime:!0})}function Hme(t,n){return t.map(e=>Cf(e,n))}function uV(t,n=!0){var e;const{field:o}=t,f=(e=Gl(t.timeUnit))===null||e===void 0?void 0:e.unit,r=f?`time(${Bme(f,o)})`:hi(t,{expr:"datum"});if(FE(t))return`${r}===${Cf(t.equal,f)}`;if(NE(t)){const a=t.lt;return`${r}<${Cf(a,f)}`}else if(jE(t)){const a=t.gt;return`${r}>${Cf(a,f)}`}else if(BE(t)){const a=t.lte;return`${r}<=${Cf(a,f)}`}else if(UE(t)){const a=t.gte;return`${r}>=${Cf(a,f)}`}else{if(qE(t))return`indexof([${Hme(t.oneOf,f).join(",")}], ${r}) !== -1`;if(qme(t))return HE(r,t.valid);if(VE(t)){const{range:a}=t,l=Vi(a)?{signal:`${a.signal}[0]`}:a[0],c=Vi(a)?{signal:`${a.signal}[1]`}:a[1];if(l!==null&&c!==null&&n)return"inrange("+r+", ["+Cf(l,f)+", "+Cf(c,f)+"])";const i=[];return l!==null&&i.push(`${r} >= ${Cf(l,f)}`),c!==null&&i.push(`${r} <= ${Cf(c,f)}`),i.length>0?i.join(" && "):"true"}}throw new Error(`Invalid field predicate: ${No(t)}`)}function HE(t,n=!0){return n?`isValid(${t}) && isFinite(+${t})`:`!isValid(${t}) || !isFinite(+${t})`}function $me(t){var n;return lV(t)&&t.timeUnit?Object.assign(Object.assign({},t),{timeUnit:(n=Gl(t.timeUnit))===null||n===void 0?void 0:n.unit}):t}const ox={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};function Gme(t){return t==="quantitative"||t==="temporal"}function cV(t){return t==="ordinal"||t==="nominal"}const I0=ox.quantitative,$E=ox.ordinal,Sm=ox.temporal,GE=ox.nominal,t1=ox.geojson;function Wme(t){if(t)switch(t=t.toLowerCase(),t){case"q":case I0:return"quantitative";case"t":case Sm:return"temporal";case"o":case $E:return"ordinal";case"n":case GE:return"nominal";case t1:return"geojson"}}var Yme=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{switch(n.fieldTitle){case"plain":return t.field;case"functional":return B1e(t);default:return N1e(t,n)}};let RV=zV;function FV(t){RV=t}function j1e(){FV(zV)}function im(t,n,{allowDisabling:e,includeDefault:o=!0}){var f,r;const a=(f=n8(t))===null||f===void 0?void 0:f.title;if(!ti(t))return a??t.title;const l=t,c=o?r8(l,n):void 0;return e?Rs(a,l.title,c):(r=a??l.title)!==null&&r!==void 0?r:c}function n8(t){if(Om(t)&&t.axis)return t.axis;if(DV(t)&&t.legend)return t.legend;if(e8(t)&&t.header)return t.header}function r8(t,n){return RV(t,n)}function O2(t){var n;if(IV(t)){const{format:e,formatType:o}=t;return{format:e,formatType:o}}else{const e=(n=n8(t))!==null&&n!==void 0?n:{},{format:o,formatType:f}=e;return{format:o,formatType:f}}}function U1e(t,n){var e;switch(n){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(t8(t)&&Ir(t.sort))return"ordinal";const{aggregate:o,bin:f,timeUnit:r}=t;if(r)return"temporal";if(f||o&&!wp(o)&&!Wh(o))return"quantitative";if(Q0(t)&&((e=t.scale)===null||e===void 0?void 0:e.type))switch(UT[t.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}function th(t){if(ti(t))return t;if(v3(t))return t.condition}function Ws(t){if(la(t))return t;if(ux(t))return t.condition}function NV(t,n,e,o={}){if(bi(t)||wo(t)||hp(t)){const f=bi(t)?"string":wo(t)?"number":"boolean";return Kr(Vge(n,f,t)),{value:t}}return la(t)?L2(t,n,e,o):ux(t)?Object.assign(Object.assign({},t),{condition:L2(t.condition,n,e,o)}):t}function L2(t,n,e,o){if(IV(t)){const{format:f,formatType:r}=t,a=HT(t,["format","formatType"]);if(R0(r)&&!e.customFormatTypes)return Kr(rP(n)),L2(a,n,e,o)}else{const f=Om(t)?"axis":DV(t)?"legend":e8(t)?"header":null;if(f&&t[f]){const r=t[f],{format:a,formatType:l}=r,c=HT(r,["format","formatType"]);if(R0(l)&&!e.customFormatTypes)return Kr(rP(n)),L2(Object.assign(Object.assign({},t),{[f]:c}),n,e,o)}}return ti(t)?i8(t,n,o):V1e(t)}function V1e(t){let n=t.type;if(n)return t;const{datum:e}=t;return n=wo(e)?"quantitative":bi(e)?"nominal":K0(e)?"temporal":void 0,Object.assign(Object.assign({},t),{type:n})}function i8(t,n,{compositeMark:e=!1}={}){const{aggregate:o,timeUnit:f,bin:r,field:a}=t,l=Object.assign({},t);if(!e&&o&&!CE(o)&&!wp(o)&&!Wh(o)&&(Kr(Hge(o)),delete l.aggregate),f&&(l.timeUnit=Gl(f)),a&&(l.field=`${a}`),Bo(r)&&(l.bin=y3(r,n)),xl(r)&&!sl(n)&&Kr(kme(n)),wc(l)){const{type:c}=l,i=Wme(c);c!==i&&(l.type=i),c!=="quantitative"&&jU(o)&&(Kr(qge(c,o)),l.type="quantitative")}else if(!DU(n)){const c=U1e(l,n);l.type=c}if(wc(l)){const{compatible:c,warning:i}=q1e(l,n)||{};c===!1&&Kr(i)}if(t8(l)&&bi(l.sort)){const{sort:c}=l;if(uP(c))return Object.assign(Object.assign({},l),{sort:{encoding:c}});const i=c.substr(1);if(c.charAt(0)==="-"&&uP(i))return Object.assign(Object.assign({},l),{sort:{encoding:i,order:"descending"}})}if(e8(l)){const{header:c}=l;if(c){const{orient:i}=c,s=HT(c,["orient"]);if(i)return Object.assign(Object.assign({},l),{header:Object.assign(Object.assign({},s),{labelOrient:c.labelOrient||i,titleOrient:c.titleOrient||i})})}}return l}function y3(t,n){return hp(t)?{maxbins:YL(n)}:t==="binned"?{binned:!0}:!t.maxbins&&!t.step?Object.assign(Object.assign({},t),{maxbins:YL(n)}):t}const Ng={compatible:!0};function q1e(t,n){const e=t.type;if(e==="geojson"&&n!=="shape")return{compatible:!1,warning:`Channel ${n} should not be used with a geojson data.`};switch(n){case Uh:case Vh:case t3:return C2(t)?Ng:{compatible:!1,warning:Xge(n)};case cs:case ol:case mp:case Qm:case zu:case hh:case dh:case nx:case ix:case n3:case P0:case r3:case i3:case X0:case Tc:case vf:case a3:return Ng;case fh:case _c:case ch:case yf:return e!==I0?{compatible:!1,warning:`Channel ${n} should be used with a quantitative field only, not ${t.type} field.`}:Ng;case td:case vp:case yp:case xp:case ed:case Qh:case Kh:case mf:case uh:return e==="nominal"&&!t.sort?{compatible:!1,warning:`Channel ${n} should not be used with an unsorted discrete field.`}:Ng;case Ru:case bp:return!C2(t)&&!R1e(t)?{compatible:!1,warning:Zge(n)}:Ng;case rx:return t.type==="nominal"&&!("sort"in t)?{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}:Ng}}function Lm(t){const{formatType:n}=O2(t);return n==="time"||!n&&H1e(t)}function H1e(t){return t&&(t.type==="temporal"||ti(t)&&!!t.timeUnit)}function x3(t,{timeUnit:n,type:e,wrapTime:o,undefinedIfExprNotRequired:f}){var r;const a=n&&((r=Gl(n))===null||r===void 0?void 0:r.unit);let l=a||e==="temporal",c;return ax(t)?c=t.expr:Vi(t)?c=t.signal:K0(t)?(l=!0,c=py(t)):(bi(t)||wo(t))&&l&&(c=`datetime(${No(t)})`,Rme(a)&&(wo(t)&&t<1e4||bi(t)&&isNaN(Date.parse(t)))&&(c=py({[a]:t}))),c?o&&l?`time(${c})`:c:f?void 0:No(t)}function BV(t,n){const{type:e}=t;return n.map(o=>{const f=x3(o,{timeUnit:ti(t)?t.timeUnit:void 0,type:e,undefinedIfExprNotRequired:!0});return f!==void 0?{signal:f}:o})}function cx(t,n){return Bo(t.bin)?_p(n)&&["ordinal","nominal"].includes(t.type):(console.warn("Only call this method for binned field defs."),!1)}const fP={labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDashOffset"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDashOffset"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"}};function fx(t){return t?.condition}const jV=["domain","grid","labels","ticks","title"],$1e={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"both",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},UV={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},G1e=Object.assign(Object.assign({},UV),{style:1,labelExpr:1,encoding:1});function hP(t){return!!G1e[t]}const W1e={axis:1,axisBand:1,axisBottom:1,axisDiscrete:1,axisLeft:1,axisPoint:1,axisQuantitative:1,axisRight:1,axisTemporal:1,axisTop:1,axisX:1,axisXBand:1,axisXDiscrete:1,axisXPoint:1,axisXQuantitative:1,axisXTemporal:1,axisY:1,axisYBand:1,axisYDiscrete:1,axisYPoint:1,axisYQuantitative:1,axisYTemporal:1},VV=Xr(W1e);function nd(t){return"mark"in t}class b3{constructor(n,e){this.name=n,this.run=e}hasMatchingType(n){return nd(n)?k1e(n.mark)===this.name:!1}}var Y1e=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f!!o.field):ti(e)||v3(e):!1}function qV(t,n){const e=t&&t[n];return e?Ir(e)?O0(e,o=>!!o.field):ti(e)||mh(e)||ux(e):!1}function GT(t,n){if(sl(n)){const e=t[n];if((ti(e)||mh(e))&&cV(e.type)){const o=IU(n);return qV(t,o)}}return!1}function a8(t){return O0(W0e,n=>{if(m0(t,n)){const e=t[n];if(Ir(e))return O0(e,o=>!!o.aggregate);{const o=th(e);return o&&!!o.aggregate}}return!1})}function HV(t,n){const e=[],o=[],f=[],r=[],a={};return o8(t,(l,c)=>{if(ti(l)){const{field:i,aggregate:s,bin:u,timeUnit:d}=l,h=Y1e(l,["field","aggregate","bin","timeUnit"]);if(s||d||u){const m=n8(l),g=m?.title;let p=hi(l,{forAs:!0});const v=Object.assign(Object.assign(Object.assign({},g?[]:{title:im(l,n,{allowDisabling:!0})}),h),{field:p});if(s){let y;if(wp(s)?(y="argmax",p=hi({op:"argmax",field:s.argmax},{forAs:!0}),v.field=`${p}.${i}`):Wh(s)?(y="argmin",p=hi({op:"argmin",field:s.argmin},{forAs:!0}),v.field=`${p}.${i}`):s!=="boxplot"&&s!=="errorbar"&&s!=="errorband"&&(y=s),y){const x={op:y,as:p};i&&(x.field=i),r.push(x)}}else if(e.push(p),wc(l)&&Bo(u)){if(o.push({bin:u,field:i,as:p}),e.push(hi(l,{binSuffix:"end"})),cx(l,c)&&e.push(hi(l,{binSuffix:"range"})),sl(c)){const y={field:`${p}_end`};a[`${c}2`]=y}v.bin="binned",DU(c)||(v.type=I0)}else if(d){f.push({timeUnit:d,field:i,as:p});const y=wc(l)&&l.type!==Sm&&"time";y&&(c===nx||c===P0?v.formatType=y:rge(c)?v.legend=Object.assign({formatType:y},v.legend):sl(c)&&(v.axis=Object.assign({formatType:y},v.axis)))}a[c]=v}else e.push(i),a[c]=t[c]}else a[c]=t[c]}),{bins:o,timeUnits:f,aggregate:r,groupby:e,encoding:a}}function X1e(t,n,e){const o=age(n,e);if(o){if(o==="binned"){const f=t[n===mf?cs:ol];return!!(ti(f)&&ti(t[n])&&xl(f.bin))}}else return!1;return!0}function Z1e(t,n,e,o){const f={};for(const r of Xr(t))PU(r)||Kr(Yge(r));for(let r of Q0e){if(!t[r])continue;const a=t[r];if(e1(r)){const l=zU(r),c=f[l];if(ti(c)){if(Gme(c.type)&&ti(a)){Kr(jge(l));continue}}else r=l,Kr(Uge(l))}if(r==="angle"&&n==="arc"&&!t.theta&&(Kr(Bge),r=Tc),!X1e(t,r,n)){Kr(u3(r,n));continue}if(r===ed&&n==="line"){const l=th(t[r]);if(l?.aggregate){Kr(Gge);continue}}if(r===zu&&(e?"fill"in t:"stroke"in t)){Kr(KU("encoding",{fill:"fill"in t,stroke:"stroke"in t}));continue}if(r===ix||r===rx&&!Ir(a)&&!hf(a)||r===P0&&Ir(a))a&&(f[r]=ki(a).reduce((l,c)=>(ti(c)?l.push(i8(c,r)):Kr(jT(c,r)),l),[]));else{if(r===P0&&a===null)f[r]=null;else if(!ti(a)&&!mh(a)&&!hf(a)&&!m3(a)&&!Vi(a)){Kr(jT(a,r));continue}f[r]=NV(a,r,o)}}return f}function _3(t,n){const e={};for(const o of Xr(t)){const f=NV(t[o],o,n,{compositeMark:!0});e[o]=f}return e}function J1e(t){const n=[];for(const e of Xr(t))if(m0(t,e)){const o=t[e],f=ki(o);for(const r of f)ti(r)?n.push(r):v3(r)&&n.push(r.condition)}return n}function o8(t,n,e){if(!!t)for(const o of Xr(t)){const f=t[o];if(Ir(f))for(const r of f)n.call(e,r,o);else n.call(e,f,o)}}function K1e(t,n,e,o){return t?Xr(t).reduce((f,r)=>{const a=t[r];return Ir(a)?a.reduce((l,c)=>n.call(o,l,c,r),f):n.call(o,f,a,r)},e):e}function $V(t,n){return Xr(n).reduce((e,o)=>{switch(o){case cs:case ol:case r3:case a3:case i3:case mf:case uh:case mp:case Qm:case Tc:case Qh:case vf:case Kh:case ch:case fh:case yf:case _c:case nx:case Ru:case X0:case P0:return e;case rx:if(t==="line"||t==="trail")return e;case ix:case n3:{const f=n[o];if(Ir(f)||ti(f))for(const r of ki(f))r.aggregate||e.push(hi(r,{}));return e}case ed:if(t==="trail")return e;case zu:case hh:case dh:case td:case vp:case yp:case bp:case xp:{const f=th(n[o]);return f&&!f.aggregate&&e.push(hi(f,{})),e}}},[])}var GV=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{const c=o?` of ${s8(n)}`:"";return{field:a+n.field,type:n.type,title:Vi(l)?{signal:`${l}"${escape(c)}"`}:l+c}}),r=J1e(e).map(I1e);return{tooltip:[...f,...Nf(r,Ba)]}}function s8(t){const{title:n,field:e}=t;return Rs(n,e)}function l8(t,n,e,o,f){const{scale:r,axis:a}=e;return({partName:l,mark:c,positionPrefix:i,endPositionPrefix:s=void 0,extraEncoding:u={}})=>{const d=s8(e);return WV(t,l,f,{mark:c,encoding:Object.assign(Object.assign(Object.assign({[n]:Object.assign(Object.assign(Object.assign({field:`${i}_${e.field}`,type:e.type},d!==void 0?{title:d}:{}),r!==void 0?{scale:r}:{}),a!==void 0?{axis:a}:{})},bi(s)?{[`${n}2`]:{field:`${s}_${e.field}`}}:{}),o),u)})}}function WV(t,n,e,o){const{clip:f,color:r,opacity:a}=t,l=t.type;return t[n]||t[n]===void 0&&e[n]?[Object.assign(Object.assign({},o),{mark:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e[n]),f?{clip:f}:{}),r?{color:r}:{}),a?{opacity:a}:{}),eh(o.mark)?o.mark:{type:o.mark}),{style:`${l}-${String(n)}`}),hp(t[n])?{}:t[n])})]:[]}function YV(t,n,e){const{encoding:o}=t,f=n==="vertical"?"y":"x",r=o[f],a=o[`${f}2`],l=o[`${f}Error`],c=o[`${f}Error2`];return{continuousAxisChannelDef:Ab(r,e),continuousAxisChannelDef2:Ab(a,e),continuousAxisChannelDefError:Ab(l,e),continuousAxisChannelDefError2:Ab(c,e),continuousAxis:f}}function Ab(t,n){if(t?.aggregate){const{aggregate:e}=t,o=GV(t,["aggregate"]);return e!==n&&Kr(wme(e,n)),o}else return t}function XV(t,n){const{mark:e,encoding:o}=t,{x:f,y:r}=o;if(eh(e)&&e.orient)return e.orient;if(Bf(f)){if(Bf(r)){const a=ti(f)&&f.aggregate,l=ti(r)&&r.aggregate;if(!a&&l===n)return"vertical";if(!l&&a===n)return"horizontal";if(a===n&&l===n)throw new Error("Both x and y cannot have aggregate");return Lm(r)&&!Lm(f)?"horizontal":"vertical"}return"horizontal"}else{if(Bf(r))return"vertical";throw new Error(`Need a valid continuous axis for ${n}s`)}}var c_=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fl8(i,y,v,ue,n.boxplot),D=E(M),O=E(k),R=E(Object.assign(Object.assign({},M),A?{size:A}:{})),z=WT([{fieldPrefix:h==="min-max"?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:h==="min-max"?"lower_whisker_":"min_",titlePrefix:"Min"}],v,k),L={type:"tick",color:"black",opacity:1,orient:b,invalid:d,aria:!1},P=h==="min-max"?z:WT([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],v,k),N=[...D({partName:"rule",mark:{type:"rule",invalid:d,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:P}),...D({partName:"rule",mark:{type:"rule",invalid:d,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:P}),...D({partName:"ticks",mark:L,positionPrefix:"lower_whisker",extraEncoding:P}),...D({partName:"ticks",mark:L,positionPrefix:"upper_whisker",extraEncoding:P})],B=[...h!=="tukey"?N:[],...O({partName:"box",mark:Object.assign(Object.assign({type:"bar"},u?{size:u}:{}),{orient:T,invalid:d,ariaRoleDescription:"box"}),positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:z}),...R({partName:"median",mark:Object.assign(Object.assign(Object.assign({type:"tick",invalid:d},Ei(n.boxplot.median)&&n.boxplot.median.color?{color:n.boxplot.median.color}:{}),u?{size:u}:{}),{orient:b,aria:!1}),positionPrefix:"mid_box",extraEncoding:z})];if(h==="min-max")return Object.assign(Object.assign({},c),{transform:((o=c.transform)!==null&&o!==void 0?o:[]).concat(p),layer:B});const G=`datum["lower_box_${v.field}"]`,W=`datum["upper_box_${v.field}"]`,K=`(${W} - ${G})`,te=`${G} - ${s} * ${K}`,Y=`${W} + ${s} * ${K}`,Z=`datum["${v.field}"]`,re={joinaggregate:KV(v.field),groupby:x},U={transform:[{filter:`(${te} <= ${Z}) && (${Z} <= ${Y})`},{aggregate:[{op:"min",field:v.field,as:`lower_whisker_${v.field}`},{op:"max",field:v.field,as:`upper_whisker_${v.field}`},{op:"min",field:`lower_box_${v.field}`,as:`lower_box_${v.field}`},{op:"max",field:`upper_box_${v.field}`,as:`upper_box_${v.field}`},...w],groupby:x}],layer:N},q=c_(M,["tooltip"]),{scale:$,axis:ne}=v,H=s8(v),Q=Eu(ne,["title"]),ee=WV(i,"outliers",n.boxplot,{transform:[{filter:`(${Z} < ${te}) || (${Z} > ${Y})`}],mark:"point",encoding:Object.assign(Object.assign(Object.assign({[y]:Object.assign(Object.assign(Object.assign({field:v.field,type:v.type},H!==void 0?{title:H}:{}),$!==void 0?{scale:$}:{}),_o(Q)?{}:{axis:Q})},q),S?{color:S}:{}),_?{tooltip:_}:{})})[0];let ie;const ae=[...m,...g,re];return ee?ie={transform:ae,layer:[ee,U]}:(ie=U,ie.transform.unshift(...ae)),Object.assign(Object.assign({},c),{layer:[ie,{transform:p,layer:B}]})}function KV(t){return[{op:"q1",field:t,as:`lower_box_${t}`},{op:"q3",field:t,as:`upper_box_${t}`}]}function nve(t,n,e){const o=XV(t,P2),{continuousAxisChannelDef:f,continuousAxis:r}=YV(t,o,P2),a=f.field,l=ZV(n),c=[...KV(a),{op:"median",field:a,as:`mid_box_${a}`},{op:"min",field:a,as:(l==="min-max"?"lower_whisker_":"min_")+a},{op:"max",field:a,as:(l==="min-max"?"upper_whisker_":"max_")+a}],i=l==="min-max"||l==="tukey"?[]:[{calculate:`datum["upper_box_${a}"] - datum["lower_box_${a}"]`,as:`iqr_${a}`},{calculate:`min(datum["upper_box_${a}"] + datum["iqr_${a}"] * ${n}, datum["max_${a}"])`,as:`upper_whisker_${a}`},{calculate:`max(datum["lower_box_${a}"] - datum["iqr_${a}"] * ${n}, datum["min_${a}"])`,as:`lower_whisker_${a}`}],s=t.encoding,u=r;s[u];const d=c_(s,[typeof u=="symbol"?u:u+""]),{customTooltipWithoutAggregatedField:h,filteredEncoding:m}=Q1e(d),{bins:g,timeUnits:p,aggregate:v,groupby:y,encoding:x}=HV(m,e),w=o==="vertical"?"horizontal":"vertical",k=o,b=[...g,...p,{aggregate:[...v,...c],groupby:y},...i];return{bins:g,timeUnits:p,transform:b,groupby:y,aggregate:v,continuousAxisChannelDef:f,continuousAxis:r,encodingWithoutContinuousAxis:x,ticksOrient:w,boxOrient:k,customTooltipWithoutAggregatedField:h}}var dP=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f1?{layer:m}:Object.assign({},m[0]))}function ave(t,n){const{encoding:e}=t;if(ove(e))return{orient:XV(t,n),inputType:"raw"};const o=sve(e),f=lve(e),r=e.x,a=e.y;if(o){if(f)throw new Error(`${n} cannot be both type aggregated-upper-lower and aggregated-error`);const l=e.x2,c=e.y2;if(la(l)&&la(c))throw new Error(`${n} cannot have both x2 and y2`);if(la(l)){if(Bf(r))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${n}`)}else if(la(c)){if(Bf(a))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${n}`)}throw new Error("No ranged axis")}else{const l=e.xError,c=e.xError2,i=e.yError,s=e.yError2;if(la(c)&&!la(l))throw new Error(`${n} cannot have xError2 without xError`);if(la(s)&&!la(i))throw new Error(`${n} cannot have yError2 without yError`);if(la(l)&&la(i))throw new Error(`${n} cannot have both xError and yError with both are quantiative`);if(la(l)){if(Bf(r))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}else if(la(i)){if(Bf(a))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}function ove(t){return(la(t.x)||la(t.y))&&!la(t.x2)&&!la(t.y2)&&!la(t.xError)&&!la(t.xError2)&&!la(t.yError)&&!la(t.yError2)}function sve(t){return la(t.x2)||la(t.y2)}function lve(t){return la(t.xError)||la(t.xError2)||la(t.yError)||la(t.yError2)}function eq(t,n,e){var o;const{mark:f,encoding:r,params:a,projection:l}=t,c=dP(t,["mark","encoding","params","projection"]),i=eh(f)?f:{type:f};a&&Kr(ZU(n));const{orient:s,inputType:u}=ave(t,n),{continuousAxisChannelDef:d,continuousAxisChannelDef2:h,continuousAxisChannelDefError:m,continuousAxisChannelDefError2:g,continuousAxis:p}=YV(t,s,n),{errorBarSpecificAggregate:v,postAggregateCalculates:y,tooltipSummary:x,tooltipTitleWithFieldName:w}=uve(i,d,h,m,g,u,n,e),k=r,b=p;k[b];const T=p==="x"?"x2":"y2";k[T];const _=p==="x"?"xError":"yError";k[_];const S=p==="x"?"xError2":"yError2";k[S];const A=dP(k,[typeof b=="symbol"?b:b+"",typeof T=="symbol"?T:T+"",typeof _=="symbol"?_:_+"",typeof S=="symbol"?S:S+""]),{bins:M,timeUnits:E,aggregate:D,groupby:O,encoding:R}=HV(A,e),z=[...D,...v],L=u!=="raw"?[]:O,P=WT(x,d,R,w);return{transform:[...(o=c.transform)!==null&&o!==void 0?o:[],...M,...E,...z.length===0?[]:[{aggregate:z,groupby:L}],...y],groupby:L,continuousAxisChannelDef:d,continuousAxis:p,encodingWithoutContinuousAxis:R,ticksOrient:s==="vertical"?"horizontal":"vertical",markDef:i,outerSpec:c,tooltipEncoding:P}}function uve(t,n,e,o,f,r,a,l){let c=[],i=[];const s=n.field;let u,d=!1;if(r==="raw"){const h=t.center?t.center:t.extent?t.extent==="iqr"?"median":"mean":l.errorbar.center,m=t.extent?t.extent:h==="mean"?"stderr":"iqr";if(h==="median"!=(m==="iqr")&&Kr(_me(h,m,a)),m==="stderr"||m==="stdev")c=[{op:m,field:s,as:`extent_${s}`},{op:h,field:s,as:`center_${s}`}],i=[{calculate:`datum["center_${s}"] + datum["extent_${s}"]`,as:`upper_${s}`},{calculate:`datum["center_${s}"] - datum["extent_${s}"]`,as:`lower_${s}`}],u=[{fieldPrefix:"center_",titlePrefix:ex(h)},{fieldPrefix:"upper_",titlePrefix:pP(h,m,"+")},{fieldPrefix:"lower_",titlePrefix:pP(h,m,"-")}],d=!0;else{let g,p,v;m==="ci"?(g="mean",p="ci0",v="ci1"):(g="median",p="q1",v="q3"),c=[{op:p,field:s,as:`lower_${s}`},{op:v,field:s,as:`upper_${s}`},{op:g,field:s,as:`center_${s}`}],u=[{fieldPrefix:"upper_",titlePrefix:im({field:s,aggregate:v,type:"quantitative"},l,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:im({field:s,aggregate:p,type:"quantitative"},l,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:im({field:s,aggregate:g,type:"quantitative"},l,{allowDisabling:!1})}]}}else{(t.center||t.extent)&&Kr(bme(t.center,t.extent)),r==="aggregated-upper-lower"?(u=[],i=[{calculate:`datum["${e.field}"]`,as:`upper_${s}`},{calculate:`datum["${s}"]`,as:`lower_${s}`}]):r==="aggregated-error"&&(u=[{fieldPrefix:"",titlePrefix:s}],i=[{calculate:`datum["${s}"] + datum["${o.field}"]`,as:`upper_${s}`}],f?i.push({calculate:`datum["${s}"] + datum["${f.field}"]`,as:`lower_${s}`}):i.push({calculate:`datum["${s}"] - datum["${o.field}"]`,as:`lower_${s}`}));for(const h of i)u.push({fieldPrefix:h.as.substring(0,6),titlePrefix:L0(L0(h.calculate,'datum["',""),'"]',"")})}return{postAggregateCalculates:i,errorBarSpecificAggregate:c,tooltipSummary:u,tooltipTitleWithFieldName:d}}function pP(t,n,e){return`${ex(t)} ${e} ${n}`}const c8="errorband",cve=["band","borders"],fve=new b3(c8,tq);function tq(t,{config:n}){t=Object.assign(Object.assign({},t),{encoding:_3(t.encoding,n)});const{transform:e,continuousAxisChannelDef:o,continuousAxis:f,encodingWithoutContinuousAxis:r,markDef:a,outerSpec:l,tooltipEncoding:c}=eq(t,c8,n),i=a,s=l8(i,f,o,r,n.errorband),u=t.encoding.x!==void 0&&t.encoding.y!==void 0;let d={type:u?"area":"rect"},h={type:u?"line":"rule"};const m=Object.assign(Object.assign({},i.interpolate?{interpolate:i.interpolate}:{}),i.tension&&i.interpolate?{tension:i.tension}:{});return u?(d=Object.assign(Object.assign(Object.assign({},d),m),{ariaRoleDescription:"errorband"}),h=Object.assign(Object.assign(Object.assign({},h),m),{aria:!1})):i.interpolate?Kr(aP("interpolate")):i.tension&&Kr(aP("tension")),Object.assign(Object.assign({},l),{transform:e,layer:[...s({partName:"band",mark:d,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:c}),...s({partName:"borders",mark:h,positionPrefix:"lower",extraEncoding:c}),...s({partName:"borders",mark:h,positionPrefix:"upper",extraEncoding:c})]})}const nq={};function f8(t,n,e){const o=new b3(t,n);nq[t]={normalizer:o,parts:e}}function hve(){return Xr(nq)}f8(P2,JV,eve);f8(u8,QV,rve);f8(c8,tq,cve);const dve=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],rq={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},iq={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},pve=Xr(rq),gve=Xr(iq),mve={header:1,headerRow:1,headerColumn:1,headerFacet:1},aq=Xr(mve),oq=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],vve={gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},yve={aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1},nh="_vgsid_",xve={point:{on:"click",fields:[nh],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[mousedown, window:mouseup] > window:mousemove!",encodings:["x","y"],translate:"[mousedown, window:mouseup] > window:mousemove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function h8(t){return t==="legend"||!!t?.legend}function L4(t){return h8(t)&&Ei(t)}function d8(t){return!!t?.select}var bve=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fthis.mapLayerOrUnit(o,e))})}mapHConcat(n,e){return Object.assign(Object.assign({},n),{hconcat:n.hconcat.map(o=>this.map(o,e))})}mapVConcat(n,e){return Object.assign(Object.assign({},n),{vconcat:n.vconcat.map(o=>this.map(o,e))})}mapConcat(n,e){const{concat:o}=n,f=Uve(n,["concat"]);return Object.assign(Object.assign({},f),{concat:o.map(r=>this.map(r,e))})}mapFacet(n,e){return Object.assign(Object.assign({},n),{spec:this.map(n.spec,e)})}mapRepeat(n,e){return Object.assign(Object.assign({},n),{spec:this.map(n.spec,e)})}}const Vve={zero:1,center:1,normalize:1};function qve(t){return t in Vve}const Hve=new Set([vV,f3,c3,S2,d3,YE,XE,h3,yV,WE]),$ve=new Set([f3,c3,vV]);function Bg(t){return ti(t)&&Cm(t)==="quantitative"&&!t.bin}function xP(t,n){var e,o;const f=n==="x"?"y":"radius",r=t[n],a=t[f];if(ti(r)&&ti(a))if(Bg(r)&&Bg(a)){if(r.stack)return n;if(a.stack)return f;const l=ti(r)&&!!r.aggregate,c=ti(a)&&!!a.aggregate;if(l!==c)return l?n:f;{const i=(e=r.scale)===null||e===void 0?void 0:e.type,s=(o=a.scale)===null||o===void 0?void 0:o.type;if(i&&i!=="linear")return f;if(s&&s!=="linear")return n}}else{if(Bg(r))return n;if(Bg(a))return f}else{if(Bg(r))return n;if(Bg(a))return f}}function Gve(t){switch(t){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}function hq(t,n){var e,o;const f=eh(t)?t.type:t;if(!Hve.has(f))return null;const r=xP(n,"x")||xP(n,"theta");if(!r)return null;const a=n[r],l=ti(a)?hi(a,{}):void 0,c=Gve(r),i=[],s=new Set;if(n[c]){const h=n[c],m=ti(h)?hi(h,{}):void 0;m&&m!==l&&(i.push(c),s.add(m));const g=c==="x"?"xOffset":"yOffset",p=n[g],v=ti(p)?hi(p,{}):void 0;v&&v!==l&&(i.push(g),s.add(v))}const u=ege.reduce((h,m)=>{if(m!=="tooltip"&&m0(n,m)){const g=n[m];for(const p of ki(g)){const v=th(p);if(v.aggregate)continue;const y=hi(v,{});(!y||!s.has(y))&&h.push({channel:m,fieldDef:v})}}return h},[]);let d;return a.stack!==void 0?hp(a.stack)?d=a.stack?"zero":null:d=a.stack:$ve.has(f)&&(d="zero"),!d||!qve(d)||a8(n)&&u.length===0?null:((e=a?.scale)===null||e===void 0?void 0:e.type)&&((o=a?.scale)===null||o===void 0?void 0:o.type)!==Cu.LINEAR?(Kr(vme(a.scale.type)),null):la(n[ph(r)])?(a.stack!==void 0&&Kr(mme(r)),null):(ti(a)&&a.aggregate&&!hge.has(a.aggregate)&&Kr(yme(a.aggregate)),{groupbyChannels:i,groupbyFields:s,fieldChannel:r,impute:a.impute===null?!1:Tp(f),stackBy:u,offset:d})}var dq=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f1?n:n.type}function Yve(t){for(const n of["line","area","rule","trail"])t[n]&&(t=Object.assign(Object.assign({},t),{[n]:Eu(t[n],["point","line"])}));return t}function P4(t,n={},e){return t.point==="transparent"?{opacity:0}:t.point?Ei(t.point)?t.point:{}:t.point!==void 0?null:n.point||e.shape?Ei(n.point)?n.point:{}:void 0}function bP(t,n={}){return t.line?t.line===!0?{}:t.line:t.line!==void 0?null:n.line?n.line===!0?{}:n.line:void 0}class Xve{constructor(){this.name="path-overlay"}hasMatchingType(n,e){if(nd(n)){const{mark:o,encoding:f}=n,r=eh(o)?o:{type:o};switch(r.type){case"line":case"rule":case"trail":return!!P4(r,e[r.type],f);case"area":return!!P4(r,e[r.type],f)||!!bP(r,e[r.type])}}return!1}run(n,e,o){const{config:f}=e,{params:r,projection:a,mark:l,encoding:c}=n,i=dq(n,["params","projection","mark","encoding"]),s=_3(c,f),u=eh(l)?l:{type:l},d=P4(u,f[u.type],s),h=u.type==="area"&&bP(u,f[u.type]),m=[Object.assign(Object.assign({},r?{params:r}:{}),{mark:Wve(Object.assign(Object.assign({},u.type==="area"&&u.opacity===void 0&&u.fillOpacity===void 0?{opacity:.7}:{}),u)),encoding:Eu(s,["shape"])})],g=hq(u,s);let p=s;if(g){const{fieldChannel:v,offset:y}=g;p=Object.assign(Object.assign({},s),{[v]:Object.assign(Object.assign({},s[v]),y?{stack:y}:{})})}return p=Eu(p,["y2","x2"]),h&&m.push(Object.assign(Object.assign({},a?{projection:a}:{}),{mark:Object.assign(Object.assign({type:"line"},Tm(u,["clip","interpolate","tension","tooltip"])),h),encoding:p})),d&&m.push(Object.assign(Object.assign({},a?{projection:a}:{}),{mark:Object.assign(Object.assign({type:"point",opacity:1,filled:!0},Tm(u,["clip","tooltip"])),d),encoding:p})),o(Object.assign(Object.assign({},i),{layer:m}),Object.assign(Object.assign({},e),{config:Yve(f)}))}}var Zve=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fwP(r,n)).filter(r=>r);else{const r=wP(f,n);r!==void 0&&(e[o]=r)}}return e}class Kve{constructor(){this.name="RuleForRangedLine"}hasMatchingType(n){if(nd(n)){const{encoding:e,mark:o}=n;if(o==="line"||eh(o)&&o.type==="line")for(const f of J0e){const r=Z0(f),a=e[r];if(e[f]&&(ti(a)&&!xl(a.bin)||mh(a)))return!0}}return!1}run(n,e,o){const{encoding:f,mark:r}=n;return Kr(Qge(!!f.x2,!!f.y2)),o(Object.assign(Object.assign({},n),{mark:Ei(r)?Object.assign(Object.assign({},r),{type:"rule"}):"rule"}),e)}}var gd=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{const d=Object.assign(Object.assign({},i),{layer:u}),h=`${(f.name||"")+s}child__layer_${Xo(u)}`,m=this.mapLayerOrUnit(f,Object.assign(Object.assign({},e),{repeater:d,repeaterPrefix:h}));return m.name=h,m})})}mapNonLayerRepeat(n,e){var o;const{repeat:f,spec:r,data:a}=n,l=gd(n,["repeat","spec","data"]);!Ir(f)&&n.columns&&(n=Eu(n,["columns"]),Kr(tP("repeat")));const c=[],{repeater:i={},repeaterPrefix:s=""}=e,u=!Ir(f)&&f.row||[i?i.row:null],d=!Ir(f)&&f.column||[i?i.column:null],h=Ir(f)&&f||[i?i.repeat:null];for(const g of h)for(const p of u)for(const v of d){const y={repeat:g,row:p,column:v,layer:i.layer},x=(r.name||"")+s+"child__"+(Ir(f)?`${Xo(g)}`:(f.row?`row_${Xo(p)}`:"")+(f.column?`column_${Xo(v)}`:"")),w=this.map(r,Object.assign(Object.assign({},e),{repeater:y,repeaterPrefix:x}));w.name=x,c.push(Eu(w,["data"]))}const m=Ir(f)?n.columns:f.column?f.column.length:1;return Object.assign(Object.assign({data:(o=r.data)!==null&&o!==void 0?o:a,align:"all"},l),{columns:m,concat:c})}mapFacet(n,e){const{facet:o}=n;return lx(o)&&n.columns&&(n=Eu(n,["columns"]),Kr(tP("facet"))),super.mapFacet(n,e)}mapUnitWithParentEncodingOrProjection(n,e){const{encoding:o,projection:f}=n,{parentEncoding:r,parentProjection:a,config:l}=e,c=TP({parentProjection:a,projection:f}),i=kP({parentEncoding:r,encoding:D4(o,e.repeater)});return this.mapUnit(Object.assign(Object.assign(Object.assign({},n),c?{projection:c}:{}),i?{encoding:i}:{}),{config:l})}mapFacetedUnit(n,e){const o=n.encoding,{row:f,column:r,facet:a}=o,l=gd(o,["row","column","facet"]),{mark:c,width:i,projection:s,height:u,view:d,params:h,encoding:m}=n,g=gd(n,["mark","width","projection","height","view","params","encoding"]),{facetMapping:p,layout:v}=this.getFacetMappingAndLayout({row:f,column:r,facet:a},e),y=D4(l,e.repeater);return this.mapFacet(Object.assign(Object.assign(Object.assign({},g),v),{facet:p,spec:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},i?{width:i}:{}),u?{height:u}:{}),d?{view:d}:{}),s?{projection:s}:{}),{mark:c,encoding:y}),h?{params:h}:{})}),e)}getFacetMappingAndLayout(n,e){var o;const{row:f,column:r,facet:a}=n;if(f||r){a&&Kr(Jge([...f?[Uh]:[],...r?[Vh]:[]]));const l={},c={};for(const i of[Uh,Vh]){const s=n[i];if(s){const u=gd(s,["align","center","spacing","columns"]);l[i]=u;for(const d of["align","center","spacing"])s[d]!==void 0&&((o=c[d])!==null&&o!==void 0||(c[d]={}),c[d][i]=s[d])}}return{facetMapping:l,layout:c}}else{const{align:l,center:c,spacing:i,columns:s}=a,u=gd(a,["align","center","spacing","columns"]);return{facetMapping:Jve(u,e.repeater),layout:Object.assign(Object.assign(Object.assign(Object.assign({},l?{align:l}:{}),c?{center:c}:{}),i?{spacing:i}:{}),s?{columns:s}:{})}}}mapLayer(n,e){var{parentEncoding:o,parentProjection:f}=e,r=gd(e,["parentEncoding","parentProjection"]);const{encoding:a,projection:l}=n,c=gd(n,["encoding","projection"]),i=Object.assign(Object.assign({},r),{parentEncoding:kP({parentEncoding:o,encoding:a,layer:!0}),parentProjection:TP({parentProjection:f,projection:l})});return super.mapLayer(c,i)}}function kP({parentEncoding:t,encoding:n={},layer:e}){let o={};if(t){const f=new Set([...Xr(t),...Xr(n)]);for(const r of f){const a=n[r],l=t[r];if(la(a)){const c=Object.assign(Object.assign({},l),a);o[r]=c}else ux(a)?o[r]=Object.assign(Object.assign({},a),{condition:Object.assign(Object.assign({},l),a.condition)}):a||a===null?o[r]=a:(e||hf(l)||Vi(l)||la(l)||Ir(l))&&(o[r]=l)}}else o=n;return!o||_o(o)?void 0:o}function TP(t){const{parentProjection:n,projection:e}=t;return n&&e&&Kr(Nge({parentProjection:n,projection:e})),e??n}function v8(t){return"filter"in t}function eye(t){return t?.stop!==void 0}function mq(t){return"lookup"in t}function tye(t){return"data"in t}function nye(t){return"param"in t}function rye(t){return"pivot"in t}function iye(t){return"density"in t}function aye(t){return"quantile"in t}function oye(t){return"regression"in t}function sye(t){return"loess"in t}function lye(t){return"sample"in t}function uye(t){return"window"in t}function cye(t){return"joinaggregate"in t}function fye(t){return"flatten"in t}function hye(t){return"calculate"in t}function vq(t){return"bin"in t}function dye(t){return"impute"in t}function pye(t){return"timeUnit"in t}function gye(t){return"aggregate"in t}function mye(t){return"stack"in t}function vye(t){return"fold"in t}function yye(t){return t.map(n=>v8(n)?{filter:nm(n.filter,$me)}:n)}var $d=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{var c;const i=l,{init:s,bind:u,empty:d}=i,h=$d(i,["init","bind","empty"]);h.type==="single"?(h.type="point",h.toggle=!1):h.type==="multi"&&(h.type="point"),e.emptySelections[a]=d!=="none";for(const m of ql((c=e.selectionPredicates[a])!==null&&c!==void 0?c:{}))m.empty=d!=="none";return{name:a,value:s,select:h,bind:u}})}):n}}function AP(t,n){const{transform:e}=t,o=$d(t,["transform"]);if(e){const f=e.map(r=>{if(v8(r))return{filter:ZT(r,n)};if(vq(r)&&J0(r.bin))return Object.assign(Object.assign({},r),{bin:xq(r.bin)});if(mq(r)){const a=r.from,{selection:l}=a,c=$d(a,["selection"]);return l?Object.assign(Object.assign({},r),{from:Object.assign({param:l},c)}):r}return r});return Object.assign(Object.assign({},o),{transform:f})}return t}function yq(t,n){var e,o;const f=ha(t);if(ti(f)&&J0(f.bin)&&(f.bin=xq(f.bin)),Q0(f)&&((o=(e=f.scale)===null||e===void 0?void 0:e.domain)===null||o===void 0?void 0:o.selection)){const r=f.scale.domain,{selection:a}=r,l=$d(r,["selection"]);f.scale.domain=Object.assign(Object.assign({},l),a?{param:a}:{})}if(m3(f))if(Ir(f.condition))f.condition=f.condition.map(r=>{const{selection:a,param:l,test:c}=r,i=$d(r,["selection","param","test"]);return l?r:Object.assign(Object.assign({},i),{test:ZT(r,n)})});else{const r=yq(f.condition,n),{selection:a,param:l,test:c}=r,i=$d(r,["selection","param","test"]);f.condition=l?f.condition:Object.assign(Object.assign({},i),{test:ZT(f.condition,n)})}return f}function xq(t){const n=t.extent;if(n?.selection){const{selection:e}=n,o=$d(n,["selection"]);return Object.assign(Object.assign({},t),{extent:Object.assign(Object.assign({},o),{param:e})})}return t}function ZT(t,n){const e=o=>nm(o,f=>{var r,a,l;const c=(r=n.emptySelections[f])!==null&&r!==void 0?r:!0,i={param:f,empty:c};return(a=(l=n.selectionPredicates)[f])!==null&&a!==void 0||(l[f]=[]),n.selectionPredicates[f].push(i),i});return t.selection?e(t.selection):nm(t.test||t.filter,o=>o.selection?e(o.selection):o)}class JT extends m8{map(n,e){var o;const f=(o=e.selections)!==null&&o!==void 0?o:[];if(n.params&&!nd(n)){const r=[];for(const a of n.params)d8(a)?f.push(a):r.push(a);n.params=r}return e.selections=f,super.map(n,bq(n,e))}mapUnit(n,e){var o;const f=e.selections;if(!f||!f.length)return n;const r=((o=e.path)!==null&&o!==void 0?o:[]).concat(n.name),a=[];for(const l of f)if(!l.views||!l.views.length)a.push(l);else for(const c of l.views)(bi(c)&&(c===n.name||r.indexOf(c)>=0)||Ir(c)&&c.map(i=>r.indexOf(i)).every((i,s,u)=>i!==-1&&(s===0||i>u[s-1])))&&a.push(l);return a.length&&(n.params=a),n}}for(const t of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const n=JT.prototype[t];JT.prototype[t]=function(e,o){return n.call(this,e,bq(e,o))}}function bq(t,n){var e;return t.name?Object.assign(Object.assign({},n),{path:((e=n.path)!==null&&e!==void 0?e:[]).concat(t.name)}):n}function _q(t,n){n===void 0&&(n=fq(t.config));const e=kye(t,n),{width:o,height:f}=t,r=Tye(e,{width:o,height:f,autosize:t.autosize},n);return Object.assign(Object.assign({},e),r?{autosize:r}:{})}const bye=new Qve,_ye=new xye,wye=new JT;function kye(t,n={}){const e={config:n};return wye.map(bye.map(_ye.map(t,e),e),e)}function MP(t){return bi(t)?{type:t}:t??{}}function Tye(t,n,e){let{width:o,height:f}=n;const r=nd(t)||k3(t),a={};r?o=="container"&&f=="container"?(a.type="fit",a.contains="padding"):o=="container"?(a.type="fit-x",a.contains="padding"):f=="container"&&(a.type="fit-y",a.contains="padding"):(o=="container"&&(Kr(JL("width")),o=void 0),f=="container"&&(Kr(JL("height")),f=void 0));const l=Object.assign(Object.assign(Object.assign({type:"pad"},a),e?MP(e.autosize):{}),MP(t.autosize));if(l.type==="fit"&&!r&&(Kr(wge),l.type="pad"),o=="container"&&!(l.type=="fit"||l.type=="fit-x")&&Kr(KL("width")),f=="container"&&!(l.type=="fit"||l.type=="fit-y")&&Kr(KL("height")),!Ff(l,{type:"pad"}))return l}function Aye(t){return t==="fit"||t==="fit-x"||t==="fit-y"}function Mye(t){return t?`fit-${o3(t)}`:"fit"}const Sye=["background","padding"];function SP(t,n){const e={};for(const o of Sye)t&&t[o]!==void 0&&(e[o]=Xu(t[o]));return n&&(e.params=t.params),e}class rd{constructor(n={},e={}){this.explicit=n,this.implicit=e}clone(){return new rd(ha(this.explicit),ha(this.implicit))}combine(){return Object.assign(Object.assign({},this.explicit),this.implicit)}get(n){return Rs(this.explicit[n],this.implicit[n])}getWithExplicit(n){return this.explicit[n]!==void 0?{explicit:!0,value:this.explicit[n]}:this.implicit[n]!==void 0?{explicit:!1,value:this.implicit[n]}:{explicit:!1,value:void 0}}setWithExplicit(n,{value:e,explicit:o}){e!==void 0&&this.set(n,e,o)}set(n,e,o){return delete this[o?"implicit":"explicit"][n],this[o?"explicit":"implicit"][n]=e,this}copyKeyFromSplit(n,{explicit:e,implicit:o}){e[n]!==void 0?this.set(n,e[n],!0):o[n]!==void 0&&this.set(n,o[n],!1)}copyKeyFromObject(n,e){e[n]!==void 0&&this.set(n,e[n],!0)}copyAll(n){for(const e of Xr(n.combine())){const o=n.getWithExplicit(e);this.setWithExplicit(e,o)}}}function Lf(t){return{explicit:!0,value:t}}function Gu(t){return{explicit:!1,value:t}}function wq(t){return(n,e,o,f)=>{const r=t(n.value,e.value);return r>0?n:r<0?e:T3(n,e,o,f)}}function T3(t,n,e,o){return t.explicit&&n.explicit&&Kr(ume(e,o,t.value,n.value)),t}function op(t,n,e,o,f=T3){return t===void 0||t.value===void 0?n:t.explicit&&!n.explicit?t:n.explicit&&!t.explicit?n:Ff(t.value,n.value)?t:f(t,n,e,o)}class Eye extends rd{constructor(n={},e={},o=!1){super(n,e),this.explicit=n,this.implicit=e,this.parseNothing=o}clone(){const n=super.clone();return n.parseNothing=this.parseNothing,n}}function Pm(t){return"url"in t}function gy(t){return"values"in t}function kq(t){return"name"in t&&!Pm(t)&&!gy(t)&&!Gd(t)}function Gd(t){return t&&(Tq(t)||Aq(t)||y8(t))}function Tq(t){return"sequence"in t}function Aq(t){return"sphere"in t}function y8(t){return"graticule"in t}var Fo;(function(t){t[t.Raw=0]="Raw",t[t.Main=1]="Main",t[t.Row=2]="Row",t[t.Column=3]="Column",t[t.Lookup=4]="Lookup"})(Fo||(Fo={}));var Cye=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fF0(f,n,e));return n?`[${o.join(", ")}]`:o}else if(K0(t))return e(n?py(t):Ime(t));return n?e(No(t)):t}function Oye(t,n){var e;for(const o of ql((e=t.component.selection)!==null&&e!==void 0?e:{})){const f=o.name;let r=`${f}${up}, ${o.resolve==="global"?"true":`{unit: ${Dm(t)}}`}`;for(const a of M3)!a.defined(o)||(a.signals&&(n=a.signals(t,o,n)),a.modifyExpr&&(r=a.modifyExpr(t,o,r)));n.push({name:f+uxe,on:[{events:{signal:o.name+up},update:`modify(${oi(o.name+N0)}, ${r})`}]})}return x8(n)}function Lye(t,n){if(t.component.selection&&Xr(t.component.selection).length){const e=oi(t.getName("cell"));n.unshift({name:"facet",value:{},on:[{events:gp("mousemove","scope"),update:`isTuple(facet) ? facet : group(${e}).datum`}]})}return x8(n)}function Pye(t,n){var e;let o=!1;for(const f of ql((e=t.component.selection)!==null&&e!==void 0?e:{})){const r=f.name,a=oi(r+N0);if(n.filter(c=>c.name===r).length===0){const c=f.resolve==="global"?"union":f.resolve,i=f.type==="point"?", true, true)":")";n.push({name:f.name,update:`${Uq}(${a}, ${oi(c)}${i}`})}o=!0;for(const c of M3)c.defined(f)&&c.topLevelSignals&&(n=c.topLevelSignals(t,f,n))}return o&&n.filter(r=>r.name==="unit").length===0&&n.unshift({name:"unit",value:{},on:[{events:"mousemove",update:"isTuple(group()) ? group() : unit"}]}),x8(n)}function Dye(t,n){var e;const o=[...n],f=Dm(t,{escape:!1});for(const r of ql((e=t.component.selection)!==null&&e!==void 0?e:{})){const a={name:r.name+N0};if(r.project.hasSelectionId&&(a.transform=[{type:"collect",sort:{field:nh}}]),r.init){const c=r.project.items.map(i=>Cye(i,["signals"]));a.values=r.project.hasSelectionId?r.init.map(i=>({unit:f,[nh]:F0(i,!1)[0]})):r.init.map(i=>({unit:f,fields:c,values:F0(i,!1)}))}o.filter(c=>c.name===r.name+N0).length||o.push(a)}return o}function Mq(t,n){var e;for(const o of ql((e=t.component.selection)!==null&&e!==void 0?e:{}))for(const f of M3)f.defined(o)&&f.marks&&(n=f.marks(t,o,n));return n}function Iye(t,n){for(const e of t.children)Is(e)&&(n=Mq(e,n));return n}function zye(t,n,e,o){const f=Gq(t,n.param,n);return{signal:rc(e.get("type"))&&Ir(o)&&o[0]>o[1]?`isValid(${f}) && reverse(${f})`:f}}function x8(t){return t.map(n=>(n.on&&!n.on.length&&delete n.on,n))}class To{constructor(n,e){this.debugName=e,this._children=[],this._parent=null,n&&(this.parent=n)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(n){this._parent=n,n&&n.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(n,e){if(this._children.includes(n)){Kr(zge);return}e!==void 0?this._children.splice(e,0,n):this._children.push(n)}removeChild(n){const e=this._children.indexOf(n);return this._children.splice(e,1),e}remove(){let n=this._parent.removeChild(this);for(const e of this._children)e._parent=this._parent,this._parent.addChild(e,n++)}insertAsParentOf(n){const e=n.parent;e.removeChild(this),this.parent=e,n.parent=this}swapWithParent(){const n=this._parent,e=n.parent;for(const f of this._children)f.parent=n;this._children=[],n.removeChild(this);const o=n.parent.removeChild(n);this._parent=e,e.addChild(this,o),n.parent=this}}class fu extends To{constructor(n,e,o,f){super(n,e),this.type=o,this.refCounts=f,this._source=this._name=e,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}clone(){const n=new this.constructor;return n.debugName=`clone_${this.debugName}`,n._source=this._source,n._name=`clone_${this._name}`,n.type=this.type,n.refCounts=this.refCounts,n.refCounts[n._name]=0,n}dependentFields(){return new Set}producedFields(){return new Set}hash(){return this._hash===void 0&&(this._hash=`Output ${MU()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(n){this._source=n}}var EP=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{const{field:a,timeUnit:l}=r;if(l){const c=hi(r,{forAs:!0});f[Ba({as:c,field:a,timeUnit:l})]={as:c,field:a,timeUnit:l}}return f},{});return _o(o)?null:new Gf(n,o)}static makeFromTransform(n,e){const o=Object.assign({},e),{timeUnit:f}=o,r=EP(o,["timeUnit"]),a=Gl(f),l=Object.assign(Object.assign({},r),{timeUnit:a});return new Gf(n,{[Ba(l)]:l})}merge(n){this.formula=Object.assign({},this.formula);for(const e in n.formula)this.formula[e]||(this.formula[e]=n.formula[e]);for(const e of n.children)n.removeChild(e),e.parent=this;n.remove()}removeFormulas(n){const e={};for(const[o,f]of ip(this.formula))n.has(f.as)||(e[o]=f);this.formula=e}producedFields(){return new Set(ql(this.formula).map(n=>n.as))}dependentFields(){return new Set(ql(this.formula).map(n=>n.field))}hash(){return`TimeUnit ${Ba(this.formula)}`}assemble(){const n=[];for(const e of ql(this.formula)){const{field:o,as:f,timeUnit:r}=e,a=Gl(r),{unit:l,utc:c}=a,i=EP(a,["unit","utc"]);n.push(Object.assign(Object.assign(Object.assign(Object.assign({field:bc(o),type:"timeunit"},l?{units:RE(l)}:{}),c?{timezone:"utc"}:{}),i),{as:[f,`${f}_end`]}))}return n}}var Rye=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f!0,parse:(t,n,e)=>{var o;const f=n.name,r=(o=n.project)!==null&&o!==void 0?o:n.project=new Fye,a={},l={},c=new Set,i=(g,p)=>{const v=p==="visual"?g.channel:g.field;let y=Xo(`${f}_${v}`);for(let x=1;c.has(y);x++)y=Xo(`${f}_${v}_${x}`);return c.add(y),{[p]:y}},s=n.type,u=t.config.selection[s],d=e.value!==void 0?ki(e.value):null;let{fields:h,encodings:m}=Ei(e.select)?e.select:{};if(!h&&!m&&d){for(const g of d)if(!!Ei(g))for(const p of Xr(g))Z0e(p)?(m||(m=[])).push(p):s==="interval"?(Kr(Lge),m=u.encodings):(h||(h=[])).push(p)}!h&&!m&&(m=u.encodings,"fields"in u&&(h=u.fields));for(const g of m??[]){const p=t.fieldDef(g);if(p){let v=p.field;if(p.aggregate){Kr(kge(g,p.aggregate));continue}else if(!v){Kr(eP(g));continue}if(p.timeUnit){v=t.vgField(g);const y={timeUnit:p.timeUnit,as:v,field:p.field};l[Ba(y)]=y}if(!a[v]){let y="E";if(s==="interval"){const w=t.getScaleComponent(g).get("type");rc(w)&&(y="R")}else p.bin&&(y="R-RE");const x={field:v,channel:g,type:y};x.signals=Object.assign(Object.assign({},i(x,"data")),i(x,"visual")),r.items.push(a[v]=x),r.hasField[v]=r.hasChannel[g]=a[v],r.hasSelectionId=r.hasSelectionId||v===nh}}else Kr(eP(g))}for(const g of h??[]){if(r.hasField[g])continue;const p={type:"E",field:g};p.signals=Object.assign({},i(p,"data")),r.items.push(p),r.hasField[g]=p,r.hasSelectionId=r.hasSelectionId||g===nh}d&&(n.init=d.map(g=>r.items.map(p=>Ei(g)?g[p.channel]!==void 0?g[p.channel]:g[p.field]:g))),_o(l)||(r.timeUnit=new Gf(null,l))},signals:(t,n,e)=>{const o=n.name+hx;return e.filter(r=>r.name===o).length>0||n.project.hasSelectionId?e:e.concat({name:o,value:n.project.items.map(r=>{const a=Rye(r,["signals","hasLegend"]);return a.field=bc(a.field),a})})}},sp={defined:t=>t.type==="interval"&&t.resolve==="global"&&t.bind&&t.bind==="scales",parse:(t,n)=>{const e=n.scales=[];for(const o of n.project.items){const f=o.channel;if(!_p(f))continue;const r=t.getScaleComponent(f),a=r?r.get("type"):void 0;if(!r||!rc(a)){Kr(Mge);continue}r.set("selectionExtent",{param:n.name,field:o.field},!0),e.push(o)}},topLevelSignals:(t,n,e)=>{const o=n.scales.filter(a=>e.filter(l=>l.name===a.signals.data).length===0);if(!t.parent||QT(t)||o.length===0)return e;const f=e.filter(a=>a.name===n.name)[0];let r=f.update;if(r.indexOf(Uq)>=0)f.update=`{${o.map(a=>`${oi(bc(a.field))}: ${a.signals.data}`).join(", ")}}`;else{for(const a of o){const l=`${oi(bc(a.field))}: ${a.signals.data}`;r.includes(l)||(r=`${r.substring(0,r.length-1)}, ${l}}`)}f.update=r}return e.concat(o.map(a=>({name:a.signals.data})))},signals:(t,n,e)=>{if(t.parent&&!QT(t))for(const o of n.scales){const f=e.filter(r=>r.name===o.signals.data)[0];f.push="outer",delete f.value,delete f.update}return e}};function KT(t,n){return`domain(${oi(t.scaleName(n))})`}function QT(t){var n;return t.parent&&o1(t.parent)&&((n=!t.parent.parent)!==null&&n!==void 0?n:QT(t.parent.parent))}var Bye=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);ft.type==="interval",signals:(t,n,e)=>{const o=n.name,f=o+hx,r=sp.defined(n),a=n.init?n.init[0]:null,l=[],c=[];if(n.translate&&!r){const s=`!event.item || event.item.mark.name !== ${oi(o+am)}`;Sq(n,(u,d)=>{var h,m;const g=ki((h=(m=d.between[0]).filter)!==null&&h!==void 0?h:m.filter=[]);return g.includes(s)||g.push(s),u})}n.project.items.forEach((s,u)=>{const d=s.channel;if(d!==cs&&d!==ol){Kr("Interval selections only support x and y encoding channels.");return}const h=a?a[u]:null,m=Uye(t,n,s,h),g=s.signals.data,p=s.signals.visual,v=oi(t.scaleName(d)),y=t.getScaleComponent(d).get("type"),x=rc(y)?"+":"";e.push(...m),l.push(g),c.push({scaleName:t.scaleName(d),expr:`(!isArray(${g}) || (${x}invert(${v}, ${p})[0] === ${x}${g}[0] && ${x}invert(${v}, ${p})[1] === ${x}${g}[1]))`})}),!r&&c.length&&e.push({name:o+eA,value:{},on:[{events:c.map(s=>({scale:s.scaleName})),update:`${c.map(s=>s.expr).join(" && ")} ? ${o+eA} : {}`}]});const i=`unit: ${Dm(t)}, fields: ${f}, values`;return e.concat(Object.assign(Object.assign({name:o+up},a?{init:`{${i}: ${F0(a)}}`}:{}),l.length?{on:[{events:[{signal:l.join(" || ")}],update:`${l.join(" && ")} ? {${i}: [${l}]} : null`}]}:{}))},marks:(t,n,e)=>{const o=n.name,{x:f,y:r}=n.project.hasChannel,a=f?.signals.visual,l=r?.signals.visual,c=`data(${oi(n.name+N0)})`;if(sp.defined(n)||!f&&!r)return e;const i={x:f!==void 0?{signal:`${a}[0]`}:{value:0},y:r!==void 0?{signal:`${l}[0]`}:{value:0},x2:f!==void 0?{signal:`${a}[1]`}:{field:{group:"width"}},y2:r!==void 0?{signal:`${l}[1]`}:{field:{group:"height"}}};if(n.resolve==="global")for(const p of Xr(i))i[p]=[Object.assign({test:`${c}.length && ${c}[0].unit === ${Dm(t)}`},i[p]),{value:0}];const s=n.mark,{fill:u,fillOpacity:d,cursor:h}=s,m=Bye(s,["fill","fillOpacity","cursor"]),g=Xr(m).reduce((p,v)=>(p[v]=[{test:[f!==void 0&&`${a}[0] !== ${a}[1]`,r!==void 0&&`${l}[0] !== ${l}[1]`].filter(y=>y).join(" && "),value:m[v]},{value:null}],p),{});return[{name:`${o+am}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:u},fillOpacity:{value:d}},update:i}},...e,{name:o+am,type:"rect",clip:!0,encode:{enter:Object.assign(Object.assign({},h?{cursor:{value:h}}:{}),{fill:{value:"transparent"}}),update:Object.assign(Object.assign({},i),g)}}]}};function Uye(t,n,e,o){const f=e.channel,r=e.signals.visual,a=e.signals.data,l=sp.defined(n),c=oi(t.scaleName(f)),i=t.getScaleComponent(f),s=i?i.get("type"):void 0,u=g=>`scale(${c}, ${g})`,d=t.getSizeSignalRef(f===cs?"width":"height").signal,h=`${f}(unit)`,m=Sq(n,(g,p)=>[...g,{events:p.between[0],update:`[${h}, ${h}]`},{events:p,update:`[${r}[0], clamp(${h}, 0, ${d})]`}]);return m.push({events:{signal:n.name+eA},update:rc(s)?`[${u(`${a}[0]`)}, ${u(`${a}[1]`)}]`:"[0, 0]"}),l?[{name:a,on:[]}]:[Object.assign(Object.assign({name:r},o?{init:F0(o,!0,u)}:{value:[]}),{on:m}),Object.assign(Object.assign({name:a},o?{init:F0(o)}:{}),{on:[{events:{signal:r},update:`${r}[0] === ${r}[1] ? null : invert(${c}, ${r})`}]})]}function Sq(t,n){return t.events.reduce((e,o)=>o.between?n(e,o):(Kr(`${o} is not an ordered event stream for interval selections.`),e),[])}const Vye={defined:t=>t.type==="point",signals:(t,n,e)=>{var o;const f=n.name,r=f+hx,a=n.project,l="(item().isVoronoi ? datum.datum : datum)",c=ql((o=t.component.selection)!==null&&o!==void 0?o:{}).reduce((d,h)=>h.type==="interval"?d.concat(h.name+am):d,[]).map(d=>`indexof(item().mark.name, '${d}') < 0`).join(" && "),i=`datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0${c?` && ${c}`:""}`;let s=`unit: ${Dm(t)}, `;if(n.project.hasSelectionId)s+=`${nh}: ${l}[${oi(nh)}]`;else{const d=a.items.map(h=>{const m=t.fieldDef(h.channel);return m?.bin?`[${l}[${oi(t.vgField(h.channel,{}))}], ${l}[${oi(t.vgField(h.channel,{binSuffix:"end"}))}]]`:`${l}[${oi(h.field)}]`}).join(", ");s+=`fields: ${r}, values: [${d}]`}const u=n.events;return e.concat([{name:f+up,on:u?[{events:u,update:`${i} ? {${s}} : null`,force:!0}]:[]}])}};function n1(t,n,e,o){const f=m3(n)&&n.condition,r=o(n);if(f){const l=ki(f).map(c=>{const i=o(c);if(L1e(c)){const{param:s,empty:u}=c,d=$q(t,{param:s,empty:u});return Object.assign({test:d},i)}else{const s=F2(t,c.test);return Object.assign({test:s},i)}});return{[e]:[...l,...r!==void 0?[r]:[]]}}else return r!==void 0?{[e]:r}:{}}function b8(t,n="text"){const e=t.encoding[n];return n1(t,e,n,o=>A3(o,t.config))}function A3(t,n,e="datum"){if(t){if(hf(t))return Ho(t.value);if(la(t)){const{format:o,formatType:f}=O2(t);return QE({fieldOrDatumDef:t,format:o,formatType:f,expr:e,config:n})}}}function Eq(t,n={}){const{encoding:e,markDef:o,config:f,stack:r}=t,a=e.tooltip;if(Ir(a))return{tooltip:CP({tooltip:a},r,f,n)};{const l=n.reactiveGeom?"datum.datum":"datum";return n1(t,a,"tooltip",c=>{const i=A3(c,f,l);if(i)return i;if(c===null)return;let s=oo("tooltip",o,f);if(s===!0&&(s={content:"encoding"}),bi(s))return{value:s};if(Ei(s))return Vi(s)?s:s.content==="encoding"?CP(e,r,f,n):{signal:l}})}}function Cq(t,n,e,{reactiveGeom:o}={}){const f={},r=o?"datum.datum":"datum",a=[];function l(i,s){const u=Z0(s),d=wc(i)?i:Object.assign(Object.assign({},i),{type:t[u].type}),h=d.title||r8(d,e),m=ki(h).join(", ");let g;if(sl(s)){const p=s==="x"?"x2":"y2",v=th(t[p]);if(xl(d.bin)&&v){const y=hi(d,{expr:r}),x=hi(v,{expr:r}),{format:w,formatType:k}=O2(d);g=sx(y,x,w,k,e),f[p]=!0}}if((sl(s)||s===Tc||s===vf)&&n&&n.fieldChannel===s&&n.offset==="normalize"){const{format:p,formatType:v}=O2(d);g=QE({fieldOrDatumDef:d,format:p,formatType:v,expr:r,config:e,normalizeStack:!0}).signal}g??(g=A3(d,e,r).signal),a.push({channel:s,key:m,value:g})}o8(t,(i,s)=>{ti(i)?l(i,s):v3(i)&&l(i.condition,s)});const c={};for(const{channel:i,key:s,value:u}of a)!f[i]&&!c[s]&&(c[s]=u);return c}function CP(t,n,e,{reactiveGeom:o}={}){const f=Cq(t,n,e,{reactiveGeom:o}),r=ip(f).map(([a,l])=>`"${a}": ${l}`);return r.length>0?{signal:`{${r.join(", ")}}`}:void 0}function qye(t){const{markDef:n,config:e}=t,o=oo("aria",n,e);return o===!1?{}:Object.assign(Object.assign(Object.assign({},o?{aria:o}:{}),Hye(t)),$ye(t))}function Hye(t){const{mark:n,markDef:e,config:o}=t;if(o.aria===!1)return{};const f=oo("ariaRoleDescription",e,o);return f!=null?{ariaRoleDescription:{value:f}}:n in xge?{}:{ariaRoleDescription:{value:n}}}function $ye(t){const{encoding:n,markDef:e,config:o,stack:f}=t,r=n.description;if(r)return n1(t,r,"description",c=>A3(c,t.config));const a=oo("description",e,o);if(a!=null)return{description:Ho(a)};if(o.aria===!1)return{};const l=Cq(n,f,o);if(!_o(l))return{description:{signal:ip(l).map(([c,i],s)=>`"${s>0?"; ":""}${c}: " + (${i})`).join(" + ")}}}function nl(t,n,e={}){const{markDef:o,encoding:f,config:r}=n,{vgChannel:a}=e;let{defaultRef:l,defaultValue:c}=e;l===void 0&&(c??(c=oo(t,o,r,{vgChannel:a,ignoreVgConfig:!0})),c!==void 0&&(l=Ho(c)));const i=f[t];return n1(n,i,a??t,s=>KE({channel:t,channelDef:s,markDef:o,config:r,scaleName:n.scaleName(t),scale:n.getScaleComponent(t),stack:null,defaultRef:l}))}function Oq(t,n={filled:void 0}){var e,o,f,r;const{markDef:a,encoding:l,config:c}=t,{type:i}=a,s=(e=n.filled)!==null&&e!==void 0?e:oo("filled",a,c),u=Fa(["bar","point","circle","square","geoshape"],i)?"transparent":void 0,d=(f=(o=oo(s===!0?"color":void 0,a,c,{vgChannel:"fill"}))!==null&&o!==void 0?o:c.mark[s===!0&&"color"])!==null&&f!==void 0?f:u,h=(r=oo(s===!1?"color":void 0,a,c,{vgChannel:"stroke"}))!==null&&r!==void 0?r:c.mark[s===!1&&"color"],m=s?"fill":"stroke",g=Object.assign(Object.assign({},d?{fill:Ho(d)}:{}),h?{stroke:Ho(h)}:{});return a.color&&(s?a.fill:a.stroke)&&Kr(KU("property",{fill:"fill"in a,stroke:"stroke"in a})),Object.assign(Object.assign(Object.assign(Object.assign({},g),nl("color",t,{vgChannel:m,defaultValue:s?d:h})),nl("fill",t,{defaultValue:l.fill?d:void 0})),nl("stroke",t,{defaultValue:l.stroke?h:void 0}))}function Gye(t){const{encoding:n,mark:e}=t,o=n.order;return!Tp(e)&&hf(o)?n1(t,o,"zindex",f=>Ho(f.value)):{}}function my({channel:t,markDef:n,encoding:e={},model:o,bandPosition:f}){const r=`${t}Offset`,a=n[r],l=e[r];if((r==="xOffset"||r==="yOffset")&&l){const i=KE({channel:r,channelDef:l,markDef:n,config:o?.config,scaleName:o.scaleName(r),scale:o.getScaleComponent(r),stack:null,defaultRef:Ho(a),bandPosition:f});return{offsetType:"encoding",offset:i}}const c=n[r];return c?{offsetType:"visual",offset:c}:{}}function Fl(t,n,{defaultPos:e,vgChannel:o}){const{encoding:f,markDef:r,config:a,stack:l}=n,c=f[t],i=f[ph(t)],s=n.scaleName(t),u=n.getScaleComponent(t),{offset:d,offsetType:h}=my({channel:t,markDef:r,encoding:f,model:n,bandPosition:.5}),m=_8({model:n,defaultPos:e,channel:t,scaleName:s,scale:u}),g=!c&&sl(t)&&(f.latitude||f.longitude)?{field:n.getName(t)}:Wye({channel:t,channelDef:c,channel2Def:i,markDef:r,config:a,scaleName:s,scale:u,stack:l,offset:d,defaultRef:m,bandPosition:h==="encoding"?0:void 0});return g?{[o||t]:g}:void 0}function Wye(t){const{channel:n,channelDef:e,scaleName:o,stack:f,offset:r,markDef:a}=t;if(la(e)&&f&&n===f.fieldChannel){if(ti(e)){let l=e.bandPosition;if(l===void 0&&a.type==="text"&&(n==="radius"||n==="theta")&&(l=.5),l!==void 0)return E2({scaleName:o,fieldOrDatumDef:e,startSuffix:"start",bandPosition:l,offset:r})}return g0(e,o,{suffix:"end"},{offset:r})}return ZE(t)}function _8({model:t,defaultPos:n,channel:e,scaleName:o,scale:f}){const{markDef:r,config:a}=t;return()=>{const l=Z0(e),c=ap(e),i=oo(e,r,a,{vgChannel:c});if(i!==void 0)return jv(e,i);switch(n){case"zeroOrMin":case"zeroOrMax":if(o){const s=f.get("type");if(!Fa([Cu.LOG,Cu.TIME,Cu.UTC],s)){if(f.domainDefinitelyIncludesZero())return{scale:o,value:0}}}if(n==="zeroOrMin")return l==="y"?{field:{group:"height"}}:{value:0};switch(l){case"radius":return{signal:`min(${t.width.signal},${t.height.signal})/2`};case"theta":return{signal:"2*PI"};case"x":return{field:{group:"width"}};case"y":return{value:0}}break;case"mid":{const s=t[Fu(e)];return Object.assign(Object.assign({},s),{mult:.5})}}}}const Yye={left:"x",center:"xc",right:"x2"},Xye={top:"y",middle:"yc",bottom:"y2"};function Lq(t,n,e,o="middle"){if(t==="radius"||t==="theta")return ap(t);const f=t==="x"?"align":"baseline",r=oo(f,n,e);let a;return Vi(r)?(Kr(Kge(f)),a=void 0):a=r,t==="x"?Yye[a||(o==="top"?"left":"center")]:Xye[a||o]}function z2(t,n,{defaultPos:e,defaultPos2:o,range:f}){return f?Pq(t,n,{defaultPos:e,defaultPos2:o}):Fl(t,n,{defaultPos:e})}function Pq(t,n,{defaultPos:e,defaultPos2:o}){const{markDef:f,config:r}=n,a=ph(t),l=Fu(t),c=Zye(n,o,a),i=c[l]?Lq(t,f,r):ap(t);return Object.assign(Object.assign({},Fl(t,n,{defaultPos:e,vgChannel:i})),c)}function Zye(t,n,e){const{encoding:o,mark:f,markDef:r,stack:a,config:l}=t,c=Z0(e),i=Fu(e),s=ap(e),u=o[c],d=t.scaleName(c),h=t.getScaleComponent(c),{offset:m}=e in o||e in r?my({channel:e,markDef:r,encoding:o,model:t}):my({channel:c,markDef:r,encoding:o,model:t});if(!u&&(e==="x2"||e==="y2")&&(o.latitude||o.longitude)){const p=Fu(e),v=t.markDef[p];return v!=null?{[p]:{value:v}}:{[s]:{field:t.getName(e)}}}const g=Jye({channel:e,channelDef:u,channel2Def:o[e],markDef:r,config:l,scaleName:d,scale:h,stack:a,offset:m,defaultRef:void 0});return g!==void 0?{[s]:g}:Mb(e,r)||Mb(e,{[e]:A2(e,r,l.style),[i]:A2(i,r,l.style)})||Mb(e,l[f])||Mb(e,l.mark)||{[s]:_8({model:t,defaultPos:n,channel:e,scaleName:d,scale:h})()}}function Jye({channel:t,channelDef:n,channel2Def:e,markDef:o,config:f,scaleName:r,scale:a,stack:l,offset:c,defaultRef:i}){return la(n)&&l&&t.charAt(0)===l.fieldChannel.charAt(0)?g0(n,r,{suffix:"start"},{offset:c}):ZE({channel:t,channelDef:e,scaleName:r,scale:a,stack:l,markDef:o,config:f,offset:c,defaultRef:i})}function Mb(t,n){const e=Fu(t),o=ap(t);if(n[o]!==void 0)return{[o]:jv(t,n[o])};if(n[t]!==void 0)return{[o]:jv(t,n[t])};if(n[e]){const f=n[e];if(z0(f))Kr($ge(e));else return{[e]:jv(t,f)}}}function lp(t,n){var e,o;const{config:f,encoding:r,markDef:a}=t,l=a.type,c=ph(n),i=Fu(n),s=r[n],u=r[c],d=t.getScaleComponent(n),h=d?d.get("type"):void 0,m=a.orient,g=(o=(e=r[i])!==null&&e!==void 0?e:r.size)!==null&&o!==void 0?o:oo("size",a,f,{vgChannel:i}),p=l==="bar"&&(n==="x"?m==="vertical":m==="horizontal");return ti(s)&&(Bo(s.bin)||xl(s.bin)||s.timeUnit&&!u)&&!(g&&!z0(g))&&!ll(h)?exe({fieldDef:s,fieldDef2:u,channel:n,model:t}):(la(s)&&ll(h)||p)&&!u?Qye(s,n,t):Pq(n,t,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"})}function Kye(t,n,e,o,f){if(z0(f))if(e){const a=e.get("type");if(a==="band"){let l=`bandwidth('${n}')`;return f.band!==1&&(l=`${f.band} * ${l}`),{signal:`max(0.25, ${l})`}}else f.band!==1&&(Kr(nme(a)),f=void 0)}else return{mult:f.band,field:{group:t}};else{if(Vi(f))return f;if(f)return{value:f}}if(e){const a=e.get("range");if(kp(a)&&wo(a.step))return{value:a.step-2}}return{value:D2(o.view,t)-2}}function Qye(t,n,e){const{markDef:o,encoding:f,config:r,stack:a}=e,l=o.orient,c=e.scaleName(n),i=e.getScaleComponent(n),s=Fu(n),u=ph(n),d=K0e(n),h=e.scaleName(d),m=l==="horizontal"&&n==="y"||l==="vertical"&&n==="x";let g;(f.size||o.size)&&(m?g=nl("size",e,{vgChannel:s,defaultRef:Ho(o.size)}):Kr(ome(o.type)));const p=!!g,v=LV({channel:n,fieldDef:t,markDef:o,config:r,scaleType:i?.get("type"),useVlSizeChannel:m});g=g||{[s]:Kye(s,h||c,i,r,v)};const y=i?.get("type")==="band"&&z0(v)&&!p?"top":"middle",x=Lq(n,o,r,y),w=x==="xc"||x==="yc",{offset:k,offsetType:b}=my({channel:n,markDef:o,encoding:f,model:e,bandPosition:w?.5:0}),T=ZE({channel:n,channelDef:t,markDef:o,config:r,scaleName:c,scale:i,stack:a,offset:k,defaultRef:_8({model:e,defaultPos:"mid",channel:n,scaleName:c,scale:i}),bandPosition:w?b==="encoding"?0:.5:Vi(v)?{signal:`(1-${v})/2`}:z0(v)?(1-v.band)/2:0});if(s)return Object.assign({[x]:T},g);{const _=ap(u),S=g[s],A=k?Object.assign(Object.assign({},S),{offset:k}):S;return{[x]:T,[_]:Ir(T)?[T[0],Object.assign(Object.assign({},T[1]),{offset:A})]:Object.assign(Object.assign({},T),{offset:A})}}}function J1(t,n,e,o,f){if(OU(t))return 0;const r=t==="x"||t==="y2"?-n/2:n/2;if(Vi(e)||Vi(f)||Vi(o)){const a=qh(e),l=qh(f),c=qh(o),i=c?`${c} + `:"",s=a?`(${a} ? -1 : 1) * `:"",u=l?`(${l} + ${r})`:r;return{signal:i+s+u}}else return f=f||0,o+(e?-f-r:+f+r)}function exe({fieldDef:t,fieldDef2:n,channel:e,model:o}){var f,r,a;const{config:l,markDef:c,encoding:i}=o,s=o.getScaleComponent(e),u=o.scaleName(e),d=s?s.get("type"):void 0,h=s.get("reverse"),m=LV({channel:e,fieldDef:t,markDef:c,config:l,scaleType:d}),g=(f=o.component.axes[e])===null||f===void 0?void 0:f[0],p=(r=g?.get("translate"))!==null&&r!==void 0?r:.5,v=sl(e)&&(a=oo("binSpacing",c,l))!==null&&a!==void 0?a:0,y=ph(e),x=ap(e),w=ap(y),{offset:k}=my({channel:e,markDef:c,encoding:i,model:o,bandPosition:0}),b=Vi(m)?{signal:`(1-${m.signal})/2`}:z0(m)?(1-m.band)/2:.5;if(Bo(t.bin)||t.timeUnit)return{[w]:OP({fieldDef:t,scaleName:u,bandPosition:b,offset:J1(y,v,h,p,k)}),[x]:OP({fieldDef:t,scaleName:u,bandPosition:Vi(b)?{signal:`1-${b.signal}`}:1-b,offset:J1(e,v,h,p,k)})};if(xl(t.bin)){const T=g0(t,u,{},{offset:J1(y,v,h,p,k)});if(ti(n))return{[w]:T,[x]:g0(n,u,{},{offset:J1(e,v,h,p,k)})};if(J0(t.bin)&&t.bin.step)return{[w]:T,[x]:{signal:`scale("${u}", ${hi(t,{expr:"datum"})} + ${t.bin.step})`,offset:J1(e,v,h,p,k)}}}Kr(tV(y))}function OP({fieldDef:t,scaleName:n,bandPosition:e,offset:o}){return E2({scaleName:n,fieldOrDatumDef:t,bandPosition:e,offset:o})}const txe=new Set(["aria","width","height"]);function Ac(t,n){const{fill:e=void 0,stroke:o=void 0}=n.color==="include"?Oq(t):{};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},nxe(t.markDef,n)),LP(t,"fill",e)),LP(t,"stroke",o)),nl("opacity",t)),nl("fillOpacity",t)),nl("strokeOpacity",t)),nl("strokeWidth",t)),nl("strokeDash",t)),Gye(t)),Eq(t)),b8(t,"href")),qye(t))}function LP(t,n,e){const{config:o,mark:f,markDef:r}=t;if(oo("invalid",r,o)==="hide"&&e&&!Tp(f)){const l=rxe(t,{invalid:!0,channels:s3});if(l)return{[n]:[{test:l,value:null},...ki(e)]}}return e?{[n]:e}:{}}function nxe(t,n){return yge.reduce((e,o)=>(!txe.has(o)&&t[o]!==void 0&&n[o]!=="ignore"&&(e[o]=Ho(t[o])),e),{})}function rxe(t,{invalid:n=!1,channels:e}){const o=e.reduce((r,a)=>{const l=t.getScaleComponent(a);if(l){const c=l.get("type"),i=t.vgField(a,{expr:"datum"});i&&rc(c)&&(r[i]=!0)}return r},{}),f=Xr(o);if(f.length>0){const r=n?"||":"&&";return f.map(a=>JE(a,n)).join(` ${r} `)}}function w8(t){const{config:n,markDef:e}=t;if(oo("invalid",e,n)){const f=ixe(t,{channels:gh});if(f)return{defined:{signal:f}}}return{}}function ixe(t,{invalid:n=!1,channels:e}){const o=e.reduce((r,a)=>{var l;const c=t.getScaleComponent(a);if(c){const i=c.get("type"),s=t.vgField(a,{expr:"datum",binSuffix:!((l=t.stack)===null||l===void 0)&&l.impute?"mid":void 0});s&&rc(i)&&(r[s]=!0)}return r},{}),f=Xr(o);if(f.length>0){const r=n?"||":"&&";return f.map(a=>JE(a,n)).join(` ${r} `)}}function PP(t,n){if(n!==void 0)return{[t]:Ho(n)}}const I4="voronoi",Dq={defined:t=>t.type==="point"&&t.nearest,parse:(t,n)=>{if(n.events)for(const e of n.events)e.markname=t.getName(I4)},marks:(t,n,e)=>{const{x:o,y:f}=n.project.hasChannel,r=t.mark;if(Tp(r))return Kr(Tge(r)),e;const a={name:t.getName(I4),type:"path",interactive:!0,from:{data:t.getName("marks")},encode:{update:Object.assign({fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0}},Eq(t,{reactiveGeom:!0}))},transform:[{type:"voronoi",x:{expr:o||!f?"datum.datum.x || 0":"0"},y:{expr:f||!o?"datum.datum.y || 0":"0"},size:[t.getSizeSignalRef("width"),t.getSizeSignalRef("height")]}]};let l=0,c=!1;return e.forEach((i,s)=>{var u;const d=(u=i.name)!==null&&u!==void 0?u:"";d===t.component.mark[0].name?l=s:d.indexOf(I4)>=0&&(c=!0)}),c||e.splice(l+1,0,a),e}},Iq={defined:t=>t.type==="point"&&t.resolve==="global"&&t.bind&&t.bind!=="scales"&&!h8(t.bind),parse:(t,n,e)=>Vq(n,e),topLevelSignals:(t,n,e)=>{const o=n.name,f=n.project,r=n.bind,a=n.init&&n.init[0],l=Dq.defined(n)?"(item().isVoronoi ? datum.datum : datum)":"datum";return f.items.forEach((c,i)=>{var s,u;const d=Xo(`${o}_${c.field}`);e.filter(m=>m.name===d).length||e.unshift(Object.assign(Object.assign({name:d},a?{init:F0(a[i])}:{value:null}),{on:n.events?[{events:n.events,update:`datum && item().mark.marktype !== 'group' ? ${l}[${oi(c.field)}] : null`}]:[],bind:(u=(s=r[c.field])!==null&&s!==void 0?s:r[c.channel])!==null&&u!==void 0?u:r}))}),e},signals:(t,n,e)=>{const o=n.name,f=n.project,r=e.filter(i=>i.name===o+up)[0],a=o+hx,l=f.items.map(i=>Xo(`${o}_${i.field}`)),c=l.map(i=>`${i} !== null`).join(" && ");return l.length&&(r.update=`${c} ? {fields: ${a}, values: [${l.join(", ")}]} : null`),delete r.value,delete r.on,e}},R2="_toggle",zq={defined:t=>t.type==="point"&&!!t.toggle,signals:(t,n,e)=>e.concat({name:n.name+R2,value:!1,on:[{events:n.events,update:n.toggle}]}),modifyExpr:(t,n)=>{const e=n.name+up,o=n.name+R2;return`${o} ? null : ${e}, `+(n.resolve==="global"?`${o} ? null : true, `:`${o} ? null : {unit: ${Dm(t)}}, `)+`${o} ? ${e} : null`}},axe={defined:t=>t.clear!==void 0&&t.clear!==!1,parse:(t,n)=>{n.clear&&(n.clear=bi(n.clear)?gp(n.clear,"view"):n.clear)},topLevelSignals:(t,n,e)=>{if(Iq.defined(n))for(const o of n.project.items){const f=e.findIndex(r=>r.name===Xo(`${n.name}_${o.field}`));f!==-1&&e[f].on.push({events:n.clear,update:"null"})}return e},signals:(t,n,e)=>{function o(f,r){f!==-1&&e[f].on&&e[f].on.push({events:n.clear,update:r})}if(n.type==="interval")for(const f of n.project.items){const r=e.findIndex(a=>a.name===f.signals.visual);if(o(r,"[0, 0]"),r===-1){const a=e.findIndex(l=>l.name===f.signals.data);o(a,"null")}}else{let f=e.findIndex(r=>r.name===n.name+up);o(f,"null"),zq.defined(n)&&(f=e.findIndex(r=>r.name===n.name+R2),o(f,"false"))}return e}},Rq={defined:t=>{const n=t.resolve==="global"&&t.bind&&h8(t.bind),e=t.project.items.length===1&&t.project.items[0].field!==nh;return n&&!e&&Kr(Sge),n&&e},parse:(t,n,e)=>{var o;const f=ha(e);if(f.select=bi(f.select)?{type:f.select,toggle:n.toggle}:Object.assign(Object.assign({},f.select),{toggle:n.toggle}),Vq(n,f),Ei(e.select)&&(e.select.on||e.select.clear)){const l='event.item && indexof(event.item.mark.role, "legend") < 0';for(const c of n.events)c.filter=ki((o=c.filter)!==null&&o!==void 0?o:[]),c.filter.includes(l)||c.filter.push(l)}const r=L4(n.bind)?n.bind.legend:"click",a=bi(r)?gp(r,"view"):ki(r);n.bind={legend:{merge:a}}},topLevelSignals:(t,n,e)=>{const o=n.name,f=L4(n.bind)&&n.bind.legend,r=a=>l=>{const c=ha(l);return c.markname=a,c};for(const a of n.project.items){if(!a.hasLegend)continue;const l=`${Xo(a.field)}_legend`,c=`${o}_${l}`;if(e.filter(s=>s.name===c).length===0){const s=f.merge.map(r(`${l}_symbols`)).concat(f.merge.map(r(`${l}_labels`))).concat(f.merge.map(r(`${l}_entries`)));e.unshift(Object.assign(Object.assign({name:c},n.init?{}:{value:null}),{on:[{events:s,update:"datum.value || item().items[0].items[0].datum.value",force:!0},{events:f.merge,update:`!event.item || !datum ? null : ${c}`,force:!0}]}))}}return e},signals:(t,n,e)=>{const o=n.name,f=n.project,r=e.find(d=>d.name===o+up),a=o+hx,l=f.items.filter(d=>d.hasLegend).map(d=>Xo(`${o}_${Xo(d.field)}_legend`)),i=`${l.map(d=>`${d} !== null`).join(" && ")} ? {fields: ${a}, values: [${l.join(", ")}]} : null`;n.events&&l.length>0?r.on.push({events:l.map(d=>({signal:d})),update:i}):l.length>0&&(r.update=i,delete r.value,delete r.on);const s=e.find(d=>d.name===o+R2),u=L4(n.bind)&&n.bind.legend;return s&&(n.events?s.on.push(Object.assign(Object.assign({},s.on[0]),{events:u})):s.on[0].events=u),e}};function oxe(t,n,e){var o,f,r,a;const l=(o=t.fieldDef(n))===null||o===void 0?void 0:o.field;for(const c of ql((f=t.component.selection)!==null&&f!==void 0?f:{})){const i=(r=c.project.hasField[l])!==null&&r!==void 0?r:c.project.hasChannel[n];if(i&&Rq.defined(c)){const s=(a=e.get("selections"))!==null&&a!==void 0?a:[];s.push(c.name),e.set("selections",s,!1),i.hasLegend=!0}}}const Fq="_translate_anchor",Nq="_translate_delta",sxe={defined:t=>t.type==="interval"&&t.translate,signals:(t,n,e)=>{const o=n.name,f=sp.defined(n),r=o+Fq,{x:a,y:l}=n.project.hasChannel;let c=gp(n.translate,"scope");return f||(c=c.map(i=>(i.between[0].markname=o+am,i))),e.push({name:r,value:{},on:[{events:c.map(i=>i.between[0]),update:"{x: x(unit), y: y(unit)"+(a!==void 0?`, extent_x: ${f?KT(t,cs):`slice(${a.signals.visual})`}`:"")+(l!==void 0?`, extent_y: ${f?KT(t,ol):`slice(${l.signals.visual})`}`:"")+"}"}]},{name:o+Nq,value:{},on:[{events:c,update:`{x: ${r}.x - x(unit), y: ${r}.y - y(unit)}`}]}),a!==void 0&&DP(t,n,a,"width",e),l!==void 0&&DP(t,n,l,"height",e),e}};function DP(t,n,e,o,f){var r,a;const l=n.name,c=l+Fq,i=l+Nq,s=e.channel,u=sp.defined(n),d=f.filter(T=>T.name===e.signals[u?"data":"visual"])[0],h=t.getSizeSignalRef(o).signal,m=t.getScaleComponent(s),g=m.get("type"),p=m.get("reverse"),v=u?s===cs?p?"":"-":p?"-":"":"",y=`${c}.extent_${s}`,x=`${v}${i}.${s} / ${u?`${h}`:`span(${y})`}`,w=u?g==="log"?"panLog":g==="symlog"?"panSymlog":g==="pow"?"panPow":"panLinear":"panLinear",k=u?g==="pow"?`, ${(r=m.get("exponent"))!==null&&r!==void 0?r:1}`:g==="symlog"?`, ${(a=m.get("constant"))!==null&&a!==void 0?a:1}`:"":"",b=`${w}(${y}, ${x}${k})`;d.on.push({events:{signal:i},update:u?b:`clampRange(${b}, 0, ${h})`})}const Bq="_zoom_anchor",jq="_zoom_delta",lxe={defined:t=>t.type==="interval"&&t.zoom,signals:(t,n,e)=>{const o=n.name,f=sp.defined(n),r=o+jq,{x:a,y:l}=n.project.hasChannel,c=oi(t.scaleName(cs)),i=oi(t.scaleName(ol));let s=gp(n.zoom,"scope");return f||(s=s.map(u=>(u.markname=o+am,u))),e.push({name:o+Bq,on:[{events:s,update:f?"{"+[c?`x: invert(${c}, x(unit))`:"",i?`y: invert(${i}, y(unit))`:""].filter(u=>!!u).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:r,on:[{events:s,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),a!==void 0&&IP(t,n,a,"width",e),l!==void 0&&IP(t,n,l,"height",e),e}};function IP(t,n,e,o,f){var r,a;const l=n.name,c=e.channel,i=sp.defined(n),s=f.filter(w=>w.name===e.signals[i?"data":"visual"])[0],u=t.getSizeSignalRef(o).signal,d=t.getScaleComponent(c),h=d.get("type"),m=i?KT(t,c):s.name,g=l+jq,p=`${l}${Bq}.${c}`,v=i?h==="log"?"zoomLog":h==="symlog"?"zoomSymlog":h==="pow"?"zoomPow":"zoomLinear":"zoomLinear",y=i?h==="pow"?`, ${(r=d.get("exponent"))!==null&&r!==void 0?r:1}`:h==="symlog"?`, ${(a=d.get("constant"))!==null&&a!==void 0?a:1}`:"":"",x=`${v}(${m}, ${p}, ${g}${y})`;s.on.push({events:{signal:g},update:i?x:`clampRange(${x}, 0, ${u})`})}const N0="_store",up="_tuple",uxe="_modify",Uq="vlSelectionResolve",M3=[Vye,jye,Nye,zq,Iq,sp,Rq,axe,sxe,lxe,Dq];function cxe(t){let n=t.parent;for(;n&&!lf(n);)n=n.parent;return n}function Dm(t,{escape:n}={escape:!0}){let e=n?oi(t.name):t.name;const o=cxe(t);if(o){const{facet:f}=o;for(const r of dc)f[r]&&(e+=` + '__facet_${r}_' + (facet[${oi(o.vgField(r))}])`)}return e}function k8(t){var n;return ql((n=t.component.selection)!==null&&n!==void 0?n:{}).reduce((e,o)=>e||o.project.hasSelectionId,!1)}function Vq(t,n){(bi(n.select)||!n.select.on)&&delete t.events,(bi(n.select)||!n.select.clear)&&delete t.clear,(bi(n.select)||!n.select.toggle)&&delete t.toggle}function tA(t){const n=[];return t.type==="Identifier"?[t.name]:t.type==="Literal"?[t.value]:(t.type==="MemberExpression"&&(n.push(...tA(t.object)),n.push(...tA(t.property))),n)}function qq(t){return t.object.type==="MemberExpression"?qq(t.object):t.object.name==="datum"}function Hq(t){const n=jS(t),e=new Set;return n.visit(o=>{o.type==="MemberExpression"&&qq(o)&&e.add(tA(o).slice(1).join("."))}),e}class r1 extends To{constructor(n,e,o){super(n),this.model=e,this.filter=o,this.expr=F2(this.model,this.filter,this),this._dependentFields=Hq(this.expr)}clone(){return new r1(null,this.model,ha(this.filter))}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function fxe(t,n){var e;const o={},f=t.config.selection;if(!n||!n.length)return o;for(const r of n){const a=Xo(r.name),l=r.select,c=bi(l)?l:l.type,i=Ei(l)?ha(l):{type:c},s=f[c];for(const d in s)d==="fields"||d==="encodings"||(d==="mark"&&(i[d]=Object.assign(Object.assign({},s[d]),i[d])),(i[d]===void 0||i[d]===!0)&&(i[d]=(e=s[d])!==null&&e!==void 0?e:i[d]));const u=o[a]=Object.assign(Object.assign({},i),{name:a,type:c,init:r.value,bind:r.bind,events:bi(i.on)?gp(i.on,"scope"):ki(ha(i.on))});for(const d of M3)d.defined(u)&&d.parse&&d.parse(t,u,r)}return o}function $q(t,n,e,o="datum"){const f=bi(n)?n:n.param,r=Xo(f),a=oi(r+N0);let l;try{l=t.getSelectionComponent(r,f)}catch{return`!!${r}`}if(l.project.timeUnit){const d=e??t.component.data.raw,h=l.project.timeUnit.clone();d.parent?h.insertAsParentOf(d):d.parent=h}const c=l.project.hasSelectionId?"vlSelectionIdTest(":"vlSelectionTest(",i=l.resolve==="global"?")":`, ${oi(l.resolve)})`,s=`${c}${a}, ${o}${i}`,u=`length(data(${a}))`;return n.empty===!1?`${u} && ${s}`:`!${u} || ${s}`}function Gq(t,n,e){const o=Xo(n),f=e.encoding;let r=e.field,a;try{a=t.getSelectionComponent(o,n)}catch{return o}if(!f&&!r)r=a.project.items[0].field,a.project.items.length>1&&Kr(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${oi(r)}.`);else if(f&&!r){const l=a.project.items.filter(c=>c.channel===f);!l.length||l.length>1?(r=a.project.items[0].field,Kr((l.length?"Multiple ":"No ")+`matching ${oi(f)} encoding found for selection ${oi(e.param)}. Using "field": ${oi(r)}.`)):r=l[0].field}return`${a.name}[${oi(bc(r))}]`}function hxe(t,n){var e;for(const[o,f]of ip((e=t.component.selection)!==null&&e!==void 0?e:{})){const r=t.getName(`lookup_${o}`);t.component.data.outputNodes[r]=f.materialized=new fu(new r1(n,t,{param:o}),r,Fo.Lookup,t.component.data.outputNodeRefCounts)}}function F2(t,n,e){return Bv(n,o=>bi(o)?o:Vme(o)?$q(t,o,e):uV(o))}var Sb=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fr8(e,n)).join(", "):t}function z4(t,n,e,o){var f,r,a,l,c;(f=t.encode)!==null&&f!==void 0||(t.encode={}),(r=(l=t.encode)[n])!==null&&r!==void 0||(l[n]={}),(a=(c=t.encode[n]).update)!==null&&a!==void 0||(c.update={}),t.encode[n].update[e]=o}function Av(t,n,e,o={header:!1}){var f,r;const a=t.combine(),{disable:l,orient:c,scale:i,labelExpr:s,title:u,zindex:d}=a,h=Sb(a,["disable","orient","scale","labelExpr","title","zindex"]);if(!l){for(const m in h){const g=$1e[m],p=h[m];if(g&&g!==n&&g!=="both")delete h[m];else if(fx(p)){const{condition:v}=p,y=Sb(p,["condition"]),x=ki(v),w=fP[m];if(w){const{vgProp:k,part:b}=w,T=[...x.map(_=>{const{test:S}=_,A=Sb(_,["test"]);return Object.assign({test:F2(null,S)},A)}),y];z4(h,b,k,T),delete h[m]}else if(w===null){const k={signal:x.map(b=>{const{test:T}=b,_=Sb(b,["test"]);return`${F2(null,T)} ? ${ZL(_)} : `}).join("")+ZL(y)};h[m]=k}}else if(Vi(p)){const v=fP[m];if(v){const{vgProp:y,part:x}=v;z4(h,x,y,p),delete h[m]}}Fa(["labelAlign","labelBaseline"],m)&&h[m]===null&&delete h[m]}if(n==="grid"){if(!h.grid)return;if(h.encode){const{grid:m}=h.encode;h.encode=Object.assign({},m?{grid:m}:{}),_o(h.encode)&&delete h.encode}return Object.assign(Object.assign({scale:i,orient:c},h),{domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:Rs(d,0)})}else{if(!o.header&&t.mainExtracted)return;if(s!==void 0){let g=s;((r=(f=h.encode)===null||f===void 0?void 0:f.labels)===null||r===void 0?void 0:r.update)&&Vi(h.encode.labels.update.text)&&(g=L0(s,"datum.label",h.encode.labels.update.text.signal)),z4(h,"labels","text",{signal:g})}if(h.labelAlign===null&&delete h.labelAlign,h.encode){for(const g of jV)t.hasAxisPart(g)||delete h.encode[g];_o(h.encode)&&delete h.encode}const m=dxe(u,e);return Object.assign(Object.assign(Object.assign(Object.assign({scale:i,orient:c,grid:!1},m?{title:m}:{}),h),e.aria===!1?{aria:!1}:{}),{zindex:Rs(d,0)})}}}function Wq(t){const{axes:n}=t.component,e=[];for(const o of gh)if(n[o]){for(const f of n[o])if(!f.get("disable")&&!f.get("gridScale")){const r=o==="x"?"height":"width",a=t.getSizeSignalRef(r).signal;r!==a&&e.push({name:r,update:a})}}return e}function pxe(t,n){const{x:e=[],y:o=[]}=t;return[...e.map(f=>Av(f,"grid",n)),...o.map(f=>Av(f,"grid",n)),...e.map(f=>Av(f,"main",n)),...o.map(f=>Av(f,"main",n))].filter(f=>f)}function zP(t,n,e,o){return Object.assign.apply(null,[{},...t.map(f=>{if(f==="axisOrient"){const r=e==="x"?"bottom":"left",a=n[e==="x"?"axisBottom":"axisLeft"]||{},l=n[e==="x"?"axisTop":"axisRight"]||{},c=new Set([...Xr(a),...Xr(l)]),i={};for(const s of c.values())i[s]={signal:`${o.signal} === "${r}" ? ${qh(a[s])} : ${qh(l[s])}`};return i}return n[f]})])}function gxe(t,n,e,o){const f=n==="band"?["axisDiscrete","axisBand"]:n==="point"?["axisDiscrete","axisPoint"]:dV(n)?["axisQuantitative"]:n==="time"||n==="utc"?["axisTemporal"]:[],r=t==="x"?"axisX":"axisY",a=Vi(e)?"axisOrient":`axis${ex(e)}`,l=[...f,...f.map(i=>r+i.substr(4))],c=["axis",a,r];return{vlOnlyAxisConfig:zP(l,o,t,e),vgAxisConfig:zP(c,o,t,e),axisConfigStyle:mxe([...c,...l],o)}}function mxe(t,n){var e;const o=[{}];for(const f of t){let r=(e=n[f])===null||e===void 0?void 0:e.style;if(r){r=ki(r);for(const a of r)o.push(n.style[a])}}return Object.assign.apply(null,o)}function nA(t,n,e,o={}){var f;const r=$U(t,e,n);if(r!==void 0)return{configFrom:"style",configValue:r};for(const a of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(((f=o[a])===null||f===void 0?void 0:f[t])!==void 0)return{configFrom:a,configValue:o[a][t]};return{}}const RP={scale:({model:t,channel:n})=>t.scaleName(n),format:({fieldOrDatumDef:t,config:n,axis:e})=>{const{format:o,formatType:f}=e;return AV(t,t.type,o,f,n,!0)},formatType:({axis:t,fieldOrDatumDef:n,scaleType:e})=>{const{formatType:o}=t;return MV(o,n,e)},grid:({fieldOrDatumDef:t,axis:n,scaleType:e})=>{var o;return(o=n.grid)!==null&&o!==void 0?o:vxe(e,t)},gridScale:({model:t,channel:n})=>yxe(t,n),labelAlign:({axis:t,labelAngle:n,orient:e,channel:o})=>t.labelAlign||Xq(n,e,o),labelAngle:({labelAngle:t})=>t,labelBaseline:({axis:t,labelAngle:n,orient:e,channel:o})=>t.labelBaseline||Yq(n,e,o),labelFlush:({axis:t,fieldOrDatumDef:n,channel:e})=>{var o;return(o=t.labelFlush)!==null&&o!==void 0?o:bxe(n.type,e)},labelOverlap:({axis:t,fieldOrDatumDef:n,scaleType:e})=>{var o;return(o=t.labelOverlap)!==null&&o!==void 0?o:_xe(n.type,e,ti(n)&&!!n.timeUnit,ti(n)?n.sort:void 0)},orient:({orient:t})=>t,tickCount:({channel:t,model:n,axis:e,fieldOrDatumDef:o,scaleType:f})=>{var r;const a=t==="x"?"width":t==="y"?"height":void 0,l=a?n.getSizeSignalRef(a):void 0;return(r=e.tickCount)!==null&&r!==void 0?r:kxe({fieldOrDatumDef:o,scaleType:f,size:l,values:e.values})},title:({axis:t,model:n,channel:e})=>{if(t.title!==void 0)return t.title;const o=Zq(n,e);if(o!==void 0)return o;const f=n.typedFieldDef(e),r=e==="x"?"x2":"y2",a=n.fieldDef(r);return WU(f?[cP(f)]:[],ti(a)?[cP(a)]:[])},values:({axis:t,fieldOrDatumDef:n})=>Txe(t,n),zindex:({axis:t,fieldOrDatumDef:n,mark:e})=>{var o;return(o=t.zindex)!==null&&o!==void 0?o:Axe(e,n)}};function vxe(t,n){return!ll(t)&&ti(n)&&!Bo(n?.bin)&&!xl(n?.bin)}function yxe(t,n){const e=n==="x"?"y":"x";if(t.getScaleComponent(e))return t.scaleName(e)}function xxe(t,n,e,o,f){const r=n?.labelAngle;if(r!==void 0)return Vi(r)?r:dy(r);{const{configValue:a}=nA("labelAngle",o,n?.style,f);return a!==void 0?dy(a):e===cs&&Fa([GE,$E],t.type)&&!(ti(t)&&t.timeUnit)?270:void 0}}function rA(t){return`(((${t.signal} % 360) + 360) % 360)`}function Yq(t,n,e,o){if(t!==void 0)if(e==="x"){if(Vi(t)){const f=rA(t),r=Vi(n)?`(${n.signal} === "top")`:n==="top";return{signal:`(45 < ${f} && ${f} < 135) || (225 < ${f} && ${f} < 315) ? "middle" :(${f} <= 45 || 315 <= ${f}) === ${r} ? "bottom" : "top"`}}if(45{if(!!Q0(o)&&CV(o.sort)){const{field:r,timeUnit:a}=o,l=o.sort,c=l.map((i,s)=>`${uV({field:r,timeUnit:a,equal:i})} ? ${s} : `).join("")+l.length;n=new Im(n,{calculate:c,as:zm(o,f,{forAs:!0})})}}),n}producedFields(){return new Set([this.transform.as])}dependentFields(){return this._dependentFields}assemble(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}hash(){return`Calculate ${Ba(this.transform)}`}}function zm(t,n,e){return hi(t,Object.assign({prefix:n,suffix:"sort_index"},e??{}))}function S3(t,n){return Fa(["top","bottom"],n)?"column":Fa(["left","right"],n)||t==="row"?"row":"column"}function Rm(t,n,e,o){const f=o==="row"?e.headerRow:o==="column"?e.headerColumn:e.headerFacet;return Rs((n||{})[t],f[t],e.header[t])}function E3(t,n,e,o){const f={};for(const r of t){const a=Rm(r,n||{},e,o);a!==void 0&&(f[r]=a)}return f}const T8=["row","column"],A8=["header","footer"];function Mxe(t,n){const e=t.component.layoutHeaders[n].title,o=t.config?t.config:void 0,f=t.component.layoutHeaders[n].facetFieldDef?t.component.layoutHeaders[n].facetFieldDef:void 0,{titleAnchor:r,titleAngle:a,titleOrient:l}=E3(["titleAnchor","titleAngle","titleOrient"],f.header,o,n),c=S3(n,l),i=dy(a);return{name:`${n}-title`,type:"group",role:`${c}-title`,title:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:e},n==="row"?{orient:"left"}:{}),{style:"guide-title"}),Kq(i,c)),Jq(c,i,r)),Qq(o,f,n,pve,rq))}}function Jq(t,n,e="middle"){switch(e){case"start":return{align:"left"};case"end":return{align:"right"}}const o=Xq(n,t==="row"?"left":"top",t==="row"?"y":"x");return o?{align:o}:{}}function Kq(t,n){const e=Yq(t,n==="row"?"left":"top",n==="row"?"y":"x",!0);return e?{baseline:e}:{}}function Sxe(t,n){const e=t.component.layoutHeaders[n],o=[];for(const f of A8)if(e[f])for(const r of e[f]){const a=Cxe(t,n,f,e,r);a!=null&&o.push(a)}return o}function Exe(t,n){var e;const{sort:o}=t;return $f(o)?{field:hi(o,{expr:"datum"}),order:(e=o.order)!==null&&e!==void 0?e:"ascending"}:Ir(o)?{field:zm(t,n,{expr:"datum"}),order:"ascending"}:{field:hi(t,{expr:"datum"}),order:o??"ascending"}}function iA(t,n,e){const{format:o,formatType:f,labelAngle:r,labelAnchor:a,labelOrient:l,labelExpr:c}=E3(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],t.header,e,n),i=QE({fieldOrDatumDef:t,format:o,formatType:f,expr:"parent",config:e}).signal,s=S3(n,l);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:{signal:c?L0(L0(c,"datum.label",i),"datum.value",hi(t,{expr:"parent"})):i}},n==="row"?{orient:"left"}:{}),{style:"guide-label",frame:"group"}),Kq(r,s)),Jq(s,r,a)),Qq(e,t,n,gve,iq))}function Cxe(t,n,e,o,f){if(f){let r=null;const{facetFieldDef:a}=o,l=t.config?t.config:void 0;if(a&&f.labels){const{labelOrient:u}=E3(["labelOrient"],a.header,l,n);(n==="row"&&!Fa(["top","bottom"],u)||n==="column"&&!Fa(["left","right"],u))&&(r=iA(a,n,l))}const c=lf(t)&&!lx(t.facet),i=f.axes,s=i?.length>0;if(r||s){const u=n==="row"?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:t.getName(`${n}_${e}`),type:"group",role:`${n}-${e}`},o.facetFieldDef?{from:{data:t.getName(`${n}_domain`)},sort:Exe(a,n)}:{}),s&&c?{from:{data:t.getName(`facet_domain_${n}`)}}:{}),r?{title:r}:{}),f.sizeSignal?{encode:{update:{[u]:f.sizeSignal}}}:{}),s?{axes:i}:{})}}return null}const Oxe={column:{start:0,end:1},row:{start:1,end:0}};function Lxe(t,n){return Oxe[n][t]}function Pxe(t,n){const e={};for(const o of dc){const f=t[o];if(f?.facetFieldDef){const{titleAnchor:r,titleOrient:a}=E3(["titleAnchor","titleOrient"],f.facetFieldDef.header,n,o),l=S3(o,a),c=Lxe(r,l);c!==void 0&&(e[l]=c)}}return _o(e)?void 0:e}function Qq(t,n,e,o,f){const r={};for(const a of o){if(!f[a])continue;const l=Rm(a,n?.header,t,e);l!==void 0&&(r[f[a]]=l)}return r}function M8(t){return[...Eb(t,"width"),...Eb(t,"height"),...Eb(t,"childWidth"),...Eb(t,"childHeight")]}function Eb(t,n){const e=n==="width"?"x":"y",o=t.component.layoutSize.get(n);if(!o||o==="merged")return[];const f=t.getSizeSignalRef(n).signal;if(o==="step"){const r=t.getScaleComponent(e);if(r){const a=r.get("type"),l=r.get("range");if(ll(a)&&kp(l)){const c=t.scaleName(e);return lf(t.parent)&&t.parent.component.resolve.scale[e]==="independent"?[FP(c,l)]:[FP(c,l),{name:f,update:eH(c,r,`domain('${c}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}else if(o=="container"){const r=f.endsWith("width"),a=r?"containerSize()[0]":"containerSize()[1]",l=YT(t.config.view,r?"width":"height"),c=`isFinite(${a}) ? ${a} : ${l}`;return[{name:f,init:c,on:[{update:c,events:"window:resize"}]}]}else return[{name:f,value:o}]}function FP(t,n){const e=`${t}_step`;return Vi(n.step)?{name:e,update:n.step.signal}:{name:e,value:n.step}}function eH(t,n,e){const o=n.get("type"),f=n.get("padding"),r=Rs(n.get("paddingOuter"),f);let a=n.get("paddingInner");return a=o==="band"?a!==void 0?a:f:1,`bandspace(${e}, ${qh(a)}, ${qh(r)}) * ${t}_step`}function tH(t){return t==="childWidth"?"width":t==="childHeight"?"height":t}function nH(t,n){return Xr(t).reduce((e,o)=>{const f=t[o];return Object.assign(Object.assign({},e),n1(n,f,o,r=>Ho(r.value)))},{})}function rH(t,n){if(lf(n))return t==="theta"?"independent":"shared";if(o1(n))return"shared";if(D8(n))return sl(t)||t==="theta"||t==="radius"?"independent":"shared";throw new Error("invalid model type for resolve")}function S8(t,n){const e=t.scale[n],o=sl(n)?"axis":"legend";return e==="independent"?(t[o][n]==="shared"&&Kr(fme(n)),"independent"):t[o][n]||"shared"}const Dxe=Object.assign(Object.assign({},yve),{disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1}),iH=Xr(Dxe);class Ixe extends rd{}const NP={symbols:zxe,gradient:Rxe,labels:Fxe,entries:Nxe};function zxe(t,{fieldOrDatumDef:n,model:e,channel:o,legendCmpt:f,legendType:r}){var a,l,c,i,s,u,d,h;if(r!=="symbol")return;const{markDef:m,encoding:g,config:p,mark:v}=e,y=m.filled&&v!=="trail";let x=Object.assign(Object.assign({},_ge({},e,p1e)),Oq(e,{filled:y}));const w=(a=f.get("symbolOpacity"))!==null&&a!==void 0?a:p.legend.symbolOpacity,k=(l=f.get("symbolFillColor"))!==null&&l!==void 0?l:p.legend.symbolFillColor,b=(c=f.get("symbolStrokeColor"))!==null&&c!==void 0?c:p.legend.symbolStrokeColor,T=w===void 0?(i=aH(g.opacity))!==null&&i!==void 0?i:m.opacity:void 0;if(x.fill){if(o==="fill"||y&&o===zu)delete x.fill;else if(x.fill.field)k?delete x.fill:(x.fill=Ho((s=p.legend.symbolBaseFillColor)!==null&&s!==void 0?s:"black"),x.fillOpacity=Ho(T??1));else if(Ir(x.fill)){const _=(h=(d=aA((u=g.fill)!==null&&u!==void 0?u:g.color))!==null&&d!==void 0?d:m.fill)!==null&&h!==void 0?h:y&&m.color;_&&(x.fill=Ho(_))}}if(x.stroke){if(o==="stroke"||!y&&o===zu)delete x.stroke;else if(x.stroke.field||b)delete x.stroke;else if(Ir(x.stroke)){const _=Rs(aA(g.stroke||g.color),m.stroke,y?m.color:void 0);_&&(x.stroke={value:_})}}if(o!==td){const _=ti(n)&&sH(e,f,n);_?x.opacity=[Object.assign({test:_},Ho(T??1)),Ho(p.legend.unselectedOpacity)]:T&&(x.opacity=Ho(T))}return x=Object.assign(Object.assign({},x),t),_o(x)?void 0:x}function Rxe(t,{model:n,legendType:e,legendCmpt:o}){var f;if(e!=="gradient")return;const{config:r,markDef:a,encoding:l}=n;let c={};const s=((f=o.get("gradientOpacity"))!==null&&f!==void 0?f:r.legend.gradientOpacity)===void 0?aH(l.opacity)||a.opacity:void 0;return s&&(c.opacity=Ho(s)),c=Object.assign(Object.assign({},c),t),_o(c)?void 0:c}function Fxe(t,{fieldOrDatumDef:n,model:e,channel:o,legendCmpt:f}){const r=e.legend(o)||{},a=e.config,l=ti(n)?sH(e,f,n):void 0,c=l?[{test:l,value:1},{value:a.legend.unselectedOpacity}]:void 0,{format:i,formatType:s}=r;let u;R0(s)?u=rf({fieldOrDatumDef:n,field:"datum.value",format:i,formatType:s,config:a}):i===void 0&&s===void 0&&a.customFormatTypes&&(n.type==="quantitative"&&a.numberFormatType?u=rf({fieldOrDatumDef:n,field:"datum.value",format:a.numberFormat,formatType:a.numberFormatType,config:a}):n.type==="temporal"&&a.timeFormatType&&ti(n)&&n.timeUnit===void 0&&(u=rf({fieldOrDatumDef:n,field:"datum.value",format:a.timeFormat,formatType:a.timeFormatType,config:a})));const d=Object.assign(Object.assign(Object.assign({},c?{opacity:c}:{}),u?{text:u}:{}),t);return _o(d)?void 0:d}function Nxe(t,{legendCmpt:n}){const e=n.get("selections");return e?.length?Object.assign(Object.assign({},t),{fill:{value:"transparent"}}):t}function aH(t){return oH(t,(n,e)=>Math.max(n,e.value))}function aA(t){return oH(t,(n,e)=>Rs(n,e.value))}function oH(t,n){if(D1e(t))return ki(t.condition).reduce(n,t.value);if(hf(t))return t.value}function sH(t,n,e){const o=n.get("selections");if(!o?.length)return;const f=oi(e.field);return o.map(r=>`(!length(data(${oi(Xo(r)+N0)})) || (${r}[${f}] && indexof(${r}[${f}], datum.value) >= 0))`).join(" || ")}const BP={direction:({direction:t})=>t,format:({fieldOrDatumDef:t,legend:n,config:e})=>{const{format:o,formatType:f}=n;return AV(t,t.type,o,f,e,!1)},formatType:({legend:t,fieldOrDatumDef:n,scaleType:e})=>{const{formatType:o}=t;return MV(o,n,e)},gradientLength:t=>{var n,e;const{legend:o,legendConfig:f}=t;return(e=(n=o.gradientLength)!==null&&n!==void 0?n:f.gradientLength)!==null&&e!==void 0?e:$xe(t)},labelOverlap:({legend:t,legendConfig:n,scaleType:e})=>{var o,f;return(f=(o=t.labelOverlap)!==null&&o!==void 0?o:n.labelOverlap)!==null&&f!==void 0?f:Gxe(e)},symbolType:({legend:t,markDef:n,channel:e,encoding:o})=>{var f;return(f=t.symbolType)!==null&&f!==void 0?f:jxe(n.type,e,o.shape,n.shape)},title:({fieldOrDatumDef:t,config:n})=>im(t,n,{allowDisabling:!0}),type:({legendType:t,scaleType:n,channel:e})=>{if(rm(e)&&nf(n)){if(t==="gradient")return}else if(t==="symbol")return;return t},values:({fieldOrDatumDef:t,legend:n})=>Bxe(n,t)};function Bxe(t,n){const e=t.values;if(Ir(e))return BV(n,e);if(Vi(e))return e}function jxe(t,n,e,o){var f;if(n!=="shape"){const r=(f=aA(e))!==null&&f!==void 0?f:o;if(r)return r}switch(t){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}function Uxe(t){const{legend:n}=t;return Rs(n.type,Vxe(t))}function Vxe({channel:t,timeUnit:n,scaleType:e}){if(rm(t)){if(Fa(["quarter","month","day"],n))return"symbol";if(nf(e))return"gradient"}return"symbol"}function qxe({legendConfig:t,legendType:n,orient:e,legend:o}){var f,r;return(r=(f=o.direction)!==null&&f!==void 0?f:t[n?"gradientDirection":"symbolDirection"])!==null&&r!==void 0?r:Hxe(e,n)}function Hxe(t,n){switch(t){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return n==="gradient"?"horizontal":void 0}}function $xe({legendConfig:t,model:n,direction:e,orient:o,scaleType:f}){const{gradientHorizontalMaxLength:r,gradientHorizontalMinLength:a,gradientVerticalMaxLength:l,gradientVerticalMinLength:c}=t;if(nf(f))return e==="horizontal"?o==="top"||o==="bottom"?jP(n,"width",a,r):a:jP(n,"height",c,l)}function jP(t,n,e,o){return{signal:`clamp(${t.getSizeSignalRef(n).signal}, ${e}, ${o})`}}function Gxe(t){if(Fa(["quantile","threshold","log","symlog"],t))return"greedy"}function lH(t){const n=Is(t)?Wxe(t):Jxe(t);return t.component.legends=n,n}function Wxe(t){const{encoding:n}=t,e={};for(const o of[zu,...oq]){const f=Ws(n[o]);!f||!t.getScaleComponent(o)||o===Ru&&ti(f)&&f.type===t1||(e[o]=Zxe(t,o))}return e}function Yxe(t,n){const e=t.scaleName(n);if(t.mark==="trail"){if(n==="color")return{stroke:e};if(n==="size")return{strokeWidth:e}}return n==="color"?t.markDef.filled?{fill:e}:{stroke:e}:{[n]:e}}function Xxe(t,n,e,o){switch(n){case"disable":return e!==void 0;case"values":return!!e?.values;case"title":if(n==="title"&&t===o?.title)return!0}return t===(e||{})[n]}function Zxe(t,n){var e,o,f;let r=t.legend(n);const{markDef:a,encoding:l,config:c}=t,i=c.legend,s=new Ixe({},Yxe(t,n));oxe(t,n,s);const u=r!==void 0?!r:i.disable;if(s.set("disable",u,r!==void 0),u)return s;r=r||{};const d=t.getScaleComponent(n).get("type"),h=Ws(l[n]),m=ti(h)?(e=Gl(h.timeUnit))===null||e===void 0?void 0:e.unit:void 0,g=r.orient||c.legend.orient||"right",p=Uxe({legend:r,channel:n,timeUnit:m,scaleType:d}),v=qxe({legend:r,legendType:p,orient:g,legendConfig:i}),y={legend:r,channel:n,model:t,markDef:a,encoding:l,fieldOrDatumDef:h,legendConfig:i,config:c,scaleType:d,orient:g,legendType:p,direction:v};for(const T of iH){if(p==="gradient"&&T.startsWith("symbol")||p==="symbol"&&T.startsWith("gradient"))continue;const _=T in BP?BP[T](y):r[T];if(_!==void 0){const S=Xxe(_,T,r,t.fieldDef(n));(S||c.legend[T]===void 0)&&s.set(T,_,S)}}const x=(o=r?.encoding)!==null&&o!==void 0?o:{},w=s.get("selections"),k={},b={fieldOrDatumDef:h,model:t,channel:n,legendCmpt:s,legendType:p};for(const T of["labels","legend","title","symbols","gradient","entries"]){const _=nH((f=x[T])!==null&&f!==void 0?f:{},t),S=T in NP?NP[T](_,b):_;S!==void 0&&!_o(S)&&(k[T]=Object.assign(Object.assign(Object.assign({},w?.length&&ti(h)?{name:`${Xo(h.field)}_legend_${T}`}:{}),w?.length?{interactive:!!w}:{}),{update:S}))}return _o(k)||s.set("encode",k,!!r?.encoding),s}function Jxe(t){const{legends:n,resolve:e}=t.component;for(const o of t.children){lH(o);for(const f of Xr(o.component.legends))e.legend[f]=S8(t.component.resolve,f),e.legend[f]==="shared"&&(n[f]=uH(n[f],o.component.legends[f]),n[f]||(e.legend[f]="independent",delete n[f]))}for(const o of Xr(n))for(const f of t.children)!f.component.legends[o]||e.legend[o]==="shared"&&delete f.component.legends[o];return n}function uH(t,n){var e,o,f,r;if(!t)return n.clone();const a=t.getWithExplicit("orient"),l=n.getWithExplicit("orient");if(a.explicit&&l.explicit&&a.value!==l.value)return;let c=!1;for(const i of iH){const s=op(t.getWithExplicit(i),n.getWithExplicit(i),i,"legend",(u,d)=>{switch(i){case"symbolType":return Kxe(u,d);case"title":return XU(u,d);case"type":return c=!0,Gu("symbol")}return T3(u,d,i,"legend")});t.setWithExplicit(i,s)}return c&&(!((o=(e=t.implicit)===null||e===void 0?void 0:e.encode)===null||o===void 0)&&o.gradient&&T2(t.implicit,["encode","gradient"]),!((r=(f=t.explicit)===null||f===void 0?void 0:f.encode)===null||r===void 0)&&r.gradient&&T2(t.explicit,["encode","gradient"])),t}function Kxe(t,n){return n.value==="circle"?n:t}var Qxe=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);ftbe(f,t.config)).filter(f=>f!==void 0)}function tbe(t,n){var e,o,f;const r=t.combine(),{disable:a,labelExpr:l,selections:c}=r,i=Qxe(r,["disable","labelExpr","selections"]);if(!a){if(n.aria===!1&&i.aria==null&&(i.aria=!1),!((e=i.encode)===null||e===void 0)&&e.symbols){const s=i.encode.symbols.update;s.fill&&s.fill.value!=="transparent"&&!s.stroke&&!i.stroke&&(s.stroke={value:"transparent"});for(const u of oq)i[u]&&delete s[u]}if(i.title||delete i.title,l!==void 0){let s=l;((f=(o=i.encode)===null||o===void 0?void 0:o.labels)===null||f===void 0?void 0:f.update)&&Vi(i.encode.labels.update.text)&&(s=L0(l,"datum.label",i.encode.labels.update.text.signal)),ebe(i,"labels","text",{signal:s})}return i}}function nbe(t){return o1(t)||D8(t)?rbe(t):fH(t)}function rbe(t){return t.children.reduce((n,e)=>n.concat(e.assembleProjections()),fH(t))}function fH(t){const n=t.component.projection;if(!n||n.merged)return[];const e=n.combine(),{name:o}=e;if(n.data){const f={signal:`[${n.size.map(a=>a.signal).join(", ")}]`},r=n.data.reduce((a,l)=>{const c=Vi(l)?l.signal:`data('${t.lookupDataSource(l)}')`;return Fa(a,c)||a.push(c),a},[]);if(r.length<=0)throw new Error("Projection's fit didn't find any data sources");return[Object.assign({name:o,size:f,fit:{signal:r.length>1?`[${r.join(", ")}]`:r[0]}},e)]}else return[Object.assign(Object.assign({name:o},{translate:{signal:"[width / 2, height / 2]"}}),e)]}const ibe=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class hH extends rd{constructor(n,e,o,f){super(Object.assign({},e),{name:n}),this.specifiedProjection=e,this.size=o,this.data=f,this.merged=!1}get isFit(){return!!this.data}}function dH(t){t.component.projection=Is(t)?abe(t):lbe(t)}function abe(t){var n;if(t.hasProjection){const e=ku(t.specifiedProjection),o=!(e&&(e.scale!=null||e.translate!=null)),f=o?[t.getSizeSignalRef("width"),t.getSizeSignalRef("height")]:void 0,r=o?obe(t):void 0,a=new hH(t.projectionName(!0),Object.assign(Object.assign({},(n=ku(t.config.projection))!==null&&n!==void 0?n:{}),e??{}),f,r);return a.get("type")||a.set("type","equalEarth",!1),a}}function obe(t){const n=[],{encoding:e}=t;for(const o of[[fh,ch],[_c,yf]])(Ws(e[o[0]])||Ws(e[o[1]]))&&n.push({signal:t.getName(`geojson_${n.length}`)});return t.channelHasField(Ru)&&t.typedFieldDef(Ru).type===t1&&n.push({signal:t.getName(`geojson_${n.length}`)}),n.length===0&&n.push(t.requestDataName(Fo.Main)),n}function sbe(t,n){const e=yE(ibe,f=>!!(!qi(t.explicit,f)&&!qi(n.explicit,f)||qi(t.explicit,f)&&qi(n.explicit,f)&&Ff(t.get(f),n.get(f))));if(Ff(t.size,n.size)){if(e)return t;if(Ff(t.explicit,{}))return n;if(Ff(n.explicit,{}))return t}return null}function lbe(t){if(t.children.length===0)return;let n;for(const o of t.children)dH(o);const e=yE(t.children,o=>{const f=o.component.projection;if(f)if(n){const r=sbe(n,f);return r&&(n=r),!!r}else return n=f,!0;else return!0});if(n&&e){const o=t.projectionName(!0),f=new hH(o,n.specifiedProjection,n.size,ha(n.data));for(const r of t.children){const a=r.component.projection;a&&(a.isFit&&f.data.push(...r.component.projection.data),r.renameProjection(a.get("name"),o),a.merged=!0)}return f}}var ube=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{if(wc(r)&&Bo(r.bin)){const{key:l,binComponent:c}=UP(r,r.bin,e);f[l]=Object.assign(Object.assign(Object.assign({},c),f[l]),cbe(e,r,a,e.config))}return f},{});return _o(o)?null:new Wf(n,o)}static makeFromTransform(n,e,o){const{key:f,binComponent:r}=UP(e,e.bin,o);return new Wf(n,{[f]:r})}merge(n,e){for(const o of Xr(n.bins))o in this.bins?(e(n.bins[o].signal,this.bins[o].signal),this.bins[o].as=Nf([...this.bins[o].as,...n.bins[o].as],Ba)):this.bins[o]=n.bins[o];for(const o of n.children)n.removeChild(o),o.parent=this;n.remove()}producedFields(){return new Set(ql(this.bins).map(n=>n.as).flat(2))}dependentFields(){return new Set(ql(this.bins).map(n=>n.field))}hash(){return`Bin ${Ba(this.bins)}`}assemble(){return ql(this.bins).flatMap(n=>{const e=[],[o,...f]=n.as,r=n.bin,{extent:a}=r,l=ube(r,["extent"]),c=Object.assign(Object.assign(Object.assign({type:"bin",field:bc(n.field),as:o,signal:n.signal},l3(a)?{extent:null}:{extent:a}),n.span?{span:{signal:`span(${n.span})`}}:{}),l);!a&&n.extentSignal&&(e.push({type:"extent",field:bc(n.field),signal:n.extentSignal}),c.extent={signal:n.extentSignal}),e.push(c);for(const i of f)for(let s=0;s<2;s++)e.push({type:"formula",expr:hi({field:o[s]},{expr:"datum"}),as:i[s]});return n.formula&&e.push({type:"formula",expr:n.formula,as:n.formulaAs}),e})}}function dbe(t,n,e,o){var f;const r=Is(o)?o.encoding[ph(n)]:void 0;if(wc(e)&&Is(o)&&PV(e,r,o.markDef,o.config))t.add(hi(e,{})),t.add(hi(e,{suffix:"end"})),e.bin&&cx(e,n)&&t.add(hi(e,{binSuffix:"range"}));else if($0e(n)){const a=H0e(n);t.add(o.getName(a))}else t.add(hi(e));return Q0(e)&&n1e((f=e.scale)===null||f===void 0?void 0:f.range)&&t.add(e.scale.range.field),t}function pbe(t,n){var e;for(const o of Xr(n)){const f=n[o];for(const r of Xr(f))o in t?t[o][r]=new Set([...(e=t[o][r])!==null&&e!==void 0?e:[],...f[r]]):t[o]={[r]:f[r]}}}class sf extends To{constructor(n,e,o){super(n),this.dimensions=e,this.measures=o}clone(){return new sf(null,new Set(this.dimensions),ha(this.measures))}get groupBy(){return this.dimensions}static makeFromEncoding(n,e){let o=!1;e.forEachFieldDef(a=>{a.aggregate&&(o=!0)});const f={},r=new Set;return!o||(e.forEachFieldDef((a,l)=>{var c,i,s,u;const{aggregate:d,field:h}=a;if(d)if(d==="count")(c=f["*"])!==null&&c!==void 0||(f["*"]={}),f["*"].count=new Set([hi(a,{forAs:!0})]);else{if(Wh(d)||wp(d)){const m=Wh(d)?"argmin":"argmax",g=d[m];(i=f[g])!==null&&i!==void 0||(f[g]={}),f[g][m]=new Set([hi({op:m,field:g},{forAs:!0})])}else(s=f[h])!==null&&s!==void 0||(f[h]={}),f[h][d]=new Set([hi(a,{forAs:!0})]);_p(l)&&e.scaleDomain(l)==="unaggregated"&&((u=f[h])!==null&&u!==void 0||(f[h]={}),f[h].min=new Set([hi({field:h,aggregate:"min"},{forAs:!0})]),f[h].max=new Set([hi({field:h,aggregate:"max"},{forAs:!0})]))}else dbe(r,l,a,e)}),r.size+Xr(f).length===0)?null:new sf(n,r,f)}static makeFromTransform(n,e){var o,f,r;const a=new Set,l={};for(const c of e.aggregate){const{op:i,field:s,as:u}=c;i&&(i==="count"?((o=l["*"])!==null&&o!==void 0||(l["*"]={}),l["*"].count=new Set([u||hi(c,{forAs:!0})])):((f=l[s])!==null&&f!==void 0||(l[s]={}),l[s][i]=new Set([u||hi(c,{forAs:!0})])))}for(const c of(r=e.groupby)!==null&&r!==void 0?r:[])a.add(c);return a.size+Xr(l).length===0?null:new sf(n,a,l)}merge(n){return kU(this.dimensions,n.dimensions)?(pbe(this.measures,n.measures),!0):(Sme("different dimensions, cannot merge"),!1)}addDimensions(n){n.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...Xr(this.measures)])}producedFields(){const n=new Set;for(const e of Xr(this.measures))for(const o of Xr(this.measures[e])){const f=this.measures[e][o];f.size===0?n.add(`${o}_${e}`):f.forEach(n.add,n)}return n}hash(){return`Aggregate ${Ba({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const n=[],e=[],o=[];for(const r of Xr(this.measures))for(const a of Xr(this.measures[r]))for(const l of this.measures[r][a])o.push(l),n.push(a),e.push(r==="*"?null:bc(r));return{type:"aggregate",groupby:[...this.dimensions].map(bc),ops:n,fields:e,as:o}}}class i1 extends To{constructor(n,e,o,f){super(n),this.model=e,this.name=o,this.data=f;for(const r of dc){const a=e.facet[r];if(a){const{bin:l,sort:c}=a;this[r]=Object.assign({name:e.getName(`${r}_domain`),fields:[hi(a),...Bo(l)?[hi(a,{binSuffix:"end"})]:[]]},$f(c)?{sortField:c}:Ir(c)?{sortIndexField:zm(a,r)}:{})}}this.childModel=e.child}hash(){let n="Facet";for(const e of dc)this[e]&&(n+=` ${e.charAt(0)}:${Ba(this[e])}`);return n}get fields(){var n;const e=[];for(const o of dc)!((n=this[o])===null||n===void 0)&&n.fields&&e.push(...this[o].fields);return e}dependentFields(){const n=new Set(this.fields);for(const e of dc)this[e]&&(this[e].sortField&&n.add(this[e].sortField.field),this[e].sortIndexField&&n.add(this[e].sortIndexField));return n}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const n={};for(const e of gh){const o=this.childModel.component.scales[e];if(o&&!o.merged){const f=o.get("type"),r=o.get("range");if(ll(f)&&kp(r)){const a=C3(this.childModel,e),l=P8(a);l?n[e]=l:Kr(PE(e))}}}return n}assembleRowColumnHeaderData(n,e,o){const f={row:"y",column:"x",facet:void 0}[n],r=[],a=[],l=[];f&&o&&o[f]&&(e?(r.push(`distinct_${o[f]}`),a.push("max")):(r.push(o[f]),a.push("distinct")),l.push(`distinct_${o[f]}`));const{sortField:c,sortIndexField:i}=this[n];if(c){const{op:s=p3,field:u}=c;r.push(u),a.push(s),l.push(hi(c,{forAs:!0}))}else i&&(r.push(i),a.push("max"),l.push(i));return{name:this[n].name,source:e??this.data,transform:[Object.assign({type:"aggregate",groupby:this[n].fields},r.length?{fields:r,ops:a,as:l}:{})]}}assembleFacetHeaderData(n){var e,o;const{columns:f}=this.model.layout,{layoutHeaders:r}=this.model.component,a=[],l={};for(const s of T8){for(const u of A8){const d=(e=r[s]&&r[s][u])!==null&&e!==void 0?e:[];for(const h of d)if(((o=h.axes)===null||o===void 0?void 0:o.length)>0){l[s]=!0;break}}if(l[s]){const u=`length(data("${this.facet.name}"))`,d=s==="row"?f?{signal:`ceil(${u} / ${f})`}:1:f?{signal:`min(${u}, ${f})`}:{signal:u};a.push({name:`${this.facet.name}_${s}`,transform:[{type:"sequence",start:0,stop:d}]})}}const{row:c,column:i}=l;return(c||i)&&a.unshift(this.assembleRowColumnHeaderData("facet",null,n)),a}assemble(){var n,e;const o=[];let f=null;const r=this.getChildIndependentFieldsWithStep(),{column:a,row:l,facet:c}=this;if(a&&l&&(r.x||r.y)){f=`cross_${this.column.name}_${this.row.name}`;const i=[].concat((n=r.x)!==null&&n!==void 0?n:[],(e=r.y)!==null&&e!==void 0?e:[]),s=i.map(()=>"distinct");o.push({name:f,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:i,ops:s}]})}for(const i of[Vh,Uh])this[i]&&o.push(this.assembleRowColumnHeaderData(i,f,r));if(c){const i=this.assembleFacetHeaderData(r);i&&o.push(...i)}return o}}function VP(t){return t.startsWith("'")&&t.endsWith("'")||t.startsWith('"')&&t.endsWith('"')?t.slice(1,-1):t}function gbe(t,n){const e=_E(t);if(n==="number")return`toNumber(${e})`;if(n==="boolean")return`toBoolean(${e})`;if(n==="string")return`toString(${e})`;if(n==="date")return`toDate(${e})`;if(n==="flatten")return e;if(n.startsWith("date:")){const o=VP(n.slice(5,n.length));return`timeParse(${e},'${o}')`}else if(n.startsWith("utc:")){const o=VP(n.slice(4,n.length));return`utcParse(${e},'${o}')`}else return Kr(Ige(n)),null}function mbe(t){const n={};return u_(t.filter,e=>{var o;if(lV(e)){let f=null;FE(e)?f=Xu(e.equal):BE(e)?f=Xu(e.lte):NE(e)?f=Xu(e.lt):jE(e)?f=Xu(e.gt):UE(e)?f=Xu(e.gte):VE(e)?f=e.range[0]:qE(e)&&(f=((o=e.oneOf)!==null&&o!==void 0?o:e.in)[0]),f&&(K0(f)?n[e.field]="date":wo(f)?n[e.field]="number":bi(f)&&(n[e.field]="string")),e.timeUnit&&(n[e.field]="date")}}),n}function vbe(t){const n={};function e(o){Lm(o)?n[o.field]="date":o.type==="quantitative"&&fge(o.aggregate)?n[o.field]="number":Am(o.field)>1?o.field in n||(n[o.field]="flatten"):Q0(o)&&$f(o.sort)&&Am(o.sort.field)>1&&(o.sort.field in n||(n[o.sort.field]="flatten"))}if((Is(t)||lf(t))&&t.forEachFieldDef((o,f)=>{if(wc(o))e(o);else{const r=Z0(f),a=t.fieldDef(r);e(Object.assign(Object.assign({},o),{type:a.type}))}}),Is(t)){const{mark:o,markDef:f,encoding:r}=t;if(Tp(o)&&!t.encoding.order){const a=f.orient==="horizontal"?"y":"x",l=r[a];ti(l)&&l.type==="quantitative"&&!(l.field in n)&&(n[l.field]="number")}}return n}function ybe(t){const n={};if(Is(t)&&t.component.selection)for(const e of Xr(t.component.selection)){const o=t.component.selection[e];for(const f of o.project.items)!f.channel&&Am(f.field)>1&&(n[f.field]="flatten")}return n}class Nl extends To{constructor(n,e){super(n),this._parse=e}clone(){return new Nl(null,ha(this._parse))}hash(){return`Parse ${Ba(this._parse)}`}static makeExplicit(n,e,o){var f;let r={};const a=e.data;return!Gd(a)&&((f=a?.format)===null||f===void 0?void 0:f.parse)&&(r=a.format.parse),this.makeWithAncestors(n,r,{},o)}static makeWithAncestors(n,e,o,f){for(const l of Xr(o)){const c=f.getWithExplicit(l);c.value!==void 0&&(c.explicit||c.value===o[l]||c.value==="derived"||o[l]==="flatten"?delete o[l]:Kr(nP(l,o[l],c.value)))}for(const l of Xr(e)){const c=f.get(l);c!==void 0&&(c===e[l]?delete e[l]:Kr(nP(l,e[l],c)))}const r=new rd(e,o);f.copyAll(r);const a={};for(const l of Xr(r.combine())){const c=r.get(l);c!==null&&(a[l]=c)}return Xr(a).length===0||f.parseNothing?null:new Nl(n,a)}get parse(){return this._parse}merge(n){this._parse=Object.assign(Object.assign({},this._parse),n.parse),n.remove()}assembleFormatParse(){const n={};for(const e of Xr(this._parse)){const o=this._parse[e];Am(e)===1&&(n[e]=o)}return n}producedFields(){return new Set(Xr(this._parse))}dependentFields(){return new Set(Xr(this._parse))}assembleTransforms(n=!1){return Xr(this._parse).filter(e=>n?Am(e)>1:!0).map(e=>{const o=gbe(e,this._parse[e]);return o?{type:"formula",expr:o,as:wE(e)}:null}).filter(e=>e!==null)}}class cp extends To{clone(){return new cp(null)}constructor(n){super(n)}dependentFields(){return new Set}producedFields(){return new Set([nh])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:nh}}}class dx extends To{constructor(n,e){super(n),this.params=e}clone(){return new dx(null,this.params)}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${Ba(this.params)}`}assemble(){return Object.assign({type:"graticule"},this.params===!0?{}:this.params)}}class px extends To{constructor(n,e){super(n),this.params=e}clone(){return new px(null,this.params)}dependentFields(){return new Set}producedFields(){var n;return new Set([(n=this.params.as)!==null&&n!==void 0?n:"data"])}hash(){return`Hash ${Ba(this.params)}`}assemble(){return Object.assign({type:"sequence"},this.params)}}class B0 extends To{constructor(n){super(null),n??(n={name:"source"});let e;if(Gd(n)||(e=n.format?Object.assign({},Eu(n.format,["parse"])):{}),gy(n))this._data={values:n.values};else if(Pm(n)){if(this._data={url:n.url},!e.type){let o=/(?:\.([^.]+))?$/.exec(n.url)[1];Fa(["json","csv","tsv","dsv","topojson"],o)||(o="json"),e.type=o}}else Aq(n)?this._data={values:[{type:"Sphere"}]}:(kq(n)||Gd(n))&&(this._data={});this._generator=Gd(n),n.name&&(this._name=n.name),e&&!_o(e)&&(this._data.format=e)}dependentFields(){return new Set}producedFields(){}get data(){return this._data}hasName(){return!!this._name}get isGenerator(){return this._generator}get dataName(){return this._name}set dataName(n){this._name=n}set parent(n){throw new Error("Source nodes have to be roots.")}remove(){throw new Error("Source nodes are roots and cannot be removed.")}hash(){throw new Error("Cannot hash sources")}assemble(){return Object.assign(Object.assign({name:this._name},this._data),{transform:[]})}}var qP=globalThis&&globalThis.__classPrivateFieldSet||function(t,n,e,o,f){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!f)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?t!==n||!f:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?f.call(t,e):f?f.value=e:n.set(t,e),e},xbe=globalThis&&globalThis.__classPrivateFieldGet||function(t,n,e,o){if(e==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?t!==n||!o:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?o:e==="a"?o.call(t):o?o.value:n.get(t)},Mv;function C8(t){return t instanceof B0||t instanceof dx||t instanceof px}class O8{constructor(){Mv.set(this,void 0),qP(this,Mv,!1,"f")}setModified(){qP(this,Mv,!0,"f")}get modifiedFlag(){return xbe(this,Mv,"f")}}Mv=new WeakMap;class eg extends O8{getNodeDepths(n,e,o){o.set(n,e);for(const f of n.children)this.getNodeDepths(f,e+1,o);return o}optimize(n){const o=[...this.getNodeDepths(n,0,new Map).entries()].sort((f,r)=>r[1]-f[1]);for(const f of o)this.run(f[0]);return this.modifiedFlag}}class L8 extends O8{optimize(n){this.run(n);for(const e of n.children)this.optimize(e);return this.modifiedFlag}}class bbe extends L8{mergeNodes(n,e){const o=e.shift();for(const f of e)n.removeChild(f),f.parent=o,f.remove()}run(n){const e=n.children.map(f=>f.hash()),o={};for(let f=0;f1&&(this.setModified(),this.mergeNodes(n,o[f]))}}class _be extends L8{constructor(n){super(),this.requiresSelectionId=n&&k8(n)}run(n){n instanceof cp&&(this.requiresSelectionId&&(C8(n.parent)||n.parent instanceof sf||n.parent instanceof Nl)||(this.setModified(),n.remove()))}}class wbe extends O8{optimize(n){return this.run(n,new Set),this.modifiedFlag}run(n,e){let o=new Set;n instanceof Gf&&(o=n.producedFields(),xE(o,e)&&(this.setModified(),n.removeFormulas(e),n.producedFields.length===0&&n.remove()));for(const f of n.children)this.run(f,new Set([...e,...o]))}}class kbe extends L8{constructor(){super()}run(n){n instanceof fu&&!n.isRequired()&&(this.setModified(),n.remove())}}class Tbe extends eg{run(n){if(!C8(n)&&!(n.numChildren()>1)){for(const e of n.children)if(e instanceof Nl)if(n instanceof Nl)this.setModified(),n.merge(e);else{if(bE(n.producedFields(),e.dependentFields()))continue;this.setModified(),e.swapWithParent()}}}}class Abe extends eg{run(n){const e=[...n.children],o=n.children.filter(f=>f instanceof Nl);if(n.numChildren()>1&&o.length>=1){const f={},r=new Set;for(const a of o){const l=a.parse;for(const c of Xr(l))c in f?f[c]!==l[c]&&r.add(c):f[c]=l[c]}for(const a of r)delete f[a];if(!_o(f)){this.setModified();const a=new Nl(n,f);for(const l of e){if(l instanceof Nl)for(const c of Xr(f))delete l.parse[c];n.removeChild(l),l.parent=a,l instanceof Nl&&Xr(l.parse).length===0&&l.remove()}}}}}class Mbe extends eg{run(n){n instanceof fu||n.numChildren()>0||n instanceof i1||n instanceof B0||(this.setModified(),n.remove())}}class Sbe extends eg{run(n){const e=n.children.filter(f=>f instanceof Gf),o=e.pop();for(const f of e)this.setModified(),o.merge(f)}}class Ebe extends eg{run(n){const e=n.children.filter(f=>f instanceof sf),o={};for(const f of e){const r=Ba(f.groupBy);r in o||(o[r]=[]),o[r].push(f)}for(const f of Xr(o)){const r=o[f];if(r.length>1){const a=r.pop();for(const l of r)a.merge(l)&&(n.removeChild(l),l.parent=a,l.remove(),this.setModified())}}}}class Cbe extends eg{constructor(n){super(),this.model=n}run(n){const e=!(C8(n)||n instanceof r1||n instanceof Nl||n instanceof cp),o=[],f=[];for(const r of n.children)r instanceof Wf&&(e&&!bE(n.producedFields(),r.dependentFields())?o.push(r):f.push(r));if(o.length>0){const r=o.pop();for(const a of o)r.merge(a,this.model.renameSignal.bind(this.model));this.setModified(),n instanceof Wf?n.merge(r,this.model.renameSignal.bind(this.model)):r.swapWithParent()}if(f.length>1){const r=f.pop();for(const a of f)r.merge(a,this.model.renameSignal.bind(this.model));this.setModified()}}}class Obe extends eg{run(n){const e=[...n.children];if(!O0(e,a=>a instanceof fu)||n.numChildren()<=1)return;const f=[];let r;for(const a of e)if(a instanceof fu){let l=a;for(;l.numChildren()===1;){const[c]=l.children;if(c instanceof fu)l=c;else break}f.push(...l.children),r?(n.removeChild(a),a.parent=r.parent,r.parent.removeChild(r),r.parent=l,this.setModified()):r=l}else f.push(a);if(f.length){this.setModified();for(const a of f)a.parent.removeChild(a),a.parent=r}}}class tg extends To{constructor(n,e){super(n),this.transform=e}clone(){return new tg(null,ha(this.transform))}addDimensions(n){this.transform.groupby=Nf(this.transform.groupby.concat(n),e=>e)}dependentFields(){const n=new Set;return this.transform.groupby&&this.transform.groupby.forEach(n.add,n),this.transform.joinaggregate.map(e=>e.field).filter(e=>e!==void 0).forEach(n.add,n),n}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(n){var e;return(e=n.as)!==null&&e!==void 0?e:hi(n)}hash(){return`JoinAggregateTransform ${Ba(this.transform)}`}assemble(){const n=[],e=[],o=[];for(const r of this.transform.joinaggregate)e.push(r.op),o.push(this.getDefaultName(r)),n.push(r.field===void 0?null:r.field);const f=this.transform.groupby;return Object.assign({type:"joinaggregate",as:o,ops:e,fields:n},f!==void 0?{groupby:f}:{})}}function Lbe(t){return t.stack.stackBy.reduce((n,e)=>{const o=e.fieldDef,f=hi(o);return f&&n.push(f),n},[])}function Pbe(t){return Ir(t)&&t.every(n=>bi(n))&&t.length>1}class Hh extends To{constructor(n,e){super(n),this._stack=e}clone(){return new Hh(null,ha(this._stack))}static makeFromTransform(n,e){const{stack:o,groupby:f,as:r,offset:a="zero"}=e,l=[],c=[];if(e.sort!==void 0)for(const u of e.sort)l.push(u.field),c.push(Rs(u.order,"ascending"));const i={field:l,order:c};let s;return Pbe(r)?s=r:bi(r)?s=[r,`${r}_end`]:s=[`${e.stack}_start`,`${e.stack}_end`],new Hh(n,{dimensionFieldDefs:[],stackField:o,groupby:f,offset:a,sort:i,facetby:[],as:s})}static makeFromEncoding(n,e){const o=e.stack,{encoding:f}=e;if(!o)return null;const{groupbyChannels:r,fieldChannel:a,offset:l,impute:c}=o,i=r.map(h=>{const m=f[h];return th(m)}).filter(h=>!!h),s=Lbe(e),u=e.encoding.order;let d;return Ir(u)||ti(u)?d=GU(u):d=s.reduce((h,m)=>(h.field.push(m),h.order.push(a==="y"?"descending":"ascending"),h),{field:[],order:[]}),new Hh(n,{dimensionFieldDefs:i,stackField:e.vgField(a),facetby:[],stackby:s,sort:d,offset:l,impute:c,as:[e.vgField(a,{suffix:"start",forAs:!0}),e.vgField(a,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(n){this._stack.facetby.push(...n)}dependentFields(){const n=new Set;return n.add(this._stack.stackField),this.getGroupbyFields().forEach(n.add,n),this._stack.facetby.forEach(n.add,n),this._stack.sort.field.forEach(n.add,n),n}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${Ba(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:n,impute:e,groupby:o}=this._stack;return n.length>0?n.map(f=>f.bin?e?[hi(f,{binSuffix:"mid"})]:[hi(f,{}),hi(f,{binSuffix:"end"})]:[hi(f)]).flat():o??[]}assemble(){const n=[],{facetby:e,dimensionFieldDefs:o,stackField:f,stackby:r,sort:a,offset:l,impute:c,as:i}=this._stack;if(c)for(const s of o){const{bandPosition:u=.5,bin:d}=s;if(d){const h=hi(s,{expr:"datum"}),m=hi(s,{expr:"datum",binSuffix:"end"});n.push({type:"formula",expr:`${u}*${h}+${1-u}*${m}`,as:hi(s,{binSuffix:"mid",forAs:!0})})}n.push({type:"impute",field:f,groupby:[...r,...e],key:hi(s,{binSuffix:"mid"}),method:"value",value:0})}return n.push({type:"stack",groupby:[...this.getGroupbyFields(),...e],field:f,sort:a,as:i,offset:l}),n}}class a1 extends To{constructor(n,e){super(n),this.transform=e}clone(){return new a1(null,ha(this.transform))}addDimensions(n){this.transform.groupby=Nf(this.transform.groupby.concat(n),e=>e)}dependentFields(){var n,e;const o=new Set;return((n=this.transform.groupby)!==null&&n!==void 0?n:[]).forEach(o.add,o),((e=this.transform.sort)!==null&&e!==void 0?e:[]).forEach(f=>o.add(f.field)),this.transform.window.map(f=>f.field).filter(f=>f!==void 0).forEach(o.add,o),o}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(n){var e;return(e=n.as)!==null&&e!==void 0?e:hi(n)}hash(){return`WindowTransform ${Ba(this.transform)}`}assemble(){var n;const e=[],o=[],f=[],r=[];for(const d of this.transform.window)o.push(d.op),f.push(this.getDefaultName(d)),r.push(d.param===void 0?null:d.param),e.push(d.field===void 0?null:d.field);const a=this.transform.frame,l=this.transform.groupby;if(a&&a[0]===null&&a[1]===null&&o.every(d=>CE(d)))return Object.assign({type:"joinaggregate",as:f,ops:o,fields:e},l!==void 0?{groupby:l}:{});const c=[],i=[];if(this.transform.sort!==void 0)for(const d of this.transform.sort)c.push(d.field),i.push((n=d.order)!==null&&n!==void 0?n:"ascending");const s={field:c,order:i},u=this.transform.ignorePeers;return Object.assign(Object.assign(Object.assign({type:"window",params:r,as:f,ops:o,fields:e,sort:s},u!==void 0?{ignorePeers:u}:{}),l!==void 0?{groupby:l}:{}),a!==void 0?{frame:a}:{})}}function Dbe(t){function n(e){if(!(e instanceof i1)){const o=e.clone();if(o instanceof fu){const f=sA+o.getSource();o.setSource(f),t.model.component.data.outputNodes[f]=o}else(o instanceof sf||o instanceof Hh||o instanceof a1||o instanceof tg)&&o.addDimensions(t.fields);for(const f of e.children.flatMap(n))f.parent=o;return[o]}return e.children.flatMap(n)}return n}function oA(t){if(t instanceof i1)if(t.numChildren()===1&&!(t.children[0]instanceof fu)){const n=t.children[0];(n instanceof sf||n instanceof Hh||n instanceof a1||n instanceof tg)&&n.addDimensions(t.fields),n.swapWithParent(),oA(t)}else{const n=t.model.component.data.main;gH(n);const e=Dbe(t),o=t.children.map(e).flat();for(const f of o)f.parent=n}else t.children.map(oA)}function gH(t){if(t instanceof fu&&t.type===Fo.Main&&t.numChildren()===1){const n=t.children[0];n instanceof i1||(n.swapWithParent(),gH(t))}}const sA="scale_",Cb=5;function lA(t){for(const n of t){for(const e of n.children)if(e.parent!==n)return!1;if(!lA(n.children))return!1}return!0}function Uc(t,n){let e=!1;for(const o of n)e=t.optimize(o)||e;return e}function HP(t,n,e){let o=t.sources,f=!1;return f=Uc(new kbe,o)||f,f=Uc(new _be(n),o)||f,o=o.filter(r=>r.numChildren()>0),f=Uc(new Mbe,o)||f,o=o.filter(r=>r.numChildren()>0),e||(f=Uc(new Tbe,o)||f,f=Uc(new Cbe(n),o)||f,f=Uc(new wbe,o)||f,f=Uc(new Abe,o)||f,f=Uc(new Ebe,o)||f,f=Uc(new Sbe,o)||f,f=Uc(new bbe,o)||f,f=Uc(new Obe,o)||f),t.sources=o,f}function Ibe(t,n){lA(t.sources);let e=0,o=0;for(let f=0;fn(e))}}var zbe=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f({signal:`{data: ${x3(o,{timeUnit:e,type:n})}}`}))}function R4(t,n,e){var o;const f=(o=Gl(e))===null||o===void 0?void 0:o.unit;return n==="temporal"||f?jbe(t,n,f):[t]}function yd(t,n,e,o){const{encoding:f}=e,r=Ws(f[o]),{type:a}=r,l=r.timeUnit;if(t1e(n)){const u=yd(t,void 0,e,o),d=R4(n.unionWith,a,l);return Lf([...d,...u.value])}else{if(Vi(n))return Lf([n]);if(n&&n!=="unaggregated"&&!gV(n))return Lf(R4(n,a,l))}const c=e.stack;if(c&&o===c.fieldChannel){if(c.offset==="normalize")return Gu([[0,1]]);const u=e.requestDataName(Fo.Main);return Gu([{data:u,field:e.vgField(o,{suffix:"start"})},{data:u,field:e.vgField(o,{suffix:"end"})}])}const i=_p(o)&&ti(r)?Vbe(e,o,t):void 0;if(mh(r)){const u=R4([r.datum],a,l);return Gu(u)}const s=r;if(n==="unaggregated"){const u=e.requestDataName(Fo.Main),{field:d}=r;return Gu([{data:u,field:hi({field:d,aggregate:"min"})},{data:u,field:hi({field:d,aggregate:"max"})}])}else if(Bo(s.bin)){if(ll(t))return Gu(t==="bin-ordinal"?[]:[{data:hy(i)?e.requestDataName(Fo.Main):e.requestDataName(Fo.Raw),field:e.vgField(o,cx(s,o)?{binSuffix:"range"}:{}),sort:i===!0||!Ei(i)?{field:e.vgField(o,{}),op:"min"}:i}]);{const{bin:u}=s;if(Bo(u)){const d=E8(e,s.field,u);return Gu([new Ou(()=>{const h=e.getSignalName(d);return`[${h}.start, ${h}.stop]`})])}else return Gu([{data:e.requestDataName(Fo.Main),field:e.vgField(o,{})}])}}else if(s.timeUnit&&Fa(["time","utc"],t)&&PV(s,Is(e)?e.encoding[ph(o)]:void 0,e.markDef,e.config)){const u=e.requestDataName(Fo.Main);return Gu([{data:u,field:e.vgField(o)},{data:u,field:e.vgField(o,{suffix:"end"})}])}else return Gu(i?[{data:hy(i)?e.requestDataName(Fo.Main):e.requestDataName(Fo.Raw),field:e.vgField(o),sort:i}]:[{data:e.requestDataName(Fo.Main),field:e.vgField(o)}])}function F4(t,n){const{op:e,field:o,order:f}=t;return Object.assign(Object.assign({op:e??(n?"sum":p3)},o?{field:bc(o)}:{}),f?{order:f}:{})}function Ube(t,n){var e;const o=t.component.scales[n],f=t.specifiedScales[n].domain,r=(e=t.fieldDef(n))===null||e===void 0?void 0:e.bin,a=gV(f)&&f,l=J0(r)&&l3(r.extent)&&r.extent;(a||l)&&o.set("selectionExtent",a??l,!0)}function Vbe(t,n,e){if(!ll(e))return;const o=t.fieldDef(n),f=o.sort;if(CV(f))return{op:"min",field:zm(o,n),order:"ascending"};const{stack:r}=t,a=r?new Set([...r.groupbyFields,...r.stackBy.map(l=>l.fieldDef.field)]):void 0;if($f(f)){const l=r&&!a.has(f.field);return F4(f,l)}else if(EV(f)){const{encoding:l,order:c}=f,i=t.fieldDef(l),{aggregate:s,field:u}=i,d=r&&!a.has(u);if(Wh(s)||wp(s))return F4({field:hi(i),order:c},d);if(CE(s)||!s)return F4({op:s,field:u,order:c},d)}else{if(f==="descending")return{op:"min",field:t.vgField(n),order:"descending"};if(Fa(["ascending",void 0],f))return!0}}function $P(t,n){const{aggregate:e,type:o}=t;return e?bi(e)&&!dge.has(e)?{valid:!1,reason:ime(e)}:o==="quantitative"&&n==="log"?{valid:!1,reason:ame(t)}:{valid:!0}:{valid:!1,reason:rme(t)}}function uA(t,n,e,o){return t.explicit&&n.explicit&&Kr(cme(e,o,t.value,n.value)),{explicit:t.explicit,value:[...t.value,...n.value]}}function qbe(t){const n=Nf(t.map(a=>Bh(a)?zbe(a,["sort"]):a),Ba),e=Nf(t.map(a=>{if(Bh(a)){const l=a.sort;return l!==void 0&&!hy(l)&&("op"in l&&l.op==="count"&&delete l.field,l.order==="ascending"&&delete l.order),l}}).filter(a=>a!==void 0),Ba);if(n.length===0)return;if(n.length===1){const a=t[0];if(Bh(a)&&e.length>0){let l=e[0];if(e.length>1)Kr(iP),l=!0;else if(Ei(l)&&"field"in l){const c=l.field;a.field===c&&(l=l.order?{order:l.order}:!0)}return Object.assign(Object.assign({},a),{sort:l})}return a}const o=Nf(e.map(a=>hy(a)||!("op"in a)||bi(a.op)&&a.op in uge?a:(Kr(hme(a)),!0)),Ba);let f;o.length===1?f=o[0]:o.length>1&&(Kr(iP),f=!0);const r=Nf(t.map(a=>Bh(a)?a.data:null),a=>a);return r.length===1&&r[0]!==null?Object.assign({data:r[0],fields:n.map(l=>l.field)},f?{sort:f}:{}):Object.assign({fields:n},f?{sort:f}:{})}function P8(t){if(Bh(t)&&bi(t.field))return t.field;if(gge(t)){let n;for(const e of t.fields)if(Bh(e)&&bi(e.field)){if(!n)n=e.field;else if(n!==e.field)return Kr(dme),n}return Kr(pme),n}else if(mge(t)){Kr(gme);const n=t.fields[0];return bi(n)?n:void 0}}function C3(t,n){const o=t.component.scales[n].get("domains").map(f=>(Bh(f)&&(f.data=t.lookupDataSource(f.data)),f));return qbe(o)}var Hbe=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fn.concat(vH(e)),GP(t)):GP(t)}function GP(t){return Xr(t.component.scales).reduce((n,e)=>{const o=t.component.scales[e];if(o.merged)return n;const f=o.combine(),{name:r,type:a,selectionExtent:l,domains:c,range:i,reverse:s}=f,u=Hbe(f,["name","type","selectionExtent","domains","range","reverse"]),d=$be(f.range,r,e,t),h=C3(t,e),m=l?zye(t,l,o,h):null;return n.push(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:r,type:a},h?{domain:h}:{}),m?{domainRaw:m}:{}),{range:d}),s!==void 0?{reverse:s}:{}),u)),n},[])}function $be(t,n,e,o){if(sl(e)){if(kp(t))return{step:{signal:`${n}_step`}}}else if(Ei(t)&&Bh(t))return Object.assign(Object.assign({},t),{data:o.lookupDataSource(t.data)});return t}class yH extends rd{constructor(n,e){super({},{name:n}),this.merged=!1,this.setWithExplicit("type",e)}domainDefinitelyIncludesZero(){return this.get("zero")!==!1?!0:O0(this.get("domains"),n=>Ir(n)&&n.length===2&&n[0]<=0&&n[1]>=0)}}const Gbe=["range","scheme"];function Wbe(t){const n=t.component.scales;for(const e of s3){const o=n[e];if(!o)continue;const f=Ybe(e,t);o.setWithExplicit("range",f)}}function WP(t,n){const e=t.fieldDef(n);if(e?.bin){const{bin:o,field:f}=e,r=Fu(n),a=t.getName(r);if(Ei(o)&&o.binned&&o.step!==void 0)return new Ou(()=>{const l=t.scaleName(n),c=`(domain("${l}")[1] - domain("${l}")[0]) / ${o.step}`;return`${t.getSignalName(a)} / (${c})`});if(Bo(o)){const l=E8(t,f,o);return new Ou(()=>{const c=t.getSignalName(l),i=`(${c}.stop - ${c}.start) / ${c}.step`;return`${t.getSignalName(a)} / (${i})`})}}}function Ybe(t,n){const e=n.specifiedScales[t],{size:o}=n,r=n.getScaleComponent(t).get("type");for(const u of Gbe)if(e[u]!==void 0){const d=VT(r,u),h=mV(t,u);if(!d)Kr(QU(r,u,t));else if(h)Kr(h);else switch(u){case"range":{const m=e.range;if(Ir(m)){if(sl(t))return Lf(m.map(g=>{if(g==="width"||g==="height"){const p=n.getName(g),v=n.getSignalName.bind(n);return Ou.fromName(v,p)}return g}))}else if(Ei(m))return Lf({data:n.requestDataName(Fo.Main),field:m.field,sort:{op:"min",field:n.vgField(t)}});return Lf(m)}case"scheme":return Lf(Xbe(e[u]))}}const a=t===cs||t==="xOffset"?"width":"height",l=o[a];if(rh(l)){if(sl(t))if(ll(r)){const u=xH(l,n,t);if(u)return Lf({step:u})}else Kr(eV(a));else if(e1(t)){const u=t===mp?"x":"y";if(n.getScaleComponent(u).get("type")==="band"){const m=bH(l,r);if(m)return Lf(m)}}}const{rangeMin:c,rangeMax:i}=e,s=Zbe(t,n);return(c!==void 0||i!==void 0)&&VT(r,"rangeMin")&&Ir(s)&&s.length===2?Lf([c??s[0],i??s[1]]):Gu(s)}function Xbe(t){return e1e(t)?Object.assign({scheme:t.name},Eu(t,["name"])):{scheme:t}}function Zbe(t,n){const{size:e,config:o,mark:f,encoding:r}=n,a=n.getSignalName.bind(n),{type:l}=Ws(r[t]),i=n.getScaleComponent(t).get("type"),{domain:s,domainMid:u}=n.specifiedScales[t];switch(t){case cs:case ol:{if(Fa(["point","band"],i)){const m=_H(t,e,o.view);if(rh(m))return{step:xH(m,n,t)}}const d=Fu(t),h=n.getName(d);return t===ol&&rc(i)?[Ou.fromName(a,h),0]:[0,Ou.fromName(a,h)]}case mp:case Qm:return Jbe(t,n,i);case ed:{const d=n.component.scales[t].get("zero"),h=wH(f,d,o),m=e_e(f,e,n,o);return Em(i)?Qbe(h,m,Kbe(i,o,s,t)):[h,m]}case Tc:return[0,Math.PI*2];case X0:return[0,360];case vf:return[0,new Ou(()=>{const d=n.getSignalName("width"),h=n.getSignalName("height");return`min(${d},${h})/2`})];case xp:return[o.scale.minStrokeWidth,o.scale.maxStrokeWidth];case bp:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case Ru:return"symbol";case zu:case hh:case dh:return i==="ordinal"?l==="nominal"?"category":"ordinal":u!==void 0?"diverging":f==="rect"||f==="geoshape"?"heatmap":"ramp";case td:case vp:case yp:return[o.scale.minOpacity,o.scale.maxOpacity]}}function xH(t,n,e){var o,f,r,a,l;const{encoding:c}=n,i=n.getScaleComponent(e),s=IU(e),u=c[s];if(lq({step:t,offsetIsDiscrete:la(u)&&cV(u.type)})==="offset"&&qV(c,s)){const h=n.getScaleComponent(s);let g=`domain('${n.scaleName(s)}').length`;if(h.get("type")==="band"){const v=(f=(o=h.get("paddingInner"))!==null&&o!==void 0?o:h.get("padding"))!==null&&f!==void 0?f:0,y=(a=(r=h.get("paddingOuter"))!==null&&r!==void 0?r:h.get("padding"))!==null&&a!==void 0?a:0;g=`bandspace(${g}, ${v}, ${y})`}const p=(l=i.get("paddingInner"))!==null&&l!==void 0?l:i.get("padding");return{signal:`${t.step} * ${g} / (1-${bge(p)})`}}else return t.step}function bH(t,n){if(lq({step:t,offsetIsDiscrete:ll(n)})==="offset")return{step:t.step}}function Jbe(t,n,e){const o=t===mp?"x":"y",r=n.getScaleComponent(o).get("type"),a=n.scaleName(o);if(r==="band"){const l=_H(o,n.size,n.config.view);if(rh(l)){const c=bH(l,e);if(c)return c}return[0,{signal:`bandwidth('${a}')`}]}else return _U(`Cannot use ${t} scale if ${o} scale is not discrete.`)}function _H(t,n,e){const o=t===cs?"width":"height",f=n[o];return f||I2(e,o)}function Kbe(t,n,e,o){switch(t){case"quantile":return n.scale.quantileCount;case"quantize":return n.scale.quantizeCount;case"threshold":return e!==void 0&&Ir(e)?e.length+1:(Kr(Tme(o)),3)}}function Qbe(t,n,e){const o=()=>{const f=qh(n),r=qh(t),a=`(${f} - ${r}) / (${e} - 1)`;return`sequence(${r}, ${f} + ${a}, ${a})`};return Vi(n)?new Ou(o):{signal:o()}}function wH(t,n,e){if(n)return Vi(n)?{signal:`${n.signal} ? 0 : ${wH(t,!1,e)}`}:0;switch(t){case"bar":case"tick":return e.scale.minBandSize;case"line":case"trail":case"rule":return e.scale.minStrokeWidth;case"text":return e.scale.minFontSize;case"point":case"square":case"circle":return e.scale.minSize}throw new Error(u3("size",t))}const YP=.95;function e_e(t,n,e,o){const f={x:WP(e,"x"),y:WP(e,"y")};switch(t){case"bar":case"tick":{if(o.scale.maxBandSize!==void 0)return o.scale.maxBandSize;const r=XP(n,f,o.view);return wo(r)?r-1:new Ou(()=>`${r.signal} - 1`)}case"line":case"trail":case"rule":return o.scale.maxStrokeWidth;case"text":return o.scale.maxFontSize;case"point":case"square":case"circle":{if(o.scale.maxSize)return o.scale.maxSize;const r=XP(n,f,o.view);return wo(r)?Math.pow(YP*r,2):new Ou(()=>`pow(${YP} * ${r.signal}, 2)`)}}throw new Error(u3("size",t))}function XP(t,n,e){const o=rh(t.width)?t.width.step:D2(e,"width"),f=rh(t.height)?t.height.step:D2(e,"height");return n.x||n.y?new Ou(()=>`min(${[n.x?n.x.signal:o,n.y?n.y.signal:f].join(", ")})`):Math.min(o,f)}function kH(t,n){Is(t)?t_e(t,n):AH(t,n)}function t_e(t,n){const e=t.component.scales,{config:o,encoding:f,markDef:r,specifiedScales:a}=t;for(const l of Xr(e)){const c=a[l],i=e[l],s=t.getScaleComponent(l),u=Ws(f[l]),d=c[n],h=s.get("type"),m=s.get("padding"),g=s.get("paddingInner"),p=VT(h,n),v=mV(l,n);if(d!==void 0&&(p?v&&Kr(v):Kr(QU(h,n,l))),p&&v===void 0)if(d!==void 0){const y=u.timeUnit,x=u.type;switch(n){case"domainMax":case"domainMin":K0(c[n])||x==="temporal"||y?i.set(n,{signal:x3(c[n],{type:x,timeUnit:y})},!0):i.set(n,c[n],!0);break;default:i.copyKeyFromObject(n,c)}}else{const y=n in ZP?ZP[n]({model:t,channel:l,fieldOrDatumDef:u,scaleType:h,scalePadding:m,scalePaddingInner:g,domain:c.domain,domainMin:c.domainMin,domainMax:c.domainMax,markDef:r,config:o,hasNestedOffsetScale:GT(f,l),hasSecondaryRangeChannel:!!f[ph(l)]}):o.scale[n];y!==void 0&&i.set(n,y,!1)}}}const ZP={bins:({model:t,fieldOrDatumDef:n})=>ti(n)?n_e(t,n):void 0,interpolate:({channel:t,fieldOrDatumDef:n})=>r_e(t,n.type),nice:({scaleType:t,channel:n,domain:e,domainMin:o,domainMax:f,fieldOrDatumDef:r})=>i_e(t,n,e,o,f,r),padding:({channel:t,scaleType:n,fieldOrDatumDef:e,markDef:o,config:f})=>a_e(t,n,f.scale,e,o,f.bar),paddingInner:({scalePadding:t,channel:n,markDef:e,scaleType:o,config:f,hasNestedOffsetScale:r})=>o_e(t,n,e.type,o,f.scale,r),paddingOuter:({scalePadding:t,channel:n,scaleType:e,scalePaddingInner:o,config:f,hasNestedOffsetScale:r})=>s_e(t,n,e,o,f.scale,r),reverse:({fieldOrDatumDef:t,scaleType:n,channel:e,config:o})=>{const f=ti(t)?t.sort:void 0;return l_e(n,f,e,o.scale)},zero:({channel:t,fieldOrDatumDef:n,domain:e,markDef:o,scaleType:f,config:r,hasSecondaryRangeChannel:a})=>u_e(t,n,e,o,f,r.scale,a)};function TH(t){Is(t)?Wbe(t):AH(t,"range")}function AH(t,n){const e=t.component.scales;for(const o of t.children)n==="range"?TH(o):kH(o,n);for(const o of Xr(e)){let f;for(const r of t.children){const a=r.component.scales[o];if(a){const l=a.getWithExplicit(n);f=op(f,l,n,"scale",wq((c,i)=>{switch(n){case"range":return c.step&&i.step?c.step-i.step:0}return 0}))}}e[o].setWithExplicit(n,f)}}function n_e(t,n){const e=n.bin;if(Bo(e)){const o=E8(t,n.field,e);return new Ou(()=>t.getSignalName(o))}else if(xl(e)&&J0(e)&&e.step!==void 0)return{step:e.step}}function r_e(t,n){if(Fa([zu,hh,dh],t)&&n!=="nominal")return"hcl"}function i_e(t,n,e,o,f,r){var a;if(!(((a=th(r))===null||a===void 0?void 0:a.bin)||Ir(e)||f!=null||o!=null||Fa([Cu.TIME,Cu.UTC],t)))return sl(n)?!0:void 0}function a_e(t,n,e,o,f,r){if(sl(t)){if(nf(n)){if(e.continuousPadding!==void 0)return e.continuousPadding;const{type:a,orient:l}=f;if(a==="bar"&&!(ti(o)&&(o.bin||o.timeUnit))&&(l==="vertical"&&t==="x"||l==="horizontal"&&t==="y"))return r.continuousBandSize}if(n===Cu.POINT)return e.pointPadding}}function o_e(t,n,e,o,f,r=!1){if(t===void 0){if(sl(n)){const{bandPaddingInner:a,barBandPaddingInner:l,rectBandPaddingInner:c,bandWithNestedOffsetPaddingInner:i}=f;return r?i:Rs(a,e==="bar"?l:c)}else if(e1(n)&&o===Cu.BAND)return f.offsetBandPaddingInner}}function s_e(t,n,e,o,f,r=!1){if(t===void 0){if(sl(n)){const{bandPaddingOuter:a,bandWithNestedOffsetPaddingOuter:l}=f;if(r)return l;if(e===Cu.BAND)return Rs(a,Vi(o)?{signal:`${o.signal}/2`}:o/2)}else if(e1(n)){if(e===Cu.POINT)return .5;if(e===Cu.BAND)return f.offsetBandPaddingOuter}}}function l_e(t,n,e,o){if(e==="x"&&o.xReverse!==void 0)return rc(t)&&n==="descending"?Vi(o.xReverse)?{signal:`!${o.xReverse.signal}`}:!o.xReverse:o.xReverse;if(rc(t)&&n==="descending")return!0}function u_e(t,n,e,o,f,r,a){if(!!e&&e!=="unaggregated"&&rc(f)){if(Ir(e)){const c=e[0],i=e[e.length-1];if(c<=0&&i>=0)return!0}return!1}if(t==="size"&&n.type==="quantitative"&&!Em(f))return!0;if(!(ti(n)&&n.bin)&&Fa([...gh,...tge],t)){const{orient:c,type:i}=o;return Fa(["bar","area","line","trail"],i)&&(c==="horizontal"&&t==="y"||c==="vertical"&&t==="x")?!1:Fa(["bar","area"],i)&&!a?!0:r?.zero}return!1}function c_e(t,n,e,o,f=!1){const r=f_e(n,e,o,f),{type:a}=t;return _p(n)?a!==void 0?s1e(n,a)?ti(e)&&!o1e(a,e.type)?(Kr(lme(a,r)),r):a:(Kr(sme(n,a,r)),r):r:null}function f_e(t,n,e,o){var f;switch(n.type){case"nominal":case"ordinal":{if(rm(t)||C4(t)==="discrete")return t==="shape"&&n.type==="ordinal"&&Kr(O4(t,"ordinal")),"ordinal";if(sl(t)||e1(t)){if(Fa(["rect","bar","image","rule"],e.type)||o)return"band"}else if(e.type==="arc"&&t in EE)return"band";const r=e[Fu(t)];return z0(r)||Om(n)&&((f=n.axis)===null||f===void 0?void 0:f.tickBand)?"band":"point"}case"temporal":return rm(t)?"time":C4(t)==="discrete"?(Kr(O4(t,"temporal")),"ordinal"):ti(n)&&n.timeUnit&&Gl(n.timeUnit).utc?"utc":"time";case"quantitative":return rm(t)?ti(n)&&Bo(n.bin)?"bin-ordinal":"linear":C4(t)==="discrete"?(Kr(O4(t,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(JU(n.type))}function h_e(t,{ignoreRange:n}={}){MH(t),mH(t);for(const e of a1e)kH(t,e);n||TH(t)}function MH(t){Is(t)?t.component.scales=d_e(t):t.component.scales=g_e(t)}function d_e(t){const{encoding:n,mark:e,markDef:o}=t,f={};for(const r of s3){const a=Ws(n[r]);if(a&&e===xV&&r===Ru&&a.type===t1)continue;let l=a&&a.scale;if(e1(r)){const c=zU(r);if(!GT(n,c)){l&&Kr(Wge(r));continue}}if(a&&l!==null&&l!==!1){l??(l={});const c=GT(n,r),i=c_e(l,r,a,o,c);f[r]=new yH(t.scaleName(`${r}`,!0),{value:i,explicit:l.type===i})}}return f}const p_e=wq((t,n)=>oP(t)-oP(n));function g_e(t){var n,e;const o=t.component.scales={},f={},r=t.component.resolve;for(const a of t.children){MH(a);for(const l of Xr(a.component.scales))if((n=(e=r.scale)[l])!==null&&n!==void 0||(e[l]=rH(l,t)),r.scale[l]==="shared"){const c=f[l],i=a.component.scales[l].getWithExplicit("type");c?Xme(c.value,i.value)?f[l]=op(c,i,"type","scale",p_e):(r.scale[l]="independent",delete f[l]):f[l]=i}}for(const a of Xr(f)){const l=t.scaleName(a,!0),c=f[a];o[a]=new yH(l,c);for(const i of t.children){const s=i.component.scales[a];s&&(i.renameScale(s.get("name"),l),s.merged=!0)}}return o}var N4=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{var u,d,h;return!((u=s.from)===null||u===void 0)&&u.data&&(s.from.data=this.lookupDataSource(s.from.data)),!((h=(d=s.from)===null||d===void 0?void 0:d.facet)===null||h===void 0)&&h.data&&(s.from.facet.data=this.lookupDataSource(s.from.facet.data)),s},this.parent=o,this.config=r,this.view=ku(l),this.name=(c=n.name)!==null&&c!==void 0?c:f,this.title=kd(n.title)?{text:n.title}:n.title?ku(n.title):void 0,this.scaleNameMap=o?o.scaleNameMap:new B4,this.projectionNameMap=o?o.projectionNameMap:new B4,this.signalNameMap=o?o.signalNameMap:new B4,this.data=n.data,this.description=n.description,this.transforms=yye((i=n.transform)!==null&&i!==void 0?i:[]),this.layout=e==="layer"||e==="unit"?{}:Tve(n,e,r),this.component={data:{sources:o?o.component.data.sources:[],outputNodes:o?o.component.data.outputNodes:{},outputNodeRefCounts:o?o.component.data.outputNodeRefCounts:{},isFaceted:g3(n)||o?.component.data.isFaceted&&n.data===void 0},layoutSize:new rd,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:Object.assign({scale:{},axis:{},legend:{}},a?ha(a):{}),selection:null,scales:null,projection:null,axes:{},legends:{}}}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){h_e(this)}parseProjection(){dH(this)}renameTopLevelLayoutSizeSignal(){this.getName("width")!=="width"&&this.renameSignal(this.getName("width"),"width"),this.getName("height")!=="height"&&this.renameSignal(this.getName("height"),"height")}parseLegends(){lH(this)}assembleEncodeFromView(n){const e=N4(n,["style"]),o={};for(const f of Xr(e)){const r=e[f];r!==void 0&&(o[f]=Ho(r))}return o}assembleGroupEncodeEntry(n){let e={};return this.view&&(e=this.assembleEncodeFromView(this.view)),!n&&(this.description&&(e.description=Ho(this.description)),this.type==="unit"||this.type==="layer")?Object.assign({width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height")},e??{}):_o(e)?void 0:e}assembleLayout(){if(!this.layout)return;const n=this.layout,{spacing:e}=n,o=N4(n,["spacing"]),{component:f,config:r}=this,a=Pxe(f.layoutHeaders,r);return Object.assign(Object.assign(Object.assign({padding:e},this.assembleDefaultLayout()),o),a?{titleBand:a}:{})}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:n}=this.component;let e=[];for(const o of dc)n[o].title&&e.push(Mxe(this,o));for(const o of T8)e=e.concat(Sxe(this,o));return e}assembleAxes(){return pxe(this.component.axes,this.config)}assembleLegends(){return cH(this)}assembleProjections(){return nbe(this)}assembleTitle(){var n,e,o;const f=(n=this.title)!==null&&n!==void 0?n:{},{encoding:r}=f,a=N4(f,["encoding"]),l=Object.assign(Object.assign(Object.assign({},VU(this.config.title).nonMarkTitleProperties),a),r?{encode:{update:r}}:{});if(l.text)return Fa(["unit","layer"],this.type)?Fa(["middle",void 0],l.anchor)&&((e=l.frame)!==null&&e!==void 0||(l.frame="group")):(o=l.anchor)!==null&&o!==void 0||(l.anchor="start"),_o(l)?void 0:l}assembleGroup(n=[]){const e={};n=n.concat(this.assembleSignals()),n.length>0&&(e.signals=n);const o=this.assembleLayout();o&&(e.layout=o),e.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const f=!this.parent||lf(this.parent)?vH(this):[];f.length>0&&(e.scales=f);const r=this.assembleAxes();r.length>0&&(e.axes=r);const a=this.assembleLegends();return a.length>0&&(e.legends=a),e}getName(n){return Xo((this.name?`${this.name}_`:"")+n)}getDataName(n){return this.getName(Fo[n].toLowerCase())}requestDataName(n){const e=this.getDataName(n),o=this.component.data.outputNodeRefCounts;return o[e]=(o[e]||0)+1,e}getSizeSignalRef(n){if(lf(this.parent)){const e=tH(n),o=o3(e),f=this.component.scales[o];if(f&&!f.merged){const r=f.get("type"),a=f.get("range");if(ll(r)&&kp(a)){const l=f.get("name"),c=C3(this,o),i=P8(c);if(i){const s=hi({aggregate:"distinct",field:i},{expr:"datum"});return{signal:eH(l,f,s)}}else return Kr(PE(o)),null}}}return{signal:this.signalNameMap.get(this.getName(n))}}lookupDataSource(n){const e=this.component.data.outputNodes[n];return e?e.getSource():n}getSignalName(n){return this.signalNameMap.get(n)}renameSignal(n,e){this.signalNameMap.rename(n,e)}renameScale(n,e){this.scaleNameMap.rename(n,e)}renameProjection(n,e){this.projectionNameMap.rename(n,e)}scaleName(n,e){if(e)return this.getName(n);if(PU(n)&&_p(n)&&this.component.scales[n]||this.scaleNameMap.has(this.getName(n)))return this.scaleNameMap.get(this.getName(n))}projectionName(n){if(n)return this.getName("projection");if(this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection")))return this.projectionNameMap.get(this.getName("projection"))}getScaleComponent(n){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const e=this.component.scales[n];return e&&!e.merged?e:this.parent?this.parent.getScaleComponent(n):void 0}getSelectionComponent(n,e){let o=this.component.selection[n];if(!o&&this.parent&&(o=this.parent.getSelectionComponent(n,e)),!o)throw new Error(Age(e));return o}hasAxisOrientSignalRef(){var n,e;return((n=this.component.axes.x)===null||n===void 0?void 0:n.some(o=>o.hasOrientSignalRef()))||((e=this.component.axes.y)===null||e===void 0?void 0:e.some(o=>o.hasOrientSignalRef()))}}class SH extends I8{vgField(n,e={}){const o=this.fieldDef(n);if(!!o)return hi(o,e)}reduceFieldDef(n,e){return K1e(this.getMapping(),(o,f,r)=>{const a=th(f);return a?n(o,a,r):o},e)}forEachFieldDef(n,e){o8(this.getMapping(),(o,f)=>{const r=th(o);r&&n(r,f)},e)}}var m_e=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f{const u=_p(s)&&e.getScaleComponent(s);if(u){const d=u.get("type");rc(d)&&i.aggregate!=="count"&&!Tp(f)&&(c[i.field]=i)}return c},{});return Xr(l).length?new vy(n,l):null}dependentFields(){return new Set(Xr(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${Ba(this.filter)}`}assemble(){const n=Xr(this.filter).reduce((e,o)=>{const f=this.filter[o],r=hi(f,{expr:"datum"});return f!==null&&(f.type==="temporal"?e.push(`(isDate(${r}) || (isValid(${r}) && isFinite(+${r})))`):f.type==="quantitative"&&(e.push(`isValid(${r})`),e.push(`isFinite(+${r})`))),e},[]);return n.length>0?{type:"filter",expr:n.join(" && ")}:null}}class L3 extends To{constructor(n,e){super(n),this.transform=e,this.transform=ha(e);const{flatten:o,as:f=[]}=this.transform;this.transform.as=o.map((r,a)=>{var l;return(l=f[a])!==null&&l!==void 0?l:r})}clone(){return new L3(this.parent,ha(this.transform))}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${Ba(this.transform)}`}assemble(){const{flatten:n,as:e}=this.transform;return{type:"flatten",fields:n,as:e}}}class P3 extends To{constructor(n,e){var o,f,r;super(n),this.transform=e,this.transform=ha(e);const a=(o=this.transform.as)!==null&&o!==void 0?o:[void 0,void 0];this.transform.as=[(f=a[0])!==null&&f!==void 0?f:"key",(r=a[1])!==null&&r!==void 0?r:"value"]}clone(){return new P3(null,ha(this.transform))}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${Ba(this.transform)}`}assemble(){const{fold:n,as:e}=this.transform;return{type:"fold",fields:n,as:e}}}class om extends To{constructor(n,e,o,f){super(n),this.fields=e,this.geojson=o,this.signal=f}clone(){return new om(null,ha(this.fields),this.geojson,this.signal)}static parseAll(n,e){if(e.component.projection&&!e.component.projection.isFit)return n;let o=0;for(const f of[[fh,ch],[_c,yf]]){const r=f.map(a=>{const l=Ws(e.encoding[a]);return ti(l)?l.field:mh(l)?{expr:`${l.datum}`}:hf(l)?{expr:`${l.value}`}:void 0});(r[0]||r[1])&&(n=new om(n,r,null,e.getName(`geojson_${o++}`)))}if(e.channelHasField(Ru)){const f=e.typedFieldDef(Ru);f.type===t1&&(n=new om(n,null,f.field,e.getName(`geojson_${o++}`)))}return n}dependentFields(){var n;const e=((n=this.fields)!==null&&n!==void 0?n:[]).filter(bi);return new Set([...this.geojson?[this.geojson]:[],...e])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${Ba(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],Object.assign(Object.assign(Object.assign({type:"geojson"},this.fields?{fields:this.fields}:{}),this.geojson?{geojson:this.geojson}:{}),{signal:this.signal})]}}class yy extends To{constructor(n,e,o,f){super(n),this.projection=e,this.fields=o,this.as=f}clone(){return new yy(null,this.projection,ha(this.fields),ha(this.as))}static parseAll(n,e){if(!e.projectionName())return n;for(const o of[[fh,ch],[_c,yf]]){const f=o.map(a=>{const l=Ws(e.encoding[a]);return ti(l)?l.field:mh(l)?{expr:`${l.datum}`}:hf(l)?{expr:`${l.value}`}:void 0}),r=o[0]===_c?"2":"";(f[0]||f[1])&&(n=new yy(n,e.projectionName(),f,[e.getName(`x${r}`),e.getName(`y${r}`)]))}return n}dependentFields(){return new Set(this.fields.filter(bi))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${Ba(this.fields)} ${Ba(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class v0 extends To{constructor(n,e){super(n),this.transform=e}clone(){return new v0(null,ha(this.transform))}dependentFields(){var n;return new Set([this.transform.impute,this.transform.key,...(n=this.transform.groupby)!==null&&n!==void 0?n:[]])}producedFields(){return new Set([this.transform.impute])}processSequence(n){const{start:e=0,stop:o,step:f}=n;return{signal:`sequence(${[e,o,...f?[f]:[]].join(",")})`}}static makeFromTransform(n,e){return new v0(n,e)}static makeFromEncoding(n,e){const o=e.encoding,f=o.x,r=o.y;if(ti(f)&&ti(r)){const a=f.impute?f:r.impute?r:void 0;if(a===void 0)return;const l=f.impute?r:r.impute?f:void 0,{method:c,value:i,frame:s,keyvals:u}=a.impute,d=$V(e.mark,o);return new v0(n,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({impute:a.field,key:l.field},c?{method:c}:{}),i!==void 0?{value:i}:{}),s?{frame:s}:{}),u!==void 0?{keyvals:u}:{}),d.length?{groupby:d}:{}))}return null}hash(){return`Impute ${Ba(this.transform)}`}assemble(){const{impute:n,key:e,keyvals:o,method:f,groupby:r,value:a,frame:l=[null,null]}=this.transform,c=Object.assign(Object.assign(Object.assign(Object.assign({type:"impute",field:n,key:e},o?{keyvals:eye(o)?this.processSequence(o):o}:{}),{method:"value"}),r?{groupby:r}:{}),{value:!f||f==="value"?a:null});if(f&&f!=="value"){const i=Object.assign({type:"window",as:[`imputed_${n}_value`],ops:[f],fields:[n],frame:l,ignorePeers:!1},r?{groupby:r}:{}),s={type:"formula",expr:`datum.${n} === null ? datum.imputed_${n}_value : datum.${n}`,as:n};return[c,i,s]}else return[c]}}var v_e=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fo)}producedFields(){}dependentFields(){var n;return new Set([this.transform.pivot,this.transform.value,...(n=this.transform.groupby)!==null&&n!==void 0?n:[]])}hash(){return`PivotTransform ${Ba(this.transform)}`}assemble(){const{pivot:n,value:e,groupby:o,limit:f,op:r}=this.transform;return Object.assign(Object.assign(Object.assign({type:"pivot",field:n,value:e},f!==void 0?{limit:f}:{}),r!==void 0?{op:r}:{}),o!==void 0?{groupby:o}:{})}}class F3 extends To{constructor(n,e){super(n),this.transform=e}clone(){return new F3(null,ha(this.transform))}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${Ba(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function EH(t){let n=0;function e(o,f){var r;if(o instanceof B0&&!o.isGenerator&&!Pm(o.data)&&(t.push(f),f={name:null,source:f.name,transform:[]}),o instanceof Nl&&(o.parent instanceof B0&&!f.source?(f.format=Object.assign(Object.assign({},(r=f.format)!==null&&r!==void 0?r:{}),{parse:o.assembleFormatParse()}),f.transform.push(...o.assembleTransforms(!0))):f.transform.push(...o.assembleTransforms())),o instanceof i1){f.name||(f.name=`data_${n++}`),!f.source||f.transform.length>0?(t.push(f),o.data=f.name):o.data=f.source,t.push(...o.assemble());return}switch((o instanceof dx||o instanceof px||o instanceof vy||o instanceof r1||o instanceof Im||o instanceof yy||o instanceof sf||o instanceof xy||o instanceof a1||o instanceof tg||o instanceof P3||o instanceof L3||o instanceof O3||o instanceof D3||o instanceof I3||o instanceof z3||o instanceof cp||o instanceof F3||o instanceof R3)&&f.transform.push(o.assemble()),(o instanceof Wf||o instanceof Gf||o instanceof v0||o instanceof Hh||o instanceof om)&&f.transform.push(...o.assemble()),o instanceof fu&&(f.source&&f.transform.length===0?o.setSource(f.source):o.parent instanceof fu?o.setSource(f.name):(f.name||(f.name=`data_${n++}`),o.setSource(f.name),o.numChildren()===1&&(t.push(f),f={name:null,source:f.name,transform:[]}))),o.numChildren()){case 0:o instanceof fu&&(!f.source||f.transform.length>0)&&t.push(f);break;case 1:e(o.children[0],f);break;default:{f.name||(f.name=`data_${n++}`);let a=f.name;!f.source||f.transform.length>0?t.push(f):a=f.source;for(const l of o.children)e(l,{name:null,source:a,transform:[]});break}}}return e}function b_e(t){const n=[],e=EH(n);for(const o of t.children)e(o,{source:t.name,name:null,transform:[]});return n}function __e(t,n){var e,o;const f=[],r=EH(f);let a=0;for(const c of t.sources){c.hasName()||(c.dataName=`source_${a++}`);const i=c.assemble();r(c,i)}for(const c of f)c.transform.length===0&&delete c.transform;let l=0;for(const[c,i]of f.entries())((e=i.transform)!==null&&e!==void 0?e:[]).length===0&&!i.source&&f.splice(l++,0,f.splice(c,1)[0]);for(const c of f)for(const i of(o=c.transform)!==null&&o!==void 0?o:[])i.type==="lookup"&&(i.from=t.outputNodes[i.from].getSource());for(const c of f)c.name in n&&(c.values=n[c.name]);return f}function w_e(t){return t==="top"||t==="left"||Vi(t)?"header":"footer"}function k_e(t){for(const n of dc)T_e(t,n);JP(t,"x"),JP(t,"y")}function T_e(t,n){var e;const{facet:o,config:f,child:r,component:a}=t;if(t.channelHasField(n)){const l=o[n],c=Rm("title",null,f,n);let i=im(l,f,{allowDisabling:!0,includeDefault:c===void 0||!!c});r.component.layoutHeaders[n].title&&(i=Ir(i)?i.join(", "):i,i+=` / ${r.component.layoutHeaders[n].title}`,r.component.layoutHeaders[n].title=null);const s=Rm("labelOrient",l.header,f,n),u=l.header!==null?Rs((e=l.header)===null||e===void 0?void 0:e.labels,f.header.labels,!0):!1,d=Fa(["bottom","right"],s)?"footer":"header";a.layoutHeaders[n]={title:l.header!==null?i:null,facetFieldDef:l,[d]:n==="facet"?[]:[CH(t,n,u)]}}}function CH(t,n,e){const o=n==="row"?"height":"width";return{labels:e,sizeSignal:t.child.component.layoutSize.get(o)?t.child.getSizeSignalRef(o):void 0,axes:[]}}function JP(t,n){var e;const{child:o}=t;if(o.component.axes[n]){const{layoutHeaders:f,resolve:r}=t.component;if(r.axis[n]=S8(r,n),r.axis[n]==="shared"){const a=n==="x"?"column":"row",l=f[a];for(const c of o.component.axes[n]){const i=w_e(c.get("orient"));(e=l[i])!==null&&e!==void 0||(l[i]=[CH(t,a,!1)]);const s=Av(c,"main",t.config,{header:!0});s&&l[i][0].axes.push(s),c.mainExtracted=!0}}}}function A_e(t){z8(t),N2(t,"width"),N2(t,"height")}function M_e(t){z8(t);const n=t.layout.columns===1?"width":"childWidth",e=t.layout.columns===void 0?"height":"childHeight";N2(t,n),N2(t,e)}function z8(t){for(const n of t.children)n.parseLayoutSize()}function N2(t,n){var e;const o=tH(n),f=o3(o),r=t.component.resolve,a=t.component.layoutSize;let l;for(const c of t.children){const i=c.component.layoutSize.getWithExplicit(o),s=(e=r.scale[f])!==null&&e!==void 0?e:rH(f,t);if(s==="independent"&&i.value==="step"){l=void 0;break}if(l){if(s==="independent"&&l.value!==i.value){l=void 0;break}l=op(l,i,o,"")}else l=i}if(l){for(const c of t.children)t.renameSignal(c.getName(o),t.getName(n)),c.component.layoutSize.set(o,"merged",!1);a.setWithExplicit(n,l)}else a.setWithExplicit(n,{explicit:!1,value:void 0})}function S_e(t){const{size:n,component:e}=t;for(const o of gh){const f=Fu(o);if(n[f]){const r=n[f];e.layoutSize.set(f,rh(r)?"step":r,!0)}else{const r=E_e(t,f);e.layoutSize.set(f,r,!1)}}}function E_e(t,n){const e=n==="width"?"x":"y",o=t.config,f=t.getScaleComponent(e);if(f){const r=f.get("type"),a=f.get("range");if(ll(r)){const l=I2(o.view,n);return kp(a)||rh(l)?"step":l}else return YT(o.view,n)}else{if(t.hasProjection||t.mark==="arc")return YT(o.view,n);{const r=I2(o.view,n);return rh(r)?r.step:r}}}function cA(t,n,e){return hi(n,Object.assign({suffix:`by_${hi(t)}`},e??{}))}class Uv extends SH{constructor(n,e,o,f){super(n,"facet",e,o,f,n.resolve),this.child=j8(n.spec,this,this.getName("child"),void 0,f),this.children=[this.child],this.facet=this.initFacet(n.facet)}initFacet(n){if(!lx(n))return{facet:this.initFacetFieldDef(n,"facet")};const e=Xr(n),o={};for(const f of e){if(![Uh,Vh].includes(f)){Kr(u3(f,"facet"));break}const r=n[f];if(r.field===void 0){Kr(jT(r,f));break}o[f]=this.initFacetFieldDef(r,f)}return o}initFacetFieldDef(n,e){const o=i8(n,e);return o.header?o.header=ku(o.header):o.header===null&&(o.header=null),o}channelHasField(n){return!!this.facet[n]}fieldDef(n){return this.facet[n]}parseData(){this.component.data=N3(this),this.child.parseData()}parseLayoutSize(){z8(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),k_e(this)}assembleSelectionTopLevelSignals(n){return this.child.assembleSelectionTopLevelSignals(n)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(n){return this.child.assembleSelectionData(n)}getHeaderLayoutMixins(){var n,e,o;const f={};for(const r of dc)for(const a of A8){const l=this.component.layoutHeaders[r],c=l[a],{facetFieldDef:i}=l;if(i){const s=Rm("titleOrient",i.header,this.config,r);if(["right","bottom"].includes(s)){const u=S3(r,s);(n=f.titleAnchor)!==null&&n!==void 0||(f.titleAnchor={}),f.titleAnchor[u]="end"}}if(c?.[0]){const s=r==="row"?"height":"width",u=a==="header"?"headerBand":"footerBand";r!=="facet"&&!this.child.component.layoutSize.get(s)&&((e=f[u])!==null&&e!==void 0||(f[u]={}),f[u][r]=.5),l.title&&((o=f.offset)!==null&&o!==void 0||(f.offset={}),f.offset[r==="row"?"rowTitle":"columnTitle"]=10)}}return f}assembleDefaultLayout(){const{column:n,row:e}=this.facet,o=n?this.columnDistinctSignal():e?1:void 0;let f="all";return(!e&&this.component.resolve.scale.x==="independent"||!n&&this.component.resolve.scale.y==="independent")&&(f="none"),Object.assign(Object.assign(Object.assign({},this.getHeaderLayoutMixins()),o?{columns:o}:{}),{bounds:"full",align:f})}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof Uv))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroupStyle(){}assembleGroup(n){return this.parent&&this.parent instanceof Uv?Object.assign(Object.assign({},this.channelHasField("column")?{encode:{update:{columns:{field:hi(this.facet.column,{prefix:"distinct"})}}}}:{}),super.assembleGroup(n)):super.assembleGroup(n)}getCardinalityAggregateForChild(){const n=[],e=[],o=[];if(this.child instanceof Uv){if(this.child.channelHasField("column")){const f=hi(this.child.facet.column);n.push(f),e.push("distinct"),o.push(`distinct_${f}`)}}else for(const f of gh){const r=this.child.component.scales[f];if(r&&!r.merged){const a=r.get("type"),l=r.get("range");if(ll(a)&&kp(l)){const c=C3(this.child,f),i=P8(c);i?(n.push(i),e.push("distinct"),o.push(`distinct_${i}`)):Kr(PE(f))}}}return{fields:n,ops:e,as:o}}assembleFacet(){const{name:n,data:e}=this.component.data.facetRoot,{row:o,column:f}=this.facet,{fields:r,ops:a,as:l}=this.getCardinalityAggregateForChild(),c=[];for(const s of dc){const u=this.facet[s];if(u){c.push(hi(u));const{bin:d,sort:h}=u;if(Bo(d)&&c.push(hi(u,{binSuffix:"end"})),$f(h)){const{field:m,op:g=p3}=h,p=cA(u,h);o&&f?(r.push(p),a.push("max"),l.push(p)):(r.push(m),a.push(g),l.push(p))}else if(Ir(h)){const m=zm(u,s);r.push(m),a.push("max"),l.push(m)}}}const i=!!o&&!!f;return Object.assign({name:n,data:e,groupby:c},i||r.length>0?{aggregate:Object.assign(Object.assign({},i?{cross:i}:{}),r.length?{fields:r,ops:a,as:l}:{})}:{})}facetSortFields(n){const{facet:e}=this,o=e[n];return o?$f(o.sort)?[cA(o,o.sort,{expr:"datum"})]:Ir(o.sort)?[zm(o,n,{expr:"datum"})]:[hi(o,{expr:"datum"})]:[]}facetSortOrder(n){const{facet:e}=this,o=e[n];if(o){const{sort:f}=o;return[($f(f)?f.order:!Ir(f)&&f)||"ascending"]}return[]}assembleLabelTitle(){var n;const{facet:e,config:o}=this;if(e.facet)return iA(e.facet,"facet",o);const f={row:["top","bottom"],column:["left","right"]};for(const r of T8)if(e[r]){const a=Rm("labelOrient",(n=e[r])===null||n===void 0?void 0:n.header,o,r);if(f[r].includes(a))return iA(e[r],r,o)}}assembleMarks(){const{child:n}=this,e=this.component.data.facetRoot,o=b_e(e),f=n.assembleGroupEncodeEntry(!1),r=this.assembleLabelTitle()||n.assembleTitle(),a=n.assembleGroupStyle();return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:this.getName("cell"),type:"group"},r?{title:r}:{}),a?{style:a}:{}),{from:{facet:this.assembleFacet()},sort:{field:dc.map(c=>this.facetSortFields(c)).flat(),order:dc.map(c=>this.facetSortOrder(c)).flat()}}),o.length>0?{data:o}:{}),f?{encode:{update:f}}:{}),n.assembleGroup(Lye(this,[])))]}getMapping(){return this.facet}}function C_e(t,n){const{row:e,column:o}=n;if(e&&o){let f=null;for(const r of[e,o])if($f(r.sort)){const{field:a,op:l=p3}=r.sort;t=f=new tg(t,{joinaggregate:[{op:l,field:a,as:cA(r,r.sort,{forAs:!0})}],groupby:[hi(r)]})}return f}return null}function OH(t,n){var e,o,f,r;for(const a of n){const l=a.data;if(t.name&&a.hasName()&&t.name!==a.dataName)continue;const c=(e=t.format)===null||e===void 0?void 0:e.mesh,i=(o=l.format)===null||o===void 0?void 0:o.feature;if(c&&i)continue;const s=(f=t.format)===null||f===void 0?void 0:f.feature;if((s||i)&&s!==i)continue;const u=(r=l.format)===null||r===void 0?void 0:r.mesh;if(!((c||u)&&c!==u)){if(gy(t)&&gy(l)){if(Ff(t.values,l.values))return a}else if(Pm(t)&&Pm(l)){if(t.url===l.url)return a}else if(kq(t)&&t.name===a.dataName)return a}}return null}function O_e(t,n){if(t.data||!t.parent){if(t.data===null){const o=new B0({values:[]});return n.push(o),o}const e=OH(t.data,n);if(e)return Gd(t.data)||(e.data.format=wU({},t.data.format,e.data.format)),!e.hasName()&&t.data.name&&(e.dataName=t.data.name),e;{const o=new B0(t.data);return n.push(o),o}}else return t.parent.component.data.facetRoot?t.parent.component.data.facetRoot:t.parent.component.data.main}function L_e(t,n,e){var o,f;let r=0;for(const a of n.transforms){let l,c;if(hye(a))c=t=new Im(t,a),l="derived";else if(v8(a)){const i=mbe(a);c=t=(o=Nl.makeWithAncestors(t,{},i,e))!==null&&o!==void 0?o:t,t=new r1(t,n,a.filter)}else if(vq(a))c=t=Wf.makeFromTransform(t,a,n),l="number";else if(pye(a))l="date",e.getWithExplicit(a.field).value===void 0&&(t=new Nl(t,{[a.field]:l}),e.set(a.field,l,!1)),c=t=Gf.makeFromTransform(t,a);else if(gye(a))c=t=sf.makeFromTransform(t,a),l="number",k8(n)&&(t=new cp(t));else if(mq(a))c=t=xy.make(t,n,a,r++),l="derived";else if(uye(a))c=t=new a1(t,a),l="number";else if(cye(a))c=t=new tg(t,a),l="number";else if(mye(a))c=t=Hh.makeFromTransform(t,a),l="derived";else if(vye(a))c=t=new P3(t,a),l="derived";else if(fye(a))c=t=new L3(t,a),l="derived";else if(rye(a))c=t=new R3(t,a),l="derived";else if(lye(a))t=new F3(t,a);else if(dye(a))c=t=v0.makeFromTransform(t,a),l="derived";else if(iye(a))c=t=new O3(t,a),l="derived";else if(aye(a))c=t=new I3(t,a),l="derived";else if(oye(a))c=t=new z3(t,a),l="derived";else if(sye(a))c=t=new D3(t,a),l="derived";else{Kr(Rge(a));continue}if(c&&l!==void 0)for(const i of(f=c.producedFields())!==null&&f!==void 0?f:[])e.set(i,l,!1)}return t}function N3(t){var n,e,o,f,r,a,l,c,i,s;let u=O_e(t,t.component.data.sources);const{outputNodes:d,outputNodeRefCounts:h}=t.component.data,m=t.data,p=!(m&&(Gd(m)||Pm(m)||gy(m)))&&t.parent?t.parent.component.data.ancestorParse.clone():new Eye;Gd(m)?(Tq(m)?u=new px(u,m.sequence):y8(m)&&(u=new dx(u,m.graticule)),p.parseNothing=!0):((n=m?.format)===null||n===void 0?void 0:n.parse)===null&&(p.parseNothing=!0),u=(e=Nl.makeExplicit(u,t,p))!==null&&e!==void 0?e:u,u=new cp(u);const v=t.parent&&o1(t.parent);(Is(t)||lf(t))&&v&&(u=(o=Wf.makeFromEncoding(u,t))!==null&&o!==void 0?o:u),t.transforms.length>0&&(u=L_e(u,t,p));const y=ybe(t),x=vbe(t);u=(f=Nl.makeWithAncestors(u,{},Object.assign(Object.assign({},y),x),p))!==null&&f!==void 0?f:u,Is(t)&&(u=om.parseAll(u,t),u=yy.parseAll(u,t)),(Is(t)||lf(t))&&(v||(u=(r=Wf.makeFromEncoding(u,t))!==null&&r!==void 0?r:u),u=(a=Gf.makeFromEncoding(u,t))!==null&&a!==void 0?a:u,u=Im.parseAllForSortIndex(u,t));const w=t.getDataName(Fo.Raw),k=new fu(u,w,Fo.Raw,h);if(d[w]=k,u=k,Is(t)){const S=sf.makeFromEncoding(u,t);S&&(u=S,k8(t)&&(u=new cp(u))),u=(l=v0.makeFromEncoding(u,t))!==null&&l!==void 0?l:u,u=(c=Hh.makeFromEncoding(u,t))!==null&&c!==void 0?c:u}Is(t)&&(u=(i=vy.make(u,t))!==null&&i!==void 0?i:u);const b=t.getDataName(Fo.Main),T=new fu(u,b,Fo.Main,h);d[b]=T,u=T,Is(t)&&hxe(t,T);let _=null;if(lf(t)){const S=t.getName("facet");u=(s=C_e(u,t.facet))!==null&&s!==void 0?s:u,_=new i1(u,t,S,T.getSource()),d[S]=_}return Object.assign(Object.assign({},t.component.data),{outputNodes:d,outputNodeRefCounts:h,raw:k,main:T,facetRoot:_,ancestorParse:p})}class P_e extends I8{constructor(n,e,o,f){var r,a,l,c;super(n,"concat",e,o,f,n.resolve),(((a=(r=n.resolve)===null||r===void 0?void 0:r.axis)===null||a===void 0?void 0:a.x)==="shared"||((c=(l=n.resolve)===null||l===void 0?void 0:l.axis)===null||c===void 0?void 0:c.y)==="shared")&&Kr(Dge),this.children=this.getChildren(n).map((i,s)=>j8(i,this,this.getName(`concat_${s}`),void 0,f))}parseData(){this.component.data=N3(this);for(const n of this.children)n.parseData()}parseSelections(){this.component.selection={};for(const n of this.children){n.parseSelections();for(const e of Xr(n.component.selection))this.component.selection[e]=n.component.selection[e]}}parseMarkGroup(){for(const n of this.children)n.parseMarkGroup()}parseAxesAndHeaders(){for(const n of this.children)n.parseAxesAndHeaders()}getChildren(n){return w3(n)?n.vconcat:g8(n)?n.hconcat:n.concat}parseLayoutSize(){M_e(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(n){return this.children.reduce((e,o)=>o.assembleSelectionTopLevelSignals(e),n)}assembleSignals(){return this.children.forEach(n=>n.assembleSignals()),[]}assembleLayoutSignals(){const n=M8(this);for(const e of this.children)n.push(...e.assembleLayoutSignals());return n}assembleSelectionData(n){return this.children.reduce((e,o)=>o.assembleSelectionData(e),n)}assembleMarks(){return this.children.map(n=>{const e=n.assembleTitle(),o=n.assembleGroupStyle(),f=n.assembleGroupEncodeEntry(!1);return Object.assign(Object.assign(Object.assign(Object.assign({type:"group",name:n.getName("group")},e?{title:e}:{}),o?{style:o}:{}),f?{encode:{update:f}}:{}),n.assembleGroup())})}assembleGroupStyle(){}assembleDefaultLayout(){const n=this.layout.columns;return Object.assign(Object.assign({},n!=null?{columns:n}:{}),{bounds:"full",align:"each"})}}function D_e(t){return t===!1||t===null}const I_e=Object.assign(Object.assign({disable:1,gridScale:1,scale:1},UV),{labelExpr:1,encode:1}),LH=Xr(I_e);class R8 extends rd{constructor(n={},e={},o=!1){super(),this.explicit=n,this.implicit=e,this.mainExtracted=o}clone(){return new R8(ha(this.explicit),ha(this.implicit),this.mainExtracted)}hasAxisPart(n){return n==="axis"?!0:n==="grid"||n==="title"?!!this.get(n):!D_e(this.get(n))}hasOrientSignalRef(){return Vi(this.explicit.orient)}}function z_e(t,n,e){var o;const{encoding:f,config:r}=t,a=(o=Ws(f[n]))!==null&&o!==void 0?o:Ws(f[ph(n)]),l=t.axis(n)||{},{format:c,formatType:i}=l;if(R0(i))return Object.assign({text:rf({fieldOrDatumDef:a,field:"datum.value",format:c,formatType:i,config:r})},e);if(c===void 0&&i===void 0&&r.customFormatTypes){if(Cm(a)==="quantitative"){if(Om(a)&&a.stack==="normalize"&&r.normalizedNumberFormatType)return Object.assign({text:rf({fieldOrDatumDef:a,field:"datum.value",format:r.normalizedNumberFormat,formatType:r.normalizedNumberFormatType,config:r})},e);if(r.numberFormatType)return Object.assign({text:rf({fieldOrDatumDef:a,field:"datum.value",format:r.numberFormat,formatType:r.numberFormatType,config:r})},e)}if(Cm(a)==="temporal"&&r.timeFormatType&&ti(a)&&!a.timeUnit)return Object.assign({text:rf({fieldOrDatumDef:a,field:"datum.value",format:r.timeFormat,formatType:r.timeFormatType,config:r})},e)}return e}function R_e(t){return gh.reduce((n,e)=>(t.component.scales[e]&&(n[e]=[q_e(e,t)]),n),{})}const F_e={bottom:"top",top:"bottom",left:"right",right:"left"};function N_e(t){var n;const{axes:e,resolve:o}=t.component,f={top:0,bottom:0,right:0,left:0};for(const r of t.children){r.parseAxesAndHeaders();for(const a of Xr(r.component.axes))o.axis[a]=S8(t.component.resolve,a),o.axis[a]==="shared"&&(e[a]=B_e(e[a],r.component.axes[a]),e[a]||(o.axis[a]="independent",delete e[a]))}for(const r of gh){for(const a of t.children)if(!!a.component.axes[r]){if(o.axis[r]==="independent"){e[r]=((n=e[r])!==null&&n!==void 0?n:[]).concat(a.component.axes[r]);for(const l of a.component.axes[r]){const{value:c,explicit:i}=l.getWithExplicit("orient");if(!Vi(c)){if(f[c]>0&&!i){const s=F_e[c];f[c]>f[s]&&l.set("orient",s,!1)}f[c]++}}}delete a.component.axes[r]}if(o.axis[r]==="independent"&&e[r]&&e[r].length>1)for(const a of e[r])!!a.get("grid")&&!a.explicit.grid&&(a.implicit.grid=!1)}}function B_e(t,n){if(t){if(t.length!==n.length)return;const e=t.length;for(let o=0;oe.clone());return t}function j_e(t,n){for(const e of LH){const o=op(t.getWithExplicit(e),n.getWithExplicit(e),e,"axis",(f,r)=>{switch(e){case"title":return XU(f,r);case"gridScale":return{explicit:f.explicit,value:Rs(f.value,r.value)}}return T3(f,r,e,"axis")});t.setWithExplicit(e,o)}return t}function U_e(t,n,e,o,f){if(n==="disable")return e!==void 0;switch(e=e||{},n){case"titleAngle":case"labelAngle":return t===(Vi(e.labelAngle)?e.labelAngle:dy(e.labelAngle));case"values":return!!e.values;case"encode":return!!e.encoding||!!e.labelAngle;case"title":if(t===Zq(o,f))return!0}return t===e[n]}const V_e=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function q_e(t,n){var e,o,f;let r=n.axis(t);const a=new R8,l=Ws(n.encoding[t]),{mark:c,config:i}=n,s=r?.orient||((e=i[t==="x"?"axisX":"axisY"])===null||e===void 0?void 0:e.orient)||((o=i.axis)===null||o===void 0?void 0:o.orient)||wxe(t),u=n.getScaleComponent(t).get("type"),d=gxe(t,u,s,n.config),h=r!==void 0?!r:nA("disable",i.style,r?.style,d).configValue;if(a.set("disable",h,r!==void 0),h)return a;r=r||{};const m=xxe(l,r,t,i.style,d),g={fieldOrDatumDef:l,axis:r,channel:t,model:n,scaleType:u,orient:s,labelAngle:m,mark:c,config:i};for(const y of LH){const x=y in RP?RP[y](g):hP(y)?r[y]:void 0,w=x!==void 0,k=U_e(x,y,r,n,t);if(w&&k)a.set(y,x,k);else{const{configValue:b=void 0,configFrom:T=void 0}=hP(y)&&y!=="values"?nA(y,i.style,r.style,d):{},_=b!==void 0;w&&!_?a.set(y,x,k):(T!=="vgAxisConfig"||V_e.has(y)&&_||fx(b)||Vi(b))&&a.set(y,b,!1)}}const p=(f=r.encoding)!==null&&f!==void 0?f:{},v=jV.reduce((y,x)=>{var w;if(!a.hasAxisPart(x))return y;const k=nH((w=p[x])!==null&&w!==void 0?w:{},n),b=x==="labels"?z_e(n,t,k):k;return b!==void 0&&!_o(b)&&(y[x]={update:b}),y},{});return _o(v)||a.set("encode",v,!!r.encoding||r.labelAngle!==void 0),a}function H_e({encoding:t,size:n}){for(const e of gh){const o=Fu(e);rh(n[o])&&Bf(t[e])&&(delete n[o],Kr(eV(o)))}return n}function $_e(t,n,e){const o=ku(t),f=oo("orient",o,e);if(o.orient=X_e(o.type,n,f),f!==void 0&&f!==o.orient&&Kr(eme(o.orient,f)),o.type==="bar"&&o.orient){const l=oo("cornerRadiusEnd",o,e);if(l!==void 0){const c=o.orient==="horizontal"&&n.x2||o.orient==="vertical"&&n.y2?["cornerRadius"]:x1e[o.orient];for(const i of c)o[i]=l;o.cornerRadiusEnd!==void 0&&delete o.cornerRadiusEnd}}return oo("opacity",o,e)===void 0&&(o.opacity=W_e(o.type,n)),oo("cursor",o,e)===void 0&&(o.cursor=G_e(o,n,e)),o}function G_e(t,n,e){return n.href||t.href||oo("href",t,e)?"pointer":t.cursor}function W_e(t,n){if(Fa([d3,WE,YE,XE],t)&&!a8(n))return .7}function Y_e(t,n,{graticule:e}){if(e)return!1;const o=D0("filled",t,n),f=t.type;return Rs(o,f!==d3&&f!==h3&&f!==S2)}function X_e(t,n,e){switch(t){case d3:case YE:case XE:case yV:case u1e:case l1e:return}const{x:o,y:f,x2:r,y2:a}=n;switch(t){case f3:if(ti(o)&&(xl(o.bin)||ti(f)&&f.aggregate&&!o.aggregate))return"vertical";if(ti(f)&&(xl(f.bin)||ti(o)&&o.aggregate&&!f.aggregate))return"horizontal";if(a||r){if(e)return e;if(!r)return(ti(o)&&o.type===I0&&!Bo(o.bin)||$T(o))&&ti(f)&&xl(f.bin)?"horizontal":"vertical";if(!a)return(ti(f)&&f.type===I0&&!Bo(f.bin)||$T(f))&&ti(o)&&xl(o.bin)?"vertical":"horizontal"}case S2:if(r&&!(ti(o)&&xl(o.bin))&&a&&!(ti(f)&&xl(f.bin)))return;case c3:if(a)return ti(f)&&xl(f.bin)?"horizontal":"vertical";if(r)return ti(o)&&xl(o.bin)?"vertical":"horizontal";if(t===S2){if(o&&!f)return"vertical";if(f&&!o)return"horizontal"}case h3:case WE:{const l=Bf(o),c=Bf(f);if(e)return e;if(l&&!c)return t!=="tick"?"horizontal":"vertical";if(!l&&c)return t!=="tick"?"vertical":"horizontal";if(l&&c){const i=o,s=f,u=i.type===Sm,d=s.type===Sm;return u&&!d?t!=="tick"?"vertical":"horizontal":!u&&d?t!=="tick"?"horizontal":"vertical":!i.aggregate&&s.aggregate?t!=="tick"?"vertical":"horizontal":i.aggregate&&!s.aggregate&&t!=="tick"?"horizontal":"vertical"}else return}}return"vertical"}const Z_e={vgMark:"arc",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),Fl("x",t,{defaultPos:"mid"})),Fl("y",t,{defaultPos:"mid"})),lp(t,"radius")),lp(t,"theta"))},J_e={vgMark:"area",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"})),z2("x",t,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:t.markDef.orient==="horizontal"})),z2("y",t,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:t.markDef.orient==="vertical"})),w8(t))},K_e={vgMark:"rect",encodeEntry:t=>Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),lp(t,"x")),lp(t,"y"))},Q_e={vgMark:"shape",encodeEntry:t=>Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),postEncodingTransform:t=>{const{encoding:n}=t,e=n.shape;return[Object.assign({type:"geoshape",projection:t.projectionName()},e&&ti(e)&&e.type===t1?{field:hi(e,{expr:"datum"})}:{})]}},e2e={vgMark:"image",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"})),lp(t,"x")),lp(t,"y")),b8(t,"url"))},t2e={vgMark:"line",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),Fl("x",t,{defaultPos:"mid"})),Fl("y",t,{defaultPos:"mid"})),nl("size",t,{vgChannel:"strokeWidth"})),w8(t))},n2e={vgMark:"trail",encodeEntry:t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),Fl("x",t,{defaultPos:"mid"})),Fl("y",t,{defaultPos:"mid"})),nl("size",t)),w8(t))};function F8(t,n){const{config:e}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),Fl("x",t,{defaultPos:"mid"})),Fl("y",t,{defaultPos:"mid"})),nl("size",t)),nl("angle",t)),r2e(t,e,n))}function r2e(t,n,e){return e?{shape:{value:e}}:nl("shape",t)}const i2e={vgMark:"symbol",encodeEntry:t=>F8(t)},a2e={vgMark:"symbol",encodeEntry:t=>F8(t,"circle")},o2e={vgMark:"symbol",encodeEntry:t=>F8(t,"square")},s2e={vgMark:"rect",encodeEntry:t=>Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),lp(t,"x")),lp(t,"y"))},l2e={vgMark:"rule",encodeEntry:t=>{const{markDef:n}=t,e=n.orient;return!t.encoding.x&&!t.encoding.y&&!t.encoding.latitude&&!t.encoding.longitude?{}:Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),z2("x",t,{defaultPos:e==="horizontal"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:e!=="vertical"})),z2("y",t,{defaultPos:e==="vertical"?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:e!=="horizontal"})),nl("size",t,{vgChannel:"strokeWidth"}))}},u2e={vgMark:"text",encodeEntry:t=>{const{config:n,encoding:e}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"})),Fl("x",t,{defaultPos:"mid"})),Fl("y",t,{defaultPos:"mid"})),b8(t)),nl("size",t,{vgChannel:"fontSize"})),nl("angle",t)),PP("align",c2e(t.markDef,e,n))),PP("baseline",f2e(t.markDef,e,n))),Fl("radius",t,{defaultPos:null})),Fl("theta",t,{defaultPos:null}))}};function c2e(t,n,e){if(oo("align",t,e)===void 0)return"center"}function f2e(t,n,e){if(oo("baseline",t,e)===void 0)return"middle"}const h2e={vgMark:"rect",encodeEntry:t=>{const{config:n,markDef:e}=t,o=e.orient,f=o==="horizontal"?"width":"height",r=o==="horizontal"?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ac(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),Fl("x",t,{defaultPos:"mid",vgChannel:"xc"})),Fl("y",t,{defaultPos:"mid",vgChannel:"yc"})),nl("size",t,{defaultValue:d2e(t),vgChannel:f})),{[r]:Ho(oo("thickness",e,n))})}};function d2e(t){var n;const{config:e,markDef:o}=t,{orient:f}=o,r=f==="horizontal"?"width":"height",a=t.getScaleComponent(f==="horizontal"?"x":"y"),l=(n=oo("size",o,e,{vgChannel:r}))!==null&&n!==void 0?n:e.tick.bandSize;if(l!==void 0)return l;{const c=a?a.get("range"):void 0;return c&&kp(c)&&wo(c.step)?c.step*3/4:D2(e.view,r)*3/4}}const Ob={arc:Z_e,area:J_e,bar:K_e,circle:a2e,geoshape:Q_e,image:e2e,line:t2e,point:i2e,rect:s2e,rule:l2e,square:o2e,text:u2e,tick:h2e,trail:n2e};function p2e(t){if(Fa([h3,c3,c1e],t.mark)){const n=$V(t.mark,t.encoding);if(n.length>0)return g2e(t,n)}else if(t.mark===f3){const n=BT.some(e=>oo(e,t.markDef,t.config));if(t.stack&&!t.fieldDef("size")&&n)return m2e(t)}return N8(t)}const KP="faceted_path_";function g2e(t,n){return[{name:t.getName("pathgroup"),type:"group",from:{facet:{name:KP+t.requestDataName(Fo.Main),data:t.requestDataName(Fo.Main),groupby:n}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:N8(t,{fromPrefix:KP})}]}const QP="stack_group_";function m2e(t){var n;const[e]=N8(t,{fromPrefix:QP}),o=t.scaleName(t.stack.fieldChannel),f=(s={})=>t.vgField(t.stack.fieldChannel,s),r=(s,u)=>{const d=[f({prefix:"min",suffix:"start",expr:u}),f({prefix:"max",suffix:"start",expr:u}),f({prefix:"min",suffix:"end",expr:u}),f({prefix:"max",suffix:"end",expr:u})];return`${s}(${d.map(h=>`scale('${o}',${h})`).join(",")})`};let a,l;t.stack.fieldChannel==="x"?(a=Object.assign(Object.assign({},Tm(e.encode.update,["y","yc","y2","height",...BT])),{x:{signal:r("min","datum")},x2:{signal:r("max","datum")},clip:{value:!0}}),l={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},e.encode.update=Object.assign(Object.assign({},Eu(e.encode.update,["y","yc","y2"])),{height:{field:{group:"height"}}})):(a=Object.assign(Object.assign({},Tm(e.encode.update,["x","xc","x2","width"])),{y:{signal:r("min","datum")},y2:{signal:r("max","datum")},clip:{value:!0}}),l={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},e.encode.update=Object.assign(Object.assign({},Eu(e.encode.update,["x","xc","x2"])),{width:{field:{group:"width"}}}));for(const s of BT){const u=D0(s,t.markDef,t.config);e.encode.update[s]?(a[s]=e.encode.update[s],delete e.encode.update[s]):u&&(a[s]=Ho(u)),u&&(e.encode.update[s]={value:0})}const c=[];if(((n=t.stack.groupbyChannels)===null||n===void 0?void 0:n.length)>0)for(const s of t.stack.groupbyChannels){const u=t.fieldDef(s),d=hi(u);d&&c.push(d),(u?.bin||u?.timeUnit)&&c.push(hi(u,{binSuffix:"end"}))}return a=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce((s,u)=>{if(e.encode.update[u])return Object.assign(Object.assign({},s),{[u]:e.encode.update[u]});{const d=D0(u,t.markDef,t.config);return d!==void 0?Object.assign(Object.assign({},s),{[u]:Ho(d)}):s}},a),a.stroke&&(a.strokeForeground={value:!0},a.strokeOffset={value:0}),[{type:"group",from:{facet:{data:t.requestDataName(Fo.Main),name:QP+t.requestDataName(Fo.Main),groupby:c,aggregate:{fields:[f({suffix:"start"}),f({suffix:"start"}),f({suffix:"end"}),f({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:a},marks:[{type:"group",encode:{update:l},marks:[e]}]}]}function v2e(t){var n;const{encoding:e,stack:o,mark:f,markDef:r,config:a}=t,l=e.order;if(!(!Ir(l)&&hf(l)&&FT(l.value)||!l&&FT(oo("order",r,a)))){if((Ir(l)||ti(l))&&!o)return GU(l,{expr:"datum"});if(Tp(f)){const c=r.orient==="horizontal"?"y":"x",i=e[c];if(ti(i)){const s=i.sort;if(Ir(s))return{field:hi(i,{prefix:c,suffix:"sort_index",expr:"datum"})};if($f(s))return{field:hi({aggregate:a8(t.encoding)?s.op:void 0,field:s.field},{expr:"datum"})};if(EV(s)){const u=t.fieldDef(s.encoding);return{field:hi(u,{expr:"datum"}),order:s.order}}else return s===null?void 0:{field:hi(i,{binSuffix:!((n=t.stack)===null||n===void 0)&&n.impute?"mid":void 0,expr:"datum"})}}return}}}function N8(t,n={fromPrefix:""}){const{mark:e,markDef:o,encoding:f,config:r}=t,a=Rs(o.clip,y2e(t),x2e(t)),l=HU(o),c=f.key,i=v2e(t),s=b2e(t),u=oo("aria",o,r),d=Ob[e].postEncodingTransform?Ob[e].postEncodingTransform(t):null;return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:t.getName("marks"),type:Ob[e].vgMark},a?{clip:!0}:{}),l?{style:l}:{}),c?{key:c.field}:{}),i?{sort:i}:{}),s||{}),u===!1?{aria:u}:{}),{from:{data:n.fromPrefix+t.requestDataName(Fo.Main)},encode:{update:Ob[e].encodeEntry(t)}}),d?{transform:d}:{})]}function y2e(t){const n=t.getScaleComponent("x"),e=t.getScaleComponent("y");return n?.get("selectionExtent")||e?.get("selectionExtent")?!0:void 0}function x2e(t){const n=t.component.projection;return n&&!n.isFit?!0:void 0}function b2e(t){if(!t.component.selection)return null;const n=Xr(t.component.selection).length;let e=n,o=t.parent;for(;o&&e===0;)e=Xr(o.component.selection).length,o=o.parent;return e?{interactive:n>0||!!t.encoding.tooltip}:null}class PH extends SH{constructor(n,e,o,f={},r){var a;super(n,"unit",e,o,r,void 0,gP(n)?n.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection=[],this.children=[];const l=eh(n.mark)?Object.assign({},n.mark):{type:n.mark},c=l.type;l.filled===void 0&&(l.filled=Y_e(l,r,{graticule:n.data&&y8(n.data)}));const i=this.encoding=Z1e(n.encoding||{},c,l.filled,r);this.markDef=$_e(l,i,r),this.size=H_e({encoding:i,size:gP(n)?Object.assign(Object.assign(Object.assign({},f),n.width?{width:n.width}:{}),n.height?{height:n.height}:{}):f}),this.stack=hq(c,i),this.specifiedScales=this.initScales(c,i),this.specifiedAxes=this.initAxes(i),this.specifiedLegends=this.initLegends(i),this.specifiedProjection=n.projection,this.selection=((a=n.params)!==null&&a!==void 0?a:[]).filter(s=>d8(s))}get hasProjection(){const{encoding:n}=this,e=this.mark===xV,o=n&&G0e.some(f=>la(n[f]));return e||o}scaleDomain(n){const e=this.specifiedScales[n];return e?e.domain:void 0}axis(n){return this.specifiedAxes[n]}legend(n){return this.specifiedLegends[n]}initScales(n,e){return s3.reduce((o,f)=>{var r;const a=Ws(e[f]);return a&&(o[f]=this.initScale((r=a.scale)!==null&&r!==void 0?r:{})),o},{})}initScale(n){const{domain:e,range:o}=n,f=ku(n);return Ir(e)&&(f.domain=e.map(Xu)),Ir(o)&&(f.range=o.map(Xu)),f}initAxes(n){return gh.reduce((e,o)=>{const f=n[o];if(la(f)||o===cs&&la(n.x2)||o===ol&&la(n.y2)){const r=la(f)?f.axis:void 0;e[o]=r&&this.initAxis(Object.assign({},r))}return e},{})}initAxis(n){const e=Xr(n),o={};for(const f of e){const r=n[f];o[f]=fx(r)?qU(r):Xu(r)}return o}initLegends(n){return nge.reduce((e,o)=>{const f=Ws(n[o]);if(f&&ige(o)){const r=f.legend;e[o]=r&&ku(r)}return e},{})}parseData(){this.component.data=N3(this)}parseLayoutSize(){S_e(this)}parseSelections(){this.component.selection=fxe(this,this.selection)}parseMarkGroup(){this.component.mark=p2e(this)}parseAxesAndHeaders(){this.component.axes=R_e(this)}assembleSelectionTopLevelSignals(n){return Pye(this,n)}assembleSignals(){return[...Wq(this),...Oye(this,[])]}assembleSelectionData(n){return Dye(this,n)}assembleLayout(){return null}assembleLayoutSignals(){return M8(this)}assembleMarks(){var n;let e=(n=this.component.mark)!==null&&n!==void 0?n:[];return(!this.parent||!o1(this.parent))&&(e=Mq(this,e)),e.map(this.correctDataNames)}assembleGroupStyle(){const{style:n}=this.view||{};if(n!==void 0)return n;if(this.encoding.x||this.encoding.y)return"cell"}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(n){return m0(this.encoding,n)}fieldDef(n){const e=this.encoding[n];return th(e)}typedFieldDef(n){const e=this.fieldDef(n);return wc(e)?e:null}}class B8 extends I8{constructor(n,e,o,f,r){super(n,"layer",e,o,r,n.resolve,n.view);const a=Object.assign(Object.assign(Object.assign({},f),n.width?{width:n.width}:{}),n.height?{height:n.height}:{});this.children=n.layer.map((l,c)=>{if(k3(l))return new B8(l,this,this.getName(`layer_${c}`),a,r);if(nd(l))return new PH(l,this,this.getName(`layer_${c}`),a,r);throw new Error(LE(l))})}parseData(){this.component.data=N3(this);for(const n of this.children)n.parseData()}parseLayoutSize(){A_e(this)}parseSelections(){this.component.selection={};for(const n of this.children){n.parseSelections();for(const e of Xr(n.component.selection))this.component.selection[e]=n.component.selection[e]}}parseMarkGroup(){for(const n of this.children)n.parseMarkGroup()}parseAxesAndHeaders(){N_e(this)}assembleSelectionTopLevelSignals(n){return this.children.reduce((e,o)=>o.assembleSelectionTopLevelSignals(e),n)}assembleSignals(){return this.children.reduce((n,e)=>n.concat(e.assembleSignals()),Wq(this))}assembleLayoutSignals(){return this.children.reduce((n,e)=>n.concat(e.assembleLayoutSignals()),M8(this))}assembleSelectionData(n){return this.children.reduce((e,o)=>o.assembleSelectionData(e),n)}assembleGroupStyle(){const n=new Set;for(const o of this.children)for(const f of ki(o.assembleGroupStyle()))n.add(f);const e=Array.from(n);return e.length>1?e:e.length===1?e[0]:void 0}assembleTitle(){let n=super.assembleTitle();if(n)return n;for(const e of this.children)if(n=e.assembleTitle(),n)return n}assembleLayout(){return null}assembleMarks(){return Iye(this,this.children.flatMap(n=>n.assembleMarks()))}assembleLegends(){return this.children.reduce((n,e)=>n.concat(e.assembleLegends()),cH(this))}}function j8(t,n,e,o,f){if(g3(t))return new Uv(t,n,e,f);if(k3(t))return new B8(t,n,e,o,f);if(nd(t))return new PH(t,n,e,o,f);if(_ve(t))return new P_e(t,n,e,f);throw new Error(LE(t))}var _2e=globalThis&&globalThis.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);f(h.name==="width"||h.name==="height")&&h.value!==void 0?(n[h.name]=+h.value,!1):!0);const{params:u}=n,d=_2e(n,["params"]);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({$schema:"https://vega.github.io/schema/vega/v5.json"},t.description?{description:t.description}:{}),d),l?{title:l}:{}),c?{style:c}:{}),i?{encode:{update:i}}:{}),{data:r}),a.length>0?{projections:a}:{}),t.assembleGroup([...s,...t.assembleSelectionTopLevelSignals([]),...sq(u)])),f?{config:f}:{}),o?{usermeta:o}:{})}const A2e=F0e.version;var M2e=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",version:A2e,compile:w2e,normalize:_q,deepEqual:Ff,duplicate:ha,never:_U,pick:Tm,omit:Eu,stringify:No,hash:Ba,isNullOrFalse:FT,contains:Fa,some:O0,every:yE,mergeDeep:wU,unique:Nf,isEqual:j0e,setEqual:kU,hasIntersection:xE,prefixGenerator:NT,fieldIntersection:bE,isEmpty:_o,keys:Xr,vals:ql,entries:ip,isBoolean:hy,varName:Xo,logicalExpr:Bv,deleteNestedProperty:T2,titleCase:ex,accessPathWithDatum:_E,flatAccessWithDatum:TU,replacePathInField:bc,replaceAll:L0,removePathFromField:wE,accessPathDepth:Am,getFirstDefined:Rs,uniqueId:MU,resetIdCounter:V0e,internalField:SU,isInternalField:EU,normalizeAngle:dy,isNumeric:e3});function DH(t){const[n,e]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(t).slice(1,3);return{library:n,version:e}}var S2e="vega-themes",E2e="2.10.0",C2e="Themes for stylized Vega and Vega-Lite visualizations.",O2e=["vega","vega-lite","themes","style"],L2e="BSD-3-Clause",P2e={name:"UW Interactive Data Lab",url:"https://idl.cs.washington.edu"},D2e=[{name:"Emily Gu",url:"https://github.com/emilygu"},{name:"Arvind Satyanarayan",url:"http://arvindsatya.com"},{name:"Jeffrey Heer",url:"https://idl.cs.washington.edu"},{name:"Dominik Moritz",url:"https://www.domoritz.de"}],I2e="build/vega-themes.js",z2e="build/vega-themes.module.js",R2e="build/vega-themes.min.js",F2e="build/vega-themes.min.js",N2e="build/vega-themes.module.d.ts",B2e={type:"git",url:"https://github.com/vega/vega-themes.git"},j2e=["src","build"],U2e={prebuild:"yarn clean",build:"rollup -c",clean:"rimraf build && rimraf examples/build","copy:data":"rsync -r node_modules/vega-datasets/data/* examples/data","copy:build":"rsync -r build/* examples/build","deploy:gh":"yarn build && mkdir -p examples/build && rsync -r build/* examples/build && gh-pages -d examples",preversion:"yarn lint",serve:"browser-sync start -s -f build examples --serveStatic examples",start:"yarn build && concurrently --kill-others -n Server,Rollup 'yarn serve' 'rollup -c -w'",prepare:"beemo create-config",eslintbase:"beemo eslint .",format:"yarn eslintbase --fix",lint:"yarn eslintbase",release:"auto shipit"},V2e={"@auto-it/conventional-commits":"^10.32.2","@auto-it/first-time-contributor":"^10.32.2","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.6","rollup-plugin-ts":"^1.4.7",auto:"^10.32.2","browser-sync":"^2.27.7",concurrently:"^6.4.0","gh-pages":"^3.2.3",rollup:"^2.60.0","rollup-plugin-bundle-size":"^1.0.3","rollup-plugin-terser":"^7.0.2",typescript:"^4.4.4",vega:"^5.19.1","vega-lite":"^5.0.0","vega-lite-dev-config":"^0.20.0"},q2e={vega:"*","vega-lite":"*"},H2e={name:S2e,version:E2e,description:C2e,keywords:O2e,license:L2e,author:P2e,contributors:D2e,main:I2e,module:z2e,unpkg:R2e,jsdelivr:F2e,types:N2e,repository:B2e,files:j2e,scripts:U2e,devDependencies:V2e,peerDependencies:q2e};const jg="#fff",$2e="#888",G2e={background:"#333",title:{color:jg,subtitleColor:jg},style:{"guide-label":{fill:jg},"guide-title":{fill:jg}},axis:{domainColor:jg,gridColor:$2e,tickColor:jg}},qp="#4572a7",W2e={background:"#fff",arc:{fill:qp},area:{fill:qp},line:{stroke:qp,strokeWidth:2},path:{stroke:qp},rect:{fill:qp},shape:{stroke:qp},symbol:{fill:qp,strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},Hp="#30a2da",j4="#cbcbcb",Y2e="#999",X2e="#333",eD="#f0f0f0",tD="#333",Z2e={arc:{fill:Hp},area:{fill:Hp},axis:{domainColor:j4,grid:!0,gridColor:j4,gridWidth:1,labelColor:Y2e,labelFontSize:10,titleColor:X2e,tickColor:j4,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:eD,group:{fill:eD},legend:{labelColor:tD,labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:tD,titleFontSize:14,titlePadding:10},line:{stroke:Hp,strokeWidth:2},path:{stroke:Hp,strokeWidth:.5},rect:{fill:Hp},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:Hp},bar:{binSpacing:2,fill:Hp,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},$p="#000",J2e={group:{fill:"#e5e5e5"},arc:{fill:$p},area:{fill:$p},line:{stroke:$p},path:{stroke:$p},rect:{fill:$p},shape:{stroke:$p},symbol:{fill:$p,size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},K2e=22,Q2e="normal",nD="Benton Gothic, sans-serif",rD=11.5,ewe="normal",Gp="#82c6df",U4="Benton Gothic Bold, sans-serif",iD="normal",aD=13,K1={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},twe={background:"#ffffff",title:{anchor:"start",color:"#000000",font:U4,fontSize:K2e,fontWeight:Q2e},arc:{fill:Gp},area:{fill:Gp},line:{stroke:Gp,strokeWidth:2},path:{stroke:Gp},rect:{fill:Gp},shape:{stroke:Gp},symbol:{fill:Gp,size:30},axis:{labelFont:nD,labelFontSize:rD,labelFontWeight:ewe,titleFont:U4,titleFontSize:aD,titleFontWeight:iD},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:nD,labelFontSize:rD,symbolType:"square",titleFont:U4,titleFontSize:aD,titleFontWeight:iD},range:{category:K1["category-6"],diverging:K1["fireandice-6"],heatmap:K1["fire-7"],ordinal:K1["fire-7"],ramp:K1["fire-7"]}},Wp="#ab5787",Lb="#979797",nwe={background:"#f9f9f9",arc:{fill:Wp},area:{fill:Wp},line:{stroke:Wp},path:{stroke:Wp},rect:{fill:Wp},shape:{stroke:Wp},symbol:{fill:Wp,size:30},axis:{domainColor:Lb,domainWidth:.5,gridWidth:.2,labelColor:Lb,tickColor:Lb,tickWidth:.2,titleColor:Lb},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},Yp="#3e5c69",rwe={background:"#fff",arc:{fill:Yp},area:{fill:Yp},line:{stroke:Yp},path:{stroke:Yp},rect:{fill:Yp},shape:{stroke:Yp},symbol:{fill:Yp},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},uc="#1696d2",oD="#000000",iwe="#FFFFFF",Pb="Lato",V4="Lato",awe="Lato",owe="#DEDDDD",swe=18,Q1={"main-colors":["#1696d2","#d2d2d2","#000000","#fdbf11","#ec008b","#55b748","#5c5859","#db2b27"],"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"shades-gray":["#F5F5F5","#ECECEC","#E3E3E3","#DCDBDB","#D2D2D2","#9D9D9D","#696969","#353535"],"shades-yellow":["#FFF2CF","#FCE39E","#FDD870","#FCCB41","#FDBF11","#E88E2D","#CA5800","#843215"],"shades-magenta":["#F5CBDF","#EB99C2","#E46AA7","#E54096","#EC008B","#AF1F6B","#761548","#351123"],"shades-green":["#DCEDD9","#BCDEB4","#98CF90","#78C26D","#55B748","#408941","#2C5C2D","#1A2E19"],"shades-black":["#D5D5D4","#ADABAC","#848081","#5C5859","#332D2F","#262223","#1A1717","#0E0C0D"],"shades-red":["#F8D5D4","#F1AAA9","#E9807D","#E25552","#DB2B27","#A4201D","#6E1614","#370B0A"],"one-group":["#1696d2","#000000"],"two-groups-cat-1":["#1696d2","#000000"],"two-groups-cat-2":["#1696d2","#fdbf11"],"two-groups-cat-3":["#1696d2","#db2b27"],"two-groups-seq":["#a2d4ec","#1696d2"],"three-groups-cat":["#1696d2","#fdbf11","#000000"],"three-groups-seq":["#a2d4ec","#1696d2","#0a4c6a"],"four-groups-cat-1":["#000000","#d2d2d2","#fdbf11","#1696d2"],"four-groups-cat-2":["#1696d2","#ec0008b","#fdbf11","#5c5859"],"four-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a"],"five-groups-cat-1":["#1696d2","#fdbf11","#d2d2d2","#ec008b","#000000"],"five-groups-cat-2":["#1696d2","#0a4c6a","#d2d2d2","#fdbf11","#332d2f"],"five-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a","#000000"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-cat-2":["#1696d2","#d2d2d2","#ec008b","#fdbf11","#332d2f","#0a4c6a"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},lwe={background:iwe,title:{anchor:"start",fontSize:swe,font:Pb},axisX:{domain:!0,domainColor:oD,domainWidth:1,grid:!1,labelFontSize:12,labelFont:V4,labelAngle:0,tickColor:oD,tickSize:5,titleFontSize:12,titlePadding:10,titleFont:Pb},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:owe,gridWidth:1,labelFontSize:12,labelFont:V4,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:Pb,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:V4,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:Pb,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:Q1["six-groups-cat-1"],diverging:Q1["diverging-colors"],heatmap:Q1["diverging-colors"],ordinal:Q1["six-groups-seq"],ramp:Q1["shades-blue"]},area:{fill:uc},rect:{fill:uc},line:{color:uc,stroke:uc,strokeWidth:5},trail:{color:uc,stroke:uc,strokeWidth:0,size:1},path:{stroke:uc,strokeWidth:.5},point:{filled:!0},text:{font:awe,color:uc,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:uc,stroke:null}},arc:{fill:uc},shape:{stroke:uc},symbol:{fill:uc,size:30}},Xp="#3366CC",sD="#ccc",Db="Arial, sans-serif",uwe={arc:{fill:Xp},area:{fill:Xp},path:{stroke:Xp},rect:{fill:Xp},shape:{stroke:Xp},symbol:{stroke:Xp},circle:{fill:Xp},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:Db,fontSize:12},"guide-title":{font:Db,fontSize:12},"group-title":{font:Db,fontSize:12}},title:{font:Db,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:sD,tickColor:sD,domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},U8=t=>t*(1/3+1),lD=U8(9),uD=U8(10),cD=U8(12),ev="Segoe UI",fD="wf_standard-font, helvetica, arial, sans-serif",hD="#252423",tv="#605E5C",dD="transparent",cwe="#C8C6C4",qc="#118DFF",fwe="#12239E",hwe="#E66C37",dwe="#6B007B",pwe="#E044A7",gwe="#744EC2",mwe="#D9B300",vwe="#D64550",IH=qc,zH="#DEEFFF",pD=[zH,IH],ywe=[zH,"#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff",IH],xwe={view:{stroke:dD},background:dD,font:ev,header:{titleFont:fD,titleFontSize:cD,titleColor:hD,labelFont:ev,labelFontSize:uD,labelColor:tv},axis:{ticks:!1,grid:!1,domain:!1,labelColor:tv,labelFontSize:lD,titleFont:fD,titleColor:hD,titleFontSize:cD,titleFontWeight:"normal"},axisQuantitative:{tickCount:3,grid:!0,gridColor:cwe,gridDash:[1,5],labelFlush:!1},axisBand:{tickExtra:!0},axisX:{labelPadding:5},axisY:{labelPadding:10},bar:{fill:qc},line:{stroke:qc,strokeWidth:3,strokeCap:"round",strokeJoin:"round"},text:{font:ev,fontSize:lD,fill:tv},arc:{fill:qc},area:{fill:qc,line:!0,opacity:.6},path:{stroke:qc},rect:{fill:qc},point:{fill:qc,filled:!0,size:75},shape:{stroke:qc},symbol:{fill:qc,strokeWidth:1.5,size:50},legend:{titleFont:ev,titleFontWeight:"bold",titleColor:tv,labelFont:ev,labelFontSize:uD,labelColor:tv,symbolType:"circle",symbolSize:75},range:{category:[qc,fwe,hwe,dwe,pwe,gwe,mwe,vwe],diverging:pD,heatmap:pD,ordinal:ywe}},bwe=H2e.version;var _we=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",dark:G2e,excel:W2e,fivethirtyeight:Z2e,ggplot2:J2e,googlecharts:uwe,latimes:twe,powerbi:xwe,quartz:nwe,urbaninstitute:lwe,version:bwe,vox:rwe});/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */function wwe(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(t);fn(bi(o)?o:gD(o,e))).join(", ")}]`;if(Ei(t)){let o="";const f=t,{title:r,image:a}=f,l=wwe(f,["title","image"]);r&&(o+=`

${n(r)}

`),a&&(o+=``);const c=Object.keys(l);if(c.length>0){o+="";for(const i of c){let s=l[i];s!==void 0&&(Ei(s)&&(s=gD(s,e)),o+=``)}o+="
${n(i)}:${n(s)}
"}return o||"{}"}return n(t)}function Twe(t){const n=[];return function(e,o){if(typeof o!="object"||o===null)return o;const f=n.indexOf(this)+1;return n.length=f,n.length>t?"[Object]":n.indexOf(o)>=0?"[Circular]":(n.push(o),o)}}function gD(t,n){return JSON.stringify(t,Twe(n))}var Awe=`#vg-tooltip-element { + visibility: hidden; + padding: 8px; + position: fixed; + z-index: 1000; + font-family: sans-serif; + font-size: 11px; + border-radius: 3px; + box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); + /* The default theme is the light theme. */ + background-color: rgba(255, 255, 255, 0.95); + border: 1px solid #d9d9d9; + color: black; +} +#vg-tooltip-element.visible { + visibility: visible; +} +#vg-tooltip-element h2 { + margin-top: 0; + margin-bottom: 10px; + font-size: 13px; +} +#vg-tooltip-element img { + max-width: 200px; + max-height: 200px; +} +#vg-tooltip-element table { + border-spacing: 0; +} +#vg-tooltip-element table tr { + border: none; +} +#vg-tooltip-element table tr td { + overflow: hidden; + text-overflow: ellipsis; + padding-top: 2px; + padding-bottom: 2px; +} +#vg-tooltip-element table tr td.key { + color: #808080; + max-width: 150px; + text-align: right; + padding-right: 4px; +} +#vg-tooltip-element table tr td.value { + display: block; + max-width: 300px; + max-height: 7em; + text-align: left; +} +#vg-tooltip-element.dark-theme { + background-color: rgba(32, 32, 32, 0.9); + border: 1px solid #f5f5f5; + color: white; +} +#vg-tooltip-element.dark-theme td.key { + color: #bfbfbf; +} +`;const RH="vg-tooltip-element",Mwe={offsetX:10,offsetY:10,id:RH,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:Swe,maxDepth:2,formatTooltip:kwe};function Swe(t){return String(t).replace(/&/g,"&").replace(/window.innerWidth&&(f=+t.clientX-e-n.width);let r=t.clientY+o;return r+n.height>window.innerHeight&&(r=+t.clientY-o-n.height),{x:f,y:r}}class Owe{constructor(n){this.options=Object.assign(Object.assign({},Mwe),n);const e=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const o=document.createElement("style");o.setAttribute("id",this.options.styleId),o.innerHTML=Ewe(e);const f=document.head;f.childNodes.length>0?f.insertBefore(o,f.childNodes[0]):f.appendChild(o)}}tooltipHandler(n,e,o,f){var r;if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),((r=document.fullscreenElement)!==null&&r!==void 0?r:document.body).appendChild(this.el)),f==null||f===""){this.el.classList.remove("visible",`${this.options.theme}-theme`);return}this.el.innerHTML=this.options.formatTooltip(f,this.options.sanitize,this.options.maxDepth),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:a,y:l}=Cwe(e,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY);this.el.setAttribute("style",`top: ${l}px; left: ${a}px`)}}function Lwe(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function mD(t,n,e,o,f,r,a){try{var l=t[r](a),c=l.value}catch(i){e(i);return}l.done?n(c):Promise.resolve(c).then(o,f)}function B2(t){return function(){var n=this,e=arguments;return new Promise(function(o,f){var r=t.apply(n,e);function a(c){mD(r,o,f,a,l,"next",c)}function l(c){mD(r,o,f,a,l,"throw",c)}a(void 0)})}}var FH=Object.prototype,l0=FH.hasOwnProperty,Rf,V8=typeof Symbol=="function"?Symbol:{},B3=V8.iterator||"@@iterator",Pwe=V8.asyncIterator||"@@asyncIterator",j2=V8.toStringTag||"@@toStringTag";function NH(t,n,e,o){var f=n&&n.prototype instanceof fA?n:fA,r=Object.create(f.prototype),a=new hA(o||[]);return r._invoke=Fwe(t,e,a),r}function q8(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(o){return{type:"throw",arg:o}}}var vD="suspendedStart",Dwe="suspendedYield",yD="executing",Ib="completed",Kc={};function fA(){}function j3(){}function Fm(){}var H8={};H8[B3]=function(){return this};var q4=Object.getPrototypeOf,zb=q4&&q4(q4($8([])));zb&&zb!==FH&&l0.call(zb,B3)&&(H8=zb);var s1=Fm.prototype=fA.prototype=Object.create(H8);j3.prototype=s1.constructor=Fm;Fm.constructor=j3;Fm[j2]=j3.displayName="GeneratorFunction";function BH(t){["next","throw","return"].forEach(function(n){t[n]=function(e){return this._invoke(n,e)}})}function jH(t){var n=typeof t=="function"&&t.constructor;return n?n===j3||(n.displayName||n.name)==="GeneratorFunction":!1}function Iwe(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,Fm):(t.__proto__=Fm,j2 in t||(t[j2]="GeneratorFunction")),t.prototype=Object.create(s1),t}function zwe(t){return{__await:t}}function U3(t,n){function e(r,a,l,c){var i=q8(t[r],t,a);if(i.type==="throw")c(i.arg);else{var s=i.arg,u=s.value;return u&&typeof u=="object"&&l0.call(u,"__await")?n.resolve(u.__await).then(function(d){e("next",d,l,c)},function(d){e("throw",d,l,c)}):n.resolve(u).then(function(d){s.value=d,l(s)},function(d){return e("throw",d,l,c)})}}var o;function f(r,a){function l(){return new n(function(c,i){e(r,a,c,i)})}return o=o?o.then(l,l):l()}this._invoke=f}BH(U3.prototype);U3.prototype[Pwe]=function(){return this};function Rwe(t,n,e,o,f){f===void 0&&(f=Promise);var r=new U3(NH(t,n,e,o),f);return jH(n)?r:r.next().then(function(a){return a.done?a.value:r.next()})}function Fwe(t,n,e){var o=vD;return function(r,a){if(o===yD)throw new Error("Generator is already running");if(o===Ib){if(r==="throw")throw a;return VH()}for(e.method=r,e.arg=a;;){var l=e.delegate;if(l){var c=UH(l,e);if(c){if(c===Kc)continue;return c}}if(e.method==="next")e.sent=e._sent=e.arg;else if(e.method==="throw"){if(o===vD)throw o=Ib,e.arg;e.dispatchException(e.arg)}else e.method==="return"&&e.abrupt("return",e.arg);o=yD;var i=q8(t,n,e);if(i.type==="normal"){if(o=e.done?Ib:Dwe,i.arg===Kc)continue;return{value:i.arg,done:e.done}}else i.type==="throw"&&(o=Ib,e.method="throw",e.arg=i.arg)}}}function UH(t,n){var e=t.iterator[n.method];if(e===Rf){if(n.delegate=null,n.method==="throw"){if(t.iterator.return&&(n.method="return",n.arg=Rf,UH(t,n),n.method==="throw"))return Kc;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return Kc}var o=q8(e,t.iterator,n.arg);if(o.type==="throw")return n.method="throw",n.arg=o.arg,n.delegate=null,Kc;var f=o.arg;if(!f)return n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,Kc;if(f.done)n[t.resultName]=f.value,n.next=t.nextLoc,n.method!=="return"&&(n.method="next",n.arg=Rf);else return f;return n.delegate=null,Kc}BH(s1);s1[j2]="Generator";s1[B3]=function(){return this};s1.toString=function(){return"[object Generator]"};function Nwe(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function H4(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function hA(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Nwe,this),this.reset(!0)}function Bwe(t){var n=[];for(var e in t)n.push(e);return n.reverse(),function o(){for(;n.length;){var f=n.pop();if(f in t)return o.value=f,o.done=!1,o}return o.done=!0,o}}function $8(t){if(t){var n=t[B3];if(n)return n.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var e=-1,o=function f(){for(;++e=0;--f){var r=this.tryEntries[f],a=r.completion;if(r.tryLoc==="root")return o("end");if(r.tryLoc<=this.prev){var l=l0.call(r,"catchLoc"),c=l0.call(r,"finallyLoc");if(l&&c){if(this.prev=0;--o){var f=this.tryEntries[o];if(f.tryLoc<=this.prev&&l0.call(f,"finallyLoc")&&this.prev=0;--e){var o=this.tryEntries[e];if(o.finallyLoc===n)return this.complete(o.completion,o.afterLoc),H4(o),Kc}},catch:function(n){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc===n){var f=o.completion;if(f.type==="throw"){var r=f.arg;H4(o)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(n,e,o){return this.delegate={iterator:$8(n),resultName:e,nextLoc:o},this.method==="next"&&(this.arg=Rf),Kc}};var jf={wrap:NH,isGeneratorFunction:jH,AsyncIterator:U3,mark:Iwe,awrap:zwe,async:Rwe,keys:Bwe,values:$8},jwe=Za;Za.Node=j0;Za.create=Za;function Za(t){var n=this;if(n instanceof Za||(n=new Za),n.tail=null,n.head=null,n.length=0,t&&typeof t.forEach=="function")t.forEach(function(f){n.push(f)});else if(arguments.length>0)for(var e=0,o=arguments.length;e1)e=n;else if(this.head)o=this.head.next,e=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var f=0;o!==null;f++)e=t(e,o.value,f),o=o.next;return e};Za.prototype.reduceReverse=function(t,n){var e,o=this.tail;if(arguments.length>1)e=n;else if(this.tail)o=this.tail.prev,e=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var f=this.length-1;o!==null;f--)e=t(e,o.value,f),o=o.prev;return e};Za.prototype.toArray=function(){for(var t=new Array(this.length),n=0,e=this.head;e!==null;n++)t[n]=e.value,e=e.next;return t};Za.prototype.toArrayReverse=function(){for(var t=new Array(this.length),n=0,e=this.tail;e!==null;n++)t[n]=e.value,e=e.prev;return t};Za.prototype.slice=function(t,n){n=n||this.length,n<0&&(n+=this.length),t=t||0,t<0&&(t+=this.length);var e=new Za;if(nthis.length&&(n=this.length);for(var o=0,f=this.head;f!==null&&othis.length&&(n=this.length);for(var o=this.length,f=this.tail;f!==null&&o>n;o--)f=f.prev;for(;f!==null&&o>t;o--,f=f.prev)e.push(f.value);return e};Za.prototype.splice=function(t,n){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var e=0,o=this.head;o!==null&&e1;class $we{constructor(n){if(typeof n=="number"&&(n={max:n}),n||(n={}),n.max&&(typeof n.max!="number"||n.max<0))throw new TypeError("max must be a non-negative number");this[i0]=n.max||1/0;var e=n.length||$4;if(this[Ug]=typeof e!="function"?$4:e,this[Vv]=n.stale||!1,n.maxAge&&typeof n.maxAge!="number")throw new TypeError("maxAge must be a number");this[u0]=n.maxAge||0,this[Ch]=n.dispose,this[xD]=n.noDisposeOnSet||!1,this[qH]=n.updateAgeOnGet||!1,this.reset()}set max(n){if(typeof n!="number"||n<0)throw new TypeError("max must be a non-negative number");this[i0]=n||1/0,nv(this)}get max(){return this[i0]}set allowStale(n){this[Vv]=!!n}get allowStale(){return this[Vv]}set maxAge(n){if(typeof n!="number")throw new TypeError("maxAge must be a non-negative number");this[u0]=n,nv(this)}get maxAge(){return this[u0]}set lengthCalculator(n){typeof n!="function"&&(n=$4),n!==this[Ug]&&(this[Ug]=n,this[Dh]=0,this[tl].forEach(e=>{e.length=this[Ug](e.value,e.key),this[Dh]+=e.length})),nv(this)}get lengthCalculator(){return this[Ug]}get length(){return this[Dh]}get itemCount(){return this[tl].length}rforEach(n,e){e=e||this;for(var o=this[tl].tail;o!==null;){var f=o.prev;bD(this,n,o,e),o=f}}forEach(n,e){e=e||this;for(var o=this[tl].head;o!==null;){var f=o.next;bD(this,n,o,e),o=f}}keys(){return this[tl].toArray().map(n=>n.key)}values(){return this[tl].toArray().map(n=>n.value)}reset(){this[Ch]&&this[tl]&&this[tl].length&&this[tl].forEach(n=>this[Ch](n.key,n.value)),this[Hc]=new Map,this[tl]=new Hwe,this[Dh]=0}dump(){return this[tl].map(n=>U2(this,n)?!1:{k:n.key,v:n.value,e:n.now+(n.maxAge||0)}).toArray().filter(n=>n)}dumpLru(){return this[tl]}set(n,e,o){if(o=o||this[u0],o&&typeof o!="number")throw new TypeError("maxAge must be a number");var f=o?Date.now():0,r=this[Ug](e,n);if(this[Hc].has(n)){if(r>this[i0])return sm(this,this[Hc].get(n)),!1;var a=this[Hc].get(n),l=a.value;return this[Ch]&&(this[xD]||this[Ch](n,l.value)),l.now=f,l.maxAge=o,l.value=e,this[Dh]+=r-l.length,l.length=r,this.get(n),nv(this),!0}var c=new Gwe(n,e,r,f,o);return c.length>this[i0]?(this[Ch]&&this[Ch](n,e),!1):(this[Dh]+=c.length,this[tl].unshift(c),this[Hc].set(n,this[tl].head),nv(this),!0)}has(n){if(!this[Hc].has(n))return!1;var e=this[Hc].get(n).value;return!U2(this,e)}get(n){return G4(this,n,!0)}peek(n){return G4(this,n,!1)}pop(){var n=this[tl].tail;return n?(sm(this,n),n.value):null}del(n){sm(this,this[Hc].get(n))}load(n){this.reset();for(var e=Date.now(),o=n.length-1;o>=0;o--){var f=n[o],r=f.e||0;if(r===0)this.set(f.k,f.v);else{var a=r-e;a>0&&this.set(f.k,f.v,a)}}}prune(){this[Hc].forEach((n,e)=>G4(this,e,!1))}}var G4=(t,n,e)=>{var o=t[Hc].get(n);if(o){var f=o.value;if(U2(t,f)){if(sm(t,o),!t[Vv])return}else e&&(t[qH]&&(o.value.now=Date.now()),t[tl].unshiftNode(o));return f.value}},U2=(t,n)=>{if(!n||!n.maxAge&&!t[u0])return!1;var e=Date.now()-n.now;return n.maxAge?e>n.maxAge:t[u0]&&e>t[u0]},nv=t=>{if(t[Dh]>t[i0])for(var n=t[tl].tail;t[Dh]>t[i0]&&n!==null;){var e=n.prev;sm(t,n),n=e}},sm=(t,n)=>{if(n){var e=n.value;t[Ch]&&t[Ch](e.key,e.value),t[Dh]-=e.length,t[Hc].delete(e.key),t[tl].removeNode(n)}};class Gwe{constructor(n,e,o,f,r){this.key=n,this.value=e,this.length=o,this.now=f,this.maxAge=r||0}}var bD=(t,n,e,o)=>{var f=e.value;U2(t,f)&&(sm(t,e),t[Vv]||(f=void 0)),f&&n.call(o,f.value,f.key,t)},Wwe=$we,Ywe=["includePrerelease","loose","rtl"],Xwe=t=>t?typeof t!="object"?{loose:!0}:Ywe.filter(n=>t[n]).reduce((n,e)=>(n[e]=!0,n),{}):{},G8=Xwe,Qc={exports:{}},Zwe="2.0.0",Jwe=256,Kwe=Number.MAX_SAFE_INTEGER||9007199254740991,Qwe=16,W8={SEMVER_SPEC_VERSION:Zwe,MAX_LENGTH:Jwe,MAX_SAFE_INTEGER:Kwe,MAX_SAFE_COMPONENT_LENGTH:Qwe},e3e=typeof process=="object"&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?function(){for(var t=arguments.length,n=new Array(t),e=0;e{},V3=e3e;(function(t,n){var e=W8.MAX_SAFE_COMPONENT_LENGTH,o=V3;n=t.exports={};var f=n.re=[],r=n.src=[],a=n.t={},l=0,c=(i,s,u)=>{var d=l++;o(i,d,s),a[i]=d,r[d]=s,f[d]=new RegExp(s,u?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION","(".concat(r[a.NUMERICIDENTIFIER],")\\.")+"(".concat(r[a.NUMERICIDENTIFIER],")\\.")+"(".concat(r[a.NUMERICIDENTIFIER],")")),c("MAINVERSIONLOOSE","(".concat(r[a.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(r[a.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(r[a.NUMERICIDENTIFIERLOOSE],")")),c("PRERELEASEIDENTIFIER","(?:".concat(r[a.NUMERICIDENTIFIER],"|").concat(r[a.NONNUMERICIDENTIFIER],")")),c("PRERELEASEIDENTIFIERLOOSE","(?:".concat(r[a.NUMERICIDENTIFIERLOOSE],"|").concat(r[a.NONNUMERICIDENTIFIER],")")),c("PRERELEASE","(?:-(".concat(r[a.PRERELEASEIDENTIFIER],"(?:\\.").concat(r[a.PRERELEASEIDENTIFIER],")*))")),c("PRERELEASELOOSE","(?:-?(".concat(r[a.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(r[a.PRERELEASEIDENTIFIERLOOSE],")*))")),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD","(?:\\+(".concat(r[a.BUILDIDENTIFIER],"(?:\\.").concat(r[a.BUILDIDENTIFIER],")*))")),c("FULLPLAIN","v?".concat(r[a.MAINVERSION]).concat(r[a.PRERELEASE],"?").concat(r[a.BUILD],"?")),c("FULL","^".concat(r[a.FULLPLAIN],"$")),c("LOOSEPLAIN","[v=\\s]*".concat(r[a.MAINVERSIONLOOSE]).concat(r[a.PRERELEASELOOSE],"?").concat(r[a.BUILD],"?")),c("LOOSE","^".concat(r[a.LOOSEPLAIN],"$")),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE","".concat(r[a.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),c("XRANGEIDENTIFIER","".concat(r[a.NUMERICIDENTIFIER],"|x|X|\\*")),c("XRANGEPLAIN","[v=\\s]*(".concat(r[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(r[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(r[a.XRANGEIDENTIFIER],")")+"(?:".concat(r[a.PRERELEASE],")?").concat(r[a.BUILD],"?")+")?)?"),c("XRANGEPLAINLOOSE","[v=\\s]*(".concat(r[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(r[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(r[a.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(r[a.PRERELEASELOOSE],")?").concat(r[a.BUILD],"?")+")?)?"),c("XRANGE","^".concat(r[a.GTLT],"\\s*").concat(r[a.XRANGEPLAIN],"$")),c("XRANGELOOSE","^".concat(r[a.GTLT],"\\s*").concat(r[a.XRANGEPLAINLOOSE],"$")),c("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(e,"})")+"(?:\\.(\\d{1,".concat(e,"}))?")+"(?:\\.(\\d{1,".concat(e,"}))?")+"(?:$|[^\\d])"),c("COERCERTL",r[a.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM","(\\s*)".concat(r[a.LONETILDE],"\\s+"),!0),n.tildeTrimReplace="$1~",c("TILDE","^".concat(r[a.LONETILDE]).concat(r[a.XRANGEPLAIN],"$")),c("TILDELOOSE","^".concat(r[a.LONETILDE]).concat(r[a.XRANGEPLAINLOOSE],"$")),c("LONECARET","(?:\\^)"),c("CARETTRIM","(\\s*)".concat(r[a.LONECARET],"\\s+"),!0),n.caretTrimReplace="$1^",c("CARET","^".concat(r[a.LONECARET]).concat(r[a.XRANGEPLAIN],"$")),c("CARETLOOSE","^".concat(r[a.LONECARET]).concat(r[a.XRANGEPLAINLOOSE],"$")),c("COMPARATORLOOSE","^".concat(r[a.GTLT],"\\s*(").concat(r[a.LOOSEPLAIN],")$|^$")),c("COMPARATOR","^".concat(r[a.GTLT],"\\s*(").concat(r[a.FULLPLAIN],")$|^$")),c("COMPARATORTRIM","(\\s*)".concat(r[a.GTLT],"\\s*(").concat(r[a.LOOSEPLAIN],"|").concat(r[a.XRANGEPLAIN],")"),!0),n.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE","^\\s*(".concat(r[a.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(r[a.XRANGEPLAIN],")")+"\\s*$"),c("HYPHENRANGELOOSE","^\\s*(".concat(r[a.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(r[a.XRANGEPLAINLOOSE],")")+"\\s*$"),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Qc,Qc.exports);var _D=/^[0-9]+$/,HH=(t,n)=>{var e=_D.test(t),o=_D.test(n);return e&&o&&(t=+t,n=+n),t===n?0:e&&!o?-1:o&&!e?1:tHH(n,t),n3e={compareIdentifiers:HH,rcompareIdentifiers:t3e},Rb=V3,wD=W8.MAX_LENGTH,Fb=W8.MAX_SAFE_INTEGER,kD=Qc.exports.re,TD=Qc.exports.t,r3e=G8,Vg=n3e.compareIdentifiers;class $c{constructor(n,e){if(e=r3e(e),n instanceof $c){if(n.loose===!!e.loose&&n.includePrerelease===!!e.includePrerelease)return n;n=n.version}else if(typeof n!="string")throw new TypeError("Invalid Version: ".concat(n));if(n.length>wD)throw new TypeError("version is longer than ".concat(wD," characters"));Rb("SemVer",n,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;var o=n.trim().match(e.loose?kD[TD.LOOSE]:kD[TD.FULL]);if(!o)throw new TypeError("Invalid Version: ".concat(n));if(this.raw=n,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>Fb||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Fb||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Fb||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(f=>{if(/^[0-9]+$/.test(f)){var r=+f;if(r>=0&&r=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);o===-1&&this.prerelease.push(0)}e&&(Vg(this.prerelease[0],e)===0?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: ".concat(n))}return this.format(),this.raw=this.version,this}}var Y8=$c,AD=Y8,i3e=(t,n,e)=>new AD(t,e).compare(new AD(n,e)),l1=i3e,a3e=l1,o3e=(t,n,e)=>a3e(t,n,e)===0,s3e=o3e,l3e=l1,u3e=(t,n,e)=>l3e(t,n,e)!==0,c3e=u3e,f3e=l1,h3e=(t,n,e)=>f3e(t,n,e)>0,d3e=h3e,p3e=l1,g3e=(t,n,e)=>p3e(t,n,e)>=0,m3e=g3e,v3e=l1,y3e=(t,n,e)=>v3e(t,n,e)<0,x3e=y3e,b3e=l1,_3e=(t,n,e)=>b3e(t,n,e)<=0,w3e=_3e,k3e=s3e,T3e=c3e,A3e=d3e,M3e=m3e,S3e=x3e,E3e=w3e,C3e=(t,n,e,o)=>{switch(n){case"===":return typeof t=="object"&&(t=t.version),typeof e=="object"&&(e=e.version),t===e;case"!==":return typeof t=="object"&&(t=t.version),typeof e=="object"&&(e=e.version),t!==e;case"":case"=":case"==":return k3e(t,e,o);case"!=":return T3e(t,e,o);case">":return A3e(t,e,o);case">=":return M3e(t,e,o);case"<":return S3e(t,e,o);case"<=":return E3e(t,e,o);default:throw new TypeError("Invalid operator: ".concat(n))}},O3e=C3e,W4,MD;function L3e(){if(MD)return W4;MD=1;var t=Symbol("SemVer ANY");class n{static get ANY(){return t}constructor(s,u){if(u=e(u),s instanceof n){if(s.loose===!!u.loose)return s;s=s.value}a("comparator",s,u),this.options=u,this.loose=!!u.loose,this.parse(s),this.semver===t?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(s){var u=this.options.loose?o[f.COMPARATORLOOSE]:o[f.COMPARATOR],d=s.match(u);if(!d)throw new TypeError("Invalid comparator: ".concat(s));this.operator=d[1]!==void 0?d[1]:"",this.operator==="="&&(this.operator=""),d[2]?this.semver=new l(d[2],this.options.loose):this.semver=t}toString(){return this.value}test(s){if(a("Comparator.test",s,this.options.loose),this.semver===t||s===t)return!0;if(typeof s=="string")try{s=new l(s,this.options)}catch{return!1}return r(s,this.operator,this.semver,this.options)}intersects(s,u){if(!(s instanceof n))throw new TypeError("a Comparator is required");if((!u||typeof u!="object")&&(u={loose:!!u,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new c(s.value,u).test(this.value);if(s.operator==="")return s.value===""?!0:new c(this.value,u).test(s.semver);var d=(this.operator===">="||this.operator===">")&&(s.operator===">="||s.operator===">"),h=(this.operator==="<="||this.operator==="<")&&(s.operator==="<="||s.operator==="<"),m=this.semver.version===s.semver.version,g=(this.operator===">="||this.operator==="<=")&&(s.operator===">="||s.operator==="<="),p=r(this.semver,"<",s.semver,u)&&(this.operator===">="||this.operator===">")&&(s.operator==="<="||s.operator==="<"),v=r(this.semver,">",s.semver,u)&&(this.operator==="<="||this.operator==="<")&&(s.operator===">="||s.operator===">");return d||h||m&&g||p||v}}W4=n;var e=G8,o=Qc.exports.re,f=Qc.exports.t,r=O3e,a=V3,l=Y8,c=$H();return W4}function SD(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=P3e(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var o=0,f=function(){};return{s:f,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(i){throw i},f}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r=!0,a=!1,l;return{s:function(){e=e.call(t)},n:function(){var i=e.next();return r=i.done,i},e:function(i){a=!0,l=i},f:function(){try{!r&&e.return!=null&&e.return()}finally{if(a)throw l}}}}function P3e(t,n){if(!!t){if(typeof t=="string")return ED(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return ED(t,n)}}function ED(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,o=new Array(n);ethis.parseRange(P.trim())).filter(P=>P.length),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(E));if(this.set.length>1){var O=this.set[0];if(this.set=this.set.filter(P=>!d(P[0])),this.set.length===0)this.set=[O];else if(this.set.length>1){var R=SD(this.set),z;try{for(R.s();!(z=R.n()).done;){var L=z.value;if(L.length===1&&h(L[0])){this.set=[L];break}}}catch(P){R.e(P)}finally{R.f()}}}this.format()}format(){return this.range=this.set.map(E=>E.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(E){E=E.trim();var D=Object.keys(this.options).join(","),O="parseRange:".concat(D,":").concat(E),R=e.get(O);if(R)return R;var z=this.options.loose,L=z?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];E=E.replace(L,S(this.options.includePrerelease)),r("hyphen replace",E),E=E.replace(l[c.COMPARATORTRIM],i),r("comparator trim",E),E=E.replace(l[c.TILDETRIM],s),E=E.replace(l[c.CARETTRIM],u),E=E.split(/\s+/).join(" ");var P=E.split(" ").map(Y=>g(Y,this.options)).join(" ").split(/\s+/).map(Y=>_(Y,this.options));z&&(P=P.filter(Y=>(r("loose invalid filter",Y,this.options),!!Y.match(l[c.COMPARATORLOOSE])))),r("range list",P);var N=new Map,B=P.map(Y=>new f(Y,this.options)),G=SD(B),W;try{for(G.s();!(W=G.n()).done;){var K=W.value;if(d(K))return[K];N.set(K.value,K)}}catch(Y){G.e(Y)}finally{G.f()}N.size>1&&N.has("")&&N.delete("");var te=[...N.values()];return e.set(O,te),te}intersects(E,D){if(!(E instanceof t))throw new TypeError("a Range is required");return this.set.some(O=>m(O,D)&&E.set.some(R=>m(R,D)&&O.every(z=>R.every(L=>z.intersects(L,D)))))}test(E){if(!E)return!1;if(typeof E=="string")try{E=new a(E,this.options)}catch{return!1}for(var D=0;DM.value==="<0.0.0-0",h=M=>M.value==="",m=(M,E)=>{for(var D=!0,O=M.slice(),R=O.pop();D&&O.length;)D=O.every(z=>R.intersects(z,E)),R=O.pop();return D},g=(M,E)=>(r("comp",M,E),M=x(M,E),r("caret",M),M=v(M,E),r("tildes",M),M=k(M,E),r("xrange",M),M=T(M,E),r("stars",M),M),p=M=>!M||M.toLowerCase()==="x"||M==="*",v=(M,E)=>M.trim().split(/\s+/).map(D=>y(D,E)).join(" "),y=(M,E)=>{var D=E.loose?l[c.TILDELOOSE]:l[c.TILDE];return M.replace(D,(O,R,z,L,P)=>{r("tilde",M,O,R,z,L,P);var N;return p(R)?N="":p(z)?N=">=".concat(R,".0.0 <").concat(+R+1,".0.0-0"):p(L)?N=">=".concat(R,".").concat(z,".0 <").concat(R,".").concat(+z+1,".0-0"):P?(r("replaceTilde pr",P),N=">=".concat(R,".").concat(z,".").concat(L,"-").concat(P," <").concat(R,".").concat(+z+1,".0-0")):N=">=".concat(R,".").concat(z,".").concat(L," <").concat(R,".").concat(+z+1,".0-0"),r("tilde return",N),N})},x=(M,E)=>M.trim().split(/\s+/).map(D=>w(D,E)).join(" "),w=(M,E)=>{r("caret",M,E);var D=E.loose?l[c.CARETLOOSE]:l[c.CARET],O=E.includePrerelease?"-0":"";return M.replace(D,(R,z,L,P,N)=>{r("caret",M,R,z,L,P,N);var B;return p(z)?B="":p(L)?B=">=".concat(z,".0.0").concat(O," <").concat(+z+1,".0.0-0"):p(P)?z==="0"?B=">=".concat(z,".").concat(L,".0").concat(O," <").concat(z,".").concat(+L+1,".0-0"):B=">=".concat(z,".").concat(L,".0").concat(O," <").concat(+z+1,".0.0-0"):N?(r("replaceCaret pr",N),z==="0"?L==="0"?B=">=".concat(z,".").concat(L,".").concat(P,"-").concat(N," <").concat(z,".").concat(L,".").concat(+P+1,"-0"):B=">=".concat(z,".").concat(L,".").concat(P,"-").concat(N," <").concat(z,".").concat(+L+1,".0-0"):B=">=".concat(z,".").concat(L,".").concat(P,"-").concat(N," <").concat(+z+1,".0.0-0")):(r("no pr"),z==="0"?L==="0"?B=">=".concat(z,".").concat(L,".").concat(P).concat(O," <").concat(z,".").concat(L,".").concat(+P+1,"-0"):B=">=".concat(z,".").concat(L,".").concat(P).concat(O," <").concat(z,".").concat(+L+1,".0-0"):B=">=".concat(z,".").concat(L,".").concat(P," <").concat(+z+1,".0.0-0")),r("caret return",B),B})},k=(M,E)=>(r("replaceXRanges",M,E),M.split(/\s+/).map(D=>b(D,E)).join(" ")),b=(M,E)=>{M=M.trim();var D=E.loose?l[c.XRANGELOOSE]:l[c.XRANGE];return M.replace(D,(O,R,z,L,P,N)=>{r("xRange",M,O,R,z,L,P,N);var B=p(z),G=B||p(L),W=G||p(P),K=W;return R==="="&&K&&(R=""),N=E.includePrerelease?"-0":"",B?R===">"||R==="<"?O="<0.0.0-0":O="*":R&&K?(G&&(L=0),P=0,R===">"?(R=">=",G?(z=+z+1,L=0,P=0):(L=+L+1,P=0)):R==="<="&&(R="<",G?z=+z+1:L=+L+1),R==="<"&&(N="-0"),O="".concat(R+z,".").concat(L,".").concat(P).concat(N)):G?O=">=".concat(z,".0.0").concat(N," <").concat(+z+1,".0.0-0"):W&&(O=">=".concat(z,".").concat(L,".0").concat(N," <").concat(z,".").concat(+L+1,".0-0")),r("xRange return",O),O})},T=(M,E)=>(r("replaceStars",M,E),M.trim().replace(l[c.STAR],"")),_=(M,E)=>(r("replaceGTE0",M,E),M.trim().replace(l[E.includePrerelease?c.GTE0PRE:c.GTE0],"")),S=M=>(E,D,O,R,z,L,P,N,B,G,W,K,te)=>(p(O)?D="":p(R)?D=">=".concat(O,".0.0").concat(M?"-0":""):p(z)?D=">=".concat(O,".").concat(R,".0").concat(M?"-0":""):L?D=">=".concat(D):D=">=".concat(D).concat(M?"-0":""),p(B)?N="":p(G)?N="<".concat(+B+1,".0.0-0"):p(W)?N="<".concat(B,".").concat(+G+1,".0-0"):K?N="<=".concat(B,".").concat(G,".").concat(W,"-").concat(K):M?N="<".concat(B,".").concat(G,".").concat(+W+1,"-0"):N="<=".concat(N),"".concat(D," ").concat(N).trim()),A=(M,E,D)=>{for(var O=0;O0){var z=M[R].semver;if(z.major===E.major&&z.minor===E.minor&&z.patch===E.patch)return!0}return!1}return!0};return Y4}var D3e=$H(),I3e=(t,n,e)=>{try{n=new D3e(n,e)}catch{return!1}return n.test(t)},GH=I3e;function z3e(t,n,e){var o=t.open(n),f=1e4,r=250,a=new URL(n),l=a.origin,c=~~(f/r);function i(u){u.source===o&&(c=0,t.removeEventListener("message",i,!1))}t.addEventListener("message",i,!1);function s(){c<=0||(o.postMessage(e,l),setTimeout(s,r),c-=1)}setTimeout(s,r)}var R3e=`.vega-embed { + position: relative; + display: inline-block; + box-sizing: border-box; +} +.vega-embed.has-actions { + padding-right: 38px; +} +.vega-embed details:not([open]) > :not(summary) { + display: none !important; +} +.vega-embed summary { + list-style: none; + position: absolute; + top: 0; + right: 0; + padding: 6px; + z-index: 1000; + background: white; + box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1); + color: #1b1e23; + border: 1px solid #aaa; + border-radius: 999px; + opacity: 0.2; + transition: opacity 0.4s ease-in; + cursor: pointer; + line-height: 0px; +} +.vega-embed summary::-webkit-details-marker { + display: none; +} +.vega-embed summary:active { + box-shadow: #aaa 0px 0px 0px 1px inset; +} +.vega-embed summary svg { + width: 14px; + height: 14px; +} +.vega-embed details[open] summary { + opacity: 0.7; +} +.vega-embed:hover summary, .vega-embed:focus-within summary { + opacity: 1 !important; + transition: opacity 0.2s ease; +} +.vega-embed .vega-actions { + position: absolute; + z-index: 1001; + top: 35px; + right: -9px; + display: flex; + flex-direction: column; + padding-bottom: 8px; + padding-top: 8px; + border-radius: 4px; + box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2); + border: 1px solid #d9d9d9; + background: white; + animation-duration: 0.15s; + animation-name: scale-in; + animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5); + text-align: left; +} +.vega-embed .vega-actions a { + padding: 8px 16px; + font-family: sans-serif; + font-size: 14px; + font-weight: 600; + white-space: nowrap; + color: #434a56; + text-decoration: none; +} +.vega-embed .vega-actions a:hover, .vega-embed .vega-actions a:focus { + background-color: #f7f7f9; + color: black; +} +.vega-embed .vega-actions::before, .vega-embed .vega-actions::after { + content: ""; + display: inline-block; + position: absolute; +} +.vega-embed .vega-actions::before { + left: auto; + right: 14px; + top: -16px; + border: 8px solid rgba(0, 0, 0, 0); + border-bottom-color: #d9d9d9; +} +.vega-embed .vega-actions::after { + left: auto; + right: 15px; + top: -14px; + border: 7px solid rgba(0, 0, 0, 0); + border-bottom-color: #fff; +} +.vega-embed .chart-wrapper.fit-x { + width: 100%; +} +.vega-embed .chart-wrapper.fit-y { + height: 100%; +} + +.vega-embed-wrapper { + max-width: 100%; + overflow: auto; + padding-right: 14px; +} + +@keyframes scale-in { + from { + opacity: 0; + transform: scale(0.6); + } + to { + opacity: 1; + transform: scale(1); + } +} +`;String.prototype.startsWith||(String.prototype.startsWith=function(t,n){return this.substr(!n||n<0?0:+n,t.length)===t});function WH(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),o=1;o=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(i){throw i},f}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r=!0,a=!1,l;return{s:function(){e=e.call(t)},n:function(){var i=e.next();return r=i.done,i},e:function(i){a=!0,l=i},f:function(){try{!r&&e.return!=null&&e.return()}finally{if(a)throw l}}}}function B3e(t,n){if(!!t){if(typeof t=="string")return OD(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return OD(t,n)}}function OD(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,o=new Array(n);et,"vega-lite":(t,n)=>by.compile(t,{config:n}).spec},q3e=` + + + + +`,H3e="chart-wrapper";function $3e(t){return typeof t=="function"}function PD(t,n,e,o){var f="".concat(n,'
'),r="
".concat(e,""),a=window.open("");a.document.write(f+t+r),a.document.title="".concat(Sv[o]," JSON Source")}function G3e(t,n){if(t.$schema){var e=DH(t.$schema);if(n&&n!==e.library){var o;console.warn("The given visualization spec is written in ".concat(Sv[e.library],", but mode argument sets ").concat((o=Sv[n])!==null&&o!==void 0?o:n,"."))}var f=e.library;return GH(V2[f],"^".concat(e.version.slice(1)))||console.warn("The input spec uses ".concat(Sv[f]," ").concat(e.version,", but the current version of ").concat(Sv[f]," is v").concat(V2[f],".")),f}return"mark"in t||"encoding"in t||"layer"in t||"hconcat"in t||"vconcat"in t||"facet"in t||"repeat"in t?"vega-lite":"marks"in t||"signals"in t||"scales"in t||"axes"in t?"vega":n??"vega"}function W3e(t){return!!(t&&"load"in t)}function DD(t){return W3e(t)?t:Gc.loader(t)}function Y3e(t){var n,e,o=(n=(e=t.usermeta)===null||e===void 0?void 0:e.embedOptions)!==null&&n!==void 0?n:{};return bi(o.defaultStyle)&&(o.defaultStyle=!1),o}function X3e(t,n){return dA.apply(this,arguments)}function dA(){return dA=B2(jf.mark(function t(n,e){var o,f,r,a,l,c,i,s,u,d,h,m=arguments;return jf.wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(r=m.length>2&&m[2]!==void 0?m[2]:{},!bi(e)){p.next=10;break}return l=DD(r.loader),p.t0=JSON,p.next=6,l.load(e);case 6:p.t1=p.sent,a=p.t0.parse.call(p.t0,p.t1),p.next=11;break;case 10:a=e;case 11:return c=Y3e(a),i=c.loader,(!l||i)&&(l=DD((s=r.loader)!==null&&s!==void 0?s:i)),p.next=16,ID(c,l);case 16:return u=p.sent,p.next=19,ID(r,l);case 19:return d=p.sent,h=Wd(Wd({},WH(d,u)),{},{config:Um((o=d.config)!==null&&o!==void 0?o:{},(f=u.config)!==null&&f!==void 0?f:{})}),p.next=23,J3e(n,a,h,l);case 23:return p.abrupt("return",p.sent);case 24:case"end":return p.stop()}},t)})),dA.apply(this,arguments)}function ID(t,n){return pA.apply(this,arguments)}function pA(){return pA=B2(jf.mark(function t(n,e){var o,f,r;return jf.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(!bi(n.config)){l.next=8;break}return l.t1=JSON,l.next=4,e.load(n.config);case 4:l.t2=l.sent,l.t0=l.t1.parse.call(l.t1,l.t2),l.next=9;break;case 8:l.t0=(o=n.config)!==null&&o!==void 0?o:{};case 9:if(f=l.t0,!bi(n.patch)){l.next=18;break}return l.t4=JSON,l.next=14,e.load(n.patch);case 14:l.t5=l.sent,l.t3=l.t4.parse.call(l.t4,l.t5),l.next=19;break;case 18:l.t3=n.patch;case 19:return r=l.t3,l.abrupt("return",Wd(Wd(Wd({},n),r?{patch:r}:{}),f?{config:f}:{}));case 21:case"end":return l.stop()}},t)})),pA.apply(this,arguments)}function Z3e(t){var n,e=t.getRootNode?t.getRootNode():document;return e instanceof ShadowRoot?{root:e,rootContainer:e}:{root:document,rootContainer:(n=document.head)!==null&&n!==void 0?n:document.body}}function J3e(t,n){return gA.apply(this,arguments)}function gA(){return gA=B2(jf.mark(function t(n,e){var o,f,r,a,l,c,i,s,u,d,h,m,g,p,v,y,x,w,k,b,T,_,S,A,M,E,D,O,R,z,L,P,N,B,G,W,K,te,Y,Z,re,U,q,$,ne,H,Q,ee,ie,ae,ue,le=arguments;return jf.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:if(ue=function(){te&&document.removeEventListener("click",te),P.finalize()},s=le.length>2&&le[2]!==void 0?le[2]:{},u=le.length>3?le[3]:void 0,d=s.theme?Um(_we[s.theme],(o=s.config)!==null&&o!==void 0?o:{}):s.config,h=hp(s.actions)?s.actions:WH({},j3e,(f=s.actions)!==null&&f!==void 0?f:{}),m=Wd(Wd({},U3e),s.i18n),g=(r=s.renderer)!==null&&r!==void 0?r:"canvas",p=(a=s.logLevel)!==null&&a!==void 0?a:Gc.Warn,v=(l=s.downloadFileName)!==null&&l!==void 0?l:"visualization",y=typeof n=="string"?document.querySelector(n):n,y){fe.next=12;break}throw new Error("".concat(n," does not exist"));case 12:if(s.defaultStyle!==!1&&(x="vega-embed-style",w=Z3e(y),k=w.root,b=w.rootContainer,k.getElementById(x)||(T=document.createElement("style"),T.id=x,T.innerHTML=s.defaultStyle===void 0||s.defaultStyle===!0?R3e.toString():s.defaultStyle,b.appendChild(T))),_=G3e(e,s.mode),S=V3e[_](e,d),_==="vega-lite"&&S.$schema&&(A=DH(S.$schema),GH(V2.vega,"^".concat(A.version.slice(1)))||console.warn("The compiled spec uses Vega ".concat(A.version,", but current version is v").concat(V2.vega,"."))),y.classList.add("vega-embed"),h&&y.classList.add("has-actions"),y.innerHTML="",M=y,h&&(E=document.createElement("div"),E.classList.add(H3e),y.appendChild(E),M=E),D=s.patch,D&&(S=D instanceof Function?D(S):X2(S,D,!0,!1).newDocument),s.formatLocale&&Gc.formatLocale(s.formatLocale),s.timeFormatLocale&&Gc.timeFormatLocale(s.timeFormatLocale),s.expressionFunctions)for(O in s.expressionFunctions)R=s.expressionFunctions[O],"fn"in R?Gc.expressionFunction(O,R.fn,R.visitor):R instanceof Function&&Gc.expressionFunction(O,R);return z=s.ast,L=Gc.parse(S,_==="vega-lite"?{}:d,{ast:z}),P=new(s.viewClass||Gc.View)(L,Wd({loader:u,logLevel:p,renderer:g},z?{expr:(c=(i=Gc.expressionInterpreter)!==null&&i!==void 0?i:s.expr)!==null&&c!==void 0?c:p0e}:{})),P.addSignalListener("autosize",(me,_e)=>{var we=_e.type;we=="fit-x"?(M.classList.add("fit-x"),M.classList.remove("fit-y")):we=="fit-y"?(M.classList.remove("fit-x"),M.classList.add("fit-y")):we=="fit"?M.classList.add("fit-x","fit-y"):M.classList.remove("fit-x","fit-y")}),s.tooltip!==!1&&(N=$3e(s.tooltip)?s.tooltip:new Owe(s.tooltip===!0?{}:s.tooltip).call,P.tooltip(N)),B=s.hover,B===void 0&&(B=_==="vega"),B&&(G=typeof B=="boolean"?{}:B,W=G.hoverSet,K=G.updateSet,P.hover(W,K)),s&&(s.width!=null&&P.width(s.width),s.height!=null&&P.height(s.height),s.padding!=null&&P.padding(s.padding)),fe.next=37,P.initialize(M,s.bind).runAsync();case 37:if(h!==!1){if(Y=y,s.defaultStyle!==!1&&(Z=document.createElement("details"),Z.title=m.CLICK_TO_VIEW_ACTIONS,y.append(Z),Y=Z,re=document.createElement("summary"),re.innerHTML=q3e,Z.append(re),te=me=>{Z.contains(me.target)||Z.removeAttribute("open")},document.addEventListener("click",te)),U=document.createElement("div"),Y.append(U),U.classList.add("vega-actions"),h===!0||h.export!==!1){q=N3e(["svg","png"]);try{for(ne=function(){var _e=$.value;if(h===!0||h.export===!0||h.export[_e]){var we=m["".concat(_e.toUpperCase(),"_ACTION")],Te=document.createElement("a");Te.text=we,Te.href="#",Te.target="_blank",Te.download="".concat(v,".").concat(_e),Te.addEventListener("mousedown",function(){var Oe=B2(jf.mark(function de(ye){var Me;return jf.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return ye.preventDefault(),Ee.next=3,P.toImageURL(_e,s.scaleFactor);case 3:Me=Ee.sent,this.href=Me;case 5:case"end":return Ee.stop()}},de,this)}));return function(de){return Oe.apply(this,arguments)}}()),U.append(Te)}},q.s();!($=q.n()).done;)ne()}catch(me){q.e(me)}finally{q.f()}}(h===!0||h.source!==!1)&&(H=document.createElement("a"),H.text=m.SOURCE_ACTION,H.href="#",H.addEventListener("click",function(me){var _e,we;PD(E5(e),(_e=s.sourceHeader)!==null&&_e!==void 0?_e:"",(we=s.sourceFooter)!==null&&we!==void 0?we:"",_),me.preventDefault()}),U.append(H)),_==="vega-lite"&&(h===!0||h.compiled!==!1)&&(Q=document.createElement("a"),Q.text=m.COMPILED_ACTION,Q.href="#",Q.addEventListener("click",function(me){var _e,we;PD(E5(S),(_e=s.sourceHeader)!==null&&_e!==void 0?_e:"",(we=s.sourceFooter)!==null&&we!==void 0?we:"","vega"),me.preventDefault()}),U.append(Q)),(h===!0||h.editor!==!1)&&(ie=(ee=s.editorUrl)!==null&&ee!==void 0?ee:"https://vega.github.io/editor/",ae=document.createElement("a"),ae.text=m.EDITOR_ACTION,ae.href="#",ae.addEventListener("click",function(me){z3e(window,ie,{config:d,mode:_,renderer:g,spec:E5(e)}),me.preventDefault()}),U.append(ae))}return fe.abrupt("return",{view:P,spec:e,vgSpec:S,finalize:ue,embedOptions:s});case 39:case"end":return fe.stop()}},t)})),gA.apply(this,arguments)}const K3e=new Set(["width","height"]);function Q3e(t,n){for(const[e,o]of Object.entries(n))o&&(!!o&&{}.toString.call(o)==="[object Function]"?o(t.data(e)):t.change(e,Gc.changeset().remove(()=>!0).insert(o)))}function Bb(t={},n={},e=new Set){const o=Object.keys(t),f=Object.keys(n);return t===n||o.length===f.length&&o.filter(r=>!e.has(r)).every(r=>t[r]===n[r])}function zD(t,n){const e=Object.keys(n);for(const o of e)try{t.removeSignalListener(o,n[o])}catch(f){console.warn("Cannot remove invalid signal listener.",f)}return e.length>0}function Z4(t,n){const e=Object.keys(n);for(const o of e)try{t.addSignalListener(o,n[o])}catch(f){console.warn("Cannot add invalid signal listener.",f)}return e.length>0}function e5e(t){return new Set(t.flatMap(n=>Object.keys(n)))}function t5e(t,n){if(t===n)return!1;const e={width:!1,height:!1,isExpensive:!1},o="width"in t||"width"in n,f="height"in t||"height"in n;return o&&(!("width"in t)||!("width"in n)||t.width!==n.width)&&("width"in t&&typeof t.width=="number"?e.width=t.width:e.isExpensive=!0),f&&(!("height"in t)||!("height"in n)||t.height!==n.height)&&("height"in t&&typeof t.height=="number"?e.height=t.height:e.isExpensive=!0),[...e5e([t,n])].filter(a=>a!=="width"&&a!=="height").some(a=>!(a in t)||!(a in n)||!bU(t[a],n[a]))&&(e.isExpensive=!0),e.width!==!1||e.height!==!1||e.isExpensive?e:!1}function RD(t,n){const{width:e,height:o}=n;return typeof e<"u"&&typeof o<"u"?{...t,width:e,height:o}:typeof e<"u"?{...t,width:e}:typeof o<"u"?{...t,height:o}:t}function n5e(t){let n;return{c(){n=y0("div")},m(e,o){Yf(e,n,o),t[11](n)},p:Mu,i:Mu,o:Mu,d(e){e&&Xf(n),t[11](null)}}}function r5e(t,n,e){let{options:o}=n,{spec:f}=n,{view:r}=n,{signalListeners:a={}}=n,{data:l={}}=n;const c=AG();let i,s={},u={},d={},h={},m;ND(()=>{p()});async function g(){p();try{e(6,i=await X3e(m,f,o)),e(1,r=i.view),Z4(r,a)&&r.runAsync(),y(r)}catch(k){v(k)}}function p(){i&&(i.finalize(),e(6,i=void 0),e(1,r=void 0))}function v(k){c("onError",{error:k}),console.warn(k)}function y(k){x(),c("onNewView",{view:k})}async function x(){l&&Object.keys(l).length>0&&i!==void 0&&(e(1,r=i.view),Q3e(r,l),await r.resize().runAsync())}function w(k){mA[k?"unshift":"push"](()=>{m=k,e(0,m)})}return t.$$set=k=>{"options"in k&&e(2,o=k.options),"spec"in k&&e(3,f=k.spec),"view"in k&&e(1,r=k.view),"signalListeners"in k&&e(4,a=k.signalListeners),"data"in k&&e(5,l=k.data)},t.$$.update=()=>{if(t.$$.dirty&1056&&(Bb(l,h)||x(),e(10,h=l)),t.$$.dirty&991&&m!==void 0){if(!Bb(o,s,K3e))g();else{const k=t5e(RD(f,o),RD(d,s)),b=a,T=u;if(k){if(k.isExpensive)g();else if(i!==void 0){const _=!Bb(b,T);e(1,r=i.view),k.width!==!1&&r.width(k.width),k.height!==!1&&r.height(k.height),_&&(T&&zD(r,T),b&&Z4(r,b)),r.runAsync()}}else!Bb(b,T)&&i!==void 0&&(e(1,r=i.view),T&&zD(r,T),b&&Z4(r,b),r.runAsync())}e(7,s=o),e(8,u=a),e(9,d=f)}},[m,r,o,f,a,l,i,s,u,d,h,w]}class i5e extends _y{constructor(n){super(),wy(this,n,r5e,n5e,ky,{options:2,spec:3,view:1,signalListeners:4,data:5})}}function a5e(t){let n,e,o;function f(a){t[6](a)}let r={spec:t[1],data:t[2],signalListeners:t[3],options:t[4]};return t[0]!==void 0&&(r.view=t[0]),n=new i5e({props:r}),mA.push(()=>MG(n,"view",f)),n.$on("onNewView",t[7]),n.$on("onError",t[8]),{c(){Rd(n.$$.fragment)},m(a,l){Fd(n,a,l),o=!0},p(a,[l]){const c={};l&2&&(c.spec=a[1]),l&4&&(c.data=a[2]),l&8&&(c.signalListeners=a[3]),l&16&&(c.options=a[4]),!e&&l&1&&(e=!0,c.view=a[0],SG(()=>e=!1)),n.$set(c)},i(a){o||(Uf(n.$$.fragment,a),o=!0)},o(a){Vf(n.$$.fragment,a),o=!1},d(a){Nd(n,a)}}}const o5e="vega";function s5e(t,n,e){let o,{spec:f}=n,{options:r={}}=n,{data:a={}}=n,{signalListeners:l={}}=n,{view:c=void 0}=n;function i(d){c=d,e(0,c)}function s(d){J4.call(this,t,d)}function u(d){J4.call(this,t,d)}return t.$$set=d=>{"spec"in d&&e(1,f=d.spec),"options"in d&&e(5,r=d.options),"data"in d&&e(2,a=d.data),"signalListeners"in d&&e(3,l=d.signalListeners),"view"in d&&e(0,c=d.view)},t.$$.update=()=>{t.$$.dirty&32&&e(4,o={...r,mode:o5e})},[c,f,a,l,o,r,i,s,u]}class l5e extends _y{constructor(n){super(),wy(this,n,s5e,a5e,ky,{spec:1,options:5,data:2,signalListeners:3,view:0})}}const rv="#e2e8f0",iv="#111827";function u5e(t){return{axis:{labelFont:"sans-serif",labelColor:t?rv:iv,titleFont:"sans-serif",titleColor:t?rv:iv,tickColor:"#aaa",gridColor:"#aaa",titleFontWeight:"normal",labelFontWeight:"normal"},legend:{labelColor:t?rv:iv,labelFont:"sans-serif",titleColor:t?rv:iv,titleFont:"sans-serif",titleFontWeight:"normal",labelFontWeight:"normal"},title:{color:t?rv:iv,font:"sans-serif",fontWeight:"normal",anchor:"middle"}}}function c5e(t){let n,e;return n=new hW({props:{size:"large",unpadded_box:!0,$$slots:{default:[g5e]},$$scope:{ctx:t}}}),{c(){Rd(n.$$.fragment)},m(o,f){Fd(n,o,f),e=!0},p(o,f){const r={};f&268435456&&(r.$$scope={dirty:f,ctx:o}),n.$set(r)},i(o){e||(Uf(n.$$.fragment,o),e=!0)},o(o){Vf(n.$$.fragment,o),e=!1},d(o){Nd(n,o)}}}function f5e(t){let n,e,o;return{c(){n=y0("div"),e=y0("img"),_C(e.src,o=t[3])||Ma(e,"src",o),Ma(e,"class","svelte-1fe5ixn"),Ma(n,"class","matplotlib layout svelte-1fe5ixn")},m(f,r){Yf(f,n,r),Oh(n,e)},p(f,r){r&8&&!_C(e.src,o=f[3])&&Ma(e,"src",o)},i:Mu,o:Mu,d(f){f&&Xf(n)}}}function h5e(t){let n,e,o,f;e=new l5e({props:{spec:t[2]}});let r=t[1]&&FD(t);return{c(){n=y0("div"),Rd(e.$$.fragment),o=K4(),r&&r.c(),Ma(n,"class","altair layout svelte-1fe5ixn")},m(a,l){Yf(a,n,l),Fd(e,n,null),Oh(n,o),r&&r.m(n,null),f=!0},p(a,l){const c={};l&4&&(c.spec=a[2]),e.$set(c),a[1]?r?r.p(a,l):(r=FD(a),r.c(),r.m(n,null)):r&&(r.d(1),r=null)},i(a){f||(Uf(e.$$.fragment,a),f=!0)},o(a){Vf(e.$$.fragment,a),f=!1},d(a){a&&Xf(n),Nd(e),r&&r.d()}}}function d5e(t){let n;return{c(){n=y0("div"),Ma(n,"id","bokehDiv"),Ma(n,"class","gradio-bokeh svelte-1fe5ixn")},m(e,o){Yf(e,n,o)},p:Mu,i:Mu,o:Mu,d(e){e&&Xf(n)}}}function p5e(t){let n;return{c(){n=y0("div")},m(e,o){Yf(e,n,o),t[12](n)},p:Mu,i:Mu,o:Mu,d(e){e&&Xf(n),t[12](null)}}}function g5e(t){let n,e;return n=new qD({}),{c(){Rd(n.$$.fragment)},m(o,f){Fd(n,o,f),e=!0},i(o){e||(Uf(n.$$.fragment,o),e=!0)},o(o){Vf(n.$$.fragment,o),e=!1},d(o){Nd(n,o)}}}function FD(t){let n,e;return{c(){n=y0("div"),e=PG(t[1]),Ma(n,"class","caption layout svelte-1fe5ixn")},m(o,f){Yf(o,n,f),Oh(n,e)},p(o,f){f&2&&DG(e,o[1])},d(o){o&&Xf(n)}}}function m5e(t){let n,e,o,f;const r=[p5e,d5e,h5e,f5e,c5e],a=[];function l(c,i){return c[0]&&c[4]=="plotly"?0:c[4]=="bokeh"?1:c[4]=="altair"?2:c[4]=="matplotlib"?3:4}return n=l(t),e=a[n]=r[n](t),{c(){e.c(),o=EG()},m(c,i){a[n].m(c,i),Yf(c,o,i),f=!0},p(c,[i]){let s=n;n=l(c),n===s?a[n].p(c,i):(CG(),Vf(a[s],1,1,()=>{a[s]=null}),OG(),e=a[n],e?e.p(c,i):(e=a[n]=r[n](c),e.c()),Uf(e,1),e.m(o.parentNode,o))},i(c){f||(Uf(e),f=!0)},o(c){Vf(e),f=!1},d(c){a[n].d(c),c&&Xf(o)}}}function v5e(t,n,e){let o,f,r,a,{value:l}=n,{target:c}=n,i=null,{colors:s=[]}=n,{theme:u}=n,{caption:d}=n,{bokeh_version:h}=n;function m(O){let R=s[O%s.length];return R&&R in S5?S5[R]?.primary:R||S5[BG(O)].primary}function g(O,R,z){if(document&&document.getElementById("bokehDiv")&&(document.getElementById("bokehDiv").innerHTML=""),R=="bokeh"&&window.Bokeh){z||(k(),z=!0);let L=JSON.parse(O);window.Bokeh.embed.embed_item(L,"bokehDiv")}}let p,v;const y=`https://cdn.bokeh.org/bokeh/release/bokeh-${h}.min.js`,x=[`https://cdn.pydata.org/bokeh/release/bokeh-widgets-${h}.min.js`,`https://cdn.pydata.org/bokeh/release/bokeh-tables-${h}.min.js`,`https://cdn.pydata.org/bokeh/release/bokeh-gl-${h}.min.js`,`https://cdn.pydata.org/bokeh/release/bokeh-api-${h}.min.js`];function w(){return x.map((O,R)=>{const z=document.createElement("script");return z.onload=()=>A(R+1),z.src=O,document.head.appendChild(z),z})}function k(){const O=document.createElement("script");return O.onload=E,O.src=y,document.head.appendChild(O),e(10,a=!0),O}function b(){if(!v){v=document.getElementById("plotly.js-style-global");const O=v.cloneNode();c.appendChild(O);for(const R of v.sheet.cssRules)O.sheet.insertRule(R.cssText)}}const T=h?k():null;let _=[];const S=[];Array(5).fill(0).map((O,R)=>M(R));const A=O=>{r=="bokeh"&&S[O]()};function M(O){return new Promise((R,z)=>{S[O]=R})}function E(){A(0),_=w()}LG(()=>{if(r=="plotly"){b();let O=JSON.parse(f);O.layout.title?O.layout.margin={autoexpand:!0}:O.layout.margin={l:0,r:0,b:0,t:0},gW.react(p,O)}}),ND(()=>{T in document.children&&(document.removeChild(T),_.forEach(O=>document.removeChild(O)))});function D(O){mA[O?"unshift":"push"](()=>{p=O,e(5,p)})}return t.$$set=O=>{"value"in O&&e(0,l=O.value),"target"in O&&e(6,c=O.target),"colors"in O&&e(7,s=O.colors),"theme"in O&&e(8,u=O.theme),"caption"in O&&e(1,d=O.caption),"bokeh_version"in O&&e(9,h=O.bokeh_version)},t.$$.update=()=>{if(t.$$.dirty&256&&e(11,o=u=="dark"),t.$$.dirty&1&&e(3,f=l?.plot),t.$$.dirty&1&&e(4,r=l?.type),t.$$.dirty&1048&&g(f,r,a),t.$$.dirty&2077&&r=="altair"){e(2,i=JSON.parse(f));const O=u5e(o);switch(e(2,i.config=O,i),l.chart||""){case"scatter":i.encoding.color&&i.encoding.color.type=="nominal"?e(2,i.encoding.color.scale.range=i.encoding.color.scale.range.map((R,z)=>m(z)),i):i.encoding.color&&i.encoding.color.type=="quantitative"&&(e(2,i.encoding.color.scale.range=["#eff6ff","#1e3a8a"],i),e(2,i.encoding.color.scale.range.interpolate="hsl",i));break;case"line":i.layer.forEach(R=>{R.encoding.color&&(R.encoding.color.scale.range=R.encoding.color.scale.range.map((z,L)=>m(L)))});break;case"bar":i.encoding.color&&e(2,i.encoding.color.scale.range=i.encoding.color.scale.range.map((R,z)=>m(z)),i);break}}},e(10,a=window.Bokeh===void 0),[l,d,i,f,r,p,c,s,u,h,a,o,D]}class y5e extends _y{constructor(n){super(),wy(this,n,v5e,m5e,ky,{value:0,target:6,colors:7,theme:8,caption:1,bokeh_version:9})}}function x5e(t){let n,e,o,f,r,a;n=new dW({props:{show_label:t[6],label:t[5]||"Plot",Icon:qD}});const l=[t[4]];let c={};for(let i=0;i{"value"in p&&e(0,o=p.value),"elem_id"in p&&e(1,f=p.elem_id),"elem_classes"in p&&e(2,r=p.elem_classes),"visible"in p&&e(3,a=p.visible),"loading_status"in p&&e(4,l=p.loading_status),"label"in p&&e(5,c=p.label),"show_label"in p&&e(6,i=p.show_label),"target"in p&&e(7,s=p.target),"style"in p&&e(8,u=p.style),"theme"in p&&e(9,d=p.theme),"caption"in p&&e(10,h=p.caption),"bokeh_version"in p&&e(11,m=p.bokeh_version)},[o,f,r,a,l,c,i,s,u,d,h,m,g]}class w5e extends _y{constructor(n){super(),wy(this,n,_5e,b5e,ky,{value:0,elem_id:1,elem_classes:2,visible:3,loading_status:4,label:5,show_label:6,target:7,style:8,theme:9,caption:10,bokeh_version:11})}}var D5e=w5e;const I5e=["static"];export{D5e as Component,I5e as modes}; +//# sourceMappingURL=index.3c2bfbb6.js.map diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.56de6705.js.map b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.56de6705.js.map new file mode 100644 index 0000000000000000000000000000000000000000..4b7e04de043b81d0882a4ea45781a6b326bd41ef --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.56de6705.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.56de6705.js","sources":["../../../../ui/packages/icons/src/TextHighlight.svelte","../../../../ui/packages/highlighted-text/src/HighlightedText.svelte","../../../../ui/packages/app/src/components/HighlightedText/HighlightedText.svelte","../../../../ui/packages/app/src/components/HighlightedText/index.ts"],"sourcesContent":["\n\t\n\t\n\n","\n\n\n\n{#if mode === \"categories\"}\n\t{#if show_legend}\n\t\t
\n\t\t\t{#each Object.entries(_color_map) as [category, color], i}\n\t\t\t\t handle_mouseover(category)}\n\t\t\t\t\ton:focus={() => handle_mouseover(category)}\n\t\t\t\t\ton:mouseout={() => handle_mouseout()}\n\t\t\t\t\ton:blur={() => handle_mouseout()}\n\t\t\t\t\tclass=\"category-label\"\n\t\t\t\t\tstyle={\"background-color:\" + color.secondary}\n\t\t\t\t>\n\t\t\t\t\t{category}\n\t\t\t\t
\n\t\t\t{/each}\n\t\t
\n\t{/if}\n\t
\n\t\t{#each value as [text, category], i}\n\t\t\t {\n\t\t\t\t\tdispatch(\"select\", { index: i, value: [text, category] });\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{text}\n\t\t\t\t{#if !show_legend && category !== null}\n\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t\t{category}\n\t\t\t\t\t\n\t\t\t\t{/if}\n\t\t\t\n\t\t{/each}\n\t
\n{:else}\n\t{#if show_legend}\n\t\t
\n\t\t\t-1\n\t\t\t0\n\t\t\t+1\n\t\t
\n\t{/if}\n\t
\n\t\t{#each value as [text, score]}\n\t\t\t\n\t\t\t\t{text}\n\t\t\t\n\t\t{/each}\n\t
\n{/if}\n\n\n","\n\n\n\t\n\t{#if label}\n\t\t\n\t{/if}\n\n\t{#if value}\n\t\t\n\t{:else}\n\t\t\n\t\t\t\n\t\t\n\t{/if}\n\n","export { default as Component } from \"./HighlightedText.svelte\";\nexport const modes = [\"static\"];\n\nexport const document = (config: Record) => ({\n\ttype: {\n\t\tpayload: \"Array<[string, string | number]>\"\n\t},\n\tdescription: {\n\t\tpayload: \"list of text spans and corresponding label / value\"\n\t}\n});\n"],"names":["document"],"mappings":"qtCAAA,SAWC,OAIA,yWC+HK,YAQG,0BAAL,2NADH,+DAPK,oEAQG,uBAAL,6HAAA,0EAxDE,aAiBG,0BAAL,4KADH,+DAhBK,8EAiBG,uBAAL,8HAAA;;yHAgCF,iDAcsB,gKAJb,0BACL,OAAQ,EAAI,iBAAmB,MAAQ,eAAiB,OACzD,GAAG,UAJL,SAMC,yCAAoB,8BAJb,0BACL,OAAQ,EAAI,iBAAmB,MAAQ,eAAiB,OACzD,2DA3DK,OAAO,QAAQ,2BAApB,mMADH,wEACQ,OAAO,QAAQ,wBAApB,6HAAA,qDASC,kLAFM,oBAAsB,MAAM,SAAS,UAN7C,uIAQE,8BAFM,oBAAsB,MAAM,+EAgCjC,0BATmC;AAAA,MAErC,+EAEyB,QAAa,MACpC,MAAU,OAAW,MACnB,GACA,KAAW,OAAU,6BALzB,oCAOE,+CALuB,QAAa,MACpC,MAAU,OAAW,MACnB,GACA,KAAW,OAAU,6DARiC,sBACrD,MAAe,QAAa,0KADX,KAAW,2DAPpB,QAAa,MAAS,MAAU,OAAW,gBAC/C,QAAa,IAAI,gDALH,QAAa,MACpC,MAAU,OAAW,MACnB,GACA,KAAW,OAAU,sBALzB,SAaC,8FAA2D,uCAApC,KAAW,SAC5B,MAAe,QAAa,+EARpB,QAAa,MAAS,MAAU,OAAW,qBAC/C,QAAa,IAAI,2DALH,QAAa,MACpC,MAAU,OAAW,MACnB,GACA,KAAW,OAAU,2FAxBvB,QAAS,gOA5FP,SAAiB,UAAa,QAMzB,eACA,cAAuB,OACvB,mBACA,aAAsB,MAE7B,EAEA,KACA,EAAS,cAES,EAAc,OAC9B,MACA,GAAS,SAAS,cAAc,QAAQ,EAC5C,EAAM,EAAO,WAAW,IAAI,EAE7B,EAAI,UAAY,EAChB,EAAI,SAAS,EAAG,EAAG,EAAG,CAAC,QAChB,EAAG,GAAG,IAAK,EAAI,aAAa,EAAG,EAAG,EAAG,CAAC,EAAE,KAC/C,SAAI,UAAU,EAAG,EAAG,EAAG,CAAC,UACT,MAAM,OAAM,OAAM,IAAM,UAGlC,GAAW,QAIb,cAwCsB,OACzB,EAAS,CAAK,mBAGd,EAAS,EAAE,aAqBY,EAAiB,CAAQ,OAC7B,EAAiB,CAAQ,SACtB,WACJ,iBAqBf,EAAS,UAAY,MAAO,EAAG,OAAQ,EAAM,CAAQ,8MApE/C,uBACG,KAAO,SACX,GAAK,EAAU,GAAK,OACtB,IAAM,OACT,EAAW,GAAO,EAAO,UAEzB,EAAW,IACV,QAAS,EAAU,EAAa,EAAU,GAAM,CAAC,EAAI,EAAU,GAC/D,UAAW,EACR,EAAa,EAAU,GAAM,EAAG,EAChC,EAAU,YA5BZ,OACJ,MAEG,EAAM,OAAS,WACR,EAAG,IAAU,MAClB,IAAU,cACF,IAAU,iBACpB,EAAO,YAAY,GACb,KAAS,QACV,GAAQ,GAAe,OAAO,KAAK,CAAS,EAAE,MAAM,MACxD,EAAU,GAAS,eAGpB,EAAO,QAAQ,EAqBnB,2MCvBO,oBAEC,iBACS,MAAM,WAAc,YAAc,KAAM,uHAAxC,MAAM,WAAc,YAAc,KAAM,geAU7C,KAAM,+LAAN,KAAM,sTAhBA,kFACd,uDASA,uMAVc,qBACd,sgBAJI,iBACO,MAAM,WAAc,YAAc,KAAM,kNAAxC,MAAM,WAAc,YAAc,KAAM,gKAjC7C,UAAkB,OAClB,sBACA,UAAmB,OACnB,WACP,GACO,kBACA,mBACA,QAAgB,uBAChB,eACA,aAAsB,OAMtB,yBAEL,GAAW,ybANT,EAAM,WAAa,OAAO,KAAK,CAAS,EAAE,YACjD,EAAM,UAAY,sBAQd,IAAU,SACb,EAAY,CAAK,EACjB,EAAS,QAAQ,+NC9BP,IAAQ,CAAC,QAAQ,EAEjBA,GAAW,AAAC,KACxB,KAAM,CACL,QAAS,oCAEV,YAAa,CACZ,QAAS,qDAEX"} \ No newline at end of file diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.949232a2.css b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.949232a2.css new file mode 100644 index 0000000000000000000000000000000000000000..463d37a8a75c97e2c4ecd3aaf5081dd8a2f90164 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.949232a2.css @@ -0,0 +1 @@ +.rangeSlider{--pip:var(--range-pip, lightslategray);--pip-text:var(--range-pip-text, var(--pip));--pip-active:var(--range-pip-active, darkslategrey);--pip-active-text:var(--range-pip-active-text, var(--pip-active));--pip-hover:var(--range-pip-hover, darkslategrey);--pip-hover-text:var(--range-pip-hover-text, var(--pip-hover));--pip-in-range:var(--range-pip-in-range, var(--pip-active));--pip-in-range-text:var(--range-pip-in-range-text, var(--pip-active-text))}.rangePips{position:absolute;height:1em;left:0;right:0;bottom:-1em}.rangePips.vertical{height:auto;width:1em;inset:0 auto 0 100%}.rangePips .pip{height:.4em;position:absolute;top:.25em;width:1px;white-space:nowrap}.rangePips.vertical .pip{height:1px;width:.4em;left:.25em;top:auto;bottom:auto}.rangePips .pipVal{position:absolute;top:.4em;transform:translate(-50%,25%)}.rangePips.vertical .pipVal{position:absolute;top:0;left:.4em;transform:translate(25%,-50%)}.rangePips .pip{transition:all .15s ease}.rangePips .pipVal{transition:all .15s ease,font-weight 0s linear}.rangePips .pip{color:#789;color:var(--pip-text);background-color:#789;background-color:var(--pip)}.rangePips .pip.selected{color:#2f4f4f;color:var(--pip-active-text);background-color:#2f4f4f;background-color:var(--pip-active)}.rangePips.hoverable:not(.disabled) .pip:hover{color:#2f4f4f;color:var(--pip-hover-text);background-color:#2f4f4f;background-color:var(--pip-hover)}.rangePips .pip.in-range{color:#2f4f4f;color:var(--pip-in-range-text);background-color:#2f4f4f;background-color:var(--pip-in-range)}.rangePips .pip.selected{height:.75em}.rangePips.vertical .pip.selected{height:1px;width:.75em}.rangePips .pip.selected .pipVal{font-weight:700;top:.75em}.rangePips.vertical .pip.selected .pipVal{top:0;left:.75em}.rangePips.hoverable:not(.disabled) .pip:not(.selected):hover{transition:none}.rangePips.hoverable:not(.disabled) .pip:not(.selected):hover .pipVal{transition:none;font-weight:700}.rangeSlider{--slider:var(--range-slider, #d7dada);--handle-inactive:var(--range-handle-inactive, #99a2a2);--handle:var(--range-handle, #838de7);--handle-focus:var(--range-handle-focus, #4a40d4);--handle-border:var(--range-handle-border, var(--handle));--range-inactive:var(--range-range-inactive, var(--handle-inactive));--range:var(--range-range, var(--handle-focus));--float-inactive:var(--range-float-inactive, var(--handle-inactive));--float:var(--range-float, var(--handle-focus));--float-text:var(--range-float-text, white)}.rangeSlider{position:relative;border-radius:100px;height:.5em;margin:1em;transition:opacity .2s ease;user-select:none}.rangeSlider *{user-select:none}.rangeSlider.pips{margin-bottom:1.8em}.rangeSlider.pip-labels{margin-bottom:2.8em}.rangeSlider.vertical{display:inline-block;border-radius:100px;width:.5em;min-height:200px}.rangeSlider.vertical.pips{margin-right:1.8em;margin-bottom:1em}.rangeSlider.vertical.pip-labels{margin-right:2.8em;margin-bottom:1em}.rangeSlider .rangeHandle{position:absolute;display:block;height:1.4em;width:1.4em;top:.25em;bottom:auto;transform:translateY(-50%) translate(-50%);z-index:2}.rangeSlider.reversed .rangeHandle{transform:translateY(-50%) translate(50%)}.rangeSlider.vertical .rangeHandle{left:.25em;top:auto;transform:translateY(50%) translate(-50%)}.rangeSlider.vertical.reversed .rangeHandle{transform:translateY(-50%) translate(-50%)}.rangeSlider .rangeNub,.rangeSlider .rangeHandle:before{position:absolute;left:0;top:0;display:block;border-radius:10em;height:100%;width:100%;transition:box-shadow .2s ease}.rangeSlider .rangeHandle:before{content:"";inset:1px;height:auto;width:auto;box-shadow:0 0 0 0 var(--handle-border);opacity:0}.rangeSlider.hoverable:not(.disabled) .rangeHandle:hover:before{box-shadow:0 0 0 8px var(--handle-border);opacity:.2}.rangeSlider.hoverable:not(.disabled) .rangeHandle.press:before,.rangeSlider.hoverable:not(.disabled) .rangeHandle.press:hover:before{box-shadow:0 0 0 12px var(--handle-border);opacity:.4}.rangeSlider.range:not(.min):not(.max) .rangeNub{border-radius:10em 10em 10em 1.6em}.rangeSlider.range .rangeHandle:nth-of-type(1) .rangeNub{transform:rotate(-135deg)}.rangeSlider.range .rangeHandle:nth-of-type(2) .rangeNub{transform:rotate(45deg)}.rangeSlider.range.reversed .rangeHandle:nth-of-type(1) .rangeNub{transform:rotate(45deg)}.rangeSlider.range.reversed .rangeHandle:nth-of-type(2) .rangeNub{transform:rotate(-135deg)}.rangeSlider.range.vertical .rangeHandle:nth-of-type(1) .rangeNub{transform:rotate(135deg)}.rangeSlider.range.vertical .rangeHandle:nth-of-type(2) .rangeNub{transform:rotate(-45deg)}.rangeSlider.range.vertical.reversed .rangeHandle:nth-of-type(1) .rangeNub{transform:rotate(-45deg)}.rangeSlider.range.vertical.reversed .rangeHandle:nth-of-type(2) .rangeNub{transform:rotate(135deg)}.rangeSlider .rangeFloat{display:block;position:absolute;left:50%;top:-.5em;transform:translate(-50%,-100%);font-size:1em;text-align:center;opacity:0;pointer-events:none;white-space:nowrap;transition:all .2s ease;font-size:.9em;padding:.2em .4em;border-radius:.2em}.rangeSlider .rangeHandle.active .rangeFloat,.rangeSlider.hoverable .rangeHandle:hover .rangeFloat{opacity:1;top:-.2em;transform:translate(-50%,-100%)}.rangeSlider .rangeBar{position:absolute;display:block;transition:background .2s ease;border-radius:1em;height:.5em;top:0;user-select:none;z-index:1}.rangeSlider.vertical .rangeBar{width:.5em;height:auto}.rangeSlider{background-color:#d7dada;background-color:var(--slider)}.rangeSlider .rangeBar{background-color:#99a2a2;background-color:var(--range-inactive)}.rangeSlider.focus .rangeBar{background-color:#838de7;background-color:var(--range)}.rangeSlider .rangeNub{background-color:#99a2a2;background-color:var(--handle-inactive)}.rangeSlider.focus .rangeNub{background-color:#838de7;background-color:var(--handle)}.rangeSlider .rangeHandle.active .rangeNub{background-color:#4a40d4;background-color:var(--handle-focus)}.rangeSlider .rangeFloat{color:#fff;color:var(--float-text);background-color:#99a2a2;background-color:var(--float-inactive)}.rangeSlider.focus .rangeFloat{background-color:#4a40d4;background-color:var(--float)}.rangeSlider.disabled{opacity:.5}.rangeSlider.disabled .rangeNub{background-color:#d7dada;background-color:var(--slider)}.mic-wrap.svelte-1thnwz{padding:var(--size-2)}.record-icon.svelte-1thnwz{display:flex;position:relative;margin-right:var(--size-2);width:6px;height:6px}.dot.svelte-1thnwz{display:inline-flex;position:relative;border-radius:var(--radius-full);background:var(--color-red-500);width:6px;height:6px}.pinger.svelte-1thnwz{display:inline-flex;position:absolute;opacity:.9;animation:svelte-1thnwz-ping 1s cubic-bezier(0,0,.2,1) infinite;border-radius:var(--radius-full);background:var(--color-red-500);width:var(--size-full);height:var(--size-full)}@keyframes svelte-1thnwz-ping{75%,to{transform:scale(2);opacity:0}}audio.svelte-1thnwz{padding:var(--size-2);width:var(--size-full);height:var(--size-14)}audio.svelte-eemfgq{padding:var(--size-2);width:var(--size-full);height:var(--size-14)} diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.f554ccc1.css b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.f554ccc1.css new file mode 100644 index 0000000000000000000000000000000000000000..ce0c8f1a23ae32a066da105572bad83a7afe589c --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/index.f554ccc1.css @@ -0,0 +1 @@ +.gradio-container-3-23-0,.gradio-container-3-23-0 *,.gradio-container-3-23-0 :before,.gradio-container-3-23-0 :after{box-sizing:border-box;border-width:0;border-style:solid}.gradio-container-3-23-0 html{-webkit-text-size-adjust:100%;line-height:1.5;font-family:-var(--font-sans);-moz-tab-size:4;tab-size:2}.gradio-container-3-23-0 body{margin:0;line-height:inherit}.gradio-container-3-23-0 hr{border-top-width:1px;height:0;color:inherit}.gradio-container-3-23-0 abbr:where([title]){text-decoration:underline dotted}.gradio-container-3-23-0 h1,.gradio-container-3-23-0 h2,.gradio-container-3-23-0 h3,.gradio-container-3-23-0 h4,.gradio-container-3-23-0 h5,.gradio-container-3-23-0 h6{font-weight:inherit;font-size:inherit}.gradio-container-3-23-0 a{color:inherit;text-decoration:inherit}.gradio-container-3-23-0 b,.gradio-container-3-23-0 strong{font-weight:bolder}.gradio-container-3-23-0 code,.gradio-container-3-23-0 kbd,.gradio-container-3-23-0 samp,.gradio-container-3-23-0 pre{font-size:1em;font-family:-var(--font-mono)}.gradio-container-3-23-0 small{font-size:80%}.gradio-container-3-23-0 sub,.gradio-container-3-23-0 sup{position:relative;vertical-align:baseline;font-size:75%;line-height:0}.gradio-container-3-23-0 sub{bottom:-.25em}.gradio-container-3-23-0 sup{top:-.5em}.gradio-container-3-23-0 table{border-color:inherit;border-collapse:collapse;text-indent:0}.gradio-container-3-23-0 button,.gradio-container-3-23-0 input,.gradio-container-3-23-0 optgroup,.gradio-container-3-23-0 select,.gradio-container-3-23-0 textarea{margin:0;padding:0;color:inherit;font-weight:inherit;font-size:100%;line-height:inherit;font-family:inherit}.gradio-container-3-23-0 button,.gradio-container-3-23-0 select{text-transform:none}.gradio-container-3-23-0 button,.gradio-container-3-23-0 [type=button],.gradio-container-3-23-0 [type=reset],.gradio-container-3-23-0 [type=submit]{-webkit-appearance:button;background-image:none;background-color:transparent}.gradio-container-3-23-0 :-moz-focusring{outline:auto}.gradio-container-3-23-0 :-moz-ui-invalid{box-shadow:none}.gradio-container-3-23-0 progress{vertical-align:baseline}.gradio-container-3-23-0 ::-webkit-inner-spin-button,.gradio-container-3-23-0 ::-webkit-outer-spin-button{height:auto}.gradio-container-3-23-0 [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.gradio-container-3-23-0 ::-webkit-search-decoration{-webkit-appearance:none}.gradio-container-3-23-0 ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.gradio-container-3-23-0 summary{display:list-item}.gradio-container-3-23-0 blockquote,.gradio-container-3-23-0 dl,.gradio-container-3-23-0 dd,.gradio-container-3-23-0 h1,.gradio-container-3-23-0 h2,.gradio-container-3-23-0 h3,.gradio-container-3-23-0 h4,.gradio-container-3-23-0 h5,.gradio-container-3-23-0 h6,.gradio-container-3-23-0 hr,.gradio-container-3-23-0 figure,.gradio-container-3-23-0 p,.gradio-container-3-23-0 pre{margin:0}.gradio-container-3-23-0 fieldset{margin:0;padding:0}.gradio-container-3-23-0 legend{padding:0}.gradio-container-3-23-0 ol,.gradio-container-3-23-0 ul,.gradio-container-3-23-0 menu{margin:0;padding:0}.gradio-container-3-23-0 textarea{resize:vertical}.gradio-container-3-23-0 input::placeholder,.gradio-container-3-23-0 textarea::placeholder{opacity:1;color:--color-var(--color-grey-400)}.gradio-container-3-23-0 button,.gradio-container-3-23-0 [role=button]{cursor:pointer}.gradio-container-3-23-0 :disabled{cursor:default}.gradio-container-3-23-0 img,.gradio-container-3-23-0 svg,.gradio-container-3-23-0 video,.gradio-container-3-23-0 canvas,.gradio-container-3-23-0 audio,.gradio-container-3-23-0 iframe,.gradio-container-3-23-0 embed,.gradio-container-3-23-0 object{display:block;vertical-align:middle}.gradio-container-3-23-0 img,.gradio-container-3-23-0 video{max-width:100%;height:auto}.gradio-container-3-23-0 [hidden]{display:none}.gradio-container-3-23-0 [type=text],.gradio-container-3-23-0 [type=email],.gradio-container-3-23-0 [type=url],.gradio-container-3-23-0 [type=password],.gradio-container-3-23-0 [type=number],.gradio-container-3-23-0 [type=date],.gradio-container-3-23-0 [type=datetime-local],.gradio-container-3-23-0 [type=month],.gradio-container-3-23-0 [type=search],.gradio-container-3-23-0 [type=tel],.gradio-container-3-23-0 [type=time],.gradio-container-3-23-0 [type=week],.gradio-container-3-23-0 [multiple],.gradio-container-3-23-0 textarea,.gradio-container-3-23-0 select{--tw-shadow: 0 0 #0000;appearance:none;border-width:1px;border-color:#6b7280;border-radius:0;background-color:#fff;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}.gradio-container-3-23-0 [type=checkbox],.gradio-container-3-23-0 [type=radio]{color-adjust:exact;display:inline-block;flex-shrink:0;vertical-align:middle;appearance:none;border-width:1px;border-color:#6b7280;background-origin:border-box;background-color:#fff;padding:0;width:1rem;height:1rem;color:#2563eb;user-select:none}.gradio-container-3-23-0 [type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}.gradio-container-3-23-0 [type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}.gradio-container-3-23-0 select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-size:1.5em 1.5em;background-repeat:no-repeat;padding-right:2.5rem}.gradio-container-3-23-0 [type=checkbox]:checked,.gradio-container-3-23-0 [type=radio]:checked{background-position:center;background-size:100% 100%;background-repeat:no-repeat}.gradio-container-3-23-0 [type=checkbox]:checked:hover,.gradio-container-3-23-0 [type=checkbox]:checked:focus,.gradio-container-3-23-0 [type=radio]:checked:hover,.gradio-container-3-23-0 [type=radio]:checked:focus{border-color:transparent}.gradio-container-3-23-0 [type=checkbox]:focus-visible,.gradio-container-3-23-0 [type=checkbox]:focus-visible,.gradio-container-3-23-0 [type=radio]:focus-visible,.gradio-container-3-23-0 [type=radio]:focus-visible{outline:none}.gradio-container-3-23-0 .scroll-hide{-ms-overflow-style:none;scrollbar-width:none}.gradio-container-3-23-0 .sr-only{clip:rect(0,0,0,0);position:absolute;margin:-1px;border-width:0;padding:0;width:1px;height:1px;overflow:hidden;white-space:nowrap}.gradio-container-3-23-0 .scroll-hide::-webkit-scrollbar{display:none}.gradio-container-3-23-0{-webkit-text-size-adjust:100%;line-height:1.5;font-family:var(--font);-moz-tab-size:4;tab-size:4}.gradio-container-3-23-0 .cropper-container{position:relative;-ms-touch-action:none;touch-action:none;font-size:0;line-height:0;direction:ltr;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.gradio-container-3-23-0 .cropper-container img{display:block;image-orientation:0deg;width:100%;min-width:0!important;max-width:none!important;height:100%;min-height:0!important;max-height:none!important}.gradio-container-3-23-0 .cropper-wrap-box,.gradio-container-3-23-0 .cropper-canvas,.gradio-container-3-23-0 .cropper-drag-box,.gradio-container-3-23-0 .cropper-crop-box,.gradio-container-3-23-0 .cropper-modal{position:absolute;inset:0}.gradio-container-3-23-0 .cropper-wrap-box,.gradio-container-3-23-0 .cropper-canvas{overflow:hidden}.gradio-container-3-23-0 .cropper-drag-box{opacity:0;background-color:#fff}.gradio-container-3-23-0 .cropper-modal{opacity:.5;background-color:#000}.gradio-container-3-23-0 .cropper-view-box{display:block;outline:1px solid #39f;outline-color:#3399ffbf;width:100%;height:100%;overflow:hidden}.gradio-container-3-23-0 .cropper-dashed{display:block;position:absolute;opacity:.5;border:0 dashed #eee}.gradio-container-3-23-0 .cropper-dashed.dashed-h{top:calc(100% / 3);left:0;border-top-width:1px;border-bottom-width:1px;width:100%;height:calc(100% / 3)}.gradio-container-3-23-0 .cropper-dashed.dashed-v{top:0;left:calc(100% / 3);border-right-width:1px;border-left-width:1px;width:calc(100% / 3);height:100%}.gradio-container-3-23-0 .cropper-center{display:block;position:absolute;top:50%;left:50%;opacity:.75;width:0;height:0}.gradio-container-3-23-0 .cropper-center:before,.gradio-container-3-23-0 .cropper-center:after{display:block;position:absolute;background-color:#eee;content:" "}.gradio-container-3-23-0 .cropper-center:before{top:0;left:-3px;width:7px;height:1px}.gradio-container-3-23-0 .cropper-center:after{top:-3px;left:0;width:1px;height:7px}.gradio-container-3-23-0 .cropper-face,.gradio-container-3-23-0 .cropper-line,.gradio-container-3-23-0 .cropper-point{display:block;position:absolute;opacity:.1;width:100%;height:100%}.gradio-container-3-23-0 .cropper-face{top:0;left:0;background-color:#fff}.gradio-container-3-23-0 .cropper-line{background-color:#39f}.gradio-container-3-23-0 .cropper-line.line-e{top:0;right:-3px;cursor:ew-resize;width:5px}.gradio-container-3-23-0 .cropper-line.line-n{top:-3px;left:0;cursor:ns-resize;height:5px}.gradio-container-3-23-0 .cropper-line.line-w{top:0;left:-3px;cursor:ew-resize;width:5px}.gradio-container-3-23-0 .cropper-line.line-s{bottom:-3px;left:0;cursor:ns-resize;height:5px}.gradio-container-3-23-0 .cropper-point{opacity:.75;background-color:#39f;width:5px;height:5px}.gradio-container-3-23-0 .cropper-point.point-e{top:50%;right:-3px;cursor:ew-resize;margin-top:-3px}.gradio-container-3-23-0 .cropper-point.point-n{top:-3px;left:50%;cursor:ns-resize;margin-left:-3px}.gradio-container-3-23-0 .cropper-point.point-w{top:50%;left:-3px;cursor:ew-resize;margin-top:-3px}.gradio-container-3-23-0 .cropper-point.point-s{bottom:-3px;left:50%;cursor:s-resize;margin-left:-3px}.gradio-container-3-23-0 .cropper-point.point-ne{top:-3px;right:-3px;cursor:nesw-resize}.gradio-container-3-23-0 .cropper-point.point-nw{top:-3px;left:-3px;cursor:nwse-resize}.gradio-container-3-23-0 .cropper-point.point-sw{bottom:-3px;left:-3px;cursor:nesw-resize}.gradio-container-3-23-0 .cropper-point.point-se{right:-3px;bottom:-3px;opacity:1;cursor:nwse-resize;width:20px;height:20px}@media (min-width: 768px){.gradio-container-3-23-0 .cropper-point.point-se{width:15px;height:15px}}@media (min-width: 992px){.gradio-container-3-23-0 .cropper-point.point-se{width:10px;height:10px}}@media (min-width: 1200px){.gradio-container-3-23-0 .cropper-point.point-se{opacity:.75;width:5px;height:5px}}.gradio-container-3-23-0 .cropper-point.point-se:before{display:block;position:absolute;right:-50%;bottom:-50%;opacity:0;background-color:#39f;width:200%;height:200%;content:" "}.gradio-container-3-23-0 .cropper-invisible{opacity:0}.gradio-container-3-23-0 .cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.gradio-container-3-23-0 .cropper-hide{display:block;position:absolute;width:0;height:0}.gradio-container-3-23-0 .cropper-hidden{display:none!important}.gradio-container-3-23-0 .cropper-move{cursor:move}.gradio-container-3-23-0 .cropper-crop{cursor:crosshair}.gradio-container-3-23-0 .cropper-disabled .cropper-drag-box,.gradio-container-3-23-0 .cropper-disabled .cropper-face,.gradio-container-3-23-0 .cropper-disabled .cropper-line,.gradio-container-3-23-0 .cropper-disabled .cropper-point{cursor:not-allowed}:root{--scale-0: 1rem;--scale-1: 1.125rem;--scale-2: 1.25rem;--scale-3: 1.5rem;--scale-4: 1.875rem;--scale-5: 2.25rem;--scale-6: 3rem;--scale-7: 3.75rem;--scale-8: 4.5rem;--scale-9: 6rem;--scale-10: 8rem;--scale-000: .75rem;--scale-00: .875rem;--scale-fluid-0: clamp(.875rem, .8rem + .25vw, 1rem);--scale-fluid-1: clamp(1rem, .925rem + .25vw, 1.125rem);--scale-fluid-2: clamp(1.125rem, 1.05rem + .25vw, 1.25rem);--scale-fluid-3: clamp(1.8125rem, 2rem + -.625vw, 1.5rem);--scale-fluid-4: clamp(1.5rem, 1.275rem + .75vw, 1.875rem);--scale-fluid-5: clamp(1.875rem, 1.65rem + .75vw, 2.25rem);--scale-fluid-6: clamp(2.25rem, 1.8rem + 1.5vw, 3rem);--scale-fluid-7: clamp(3rem, 2.55rem + 1.5vw, 3.75rem);--scale-fluid-8: clamp(3.75rem, 3.3rem + 1.5vw, 4.5rem);--scale-fluid-9: clamp(4.5rem, 3.6rem + 3vw, 6rem);--scale-fluid-10: clamp(6rem, 4.8rem + 4vw, 8rem);--scale-fluid-000: clamp(.625rem, .55rem + .25vw, .75rem);--scale-fluid-00: clamp(.75rem, .675rem + .25vw, .875rem);--font-sans: Source Sans Pro, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-serif: Georgia, Cambria, "Times New Roman", Times, serif;--font-mono: IBM Plex Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--weight-light: 300;--weight-regular: 400;--weight-medium: 500;--weight-semibold: 600;--weight-bold: 700;--weight-extrabold: 800;--weight-black: 900;--line-none: 1;--line-xs: 1.125;--line-sm: 1.4;--line-md: 1.5;--line-lg: 1.625;--line-xl: 2;--letter-xs: -.05em;--letter-sm: -.025em;--letter-none: 0em;--letter-lg: .025em;--letter-xl: .05em;--prose-xs: 45ch;--prose-sm: 55ch;--prose-md: 65ch;--prose-lg: 75ch;--prose-xl: 85ch;--size-1: 4px;--size-2: 8px;--size-3: 12px;--size-4: 16px;--size-5: 20px;--size-6: 24px;--size-7: 28px;--size-8: 32px;--size-9: 36px;--size-10: 40px;--size-11: 44px;--size-12: 48px;--size-14: 56px;--size-16: 64px;--size-20: 80px;--size-24: 96px;--size-28: 112px;--size-32: 128px;--size-36: 144px;--size-40: 160px;--size-44: 176px;--size-48: 192px;--size-52: 208px;--size-56: 224px;--size-60: 240px;--size-64: 256px;--size-72: 288px;--size-80: 320px;--size-96: 384px;--size-px: 1px;--size-full: 100%;--size-screen: 100vw;--size-min: min-content;--size-max: max-content;--size-0-5: 2px;--size-1-5: 6px;--size-2-5: 10px;--size-screen-h: 100vh;--width-xs: 480px;--width-sm: 640px;--width-md: 768px;--width-lg: 1024px;--width-xl: 1280px;--ratio-square: 1/1;--ratio-portrait: 3/4;--ratio-landscape: 4/3;--ratio-tall: 2/3;--ratio-wide: 3/2;--ratio-widescreen: 16/9;--ratio-golden: 1.618/1;--radius-100: 100%;--radius-xs: 2px;--radius-sm: 4px;--radius-md: 6px;--radius-lg: 8px;--radius-xl: 12px;--radius-full: 9999px;--radius-2xl: 16px;--radius-3xl: 22px;--blur-xs: blur(4px);--blur-sm: blur(8px);--blur-md: blur(16px);--blur-lg: blur(24px);--blur-xl: blur(40px);--layer-1: 10;--layer-2: 20;--layer-3: 30;--layer-4: 40;--layer-5: 50;--layer-below: -1;--layer-top: 2147483647;--shadow-xs: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06);--shadow-sm: 0 4px 6px -2px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .06);--shadow-md: 0 12px 16px -4px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);--shadow-lg: 0 20px 24px -4px rgba(0, 0, 0, .1), 0 8px 8px -4px rgba(0, 0, 0, .04);--shadow-xl: 0 24px 48px -12px rgba(0, 0, 0, .25);--ease-in-sine: cubic-bezier(.47, 0, .745, .715);--ease-out-sine: cubic-bezier(.39, .575, .565, 1);--ease-in-out-sine: cubic-bezier(.445, .05, .55, .95);--ease-in-quad: cubic-bezier(.55, .085, .68, .53);--ease-out-quad: cubic-bezier(.25, .46, .45, .94);--ease-in-out-quad: cubic-bezier(.455, .03, .515, .955);--ease-in-cubic: cubic-bezier(.55, .055, .675, .19);--ease-out-cubic: cubic-bezier(.215, .61, .355, 1);--ease-in-out-cubic: cubic-bezier(.645, .045, .355, 1);--ease-in-quart: cubic-bezier(.895, .03, .685, .22);--ease-out-quart: cubic-bezier(.165, .84, .44, 1);--ease-in-out-quart: cubic-bezier(.77, 0, .175, 1);--ease-in-quint: cubic-bezier(.755, .05, .855, .06);--ease-out-quint: cubic-bezier(.23, 1, .32, 1);--ease-in-out-quint: cubic-bezier(.86, 0, .07, 1);--ease-in-expo: cubic-bezier(.95, .05, .795, .035);--ease-out-expo: cubic-bezier(.19, 1, .22, 1);--ease-in-out-expo: cubic-bezier(1, 0, 0, 1);--ease-in-circ: cubic-bezier(.6, .04, .98, .335);--ease-out-circ: cubic-bezier(.075, .82, .165, 1);--ease-in-out-circ: cubic-bezier(.785, .135, .15, .86);--ease-in-back: cubic-bezier(.6, -.28, .735, .045);--ease-out-back: cubic-bezier(.175, .885, .32, 1.275);--ease-in-out-back: cubic-bezier(.68, -.55, .265, 1.55);--easing-standard: cubic-bezier(.4, 0, .2, 1);--easing-accelerate: cubic-bezier(.4, 0, 1, 1);--easing-decelerate: cubic-bezier(0, 0, .2, 1);--elevation-1: 0 1px 2px 0 rgba(0, 0, 0, .05);--elevation-2: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06);--elevation-3: 0 4px 6px -2px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .06);--elevation-4: 0 12px 16px -4px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);--elevation-5: 0 20px 24px -4px rgba(0, 0, 0, .1), 0 8px 8px -4px rgba(0, 0, 0, .04);--elevation-6: 0 24px 48px -12px rgba(0, 0, 0, .25);--elevation-7: 0 32px 64px -12px rgba(0, 0, 0, .2);--color-grey-50: #f9fafb;--color-grey-100: #f3f4f6;--color-grey-200: #e5e7eb;--color-grey-300: #d1d5db;--color-grey-400: #9ca3af;--color-grey-500: #6b7280;--color-grey-600: #4b5563;--color-grey-700: #374151;--color-grey-800: #1f2937;--color-grey-900: #111827;--color-black: #14141b;--color-grey: #6b7280;--color-red-300: #fca5a5;--color-red-500: #ef4444;--color-red-700: #b91c1c;--color-red: #ef4444;--color-green-300: #86efac;--color-green-500: #22c55e;--color-green-700: #15803d;--color-green: #22c55e;--color-blue-300: #93c5fd;--color-blue-500: #0ea5e9;--color-blue-700: #1d4ed8;--color-blue: #0ea5e9;--color-pink-300: #fbb6ce;--color-pink-500: #ed64a6;--color-pink-700: #d53f8c;--color-pink: var(--color-pink-500);--color-purple-300: #b794f4;--color-purple-500: #805ad5;--color-purple-700: #6b46c1;--color-purple: var(--color-purple-500);--color-teal-300: #81e6d9;--color-teal-500: #38b2ac;--color-teal-700: #2c7a7b;--color-teal: var(--color-teal-500);--color-yellow-300: #fde047;--color-yellow-500: #eab308;--color-yellow-700: #a16207;--color-yellow: #eab308;--color-orange-300: #ffb066;--color-orange-500: #ff7c00;--color-orange-700: #ce6400;--color-orange: #f97316;--color-brown-300: #a1887f;--color-brown-500: #795548;--color-brown-700: #5d4037;--color-brown: var(--color-brown-500);--color-blue-10: #fafcff;--color-blue-50: #eff6ff;--color-blue-100: #dbeafe;--color-blue-200: #bfdbfe;--color-blue-400: #60a5fa;--color-blue-600: #2563eb;--color-blue-800: #1e40af;--color-blue-900: #1e3a8a;--color-blue-950: #1c366b;--color-grey-10: #fdfdfe;--color-grey-950: #0b0f19;--color-red-10: #fffbfb;--color-red-50: #fef2f2;--color-red-100: #fee2e2;--color-red-200: #fecaca;--color-red-400: #f87171;--color-red-600: #dc2626;--color-red-800: #991b1b;--color-red-900: #7f1d1d;--color-red-950: #63171a;--color-green-10: #f9fefc;--color-green-50: #ecfdf5;--color-green-100: #d1fae5;--color-green-200: #bbf7d0;--color-green-400: #4ade80;--color-green-600: #16a34a;--color-green-800: #166534;--color-green-900: #14532d;--color-green-950: #134227;--color-orange-10: #fffbf6;--color-orange-50: #fff2e5;--color-orange-100: #ffe5cc;--color-orange-200: #ffd8b4;--color-orange-400: #ff9633;--color-orange-600: #ee7400;--color-orange-800: #a45000;--color-orange-900: #5c2d00;--color-orange-950: #3c1f00;--color-yellow-10: #fffef8;--color-yellow-50: #fffbeb;--color-yellow-100: #fff9c2;--color-yellow-200: #fef08a;--color-yellow-400: #facc15;--color-yellow-600: #ca8a04;--color-yellow-800: #854d0e;--color-yellow-900: #713f12;--color-yellow-950: #633112;--grid-2: repeat(2, minmax(0, 1fr));--grid-3: repeat(3, minmax(0, 1fr));--grid-4: repeat(4, minmax(0, 1fr));--grid-5: repeat(5, minmax(0, 1fr));--grid-6: repeat(6, minmax(0, 1fr));--grid-7: repeat(7, minmax(0, 1fr));--grid-8: repeat(8, minmax(0, 1fr));--grid-9: repeat(9, minmax(0, 1fr));--grid-10: repeat(10, minmax(0, 1fr));--grid-11: repeat(11, minmax(0, 1fr));--grid-12: repeat(12, minmax(0, 1fr));--grid-page-width: var(--width-xl);--grid-page-gutter: 5vw;--grid-page-main: 2 / 3;--grid-page: minmax(var(--grid-page-gutter), 1fr) minmax(0, var(--grid-page-width)) minmax(var(--grid-page-gutter), 1fr)}.gradio-container-3-23-0 .prose{font-size:var(--text-md)}.gradio-container-3-23-0 .prose *{color:var(--body-text-color)}.gradio-container-3-23-0 .prose p{margin-bottom:var(--spacing-sm);line-height:var(--line-lg)}.gradio-container-3-23-0 .prose h1,.gradio-container-3-23-0 .prose h2,.gradio-container-3-23-0 .prose h3,.gradio-container-3-23-0 .prose h4,.gradio-container-3-23-0 .prose h5{margin:var(--spacing-xxl) 0 var(--spacing-lg);font-weight:var(--prose-header-text-weight);line-height:1.3}.gradio-container-3-23-0 .prose>*:first-child{margin-top:0}.gradio-container-3-23-0 .prose h1{margin-top:0;font-size:var(--text-xxl)}.gradio-container-3-23-0 .prose h2{font-size:var(--text-xl)}.gradio-container-3-23-0 .prose h3{font-size:var(--text-lg)}.gradio-container-3-23-0 .prose h4{font-size:1.1em}.gradio-container-3-23-0 .prose h5{font-size:1.05em}.gradio-container-3-23-0 .prose ul{list-style:circle inside}.gradio-container-3-23-0 .prose ol{list-style:decimal inside}.gradio-container-3-23-0 .prose ul>p,.gradio-container-3-23-0 .prose li>p{display:inline-block}.gradio-container-3-23-0 .prose ol,.gradio-container-3-23-0 .prose ul{margin-top:0;padding-left:0}.gradio-container-3-23-0 .prose ul ul,.gradio-container-3-23-0 .prose ul ol,.gradio-container-3-23-0 .prose ol ol,.gradio-container-3-23-0 .prose ol ul{margin:.5em 0 .5em 3em;font-size:90%}.gradio-container-3-23-0 .prose li{margin-bottom:.5em}.gradio-container-3-23-0 .prose code{border:1px solid var(--border-color-primary);border-radius:var(--radius-sm);background:var(--background-fill-secondary);padding:1px 3px;font-size:85%;white-space:nowrap}.gradio-container-3-23-0 .prose pre>code{display:block;padding:.5em .7em;white-space:pre}.gradio-container-3-23-0 .prose th,.gradio-container-3-23-0 .prose td{border-bottom:1px solid #e1e1e1;padding:12px 15px;text-align:left}.gradio-container-3-23-0 .prose th:first-child,.gradio-container-3-23-0 .prose td:first-child{padding-left:0}.gradio-container-3-23-0 .prose th:last-child,.gradio-container-3-23-0 .prose td:last-child{padding-right:0}.gradio-container-3-23-0 .prose button,.gradio-container-3-23-0 .prose .button,.gradio-container-3-23-0 .prose input,.gradio-container-3-23-0 .prose textarea,.gradio-container-3-23-0 .prose select,.gradio-container-3-23-0 .prose fieldset{margin-bottom:var(--spacing-sm)}.gradio-container-3-23-0 .prose pre,.gradio-container-3-23-0 .prose blockquote,.gradio-container-3-23-0 .prose dl,.gradio-container-3-23-0 .prose figure,.gradio-container-3-23-0 .prose table,.gradio-container-3-23-0 .prose p,.gradio-container-3-23-0 .prose ul,.gradio-container-3-23-0 .prose ol,.gradio-container-3-23-0 .prose form{margin-bottom:var(--spacing-md)}.gradio-container-3-23-0 .prose a{color:var(--link-text-color);text-decoration:underline}.gradio-container-3-23-0 .prose a:visited{color:var(--link-text-color-visited)}.gradio-container-3-23-0 .prose a:hover{color:var(--link-text-color-hover)}.gradio-container-3-23-0 .prose a:active{color:var(--link-text-color-active)}.gradio-container-3-23-0 .prose hr{margin-top:3em;margin-bottom:3.5em;border-width:0;border-top:1px solid #e1e1e1}.gradio-container-3-23-0 .prose blockquote{margin:var(--size-6) 0!important;border-left:5px solid var(--border-color-primary);padding-left:var(--size-2)}.gradio-container-3-23-0 .prose :last-child{margin-bottom:0!important}.gradio-container-3-23-0{display:flex;position:relative;flex-direction:column;background:var(--body-background-fill);padding:0;min-height:1px;overflow:hidden;color:var(--button-secondary-text-color)}.embed-container.svelte-ac4rv4.svelte-ac4rv4{margin:var(--size-4) 0px;border:1px solid var(--button-secondary-border-color);border-radius:var(--embed-radius)}.with-info.svelte-ac4rv4.svelte-ac4rv4{padding-bottom:var(--size-7)}.embed-container.svelte-ac4rv4>.main.svelte-ac4rv4{padding:var(--size-4)}.app.svelte-ac4rv4>.main.svelte-ac4rv4{display:flex;flex-grow:1;flex-direction:column}.app.svelte-ac4rv4.svelte-ac4rv4{position:relative;margin:auto;padding:var(--size-4);width:100%;height:100%}@media (min-width: 640px){.app.svelte-ac4rv4.svelte-ac4rv4{max-width:640px}}@media (min-width: 768px){.app.svelte-ac4rv4.svelte-ac4rv4{max-width:768px}}@media (min-width: 1024px){.app.svelte-ac4rv4.svelte-ac4rv4{max-width:1024px}}@media (min-width: 1280px){.app.svelte-ac4rv4.svelte-ac4rv4{max-width:1280px}}@media (min-width: 1536px){.app.svelte-ac4rv4.svelte-ac4rv4{max-width:1536px}}.info.svelte-ac4rv4.svelte-ac4rv4{display:flex;position:absolute;bottom:0;justify-content:flex-start;border-top:1px solid var(--button-secondary-border-color);padding:var(--size-1) var(--size-5);width:100%;color:var(--body-text-color-subdued);font-size:var(--text-md);white-space:nowrap}.info.svelte-ac4rv4>span.svelte-ac4rv4{word-wrap:break-word;-break:keep-all;display:block;word-break:keep-all}.info.svelte-ac4rv4>span.svelte-ac4rv4:nth-child(1){margin-right:4px;min-width:0px;max-width:max-content;overflow:hidden;color:var(--body-text-color);text-overflow:ellipsis;white-space:nowrap}.info.svelte-ac4rv4>span.svelte-ac4rv4:nth-child(2){margin-right:3px}.info.svelte-ac4rv4>span.svelte-ac4rv4:nth-child(2),.info.svelte-ac4rv4>span.svelte-ac4rv4:nth-child(3){width:max-content}.info.svelte-ac4rv4>span.svelte-ac4rv4:nth-child(3){align-self:flex-end;justify-self:flex-end;margin-left:auto;text-align:right}.info.svelte-ac4rv4>span.svelte-ac4rv4:nth-child(1){flex-shrink:9}.hidden-title.svelte-ac4rv4.svelte-ac4rv4{position:absolute;left:var(--size-5);opacity:0;background:var(--button-secondary-background-fill);padding-right:4px}.info.svelte-ac4rv4 a.svelte-ac4rv4{color:var(--body-text-color)}.title.svelte-ac4rv4.svelte-ac4rv4{font-size:var(--text-sm);font-family:var(--font-mono)}.hf.svelte-ac4rv4.svelte-ac4rv4{margin-left:5px}.space-logo.svelte-ac4rv4 img.svelte-ac4rv4{display:inline-block;margin-bottom:4px;height:12px}a.svelte-ac4rv4.svelte-ac4rv4:hover{text-decoration:underline}svg.svelte-zyxd38.svelte-zyxd38{width:var(--size-20);height:var(--size-20)}svg.svelte-zyxd38 path.svelte-zyxd38{fill:var(--loader-color)}div.svelte-zyxd38.svelte-zyxd38{z-index:var(--layer-2)}.margin.svelte-zyxd38.svelte-zyxd38{margin:var(--size-4)}.wrap.svelte-gjihhp{display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:var(--layer-5);border-radius:var(--block-radius);background:var(--background-fill-primary);padding:0 var(--size-6);max-height:var(--size-screen-h);overflow:hidden}.wrap.center.svelte-gjihhp{top:0;right:0;left:0}.wrap.default.svelte-gjihhp{inset:0}.hide.svelte-gjihhp{opacity:0;pointer-events:none}.generating.svelte-gjihhp{animation:svelte-gjihhp-pulse 2s cubic-bezier(.4,0,.6,1) infinite;border:2px solid var(--color-accent);background:transparent}.translucent.svelte-gjihhp{background:none}@keyframes svelte-gjihhp-pulse{0%,to{opacity:1}50%{opacity:.5}}.loading.svelte-gjihhp{z-index:var(--layer-2);color:var(--body-text-color)}.eta-bar.svelte-gjihhp{position:absolute;inset:0;transform-origin:left;opacity:.8;z-index:var(--layer-1);transition:10ms;background:var(--background-fill-secondary)}.progress-bar-wrap.svelte-gjihhp{border:1px solid var(--border-color-primary);background:var(--background-fill-primary);width:55.5%;height:var(--size-4)}.progress-bar.svelte-gjihhp{transform-origin:left;background-color:var(--loader-color);width:var(--size-full);height:var(--size-full)}.progress-level.svelte-gjihhp{display:flex;flex-direction:column;align-items:center;gap:1;z-index:var(--layer-2);width:var(--size-full)}.progress-level-inner.svelte-gjihhp{margin:var(--size-2) auto;color:var(--body-text-color);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text.svelte-gjihhp{position:absolute;top:0;right:0;z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text-center.svelte-gjihhp{display:flex;position:absolute;top:0;right:0;justify-content:center;align-items:center;transform:translateY(var(--size-6));z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono);text-align:center}.error.svelte-gjihhp{box-shadow:var(--shadow-drop);border:solid 1px var(--error-border-color);border-radius:var(--radius-full);background:var(--error-background-fill);padding-right:var(--size-4);padding-left:var(--size-4);color:var(--error-text-color);font-weight:var(--weight-semibold);font-size:var(--text-lg);line-height:var(--line-lg);font-family:var(--font)}.toast.svelte-gjihhp{position:fixed;top:0;right:var(--size-4);left:var(--size-4);z-index:var(--layer-top);padding:var(--size-4)}.toast-body.svelte-gjihhp{display:flex;position:absolute;top:var(--size-8);right:0;left:0;align-items:center;margin:var(--size-6) var(--size-4);margin:auto;box-shadow:var(--shadow-drop-lg);border:1px solid var(--error-border-color);border-radius:var(--container-radius);background:var(--error-background-fill);padding:var(--size-4) var(--size-6);max-width:1200px;max-width:610px;overflow:hidden;pointer-events:auto}.toast-title.svelte-gjihhp{display:flex;align-items:center;padding:var(--size-1) var(--size-3);color:var(--error-text-color);color:var(--color-red-500);font-weight:var(--weight-bold);font-size:var(--text-lg);line-height:var(--line-xs)}.toast-close.svelte-gjihhp{display:flex;flex-shrink:0;justify-content:center;align-items:center;border-radius:var(--radius-full);background:var(--color-red-600);padding:var(--size-2);padding-left:calc(var(--size-2) - 1px);width:var(--size-10);height:var(--size-10);color:#fff}.toast-text.svelte-gjihhp{padding:var(--size-1) var(--size-3);color:var(--body-text-color);font-family:var(--font-mono)}.toast-details.svelte-gjihhp{padding-left:var(--size-3);width:100%}@media (min-width: 768px){.toast-body.svelte-gjihhp{right:var(--size-4);left:auto}}.error.svelte-y6l4b.svelte-y6l4b{position:relative;padding:var(--size-4);color:var(--body-text-color);text-align:center}.error.svelte-y6l4b>.svelte-y6l4b{margin-top:var(--size-4)}a.svelte-y6l4b.svelte-y6l4b{color:var(--link-text-color)}a.svelte-y6l4b.svelte-y6l4b:hover{color:var(--link-text-color-hover);text-decoration:underline}a.svelte-y6l4b.svelte-y6l4b:visited{color:var(--link-text-color-visited)}a.svelte-y6l4b.svelte-y6l4b:active{color:var(--link-text-color-active)} diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/python.20e39c92.svg b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/python.20e39c92.svg new file mode 100644 index 0000000000000000000000000000000000000000..ae0065b85722deca4baac8222b2ebf1df4a1c82b --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/assets/python.20e39c92.svg @@ -0,0 +1,20 @@ + diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/Bunny.obj b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/Bunny.obj new file mode 100644 index 0000000000000000000000000000000000000000..9baeb363cce8feb5dd62ecaf8d64a14b6c50ce37 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/Bunny.obj @@ -0,0 +1,7474 @@ +# OBJ file format with ext .obj +# vertex count = 2503 +# face count = 4968 +v -3.4101800e-003 1.3031957e-001 2.1754370e-002 +v -8.1719160e-002 1.5250145e-001 2.9656090e-002 +v -3.0543480e-002 1.2477885e-001 1.0983400e-003 +v -2.4901590e-002 1.1211138e-001 3.7560240e-002 +v -1.8405680e-002 1.7843055e-001 -2.4219580e-002 +v 1.9067940e-002 1.2144925e-001 3.1968440e-002 +v 6.0412000e-003 1.2494359e-001 3.2652890e-002 +v -1.3469030e-002 1.6299355e-001 -1.2000020e-002 +v -3.4393240e-002 1.7236688e-001 -9.8213000e-004 +v -8.4314160e-002 1.0957263e-001 3.7097300e-003 +v -4.2233540e-002 1.7211574e-001 -4.1799800e-003 +v -6.3308390e-002 1.5660615e-001 -1.3838790e-002 +v -7.6903950e-002 1.6708033e-001 -2.6931360e-002 +v -7.2253920e-002 1.1539550e-001 5.1670300e-002 +v 1.2981330e-002 1.1366375e-001 3.8302950e-002 +v -3.7857280e-002 1.7010102e-001 1.4236000e-003 +v 4.8689400e-003 3.7962370e-002 4.5867630e-002 +v -5.7180550e-002 4.0918830e-002 4.6301340e-002 +v -4.5209070e-002 3.8839100e-002 4.4503770e-002 +v -3.3761490e-002 1.2617876e-001 1.7132300e-003 +v -5.0242270e-002 1.5773747e-001 9.3944500e-003 +v -2.1216950e-002 1.5887938e-001 -4.6923700e-003 +v -5.6472950e-002 1.5778406e-001 8.1786500e-003 +v -5.2802060e-002 4.1319860e-002 4.6169800e-002 +v -4.9960340e-002 4.3101950e-002 4.4462650e-002 +v -2.9748750e-002 3.6539860e-002 5.2493310e-002 +v -3.5438900e-003 4.2659770e-002 4.7541530e-002 +v 4.9304900e-003 4.1982660e-002 4.5723390e-002 +v -3.9088180e-002 1.6872020e-001 -1.1924680e-002 +v -5.6901000e-002 4.5437000e-002 4.3236960e-002 +v -4.1244880e-002 4.3098890e-002 4.2129560e-002 +v -2.6471980e-002 4.5034530e-002 5.1219460e-002 +v -2.1866970e-002 4.4022930e-002 5.3243800e-002 +v -3.6996250e-002 1.6899301e-001 1.3256300e-003 +v -6.7216590e-002 1.6171340e-001 -1.3733710e-002 +v 4.9760060e-002 7.0235220e-002 2.3732020e-002 +v -4.9186640e-002 4.6411230e-002 4.1170040e-002 +v -4.4590380e-002 4.3797990e-002 4.2685460e-002 +v -4.3686470e-002 4.7154500e-002 4.0286310e-002 +v -2.2491950e-002 4.6513620e-002 5.1885310e-002 +v -6.5174200e-003 4.5036200e-002 4.7502780e-002 +v 3.7699000e-004 4.4935790e-002 4.6519930e-002 +v 3.4023920e-002 1.1353879e-001 2.4595280e-002 +v -2.6467900e-002 1.8104250e-001 -8.0811700e-003 +v -1.7533470e-002 4.7964250e-002 4.8829630e-002 +v -7.0012600e-003 4.6416520e-002 4.7485540e-002 +v 5.9862300e-003 4.6689140e-002 4.9073620e-002 +v 9.1007200e-003 4.8474490e-002 4.9353190e-002 +v -3.5453700e-002 1.1244769e-001 3.5055410e-002 +v -7.5983200e-002 1.3820800e-001 4.9216580e-002 +v 3.4838440e-002 4.3153410e-002 2.8954310e-002 +v -5.2655550e-002 4.8494220e-002 3.8731190e-002 +v -4.7378940e-002 4.8456670e-002 3.9126790e-002 +v -3.8933750e-002 4.6364270e-002 4.0364780e-002 +v -2.6468940e-002 4.7816430e-002 4.9322590e-002 +v -2.2365790e-002 4.8073650e-002 5.0126500e-002 +v -1.3373430e-002 4.7892410e-002 4.7883850e-002 +v -1.2193490e-002 4.9470300e-002 4.9484490e-002 +v -6.3364000e-004 4.7193060e-002 4.9136900e-002 +v 2.0656800e-003 5.0104680e-002 5.2290220e-002 +v -2.2749270e-002 4.9883880e-002 4.6605520e-002 +v -1.8002080e-002 4.9917850e-002 4.6947970e-002 +v -7.8036800e-003 5.0169310e-002 5.0988650e-002 +v -2.6843800e-003 5.1247420e-002 5.3186790e-002 +v -6.3875650e-002 1.6140094e-001 -2.0064210e-002 +v 3.2434000e-002 4.5333970e-002 3.0316760e-002 +v -8.8064570e-002 1.2496764e-001 5.7412000e-004 +v -4.1503710e-002 1.6748512e-001 3.2765900e-003 +v -6.4457010e-002 1.5342891e-001 -5.1180400e-003 +v -3.4303190e-002 5.0520150e-002 3.8286020e-002 +v -2.2949400e-002 5.1020650e-002 4.3926450e-002 +v -1.4354710e-002 5.4428200e-002 5.0710310e-002 +v 1.3773100e-003 5.2302710e-002 5.3149010e-002 +v 3.6285000e-003 5.3198640e-002 5.3422710e-002 +v 8.0723800e-003 5.1574140e-002 5.1773560e-002 +v -7.2665890e-002 1.3005582e-001 5.1668200e-002 +v 3.7992780e-002 4.9793200e-002 3.1902020e-002 +v 3.8497260e-002 4.8062400e-002 3.1737450e-002 +v 2.1503510e-002 1.2563988e-001 2.1252620e-002 +v -7.6481330e-002 1.4827412e-001 -8.9376200e-003 +v -8.7240410e-002 1.1967213e-001 -1.7813000e-004 +v -4.3719960e-002 1.6822738e-001 2.3425000e-003 +v -4.0652200e-002 1.2266506e-001 2.6290300e-002 +v -4.6686180e-002 5.4570720e-002 3.7587370e-002 +v -4.4071750e-002 5.1058250e-002 3.8977810e-002 +v -3.8144110e-002 5.0599600e-002 3.9302160e-002 +v -1.9875770e-002 5.1607710e-002 4.6142000e-002 +v -1.6911250e-002 5.1843550e-002 4.8459320e-002 +v -1.6249190e-002 5.4292110e-002 5.0306940e-002 +v -1.0446540e-002 5.3685970e-002 5.1958610e-002 +v -4.3090900e-003 5.4467500e-002 5.3908250e-002 +v 7.8152700e-003 5.5050680e-002 5.2750250e-002 +v 3.7955090e-002 1.0488710e-001 -3.2031800e-003 +v -7.9003790e-002 1.2850550e-001 5.3149340e-002 +v -7.9778990e-002 1.3448894e-001 5.0990290e-002 +v -5.9129700e-002 1.5039712e-001 3.4489540e-002 +v -6.5691790e-002 1.4961818e-001 3.8160980e-002 +v -3.1951660e-002 1.2518394e-001 1.9400580e-002 +v -6.9372590e-002 1.6061775e-001 -9.1905000e-003 +v -4.5225500e-002 1.2935459e-001 2.0377520e-002 +v -4.1879110e-002 5.6164390e-002 3.9796700e-002 +v -3.0614840e-002 5.4412650e-002 3.6694290e-002 +v -2.4787600e-002 5.2606220e-002 4.0839760e-002 +v -2.1588860e-002 5.6836920e-002 4.5467040e-002 +v -2.4264000e-004 5.4536020e-002 5.4641200e-002 +v -8.0900510e-002 1.2558713e-001 5.2155370e-002 +v -2.9996210e-002 1.7811137e-001 -5.2358200e-003 +v 3.5515390e-002 5.0449570e-002 3.1439830e-002 +v 4.3315550e-002 5.2145550e-002 3.2492110e-002 +v -6.3938540e-002 1.5262699e-001 3.4481070e-002 +v -4.4489440e-002 6.1077710e-002 3.9545320e-002 +v -3.8979900e-002 5.7996270e-002 4.0151390e-002 +v -7.9087730e-002 1.7044488e-001 -4.1373170e-002 +v -4.6247300e-003 5.7759650e-002 5.3990710e-002 +v -1.4985500e-003 5.5925480e-002 5.4630800e-002 +v 5.1981700e-003 5.7017990e-002 5.3423530e-002 +v 3.0920000e-005 1.2315746e-001 3.4749660e-002 +v 3.3568300e-002 1.1523716e-001 2.1798410e-002 +v 3.8686300e-002 5.6450590e-002 3.1188930e-002 +v -3.4385780e-002 5.4096000e-002 3.8060290e-002 +v -8.5308300e-003 6.0159420e-002 5.5308950e-002 +v -4.4024000e-004 5.8343410e-002 5.4483410e-002 +v -9.1078730e-002 1.1506037e-001 4.0141810e-002 +v 4.0775480e-002 5.4557490e-002 3.2014740e-002 +v 4.5636880e-002 5.7402620e-002 3.1992220e-002 +v 2.0358850e-002 1.2448747e-001 2.5906340e-002 +v -1.4169700e-002 1.2767892e-001 1.3080500e-003 +v -1.1987590e-002 5.7493210e-002 5.2752420e-002 +v 3.2514500e-003 5.9828640e-002 5.5464300e-002 +v -1.2395240e-002 1.2264726e-001 3.3588280e-002 +v 1.3813780e-002 1.2322188e-001 3.2502590e-002 +v -7.7004310e-002 1.5521281e-001 2.4534770e-002 +v -2.8001360e-002 6.1075420e-002 3.7471210e-002 +v -8.5480000e-004 6.0593520e-002 5.5824810e-002 +v -3.8050200e-002 1.1527068e-001 3.3178540e-002 +v -1.6231340e-002 1.2382942e-001 2.9576990e-002 +v -2.5373550e-002 1.5840012e-001 -1.4801300e-003 +v -6.7818590e-002 1.5454353e-001 3.0233720e-002 +v -4.3082600e-003 6.1418570e-002 5.5688490e-002 +v -3.1958900e-003 1.1912518e-001 3.8349580e-002 +v -6.4292400e-003 1.2201090e-001 3.5740890e-002 +v 4.2312960e-002 5.9099150e-002 3.0848420e-002 +v 4.8510010e-002 6.1780760e-002 3.0347250e-002 +v 5.0412290e-002 6.0312610e-002 3.0245060e-002 +v -3.9185590e-002 6.3074530e-002 4.1382890e-002 +v -3.4448660e-002 6.0780500e-002 3.9543990e-002 +v -1.4746030e-002 6.5583910e-002 5.3730860e-002 +v 2.6645200e-003 6.2700010e-002 5.6525210e-002 +v -1.3991610e-002 1.1962575e-001 3.6251540e-002 +v 1.9659170e-002 1.1236219e-001 3.7545270e-002 +v -3.2597160e-002 1.7498725e-001 -2.5953100e-003 +v -2.1513900e-003 9.9437380e-002 4.9849750e-002 +v -5.6001390e-002 6.1830670e-002 2.7931150e-002 +v -5.4707260e-002 6.3461570e-002 3.1670590e-002 +v -5.1307940e-002 6.0521660e-002 3.1434930e-002 +v -4.1979320e-002 6.9629980e-002 4.1824930e-002 +v -3.0272490e-002 6.2474660e-002 3.7982220e-002 +v -1.1387860e-002 6.4742460e-002 5.4918000e-002 +v 6.9544900e-003 6.4700130e-002 5.5599150e-002 +v 4.3015090e-002 9.7690960e-002 1.0258300e-003 +v 4.0635900e-002 6.1574860e-002 2.9841250e-002 +v 4.6183560e-002 6.1910110e-002 3.0223400e-002 +v 3.7552960e-002 1.0685291e-001 2.6303470e-002 +v -7.8640730e-002 1.6387238e-001 -2.8387790e-002 +v -6.1996240e-002 1.4761484e-001 -4.3256800e-003 +v -5.7499800e-003 6.5488980e-002 5.6173390e-002 +v 2.5369000e-004 6.5741170e-002 5.6569260e-002 +v -2.0542550e-002 1.1979518e-001 3.3003670e-002 +v 4.3155900e-003 1.2782561e-001 2.8646880e-002 +v -4.6549580e-002 6.7652130e-002 3.9635790e-002 +v -1.7420580e-002 6.9659490e-002 5.4089530e-002 +v -1.5242190e-002 7.0909900e-002 5.5004790e-002 +v -1.0282890e-002 6.8926360e-002 5.5289610e-002 +v -1.1289000e-004 6.9288200e-002 5.6579790e-002 +v -3.6309330e-002 1.1876943e-001 3.0674020e-002 +v -7.0325800e-002 6.3367770e-002 1.9809180e-002 +v 4.3023100e-002 6.3795810e-002 2.8039210e-002 +v 4.2831110e-002 8.5556040e-002 2.7873760e-002 +v 1.6981600e-002 1.2715003e-001 2.2931490e-002 +v -4.2121490e-002 1.2825104e-001 1.0751500e-003 +v 1.6329230e-002 1.2251895e-001 3.1375390e-002 +v -8.1264160e-002 1.5381172e-001 2.5897830e-002 +v -3.2257870e-002 8.8192600e-002 -2.5130960e-002 +v -1.3774950e-002 7.0887950e-002 5.4695630e-002 +v 5.2929600e-003 6.8006030e-002 5.5670490e-002 +v 7.6962500e-003 7.2375600e-002 5.6062150e-002 +v 3.4830600e-003 1.2002635e-001 3.6911950e-002 +v 6.6532500e-003 1.1673563e-001 3.8716340e-002 +v 4.6086570e-002 6.6473930e-002 2.6808990e-002 +v 5.2327290e-002 6.4327070e-002 2.8281890e-002 +v -6.1897630e-002 1.2297065e-001 -8.7725500e-003 +v -6.3934700e-003 1.0524472e-001 -2.2841900e-002 +v -3.5218330e-002 6.8559830e-002 4.1381470e-002 +v -3.2689880e-002 6.7729720e-002 4.0124390e-002 +v -2.9245440e-002 6.9551520e-002 3.9369010e-002 +v -5.0024500e-003 6.9655000e-002 5.6892510e-002 +v 1.6573960e-002 1.1890153e-001 3.5042300e-002 +v -8.9385100e-002 9.9024040e-002 1.7521830e-002 +v 4.5719230e-002 6.9489400e-002 2.3549340e-002 +v 5.4537210e-002 6.8796720e-002 2.4517690e-002 +v -4.4989450e-002 7.1577330e-002 4.1929250e-002 +v -4.2439400e-003 1.2914902e-001 2.5829230e-002 +v -7.3880090e-002 1.2091638e-001 5.3395800e-002 +v -7.4033870e-002 1.4406894e-001 4.4994970e-002 +v 5.0400010e-002 6.7292480e-002 2.6851470e-002 +v -5.4056890e-002 1.5671602e-001 -2.4865900e-003 +v 2.6148110e-002 1.2014725e-001 2.7308010e-002 +v -1.0736490e-002 1.2990285e-001 1.0993790e-002 +v -4.5078840e-002 8.7261130e-002 -2.1865520e-002 +v -3.8340900e-002 6.8843770e-002 4.1846470e-002 +v -2.9255580e-002 7.5169210e-002 4.1186430e-002 +v -4.7311210e-002 1.6296037e-001 6.0740300e-003 +v -1.1866030e-002 7.3183750e-002 5.6250050e-002 +v -6.3734600e-003 7.2184340e-002 5.7972980e-002 +v -2.9935300e-003 7.2186440e-002 5.8167190e-002 +v -2.5781060e-002 9.3778180e-002 -2.8388220e-002 +v -1.6692560e-002 1.1568553e-001 3.7853150e-002 +v -8.4123410e-002 1.0832050e-001 2.4730980e-002 +v -7.4294080e-002 1.6356850e-001 -1.5534220e-002 +v -9.4297150e-002 1.2617744e-001 1.9224650e-002 +v -3.5207090e-002 1.2505219e-001 2.1635690e-002 +v -4.9495940e-002 7.3436340e-002 4.1673570e-002 +v -3.3064160e-002 7.6654840e-002 4.1277900e-002 +v -7.3157300e-003 7.3919590e-002 5.7971690e-002 +v 2.1850000e-005 7.3496040e-002 5.7696650e-002 +v 4.1934400e-003 7.2915170e-002 5.6298730e-002 +v -7.7256080e-002 1.4565854e-001 4.3122930e-002 +v 4.1073260e-002 8.8724320e-002 -9.7879400e-003 +v 3.7418710e-002 1.0850822e-001 3.3973000e-004 +v -5.5111380e-002 7.4687840e-002 4.1939740e-002 +v -4.2740230e-002 7.6995340e-002 4.2804080e-002 +v -6.8531190e-002 1.5630045e-001 2.0997710e-002 +v -9.9440200e-003 7.6343100e-002 5.7388560e-002 +v -3.2479200e-003 7.5710690e-002 5.8714640e-002 +v 1.3414380e-002 9.3073740e-002 5.1467750e-002 +v -7.3504440e-002 9.3883340e-002 -1.4751720e-002 +v -7.4471830e-002 1.3507476e-001 5.0688900e-002 +v -2.5851310e-002 1.2182948e-001 2.6079670e-002 +v -3.4022940e-002 1.7597076e-001 -3.7271600e-003 +v -7.5405850e-002 1.6839072e-001 -2.6792980e-002 +v -3.6658410e-002 7.5087300e-002 4.2006940e-002 +v -1.7795480e-002 7.7486190e-002 5.6087240e-002 +v -1.1378660e-002 7.9877150e-002 5.7698880e-002 +v -1.0415000e-004 7.6881950e-002 5.8190740e-002 +v 2.7381400e-003 7.9105680e-002 5.6719190e-002 +v 5.5681200e-003 7.6397140e-002 5.6327220e-002 +v -6.1895860e-002 1.5424247e-001 -1.9018600e-002 +v -7.2646960e-002 1.4098943e-001 4.6976640e-002 +v 1.5799740e-002 1.2901416e-001 1.3236870e-002 +v -1.1703420e-002 9.7355720e-002 5.1592080e-002 +v -5.8922160e-002 7.7545490e-002 4.2961390e-002 +v -5.3121320e-002 7.7912430e-002 4.3334920e-002 +v -5.0745740e-002 7.6148400e-002 4.3137630e-002 +v -4.7401820e-002 7.5550340e-002 4.2630140e-002 +v -4.5055620e-002 7.8796280e-002 4.2341310e-002 +v -3.9517650e-002 7.8127780e-002 4.2918620e-002 +v -1.5245570e-002 8.2940770e-002 5.6934590e-002 +v -1.4557790e-002 7.6582160e-002 5.6493250e-002 +v -5.9406000e-003 7.9038240e-002 5.7969830e-002 +v 3.7176540e-002 1.1064404e-001 1.8811330e-002 +v 2.3929700e-003 1.3162713e-001 1.1955100e-002 +v -9.3644210e-002 1.1789378e-001 1.8662080e-002 +v -6.3939810e-002 7.8621830e-002 4.2083520e-002 +v -4.5376460e-002 8.2383550e-002 4.3282120e-002 +v -3.6505460e-002 8.1152260e-002 4.3162320e-002 +v -3.3244340e-002 8.2266590e-002 4.1852180e-002 +v -3.0800650e-002 8.0068420e-002 4.1798070e-002 +v -2.0578500e-003 8.0998290e-002 5.7553840e-002 +v 8.1848100e-003 8.0756170e-002 5.5374510e-002 +v -1.2953370e-002 1.1593580e-001 3.8920230e-002 +v -7.8081470e-002 1.2351940e-001 5.2136990e-002 +v -2.6580930e-002 1.5567694e-001 -4.1963400e-003 +v -8.2471600e-002 1.1624130e-001 -2.3236300e-003 +v -2.7538480e-002 7.9964780e-002 4.7697210e-002 +v 1.2556400e-003 8.3845570e-002 5.7446440e-002 +v 6.1508300e-003 8.3406240e-002 5.6463500e-002 +v -6.2433240e-002 8.4035270e-002 4.4203120e-002 +v -5.9867170e-002 8.0540510e-002 4.3277090e-002 +v -5.5238340e-002 8.1999450e-002 4.4984770e-002 +v -5.4000400e-002 8.0568410e-002 4.4601460e-002 +v -5.0027020e-002 8.1311330e-002 4.4264180e-002 +v -4.1996120e-002 8.1083670e-002 4.2456150e-002 +v -3.9357940e-002 8.3631380e-002 4.3502350e-002 +v -8.6161480e-002 1.0838594e-001 1.8244920e-002 +v -8.6723010e-002 9.9917250e-002 3.5537100e-003 +v -2.2413700e-002 8.3283520e-002 5.5590700e-002 +v -1.6993180e-002 8.2555820e-002 5.7523880e-002 +v -1.2406010e-002 8.5222570e-002 5.7267780e-002 +v -7.4442100e-003 1.1693417e-001 3.9283850e-002 +v -2.1452000e-003 1.1143287e-001 4.2436620e-002 +v -7.5718220e-002 1.2522734e-001 5.3087330e-002 +v -7.7056660e-002 1.3193469e-001 5.2462430e-002 +v -6.1121040e-002 1.5569660e-001 2.2517050e-002 +v -3.7538540e-002 1.2744127e-001 1.5320870e-002 +v -2.0516700e-003 1.0093469e-001 4.5625920e-002 +v -6.4992150e-002 8.4550900e-002 4.4120060e-002 +v -5.7861950e-002 8.3944360e-002 4.4186030e-002 +v -4.5681080e-002 8.4988010e-002 4.4159500e-002 +v -3.5022640e-002 8.2888160e-002 4.2912760e-002 +v -2.9982010e-002 8.5402300e-002 4.3745080e-002 +v -8.8892260e-002 9.9209100e-002 9.5703200e-003 +v -1.9135300e-002 8.3474800e-002 5.7217390e-002 +v -8.3489710e-002 1.0724729e-001 7.5790000e-004 +v -7.0112800e-002 1.1790350e-001 5.2714160e-002 +v -3.5526320e-002 1.7595563e-001 -4.8676200e-003 +v -7.0831390e-002 1.2254425e-001 5.3274880e-002 +v 4.5133810e-002 9.3630690e-002 6.2336800e-003 +v -5.3616700e-002 8.5346850e-002 4.5332470e-002 +v -4.9000840e-002 8.6221680e-002 4.5352040e-002 +v -3.6744880e-002 8.6083690e-002 4.3612890e-002 +v -1.0872600e-002 8.8826770e-002 5.6665490e-002 +v -3.8450200e-003 8.4787810e-002 5.7197980e-002 +v -4.9020070e-002 1.1771293e-001 3.1581430e-002 +v -4.2914400e-002 1.1835991e-001 3.0645040e-002 +v -5.7684530e-002 1.5561695e-001 1.2983110e-002 +v -2.5411730e-002 1.2472533e-001 1.2886000e-004 +v 1.9012230e-002 1.2736197e-001 1.7786580e-002 +v -5.9498600e-002 8.8845470e-002 4.5109290e-002 +v -5.6931050e-002 8.8101500e-002 4.4692930e-002 +v 3.5765600e-003 1.3138981e-001 7.2086000e-003 +v -1.6683350e-002 8.7266690e-002 5.6741190e-002 +v -8.4980800e-003 8.3990470e-002 5.7605220e-002 +v 3.5078200e-003 8.6339520e-002 5.7048320e-002 +v -2.8398700e-002 1.8070650e-001 -7.8469500e-003 +v -7.6565830e-002 1.1674037e-001 5.1489350e-002 +v 1.7869430e-002 9.0898610e-002 4.8712940e-002 +v -4.0342100e-002 1.1669551e-001 3.2460200e-002 +v 5.9105700e-003 1.3140929e-001 1.6823750e-002 +v -8.5777550e-002 9.1701370e-002 -4.6970000e-005 +v -5.0372230e-002 8.8844660e-002 4.5188000e-002 +v -4.4434130e-002 8.7654530e-002 4.3477620e-002 +v -4.2056390e-002 8.6711520e-002 4.2534630e-002 +v -3.3058460e-002 8.6185500e-002 4.2560350e-002 +v -2.9241910e-002 9.0453360e-002 4.4236610e-002 +v -6.8964100e-003 8.4432910e-002 5.7168580e-002 +v -6.6210600e-003 9.0415250e-002 5.6879750e-002 +v -1.2439100e-003 8.9093200e-002 5.6552120e-002 +v 9.4076000e-003 9.0328050e-002 5.4214140e-002 +v 4.0194810e-002 1.0231597e-001 -2.0048600e-003 +v -8.6227130e-002 1.1466841e-001 2.2102000e-003 +v -8.9495490e-002 9.5632430e-002 1.4234810e-002 +v -6.7132160e-002 1.5709447e-001 -6.2032000e-003 +v -5.2935640e-002 9.0913520e-002 4.4568870e-002 +v -3.6744910e-002 8.8886950e-002 4.3312050e-002 +v -1.3626110e-002 8.9787930e-002 5.6674380e-002 +v 2.3337130e-002 1.2353449e-001 2.4874140e-002 +v -3.7053790e-002 1.2715094e-001 3.5474000e-004 +v -7.3696690e-002 1.5613015e-001 1.4359790e-002 +v -6.5592380e-002 9.1042400e-002 4.4092080e-002 +v -5.8997380e-002 9.2030670e-002 4.5335270e-002 +v -3.3238910e-002 8.8573580e-002 4.3697040e-002 +v -3.1834990e-002 9.0722970e-002 4.4173460e-002 +v -2.0022170e-002 8.8032110e-002 5.5589350e-002 +v -1.1213830e-002 9.2366370e-002 5.6105260e-002 +v 3.9108440e-002 1.0829072e-001 1.3142330e-002 +v 2.8675700e-002 1.1959600e-001 2.4545910e-002 +v -6.8940210e-002 1.5652777e-001 -1.9716000e-003 +v -6.2615110e-002 9.1126880e-002 4.5090730e-002 +v 3.0444560e-002 1.1886441e-001 2.0821750e-002 +v -1.5241090e-002 9.1821720e-002 5.5817230e-002 +v -5.6221700e-003 9.3235010e-002 5.5893630e-002 +v 4.7989900e-003 9.1654840e-002 5.4715170e-002 +v -6.8282400e-002 9.2376840e-002 4.2388730e-002 +v -5.5623730e-002 9.2187420e-002 4.5054970e-002 +v -5.1901030e-002 9.5457620e-002 4.3937650e-002 +v -4.8809030e-002 9.1083890e-002 4.4456690e-002 +v -4.5411560e-002 9.1002130e-002 4.3252770e-002 +v -4.4514550e-002 9.4860420e-002 4.2972490e-002 +v -3.9430320e-002 8.9597620e-002 4.3177890e-002 +v -3.5642240e-002 9.2617410e-002 4.4238490e-002 +v -1.2246000e-004 9.3201160e-002 5.5398380e-002 +v 9.5104600e-003 9.5483870e-002 5.0910600e-002 +v 2.1441660e-002 9.1354960e-002 4.8043360e-002 +v -8.9830300e-003 1.6926449e-001 -2.2683480e-002 +v -7.3019050e-002 1.5602104e-001 2.2419340e-002 +v -6.4760430e-002 1.5311588e-001 -2.0371200e-003 +v -6.9368510e-002 9.5242790e-002 4.2129000e-002 +v -6.0117140e-002 9.5552910e-002 4.4183820e-002 +v -2.9241690e-002 9.4290440e-002 4.4821190e-002 +v -2.6561430e-002 9.3289510e-002 4.4975420e-002 +v -1.4394030e-002 9.4587640e-002 5.3993500e-002 +v -8.8691600e-003 9.5400260e-002 5.4445980e-002 +v -1.2188700e-003 9.6201750e-002 5.3815910e-002 +v 4.0479000e-003 9.5817360e-002 5.2936770e-002 +v -4.6019400e-003 1.2428544e-001 3.3471960e-002 +v -7.8436460e-002 1.3928013e-001 4.8329360e-002 +v 1.0774610e-002 1.3079162e-001 1.4341740e-002 +v -5.6623730e-002 9.6322170e-002 4.3667910e-002 +v -3.6298870e-002 9.5695620e-002 4.3580310e-002 +v -2.4379930e-002 9.5866450e-002 4.4434530e-002 +v 1.0915500e-002 1.2633629e-001 2.9857020e-002 +v -5.8622700e-003 9.7350210e-002 5.2743650e-002 +v 1.6973450e-002 9.7106620e-002 4.7440920e-002 +v -6.7231980e-002 9.9173950e-002 4.1593880e-002 +v -5.4994210e-002 9.9640820e-002 4.2955230e-002 +v -4.8617990e-002 9.6452700e-002 4.4183060e-002 +v -5.5369000e-002 1.5442476e-001 1.6160650e-002 +v -9.4243550e-002 1.2207432e-001 2.3568470e-002 +v 1.3242990e-002 9.6738240e-002 4.8750160e-002 +v 2.0639290e-002 9.6602480e-002 4.6971000e-002 +v 7.3429700e-003 1.2098188e-001 3.5973430e-002 +v -1.3493870e-002 1.2882438e-001 5.9690700e-003 +v -2.0110640e-002 1.2504545e-001 2.3588310e-002 +v -6.9438450e-002 1.6479930e-001 -1.7218700e-002 +v -6.4028050e-002 9.7838670e-002 4.2565330e-002 +v -5.1996350e-002 9.9707850e-002 4.2716590e-002 +v -4.3990880e-002 9.9425460e-002 4.2383430e-002 +v -3.9738250e-002 1.0215357e-001 4.0574410e-002 +v -3.5931490e-002 9.9809950e-002 4.2335800e-002 +v -3.0867600e-002 9.6914680e-002 4.4651400e-002 +v -2.8342070e-002 9.7782680e-002 4.3761280e-002 +v -2.5622580e-002 9.8713420e-002 4.4210890e-002 +v -8.5236620e-002 1.1077356e-001 2.4537670e-002 +v 7.1936000e-003 9.8859470e-002 4.8419510e-002 +v 9.6509200e-003 1.0108782e-001 4.7373080e-002 +v 1.3487100e-002 1.0076420e-001 4.7454290e-002 +v 7.7389800e-003 1.3147500e-001 1.1682970e-002 +v 8.0905000e-004 1.1633319e-001 4.0167560e-002 +v -7.2652570e-002 1.6567918e-001 -1.8212480e-002 +v -5.6009400e-003 1.3076674e-001 1.0516060e-002 +v -2.6303720e-002 1.2518875e-001 1.7392980e-002 +v -4.7590430e-002 1.0081180e-001 4.2349150e-002 +v -4.1460830e-002 9.8544800e-002 4.1778620e-002 +v -3.3582070e-002 1.0383908e-001 4.0737990e-002 +v -2.2870240e-002 1.0284737e-001 4.3544750e-002 +v -2.2361970e-002 9.8207610e-002 4.4765940e-002 +v -1.8870510e-002 9.8973200e-002 4.4489280e-002 +v -7.1433690e-002 7.7573520e-002 3.8060760e-002 +v -7.3001150e-002 1.1826712e-001 5.3034590e-002 +v -6.8466430e-002 1.3498146e-001 -8.3359800e-003 +v -7.4683810e-002 1.0786100e-001 -9.0477100e-003 +v -6.4958960e-002 1.5852021e-001 -1.2595320e-002 +v -7.8931700e-002 1.5093057e-001 3.5151900e-002 +v -7.4113550e-002 9.9442520e-002 3.8337710e-002 +v -7.0456930e-002 1.0098777e-001 3.9794060e-002 +v -5.9058760e-002 1.0041260e-001 4.2725130e-002 +v -4.9187330e-002 1.0452012e-001 4.0301390e-002 +v -2.9151180e-002 1.0197369e-001 4.2633060e-002 +v -1.1599720e-002 1.0107813e-001 4.4191660e-002 +v 5.1450400e-003 1.0163906e-001 4.5423010e-002 +v -5.1495700e-002 1.0496738e-001 4.0347210e-002 +v -2.0218210e-002 1.0214391e-001 4.3701160e-002 +v 4.2515900e-003 1.0523743e-001 4.2563550e-002 +v 1.6832800e-002 1.0337487e-001 4.5287270e-002 +v -2.5661080e-002 1.2562669e-001 4.5537500e-003 +v -7.2141950e-002 1.0536685e-001 3.7523210e-002 +v -6.4984570e-002 1.0371550e-001 4.0647810e-002 +v -6.0652480e-002 1.0467197e-001 4.0906390e-002 +v -5.5308980e-002 1.0365394e-001 4.1516690e-002 +v -4.4243240e-002 1.0431726e-001 4.1339990e-002 +v -1.5513340e-002 1.0436131e-001 4.2919420e-002 +v -7.6323200e-003 1.0304531e-001 4.3710640e-002 +v -7.8046900e-003 1.0516619e-001 4.3825460e-002 +v 9.7163200e-003 1.0523506e-001 4.3603830e-002 +v 3.0300390e-002 1.1553645e-001 2.8685010e-002 +v -4.7496910e-002 1.0635662e-001 4.0165640e-002 +v -3.8978950e-002 1.0683037e-001 3.8247660e-002 +v -2.5869310e-002 1.0426705e-001 4.2207540e-002 +v -1.8057930e-002 1.0503919e-001 4.2802830e-002 +v -1.5180030e-002 1.0807750e-001 4.2350430e-002 +v -3.8981500e-003 1.0566175e-001 4.4047190e-002 +v 2.6820000e-005 1.0446731e-001 4.3775910e-002 +v 1.1978350e-002 1.0403629e-001 4.5396310e-002 +v 1.5004970e-002 1.0726898e-001 4.1811990e-002 +v 2.6488060e-002 1.2230287e-001 2.0398110e-002 +v -3.6225630e-002 1.0634244e-001 3.8644860e-002 +v -2.1126780e-002 1.0932290e-001 4.0715320e-002 +v -1.2819810e-002 1.0457100e-001 4.3465690e-002 +v 5.2847900e-003 1.0943666e-001 4.1674980e-002 +v 8.9403700e-003 1.0710645e-001 4.1243400e-002 +v -5.1839670e-002 1.6062039e-001 7.1421300e-003 +v -5.4201370e-002 1.1451730e-001 3.4843990e-002 +v 1.3226250e-002 1.2958070e-001 1.9689610e-002 +v -6.9382410e-002 1.0865787e-001 3.7507800e-002 +v -6.7691040e-002 1.0734145e-001 3.8018440e-002 +v -6.3782400e-002 1.1037270e-001 3.7579790e-002 +v -5.0749390e-002 1.0928682e-001 3.8297580e-002 +v -9.3936200e-003 1.0742813e-001 4.3454570e-002 +v 1.1760100e-003 1.0932531e-001 4.2662800e-002 +v 9.8020300e-003 1.1003994e-001 3.9945400e-002 +v 2.0131290e-002 1.0732778e-001 4.0323840e-002 +v -2.7872800e-003 1.0577531e-001 -2.2459030e-002 +v -5.4996890e-002 1.0774199e-001 3.9424590e-002 +v -4.5966740e-002 1.0905146e-001 3.8754110e-002 +v -4.2324540e-002 1.0737278e-001 3.9456440e-002 +v -3.2161240e-002 1.0896504e-001 3.8102720e-002 +v -3.0770180e-002 1.1597313e-001 3.2858800e-002 +v -1.1608610e-002 1.0983707e-001 4.2475330e-002 +v -2.9428320e-002 9.3166620e-002 -2.4931860e-002 +v -8.0043570e-002 9.2080160e-002 -9.4198200e-003 +v -4.9797430e-002 1.1342104e-001 3.5117920e-002 +v -4.3723850e-002 1.6191369e-001 5.7713400e-003 +v -5.7981740e-002 1.0943152e-001 3.7997640e-002 +v -4.1491180e-002 1.1224766e-001 3.5873450e-002 +v -2.4929830e-002 1.1592775e-001 3.4094730e-002 +v -2.0881690e-002 1.1409528e-001 3.7872990e-002 +v -7.5519700e-003 1.1183813e-001 4.2039690e-002 +v 3.7667200e-003 1.1240547e-001 4.1494710e-002 +v -6.2829620e-002 1.5189480e-001 -9.2373400e-003 +v -5.9195950e-002 1.1320797e-001 3.6234680e-002 +v -5.1079080e-002 9.3892810e-002 -2.1761690e-002 +v -7.3945370e-002 8.4374880e-002 -1.5154490e-002 +v -7.2146240e-002 1.3486431e-001 -7.7592200e-003 +v -1.9408870e-002 1.7041104e-001 -2.0994830e-002 +v -5.5530450e-002 1.4905531e-001 -1.9602100e-003 +v 1.6688460e-002 3.6976600e-002 4.3000600e-002 +v -5.2277330e-002 1.1775075e-001 3.3769460e-002 +v -6.9201380e-002 9.3039200e-002 -1.6486120e-002 +v 2.6579210e-002 1.1702438e-001 3.0867940e-002 +v -2.3574310e-002 3.7036910e-002 5.4144750e-002 +v -7.3775100e-003 3.8988430e-002 4.8929450e-002 +v 1.3234660e-002 3.8453060e-002 4.4501470e-002 +v 1.9487350e-002 4.0809290e-002 4.2641060e-002 +v -6.3953930e-002 1.4694729e-001 3.8484200e-002 +v -4.9579470e-002 3.6096540e-002 4.5955360e-002 +v -4.3323650e-002 3.6286400e-002 4.4042360e-002 +v -2.9047200e-002 1.2556338e-001 7.7617700e-003 +v -1.7343100e-003 3.9476800e-002 4.7262900e-002 +v -3.1358130e-002 1.5362199e-001 -4.6738900e-003 +v 2.5822000e-003 1.0747582e-001 -2.0606030e-002 +v -5.6802300e-002 1.4514674e-001 3.1740300e-002 +v -5.6464330e-002 3.7683110e-002 4.6819640e-002 +v -5.0964750e-002 3.8312290e-002 4.6286140e-002 +v -5.0980410e-002 1.3486613e-001 2.7585000e-002 +v -2.5647410e-002 3.8860730e-002 5.4161390e-002 +v -2.2542110e-002 4.0615780e-002 5.3986030e-002 +v -1.7618010e-002 3.8911170e-002 5.2403440e-002 +v -1.9711750e-002 1.6829145e-001 -1.3020960e-002 +v 2.3780070e-002 9.5222940e-002 4.6347330e-002 +v 1.4744290e-002 4.2716950e-002 4.4510310e-002 +v 2.1691360e-002 4.0161530e-002 4.0846450e-002 +v -6.4067240e-002 9.0172190e-002 -1.8855520e-002 +v 2.0319150e-002 1.0041961e-001 4.5760520e-002 +v -3.6425000e-002 9.3630690e-002 -2.3534630e-002 +v -1.4981170e-002 4.2571420e-002 5.1404530e-002 +v -5.7335340e-002 1.2340101e-001 4.0231470e-002 +v -5.4172560e-002 1.2337919e-001 3.7576440e-002 +v 2.2625210e-002 4.3621680e-002 4.0904580e-002 +v 2.8810520e-002 4.3352290e-002 3.2157720e-002 +v -4.2764160e-002 1.5727487e-001 5.2016200e-003 +v 9.2231900e-003 4.4125090e-002 4.5057440e-002 +v 1.5048210e-002 4.5755840e-002 4.3793870e-002 +v -6.3757290e-002 1.0251144e-001 -1.7484400e-002 +v -3.4070430e-002 1.6148975e-001 -1.3786960e-002 +v -8.2191500e-002 7.5610200e-002 1.6542620e-002 +v -6.6299420e-002 1.2337119e-001 5.0615920e-002 +v -1.5510100e-002 4.5283110e-002 5.0653040e-002 +v 1.8928020e-002 4.4249610e-002 4.3009830e-002 +v 2.5821800e-002 4.6326610e-002 3.8277230e-002 +v 2.7268700e-002 4.4547790e-002 3.6152520e-002 +v -4.5301340e-002 1.5695057e-001 7.2036900e-003 +v 2.3855760e-002 1.0616625e-001 3.9378080e-002 +v 2.1632670e-002 4.8127270e-002 4.0694430e-002 +v 4.3785360e-002 4.8803700e-002 3.1343420e-002 +v 4.8074790e-002 4.8969960e-002 2.8165490e-002 +v 5.2663090e-002 4.7673620e-002 2.1201270e-002 +v -5.2722450e-002 4.4722850e-002 4.4143250e-002 +v -3.0071610e-002 1.7258324e-001 -6.3597700e-003 +v -3.4508050e-002 1.5447469e-001 1.6504600e-003 +v 1.0629710e-002 4.6711810e-002 4.6472020e-002 +v 1.6743440e-002 4.8439000e-002 4.3678630e-002 +v 2.8827050e-002 9.2133370e-002 4.3920090e-002 +v -5.9937100e-002 1.2726188e-001 4.0771270e-002 +v -3.6752090e-002 1.5802075e-001 4.1862000e-003 +v -3.7885390e-002 1.6199719e-001 2.4686000e-004 +v -2.2047790e-002 1.8348586e-001 -1.2094990e-002 +v -2.4364620e-002 1.8096836e-001 -9.8312000e-003 +v -4.4882280e-002 1.5052959e-001 7.6451700e-003 +v 2.6996760e-002 5.1317780e-002 3.8752040e-002 +v 4.7735750e-002 5.2751040e-002 3.0797290e-002 +v 5.1703790e-002 4.8857380e-002 2.4147970e-002 +v -6.7504360e-002 1.1424088e-001 4.8036050e-002 +v -1.6257520e-002 1.6031250e-001 -9.6926000e-003 +v -6.3926300e-002 1.6792441e-001 -4.0730420e-002 +v -4.1665290e-002 1.4996141e-001 4.5405000e-003 +v -3.5203230e-002 1.6493551e-001 -2.6810000e-003 +v 4.1318770e-002 9.9496740e-002 2.4275750e-002 +v 1.4055220e-002 5.2523910e-002 4.8593880e-002 +v 1.9421220e-002 5.1321300e-002 4.4798910e-002 +v 2.3677990e-002 5.1474390e-002 4.1053270e-002 +v 3.4258130e-002 5.1930810e-002 3.2757880e-002 +v 5.5957340e-002 5.3147410e-002 2.3197720e-002 +v -3.9937960e-002 1.4922850e-001 1.6017200e-003 +v -4.6988800e-002 1.2600802e-001 2.6985500e-002 +v -2.7708370e-002 9.0081290e-002 -3.1911460e-002 +v 1.9204630e-002 5.5166510e-002 4.7722150e-002 +v 2.1886000e-002 5.3927560e-002 4.5102460e-002 +v 3.1286270e-002 5.2863840e-002 3.6913620e-002 +v 4.6661160e-002 5.4719230e-002 3.1976810e-002 +v 5.1823730e-002 5.3276700e-002 2.7927010e-002 +v -2.9264880e-002 1.6140418e-001 -2.1039500e-003 +v -6.8700770e-002 1.4463537e-001 4.3041630e-002 +v -5.6070060e-002 1.5000706e-001 2.9867640e-002 +v 4.4717850e-002 9.4802660e-002 1.2024710e-002 +v -4.1804090e-002 1.5582081e-001 6.4548200e-003 +v -6.8369340e-002 1.2289287e-001 5.2437860e-002 +v -6.4114810e-002 9.5509880e-002 -1.8114610e-002 +v -1.8383130e-002 1.8543664e-001 -1.7136370e-002 +v 1.1745400e-002 5.6678340e-002 5.1914060e-002 +v -5.9375360e-002 1.1998238e-001 4.0548240e-002 +v 5.9092080e-002 5.7956980e-002 2.0270120e-002 +v 4.3547740e-002 9.7389400e-002 1.7314650e-002 +v -2.6291780e-002 1.5963381e-001 -5.1845000e-004 +v 1.4904780e-002 5.6350380e-002 4.9522780e-002 +v 2.4286200e-002 5.4958580e-002 4.3086850e-002 +v 2.8952610e-002 5.6125250e-002 4.0388970e-002 +v -4.9507770e-002 1.2949500e-001 3.0259270e-002 +v 4.0824790e-002 9.5170220e-002 2.8657920e-002 +v 1.7774800e-002 5.8243780e-002 4.8864720e-002 +v 3.3573840e-002 5.8515260e-002 3.8310990e-002 +v 3.6385040e-002 5.6996480e-002 3.3601460e-002 +v -6.4205010e-002 1.2243894e-001 4.8008340e-002 +v -6.5424500e-002 1.4011279e-001 4.1308960e-002 +v 5.0801340e-002 5.7308080e-002 3.0001390e-002 +v 5.6671750e-002 5.6970820e-002 2.4291920e-002 +v -4.9349930e-002 1.4913519e-001 1.1274060e-002 +v -6.9760570e-002 1.3442855e-001 4.8265220e-002 +v 1.9537060e-002 6.0003780e-002 4.8576140e-002 +v 2.7013910e-002 5.9952790e-002 4.3454420e-002 +v 5.7679430e-002 6.1392970e-002 2.4201790e-002 +v -5.6916540e-002 1.2623512e-001 3.9426610e-002 +v 2.3469280e-002 1.1656262e-001 3.3537270e-002 +v -5.8298640e-002 1.3885500e-001 3.2937460e-002 +v 6.4598400e-003 6.0297430e-002 5.4780030e-002 +v 1.0406020e-002 5.9162400e-002 5.2484370e-002 +v 2.3183950e-002 5.8654360e-002 4.5871060e-002 +v 3.3040360e-002 6.1773840e-002 3.9781440e-002 +v -6.4348220e-002 1.2628088e-001 4.6650200e-002 +v -5.7031440e-002 1.1562007e-001 3.6494880e-002 +v 5.4451560e-002 5.8342890e-002 2.7653010e-002 +v -3.0134400e-002 1.7011322e-001 -7.3591600e-003 +v -3.7077100e-002 1.5986369e-001 1.6096500e-003 +v -5.6032760e-002 1.3731083e-001 3.1970590e-002 +v -6.7676470e-002 1.4150325e-001 4.3868140e-002 +v 9.9911700e-003 6.2735270e-002 5.4009240e-002 +v 1.4521510e-002 6.1382890e-002 5.0500900e-002 +v 3.0051740e-002 6.2169610e-002 4.1545810e-002 +v 3.7519170e-002 6.1062710e-002 3.4366020e-002 +v 5.3944010e-002 6.1391550e-002 2.8268530e-002 +v 5.9119900e-002 6.3128810e-002 2.1561830e-002 +v -2.4366390e-002 1.7693266e-001 -1.1719630e-002 +v -1.3253420e-002 1.6627152e-001 -1.4120370e-002 +v 3.9218740e-002 1.0669250e-001 2.0450190e-002 +v -1.7968980e-002 1.8078031e-001 -1.8103430e-002 +v 2.1902390e-002 6.0875970e-002 4.7282360e-002 +v 3.5341750e-002 6.1630030e-002 3.7606020e-002 +v -6.2145620e-002 1.3599775e-001 3.6700970e-002 +v 5.6820620e-002 6.3691150e-002 2.5286090e-002 +v -3.2800040e-002 1.5948699e-001 2.1962800e-003 +v 1.1212140e-002 6.6584120e-002 5.3982180e-002 +v 1.2919590e-002 6.4203580e-002 5.2441150e-002 +v 2.0126950e-002 6.3851330e-002 4.7919660e-002 +v 3.5971760e-002 6.6669610e-002 3.7781400e-002 +v 3.9906940e-002 6.4361260e-002 3.1686660e-002 +v -6.6702350e-002 1.3210600e-001 4.5480940e-002 +v -4.1601430e-002 1.5978000e-001 3.5374700e-003 +v 3.3044580e-002 1.0766252e-001 3.1916150e-002 +v 2.4672100e-002 6.3694500e-002 4.5204640e-002 +v 2.6108660e-002 6.8007640e-002 4.3902690e-002 +v 3.3363940e-002 6.7054760e-002 3.9729480e-002 +v 4.2915790e-002 6.6707700e-002 2.6994720e-002 +v 5.4714960e-002 6.4697160e-002 2.6979680e-002 +v -1.6530940e-002 1.6325000e-001 -9.2475200e-003 +v -1.7891600e-002 1.6113800e-001 -6.7072700e-003 +v 4.1118120e-002 9.7491260e-002 -3.9756700e-003 +v 2.3386770e-002 7.0075990e-002 4.7012620e-002 +v 3.8102900e-002 6.5678440e-002 3.5132520e-002 +v 1.0145240e-002 1.2221678e-001 3.4718950e-002 +v 5.8392410e-002 6.6741240e-002 2.1979460e-002 +v 3.8302050e-002 8.4549140e-002 -1.4478830e-002 +v 3.4126440e-002 9.7053980e-002 3.7590390e-002 +v -3.1355740e-002 1.5809888e-001 1.9128800e-003 +v -5.8259510e-002 1.4099493e-001 3.2440640e-002 +v -6.6817230e-002 1.1951525e-001 5.1490220e-002 +v -6.8090040e-002 1.1647050e-001 5.1151230e-002 +v 1.6568300e-002 6.6269890e-002 5.1009890e-002 +v 2.9362870e-002 6.6509780e-002 4.2289380e-002 +v 3.7027180e-002 9.3949630e-002 -1.1674040e-002 +v 5.6412730e-002 6.7659930e-002 2.3969320e-002 +v -6.1295740e-002 1.4519988e-001 3.7137830e-002 +v 8.3873000e-003 1.1336223e-001 3.9792610e-002 +v 1.1807030e-002 7.0920980e-002 5.4240490e-002 +v 2.9741730e-002 7.0647100e-002 4.1653890e-002 +v 3.6294410e-002 7.1220700e-002 3.7114610e-002 +v 3.9899680e-002 7.0294820e-002 3.2720020e-002 +v -6.2763130e-002 1.3778012e-001 3.6678590e-002 +v -1.5815440e-002 1.7504938e-001 -1.8654160e-002 +v -9.2268990e-002 1.1475156e-001 1.7017380e-002 +v -9.4964000e-004 1.0141111e-001 4.4290070e-002 +v -6.3712920e-002 1.1274250e-001 3.8006760e-002 +v -6.1096020e-002 1.1701650e-001 3.9654020e-002 +v 2.0991870e-002 6.9335450e-002 4.9003540e-002 +v 2.5658530e-002 7.0550460e-002 4.4539930e-002 +v 3.2978560e-002 7.3500690e-002 4.0486510e-002 +v 4.2156130e-002 6.9717580e-002 2.8318230e-002 +v -5.5516860e-002 1.2956070e-001 3.6598450e-002 +v -4.0802290e-002 1.6436059e-001 3.7448800e-003 +v -6.2546500e-003 1.0121650e-001 4.4322030e-002 +v -1.0986820e-002 1.6621199e-001 -1.6047550e-002 +v -3.0351420e-002 1.6448158e-001 -5.3291400e-003 +v 2.6110920e-002 1.0088990e-001 4.1733260e-002 +v -6.5599940e-002 1.1329504e-001 4.2318710e-002 +v 2.8814660e-002 9.6712680e-002 4.2257700e-002 +v 1.5263280e-002 7.1571940e-002 5.2717390e-002 +v 2.8982400e-002 7.4088480e-002 4.3447240e-002 +v 4.4872540e-002 7.5516710e-002 2.3155250e-002 +v -7.8225230e-002 1.4962481e-001 -2.5019400e-003 +v -4.6094940e-002 1.5296850e-001 9.0029700e-003 +v -5.2369030e-002 1.4682913e-001 1.8934650e-002 +v -2.1592100e-002 1.5763440e-001 -6.8623600e-003 +v 1.7176770e-002 7.3066230e-002 5.1826600e-002 +v 2.2687500e-002 7.5149180e-002 4.9312500e-002 +v 3.5472040e-002 7.3076670e-002 3.8482270e-002 +v -8.9480840e-002 1.3839976e-001 2.5061450e-002 +v -5.3216730e-002 1.3221978e-001 3.2978380e-002 +v -3.7776780e-002 1.5551947e-001 4.3700800e-003 +v -9.0549380e-002 1.3511875e-001 2.1680550e-002 +v -6.3366580e-002 1.3037076e-001 4.1669940e-002 +v 1.4074270e-002 7.6651720e-002 5.4221350e-002 +v 1.8109790e-002 7.5806590e-002 5.2488260e-002 +v 4.2209940e-002 7.8861480e-002 2.9187200e-002 +v -5.2115930e-002 1.4179906e-001 2.0510310e-002 +v 2.9063090e-002 1.1149602e-001 3.3805790e-002 +v -5.4731460e-002 1.4267229e-001 2.8980480e-002 +v 2.5903640e-002 7.5536040e-002 4.6416650e-002 +v 3.1298760e-002 7.5907440e-002 4.2699060e-002 +v 3.8446170e-002 7.5649430e-002 3.5050640e-002 +v 4.6351670e-002 7.4079520e-002 1.8354320e-002 +v -4.7656560e-002 1.3077525e-001 2.5523570e-002 +v -1.1447430e-002 1.7131059e-001 -1.9602980e-002 +v -3.6647240e-002 1.6640131e-001 -2.8167000e-004 +v -4.6653530e-002 1.5917824e-001 7.8019000e-003 +v -4.5569890e-002 1.4663612e-001 5.6514200e-003 +v 4.1438880e-002 9.2365100e-002 -7.4587000e-003 +v -6.4287420e-002 1.3463625e-001 3.9945640e-002 +v -6.1128890e-002 1.3178328e-001 3.8915910e-002 +v -4.7843540e-002 1.2215063e-001 2.8833160e-002 +v -4.9536830e-002 1.2491344e-001 3.1778440e-002 +v -7.1135380e-002 1.3817656e-001 4.7853960e-002 +v 1.0113870e-002 7.6468110e-002 5.5256790e-002 +v 1.7897450e-002 7.9516550e-002 5.2759530e-002 +v 2.1740850e-002 8.0250650e-002 5.0425390e-002 +v 2.5271590e-002 7.8724920e-002 4.8026570e-002 +v 3.0885040e-002 7.8999480e-002 4.3388770e-002 +v -6.2441930e-002 1.4084781e-001 3.6965840e-002 +v -6.2165060e-002 1.5666850e-001 -1.7837760e-002 +v 2.0657260e-002 1.0416830e-001 4.3004680e-002 +v -6.3602800e-002 1.1571453e-001 4.2572290e-002 +v 1.4424020e-002 8.0085500e-002 5.3755600e-002 +v 2.8779340e-002 8.2553250e-002 4.4527350e-002 +v 4.4450130e-002 8.1846900e-002 2.4552920e-002 +v 4.5541990e-002 8.3338380e-002 1.9700850e-002 +v -4.9665810e-002 1.2063801e-001 3.2163270e-002 +v -2.9177290e-002 1.7619959e-001 -5.6241100e-003 +v -5.8203130e-002 1.3270975e-001 3.6918680e-002 +v 3.8997050e-002 9.7088220e-002 -7.7799300e-003 +v -5.4725800e-002 1.2071262e-001 3.7451450e-002 +v 1.3189120e-002 8.4211180e-002 5.3065830e-002 +v -1.9926300e-002 1.6489742e-001 -9.9900200e-003 +v 2.0153130e-002 1.1849719e-001 3.4271250e-002 +v -5.5859940e-002 1.1774313e-001 3.7253480e-002 +v 1.8045260e-002 8.3623160e-002 5.1285840e-002 +v -6.3757130e-002 1.5912175e-001 -5.0155730e-002 +v -1.8527620e-002 1.7653197e-001 -1.7043540e-002 +v 2.8734400e-002 1.0360053e-001 3.8035240e-002 +v 4.1414010e-002 1.0284216e-001 1.6578920e-002 +v 2.4411730e-002 9.8016880e-002 4.4687400e-002 +v 2.0925180e-002 8.6311430e-002 4.9433120e-002 +v 3.0445010e-002 8.4959560e-002 4.3011090e-002 +v 3.3030090e-002 8.3781640e-002 4.1636930e-002 +v 3.6975090e-002 7.9876480e-002 3.7198390e-002 +v -7.7721460e-002 1.1355888e-001 4.8155990e-002 +v 2.9250000e-002 1.0651935e-001 3.6590330e-002 +v -5.3078180e-002 1.3754688e-001 2.8266470e-002 +v -6.2990590e-002 1.1999459e-001 4.5235530e-002 +v -6.5398320e-002 1.1751956e-001 4.8735570e-002 +v 3.3373910e-002 1.1227890e-001 2.7788130e-002 +v 3.8413590e-002 8.7489930e-002 3.5185850e-002 +v -6.1945930e-002 1.6479234e-001 -5.6647670e-002 +v -2.2876480e-002 1.7392813e-001 -1.3431140e-002 +v 4.3766230e-002 8.8390020e-002 -3.5708800e-003 +v 3.9291530e-002 1.0125969e-001 2.7550520e-002 +v 1.0936230e-002 8.6027290e-002 5.4732670e-002 +v 2.4108720e-002 8.4492600e-002 4.8292310e-002 +v 3.6758390e-002 9.9195470e-002 3.2837670e-002 +v -5.1941640e-002 1.2565987e-001 3.4587860e-002 +v -3.1582110e-002 1.6641850e-001 -5.7320000e-003 +v 7.6405900e-003 8.6427230e-002 5.6117850e-002 +v 1.6771020e-002 8.8644690e-002 5.0522960e-002 +v 3.4404610e-002 8.6932850e-002 4.0574270e-002 +v 3.6143820e-002 8.4439200e-002 3.7936930e-002 +v 4.1258830e-002 1.0361081e-001 2.6760600e-003 +v 2.4766140e-002 1.1081111e-001 3.6728360e-002 +v -2.2601590e-002 1.6250449e-001 -6.0717000e-003 +v -1.2893670e-002 1.7879041e-001 -2.2624750e-002 +v -2.4939150e-002 1.7031135e-001 -1.1329700e-002 +v -4.8468630e-002 1.4559606e-001 8.3661500e-003 +v 1.2534490e-002 8.9593930e-002 5.3394630e-002 +v 2.5872860e-002 8.8482290e-002 4.6655260e-002 +v 3.2756470e-002 8.8969130e-002 4.2215450e-002 +v -2.3343620e-002 1.6103450e-001 -3.1862400e-003 +v -9.2594970e-002 1.1943826e-001 2.6802950e-002 +v -7.4314840e-002 1.3761738e-001 -6.6698800e-003 +v -9.2499230e-002 1.2131500e-001 2.9256200e-002 +v -7.7378260e-002 1.5764266e-001 -1.4133650e-002 +v -9.2907340e-002 1.2307021e-001 3.6523230e-002 +v 2.8423340e-002 8.8011080e-002 4.4234200e-002 +v 3.5251680e-002 9.0836820e-002 3.9183920e-002 +v 1.5760560e-002 9.3203560e-002 4.9939310e-002 +v 3.8785530e-002 9.4954300e-002 3.2520220e-002 +v -6.1511220e-002 1.2373565e-001 4.3062680e-002 +v -6.8145120e-002 1.2748676e-001 5.0148970e-002 +v -2.0616710e-002 1.8237588e-001 -1.4299100e-002 +v 1.5137190e-002 1.1571495e-001 3.7031980e-002 +v -5.0718270e-002 1.5276300e-001 1.1816680e-002 +v 3.0168690e-002 1.0048686e-001 3.9404710e-002 +v -8.7426500e-002 9.5469530e-002 4.0312400e-003 +v -6.0010390e-002 1.4284463e-001 3.5449690e-002 +v -5.8603310e-002 1.4637237e-001 3.3808800e-002 +v 3.2411650e-002 9.3736150e-002 4.0890240e-002 +v -7.5917780e-002 1.4997690e-001 -1.6842050e-002 +v 1.8596570e-002 3.5293940e-002 -8.6782200e-003 +v 1.7209800e-002 3.5259400e-002 -1.4685160e-002 +v 4.4326540e-002 9.0818120e-002 2.2097520e-002 +v 3.8335910e-002 3.8830830e-002 3.0938100e-003 +v 2.2192920e-002 3.6775320e-002 -2.0919300e-003 +v 1.9636020e-002 3.8234010e-002 -1.2507670e-002 +v 2.3682120e-002 3.9762540e-002 3.7148760e-002 +v 4.6693280e-002 4.2465320e-002 6.5649500e-003 +v 2.1621110e-002 3.7657240e-002 -4.7021600e-003 +v 1.6638610e-002 3.8196090e-002 -1.9884930e-002 +v -9.0253980e-002 1.1366307e-001 3.7720210e-002 +v -9.0593870e-002 1.1373094e-001 1.0276770e-002 +v -6.2541690e-002 1.7679461e-001 -5.7821820e-002 +v -1.1091940e-002 1.7992082e-001 -2.5996430e-002 +v -6.2263130e-002 1.5219935e-001 -2.2578880e-002 +v -4.2276760e-002 9.4982570e-002 -2.2562420e-002 +v 4.3293410e-002 4.1864140e-002 2.0634400e-003 +v 4.3779590e-002 4.4530720e-002 -1.2622500e-003 +v 2.1696990e-002 4.0427270e-002 -9.4629500e-003 +v -1.1183700e-002 1.6450000e-001 -1.6151690e-002 +v -6.2372570e-002 1.5313041e-001 -2.8997120e-002 +v -9.2489300e-003 1.7725850e-001 -2.8270200e-002 +v 4.1477400e-002 8.5509410e-002 -9.1575000e-003 +v -8.1268710e-002 1.0879438e-001 2.9440660e-002 +v 4.9575680e-002 4.3815900e-002 1.4582960e-002 +v 5.2987960e-002 4.7747690e-002 5.0420000e-003 +v 2.1977540e-002 4.2855330e-002 -1.4536230e-002 +v 1.8505700e-002 3.8294100e-002 -1.7136500e-002 +v -3.5100500e-002 1.5203437e-001 -1.3279000e-004 +v 4.8749130e-002 4.5265000e-002 2.3023500e-003 +v 3.1912900e-002 9.9870060e-002 -1.4620980e-002 +v -1.4222520e-002 1.6167426e-001 -1.3349060e-002 +v -4.8663640e-002 1.3638523e-001 6.8063900e-003 +v -9.5837200e-003 1.7426102e-001 -2.8390760e-002 +v 5.2801850e-002 4.6539940e-002 1.0427720e-002 +v 5.1433800e-002 4.8485200e-002 1.0401000e-003 +v 2.3911240e-002 9.8021670e-002 -2.0807290e-002 +v 2.4567060e-002 4.4130110e-002 -1.0820840e-002 +v 2.0356810e-002 4.3662400e-002 -2.0456280e-002 +v -2.1882420e-002 1.1087418e-001 -1.9695320e-002 +v -5.3831800e-002 1.4981693e-001 2.5066610e-002 +v 5.4114210e-002 4.7773090e-002 1.7484000e-002 +v 5.6730570e-002 5.0515740e-002 1.0627080e-002 +v 4.5941820e-002 4.8138820e-002 -3.8715700e-003 +v -8.3817760e-002 1.1109094e-001 2.8524490e-002 +v 2.9207770e-002 4.7450250e-002 -8.5081800e-003 +v 2.8454920e-002 4.8067390e-002 -1.2847240e-002 +v 2.6637260e-002 4.7607100e-002 -1.6427740e-002 +v 2.2040110e-002 4.4992500e-002 -1.7528500e-002 +v 1.9120080e-002 4.7167750e-002 -2.2114680e-002 +v -1.5782200e-002 1.0072957e-001 -2.3724130e-002 +v -6.2514170e-002 1.7213119e-001 -5.2788100e-002 +v -6.2345600e-002 1.4745498e-001 -7.6600200e-003 +v 4.5598180e-002 8.8151720e-002 1.3124070e-002 +v -4.9422610e-002 1.4283525e-001 8.9728300e-003 +v -8.2761860e-002 1.1162341e-001 4.4221460e-002 +v -5.2166220e-002 1.5013661e-001 1.7448750e-002 +v -6.3616740e-002 1.4801371e-001 -2.0170260e-002 +v -5.1492690e-002 1.3796388e-001 2.3662180e-002 +v -6.1517580e-002 1.7517449e-001 -6.0631700e-002 +v 5.6524870e-002 5.0125660e-002 1.5564490e-002 +v 5.5257900e-002 5.1416260e-002 3.2062600e-003 +v 5.0318130e-002 5.2786370e-002 -3.4166300e-003 +v -6.2681950e-002 1.6744086e-001 -4.5713890e-002 +v 5.6520150e-002 5.1179900e-002 1.9940560e-002 +v 5.6907980e-002 5.1578130e-002 7.2538300e-003 +v 5.2854160e-002 5.1898670e-002 -6.2070000e-004 +v -3.8921140e-002 3.3767390e-002 -2.9042560e-002 +v 2.9740700e-002 5.0324690e-002 -1.3990860e-002 +v -6.8796190e-002 3.5117720e-002 -5.2067400e-003 +v 5.8826020e-002 5.5503780e-002 1.8647920e-002 +v -2.6160570e-002 1.2309988e-001 -4.4735500e-003 +v -5.3341960e-002 1.4401200e-001 2.4261390e-002 +v 5.8177390e-002 5.2821320e-002 1.5182420e-002 +v 5.9798140e-002 5.6840180e-002 1.3342730e-002 +v 5.4549870e-002 5.6044630e-002 -6.6158000e-004 +v 2.6775460e-002 5.1423450e-002 -2.0234060e-002 +v -8.6960400e-003 1.7291588e-001 -2.6708770e-002 +v -7.7039560e-002 7.1967020e-002 2.6405070e-002 +v -6.3069890e-002 1.5897471e-001 -4.2951850e-002 +v 3.5706690e-002 5.6083040e-002 -8.9993300e-003 +v 3.2600380e-002 5.3707520e-002 -1.1006150e-002 +v 2.9739960e-002 5.2538430e-002 -1.6224950e-002 +v 5.9238530e-002 5.6362780e-002 9.4530800e-003 +v 5.7421750e-002 5.6012210e-002 4.0245600e-003 +v 2.9062990e-002 5.5210580e-002 -1.8042060e-002 +v -1.7224410e-002 9.5214090e-002 -3.2085300e-002 +v -8.5911380e-002 1.0968787e-001 7.6582400e-003 +v 6.0594930e-002 6.1677210e-002 1.5591560e-002 +v 5.9531640e-002 6.0504600e-002 5.8397000e-003 +v 5.7306470e-002 5.9944620e-002 1.8886400e-003 +v 3.8829380e-002 5.9839830e-002 -6.4252500e-003 +v 3.0662770e-002 5.7300390e-002 -1.6518370e-002 +v -2.7762070e-002 1.2068537e-001 -9.0152900e-003 +v -8.8194590e-002 1.0314633e-001 1.7509020e-002 +v 6.0778800e-002 6.1646560e-002 1.0463990e-002 +v 3.5915080e-002 5.9916380e-002 -1.1966510e-002 +v 2.4251860e-002 5.6457470e-002 -2.4254800e-002 +v -6.1954390e-002 1.6865320e-001 -5.2621160e-002 +v -9.0557930e-002 1.1275994e-001 1.6141030e-002 +v -8.8469220e-002 1.1124294e-001 1.2679160e-002 +v 5.9558010e-002 6.3099260e-002 5.9471000e-003 +v 3.0940440e-002 6.0518080e-002 -1.8132720e-002 +v -9.3575750e-002 1.2474629e-001 2.6213300e-002 +v -9.3189820e-002 1.2019919e-001 3.7913720e-002 +v -9.2296100e-003 1.7314463e-001 -2.4197660e-002 +v -8.1739460e-002 7.6861340e-002 2.3313610e-002 +v -3.6992750e-002 1.5063932e-001 -2.0372300e-003 +v 6.0093570e-002 6.5693450e-002 1.8533320e-002 +v 5.9837240e-002 6.6423180e-002 8.5139400e-003 +v 4.0706180e-002 6.4475310e-002 -5.5920300e-003 +v 3.4745940e-002 6.3261340e-002 -1.4646740e-002 +v -6.1879660e-002 1.6000450e-001 -2.5806250e-002 +v -7.6537810e-002 1.5344875e-001 -1.2898750e-002 +v 3.8111070e-002 6.4811810e-002 -1.1142000e-002 +v 3.1909340e-002 6.4657050e-002 -1.8473410e-002 +v -8.3159350e-002 1.4674277e-001 3.0757900e-003 +v -8.7055900e-002 1.0562761e-001 9.7651100e-003 +v -7.1448330e-002 1.8105301e-001 -5.5478550e-002 +v -8.5632110e-002 1.2461094e-001 -2.7335800e-003 +v 6.0728970e-002 6.5806600e-002 1.3974830e-002 +v 3.9909650e-002 6.8171740e-002 -9.5698200e-003 +v 3.4981790e-002 6.7740790e-002 -1.5683210e-002 +v -9.1822030e-002 1.2747346e-001 3.6458650e-002 +v -6.2425420e-002 1.6366637e-001 -4.9667290e-002 +v -7.1168950e-002 1.4740156e-001 -2.7590940e-002 +v -5.0364760e-002 1.3715763e-001 1.9526100e-003 +v -5.0492650e-002 1.4159899e-001 1.6291740e-002 +v 5.9886670e-002 6.8513050e-002 1.6171610e-002 +v -6.1406990e-002 1.7268822e-001 -5.8265750e-002 +v 2.4990740e-002 6.5897320e-002 -2.3568270e-002 +v -7.4852750e-002 1.4993112e-001 -2.7752940e-002 +v -6.2225690e-002 6.0265200e-002 2.0449290e-002 +v -6.2001940e-002 3.6435020e-002 4.3918940e-002 +v 5.8374570e-002 7.1186410e-002 1.3072740e-002 +v -3.6125040e-002 1.2286688e-001 -8.2927900e-003 +v 2.9216510e-002 6.7850250e-002 -2.0418570e-002 +v -4.1681700e-002 1.2575112e-001 -7.0193300e-003 +v -7.4226550e-002 1.6437012e-001 -3.8240340e-002 +v -9.7845700e-003 1.6928488e-001 -2.4756660e-002 +v -8.9577950e-002 1.2078310e-001 3.5229100e-003 +v -6.2311930e-002 1.6371109e-001 -4.0623990e-002 +v 4.3514770e-002 9.1519890e-002 -2.6468100e-003 +v -4.8434350e-002 1.3754973e-001 1.3244980e-002 +v -8.9313160e-002 1.3653006e-001 3.0458750e-002 +v -7.4230190e-002 1.5652681e-001 -2.5167090e-002 +v 3.7378600e-002 7.3093410e-002 -1.2635370e-002 +v 2.6321810e-002 7.0240650e-002 -2.3878680e-002 +v -4.8023620e-002 1.4426649e-001 4.2498600e-003 +v -9.2019580e-002 1.1611534e-001 3.5842730e-002 +v -7.1305510e-002 7.3899020e-002 3.5969780e-002 +v -6.2059290e-002 1.5697807e-001 -3.3784580e-002 +v -9.7015300e-003 1.6738863e-001 -1.9360250e-002 +v 4.3342140e-002 7.1676120e-002 -2.2304600e-003 +v 4.1772460e-002 6.9568020e-002 -6.1596000e-003 +v 3.3505410e-002 7.2809860e-002 -1.7034800e-002 +v 2.9665000e-002 7.1506830e-002 -2.1282340e-002 +v -2.9460160e-002 1.5550263e-001 -1.1914700e-003 +v -8.6396440e-002 1.0479356e-001 5.9820600e-003 +v -5.4910700e-002 1.4662313e-001 2.8438970e-002 +v 4.4203810e-002 8.5204260e-002 -2.1170500e-003 +v 4.3264350e-002 7.5810540e-002 -3.8843900e-003 +v 1.3096990e-002 9.1126480e-002 -2.9269770e-002 +v -6.7069210e-002 9.1144610e-002 -1.7425950e-002 +v -9.0821680e-002 1.2276896e-001 6.0998500e-003 +v 4.5620000e-002 7.4684430e-002 2.6073900e-003 +v -9.3039800e-002 1.2026416e-001 1.1216820e-002 +v 4.4635590e-002 9.2794290e-002 1.7832070e-002 +v -1.1243390e-002 1.6457514e-001 -1.8240780e-002 +v 4.5511190e-002 8.6953050e-002 3.8865500e-003 +v 4.6252720e-002 7.7373870e-002 6.9140800e-003 +v 4.0281640e-002 7.2637130e-002 -9.2881000e-003 +v 4.3218200e-002 9.9486740e-002 5.0153300e-003 +v -5.1108270e-002 1.4520219e-001 1.4279480e-002 +v 4.4692980e-002 9.2688550e-002 2.2466700e-003 +v 4.3422540e-002 9.1860370e-002 2.4538450e-002 +v 4.0751360e-002 1.0554729e-001 7.5074100e-003 +v -8.5613030e-002 9.6277110e-002 -6.6514000e-004 +v 4.0721470e-002 7.8475530e-002 -8.2130000e-003 +v 3.5538080e-002 7.6062960e-002 -1.4434750e-002 +v -9.2736510e-002 1.2073095e-001 3.2692730e-002 +v -6.2278520e-002 1.5166598e-001 -1.4672730e-002 +v 4.4960220e-002 8.0942630e-002 6.1119000e-004 +v 3.7814740e-002 7.9698150e-002 -1.3289630e-002 +v 3.3864490e-002 7.8656690e-002 -1.7632490e-002 +v -9.1044280e-002 1.4199862e-001 2.1729630e-002 +v -7.4004450e-002 1.7818523e-001 -5.3916320e-002 +v -6.1768650e-002 1.6067957e-001 -3.4046350e-002 +v -4.9747450e-002 1.4112519e-001 5.2937500e-003 +v 4.1065440e-002 9.0460700e-002 2.9888620e-002 +v -7.2916360e-002 6.5057400e-002 1.8794620e-002 +v -9.0949690e-002 1.3895375e-001 1.7371130e-002 +v 4.2879050e-002 1.0093777e-001 9.4753200e-003 +v -7.2455480e-002 1.7610676e-001 -5.3535420e-002 +v -7.5862940e-002 1.5071299e-001 -9.0209000e-003 +v -8.5269820e-002 1.0267793e-001 1.3935600e-003 +v -7.7025570e-002 1.1396763e-001 -4.6168100e-003 +v 4.6280880e-002 7.8702020e-002 1.4786330e-002 +v 4.2106910e-002 8.1533160e-002 -6.6690900e-003 +v 3.6523880e-002 8.1991750e-002 -1.6229590e-002 +v -3.7420220e-002 4.5428500e-002 -2.4226790e-002 +v -8.5148910e-002 1.3965520e-001 2.4808500e-003 +v -6.3313300e-002 1.6503258e-001 -3.2895120e-002 +v -6.1591410e-002 1.5681572e-001 -2.5945630e-002 +v 4.5918540e-002 8.7036220e-002 8.4236300e-003 +v 4.4631140e-002 8.4178380e-002 8.2665000e-004 +v -4.4842870e-002 1.4629393e-001 1.7114800e-003 +v -6.4124180e-002 1.7953625e-001 -5.8730420e-002 +v -6.7070300e-002 1.8072682e-001 -5.6618620e-002 +v -6.4793760e-002 1.7885275e-001 -5.5883250e-002 +v -6.4371030e-002 1.7296209e-001 -4.9225660e-002 +v -7.0381530e-002 1.8071180e-001 -5.3172590e-002 +v -7.5269270e-002 1.5232949e-001 3.4374060e-002 +v -1.6273090e-002 1.2844514e-001 1.6683610e-002 +v -6.2116150e-002 1.5600787e-001 1.8034420e-002 +v -5.6010790e-002 1.5381662e-001 2.5369280e-002 +v -3.7277920e-002 1.7289068e-001 -8.6627000e-004 +v -7.4158700e-002 1.7987275e-001 -5.0794750e-002 +v -7.9039960e-002 1.5537445e-001 1.5141810e-002 +v -7.2505530e-002 1.5459529e-001 2.9588830e-002 +v -6.7738180e-002 1.7728865e-001 -5.0375960e-002 +v -7.5346900e-003 1.0021302e-001 4.7488700e-002 +v -5.9575620e-002 1.5472401e-001 2.6373250e-002 +v -7.7382710e-002 1.5346600e-001 3.0894990e-002 +v -8.1496670e-002 1.5473104e-001 1.9697340e-002 +v -7.2223320e-002 1.5896734e-001 -5.4242300e-003 +v -1.3708500e-002 1.8491150e-001 -2.5549550e-002 +v -4.3465340e-002 1.2451145e-001 2.2518890e-002 +v -6.9103650e-002 1.5559479e-001 1.6370800e-003 +v -7.3748080e-002 1.5539253e-001 2.3491700e-003 +v -6.8192410e-002 1.7439828e-001 -4.5365870e-002 +v -6.0052850e-002 1.5280350e-001 3.2887630e-002 +v -2.3459490e-002 1.2615386e-001 1.6613770e-002 +v -7.2777220e-002 1.7854465e-001 -4.8208800e-002 +v -7.6595580e-002 1.7753227e-001 -4.7118080e-002 +v 1.3906410e-002 1.2790838e-001 2.5110240e-002 +v -8.6367510e-002 1.0906537e-001 1.1980640e-002 +v -3.1358850e-002 1.2140977e-001 2.5971090e-002 +v -4.9104590e-002 1.3666879e-001 1.9314030e-002 +v -4.2930640e-002 1.2928436e-001 9.2700700e-003 +v -6.5320350e-002 1.5390322e-001 9.1386000e-004 +v -3.7606490e-002 1.2422605e-001 2.4313530e-002 +v 9.5078400e-003 1.3041865e-001 2.0715020e-002 +v -1.7976800e-003 1.3117283e-001 1.6360660e-002 +v 3.6231700e-003 1.3076791e-001 2.1168600e-002 +v -9.2674700e-002 1.1701945e-001 1.1889520e-002 +v -6.5739720e-002 1.5565338e-001 2.6017600e-002 +v -8.6561940e-002 1.4249188e-001 8.4326800e-003 +v -7.0731530e-002 1.5569959e-001 6.9058200e-003 +v -8.0840700e-003 1.3030537e-001 1.6872280e-002 +v -4.4286250e-002 1.2606625e-001 2.0795220e-002 +v -7.0222260e-002 1.5143521e-001 3.6718910e-002 +v -1.5210690e-002 1.8463639e-001 -2.2057240e-002 +v -1.7270750e-002 1.8699602e-001 -1.9977570e-002 +v -8.3560950e-002 1.5255943e-001 7.6806700e-003 +v -8.8130280e-002 9.7540510e-002 5.6788000e-003 +v -8.8399240e-002 1.3899000e-001 1.0640660e-002 +v -6.7780550e-002 1.5614453e-001 1.4276320e-002 +v -6.5864600e-003 1.2641717e-001 3.0226390e-002 +v -8.8746180e-002 1.3625578e-001 7.1477800e-003 +v -7.7206730e-002 1.5639950e-001 -1.8972540e-002 +v -9.3176480e-002 1.1821016e-001 2.3362360e-002 +v -2.3506850e-002 1.2672006e-001 1.0996900e-002 +v -6.6546650e-002 1.7171115e-001 -4.2127770e-002 +v -6.9136000e-002 1.7247836e-001 -3.9013330e-002 +v 5.7180270e-002 7.1107690e-002 8.0307600e-003 +v -7.5390870e-002 1.7952824e-001 -5.2402050e-002 +v -3.1828840e-002 1.2639115e-001 1.0013410e-002 +v -8.9888800e-003 1.2952269e-001 2.2026810e-002 +v 3.4325880e-002 1.1193312e-001 -2.2406500e-003 +v -8.1414950e-002 9.7100250e-002 -6.8745800e-003 +v -2.3298830e-002 1.8324307e-001 -1.7923000e-002 +v -6.1641660e-002 1.5582039e-001 1.1099820e-002 +v -8.8826450e-002 9.0483320e-002 2.1204700e-002 +v 5.8373130e-002 6.8067590e-002 5.7247600e-003 +v -4.3045630e-002 1.2785122e-001 1.6842260e-002 +v 3.0835720e-002 1.1554234e-001 -3.1785500e-003 +v -8.8631270e-002 9.4881200e-002 7.9337600e-003 +v -9.1715140e-002 1.1709957e-001 3.0809400e-002 +v -7.2083780e-002 1.7499844e-001 -4.1930320e-002 +v -6.9540630e-002 1.5308527e-001 3.3865720e-002 +v 6.0078690e-002 6.8129260e-002 1.1454500e-002 +v -4.0081060e-002 1.2628381e-001 1.9607250e-002 +v 3.2819930e-002 1.1655625e-001 4.4458600e-003 +v -7.2823220e-002 1.4510601e-001 -1.5654680e-002 +v -8.5270210e-002 1.0551770e-001 2.3290940e-002 +v -7.6051320e-002 1.1103825e-001 -6.2722100e-003 +v -8.6537730e-002 1.5154801e-001 2.5875370e-002 +v 5.5888480e-002 7.2579250e-002 1.0669650e-002 +v -5.4642360e-002 1.5522963e-001 1.2612400e-002 +v 3.6729960e-002 1.1116756e-001 3.8670600e-003 +v 3.1501870e-002 1.1725172e-001 1.6855100e-003 +v -7.8751550e-002 9.5240290e-002 -1.0600670e-002 +v -8.9408160e-002 1.4352815e-001 3.0924750e-002 +v -2.0891130e-002 1.8595338e-001 -1.5037360e-002 +v -7.0863560e-002 1.6136525e-001 -9.7324600e-003 +v -7.0919760e-002 1.7136688e-001 -3.2763750e-002 +v -3.0771290e-002 1.2564075e-001 1.6594770e-002 +v -5.4454180e-002 1.5297699e-001 2.2505190e-002 +v -1.5539500e-003 1.2754717e-001 2.9232870e-002 +v 2.9130550e-002 1.2027445e-001 6.1117500e-003 +v 2.5725940e-002 1.2122705e-001 -3.6150000e-005 +v -8.9318970e-002 9.9546980e-002 1.3418110e-002 +v -7.5429500e-002 1.7095605e-001 -3.2879890e-002 +v -2.8596020e-002 1.1901156e-001 2.9888170e-002 +v 2.1069780e-002 1.2497756e-001 1.0998100e-003 +v -9.2240760e-002 1.1816838e-001 4.1201730e-002 +v 2.4094600e-003 1.0016785e-001 4.6938070e-002 +v -5.6627620e-002 1.5270606e-001 2.9629030e-002 +v -5.7264800e-002 1.5506250e-001 1.9322430e-002 +v -3.6452070e-002 1.2199869e-001 2.7670650e-002 +v -7.4108160e-002 1.7355729e-001 -3.7986840e-002 +v 5.1537130e-002 7.3496690e-002 1.2698700e-002 +v -6.6096040e-002 1.5532529e-001 7.1561800e-003 +v 3.6102000e-002 1.1266103e-001 1.0491780e-002 +v 1.6715210e-002 1.2689851e-001 2.2331000e-004 +v -8.0767920e-002 1.4301400e-001 -1.5312800e-003 +v -9.1757600e-002 1.4334588e-001 1.7790710e-002 +v -8.6824940e-002 1.5280775e-001 1.5521450e-002 +v -6.5808100e-002 1.6764344e-001 -3.0558670e-002 +v -7.8217340e-002 1.6873975e-001 -3.3564250e-002 +v -7.2567060e-002 1.4753230e-001 4.1714090e-002 +v 5.8439960e-002 7.0200810e-002 1.7779620e-002 +v 5.6847560e-002 7.2017160e-002 1.7139380e-002 +v 5.4919390e-002 7.3161610e-002 1.5223590e-002 +v 4.7446900e-002 7.3691410e-002 1.2430020e-002 +v 1.2319360e-002 1.2903768e-001 1.3336200e-003 +v -7.9790640e-002 1.0351662e-001 -6.6275400e-003 +v -7.6655210e-002 1.5509766e-001 7.9686300e-003 +v 2.1747320e-002 1.2118456e-001 3.0878810e-002 +v -7.5260490e-002 1.4938613e-001 3.9175980e-002 +v -2.5919610e-002 1.8272826e-001 -1.3541090e-002 +v -6.7983790e-002 1.6974781e-001 -3.1627490e-002 +v 1.6831110e-002 1.2487146e-001 2.8425580e-002 +v 5.4016490e-002 7.2883850e-002 1.8678010e-002 +v 5.0522750e-002 7.3397910e-002 1.6166890e-002 +v -5.9582440e-002 1.5623338e-001 7.9209900e-003 +v 2.5343500e-002 1.2374750e-001 9.9818800e-003 +v 1.9262750e-002 1.2689390e-001 5.5552100e-003 +v -9.0758520e-002 1.4223375e-001 2.6008130e-002 +v -4.6548490e-002 1.3320769e-001 1.6889630e-002 +v -2.4106950e-002 1.8380887e-001 -1.1544760e-002 +v 8.6784400e-003 1.2894574e-001 2.6156880e-002 +v 2.4919200e-003 1.2983563e-001 2.4847110e-002 +v 5.7345150e-002 6.9482720e-002 2.1153510e-002 +v -8.5329840e-002 1.5339912e-001 2.0378290e-002 +v 3.2877320e-002 1.1691463e-001 9.2957500e-003 +v 2.4246630e-002 1.2377758e-001 4.8764500e-003 +v -4.7765650e-002 1.3301969e-001 2.2874020e-002 +v -6.3541830e-002 1.6332115e-001 -2.5912990e-002 +v -6.6605200e-002 1.6477375e-001 -2.0670760e-002 +v -6.8504220e-002 1.6732018e-001 -2.3959570e-002 +v -7.2759160e-002 1.6965906e-001 -2.7013420e-002 +v 4.8206850e-002 7.2698580e-002 1.6994630e-002 +v -2.7383180e-002 1.2324257e-001 2.1658860e-002 +v -4.5077500e-002 1.3124443e-001 1.1145770e-002 +v 2.9253150e-002 1.2057701e-001 1.2299330e-002 +v 1.3677610e-002 1.2967262e-001 6.9327400e-003 +v 8.4210900e-003 1.3090986e-001 6.2754400e-003 +v 9.6836000e-004 1.3064303e-001 2.5865900e-003 +v 3.0802000e-003 9.8307360e-002 5.0535640e-002 +v -5.2420170e-002 1.5310101e-001 1.2927370e-002 +v -7.0359720e-002 1.6906988e-001 -2.6144260e-002 +v 5.4359390e-002 7.1467260e-002 2.1381250e-002 +v 4.5161440e-002 7.1030380e-002 2.2530690e-002 +v 1.9320440e-002 1.2738348e-001 1.1296310e-002 +v -9.3281210e-002 1.2691094e-001 1.3505010e-002 +v -8.7405060e-002 1.0593990e-001 1.3645920e-002 +v -2.2851640e-002 9.0635040e-002 5.2280460e-002 +v -6.2099370e-002 1.5406697e-001 3.0837360e-002 +v -4.5851560e-002 1.2072981e-001 2.7665040e-002 +v 5.0781670e-002 7.2155170e-002 2.0680180e-002 +v -8.9607270e-002 1.3971105e-001 2.9308560e-002 +v -5.3323050e-002 1.5273520e-001 1.6213860e-002 +v -1.5227080e-002 1.2784878e-001 2.1545200e-002 +v 3.3663540e-002 1.1574212e-001 1.7181290e-002 +v 2.4000260e-002 1.2468761e-001 1.5517930e-002 +v -8.4166840e-002 9.7756820e-002 -3.2761900e-003 +v -3.6223590e-002 1.2777519e-001 9.8501500e-003 +v -3.9189580e-002 1.2828193e-001 5.0346300e-003 +v -3.3674050e-002 1.7774449e-001 -8.1799500e-003 +v -7.4488620e-002 1.5649443e-001 -2.5954600e-003 +v -4.6755620e-002 1.3284294e-001 8.1212800e-003 +v -8.4970410e-002 1.5322309e-001 1.2654460e-002 +v -1.0866210e-002 1.2691699e-001 2.7575440e-002 +v -3.1074000e-003 1.3072898e-001 5.6428500e-003 +v -8.8760540e-002 9.7037440e-002 2.1079040e-002 +v -6.4811320e-002 3.4530640e-002 1.5508440e-002 +v -6.4300260e-002 3.5086450e-002 2.4272050e-002 +v -6.6727020e-002 3.5895770e-002 3.3849430e-002 +v 1.9838510e-002 9.6518890e-002 -2.2785880e-002 +v -3.8670510e-002 1.6070199e-001 -1.2357760e-002 +v -7.6890090e-002 1.3041906e-001 -6.9570100e-003 +v -7.2539730e-002 3.5399270e-002 7.0298800e-003 +v -6.9209050e-002 3.5454810e-002 1.2042140e-002 +v -6.4160810e-002 3.5900770e-002 1.7687570e-002 +v -6.6804150e-002 3.7377740e-002 3.3296290e-002 +v -6.2928350e-002 3.9061660e-002 4.2707680e-002 +v -7.1752230e-002 3.6789350e-002 8.6966700e-003 +v -6.5171380e-002 3.7289500e-002 2.5953770e-002 +v -6.6392030e-002 3.7712350e-002 2.9621950e-002 +v -6.4558720e-002 3.9639900e-002 3.9411530e-002 +v -6.0145790e-002 4.1202050e-002 4.4293830e-002 +v -6.0318430e-002 3.8442990e-002 4.5245950e-002 +v -3.6756310e-002 8.8663360e-002 -2.3868800e-002 +v -3.9494750e-002 3.7551570e-002 4.2870900e-002 +v -7.2016030e-002 3.7572700e-002 3.9789400e-003 +v -7.1693630e-002 3.9461000e-002 6.0145000e-003 +v -7.1165950e-002 3.9366310e-002 8.1142100e-003 +v -6.9000300e-002 3.8467710e-002 1.0768900e-002 +v -6.7253420e-002 3.8142160e-002 1.3533960e-002 +v -6.1125670e-002 3.7790050e-002 1.9710900e-002 +v -3.9179680e-002 4.2406740e-002 4.1476070e-002 +v -3.5145960e-002 3.8585920e-002 4.7732690e-002 +v -2.8950940e-002 3.9285940e-002 5.3309090e-002 +v -1.8223900e-002 9.7494570e-002 4.6847940e-002 +v -6.6916260e-002 1.2278907e-001 -8.9077400e-003 +v -6.3754640e-002 3.8250120e-002 1.6593500e-002 +v -6.4415760e-002 4.1283840e-002 2.8243480e-002 +v -8.5856340e-002 9.7025390e-002 2.7414960e-002 +v -3.7501130e-002 4.0221900e-002 4.4296550e-002 +v -3.4333970e-002 4.0923630e-002 4.8425810e-002 +v -3.1172890e-002 4.0294330e-002 5.1312460e-002 +v -6.9997320e-002 4.2073080e-002 6.6897800e-003 +v -8.0379330e-002 9.7800660e-002 3.3645750e-002 +v -2.6273160e-002 7.7631160e-002 4.8356180e-002 +v -3.7501450e-002 4.2736690e-002 4.2988400e-002 +v -2.6177500e-002 4.2498930e-002 5.3315220e-002 +v -6.9637250e-002 4.1881270e-002 3.1825800e-003 +v -6.7156510e-002 4.1972860e-002 1.0240940e-002 +v -8.7405510e-002 1.0205209e-001 2.2020360e-002 +v -2.3944380e-002 7.8800140e-002 5.3534730e-002 +v -6.0902360e-002 4.3429500e-002 4.2678530e-002 +v -3.1217880e-002 4.3847510e-002 4.9780920e-002 +v -7.5729440e-002 1.0354026e-001 3.6070970e-002 +v -6.2425320e-002 4.1885720e-002 1.4646770e-002 +v -6.1051660e-002 4.4392230e-002 1.2421940e-002 +v 2.5855060e-002 8.9610660e-002 -2.2701840e-002 +v -7.7644960e-002 8.2214940e-002 3.5797660e-002 +v -6.0381270e-002 4.5921420e-002 4.0088740e-002 +v -2.4982010e-002 8.1777650e-002 5.3421060e-002 +v -3.4453850e-002 4.4563960e-002 4.5422990e-002 +v -2.9842910e-002 4.6782280e-002 4.7746920e-002 +v -1.5119580e-002 9.9930020e-002 4.4500270e-002 +v -6.7306470e-002 4.4176830e-002 7.5958300e-003 +v -5.7852990e-002 4.6444500e-002 1.1062610e-002 +v -5.1815260e-002 1.6392582e-001 1.7488800e-003 +v -5.5174130e-002 4.8383880e-002 3.8517780e-002 +v -7.8849150e-002 1.1867375e-001 5.0622870e-002 +v -2.7229070e-002 8.7991480e-002 4.7909730e-002 +v -7.5536880e-002 1.5977062e-001 -1.0438650e-002 +v -3.6151280e-002 4.6505140e-002 4.0740900e-002 +v -2.5439220e-002 9.0677870e-002 4.8852330e-002 +v -8.0050370e-002 1.1670406e-001 4.8762460e-002 +v -5.2513640e-002 4.7577880e-002 1.4858440e-002 +v -3.2043560e-002 5.0461830e-002 3.9341520e-002 +v -3.1487770e-002 4.6930210e-002 4.5253210e-002 +v -2.0321500e-002 9.3999570e-002 5.1588540e-002 +v -7.2145040e-002 9.1556450e-002 4.1494780e-002 +v -5.3644200e-002 4.9358170e-002 1.2201850e-002 +v -8.2403890e-002 1.2186563e-001 4.9365030e-002 +v -4.9754420e-002 4.9738300e-002 3.7037110e-002 +v -3.2332060e-002 4.8672840e-002 4.2523960e-002 +v -2.3122950e-002 9.4515900e-002 4.7358870e-002 +v -8.6347140e-002 9.1722090e-002 2.6811080e-002 +v -5.7713110e-002 4.8717820e-002 7.2765100e-003 +v -8.6970360e-002 8.8912090e-002 2.4879860e-002 +v -9.2237750e-002 1.2488519e-001 4.0786530e-002 +v -1.5862800e-002 9.7021620e-002 5.0139360e-002 +v -2.7720040e-002 5.0502090e-002 4.3340720e-002 +v -8.5918770e-002 1.4263412e-001 3.9849810e-002 +v -7.5097360e-002 9.0073560e-002 3.9581000e-002 +v -8.9430840e-002 1.4730552e-001 2.7694960e-002 +v -5.3288350e-002 5.1925760e-002 1.1730350e-002 +v -5.0168720e-002 5.3462260e-002 1.6255440e-002 +v -8.5986050e-002 1.4670902e-001 3.4827030e-002 +v -6.9937250e-002 8.6076860e-002 4.2175690e-002 +v -5.0399320e-002 5.1831330e-002 3.4037400e-002 +v -8.3298980e-002 1.4960772e-001 3.3740890e-002 +v -2.9174820e-002 5.2264530e-002 3.7637320e-002 +v -8.8763730e-002 1.1944938e-001 4.6560090e-002 +v -7.7693460e-002 1.7367969e-001 -4.1478670e-002 +v -8.3418140e-002 9.4127440e-002 3.0898450e-002 +v -5.6067510e-002 5.3470630e-002 7.3718200e-003 +v -7.8935630e-002 1.4817228e-001 3.9463070e-002 +v -6.7902770e-002 8.7817230e-002 4.3526990e-002 +v -4.4111240e-002 9.2883990e-002 -2.2373210e-002 +v -8.6605100e-002 1.3226807e-001 4.6783020e-002 +v -9.2654280e-002 1.2084025e-001 4.1629650e-002 +v -5.0887310e-002 5.2727900e-002 1.4455790e-002 +v -4.9763410e-002 5.6241200e-002 3.3624250e-002 +v -8.9771330e-002 1.2904861e-001 4.3022990e-002 +v -2.8054240e-002 5.4551030e-002 3.6786850e-002 +v -2.5867080e-002 5.6689210e-002 3.9182240e-002 +v -8.3702200e-002 1.2226381e-001 -3.7301400e-003 +v -8.1455470e-002 1.3012213e-001 5.2117660e-002 +v -5.1458550e-002 5.5878150e-002 1.5900350e-002 +v -7.8597700e-002 1.7441574e-001 -4.6607580e-002 +v -5.2909820e-002 5.7043070e-002 2.0988410e-002 +v -5.2978500e-002 5.9553770e-002 2.6211920e-002 +v -5.2130640e-002 5.6302970e-002 2.6672460e-002 +v -4.7714500e-002 6.1944520e-002 3.6705820e-002 +v -8.3539790e-002 8.1169560e-002 2.7014070e-002 +v -1.8340000e-002 5.7489970e-002 4.9763020e-002 +v -8.0069810e-002 9.0586130e-002 3.4593070e-002 +v -8.3812250e-002 8.6337700e-002 2.9223270e-002 +v -5.5436650e-002 5.9420250e-002 2.3018970e-002 +v -8.2227680e-002 1.4513771e-001 4.0600080e-002 +v -2.4187580e-002 7.2269150e-002 4.7681090e-002 +v -2.5353150e-002 6.2567200e-002 4.0642170e-002 +v -9.1132110e-002 1.2282100e-001 4.4115160e-002 +v -4.6076290e-002 1.6819719e-001 7.3744000e-004 +v -8.7829280e-002 1.4351461e-001 3.5707670e-002 +v -8.6990640e-002 1.3812326e-001 4.2316550e-002 +v -1.5715900e-002 6.0822970e-002 5.2365440e-002 +v -8.3803580e-002 1.2561100e-001 5.0440490e-002 +v -6.2786680e-002 1.1274190e-001 -1.3605440e-002 +v -8.1033840e-002 8.4698180e-002 3.3106400e-002 +v -8.8563540e-002 1.1624535e-001 4.5392840e-002 +v -2.0268380e-002 6.2266810e-002 4.8212120e-002 +v -1.2619630e-002 6.1635030e-002 5.4424080e-002 +v -7.0491190e-002 8.1818160e-002 4.0609890e-002 +v -8.3882520e-002 1.3331465e-001 4.9113540e-002 +v -5.6560350e-002 4.8355540e-002 3.6607050e-002 +v 9.9444900e-003 1.0919723e-001 -1.9472810e-002 +v -5.5928250e-002 3.5917310e-002 4.6376100e-002 +v -7.6003260e-002 1.6361344e-001 -1.8021110e-002 +v -8.3798850e-002 1.0290691e-001 2.8038330e-002 +v -8.8252110e-002 1.2692730e-001 4.6141300e-002 +v -7.9126720e-002 1.0619883e-001 3.2050700e-002 +v -8.8206230e-002 9.4485700e-002 2.3744010e-002 +v -8.9110330e-002 1.3851394e-001 3.7658780e-002 +v -1.9321360e-002 9.2123890e-002 5.3820650e-002 +v -5.8265630e-002 9.0926390e-002 -2.0948690e-002 +v -2.7046310e-002 6.7014450e-002 3.9672140e-002 +v -2.1416300e-002 1.7977662e-001 -2.1732520e-002 +v -7.8240000e-003 1.0924112e-001 -2.2185670e-002 +v -2.3988340e-002 8.5995590e-002 5.3716430e-002 +v -6.0483580e-002 1.5567975e-001 4.3343800e-003 +v -8.6389150e-002 1.2168475e-001 4.8412440e-002 +v -7.4084360e-002 1.4987744e-001 -3.2610050e-002 +v -2.0580600e-002 7.9572500e-002 5.6013880e-002 +v -8.3837500e-002 1.3927865e-001 4.4893850e-002 +v -2.2933960e-002 3.5632910e-002 5.2865490e-002 +v -8.6153620e-002 1.2735612e-001 4.8563960e-002 +v -6.5728590e-002 1.0709818e-001 -1.4317670e-002 +v -2.1481090e-002 7.4194460e-002 5.2857680e-002 +v -7.6423900e-002 1.5736285e-001 -9.0354600e-003 +v -7.7216010e-002 8.5594880e-002 3.7420770e-002 +v -8.4150830e-002 1.2955013e-001 5.0483700e-002 +v -8.1221440e-002 8.1003250e-002 3.1255840e-002 +v -8.1704000e-002 1.0167226e-001 3.0939660e-002 +v -8.6252730e-002 1.0106846e-001 2.5413770e-002 +v -8.0944970e-002 1.3903572e-001 4.7359080e-002 +v -7.8908350e-002 9.4830900e-002 3.5435500e-002 +v -7.3440160e-002 9.5412600e-002 4.0210650e-002 +v -5.2675780e-002 8.8220740e-002 -2.1886300e-002 +v -7.6440670e-002 7.7511060e-002 3.3748300e-002 +v -2.1791140e-002 1.0658035e-001 -2.2327000e-002 +v -8.8360940e-002 1.4996706e-001 2.6044170e-002 +v -2.4078870e-002 6.7906700e-002 4.5178370e-002 +v -2.0018090e-002 6.7569300e-002 5.1565340e-002 +v -8.3577750e-002 1.2052625e-001 4.9177500e-002 +v -1.4655950e-002 1.7456543e-001 -2.5972690e-002 +v -2.7395940e-002 8.4108300e-002 4.8745680e-002 +v -4.1933580e-002 8.8463400e-002 -2.2126350e-002 +v -3.1693900e-002 1.0261265e-001 -2.2352310e-002 +v -2.7890200e-002 1.0440703e-001 -2.2830920e-002 +v -7.3790400e-002 1.2016662e-001 -7.8851200e-003 +v -4.6124160e-002 1.0506369e-001 -2.0457580e-002 +v -2.7412650e-002 7.3269450e-002 4.2641380e-002 +v -4.5532880e-002 3.4736480e-002 -2.1363200e-002 +v -4.4993030e-002 3.9017010e-002 -2.1097830e-002 +v -4.6462610e-002 3.6800270e-002 -1.7778710e-002 +v -8.8366460e-002 1.1361863e-001 5.8227800e-003 +v 5.1746240e-002 7.2897250e-002 9.0647400e-003 +v -7.0385250e-002 3.7450300e-002 -9.3190000e-004 +v -6.0923170e-002 3.8621820e-002 2.2468850e-002 +v -7.7696720e-002 1.7027889e-001 -4.3117910e-002 +v -4.3793210e-002 1.6955506e-001 -7.3026400e-003 +v -7.7587180e-002 1.7717875e-001 -5.0221090e-002 +v -4.0541880e-002 3.8886010e-002 -2.7364950e-002 +v -4.4215850e-002 3.6131460e-002 -2.4252210e-002 +v -6.6634880e-002 4.0430310e-002 -5.0180700e-003 +v -6.9242120e-002 4.1474050e-002 1.9289000e-004 +v -7.5640690e-002 1.5930400e-001 -2.6908460e-002 +v -6.3087030e-002 3.9614170e-002 2.5181560e-002 +v -7.2303020e-002 1.5186699e-001 -4.1544310e-002 +v -4.1051490e-002 4.1528620e-002 -2.4061000e-002 +v -4.6990580e-002 3.8892380e-002 -1.4016920e-002 +v -8.9559690e-002 1.2851666e-001 4.5457500e-003 +v -7.6987340e-002 1.5369375e-001 -2.2970800e-003 +v -7.0121670e-002 1.6882633e-001 -5.1173650e-002 +v -6.4792610e-002 4.1724530e-002 3.1616900e-002 +v -4.2148060e-002 1.2409627e-001 -9.5602500e-003 +v -4.8069700e-002 1.2493027e-001 -8.4076400e-003 +v -4.2150480e-002 4.3343970e-002 -2.1508710e-002 +v -6.7315160e-002 4.4034000e-002 1.5741800e-003 +v -7.3386640e-002 1.5463418e-001 -2.9943830e-002 +v -5.5352770e-002 4.2936210e-002 1.9135490e-002 +v -6.0067770e-002 4.1419500e-002 2.2953280e-002 +v -6.5488460e-002 4.0937780e-002 3.5315470e-002 +v -8.0066400e-002 1.5039650e-001 6.0518000e-004 +v -4.4031300e-002 4.1949070e-002 -1.7993960e-002 +v -4.5186510e-002 4.2453420e-002 -1.4193620e-002 +v -8.3109430e-002 1.0265445e-001 -3.2933400e-003 +v -6.5472800e-002 4.5627570e-002 4.5575400e-003 +v -7.5427730e-002 1.5201213e-001 -1.4393690e-002 +v -5.4473420e-002 4.5937510e-002 2.3612600e-002 +v -6.2464100e-002 4.3722000e-002 2.8493310e-002 +v -6.2832600e-002 4.5182750e-002 3.4622890e-002 +v -6.3538130e-002 4.3524020e-002 3.7974010e-002 +v -6.0255260e-002 4.4749620e-002 -4.1316200e-003 +v -6.3242050e-002 4.5549700e-002 4.8428000e-004 +v -6.2249430e-002 4.6540050e-002 7.1903500e-003 +v -9.1003650e-002 1.4885725e-001 2.1507030e-002 +v -5.7094130e-002 4.5996540e-002 2.6865280e-002 +v -5.7276490e-002 4.7299580e-002 2.9889950e-002 +v -3.9519900e-002 1.7385855e-001 -7.5752600e-003 +v -8.9641110e-002 1.3841920e-001 3.4141800e-002 +v -9.2601430e-002 1.3018652e-001 2.5183580e-002 +v -9.2280860e-002 1.2762053e-001 2.9751670e-002 +v -3.3957310e-002 4.1025060e-002 -2.9660250e-002 +v -9.0199540e-002 1.1657506e-001 5.6754900e-003 +v -5.8515890e-002 4.7731310e-002 2.1246000e-004 +v -7.1723560e-002 1.4617438e-001 -2.1567820e-002 +v -5.2389820e-002 4.5449130e-002 1.7686300e-002 +v -5.9414350e-002 4.7277990e-002 3.4172420e-002 +v -5.7520620e-002 1.5877600e-001 4.1621200e-003 +v -8.0959140e-002 1.0926674e-001 -2.0189900e-003 +v -5.1904000e-002 4.6100060e-002 1.9421290e-002 +v -5.1830050e-002 4.8568730e-002 2.1647030e-002 +v -7.7650400e-002 1.5658012e-001 -1.6599150e-002 +v -3.7416450e-002 4.7682130e-002 -1.7147280e-002 +v -7.8876110e-002 1.5347012e-001 3.9875800e-003 +v -5.7635420e-002 5.0425540e-002 4.6108400e-003 +v -5.2625440e-002 5.0434620e-002 2.9046740e-002 +v -5.2998720e-002 4.9169020e-002 3.3967600e-002 +v -7.3502600e-002 1.6871934e-001 -4.4791800e-002 +v -5.4420720e-002 4.7836520e-002 -5.9186900e-003 +v -5.2312740e-002 5.1085350e-002 2.4485690e-002 +v -7.9129930e-002 1.6736568e-001 -3.5506230e-002 +v 9.4115700e-003 1.2350285e-001 -9.8291000e-003 +v -3.2715700e-002 1.0896631e-001 -1.8941410e-002 +v -3.1133380e-002 4.9607260e-002 -1.9406940e-002 +v 4.5997330e-002 6.9814450e-002 3.0143300e-003 +v 3.3525460e-002 1.0966209e-001 -6.9894800e-003 +v -5.5047160e-002 5.2767560e-002 -3.9461300e-003 +v -5.6897890e-002 4.9655570e-002 -1.5319000e-003 +v -5.0290500e-002 4.9098930e-002 1.7164780e-002 +v -5.0595170e-002 4.9923270e-002 1.9174130e-002 +v -5.1887420e-002 5.3324670e-002 2.8705560e-002 +v -6.7684480e-002 1.6533627e-001 -5.5466400e-002 +v -3.0271440e-002 5.2106080e-002 -1.7676140e-002 +v -9.1087300e-003 1.1141669e-001 -2.0543230e-002 +v -5.7069360e-002 5.4424380e-002 2.3395500e-003 +v -3.2748380e-002 1.7759875e-001 -1.1627470e-002 +v -2.9009580e-002 5.1265290e-002 -2.2175780e-002 +v -3.1383130e-002 5.1791310e-002 -1.3886800e-002 +v -5.5673960e-002 5.6983850e-002 -3.3510400e-003 +v -5.0916050e-002 5.3813610e-002 1.9753140e-002 +v -8.8875380e-002 1.5169443e-001 2.0086580e-002 +v -7.7153050e-002 1.7378676e-001 -4.7867620e-002 +v -7.8577770e-002 1.6420639e-001 -3.1825860e-002 +v -2.7545910e-002 5.4021570e-002 -2.5147390e-002 +v -5.4463660e-002 5.5357450e-002 1.0326840e-002 +v -8.7041410e-002 1.3058932e-001 9.1161000e-004 +v -9.0009340e-002 1.3278082e-001 5.9220600e-003 +v -9.2232620e-002 1.3195400e-001 1.5430650e-002 +v -4.8639980e-002 1.6472475e-001 -5.0591500e-003 +v -5.4066480e-002 5.9959350e-002 -7.5992200e-003 +v -5.7434090e-002 5.7683500e-002 8.7259700e-003 +v -8.6794730e-002 1.3850688e-001 4.5575900e-003 +v -9.2989530e-002 1.3092307e-001 1.9919290e-002 +v -9.1282030e-002 1.3311897e-001 2.4688630e-002 +v 2.1815020e-002 1.1770533e-001 -1.0015300e-002 +v -2.9647120e-002 5.8104260e-002 -2.1311320e-002 +v -3.1289530e-002 5.5208570e-002 -1.4387840e-002 +v -5.9002160e-002 5.9234620e-002 2.6140800e-003 +v -9.0241700e-002 1.3575994e-001 1.4149160e-002 +v -6.1569420e-002 1.7084875e-001 -6.1679170e-002 +v -6.6070180e-002 1.6557822e-001 -5.8644080e-002 +v -2.4539930e-002 1.8005865e-001 -1.8726950e-002 +v -1.6131750e-002 1.8298848e-001 -2.6037190e-002 +v -3.0809390e-002 5.6998040e-002 -1.7835020e-002 +v 1.0464280e-002 9.6180450e-002 -2.5898970e-002 +v -5.7491630e-002 5.9530160e-002 -1.0786100e-003 +v -8.9146460e-002 1.3650500e-001 2.5952780e-002 +v 4.3714500e-003 1.0391901e-001 -2.1515100e-002 +v -9.0377040e-002 1.3252490e-001 3.1082650e-002 +v -9.0795450e-002 1.3855232e-001 2.0562560e-002 +v -9.4237710e-002 1.2615419e-001 2.2201450e-002 +v -9.0336910e-002 1.3119830e-001 3.8138790e-002 +v -4.5082610e-002 1.2218447e-001 -1.1569430e-002 +v 1.1348010e-002 9.8243750e-002 -2.3024250e-002 +v -3.9227920e-002 9.9184630e-002 -2.1912720e-002 +v -6.5509530e-002 1.5857325e-001 -5.5600270e-002 +v -7.7409510e-002 1.6260515e-001 -2.0754580e-002 +v -4.8580010e-002 1.6689211e-001 -2.5256100e-003 +v -7.6922910e-002 1.5351394e-001 -9.0785600e-003 +v -6.7750580e-002 1.5734825e-001 -5.3982110e-002 +v 5.2906410e-002 6.5230450e-002 -5.1112000e-004 +v -2.9054820e-002 6.1084120e-002 -2.4918230e-002 +v -3.1066920e-002 6.5058860e-002 -2.2751080e-002 +v 2.4249720e-002 1.0266151e-001 -1.8313830e-002 +v -5.5473660e-002 1.6050213e-001 1.3763500e-003 +v -6.6642850e-002 1.6040875e-001 -5.6842680e-002 +v -7.8200320e-002 1.6073213e-001 -2.3999690e-002 +v -1.8320680e-002 1.1968625e-001 -1.1110660e-002 +v 2.1712970e-002 1.0956342e-001 -1.5081090e-002 +v -6.8382640e-002 1.5980248e-001 -5.4208800e-002 +v -2.5445620e-002 6.0208550e-002 -3.0864700e-002 +v -2.6540330e-002 6.5084000e-002 -3.1664870e-002 +v -2.8425710e-002 6.2199610e-002 -2.7938500e-002 +v -3.2605750e-002 6.1264600e-002 -1.5453010e-002 +v -7.0872290e-002 1.1611638e-001 -7.9563700e-003 +v -6.9780530e-002 1.5938570e-001 -4.9418240e-002 +v -3.0324870e-002 6.7694720e-002 -2.7654950e-002 +v -3.2977370e-002 6.6365180e-002 -1.8385530e-002 +v 1.3533490e-002 1.0255388e-001 -2.1579310e-002 +v 4.4408530e-002 6.9758860e-002 9.4765000e-004 +v -2.1999000e-003 1.1215881e-001 -1.9658660e-002 +v -7.2028500e-002 6.7046610e-002 -7.2256000e-004 +v -7.8699630e-002 1.7313910e-001 -4.2720470e-002 +v -8.3211970e-002 1.5072131e-001 4.2128500e-003 +v -8.7439060e-002 1.3374875e-001 2.3974700e-003 +v 2.6348020e-002 8.4562230e-002 -2.3151710e-002 +v -7.4901490e-002 7.0419350e-002 -2.2854300e-003 +v -5.4576350e-002 9.1562950e-002 -2.2098700e-002 +v -7.3242520e-002 1.5231332e-001 -3.5703520e-002 +v -7.4550960e-002 1.7218738e-001 -4.7551010e-002 +v -2.8680680e-002 6.8283500e-002 -3.0610160e-002 +v 1.7372900e-002 1.0246037e-001 -2.1487700e-002 +v -8.1257430e-002 7.3025200e-002 7.1020400e-003 +v -7.4982300e-002 1.5407794e-001 -1.8974470e-002 +v -9.1556500e-002 1.3196262e-001 1.0638150e-002 +v -8.2448000e-004 9.5165120e-002 -3.2056320e-002 +v -7.7618830e-002 7.3999130e-002 -5.3263500e-003 +v -7.9858790e-002 7.2755040e-002 3.0420200e-003 +v -8.1627470e-002 7.3470610e-002 1.1161690e-002 +v -7.3679290e-002 1.4785987e-001 -2.0236290e-002 +v -9.1309820e-002 1.4848588e-001 1.6270070e-002 +v -9.0850140e-002 1.4625613e-001 1.4809050e-002 +v -6.8543890e-002 1.7513008e-001 -5.7187900e-002 +v -2.7253960e-002 1.0747453e-001 -2.1279680e-002 +v 2.1443580e-002 1.2273826e-001 -2.9316700e-003 +v -7.9061200e-002 7.3724300e-002 -8.4521000e-004 +v -8.2063500e-002 7.5993670e-002 1.7615500e-003 +v -8.3736580e-002 7.6771840e-002 8.9586000e-003 +v -9.0205720e-002 1.4947775e-001 1.3035090e-002 +v 8.4818000e-004 1.1670025e-001 -1.7337090e-002 +v -7.4577550e-002 1.5164041e-001 -2.8647990e-002 +v -2.9087460e-002 7.2924630e-002 -3.3354470e-002 +v -3.1184020e-002 7.3989530e-002 -3.0339870e-002 +v -3.2606620e-002 7.1955620e-002 -2.4866580e-002 +v -8.0575990e-002 7.6607800e-002 -2.9879400e-003 +v -8.9491020e-002 1.4392581e-001 1.2488490e-002 +v -7.7388410e-002 1.4656426e-001 -4.3543000e-003 +v -7.2896160e-002 1.5834962e-001 -3.4109420e-002 +v 7.1346500e-003 1.1468229e-001 -1.8345640e-002 +v -3.4502610e-002 7.6130020e-002 -2.2373150e-002 +v -8.3890740e-002 8.0789530e-002 2.2951400e-003 +v -8.3740480e-002 7.7240270e-002 4.6673300e-003 +v -8.6204620e-002 8.0930750e-002 1.0535420e-002 +v -8.6061500e-002 7.9931100e-002 1.4440780e-002 +v -8.1542760e-002 7.7950660e-002 2.6727280e-002 +v 2.6666170e-002 1.1268609e-001 -1.0509540e-002 +v -7.6041430e-002 1.5663068e-001 -2.1420480e-002 +v -9.0012110e-002 1.5083344e-001 1.5752740e-002 +v -7.1156510e-002 1.6335125e-001 -4.5360530e-002 +v -3.3210960e-002 7.6873190e-002 -2.7708380e-002 +v -7.3263090e-002 7.9983830e-002 -1.3749940e-002 +v -7.9285950e-002 8.0048830e-002 -7.0125500e-003 +v -8.6034510e-002 8.2645720e-002 1.9542680e-002 +v -8.4335410e-002 8.0729950e-002 2.2180460e-002 +v -7.1351460e-002 1.5727092e-001 -4.2183090e-002 +v -7.3548450e-002 1.6120822e-001 -3.5288420e-002 +v 1.6732620e-002 1.0991230e-001 -1.7020040e-002 +v -3.0978770e-002 7.7020860e-002 -3.2816490e-002 +v -6.2359240e-002 1.7544824e-001 -6.1485990e-002 +v -1.7587870e-002 1.1491318e-001 -1.7205040e-002 +v -8.2354050e-002 8.0876320e-002 -2.4038900e-003 +v -7.8578910e-002 1.4050129e-001 -4.6031000e-003 +v -2.8931080e-002 7.9247620e-002 -3.5049800e-002 +v -3.1225710e-002 8.0413100e-002 -3.2182320e-002 +v -3.3258680e-002 7.9621670e-002 -2.7146060e-002 +v -4.4697400e-002 1.1791537e-001 -1.4725860e-002 +v -7.9723740e-002 8.4226660e-002 -8.7608600e-003 +v -8.5042160e-002 8.3817830e-002 -7.7640000e-005 +v -8.6776400e-002 8.4344860e-002 1.2419030e-002 +v -8.6674670e-002 8.2665010e-002 1.5174340e-002 +v -8.5106250e-002 8.5176580e-002 2.5679440e-002 +v -7.6975760e-002 8.2935940e-002 -1.1450630e-002 +v -8.2776390e-002 8.3430890e-002 -4.3687000e-003 +v -8.6180440e-002 8.2572150e-002 6.3639000e-003 +v -9.1160820e-002 1.4144362e-001 1.5673910e-002 +v -7.4638800e-002 1.4398484e-001 -7.1504600e-003 +v -8.3448500e-002 1.3393299e-001 -1.6873200e-003 +v -7.5804700e-002 1.5134475e-001 -1.9881200e-002 +v -7.4924140e-002 1.5273013e-001 -1.9397440e-002 +v -5.2314440e-002 1.2159646e-001 -1.0798060e-002 +v -3.0734050e-002 8.5427560e-002 -3.0506670e-002 +v -3.2590560e-002 8.1942660e-002 -2.9100210e-002 +v -8.6454830e-002 8.6940490e-002 9.1667000e-004 +v -1.2501820e-002 1.0634409e-001 -2.2360190e-002 +v -8.8585880e-002 1.4605869e-001 9.8780000e-003 +v -8.5609750e-002 1.4712513e-001 6.5981100e-003 +v -8.7511210e-002 1.5061504e-001 1.0152460e-002 +v -6.0113540e-002 3.5550440e-002 4.4907580e-002 +v -8.8284200e-002 8.6869110e-002 8.1029200e-003 +v -8.8812560e-002 8.7765490e-002 1.4226540e-002 +v -8.8001070e-002 8.6626430e-002 1.5466680e-002 +v -8.6991110e-002 8.6444700e-002 2.2420950e-002 +v -7.4609990e-002 1.4727815e-001 -1.4172380e-002 +v -3.4707910e-002 8.4035880e-002 -2.4302260e-002 +v -8.4964900e-002 8.9962540e-002 -3.0068000e-003 +v -8.8091450e-002 8.7741580e-002 4.8489900e-003 +v -9.1490470e-002 1.4543178e-001 2.2277220e-002 +v -9.4380420e-002 1.2183919e-001 1.7904340e-002 +v -2.9164530e-002 8.5393440e-002 -3.3666780e-002 +v -3.0557790e-002 8.8625920e-002 -2.7550670e-002 +v -7.7770550e-002 8.7844840e-002 -1.1694810e-002 +v -8.0728260e-002 8.8204150e-002 -7.8003100e-003 +v -8.3272540e-002 8.9476690e-002 -5.6502900e-003 +v -8.9398710e-002 8.9539000e-002 1.1645550e-002 +v -8.9698390e-002 1.3971257e-001 1.3774760e-002 +v -7.7134890e-002 1.5151225e-001 -5.5823000e-003 +v -5.1121410e-002 1.6374125e-001 -2.6640500e-003 +v -8.6442960e-002 1.2767438e-001 -1.4864100e-003 +v -6.9605590e-002 1.5490763e-001 -5.0188670e-002 +v -8.7265180e-002 9.2110030e-002 4.2059000e-003 +v -8.9086250e-002 9.2377120e-002 1.0569860e-002 +v -8.9612340e-002 9.1599880e-002 1.7812280e-002 +v -8.2732460e-002 1.4196856e-001 1.2529100e-003 +v -7.2618370e-002 1.4368135e-001 -1.0987100e-002 +v -7.7677230e-002 1.6610992e-001 -3.6777320e-002 +v -1.5078060e-002 9.3863440e-002 -3.4317310e-002 +v -7.1057280e-002 1.5476885e-001 -4.5778530e-002 +v -9.2331920e-002 1.2523886e-001 9.1589500e-003 +v -7.6046700e-002 9.1037250e-002 -1.3643150e-002 +v -8.2942810e-002 9.3291700e-002 -6.1856300e-003 +v -1.0411170e-002 9.4592340e-002 -3.3784850e-002 +v -2.9331140e-002 1.1476230e-001 -1.5844640e-002 +v -3.7218250e-002 1.1594244e-001 -1.5173050e-002 +v -1.2429920e-002 1.0286006e-001 -2.3822480e-002 +v 6.6509600e-003 8.8144500e-002 -3.2945810e-002 +v -6.4119900e-003 9.2876210e-002 -3.4817640e-002 +v 1.5800150e-002 1.1996558e-001 -1.1415630e-002 +v 2.9102740e-002 1.0247506e-001 -1.5768380e-002 +v 4.2080690e-002 6.3480630e-002 -2.5405300e-003 +v 2.8723120e-002 9.7943220e-002 -1.7497350e-002 +v -1.9987640e-002 1.0278313e-001 -2.3392920e-002 +v 3.3748350e-002 8.3644140e-002 -1.8630450e-002 +v -1.8685680e-002 1.8689625e-001 -2.0248700e-002 +v 6.4154900e-003 1.1790181e-001 -1.6282740e-002 +v 5.6305210e-002 6.7769910e-002 2.6525000e-003 +v -5.3608300e-003 1.1289400e-001 -1.9613290e-002 +v 4.5769430e-002 6.4628800e-002 -1.2166100e-003 +v -1.0090870e-002 9.8229650e-002 -2.7731360e-002 +v -6.0458520e-002 1.1755645e-001 -1.1354580e-002 +v 1.2933940e-002 1.1887250e-001 -1.3979370e-002 +v 1.5235680e-002 9.4977900e-002 -2.4437140e-002 +v -3.0892950e-002 4.7409030e-002 -2.4954000e-002 +v -1.7766190e-002 1.8572344e-001 -2.3049280e-002 +v -1.3034890e-002 1.1002855e-001 -2.0161170e-002 +v -7.1206550e-002 3.8608570e-002 7.7218000e-004 +v 1.7904800e-002 1.0627709e-001 -1.7729250e-002 +v -3.3623490e-002 1.1840428e-001 -1.1927480e-002 +v -4.9906840e-002 1.1788332e-001 -1.4402480e-002 +v -6.6878100e-003 1.1747209e-001 -1.5359280e-002 +v -1.5451470e-002 1.8597600e-001 -2.4795870e-002 +v -3.0603900e-002 3.8038460e-002 -3.0123840e-002 +v -1.3220270e-002 1.8397188e-001 -2.7519460e-002 +v -4.7859450e-002 1.1162729e-001 -1.7482120e-002 +v -1.3098990e-002 9.0776040e-002 -3.6659270e-002 +v -6.3117340e-002 1.5425437e-001 2.9730400e-003 +v -5.5139750e-002 1.1051601e-001 -1.7672740e-002 +v -1.1096770e-002 1.8202324e-001 -2.8042450e-002 +v -2.6568900e-002 3.4695830e-002 -2.9113750e-002 +v -6.6396600e-003 1.0222209e-001 -2.3519320e-002 +v -5.6996400e-002 1.5741713e-001 6.0244000e-004 +v 1.9076550e-002 9.1870620e-002 -2.4890230e-002 +v 1.3473090e-002 1.2429893e-001 -6.8361400e-003 +v -2.1730490e-002 9.8410960e-002 -2.4306850e-002 +v -1.7142170e-002 9.8057460e-002 -2.4924330e-002 +v -5.8698110e-002 1.5137318e-001 -6.5801000e-004 +v 3.5641100e-003 1.2764883e-001 -4.4672400e-003 +v -8.5369800e-003 9.9921220e-002 -2.4351070e-002 +v -1.2171980e-002 1.8125102e-001 -2.9061170e-002 +v -6.1113980e-002 1.5305212e-001 9.9983000e-004 +v -2.9570620e-002 1.1713871e-001 -1.3675530e-002 +v 3.0530110e-002 1.1221207e-001 -8.1860600e-003 +v -3.1714100e-002 3.5111530e-002 -3.0658990e-002 +v -1.3691130e-002 1.7914707e-001 -2.8126410e-002 +v 1.1620840e-002 1.1548972e-001 -1.6385680e-002 +v -6.1993570e-002 1.5028063e-001 -1.6297100e-003 +v 3.6684020e-002 1.0099570e-001 -9.8485900e-003 +v 4.8512670e-002 7.1798180e-002 6.0005000e-003 +v -4.6583000e-004 1.1983662e-001 -1.3610580e-002 +v 1.6747170e-002 9.0113950e-002 -2.7127190e-002 +v 6.9832400e-003 9.7730080e-002 -2.4800310e-002 +v -4.3226830e-002 4.6263570e-002 -1.1771730e-002 +v -8.3562500e-003 1.1373600e-001 -1.8239810e-002 +v -1.2354410e-002 1.1556773e-001 -1.6486930e-002 +v 4.6834470e-002 7.4354100e-002 1.0139500e-002 +v 2.5319170e-002 1.0931725e-001 -1.3579660e-002 +v -4.2459500e-002 1.1392482e-001 -1.6188050e-002 +v 5.7744640e-002 6.4158440e-002 2.6277600e-003 +v -5.9710530e-002 3.6535780e-002 -9.4949000e-003 +v -3.2078400e-003 1.0962100e-001 -2.1523850e-002 +v 2.7020740e-002 6.1345700e-002 -2.2292060e-002 +v 7.1030200e-003 1.0191162e-001 -2.1230990e-002 +v -3.8225680e-002 1.2465525e-001 -7.3257400e-003 +v 2.5941540e-002 1.1576352e-001 -8.2193900e-003 +v -6.1297960e-002 3.3900220e-002 -9.3216600e-003 +v -5.9466670e-002 1.4743956e-001 -1.8885400e-003 +v 1.0506610e-002 1.0087700e-001 -2.2109510e-002 +v 3.3081340e-002 1.0273382e-001 -1.2787210e-002 +v 1.2517840e-002 1.0475378e-001 -1.9915960e-002 +v 2.3087990e-002 9.3998720e-002 -2.2210680e-002 +v 3.1555430e-002 9.2484730e-002 -1.8204280e-002 +v 6.2723100e-003 9.9910370e-002 -2.2296890e-002 +v -4.0917240e-002 4.6121780e-002 -1.7942580e-002 +v 3.5407360e-002 9.8188850e-002 -1.2008970e-002 +v 9.4135900e-003 1.2121902e-001 -1.2937780e-002 +v 5.3735190e-002 7.2027350e-002 6.8010000e-003 +v 2.5620340e-002 1.1880719e-001 -5.0330800e-003 +v -3.8150260e-002 4.2466610e-002 -2.6893990e-002 +v -2.8212410e-002 1.1116862e-001 -1.8001930e-002 +v -6.0253590e-002 1.4339100e-001 -3.7906300e-003 +v 1.9016880e-002 1.0401450e-001 -1.9333120e-002 +v 7.5446700e-003 9.1682150e-002 -3.1643140e-002 +v -7.0760800e-003 1.2240119e-001 -1.1364410e-002 +v -1.9047500e-002 9.6562130e-002 -2.7579900e-002 +v -1.6953390e-002 1.0669256e-001 -2.2002990e-002 +v -6.7307000e-004 1.0119875e-001 -2.2857770e-002 +v -9.0179300e-003 1.2528031e-001 -7.7912000e-003 +v -6.8136180e-002 1.8006113e-001 -5.8816050e-002 +v -2.3600190e-002 1.1513818e-001 -1.5577390e-002 +v -5.9831220e-002 4.2842260e-002 -6.6469100e-003 +v 5.3124070e-002 5.9012380e-002 -2.8853800e-003 +v -3.6931840e-002 3.7107370e-002 -2.9714170e-002 +v -5.6215140e-002 1.4139213e-001 -2.8027300e-003 +v 3.6695880e-002 1.0372844e-001 -7.9621500e-003 +v -3.5885070e-002 1.2040038e-001 -1.0640470e-002 +v -9.3569500e-003 8.5423730e-002 -3.8112540e-002 +v -6.0127340e-002 1.2041391e-001 -9.3791100e-003 +v -3.9842790e-002 1.2156113e-001 -1.1570310e-002 +v 2.8322200e-002 1.0847957e-001 -1.2623390e-002 +v -1.8733500e-003 1.1593910e-001 -1.7169430e-002 +v 3.8648150e-002 9.0153340e-002 -1.2549680e-002 +v -1.7359200e-003 9.2244170e-002 -3.4310460e-002 +v 5.0000820e-002 6.1612070e-002 -3.4649900e-003 +v 5.5858960e-002 6.2910170e-002 6.9037000e-004 +v 2.0461520e-002 1.1515372e-001 -1.3103780e-002 +v -1.5165840e-002 1.1798075e-001 -1.4465520e-002 +v -7.0859540e-002 7.1510150e-002 3.3895100e-002 +v 2.2674030e-002 8.6606050e-002 -2.4925490e-002 +v 3.5358840e-002 8.7438890e-002 -1.7109050e-002 +v 1.8400920e-002 1.2145507e-001 -7.6804200e-003 +v -2.5425900e-002 4.1421010e-002 -2.9204830e-002 +v -8.2085100e-003 9.6777440e-002 -3.0809780e-002 +v -5.6810660e-002 3.3873940e-002 -1.1166310e-002 +v -3.4588640e-002 4.4744960e-002 -2.7122900e-002 +v -4.0251680e-002 1.1827531e-001 -1.3674080e-002 +v 1.6387020e-002 1.1402346e-001 -1.5496900e-002 +v 4.2635280e-002 6.0797460e-002 -3.4583700e-003 +v -5.0687200e-002 3.5935870e-002 -1.2380790e-002 +v 7.3446800e-003 9.4509570e-002 -2.9683220e-002 +v -1.9706700e-002 9.2917340e-002 -3.4636880e-002 +v -1.2083040e-002 1.2219229e-001 -9.7120900e-003 +v 4.8805930e-002 6.8457810e-002 1.6952900e-003 +v -3.0869700e-003 9.8402500e-002 -2.7403170e-002 +v -5.3198790e-002 1.3672896e-001 -1.6580500e-003 +v -4.7290060e-002 1.3055355e-001 1.6909100e-003 +v 4.4651700e-003 1.2044039e-001 -1.3931400e-002 +v -2.3850100e-003 1.2290534e-001 -1.0382460e-002 +v -2.4833330e-002 9.5858030e-002 -2.5162110e-002 +v -4.2296900e-002 3.6291920e-002 -2.7253600e-002 +v -5.4388260e-002 1.3404922e-001 -3.9920400e-003 +v -5.0539380e-002 1.3336659e-001 -1.0872200e-003 +v 2.6040300e-003 9.6942660e-002 -2.8407060e-002 +v -7.8163100e-003 1.2821209e-001 -1.9430400e-003 +v 6.5111700e-003 1.3002517e-001 9.2881000e-004 +v 3.4742860e-002 9.2274140e-002 -1.5654590e-002 +v -6.7787700e-002 1.8088887e-001 -5.8191050e-002 +v -3.3715410e-002 1.1151566e-001 -1.8078440e-002 +v 4.4630400e-003 1.2427294e-001 -9.4291400e-003 +v -2.3370170e-002 9.3392760e-002 -3.2031820e-002 +v -4.8982070e-002 1.2980647e-001 -1.3229400e-003 +v -7.8164000e-004 1.2822918e-001 -3.2490000e-003 +v 2.4960400e-003 8.9857600e-002 -3.3628450e-002 +v 7.4553300e-003 1.1196790e-001 -1.9554260e-002 +v 2.8791140e-002 9.1157340e-002 -2.0370210e-002 +v -5.3590150e-002 1.2437450e-001 -7.3470400e-003 +v -4.7743630e-002 1.2064432e-001 -1.2812990e-002 +v -1.9616230e-002 1.2109197e-001 -9.5487700e-003 +v -6.5047370e-002 1.7999148e-001 -5.9758600e-002 +v -5.1704160e-002 3.7620360e-002 -1.1763450e-002 +v -5.2124270e-002 1.2929832e-001 -4.1187000e-003 +v -4.5334450e-002 1.2891494e-001 1.5819100e-003 +v -3.0471200e-003 1.2919453e-001 -1.0688000e-003 +v 7.2129600e-003 1.2721957e-001 -5.2073700e-003 +v 1.1669320e-002 1.2720154e-001 -3.1850900e-003 +v 5.3056400e-002 6.9708830e-002 3.1291400e-003 +v -6.3021150e-002 1.7810951e-001 -6.0393570e-002 +v 2.8204800e-002 6.4391270e-002 -2.0698040e-002 +v 3.4400180e-002 1.0503000e-001 -1.0224920e-002 +v 3.0975190e-002 1.0790250e-001 -1.1058430e-002 +v -4.8984390e-002 1.1480518e-001 -1.5966690e-002 +v -3.2821710e-002 1.2300500e-001 -5.9088300e-003 +v -5.0792860e-002 1.2716487e-001 -4.8183200e-003 +v -3.5301670e-002 1.2547815e-001 -3.1542800e-003 +v 5.6455250e-002 6.9951490e-002 4.9191700e-003 +v -1.6240450e-002 1.2512177e-001 -3.6499700e-003 +v -1.6970400e-002 1.1119793e-001 -1.9586410e-002 +v -5.4088120e-002 3.9781210e-002 -1.0544680e-002 +v -3.4190490e-002 4.7514010e-002 -2.2301500e-002 +v 1.3699090e-002 9.3914220e-002 -2.6427690e-002 +v 8.8000000e-004 9.9234930e-002 -2.4355670e-002 +v -4.6459460e-002 1.2723953e-001 -4.8843300e-003 +v -4.1735500e-002 1.2687599e-001 -4.1742000e-003 +v -2.1000480e-002 1.2313643e-001 -6.1190100e-003 +v -1.2130450e-002 1.2572568e-001 -5.2007900e-003 +v -4.3822400e-003 1.2640753e-001 -6.9495200e-003 +v 1.4085700e-003 3.4781990e-002 -2.3265200e-002 +v -1.4846200e-002 3.5070930e-002 -2.6071900e-002 +v -2.1399500e-002 3.4795120e-002 -2.7958820e-002 +v 1.2009220e-002 3.5961900e-002 -2.1735750e-002 +v 3.8249200e-003 3.6129220e-002 -2.3878090e-002 +v -5.1139560e-002 9.6617580e-002 -2.2095120e-002 +v -5.4813320e-002 9.8102480e-002 -2.1425370e-002 +v -2.7597040e-002 1.6979824e-001 -1.8170420e-002 +v 1.3359870e-002 3.9377410e-002 -2.2496330e-002 +v 4.3919300e-003 3.8674430e-002 -2.4170290e-002 +v -6.8478200e-003 3.6444540e-002 -2.5177120e-002 +v -1.3280260e-002 3.7699590e-002 -2.6391810e-002 +v -4.7672760e-002 3.6116650e-002 -1.3301210e-002 +v -4.5590120e-002 1.0853826e-001 -1.8796680e-002 +v -5.0095670e-002 1.0990925e-001 -1.8504510e-002 +v -6.5766640e-002 3.6469550e-002 -7.2073000e-003 +v -2.3455840e-002 1.6824727e-001 -1.8822880e-002 +v -4.5918000e-003 3.8404570e-002 -2.5412870e-002 +v -2.4954130e-002 3.7441060e-002 -2.9152720e-002 +v 2.9007770e-002 3.7358220e-002 -2.7474000e-004 +v -7.9468800e-003 4.1489920e-002 -2.5911270e-002 +v -1.6803800e-002 3.9753810e-002 -2.7565350e-002 +v -6.5156150e-002 1.4034537e-001 -7.6848600e-003 +v -4.7080100e-002 4.0700690e-002 -1.1869830e-002 +v -6.8470630e-002 3.7477700e-002 -4.9557400e-003 +v 3.7326850e-002 4.0209510e-002 -8.5850000e-004 +v 3.5349870e-002 4.1257050e-002 -2.8075100e-003 +v 5.1820700e-003 4.1536320e-002 -2.4065670e-002 +v 1.8660660e-002 1.0030784e-001 -2.2127290e-002 +v -6.0510780e-002 1.0748450e-001 -1.7042300e-002 +v -6.2374340e-002 4.0146090e-002 -7.4040200e-003 +v 2.5456950e-002 3.9483890e-002 -4.0251400e-003 +v -2.2828000e-004 4.3394940e-002 -2.5124420e-002 +v -8.1088400e-003 4.3439060e-002 -2.6140070e-002 +v -1.7362450e-002 4.3237420e-002 -2.7665190e-002 +v -2.6416670e-002 4.4674020e-002 -2.8209740e-002 +v 3.8064500e-003 1.0944331e-001 -2.0203790e-002 +v -5.8232370e-002 9.5690400e-002 -2.0616030e-002 +v -6.6122370e-002 4.2341260e-002 -2.7538800e-003 +v -6.0959920e-002 9.4173040e-002 -1.9015670e-002 +v 3.1352250e-002 4.2649280e-002 -4.6745000e-003 +v -3.3540900e-002 3.6342620e-002 4.9089960e-002 +v 1.7252780e-002 4.4335610e-002 -2.3067190e-002 +v 1.0637660e-002 4.4161560e-002 -2.4926170e-002 +v 4.3843100e-003 4.5806710e-002 -2.6788990e-002 +v -8.2506400e-003 4.5148720e-002 -2.8441070e-002 +v -1.5748410e-002 4.5043860e-002 -2.7877790e-002 +v 2.8990330e-002 4.4697850e-002 -6.1863000e-003 +v 8.1686400e-003 4.5053030e-002 -2.5178740e-002 +v -9.6291000e-004 4.5378230e-002 -2.7308280e-002 +v -1.7033400e-003 4.7819200e-002 -2.9928930e-002 +v -3.1535830e-002 4.4740410e-002 -2.8079410e-002 +v -3.3619650e-002 1.5691468e-001 -1.1024870e-002 +v -5.0751180e-002 4.3109620e-002 -1.0018680e-002 +v 3.6890890e-002 4.7353200e-002 -6.1057100e-003 +v 2.4975630e-002 4.2644580e-002 -7.0169900e-003 +v 2.4562420e-002 4.8369560e-002 -1.9672760e-002 +v 1.3964040e-002 4.5579170e-002 -2.4706510e-002 +v 1.3376130e-002 4.8630300e-002 -2.6551500e-002 +v 3.7308900e-003 4.8127990e-002 -2.9025970e-002 +v -8.7947000e-003 4.7056850e-002 -2.9881630e-002 +v -1.3753770e-002 5.1865060e-002 -3.2243480e-002 +v -2.1200840e-002 4.6657090e-002 -2.7951320e-002 +v 3.9693540e-002 4.5658580e-002 -4.5274100e-003 +v 3.3627400e-002 4.8717730e-002 -6.3904600e-003 +v -6.5352120e-002 9.9294570e-002 -1.6820150e-002 +v 1.2868100e-003 5.0383670e-002 -3.0357440e-002 +v -8.1797500e-003 4.9845800e-002 -3.1071390e-002 +v -1.7184350e-002 4.8210500e-002 -2.9741930e-002 +v -2.6049450e-002 4.7692500e-002 -2.6149500e-002 +v -8.4747010e-002 1.1078350e-001 3.9488380e-002 +v -5.1316870e-002 4.8270690e-002 -7.9310500e-003 +v -8.2506510e-002 1.2765487e-001 -4.6796400e-003 +v 3.8663690e-002 5.1696670e-002 -6.6910200e-003 +v -7.5643160e-002 9.9440450e-002 -1.1927610e-002 +v 2.0284470e-002 5.1349190e-002 -2.4895380e-002 +v 5.9436000e-003 5.0976660e-002 -2.9119360e-002 +v -2.5528290e-002 5.1472710e-002 -2.6884680e-002 +v -3.5562670e-002 4.9399890e-002 -1.2865040e-002 +v -4.2818980e-002 1.6220182e-001 -1.0337510e-002 +v -6.5593600e-002 1.7665711e-001 -6.0504730e-002 +v -3.4151080e-002 1.7442797e-001 -1.3312550e-002 +v 4.3673180e-002 5.0162230e-002 -5.9843500e-003 +v -5.0342410e-002 1.5546197e-001 -5.1927700e-003 +v 2.5464180e-002 5.4029700e-002 -2.1691010e-002 +v 1.0149790e-002 4.9258540e-002 -2.7750590e-002 +v -2.2043190e-002 5.3612020e-002 -3.0135610e-002 +v -3.2875520e-002 5.1677630e-002 -1.0888650e-002 +v -3.7613820e-002 4.9534770e-002 -1.1626140e-002 +v -4.0750630e-002 4.9285110e-002 -1.1286200e-002 +v -4.6385170e-002 4.7490850e-002 -1.0085980e-002 +v 4.4473170e-002 5.3293010e-002 -6.3327900e-003 +v 3.3205620e-002 5.1020650e-002 -7.2382500e-003 +v 1.5678350e-002 5.1169270e-002 -2.6397810e-002 +v 6.8341700e-003 5.5010170e-002 -3.0561130e-002 +v 2.1424700e-003 5.5502800e-002 -3.1334400e-002 +v 5.9285000e-004 5.2867950e-002 -3.0513830e-002 +v -3.6481400e-003 5.1869000e-002 -3.1457940e-002 +v -9.4245600e-003 5.5399220e-002 -3.3653980e-002 +v -1.9302150e-002 5.8224770e-002 -3.3919700e-002 +v -6.1084270e-002 1.3386190e-001 -7.2248900e-003 +v -4.3309760e-002 5.5656840e-002 -1.1402110e-002 +v -6.1080540e-002 1.6833773e-001 -5.9192060e-002 +v 4.7574690e-002 5.2943630e-002 -5.1300300e-003 +v -3.7403030e-002 1.1150775e-001 -1.8243310e-002 +v 1.9972490e-002 5.4409710e-002 -2.7108230e-002 +v 5.3974800e-003 5.8382570e-002 -3.0903760e-002 +v -1.0603590e-002 5.3602910e-002 -3.3403350e-002 +v -3.4998290e-002 5.2331560e-002 -1.0347380e-002 +v -4.6471230e-002 5.1304340e-002 -9.8299800e-003 +v -6.7945360e-002 1.1493603e-001 -9.5107300e-003 +v -7.1048210e-002 1.5161088e-001 -4.4679270e-002 +v -5.8903800e-003 3.4790620e-002 -2.4224470e-002 +v 1.6842140e-002 5.5555670e-002 -2.8284560e-002 +v 1.0711040e-002 5.4687610e-002 -2.9767520e-002 +v -1.1826800e-003 5.9492420e-002 -3.3360920e-002 +v -5.2325900e-003 5.5688960e-002 -3.2840220e-002 +v -5.1705830e-002 5.2470760e-002 -7.4047200e-003 +v -5.2626360e-002 6.0043760e-002 -8.9566900e-003 +v -7.2598590e-002 9.7762720e-002 -1.4434510e-002 +v 4.4331260e-002 5.5818010e-002 -6.0362700e-003 +v 3.8463400e-002 5.4934820e-002 -6.1822500e-003 +v 3.8838620e-002 5.7808260e-002 -5.2584800e-003 +v -9.2015400e-003 5.9510130e-002 -3.4437110e-002 +v -3.5262560e-002 5.5284900e-002 -1.0545060e-002 +v -3.8336450e-002 5.4503540e-002 -1.0905320e-002 +v -1.7727540e-002 3.6289540e-002 5.2222250e-002 +v 5.0006490e-002 5.8095800e-002 -4.6211800e-003 +v 4.6133970e-002 5.9278810e-002 -4.7769600e-003 +v 1.5110300e-002 5.9819840e-002 -2.8645750e-002 +v 1.0312380e-002 5.7586530e-002 -2.9995250e-002 +v -6.1353400e-003 6.0256790e-002 -3.4695830e-002 +v -1.2318220e-002 5.9396390e-002 -3.5268510e-002 +v -1.4466910e-002 6.3136020e-002 -3.6865870e-002 +v -4.6650260e-002 5.9840950e-002 -1.2135840e-002 +v -5.6572080e-002 1.2480275e-001 -7.1885700e-003 +v -7.9237500e-002 1.2055419e-001 -5.6744800e-003 +v -7.9334790e-002 1.2560650e-001 -6.1175900e-003 +v 2.2340000e-002 5.8492230e-002 -2.6014120e-002 +v 7.6270400e-003 6.2098330e-002 -3.1135840e-002 +v 3.3101700e-003 6.0456840e-002 -3.2481070e-002 +v -1.6811880e-002 6.1275230e-002 -3.5929330e-002 +v -3.2491910e-002 5.7196350e-002 -1.2104730e-002 +v -3.4108240e-002 6.1466560e-002 -1.3053130e-002 +v -3.3896980e-002 5.7025330e-002 -1.1047570e-002 +v -3.8623580e-002 5.8303290e-002 -1.1505750e-002 +v -4.5008400e-002 6.2723940e-002 -1.3390450e-002 +v -5.6896010e-002 1.3398739e-001 -5.6270700e-003 +v -4.4853890e-002 1.5746031e-001 -8.6731600e-003 +v -7.8609550e-002 6.9656870e-002 1.1810740e-002 +v -2.3730020e-002 1.0186156e-001 -2.3836400e-002 +v -2.8122930e-002 9.9322390e-002 -2.3580130e-002 +v -5.0076720e-002 1.4997652e-001 -3.6419700e-003 +v -3.3048420e-002 9.5958590e-002 -2.3426460e-002 +v 1.9520390e-002 6.2064770e-002 -2.7292470e-002 +v -3.8864710e-002 1.0333987e-001 -2.0641400e-002 +v -4.8952940e-002 5.6281090e-002 -1.0220880e-002 +v -5.3993040e-002 1.4498656e-001 -1.1093400e-003 +v -4.5530560e-002 9.8510850e-002 -2.1729510e-002 +v -5.0910960e-002 1.0074570e-001 -2.1619430e-002 +v 2.3245830e-002 6.2792530e-002 -2.5047990e-002 +v 9.7412800e-003 6.3181400e-002 -3.1141370e-002 +v -8.6614000e-004 6.4559630e-002 -3.4490930e-002 +v -8.5264000e-003 6.4001730e-002 -3.5850480e-002 +v -4.8451500e-002 6.4794120e-002 -1.3029910e-002 +v -5.2325160e-002 1.0614813e-001 -1.9271240e-002 +v -5.5265350e-002 1.0216682e-001 -1.9897100e-002 +v -5.9042010e-002 9.9032210e-002 -1.9222950e-002 +v -5.7846760e-002 1.0433496e-001 -1.8525740e-002 +v -2.7113460e-002 1.7332156e-001 -1.8538890e-002 +v 2.2832000e-002 6.7082570e-002 -2.6297510e-002 +v 1.4519060e-002 6.4595540e-002 -2.9855690e-002 +v 1.1471330e-002 6.7581440e-002 -3.0901170e-002 +v -1.7739360e-002 6.6260830e-002 -3.7657310e-002 +v -6.5059750e-002 1.3452104e-001 -8.0899900e-003 +v -7.5829320e-002 1.4244605e-001 -5.8090000e-003 +v -4.1362350e-002 6.1637330e-002 -1.2813770e-002 +v -5.6147890e-002 6.1921550e-002 -5.7541100e-003 +v -6.2126110e-002 6.2845360e-002 -4.5202600e-003 +v -3.7292480e-002 1.6449057e-001 -1.3627050e-002 +v -1.9818920e-002 1.6509494e-001 -1.7608980e-002 +v 6.2881100e-003 6.5416350e-002 -3.2563040e-002 +v -5.9250500e-003 6.9515630e-002 -3.5933480e-002 +v -1.0538630e-002 6.7999180e-002 -3.6517060e-002 +v -3.5385700e-002 6.6817430e-002 -1.5434860e-002 +v -5.3994500e-002 6.4638700e-002 -9.3254900e-003 +v -6.3852310e-002 6.5572310e-002 -6.9393300e-003 +v -6.3920880e-002 1.2774242e-001 -8.5494600e-003 +v -2.6940700e-002 3.6184050e-002 5.3351850e-002 +v 1.9618650e-002 6.7007390e-002 -2.8356120e-002 +v 1.2275180e-002 6.9933940e-002 -3.1553160e-002 +v 5.4265100e-003 6.8247960e-002 -3.2730520e-002 +v -4.4084200e-003 6.6619200e-002 -3.4870250e-002 +v -2.1911350e-002 6.7144790e-002 -3.6535750e-002 +v -4.5643150e-002 1.5466949e-001 -7.2969400e-003 +v -5.1673460e-002 6.6850660e-002 -1.2120350e-002 +v -5.8105180e-002 6.6465950e-002 -1.0044340e-002 +v -5.6992260e-002 1.4311862e-001 -2.2403000e-003 +v -8.0651110e-002 1.3119854e-001 -4.4397800e-003 +v -5.6544310e-002 1.2850938e-001 -6.2014700e-003 +v 1.7758080e-002 7.0138540e-002 -2.9404680e-002 +v 6.4980500e-003 7.0791870e-002 -3.3525310e-002 +v 7.5831000e-004 7.0434460e-002 -3.4462560e-002 +v -1.3235950e-002 6.9292820e-002 -3.7917490e-002 +v -6.7390780e-002 1.1889688e-001 -8.7301400e-003 +v -3.8119520e-002 6.4162310e-002 -1.3829140e-002 +v 1.8527400e-003 1.1303356e-001 -1.9794270e-002 +v -7.5950810e-002 6.8170610e-002 1.8117970e-002 +v -1.0001990e-002 7.2671480e-002 -3.7661370e-002 +v -1.7976070e-002 7.0613770e-002 -3.8443880e-002 +v -2.3035990e-002 7.2778460e-002 -3.8072640e-002 +v -2.6120100e-002 7.1177480e-002 -3.5451530e-002 +v -6.8535420e-002 1.3929375e-001 -7.8046600e-003 +v -3.5263040e-002 7.1067650e-002 -1.8011860e-002 +v -4.1558180e-002 6.9774010e-002 -1.6774100e-002 +v -5.2831730e-002 7.0298920e-002 -1.4864960e-002 +v -6.6978850e-002 6.7638980e-002 -6.8094400e-003 +v -1.0244470e-002 1.7895826e-001 -2.9538870e-002 +v -7.5272650e-002 1.2680098e-001 -8.0241700e-003 +v -8.7359900e-002 1.1248315e-001 4.2049490e-002 +v 8.7503000e-003 7.4301560e-002 -3.3398210e-002 +v -6.4249520e-002 1.6045024e-001 -5.7041470e-002 +v -4.4354010e-002 7.3372220e-002 -1.7874430e-002 +v -4.5762580e-002 6.9445320e-002 -1.5928780e-002 +v -4.7957440e-002 7.2542990e-002 -1.6106990e-002 +v -5.7822630e-002 6.9538010e-002 -1.4416470e-002 +v -7.2071600e-002 7.1538150e-002 -7.4714400e-003 +v 2.5472930e-002 7.4094500e-002 -2.4938540e-002 +v 1.5719730e-002 7.3756350e-002 -2.9747770e-002 +v 4.8214000e-003 7.3763980e-002 -3.4552450e-002 +v -2.2528600e-003 7.3921320e-002 -3.5887190e-002 +v -7.3834900e-003 7.4799620e-002 -3.7223830e-002 +v -2.0225340e-002 7.7095190e-002 -3.9044290e-002 +v -3.4016180e-002 7.2101270e-002 -2.0823150e-002 +v -3.8493370e-002 7.2839870e-002 -1.7502230e-002 +v -6.4392550e-002 7.3116330e-002 -1.5335340e-002 +v -6.4480660e-002 7.0187350e-002 -1.2261750e-002 +v -2.3854330e-002 1.6164528e-001 -1.4504190e-002 +v 2.2104450e-002 7.2692600e-002 -2.6900140e-002 +v 1.5532370e-002 7.6586960e-002 -2.9606940e-002 +v 1.1574050e-002 7.4860570e-002 -3.1383860e-002 +v -1.4731560e-002 7.7640750e-002 -3.8490670e-002 +v -1.6018820e-002 7.4288800e-002 -3.8864420e-002 +v -5.1103620e-002 7.3071950e-002 -1.6243060e-002 +v -5.7989540e-002 7.4017880e-002 -1.7522320e-002 +v -6.9608380e-002 7.2322890e-002 -1.0934430e-002 +v -7.5996110e-002 1.1714132e-001 -6.5577200e-003 +v -3.7987660e-002 1.0751453e-001 -1.9975760e-002 +v 1.0696210e-002 7.9889200e-002 -3.2009580e-002 +v -5.3433400e-003 7.8264580e-002 -3.7476940e-002 +v -2.6081990e-002 7.6191290e-002 -3.6780200e-002 +v -3.9161040e-002 1.5718885e-001 -1.0580510e-002 +v -6.5609880e-002 7.5860010e-002 -1.6750060e-002 +v -7.0177600e-002 7.5663330e-002 -1.3839210e-002 +v -7.4291360e-002 7.4808360e-002 -9.3537900e-003 +v -6.3428890e-002 1.7185387e-001 -6.1412170e-002 +v 3.0684890e-002 7.5726870e-002 -2.0778090e-002 +v 1.9305010e-002 7.9017870e-002 -2.7743990e-002 +v -8.5992100e-003 7.9338730e-002 -3.7905180e-002 +v -2.3200110e-002 7.6568500e-002 -3.8386500e-002 +v -3.8117820e-002 7.6390120e-002 -1.8644360e-002 +v -4.4231130e-002 7.7664130e-002 -1.9026580e-002 +v -5.1025500e-002 7.5705070e-002 -1.8186900e-002 +v -7.0595130e-002 1.2994832e-001 -8.7629200e-003 +v 2.8147660e-002 7.8785370e-002 -2.2432450e-002 +v 7.6016000e-003 7.9435920e-002 -3.3714560e-002 +v 4.9502400e-003 7.8027250e-002 -3.4409750e-002 +v -1.5858350e-002 8.1165550e-002 -3.9185590e-002 +v -1.8502080e-002 8.3343870e-002 -3.9010720e-002 +v -7.9739350e-002 1.3606854e-001 -4.1482100e-003 +v -3.0980180e-002 1.6634656e-001 -1.6241160e-002 +v -3.5749800e-002 7.7248350e-002 -1.9374020e-002 +v -4.8944740e-002 7.9086360e-002 -1.9575700e-002 +v -5.5065860e-002 7.8089190e-002 -1.9755480e-002 +v 2.3706000e-002 8.0240410e-002 -2.5450120e-002 +v 1.2254110e-002 8.3456700e-002 -3.0771580e-002 +v 1.8549900e-003 8.4692790e-002 -3.4838500e-002 +v -2.0857000e-004 7.8941410e-002 -3.5782080e-002 +v -4.2710000e-004 8.2947370e-002 -3.6380660e-002 +v -4.4101600e-003 8.2794510e-002 -3.7467250e-002 +v -3.3202320e-002 1.0578320e-001 -2.0647590e-002 +v -3.9206970e-002 8.1536380e-002 -2.0571000e-002 +v -6.0355410e-002 7.9766610e-002 -1.9375540e-002 +v -4.1771830e-002 1.0396706e-001 -2.0832940e-002 +v -1.1204010e-002 8.2713320e-002 -3.8489610e-002 +v -2.3181500e-002 8.1686990e-002 -3.8329160e-002 +v -2.7233190e-002 8.0570950e-002 -3.6620670e-002 +v -3.5470180e-002 8.0196070e-002 -2.2325910e-002 +v -4.4864210e-002 8.1997900e-002 -2.0473520e-002 +v -5.0647890e-002 8.2309430e-002 -2.1365890e-002 +v -5.5522610e-002 8.1927600e-002 -2.1353790e-002 +v -8.8089610e-002 1.1135484e-001 1.8516150e-002 +v -7.2036080e-002 1.1107918e-001 4.5361400e-002 +v -3.3359780e-002 1.6986395e-001 -1.5448990e-002 +v -6.6839030e-002 6.2170510e-002 2.1576840e-002 +v 3.0730560e-002 8.1968990e-002 -2.0040460e-002 +v 1.6224320e-002 8.6480380e-002 -2.8952010e-002 +v -6.9855630e-002 1.0027892e-001 -1.4847830e-002 +v -6.3836170e-002 8.1704600e-002 -1.8908860e-002 +v -6.7914820e-002 8.0136290e-002 -1.7128200e-002 +v -4.5752080e-002 1.6340754e-001 -8.1780500e-003 +v 1.1727540e-002 8.8010780e-002 -3.0860110e-002 +v 7.3334800e-003 8.5270000e-002 -3.2829380e-002 +v -3.4356500e-003 8.7017890e-002 -3.6461000e-002 +v -2.6964110e-002 8.4512810e-002 -3.6361740e-002 +v -3.6553370e-002 8.5316190e-002 -2.2576200e-002 +v -3.8791090e-002 8.5232710e-002 -2.1917600e-002 +v -5.7676940e-002 8.6258340e-002 -2.1098320e-002 +v -6.2581810e-002 8.6394530e-002 -1.9169290e-002 +v -7.1395340e-002 1.2468846e-001 -8.5944200e-003 +v 1.4801570e-002 9.9040900e-002 -2.2842920e-002 +v -2.1162860e-002 1.7491852e-001 -2.1977110e-002 +v -1.4824250e-002 8.7288840e-002 -3.8317070e-002 +v -2.3285750e-002 8.9468030e-002 -3.6027250e-002 +v -5.1595650e-002 8.4422070e-002 -2.1600960e-002 +v -6.9481040e-002 8.5656460e-002 -1.7198420e-002 +v -7.0917210e-002 1.0754846e-001 -1.1496630e-002 +v 3.0145320e-002 8.6284000e-002 -2.0408140e-002 +v -5.5578110e-002 1.1567692e-001 -1.4645990e-002 +v -8.0981100e-003 8.9070080e-002 -3.6552200e-002 +v -8.1206310e-002 1.1205088e-001 -8.8299000e-004 +v -1.8772170e-002 8.9838040e-002 -3.6991710e-002 +v -2.1100420e-002 8.6587670e-002 -3.7849050e-002 +v -2.5809910e-002 8.8889590e-002 -3.5082250e-002 +v -4.8984800e-002 9.0731760e-002 -2.1817170e-002 +v -3.5874870e-002 3.4776000e-002 -3.0845200e-002 +v -3.3164390e-002 3.3606540e-002 -2.9721880e-002 +v -2.5964020e-002 3.3487000e-002 -2.6321120e-002 +v -1.6717530e-002 3.3611640e-002 -2.4625420e-002 +v -5.3486300e-003 3.3829010e-002 -2.2600430e-002 +v 6.4843500e-003 3.4293000e-002 -2.0854930e-002 +v 1.3950350e-002 3.4880000e-002 -1.8612870e-002 +v -4.2465980e-002 3.4189100e-002 -2.7260650e-002 +v -3.3241100e-002 3.3578760e-002 -2.6719450e-002 +v 6.2813500e-003 3.4165800e-002 -1.8764230e-002 +v -4.4265790e-002 3.3663660e-002 -2.1914420e-002 +v -2.3671460e-002 3.3630970e-002 -2.3217760e-002 +v -1.1558580e-002 3.3895430e-002 -2.1054260e-002 +v -2.0406400e-003 3.4053940e-002 -1.9331070e-002 +v 1.7323900e-003 3.4459660e-002 -1.6607870e-002 +v -2.7316070e-002 3.3910070e-002 -2.1353750e-002 +v -1.3371080e-002 3.4361580e-002 -1.9023720e-002 +v 9.5887300e-003 3.4207220e-002 -1.5424050e-002 +v -1.4981540e-002 3.5878180e-002 -1.7992380e-002 +v -2.3474300e-003 3.5903130e-002 -1.5929740e-002 +v 2.2544300e-003 3.6411540e-002 -1.4783970e-002 +v -3.5199130e-002 3.3835210e-002 -2.0508290e-002 +v -2.6075450e-002 3.5918600e-002 -1.9405170e-002 +v 8.2740600e-003 3.5645200e-002 -1.2648700e-002 +v 1.0473640e-002 3.4742600e-002 -1.1262870e-002 +v 1.4055380e-002 3.4483430e-002 -1.4495730e-002 +v -3.6970520e-002 3.5680360e-002 -1.5007790e-002 +v -2.4719500e-003 3.8408770e-002 -1.4159030e-002 +v -3.9481890e-002 3.3618220e-002 -2.3612470e-002 +v -4.1091510e-002 3.4006000e-002 -1.1997540e-002 +v -3.1589810e-002 3.5592330e-002 -1.9204150e-002 +v -2.0086310e-002 3.8064450e-002 -1.7220790e-002 +v -1.1113250e-002 3.8290290e-002 -1.5646360e-002 +v 4.4522600e-003 3.7705190e-002 -1.2957650e-002 +v 1.5870480e-002 3.4416230e-002 -2.9666500e-003 +v -4.7872000e-002 3.4136300e-002 -1.5418250e-002 +v -4.7521640e-002 3.3622720e-002 -1.2804590e-002 +v -3.3407340e-002 3.7577040e-002 -1.6158190e-002 +v -2.7851470e-002 3.8404330e-002 -1.7210420e-002 +v -8.5065300e-003 3.9028950e-002 -1.3000800e-002 +v 6.4552500e-003 3.8165190e-002 -1.0164860e-002 +v 7.4147100e-003 3.4659190e-002 -3.0116800e-003 +v 1.1966200e-002 3.4335400e-002 -5.9571300e-003 +v 2.0414820e-002 3.5567580e-002 -3.7806900e-003 +v -1.9288780e-002 3.8762570e-002 -1.4202620e-002 +v -1.1390100e-003 3.9176760e-002 -1.0381370e-002 +v 3.8149200e-003 3.9024470e-002 -8.0827300e-003 +v 7.5208200e-003 3.6733400e-002 -6.7614300e-003 +v 1.9968120e-002 3.4843990e-002 -1.8984900e-003 +v -4.5058400e-002 3.3600490e-002 -1.2527510e-002 +v -3.0754850e-002 3.8639810e-002 -1.4050770e-002 +v -5.1499810e-002 3.3729110e-002 -1.2082510e-002 +v -2.3756860e-002 3.8585750e-002 -1.1093270e-002 +v 3.9734700e-003 3.8208550e-002 -3.7963500e-003 +v 9.5485400e-003 3.4232620e-002 1.7162000e-003 +v 2.9086550e-002 3.5799990e-002 3.5630900e-003 +v -5.5965200e-002 3.3529910e-002 -9.1246200e-003 +v -1.9523510e-002 3.8505210e-002 -4.5434500e-003 +v 1.6363470e-002 3.4394790e-002 2.2948600e-003 +v 2.1324740e-002 3.4624040e-002 5.6444000e-003 +v -3.9670300e-002 3.6174000e-002 -7.3397700e-003 +v -1.4251730e-002 3.8648030e-002 -4.3030400e-003 +v 2.3262300e-003 3.5348200e-002 2.3246000e-003 +v 1.4014300e-002 3.5703800e-002 3.8878900e-003 +v 1.5322800e-002 3.6239700e-002 3.6628500e-003 +v 2.3753130e-002 3.4670710e-002 3.9885300e-003 +v 3.2369180e-002 3.5816010e-002 7.0246300e-003 +v -6.3715900e-002 3.3776930e-002 -8.0065600e-003 +v -6.4266880e-002 3.3562500e-002 -5.1253200e-003 +v -3.8066600e-002 3.8518600e-002 -7.3079600e-003 +v -9.4308800e-003 3.8887690e-002 -7.4848700e-003 +v 3.9677800e-003 3.4200210e-002 4.9754500e-003 +v 9.4292600e-003 3.6030400e-002 4.5275100e-003 +v 2.9859020e-002 3.4980130e-002 9.8349300e-003 +v -5.2730060e-002 3.3497900e-002 -1.8117500e-003 +v -4.1271000e-002 3.3855400e-002 -1.8800800e-003 +v -3.1105000e-003 3.8946190e-002 -2.7793900e-003 +v 6.2194100e-003 3.5134100e-002 6.5492800e-003 +v 2.0897900e-002 3.5937100e-002 8.7849000e-003 +v 3.5606010e-002 3.6526640e-002 9.8155300e-003 +v -6.7078340e-002 3.3840100e-002 -6.1688300e-003 +v -8.1140000e-004 3.7424170e-002 4.7721500e-003 +v 3.1492300e-003 3.4125310e-002 1.1762220e-002 +v 4.9172000e-003 3.3997100e-002 9.1666100e-003 +v 2.5130800e-002 3.4546910e-002 1.1012580e-002 +v 2.8248620e-002 3.5046370e-002 1.6016700e-002 +v -6.7032970e-002 6.5145960e-002 2.7292860e-002 +v -4.6380170e-002 3.3605230e-002 -8.9435000e-004 +v -3.3163400e-002 3.8195400e-002 -5.2520000e-004 +v -3.2074200e-002 3.8323400e-002 -4.2109000e-004 +v -2.1692690e-002 3.8266010e-002 4.5100800e-003 +v 2.3930750e-002 3.4816710e-002 1.7739160e-002 +v 4.2719120e-002 3.9977070e-002 8.9321600e-003 +v -5.8604080e-002 3.3462230e-002 -2.1667000e-004 +v -3.7314400e-002 3.3633000e-002 4.5724700e-003 +v -1.0423990e-002 3.8488570e-002 6.2292700e-003 +v -1.3896900e-003 3.8651360e-002 2.3966500e-003 +v -3.0845000e-004 3.5462480e-002 8.2607200e-003 +v -1.4089000e-003 3.6193080e-002 1.2944550e-002 +v 2.2252900e-002 3.6583300e-002 1.3979700e-002 +v -7.0961830e-002 3.4345730e-002 -7.8374000e-004 +v -6.9066180e-002 3.3717630e-002 -1.9761000e-004 +v -6.4825640e-002 3.3505860e-002 2.8222500e-003 +v -4.7059660e-002 3.3501860e-002 3.5646400e-003 +v -3.6953800e-003 3.8172780e-002 1.3046800e-002 +v 3.3475850e-002 3.6447340e-002 1.6266960e-002 +v 3.7249610e-002 3.7509920e-002 1.4815820e-002 +v -4.5675940e-002 3.3703640e-002 6.4300300e-003 +v -3.8639270e-002 3.3937310e-002 8.5506500e-003 +v -9.5064100e-003 3.8352640e-002 1.5570660e-002 +v 2.1499800e-002 3.5807100e-002 1.8169400e-002 +v 4.4876460e-002 4.1230990e-002 1.6008250e-002 +v -7.2474010e-002 3.6255930e-002 1.5532600e-003 +v -7.1498130e-002 3.4452970e-002 4.2026500e-003 +v -2.7790900e-002 3.8062900e-002 7.9376100e-003 +v -1.6556410e-002 3.8286470e-002 1.0215790e-002 +v 8.1043500e-003 3.4842900e-002 1.8134600e-002 +v 2.3589460e-002 3.5890600e-002 2.5337690e-002 +v 4.1261350e-002 4.0585070e-002 2.0751930e-002 +v -5.1350870e-002 3.3645700e-002 8.0329400e-003 +v -4.7104300e-002 3.5549500e-002 8.0803900e-003 +v -1.4103500e-003 3.6999940e-002 1.6982030e-002 +v 9.1714000e-004 3.4803380e-002 1.5634690e-002 +v 2.8887900e-003 3.4636250e-002 1.8849770e-002 +v 1.3279200e-002 3.4379500e-002 2.1423700e-002 +v 1.4322700e-002 3.4425500e-002 2.1593200e-002 +v 1.7490100e-002 3.4646300e-002 2.2040900e-002 +v 2.9868460e-002 3.6248820e-002 1.9872200e-002 +v -3.9222000e-002 3.6326200e-002 1.0789900e-002 +v -3.0307100e-002 3.3995400e-002 1.4706400e-002 +v 2.0081230e-002 3.5172700e-002 2.8018770e-002 +v 2.4989010e-002 3.8104580e-002 2.9429570e-002 +v 3.3584130e-002 3.8303930e-002 2.2928670e-002 +v 4.9015720e-002 4.4573630e-002 2.0659450e-002 +v -5.8225970e-002 6.6607310e-002 3.5050280e-002 +v -6.7330830e-002 3.3846440e-002 8.7266300e-003 +v -3.4692330e-002 3.3828710e-002 1.2438580e-002 +v -2.9803200e-002 3.4287000e-002 1.6353100e-002 +v 1.7023800e-003 3.6310890e-002 2.1179600e-002 +v 4.5137020e-002 4.4625440e-002 2.5516510e-002 +v -6.8876490e-002 1.1022176e-001 3.9004630e-002 +v -5.7680560e-002 3.3622690e-002 1.4040310e-002 +v -5.3210500e-002 3.3585300e-002 1.3987000e-002 +v -3.5711600e-002 3.5891600e-002 1.5502900e-002 +v -2.8861500e-002 3.5396700e-002 1.7350000e-002 +v -2.6580500e-002 3.7742600e-002 1.5705300e-002 +v -1.0974400e-003 3.8147840e-002 2.0427010e-002 +v 3.5047710e-002 4.0973940e-002 2.6970390e-002 +v -6.9685460e-002 3.4478780e-002 9.7984300e-003 +v -5.4019000e-002 3.3309900e-002 1.5848000e-002 +v 4.4816800e-003 3.7117830e-002 2.4755300e-002 +v 6.6605500e-003 3.5204730e-002 2.4315930e-002 +v 8.3833000e-003 3.4748700e-002 2.4057310e-002 +v 3.8883100e-002 4.1032980e-002 2.4976570e-002 +v -2.6441900e-003 3.8727070e-002 2.5131260e-002 +v 3.2222300e-003 3.8708440e-002 2.5898750e-002 +v 9.0016500e-003 3.6890930e-002 2.8482190e-002 +v 1.3196980e-002 3.4835790e-002 3.1630980e-002 +v 2.2291600e-002 3.7053310e-002 3.3101020e-002 +v 2.8948390e-002 3.9160020e-002 2.7234810e-002 +v -8.7773470e-002 1.1181412e-001 3.7144310e-002 +v -1.7870490e-002 3.8203890e-002 2.0243220e-002 +v 1.0087420e-002 3.7047690e-002 3.0822500e-002 +v 4.2296550e-002 4.5435770e-002 2.9040920e-002 +v -8.4341340e-002 1.1388013e-001 4.6513480e-002 +v -7.3795710e-002 1.0895629e-001 3.9217250e-002 +v -5.1243340e-002 6.4239200e-002 3.4258040e-002 +v -6.1777390e-002 3.4017860e-002 1.6900580e-002 +v -3.6665100e-002 3.5304200e-002 2.3032000e-002 +v -1.4930180e-002 3.8643510e-002 2.9378330e-002 +v -8.0894520e-002 1.0967225e-001 3.7910230e-002 +v -8.9822620e-002 1.1387199e-001 3.2845310e-002 +v -6.9655510e-002 6.8728370e-002 3.1127880e-002 +v -7.8449800e-002 1.0988832e-001 4.2517920e-002 +v -7.5824140e-002 1.0794900e-001 3.7128750e-002 +v -5.5740630e-002 3.4128050e-002 2.6674360e-002 +v -3.8279600e-002 3.5429000e-002 2.4380600e-002 +v -3.5283340e-002 3.4179780e-002 2.2744860e-002 +v -2.5798070e-002 3.7865000e-002 1.9981460e-002 +v 6.9064300e-003 3.9004270e-002 2.9548510e-002 +v 1.5448990e-002 3.4852440e-002 3.6984890e-002 +v 1.9128230e-002 3.5640640e-002 3.6642280e-002 +v -6.3664970e-002 6.6047840e-002 3.1828080e-002 +v 3.9604800e-002 4.4939530e-002 2.9992360e-002 +v -8.0294310e-002 7.1702430e-002 1.5995300e-002 +v -5.4185430e-002 6.7322700e-002 3.6935610e-002 +v -7.3110210e-002 1.4847168e-001 -2.8748470e-002 +v -5.8999980e-002 7.3751550e-002 4.1197080e-002 +v -5.9520730e-002 6.1040260e-002 -2.3753800e-003 +v -6.2791800e-002 3.4596760e-002 2.3505640e-002 +v -4.1895500e-002 3.3668300e-002 2.6940000e-002 +v 8.9808200e-003 3.7639400e-002 3.3900800e-002 +v 8.5287800e-003 3.4888000e-002 3.6265100e-002 +v -8.9803890e-002 1.1498106e-001 4.2771650e-002 +v -6.5545420e-002 7.4430370e-002 3.9168070e-002 +v -6.4644190e-002 6.1723230e-002 2.2552000e-004 +v 5.2496900e-003 3.9507100e-002 3.3271200e-002 +v 2.0250320e-002 3.7033170e-002 3.9327190e-002 +v -6.7006400e-002 6.3292870e-002 -1.7493900e-003 +v -6.4479770e-002 6.0651470e-002 4.2343200e-003 +v -5.7219630e-002 5.7000470e-002 4.9175800e-003 +v -7.4362810e-002 7.2437050e-002 3.1430040e-002 +v -6.2019000e-002 3.4343180e-002 3.1883280e-002 +v -4.6870820e-002 3.4444130e-002 3.0513130e-002 +v -2.0814280e-002 3.8400960e-002 2.7868430e-002 +v 1.6439350e-002 3.5635110e-002 4.1281040e-002 +v -6.9087160e-002 1.1205014e-001 4.5320060e-002 +v -7.1811570e-002 1.4861318e-001 -3.4639490e-002 +v -6.9538770e-002 6.3074750e-002 3.5758200e-003 +v -8.4863890e-002 7.8392100e-002 1.6462010e-002 +v -9.1188780e-002 1.1588893e-001 2.4705540e-002 +v -8.8827760e-002 1.1359169e-001 2.3873640e-002 +v -7.1302830e-002 1.1325363e-001 4.9444530e-002 +v -5.4876950e-002 7.0282330e-002 3.8828200e-002 +v -7.7208880e-002 1.0715887e-001 3.4738290e-002 +v -6.1241780e-002 5.9007440e-002 8.0916600e-003 +v -6.5885650e-002 3.5025080e-002 2.9416520e-002 +v -5.7889430e-002 3.4419570e-002 3.6265760e-002 +v -5.1847710e-002 3.4470270e-002 3.4635180e-002 +v -3.4834600e-002 3.4721400e-002 3.4578200e-002 +v -3.0984700e-002 3.8191900e-002 3.2390100e-002 +v -4.9613100e-003 3.9364900e-002 3.6702200e-002 +v 1.2224170e-002 3.5177480e-002 4.2620580e-002 +v -7.4898220e-002 1.1458863e-001 5.0776480e-002 +v -8.0469100e-002 1.1357963e-001 4.6643440e-002 +v -7.4107560e-002 6.9586030e-002 2.7264400e-002 +v -7.9002620e-002 7.6339320e-002 2.9248090e-002 +v -6.5297080e-002 3.4778970e-002 3.3744340e-002 +v -3.3656400e-002 3.4344100e-002 3.6914100e-002 +v 4.9318500e-003 3.4814800e-002 4.3462110e-002 +v 1.1347440e-002 3.6213020e-002 4.4652280e-002 +v -6.0569260e-002 7.1154540e-002 3.8653760e-002 +v -8.8979470e-002 1.1450869e-001 2.8446030e-002 +v -6.8543520e-002 6.1090480e-002 1.0557760e-002 +v -8.2710960e-002 1.1648975e-001 4.8518530e-002 +v -4.1913210e-002 3.4467720e-002 3.3200040e-002 +v -1.1289800e-002 3.9529200e-002 3.8844100e-002 +v -2.8261900e-003 3.4885340e-002 4.5611410e-002 +v -6.4561210e-002 5.9484140e-002 1.3061680e-002 +v -5.8581440e-002 5.7801460e-002 1.3429540e-002 +v -2.3320000e-002 3.9169500e-002 3.8473300e-002 +v -1.8159900e-002 3.9322300e-002 3.9402900e-002 +v -1.6471400e-002 3.4812800e-002 4.3684700e-002 +v 3.2906600e-003 3.5833470e-002 4.6024610e-002 +v -8.5229630e-002 1.1200712e-001 3.0416940e-002 +v -8.5644730e-002 1.1131719e-001 3.4234780e-002 +v -7.4530360e-002 6.6680690e-002 4.6953300e-003 +v -7.1112970e-002 6.2751470e-002 8.7995500e-003 +v -6.1149380e-002 5.8834410e-002 1.6539440e-002 +v -4.6912270e-002 3.4627180e-002 3.9739710e-002 +v -4.0760350e-002 3.4668230e-002 4.0492530e-002 +v -2.6323100e-002 3.4658000e-002 4.3473500e-002 +v -3.1836600e-003 3.6229910e-002 4.7873100e-002 +v -7.9940490e-002 1.0916678e-001 3.4119800e-002 +v -5.9712170e-002 6.3165280e-002 2.8789180e-002 +v -5.1176600e-002 6.8061880e-002 3.7398330e-002 +v -5.0126580e-002 7.0933150e-002 3.9481010e-002 +v -7.2790130e-002 6.4399880e-002 1.5205950e-002 +v -6.8511230e-002 6.1214650e-002 1.5354080e-002 +v -3.9343210e-002 3.5440180e-002 4.2492560e-002 +v -8.1305900e-003 3.5008350e-002 4.7502400e-002 +v -6.6080670e-002 7.0202740e-002 3.5552860e-002 +v -6.8602600e-002 1.4992277e-001 -4.0051350e-002 +v -7.1722100e-002 6.7023040e-002 2.4959750e-002 +v -7.5115010e-002 6.6557040e-002 1.0244090e-002 +v -6.5146650e-002 3.5945650e-002 3.9775080e-002 +v -3.6898600e-002 3.5924640e-002 4.4794170e-002 +v -9.4780400e-003 3.5977600e-002 4.9434210e-002 +v -8.5175960e-002 1.1706809e-001 4.8139420e-002 +v -6.3366400e-002 6.2790260e-002 2.5647610e-002 +v -6.6633330e-002 6.1001700e-002 1.8101240e-002 +v -5.8167590e-002 5.9985190e-002 2.2606060e-002 +v -6.4212210e-002 3.4992560e-002 3.9401920e-002 +v -5.3425790e-002 3.4560020e-002 4.2782420e-002 +v -1.8031490e-002 3.4859970e-002 4.9264760e-002 +v -1.1440410e-002 3.7640770e-002 5.0275730e-002 +v -7.5165320e-002 1.1154286e-001 4.6707180e-002 +v -7.7168390e-002 6.9826450e-002 5.0605600e-003 +v -7.2801360e-002 6.4382590e-002 1.2089080e-002 +v -7.8022000e-002 7.0995160e-002 2.1322150e-002 +v -6.1263370e-002 3.4690410e-002 4.1994900e-002 +v -5.4403750e-002 3.5007310e-002 4.4874590e-002 +v -4.5754280e-002 3.5206980e-002 4.3518120e-002 +v -3.3832440e-002 3.5168820e-002 4.6957890e-002 +v -2.8657630e-002 3.5083380e-002 5.0549440e-002 +v -1.5306440e-002 3.5246410e-002 5.0133810e-002 +v -6.5283650e-002 1.5592447e-001 -4.9865930e-002 +v -6.6467860e-002 1.4871539e-001 -3.1579300e-002 +v -6.2095980e-002 1.6388324e-001 -5.8385930e-002 +v -6.3274890e-002 1.5245731e-001 -3.2221730e-002 +v -4.3755720e-002 1.4773408e-001 -2.1433200e-003 +v -6.5696940e-002 1.4561631e-001 -1.8974710e-002 +v -6.6713650e-002 1.5358824e-001 -4.9097100e-002 +v -1.0482810e-002 1.6668287e-001 -2.1746090e-002 +v -6.2744510e-002 1.6397531e-001 -5.9398280e-002 +v -7.0413230e-002 1.4129200e-001 -8.4590800e-003 +v -6.1530380e-002 1.4037628e-001 -6.2734700e-003 +v -1.1452460e-002 1.7220633e-001 -2.6844980e-002 +v -6.3731140e-002 1.6577037e-001 -6.0103610e-002 +v -2.8218820e-002 1.5758144e-001 -1.0999490e-002 +v -1.8471270e-002 1.5967716e-001 -1.1169510e-002 +v -6.6700710e-002 1.5236775e-001 -4.5266390e-002 +v -4.9896410e-002 1.4670859e-001 -1.8614200e-003 +v -3.1449640e-002 1.5460463e-001 -7.6802300e-003 +v -6.7447660e-002 1.5507675e-001 -5.1594250e-002 +v -1.0906650e-002 1.7649301e-001 -2.9246300e-002 +v -7.2083600e-002 1.4965550e-001 -3.9265860e-002 +v -6.4230830e-002 1.4877806e-001 -2.5899710e-002 +v -6.3056640e-002 1.4341650e-001 -7.4907700e-003 +v -5.3043350e-002 1.4092550e-001 -4.7408000e-004 +v -3.9269410e-002 1.5205232e-001 -6.6203800e-003 +v -6.4796930e-002 1.5210615e-001 -3.6185520e-002 +v -6.4400320e-002 1.5834400e-001 -5.4256370e-002 +v -6.6178120e-002 1.4218350e-001 -9.3766300e-003 +v -6.7751430e-002 1.4605207e-001 -2.3333300e-002 +v -6.4731580e-002 1.5410067e-001 -4.0464820e-002 +v -2.4265590e-002 1.5687690e-001 -7.8509300e-003 +v -1.5723180e-002 1.6312344e-001 -1.6396570e-002 +v -7.0887660e-002 1.4404618e-001 -1.4908480e-002 +v -4.4341830e-002 1.5113809e-001 -5.6859800e-003 +v -6.2896810e-002 1.4694778e-001 -1.3098620e-002 +v -6.3755400e-002 1.4428875e-001 -1.1395730e-002 +v -6.8214560e-002 1.4390932e-001 -1.4984170e-002 +v -5.0271440e-002 1.4336563e-001 1.5153000e-003 +v -2.8535590e-002 1.6208479e-001 -1.4786030e-002 +v -6.5810700e-002 1.4359119e-001 -1.2585380e-002 +v -5.6179200e-002 1.3774406e-001 -4.0674300e-003 +v -6.8866880e-002 1.4723338e-001 -2.8739870e-002 +v -6.0965420e-002 1.7002113e-001 -6.0839390e-002 +v -1.3895490e-002 1.6787168e-001 -2.1897230e-002 +v -6.9413000e-002 1.5121847e-001 -4.4538540e-002 +v -5.5039800e-002 5.7309700e-002 1.6990900e-002 +f 1069 1647 1578 +f 1058 909 939 +f 421 1176 238 +f 1055 1101 1042 +f 238 1059 1126 +f 1254 30 1261 +f 1065 1071 1 +f 1037 1130 1120 +f 1570 2381 1585 +f 2434 2502 2473 +f 1632 1654 1646 +f 1144 1166 669 +f 1202 1440 305 +f 1071 1090 1 +f 1555 1570 1584 +f 1184 1174 404 +f 65 432 12 +f 1032 1085 574 +f 1789 2207 2223 +f 1154 1118 1184 +f 1141 1086 1154 +f 99 1117 342 +f 404 1174 419 +f 489 2000 1998 +f 1118 1174 1184 +f 1196 403 136 +f 1495 717 1490 +f 1804 402 1207 +f 2272 1398 891 +f 1100 1002 804 +f 1596 1595 2381 +f 208 420 1207 +f 402 208 1207 +f 1455 1935 1925 +f 1176 1059 238 +f 1150 1040 348 +f 1957 1537 2051 +f 1124 1189 939 +f 1804 1207 1823 +f 1381 1300 1109 +f 383 384 1182 +f 1085 1086 1141 +f 1040 1046 132 +f 220 1495 1188 +f 420 261 1207 +f 261 420 1065 +f 1055 1133 1101 +f 1054 421 403 +f 182 1109 2 +f 1181 1207 320 +f 545 1570 1561 +f 35 342 432 +f 1024 574 1141 +f 432 342 12 +f 1489 1081 1547 +f 1181 320 1805 +f 1516 1683 1507 +f 357 1117 1047 +f 1561 1570 1555 +f 1090 1196 1206 +f 1047 1203 1051 +f 1165 202 1121 +f 1099 341 301 +f 1174 240 419 +f 922 921 833 +f 1121 1080 385 +f 815 21 1183 +f 35 99 342 +f 1083 398 262 +f 106 94 1317 +f 94 292 1317 +f 292 95 1317 +f 940 1039 1033 +f 1300 1306 433 +f 21 212 471 +f 1120 1131 1037 +f 833 921 688 +f 1117 357 342 +f 106 271 94 +f 386 227 1375 +f 1130 1044 1053 +f 419 240 219 +f 1255 1244 32 +f 1557 1081 1489 +f 2062 2120 2109 +f 2034 2110 430 +f 23 315 1111 +f 291 94 271 +f 291 292 94 +f 50 386 95 +f 964 734 665 +f 1616 1585 1611 +f 445 1084 402 +f 574 1085 1141 +f 1654 341 1653 +f 220 1188 1640 +f 342 69 12 +f 417 261 328 +f 292 50 95 +f 204 227 386 +f 50 204 386 +f 1276 1471 1311 +f 1206 1196 136 +f 1033 1055 1042 +f 1037 1044 1130 +f 1180 320 417 +f 1121 202 1080 +f 325 203 271 +f 291 76 292 +f 292 237 50 +f 2159 1696 1767 +f 583 929 850 +f 1584 1585 1616 +f 1495 1490 1188 +f 1557 1489 1660 +f 1078 1069 1494 +f 1972 1992 1971 +f 183 1226 2000 +f 325 429 203 +f 292 76 237 +f 1152 227 1143 +f 1488 1412 1489 +f 1638 1646 1653 +f 1947 1869 2468 +f 203 306 291 +f 306 76 291 +f 237 248 50 +f 204 1143 227 +f 2395 14 429 +f 1502 881 2500 +f 1 1090 202 +f 1652 1653 1099 +f 2117 1863 2496 +f 50 248 204 +f 160 792 994 +f 884 888 857 +f 544 2117 2496 +f 1090 1206 202 +f 2463 879 2492 +f 429 306 203 +f 498 188 418 +f 865 884 857 +f 994 998 1014 +f 884 897 888 +f 1795 948 1802 +f 208 1035 1071 +f 1065 1 1066 +f 377 435 1377 +f 304 429 14 +f 304 306 429 +f 73 60 74 +f 248 592 204 +f 846 2264 829 +f 897 912 906 +f 1004 991 992 +f 1422 1421 1233 +f 980 10 303 +f 1058 922 909 +f 2436 2449 2418 +f 394 435 377 +f 435 475 446 +f 475 474 446 +f 336 337 361 +f 338 235 372 +f 624 148 129 +f 812 306 596 +f 1726 992 1019 +f 945 1514 1511 +f 1069 1627 1628 +f 1812 1823 1181 +f 1165 1121 169 +f 447 475 435 +f 2487 2458 901 +f 42 59 46 +f 401 7 187 +f 1010 970 797 +f 1513 220 1640 +f 2474 2491 2462 +f 594 307 1014 +f 398 1513 1640 +f 307 594 1026 +f 545 2381 1570 +f 403 421 238 +f 445 402 127 +f 1611 1631 1616 +f 1805 1180 1148 +f 394 447 435 +f 2341 2413 2376 +f 75 74 60 +f 541 47 42 +f 47 59 42 +f 541 42 28 +f 917 931 1103 +f 897 906 883 +f 2484 2068 779 +f 888 883 857 +f 261 1065 328 +f 363 1307 349 +f 377 363 394 +f 444 747 464 +f 323 338 362 +f 92 116 74 +f 592 634 97 +f 982 1027 1004 +f 1020 982 1004 +f 1084 1054 1035 +f 208 402 1084 +f 421 1119 1176 +f 1207 1181 1823 +f 1179 1187 1160 +f 263 296 1343 +f 1298 296 1307 +f 1307 296 349 +f 405 363 349 +f 405 394 363 +f 405 447 394 +f 362 372 384 +f 338 372 362 +f 983 1004 987 +f 122 134 139 +f 415 440 414 +f 75 92 74 +f 226 186 246 +f 796 787 700 +f 1119 1059 1176 +f 122 114 91 +f 624 129 116 +f 641 558 631 +f 1311 1318 1487 +f 100 1162 1170 +f 1653 341 1099 +f 1316 1983 273 +f 263 277 296 +f 296 358 349 +f 436 447 405 +f 109 554 570 +f 504 1385 2501 +f 115 122 91 +f 2068 2460 779 +f 43 777 163 +f 378 405 349 +f 358 378 349 +f 448 447 436 +f 448 476 447 +f 78 77 108 +f 75 60 47 +f 1764 2481 1795 +f 717 714 1512 +f 1490 717 1501 +f 238 1126 168 +f 1878 1866 826 +f 2025 2360 2367 +f 251 278 263 +f 278 277 263 +f 277 318 296 +f 296 318 358 +f 318 350 358 +f 378 436 405 +f 384 372 1182 +f 454 440 415 +f 987 1004 992 +f 493 476 448 +f 323 788 338 +f 403 238 136 +f 1565 1503 1474 +f 297 277 278 +f 297 318 277 +f 358 350 378 +f 378 388 436 +f 476 493 500 +f 73 105 60 +f 323 337 312 +f 953 1573 2358 +f 142 161 119 +f 454 443 440 +f 1862 1871 1405 +f 297 319 318 +f 560 47 541 +f 170 1323 111 +f 357 1047 1050 +f 1119 98 1059 +f 1838 1877 1900 +f 2359 230 251 +f 350 364 378 +f 449 448 436 +f 449 493 448 +f 185 186 226 +f 443 469 479 +f 874 165 2480 +f 463 444 464 +f 64 105 91 +f 1182 440 1129 +f 1958 1651 2502 +f 1238 2034 191 +f 251 279 278 +f 278 279 297 +f 364 388 378 +f 483 493 449 +f 134 148 139 +f 244 268 259 +f 910 942 930 +f 105 115 91 +f 24 30 18 +f 1132 487 1059 +f 1869 1947 2021 +f 2497 2494 2463 +f 2359 2385 230 +f 230 280 251 +f 251 280 279 +f 279 308 297 +f 297 308 319 +f 319 364 318 +f 364 350 318 +f 388 395 436 +f 436 395 449 +f 493 472 500 +f 122 129 134 +f 125 142 124 +f 373 400 393 +f 24 557 30 +f 2264 2278 2251 +f 1261 30 1269 +f 1730 1862 1877 +f 252 280 230 +f 343 364 319 +f 364 343 388 +f 63 64 91 +f 399 393 416 +f 416 444 463 +f 162 189 142 +f 768 373 326 +f 189 661 177 +f 189 199 661 +f 847 887 864 +f 533 747 444 +f 1744 1022 1418 +f 1170 524 729 +f 121 1342 128 +f 1236 1244 26 +f 280 281 279 +f 281 308 279 +f 343 319 308 +f 343 365 388 +f 388 365 395 +f 365 406 395 +f 406 449 395 +f 483 477 493 +f 477 491 472 +f 493 477 472 +f 78 109 77 +f 166 174 196 +f 481 150 814 +f 63 59 64 +f 326 373 393 +f 643 260 43 +f 230 253 252 +f 449 441 483 +f 441 477 483 +f 415 416 463 +f 226 246 245 +f 464 470 454 +f 323 362 337 +f 52 37 1283 +f 253 281 252 +f 281 280 252 +f 309 308 281 +f 330 343 308 +f 366 365 343 +f 441 449 406 +f 464 814 15 +f 883 906 887 +f 337 362 371 +f 479 498 290 +f 247 746 1003 +f 25 37 557 +f 640 930 669 +f 2486 2499 2459 +f 309 330 308 +f 343 330 366 +f 441 437 477 +f 290 498 418 +f 124 119 108 +f 77 124 108 +f 589 125 109 +f 570 589 109 +f 125 162 142 +f 1045 433 1034 +f 1207 261 320 +f 2004 2474 2495 +f 1215 1228 2285 +f 365 396 406 +f 396 422 406 +f 422 437 441 +f 406 422 441 +f 59 47 60 +f 51 78 66 +f 361 371 383 +f 196 215 214 +f 463 454 415 +f 27 41 535 +f 53 1283 37 +f 84 1299 1283 +f 1805 320 1180 +f 254 253 222 +f 254 281 253 +f 309 366 330 +f 396 365 366 +f 456 477 437 +f 484 491 477 +f 2480 2485 2493 +f 418 188 187 +f 53 85 1283 +f 85 84 1283 +f 420 1071 1065 +f 264 281 254 +f 298 309 281 +f 368 366 367 +f 368 396 366 +f 1639 1564 1139 +f 560 48 47 +f 82 471 212 +f 25 38 37 +f 202 1206 1080 +f 264 298 281 +f 298 331 309 +f 309 331 366 +f 331 367 366 +f 396 368 422 +f 422 456 437 +f 491 1192 313 +f 1699 2064 1710 +f 462 443 479 +f 371 362 384 +f 2502 2476 2464 +f 371 384 383 +f 21 732 212 +f 1571 1629 1627 +f 38 39 53 +f 37 38 53 +f 39 85 53 +f 1173 1184 404 +f 1006 2142 1674 +f 201 255 254 +f 255 264 254 +f 368 407 422 +f 450 456 422 +f 450 484 456 +f 456 484 477 +f 314 1192 491 +f 2027 2501 2489 +f 2475 2471 2488 +f 551 492 732 +f 464 481 814 +f 1081 1494 1547 +f 201 231 255 +f 407 450 422 +f 484 494 491 +f 494 327 491 +f 327 314 491 +f 876 797 995 +f 847 856 829 +f 125 143 162 +f 134 129 148 +f 1564 1571 1627 +f 417 320 261 +f 328 1065 1066 +f 170 156 201 +f 156 231 201 +f 231 282 255 +f 282 264 255 +f 450 485 484 +f 484 485 494 +f 2463 2486 2479 +f 159 185 167 +f 492 68 212 +f 732 492 212 +f 68 82 212 +f 1311 1471 1296 +f 101 156 111 +f 332 264 282 +f 332 298 264 +f 332 331 298 +f 331 332 367 +f 407 423 450 +f 450 423 485 +f 804 1002 1443 +f 2484 779 946 +f 689 443 462 +f 440 689 1129 +f 166 167 174 +f 38 31 39 +f 112 145 101 +f 101 145 156 +f 156 256 231 +f 332 423 368 +f 367 332 368 +f 368 423 407 +f 946 779 920 +f 1432 1261 1449 +f 461 478 453 +f 464 15 470 +f 31 54 39 +f 39 54 85 +f 86 101 85 +f 145 210 156 +f 282 283 332 +f 283 369 332 +f 369 423 332 +f 423 408 485 +f 854 876 965 +f 78 108 66 +f 440 443 689 +f 374 2465 961 +f 929 519 979 +f 54 86 85 +f 156 241 256 +f 256 282 231 +f 256 283 282 +f 389 423 369 +f 389 408 423 +f 408 457 485 +f 457 49 485 +f 485 49 494 +f 494 135 327 +f 175 83 314 +f 1167 1140 1483 +f 196 174 215 +f 697 16 68 +f 1038 82 16 +f 140 117 141 +f 1654 1653 1646 +f 1234 54 31 +f 86 112 101 +f 210 241 156 +f 923 917 911 +f 697 34 16 +f 145 193 210 +f 256 265 283 +f 265 310 283 +f 283 310 369 +f 310 344 369 +f 344 370 369 +f 370 389 369 +f 409 408 389 +f 409 466 408 +f 466 457 408 +f 466 49 457 +f 49 135 494 +f 174 225 215 +f 1014 766 602 +f 826 2220 2215 +f 1078 1494 1081 +f 1273 70 86 +f 120 112 86 +f 146 145 112 +f 146 193 145 +f 265 256 241 +f 223 265 241 +f 486 49 466 +f 175 327 135 +f 105 122 115 +f 480 15 681 +f 225 234 215 +f 731 34 697 +f 86 54 1273 +f 70 120 86 +f 193 241 210 +f 299 310 265 +f 310 333 344 +f 344 351 370 +f 424 466 409 +f 135 49 175 +f 214 215 234 +f 48 75 47 +f 34 9 1038 +f 16 34 1038 +f 203 291 271 +f 9 558 754 +f 1195 397 1120 +f 120 146 112 +f 146 194 193 +f 266 265 223 +f 266 299 265 +f 299 333 310 +f 333 351 344 +f 382 383 392 +f 399 416 415 +f 266 333 299 +f 351 352 370 +f 424 486 466 +f 487 175 49 +f 7 117 187 +f 1182 414 440 +f 41 42 46 +f 290 289 497 +f 2502 2464 2473 +f 372 399 414 +f 1570 1585 1584 +f 1066 1 1165 +f 1 202 1165 +f 120 70 102 +f 157 146 120 +f 194 223 193 +f 223 241 193 +f 352 379 370 +f 370 379 389 +f 410 409 389 +f 2478 1409 1958 +f 806 945 1002 +f 157 194 146 +f 267 266 223 +f 267 333 266 +f 379 410 389 +f 410 438 409 +f 438 424 409 +f 190 205 143 +f 337 371 361 +f 2215 830 826 +f 1631 1646 1638 +f 102 157 120 +f 157 195 194 +f 195 223 194 +f 195 211 223 +f 223 211 267 +f 267 300 333 +f 300 334 351 +f 333 300 351 +f 351 334 352 +f 410 411 438 +f 438 486 424 +f 487 49 486 +f 875 594 989 +f 108 581 66 +f 225 245 244 +f 312 336 335 +f 151 754 107 +f 274 1386 300 +f 352 334 379 +f 923 1729 1096 +f 244 245 268 +f 463 464 454 +f 414 399 415 +f 15 480 470 +f 1647 1069 1078 +f 909 922 833 +f 387 417 328 +f 133 157 102 +f 1314 133 102 +f 133 195 157 +f 1148 1179 1160 +f 1046 1167 182 +f 379 411 410 +f 792 339 229 +f 391 7 668 +f 185 226 174 +f 461 290 497 +f 2027 504 2501 +f 1196 1054 403 +f 728 1019 752 +f 2459 2483 2461 +f 1291 1264 55 +f 133 1356 195 +f 195 1356 211 +f 412 438 411 +f 4 486 438 +f 458 4 438 +f 4 487 486 +f 1720 1572 1771 +f 245 275 268 +f 1869 2021 2059 +f 235 399 372 +f 64 60 105 +f 836 2492 879 +f 1315 133 1314 +f 1331 1382 1356 +f 1310 926 1128 +f 7 1121 117 +f 119 161 611 +f 380 379 334 +f 379 380 411 +f 467 4 458 +f 495 487 4 +f 495 1126 487 +f 416 400 533 +f 479 469 498 +f 74 116 73 +f 478 461 497 +f 393 400 416 +f 61 1291 55 +f 505 1999 2474 +f 1999 2491 2474 +f 199 189 36 +f 1164 1165 169 +f 1179 387 249 +f 390 411 380 +f 411 390 412 +f 458 438 412 +f 495 168 1126 +f 480 469 470 +f 116 122 105 +f 418 187 140 +f 185 174 167 +f 166 148 167 +f 470 469 443 +f 40 55 32 +f 61 71 1291 +f 71 103 1291 +f 1184 1173 1154 +f 634 514 97 +f 425 458 412 +f 917 923 931 +f 2472 2489 853 +f 754 641 567 +f 44 567 1163 +f 454 470 443 +f 40 32 1249 +f 33 40 1249 +f 56 55 40 +f 56 61 55 +f 451 1265 439 +f 1180 417 1179 +f 1099 301 1077 +f 1189 1058 939 +f 1059 221 1132 +f 598 1074 1075 +f 412 426 425 +f 650 186 185 +f 234 244 259 +f 226 245 225 +f 1033 1042 1030 +f 2492 836 247 +f 7 169 1121 +f 1462 1322 1482 +f 425 467 458 +f 496 4 467 +f 1751 2468 2480 +f 290 418 140 +f 326 789 762 +f 142 177 161 +f 165 1751 2480 +f 87 103 71 +f 103 87 104 +f 1180 1179 1148 +f 417 387 1179 +f 2081 2060 2031 +f 1154 1173 1141 +f 181 131 197 +f 442 425 426 +f 614 144 143 +f 876 1010 797 +f 40 45 56 +f 56 45 61 +f 87 71 61 +f 1563 1437 1590 +f 1121 385 117 +f 1148 1160 1137 +f 1449 1459 1439 +f 1028 2462 929 +f 442 459 425 +f 459 467 425 +f 168 495 4 +f 496 168 4 +f 1763 1403 1444 +f 140 187 117 +f 244 234 225 +f 246 740 269 +f 372 414 1182 +f 40 547 45 +f 45 62 61 +f 62 87 61 +f 87 88 104 +f 1084 517 1054 +f 387 328 1064 +f 2467 2497 2485 +f 286 1363 302 +f 205 189 162 +f 290 140 289 +f 214 234 224 +f 393 399 809 +f 315 1131 397 +f 302 321 353 +f 1164 169 391 +f 427 459 442 +f 217 496 467 +f 217 168 496 +f 978 969 2074 +f 361 383 382 +f 269 276 245 +f 1440 11 305 +f 62 88 87 +f 328 1066 1064 +f 1066 1165 1164 +f 242 287 302 +f 1363 242 302 +f 287 321 302 +f 1179 249 1187 +f 983 1020 1004 +f 464 747 481 +f 788 323 276 +f 269 245 246 +f 88 89 1325 +f 171 172 242 +f 360 353 321 +f 360 1354 353 +f 1057 1064 1164 +f 2184 2188 2183 +f 460 459 451 +f 460 467 459 +f 149 168 217 +f 149 136 168 +f 116 129 122 +f 109 124 77 +f 159 167 148 +f 28 42 41 +f 57 88 62 +f 45 57 62 +f 1336 1325 89 +f 89 72 1336 +f 147 172 171 +f 172 258 242 +f 258 257 242 +f 257 287 242 +f 257 321 287 +f 345 360 321 +f 360 381 1354 +f 1069 938 1655 +f 387 473 249 +f 270 217 467 +f 130 136 149 +f 851 847 829 +f 983 987 975 +f 189 177 142 +f 88 72 89 +f 184 258 172 +f 257 288 321 +f 1265 451 459 +f 270 149 217 +f 226 225 174 +f 27 28 41 +f 109 125 124 +f 547 57 45 +f 57 58 88 +f 88 58 72 +f 2476 2484 2458 +f 147 184 172 +f 184 213 258 +f 258 243 257 +f 243 288 257 +f 345 321 288 +f 391 169 7 +f 468 460 451 +f 468 488 460 +f 270 467 460 +f 488 270 460 +f 1206 136 130 +f 481 793 150 +f 143 205 162 +f 142 119 124 +f 58 90 72 +f 90 128 72 +f 147 173 184 +f 173 213 184 +f 213 233 258 +f 258 233 243 +f 354 360 345 +f 354 381 360 +f 1026 991 307 +f 268 312 259 +f 1206 130 1080 +f 116 105 73 +f 139 148 166 +f 275 312 268 +f 188 401 187 +f 2479 2459 2461 +f 58 63 90 +f 1064 1066 1164 +f 1064 473 387 +f 288 311 345 +f 311 354 345 +f 996 994 307 +f 452 468 439 +f 452 478 468 +f 478 488 468 +f 141 130 149 +f 1564 1639 1563 +f 547 41 57 +f 2081 2107 2060 +f 382 381 354 +f 497 270 488 +f 289 149 270 +f 289 141 149 +f 114 122 139 +f 59 60 64 +f 275 323 312 +f 401 668 7 +f 41 46 57 +f 57 46 58 +f 1459 1345 1269 +f 1342 121 158 +f 166 173 158 +f 213 224 233 +f 233 259 243 +f 243 322 288 +f 322 311 288 +f 453 478 452 +f 497 289 270 +f 912 911 906 +f 276 323 275 +f 276 275 245 +f 46 63 58 +f 90 121 128 +f 173 214 213 +f 213 214 224 +f 259 322 243 +f 336 311 322 +f 336 354 311 +f 361 382 354 +f 1043 439 1290 +f 497 488 478 +f 385 130 141 +f 385 1080 130 +f 144 190 143 +f 535 41 547 +f 121 166 158 +f 335 336 322 +f 354 336 361 +f 2004 2481 1764 +f 698 439 1043 +f 289 140 141 +f 923 1096 931 +f 650 185 159 +f 46 59 63 +f 63 91 90 +f 90 114 121 +f 121 139 166 +f 173 196 214 +f 259 335 322 +f 2478 2502 2434 +f 312 337 336 +f 90 91 114 +f 114 139 121 +f 166 196 173 +f 224 234 233 +f 234 259 233 +f 259 312 335 +f 1124 916 1189 +f 542 541 530 +f 462 479 290 +f 269 783 276 +f 813 567 641 +f 276 783 788 +f 82 1038 1333 +f 816 701 703 +f 672 137 603 +f 625 635 624 +f 2457 2439 1973 +f 767 533 529 +f 2468 1869 2480 +f 662 190 639 +f 711 720 719 +f 630 639 614 +f 161 654 638 +f 781 991 982 +f 1227 31 516 +f 648 639 630 +f 630 614 590 +f 2098 544 1899 +f 578 579 586 +f 697 492 551 +f 529 533 400 +f 869 859 870 +f 1732 924 914 +f 1004 1027 991 +f 801 591 603 +f 636 676 651 +f 876 949 965 +f 2207 1789 1859 +f 76 739 237 +f 188 681 15 +f 578 604 599 +f 797 616 995 +f 510 2035 1365 +f 76 812 617 +f 617 739 76 +f 1468 93 1765 +f 596 546 812 +f 1457 1305 1477 +f 760 197 150 +f 671 773 765 +f 586 609 604 +f 591 700 632 +f 476 2312 474 +f 2084 2027 2489 +f 582 590 571 +f 1555 2449 1996 +f 674 546 596 +f 812 655 617 +f 161 177 661 +f 599 604 636 +f 700 787 576 +f 776 675 572 +f 776 674 675 +f 617 634 739 +f 591 632 649 +f 612 546 674 +f 617 655 634 +f 728 752 706 +f 571 2311 2305 +f 775 674 776 +f 775 612 674 +f 612 628 546 +f 546 628 812 +f 812 628 655 +f 620 630 615 +f 620 648 630 +f 667 653 646 +f 810 782 785 +f 150 197 814 +f 534 1517 2000 +f 702 572 2378 +f 748 776 572 +f 655 613 634 +f 911 917 905 +f 648 679 662 +f 727 771 713 +f 750 807 799 +f 639 190 144 +f 662 679 200 +f 702 748 572 +f 775 776 748 +f 628 718 655 +f 626 658 645 +f 791 778 790 +f 612 811 628 +f 613 514 634 +f 1380 1756 1673 +f 570 590 614 +f 720 741 719 +f 1074 795 835 +f 614 639 144 +f 612 775 811 +f 718 735 655 +f 655 735 613 +f 798 338 788 +f 636 652 676 +f 571 590 555 +f 528 730 687 +f 690 702 2312 +f 476 690 2312 +f 811 718 628 +f 721 778 727 +f 748 702 690 +f 735 686 613 +f 1517 2002 2127 +f 654 685 667 +f 569 588 606 +f 513 531 538 +f 538 549 548 +f 549 553 548 +f 550 588 549 +f 1903 869 870 +f 691 775 748 +f 691 600 775 +f 600 811 775 +f 811 563 718 +f 563 736 718 +f 718 736 735 +f 736 647 735 +f 735 647 686 +f 686 745 613 +f 745 514 613 +f 569 606 605 +f 654 667 638 +f 851 857 847 +f 588 569 549 +f 690 691 748 +f 680 514 745 +f 2127 2002 2094 +f 747 701 481 +f 400 373 529 +f 600 536 811 +f 536 563 811 +f 1306 227 1152 +f 522 24 18 +f 523 24 522 +f 865 857 851 +f 2031 2060 1540 +f 767 701 747 +f 618 652 609 +f 652 636 609 +f 573 22 710 +f 642 699 730 +f 1522 1518 2476 +f 500 629 691 +f 690 500 691 +f 691 629 600 +f 780 644 641 +f 579 578 561 +f 131 668 197 +f 197 668 814 +f 789 809 798 +f 622 760 150 +f 621 563 536 +f 673 745 686 +f 673 818 745 +f 818 680 745 +f 680 96 514 +f 2495 2462 1028 +f 1028 583 575 +f 663 794 664 +f 629 761 600 +f 761 757 600 +f 600 757 536 +f 621 696 563 +f 755 736 563 +f 696 755 563 +f 633 736 755 +f 633 647 736 +f 623 686 647 +f 633 623 647 +f 686 623 673 +f 819 680 818 +f 680 819 96 +f 1729 1677 1096 +f 2482 1899 2471 +f 537 536 757 +f 536 537 621 +f 673 819 818 +f 2428 222 230 +f 25 24 523 +f 25 557 24 +f 38 25 19 +f 710 22 272 +f 663 759 794 +f 1120 878 1195 +f 537 696 621 +f 696 633 755 +f 822 2215 2220 +f 97 96 1053 +f 750 784 743 +f 887 905 864 +f 768 784 373 +f 512 513 548 +f 573 664 22 +f 696 715 633 +f 673 521 819 +f 2454 2453 2445 +f 883 887 847 +f 306 812 76 +f 642 528 759 +f 798 809 235 +f 994 792 998 +f 587 626 586 +f 1900 1918 1937 +f 645 652 618 +f 537 786 696 +f 521 593 819 +f 515 19 523 +f 741 749 719 +f 789 326 809 +f 539 581 550 +f 657 777 723 +f 684 713 660 +f 692 712 720 +f 652 666 692 +f 507 761 629 +f 472 507 629 +f 507 757 761 +f 623 633 673 +f 724 521 673 +f 515 516 19 +f 304 675 674 +f 178 778 721 +f 947 1447 2358 +f 626 645 618 +f 586 626 618 +f 784 768 742 +f 753 537 757 +f 537 753 786 +f 724 981 521 +f 521 981 593 +f 979 559 850 +f 637 660 677 +f 787 631 576 +f 141 117 385 +f 809 399 235 +f 641 754 558 +f 542 553 561 +f 742 768 762 +f 444 416 533 +f 528 687 796 +f 813 598 566 +f 1490 1501 1557 +f 753 757 507 +f 786 715 696 +f 633 724 673 +f 2090 2062 2109 +f 646 653 660 +f 660 694 683 +f 677 660 683 +f 1872 839 838 +f 1224 18 30 +f 326 393 809 +f 799 529 373 +f 313 507 472 +f 715 774 633 +f 974 699 841 +f 703 820 816 +f 692 711 676 +f 1014 355 766 +f 875 752 1019 +f 627 646 660 +f 711 692 720 +f 652 692 676 +f 799 373 784 +f 813 566 567 +f 2462 2482 2475 +f 764 644 780 +f 1479 1924 1916 +f 753 738 786 +f 738 607 786 +f 786 607 715 +f 715 524 774 +f 633 774 724 +f 559 979 672 +f 758 798 783 +f 683 694 705 +f 820 703 562 +f 764 687 644 +f 744 743 725 +f 313 753 507 +f 607 524 715 +f 664 801 22 +f 646 627 610 +f 800 820 562 +f 750 769 807 +f 767 747 533 +f 578 586 604 +f 862 593 981 +f 688 2382 1083 +f 306 304 674 +f 738 584 607 +f 168 136 238 +f 773 552 765 +f 2473 2464 2458 +f 773 793 552 +f 626 619 658 +f 1007 1139 1013 +f 562 529 799 +f 744 750 743 +f 659 683 693 +f 677 683 659 +f 313 737 753 +f 753 737 738 +f 607 729 524 +f 27 518 28 +f 553 569 580 +f 657 163 777 +f 580 569 605 +f 789 798 758 +f 769 562 807 +f 820 671 816 +f 638 646 611 +f 1074 598 644 +f 750 799 784 +f 1931 907 898 +f 2483 2487 2461 +f 737 584 738 +f 1439 1438 1431 +f 2098 1213 544 +f 48 578 75 +f 796 631 787 +f 815 732 21 +f 581 588 550 +f 625 636 651 +f 778 1011 810 +f 693 705 725 +f 693 683 705 +f 236 1921 1966 +f 584 729 607 +f 2237 1866 2227 +f 530 541 28 +f 237 739 248 +f 512 530 28 +f 727 778 771 +f 684 727 713 +f 2237 2220 826 +f 542 561 560 +f 528 796 700 +f 808 785 671 +f 739 592 248 +f 895 905 896 +f 740 246 186 +f 272 137 979 +f 770 769 744 +f 712 742 720 +f 1213 2026 544 +f 1888 1235 2438 +f 555 554 2311 +f 737 313 1192 +f 1585 1612 1611 +f 695 721 685 +f 518 17 28 +f 769 770 562 +f 719 749 740 +f 648 669 679 +f 773 657 723 +f 606 637 619 +f 2072 2062 2042 +f 606 619 626 +f 549 569 553 +f 161 638 611 +f 910 917 942 +f 917 1103 942 +f 991 1026 992 +f 979 137 672 +f 785 163 657 +f 710 2488 2472 +f 611 581 119 +f 808 671 820 +f 1820 1900 1870 +f 759 700 591 +f 637 677 619 +f 2494 2490 2463 +f 671 765 816 +f 687 764 780 +f 1019 992 1026 +f 1726 1719 987 +f 713 771 694 +f 51 2355 78 +f 510 526 525 +f 525 526 1249 +f 526 33 1249 +f 2311 554 2335 +f 827 848 840 +f 603 591 649 +f 758 269 740 +f 1595 1612 1586 +f 1694 1048 1699 +f 682 740 186 +f 22 801 603 +f 555 570 554 +f 1053 110 97 +f 615 582 601 +f 814 668 188 +f 725 705 744 +f 528 700 759 +f 640 648 620 +f 703 701 562 +f 886 892 582 +f 631 731 576 +f 1087 1835 1747 +f 882 864 895 +f 956 950 1103 +f 1502 2500 2470 +f 205 190 200 +f 815 878 616 +f 616 878 995 +f 1183 878 815 +f 1601 1827 881 +f 527 535 526 +f 2184 2183 2175 +f 1142 1125 1133 +f 235 338 798 +f 160 339 792 +f 599 92 75 +f 598 1116 566 +f 631 558 731 +f 771 770 744 +f 730 528 642 +f 841 699 642 +f 668 401 188 +f 510 527 526 +f 749 758 740 +f 706 721 695 +f 694 726 705 +f 694 744 726 +f 906 911 905 +f 661 695 161 +f 708 815 616 +f 535 547 33 +f 794 759 591 +f 778 808 790 +f 269 758 783 +f 771 744 694 +f 800 808 820 +f 571 886 582 +f 854 948 1010 +f 906 905 887 +f 625 651 635 +f 2000 1226 534 +f 2140 1504 2016 +f 601 620 615 +f 620 601 640 +f 648 640 669 +f 698 452 439 +f 671 785 657 +f 1561 2356 545 +f 685 653 667 +f 685 727 684 +f 568 616 797 +f 708 732 815 +f 93 229 339 +f 865 851 839 +f 942 1103 950 +f 589 614 125 +f 606 610 627 +f 951 834 873 +f 92 599 625 +f 1878 830 1902 +f 2482 2098 1899 +f 568 708 616 +f 708 551 732 +f 2434 2487 2483 +f 160 964 665 +f 2316 2391 2309 +f 762 758 749 +f 570 614 589 +f 888 897 883 +f 2000 1517 1388 +f 685 721 727 +f 588 610 606 +f 653 685 684 +f 651 650 635 +f 760 1151 6 +f 793 622 150 +f 651 676 650 +f 744 769 750 +f 541 542 560 +f 476 500 690 +f 473 1064 1057 +f 561 578 560 +f 636 625 599 +f 876 995 949 +f 829 856 846 +f 682 704 740 +f 791 790 770 +f 2466 2500 2460 +f 579 587 586 +f 1352 1208 1095 +f 1684 1479 1916 +f 604 609 636 +f 751 721 706 +f 810 608 782 +f 672 603 649 +f 475 447 476 +f 794 591 801 +f 682 186 650 +f 808 800 790 +f 644 598 813 +f 704 719 740 +f 1011 608 810 +f 1192 584 737 +f 687 780 796 +f 2337 474 2312 +f 638 667 646 +f 706 1186 728 +f 733 575 568 +f 595 551 708 +f 595 540 551 +f 1308 501 1852 +f 665 339 160 +f 527 2447 535 +f 558 9 731 +f 723 793 773 +f 660 713 694 +f 693 725 666 +f 562 767 529 +f 550 538 531 +f 2267 2287 2233 +f 996 964 160 +f 2068 2470 2466 +f 704 711 719 +f 741 762 749 +f 605 606 626 +f 548 542 530 +f 995 878 709 +f 1898 1684 1916 +f 778 791 771 +f 782 163 785 +f 789 758 762 +f 857 883 847 +f 733 970 1028 +f 838 829 825 +f 2447 511 535 +f 22 603 137 +f 705 726 744 +f 605 587 580 +f 512 548 530 +f 743 784 742 +f 790 800 770 +f 778 810 808 +f 1014 998 355 +f 708 568 595 +f 656 697 551 +f 540 656 551 +f 143 125 614 +f 1000 1020 983 +f 778 178 1011 +f 676 704 682 +f 637 627 660 +f 606 627 637 +f 701 552 481 +f 808 810 785 +f 590 570 555 +f 716 595 568 +f 2355 2335 554 +f 912 1729 911 +f 1076 1456 1546 +f 697 68 492 +f 676 711 704 +f 839 851 838 +f 1028 575 733 +f 1020 844 982 +f 716 568 575 +f 844 781 982 +f 1238 2156 2034 +f 553 580 561 +f 580 579 561 +f 452 461 453 +f 560 578 48 +f 564 540 595 +f 632 656 540 +f 564 632 540 +f 75 578 599 +f 518 27 535 +f 511 518 535 +f 783 798 788 +f 642 759 663 +f 720 742 741 +f 605 626 587 +f 580 587 579 +f 725 712 666 +f 562 701 767 +f 1729 923 911 +f 712 743 742 +f 619 677 658 +f 161 695 654 +f 770 800 562 +f 2084 2489 2472 +f 575 559 716 +f 716 564 595 +f 654 695 685 +f 843 855 2064 +f 34 731 9 +f 527 510 1973 +f 723 622 793 +f 992 1726 987 +f 693 666 652 +f 2472 853 573 +f 624 159 148 +f 671 657 773 +f 681 188 498 +f 797 970 733 +f 565 656 632 +f 565 697 656 +f 565 731 697 +f 1949 951 920 +f 85 111 84 +f 662 200 190 +f 44 324 754 +f 33 547 40 +f 658 693 652 +f 658 652 645 +f 664 794 801 +f 666 712 692 +f 639 648 662 +f 611 646 610 +f 850 559 575 +f 1447 2490 1106 +f 1972 1955 1935 +f 582 615 590 +f 66 581 539 +f 780 641 631 +f 796 780 631 +f 1049 1192 83 +f 1348 13 1519 +f 799 807 562 +f 581 611 588 +f 687 795 644 +f 663 8 642 +f 1936 1972 1935 +f 650 676 682 +f 615 630 590 +f 730 795 687 +f 742 762 741 +f 548 553 542 +f 1048 1692 1074 +f 658 659 693 +f 37 52 30 +f 611 610 588 +f 649 632 564 +f 565 576 731 +f 2138 922 1058 +f 1204 854 965 +f 725 743 712 +f 644 813 641 +f 660 653 684 +f 771 791 770 +f 644 795 1074 +f 469 480 681 +f 559 672 564 +f 716 559 564 +f 672 649 564 +f 2161 1378 2171 +f 474 475 476 +f 816 765 701 +f 765 552 701 +f 513 538 548 +f 754 324 107 +f 609 586 618 +f 25 523 19 +f 677 659 658 +f 689 452 698 +f 1334 1115 1353 +f 700 565 632 +f 700 576 565 +f 481 552 793 +f 763 901 2458 +f 550 549 538 +f 781 964 996 +f 1596 1634 1595 +f 198 916 1124 +f 198 1124 341 +f 842 973 1025 +f 842 1025 836 +f 1009 1024 934 +f 573 710 2472 +f 1100 971 1002 +f 1501 1081 1557 +f 1225 1219 955 +f 413 2138 284 +f 955 1630 522 +f 341 1124 301 +f 2333 2376 2350 +f 1107 218 284 +f 398 925 1513 +f 1513 1442 1495 +f 1935 1455 1744 +f 1723 1935 1744 +f 825 1872 838 +f 1495 1442 1496 +f 963 1024 1009 +f 1511 1514 966 +f 1775 1729 912 +f 688 262 1067 +f 714 1007 1512 +f 919 1732 914 +f 2319 2331 2304 +f 2400 2407 2391 +f 1674 2164 1780 +f 843 927 899 +f 1660 988 1188 +f 1067 262 1640 +f 1381 1109 1483 +f 1437 1381 1483 +f 2495 1010 948 +f 1514 1289 1313 +f 899 374 961 +f 1438 1430 1422 +f 1634 1095 1632 +f 2487 973 2461 +f 1003 499 874 +f 849 848 827 +f 1430 1462 1453 +f 2496 2084 2471 +f 909 10 980 +f 730 927 835 +f 2031 1540 1536 +f 831 849 2178 +f 881 834 951 +f 1841 1722 1803 +f 1005 670 1020 +f 1021 670 1005 +f 1869 2059 2467 +f 903 902 1939 +f 2476 2502 1651 +f 853 8 573 +f 1850 831 2178 +f 934 746 247 +f 934 65 746 +f 301 285 1077 +f 968 944 977 +f 970 2495 1028 +f 974 2465 374 +f 899 927 374 +f 1882 1898 1916 +f 1613 1634 1596 +f 909 833 1396 +f 2492 247 1003 +f 919 914 1931 +f 1459 1299 1458 +f 1634 1632 1633 +f 844 670 228 +f 2494 2497 2467 +f 901 973 2487 +f 228 1772 734 +f 1701 1709 1666 +f 963 574 1024 +f 847 864 856 +f 1730 1736 2239 +f 870 859 848 +f 2074 2111 2103 +f 1140 1590 1483 +f 927 730 974 +f 2103 978 2074 +f 756 1745 1718 +f 848 859 840 +f 1296 1482 1320 +f 2331 51 66 +f 1067 988 962 +f 1396 833 1445 +f 1001 1005 1000 +f 901 1009 973 +f 1099 1077 817 +f 933 944 936 +f 952 958 1828 +f 988 1660 986 +f 833 1067 1445 +f 1067 1640 988 +f 218 413 284 +f 1843 180 347 +f 1846 1708 1798 +f 2469 2477 855 +f 1006 1021 1005 +f 381 382 250 +f 2369 828 531 +f 968 977 1001 +f 2460 1949 779 +f 1194 1441 1115 +f 1001 1000 968 +f 756 678 1745 +f 963 1009 901 +f 2471 2084 2472 +f 841 642 8 +f 982 991 1027 +f 670 844 1020 +f 1289 1514 945 +f 869 904 890 +f 1161 1115 1639 +f 823 2178 849 +f 746 12 499 +f 263 428 2366 +f 1685 1075 1692 +f 1002 926 806 +f 1799 1755 216 +f 944 968 993 +f 943 944 993 +f 31 38 19 +f 531 828 550 +f 1501 1078 1081 +f 1921 1149 431 +f 936 943 932 +f 1660 1489 1412 +f 301 980 285 +f 903 918 902 +f 869 890 868 +f 890 903 867 +f 1003 746 499 +f 951 1949 2500 +f 990 841 853 +f 1595 1634 1611 +f 374 927 974 +f 836 1025 247 +f 1653 1652 1638 +f 1303 1545 1142 +f 1616 1631 1638 +f 1629 1546 1628 +f 936 932 913 +f 513 506 531 +f 868 890 867 +f 2330 2369 2353 +f 924 918 914 +f 907 914 904 +f 1258 1421 1267 +f 301 939 980 +f 1472 1482 1296 +f 868 867 859 +f 472 491 313 +f 272 519 2488 +f 1471 1472 1296 +f 1025 934 247 +f 1634 1633 1611 +f 2176 1847 2177 +f 1310 1289 806 +f 924 933 918 +f 1969 1968 902 +f 2107 2128 2118 +f 1428 1436 1287 +f 1139 1564 1617 +f 2378 572 2384 +f 853 841 8 +f 2501 961 2465 +f 1221 1240 1408 +f 1069 1578 1627 +f 1006 1005 1001 +f 1617 1564 1578 +f 828 539 550 +f 1791 2168 2160 +f 1829 1718 1739 +f 1968 1939 902 +f 756 1718 665 +f 1998 2000 1388 +f 2451 545 2356 +f 178 997 1011 +f 1275 325 1270 +f 1709 872 1666 +f 2176 1959 1847 +f 944 943 936 +f 2424 518 511 +f 1445 1067 962 +f 2007 952 1828 +f 2052 2061 2081 +f 828 2303 539 +f 835 1699 1048 +f 1709 1706 872 +f 885 574 963 +f 1318 1296 1320 +f 859 867 1902 +f 1452 1448 1421 +f 943 993 976 +f 993 1000 983 +f 854 1010 876 +f 988 986 962 +f 2031 2052 2081 +f 924 1732 1828 +f 965 949 1060 +f 781 228 734 +f 1718 1765 665 +f 943 976 932 +f 1680 1794 1783 +f 1448 1471 1276 +f 1276 1267 1421 +f 1931 914 907 +f 991 781 996 +f 1276 1421 1448 +f 10 909 1396 +f 831 860 849 +f 1523 1762 1774 +f 924 1828 937 +f 307 994 1014 +f 946 963 901 +f 978 2103 977 +f 977 1006 1001 +f 1007 1161 1639 +f 1639 1294 1437 +f 885 1032 574 +f 1294 1381 1437 +f 733 568 797 +f 792 229 1112 +f 119 581 108 +f 843 835 927 +f 1889 860 831 +f 2211 2216 2204 +f 2400 2431 2422 +f 2103 1006 977 +f 840 1902 830 +f 827 840 830 +f 827 830 822 +f 1003 874 2492 +f 1432 1439 1431 +f 781 734 964 +f 1937 1936 1723 +f 918 913 902 +f 958 977 944 +f 1850 2178 2177 +f 1005 1020 1000 +f 991 996 307 +f 1396 1445 340 +f 2179 1763 889 +f 939 909 980 +f 1828 958 937 +f 978 977 958 +f 1590 1571 1563 +f 779 1949 920 +f 1551 1362 1573 +f 2103 2142 1006 +f 920 885 963 +f 946 920 963 +f 1584 1616 1583 +f 1453 1472 1452 +f 1647 1617 1578 +f 1578 1564 1627 +f 1628 938 1069 +f 869 868 859 +f 993 983 976 +f 912 1762 1775 +f 752 751 706 +f 1628 1546 938 +f 844 228 781 +f 840 859 1902 +f 898 907 904 +f 1025 973 1009 +f 663 664 573 +f 763 946 901 +f 898 904 869 +f 2172 889 1763 +f 1128 926 971 +f 860 848 849 +f 904 903 890 +f 2486 2459 2479 +f 577 782 608 +f 933 936 918 +f 2177 1847 1851 +f 665 1765 339 +f 937 958 944 +f 894 981 724 +f 968 1000 993 +f 2192 2195 2205 +f 1652 1099 817 +f 997 608 1011 +f 997 577 608 +f 577 163 782 +f 1112 998 792 +f 2177 1851 1850 +f 1257 1421 1258 +f 951 873 920 +f 822 830 2215 +f 1899 2496 2471 +f 1773 1668 1558 +f 904 914 903 +f 932 1671 913 +f 873 885 920 +f 1013 1617 1647 +f 873 1032 885 +f 894 862 981 +f 2469 855 961 +f 913 1671 1969 +f 2477 2064 855 +f 918 936 913 +f 860 870 848 +f 937 944 933 +f 1501 1013 1647 +f 824 178 751 +f 824 997 178 +f 824 577 997 +f 643 163 577 +f 863 856 882 +f 2128 2153 2134 +f 722 774 880 +f 722 894 774 +f 864 905 895 +f 850 575 583 +f 914 918 903 +f 924 937 933 +f 1501 717 1013 +f 1587 1324 928 +f 717 1512 1013 +f 602 577 824 +f 766 643 577 +f 894 709 862 +f 709 878 862 +f 976 975 932 +f 1324 1596 928 +f 880 524 1060 +f 2434 2459 2499 +f 1324 1613 1596 +f 752 824 751 +f 602 766 577 +f 1014 602 594 +f 1387 1226 2152 +f 2153 1387 2152 +f 669 930 950 +f 1710 1694 1699 +f 768 326 762 +f 582 892 601 +f 974 990 2465 +f 624 116 625 +f 835 795 730 +f 2458 2484 763 +f 989 602 824 +f 2064 2477 1710 +f 976 983 975 +f 949 722 880 +f 996 160 994 +f 2305 863 556 +f 556 863 886 +f 601 910 640 +f 2264 825 829 +f 989 824 752 +f 856 864 882 +f 1595 1586 2381 +f 1627 1629 1628 +f 2174 2180 2173 +f 2128 2134 2118 +f 137 272 22 +f 949 880 1060 +f 995 894 722 +f 894 995 709 +f 894 724 774 +f 886 895 892 +f 640 910 930 +f 871 870 860 +f 846 856 863 +f 1026 875 1019 +f 838 851 829 +f 1024 1171 934 +f 36 189 205 +f 863 882 886 +f 886 882 895 +f 875 1026 594 +f 52 1459 1269 +f 896 917 910 +f 1025 1009 934 +f 949 995 722 +f 2152 1226 1636 +f 895 896 892 +f 892 910 601 +f 942 950 930 +f 875 989 752 +f 594 602 989 +f 766 355 643 +f 355 260 643 +f 905 917 896 +f 965 1060 1162 +f 892 896 910 +f 1101 1052 1042 +f 1029 1031 834 +f 1101 1133 1118 +f 342 357 376 +f 516 515 2454 +f 1656 2494 2467 +f 1056 1303 1133 +f 1120 1130 862 +f 69 342 376 +f 1055 1056 1133 +f 499 69 165 +f 85 101 111 +f 1031 1032 834 +f 200 679 1166 +f 1031 1042 1032 +f 1171 65 934 +f 1822 1204 1177 +f 1096 956 1103 +f 514 96 97 +f 956 1145 1144 +f 1185 1166 1144 +f 1145 1185 1144 +f 1185 200 1166 +f 375 132 1041 +f 1153 1202 305 +f 32 1244 1249 +f 1096 1087 956 +f 554 78 2355 +f 1191 138 110 +f 65 35 432 +f 1087 1110 956 +f 1110 1146 956 +f 956 1146 1145 +f 1146 1156 1145 +f 1145 1156 1185 +f 950 956 1144 +f 2481 2495 948 +f 1156 1193 1185 +f 1050 1047 1051 +f 239 151 107 +f 1185 1193 36 +f 1747 1110 1087 +f 1134 1146 1110 +f 1146 1157 1156 +f 1156 1157 1193 +f 1041 1045 1034 +f 1397 1134 1110 +f 1157 1146 1134 +f 1157 1175 1193 +f 1193 199 36 +f 1090 1035 1196 +f 1456 1150 1051 +f 1175 199 1193 +f 1186 695 199 +f 1186 199 1175 +f 1175 1157 1134 +f 728 1186 1175 +f 197 760 6 +f 1130 593 862 +f 1167 1109 182 +f 1194 1115 1161 +f 2140 1928 1504 +f 921 922 2138 +f 1147 1134 1397 +f 1719 1147 1397 +f 1147 1175 1134 +f 1175 1147 728 +f 341 1654 1208 +f 754 151 9 +f 284 2138 1058 +f 1188 1557 1660 +f 1191 110 1053 +f 916 284 1189 +f 284 1058 1189 +f 2094 1465 2127 +f 1726 1019 1147 +f 1147 1019 728 +f 593 1130 96 +f 239 305 1038 +f 1036 1131 315 +f 397 1131 1120 +f 1053 96 1130 +f 2467 2485 1869 +f 517 1089 421 +f 834 1827 1029 +f 419 1047 1117 +f 1034 433 1306 +f 2239 1862 1730 +f 1453 1462 1472 +f 1408 1422 1399 +f 471 23 1111 +f 1205 1150 1456 +f 1205 1040 1150 +f 1131 1036 293 +f 293 1068 1044 +f 375 1041 138 +f 1205 1140 1046 +f 1040 1205 1046 +f 1140 1167 1046 +f 1104 1049 83 +f 1052 1085 1032 +f 1044 1068 1191 +f 1167 1483 1109 +f 208 1084 1035 +f 1040 132 375 +f 1834 20 3 +f 1050 1051 1070 +f 1133 1125 1174 +f 11 1440 1401 +f 420 208 1071 +f 1135 1079 1094 +f 1086 1101 1118 +f 1029 1030 1031 +f 1200 1061 294 +f 1191 1068 138 +f 1171 1141 65 +f 1141 1172 65 +f 1172 35 65 +f 1172 404 35 +f 404 99 35 +f 221 1104 1063 +f 802 398 1083 +f 20 1089 3 +f 2064 1699 835 +f 1042 1052 1032 +f 1433 1261 1432 +f 1323 2338 155 +f 1076 1205 1456 +f 1088 1402 1056 +f 1150 348 1070 +f 1200 1089 20 +f 1097 1162 100 +f 1032 873 834 +f 21 471 1111 +f 294 1097 1104 +f 1072 100 584 +f 1151 760 622 +f 132 1045 1041 +f 1050 1070 1135 +f 1088 1039 940 +f 650 159 635 +f 100 1170 729 +f 729 584 100 +f 1103 931 1096 +f 925 1443 1513 +f 138 1102 110 +f 1034 1306 1152 +f 1071 1035 1090 +f 100 1072 1097 +f 23 1158 315 +f 1068 375 138 +f 1586 1612 1585 +f 1819 1030 1029 +f 1041 1034 1102 +f 232 375 1068 +f 348 1079 1070 +f 1061 1097 294 +f 1513 1443 1442 +f 1200 294 1119 +f 376 1050 1062 +f 1094 1036 315 +f 1200 1119 1089 +f 1111 1183 21 +f 1044 1191 1053 +f 698 295 689 +f 1079 232 1036 +f 404 1117 99 +f 1495 1496 717 +f 1119 294 98 +f 3 1089 517 +f 1132 1063 83 +f 1132 83 175 +f 132 1046 182 +f 1111 1195 1183 +f 1131 1044 1037 +f 127 402 1804 +f 219 1272 1047 +f 1697 1135 1094 +f 2140 1854 2117 +f 1111 397 1195 +f 1177 1162 1097 +f 1061 1177 1097 +f 717 1509 714 +f 2 1300 433 +f 462 290 461 +f 98 294 221 +f 294 1104 221 +f 714 1161 1007 +f 1073 1152 1143 +f 1697 1094 1360 +f 1223 1423 1218 +f 836 2479 842 +f 1097 1072 1049 +f 348 1040 375 +f 3 517 316 +f 180 1061 1201 +f 348 375 232 +f 1432 1431 1415 +f 220 1513 1495 +f 1104 1097 1049 +f 306 674 596 +f 777 455 723 +f 2170 2151 1641 +f 1047 419 219 +f 1102 1034 1073 +f 1073 1034 1152 +f 1035 1054 1196 +f 1177 1204 1162 +f 746 65 12 +f 751 178 721 +f 1054 517 421 +f 1051 1150 1070 +f 1102 1073 110 +f 998 1136 355 +f 567 566 1163 +f 1111 315 397 +f 1048 1074 835 +f 1158 1094 315 +f 1374 1107 1252 +f 1112 1136 998 +f 472 629 500 +f 355 1136 260 +f 260 118 43 +f 1104 83 1063 +f 376 357 1050 +f 1463 1142 1545 +f 1036 232 293 +f 1030 1042 1031 +f 1079 348 232 +f 221 1063 1132 +f 1094 1079 1036 +f 1076 1629 1205 +f 1136 1197 260 +f 260 1197 118 +f 1204 965 1162 +f 293 232 1068 +f 1590 1205 1629 +f 1205 1590 1140 +f 250 382 392 +f 1296 1318 1311 +f 347 1201 20 +f 1201 1200 20 +f 132 182 1045 +f 1101 1086 1052 +f 1033 1039 1055 +f 138 1041 1102 +f 970 1010 2495 +f 455 777 43 +f 1992 1948 2023 +f 20 1834 347 +f 1072 584 1049 +f 584 1192 1049 +f 182 2 1045 +f 1163 324 44 +f 1360 1094 1158 +f 1450 1360 1158 +f 1091 1112 229 +f 509 723 455 +f 207 509 455 +f 1251 1257 1266 +f 1488 1489 1547 +f 2157 1541 1875 +f 305 107 324 +f 1045 2 433 +f 1070 1079 1135 +f 1136 1168 1197 +f 1197 359 118 +f 118 359 43 +f 359 356 43 +f 356 455 43 +f 356 207 455 +f 1240 1422 1408 +f 1163 1153 324 +f 1201 1061 1200 +f 1052 1086 1085 +f 1024 1141 1171 +f 1112 1105 1136 +f 1050 1135 1062 +f 1105 1168 1136 +f 1168 1178 1197 +f 1197 1178 359 +f 1173 404 1172 +f 465 356 359 +f 1174 1125 240 +f 1240 1431 1422 +f 1098 1113 1105 +f 1112 1098 1105 +f 1105 1178 1168 +f 1178 465 359 +f 1091 1098 1112 +f 1133 1174 1118 +f 98 221 1059 +f 487 1132 175 +f 980 1017 285 +f 465 207 356 +f 180 1201 347 +f 1060 524 1170 +f 445 127 316 +f 1431 1438 1422 +f 498 469 681 +f 940 1807 1759 +f 381 250 1290 +f 1113 1122 1105 +f 1105 1122 1178 +f 1151 509 207 +f 1236 2035 525 +f 1131 293 1044 +f 346 207 465 +f 346 1151 207 +f 1822 1796 1204 +f 1143 204 97 +f 123 1128 971 +f 2153 2152 2134 +f 126 1151 346 +f 517 445 316 +f 1450 1158 23 +f 1458 1462 1430 +f 1129 152 1182 +f 1122 1159 1178 +f 1178 1198 465 +f 79 346 465 +f 126 1155 1151 +f 1151 1155 6 +f 295 1129 689 +f 1073 1143 97 +f 1098 1123 1113 +f 1113 1123 1122 +f 1123 1169 1122 +f 1178 1159 1198 +f 1198 79 465 +f 392 383 152 +f 1822 1061 180 +f 116 92 625 +f 421 1089 1119 +f 1129 295 152 +f 110 1073 97 +f 1173 1172 1141 +f 1122 1169 1159 +f 79 126 346 +f 1155 181 6 +f 971 926 1002 +f 295 1043 152 +f 1039 1088 1056 +f 1428 1266 1436 +f 404 419 1117 +f 836 879 2479 +f 2464 2476 2458 +f 1198 317 79 +f 1124 939 301 +f 44 754 567 +f 1039 1056 1055 +f 1439 1459 1458 +f 1660 1412 986 +f 1169 1160 1159 +f 179 1155 126 +f 1155 131 181 +f 1061 1822 1177 +f 1153 305 324 +f 175 314 327 +f 1160 1187 1159 +f 1159 1187 1198 +f 1198 1187 317 +f 79 179 126 +f 1043 250 392 +f 152 1043 392 +f 96 819 593 +f 1123 1127 1169 +f 317 179 79 +f 1057 1155 179 +f 1155 391 131 +f 131 391 668 +f 2381 1586 1585 +f 12 69 499 +f 262 398 1640 +f 2107 2118 2060 +f 2130 2094 2002 +f 1187 249 317 +f 1155 1057 391 +f 1290 439 1265 +f 305 239 107 +f 1127 1160 1169 +f 317 473 179 +f 473 1057 179 +f 83 1192 314 +f 1043 1290 250 +f 1807 940 1030 +f 517 1084 445 +f 1057 1164 391 +f 2492 2480 2493 +f 163 643 43 +f 1056 1545 1303 +f 1069 1655 1023 +f 249 473 317 +f 1162 1060 1170 +f 1086 1118 1154 +f 82 68 16 +f 1989 1990 1536 +f 1633 1632 1611 +f 1487 2372 1305 +f 1494 1069 1023 +f 1137 1160 1127 +f 669 1166 679 +f 390 1285 426 +f 1955 1972 1971 +f 1219 1223 2437 +f 1254 1261 1223 +f 1319 1545 1056 +f 1320 1328 2443 +f 1261 1433 1223 +f 1219 1254 1223 +f 254 222 2428 +f 1237 1290 1265 +f 1284 1273 1263 +f 1277 1291 1301 +f 1314 102 1301 +f 1280 363 377 +f 1313 1353 1514 +f 468 451 439 +f 1918 1964 1956 +f 2026 29 2140 +f 1354 381 1279 +f 1224 30 1254 +f 147 158 173 +f 1247 1253 274 +f 1271 380 334 +f 2043 2072 2042 +f 274 300 267 +f 1356 1392 211 +f 13 240 1142 +f 1382 1330 1392 +f 1312 1323 155 +f 240 1125 1142 +f 2358 1573 1362 +f 1236 1249 1244 +f 1272 219 1348 +f 1271 1274 380 +f 191 2034 1982 +f 1992 2052 1990 +f 462 452 689 +f 2262 2286 2261 +f 183 489 1642 +f 2485 2480 1869 +f 84 111 1323 +f 1190 353 1354 +f 446 434 435 +f 1336 171 1341 +f 2021 430 2059 +f 862 878 1120 +f 1263 1273 1248 +f 1966 1921 2144 +f 1312 84 1323 +f 240 13 1348 +f 1359 1274 1271 +f 1392 1330 1247 +f 1520 1333 11 +f 1368 1253 1247 +f 1279 1285 1190 +f 2465 990 2489 +f 1272 1519 805 +f 1369 1272 805 +f 1317 95 1344 +f 1242 1248 1234 +f 1368 242 1363 +f 274 1262 1386 +f 532 597 1886 +f 2117 2026 2140 +f 1392 1247 274 +f 2162 508 985 +f 1964 1469 1965 +f 1315 104 1331 +f 1392 1356 1382 +f 128 1342 1336 +f 1285 427 426 +f 1219 1224 1254 +f 1320 1322 1321 +f 1320 1321 1328 +f 153 2443 1328 +f 1321 153 1328 +f 1235 1244 1243 +f 1225 1224 1219 +f 1359 353 1190 +f 1312 1473 1458 +f 1336 1342 147 +f 305 1333 1038 +f 1336 147 171 +f 516 31 19 +f 2479 2461 842 +f 1237 1265 427 +f 1263 1278 1284 +f 881 1827 834 +f 1237 427 1285 +f 1299 1312 1458 +f 1190 1285 1274 +f 1363 286 1253 +f 2330 2303 828 +f 427 442 426 +f 2493 2463 2492 +f 1285 380 1274 +f 522 18 1225 +f 2471 2472 2488 +f 2338 154 1321 +f 1423 1415 1218 +f 1225 18 1224 +f 1253 286 1262 +f 286 353 1359 +f 171 1368 1383 +f 1273 54 1234 +f 1973 2447 527 +f 1322 155 1321 +f 1203 1369 1413 +f 1307 363 1298 +f 1364 1375 1329 +f 1329 227 1306 +f 296 1298 1343 +f 947 2499 1447 +f 1203 1047 1272 +f 1098 1748 1123 +f 1519 1272 1348 +f 1277 70 1273 +f 1282 1337 1361 +f 286 302 353 +f 103 104 1315 +f 1377 435 434 +f 1449 1261 1345 +f 926 1310 806 +f 1263 1248 1242 +f 985 508 597 +f 1415 1222 1218 +f 88 1325 104 +f 170 111 156 +f 1384 1282 1361 +f 274 1253 1262 +f 1371 1317 1344 +f 1371 1366 1337 +f 1345 1459 1449 +f 171 1383 1341 +f 2438 1235 1227 +f 2134 1582 2118 +f 428 1260 1379 +f 1336 1341 1325 +f 1235 1242 1227 +f 1228 1687 2284 +f 1854 2140 2016 +f 1866 1887 1873 +f 1343 1298 1370 +f 1384 1361 2440 +f 171 242 1368 +f 1344 1309 1366 +f 1371 1344 1366 +f 1280 1377 1293 +f 200 1185 205 +f 1330 1383 1368 +f 1255 1264 1263 +f 543 1367 1876 +f 1343 1370 1260 +f 1293 1326 1370 +f 2440 1361 1302 +f 1282 1384 2406 +f 271 1337 1282 +f 170 2338 1323 +f 1528 1503 2470 +f 515 1347 2453 +f 1997 1705 1998 +f 2285 1228 2284 +f 1229 1250 1228 +f 1330 1368 1247 +f 1919 1619 2045 +f 1344 1364 1335 +f 1222 1240 1221 +f 1212 858 1741 +f 2388 1222 1221 +f 1528 2470 2068 +f 501 1308 2171 +f 1295 1311 1487 +f 2116 1619 1655 +f 1220 1229 1228 +f 8 663 573 +f 1343 1260 428 +f 1337 1366 1361 +f 1298 1280 1293 +f 1269 1345 1261 +f 1279 381 1290 +f 1230 1229 1220 +f 1230 1245 1229 +f 1245 1250 1229 +f 1227 1234 31 +f 1302 1361 1350 +f 1245 1266 1428 +f 1992 2023 2052 +f 2482 2471 2475 +f 452 462 461 +f 271 1282 1275 +f 1991 1989 1934 +f 1366 1309 1350 +f 1344 1335 1309 +f 730 699 974 +f 1374 1252 1208 +f 597 508 1912 +f 1363 1253 1368 +f 1386 1271 300 +f 1211 1218 1222 +f 1376 1377 434 +f 2399 2437 1211 +f 1284 1291 1277 +f 1230 1251 1245 +f 1251 1266 1245 +f 1317 1371 1337 +f 1288 1286 1095 +f 1095 1286 1352 +f 1241 1208 1352 +f 1241 1374 1208 +f 1284 1278 1291 +f 211 1392 267 +f 1344 1375 1364 +f 929 583 1028 +f 1361 1366 1350 +f 1115 1294 1639 +f 1291 103 1301 +f 1220 1231 1230 +f 1231 1251 1230 +f 1234 1248 1273 +f 1255 55 1264 +f 1360 1450 1702 +f 363 1280 1298 +f 1369 1203 1272 +f 1415 1240 1222 +f 1216 1231 1220 +f 1243 1263 1235 +f 1375 227 1329 +f 1264 1278 1263 +f 855 899 961 +f 1286 1241 1352 +f 2081 2128 2107 +f 1223 1433 1423 +f 1473 1312 155 +f 154 153 1321 +f 1377 1376 1293 +f 1392 274 267 +f 334 300 1271 +f 1955 1991 1934 +f 1613 1327 1288 +f 1327 1286 1288 +f 1349 1374 1241 +f 2370 2025 2367 +f 1315 1331 133 +f 434 446 1256 +f 1232 1251 1231 +f 1243 1244 1255 +f 1286 1304 1241 +f 1349 1107 1374 +f 1359 1271 1386 +f 1227 516 2431 +f 219 240 1348 +f 1270 271 1275 +f 1255 1263 1243 +f 2026 1926 29 +f 1683 2157 1212 +f 1326 1293 1376 +f 1255 32 55 +f 104 1325 1341 +f 519 2462 2475 +f 2154 2161 2137 +f 1376 434 1246 +f 1246 434 1256 +f 1257 1251 1232 +f 1262 1359 1386 +f 2195 2192 2186 +f 1308 534 1226 +f 2026 2117 544 +f 1327 1613 1324 +f 1327 1326 1286 +f 1286 1326 1304 +f 104 1341 1331 +f 774 524 880 +f 837 1517 534 +f 1127 1123 1567 +f 1279 1237 1285 +f 1297 1381 1294 +f 1217 1232 1216 +f 1142 1519 13 +f 1436 1267 1287 +f 1324 1372 1327 +f 1304 1246 1241 +f 1246 1349 1241 +f 1246 1373 1349 +f 286 1359 1262 +f 1382 1383 1330 +f 1284 1277 1273 +f 489 1998 1799 +f 1675 1116 1075 +f 106 1317 1337 +f 1311 1295 1281 +f 1292 1364 1329 +f 1335 1364 1292 +f 1334 1294 1115 +f 1334 1297 1294 +f 1300 1381 1297 +f 973 842 2461 +f 1217 1239 1232 +f 1232 1239 1257 +f 1258 1267 1436 +f 1359 1190 1274 +f 1862 1405 1877 +f 1372 1339 1327 +f 1339 1326 1327 +f 1373 1351 1349 +f 1276 1311 1281 +f 1256 2386 1351 +f 2 1109 1300 +f 482 1731 520 +f 803 1604 2022 +f 1223 1218 1211 +f 1341 1383 1382 +f 1298 1293 1370 +f 1190 1354 1279 +f 1324 2398 1372 +f 1714 1700 2173 +f 183 2000 489 +f 1701 1666 192 +f 1227 1242 1234 +f 1332 1289 1310 +f 1517 2005 2130 +f 1331 1341 1382 +f 525 1249 1236 +f 23 1268 1450 +f 1264 1291 1278 +f 1281 1287 1267 +f 1295 1305 1287 +f 1281 1295 1287 +f 1487 1305 1295 +f 1605 2097 2058 +f 1326 1376 1304 +f 1304 1376 1246 +f 1316 1919 1984 +f 2500 1949 2460 +f 1332 1313 1289 +f 2189 2181 2177 +f 1335 1334 1353 +f 1292 1297 1334 +f 1428 1250 1245 +f 969 958 952 +f 1217 1233 1239 +f 1233 1257 1239 +f 1876 1367 1338 +f 1379 1260 1372 +f 1372 1260 1339 +f 1128 1302 1310 +f 1310 1302 1332 +f 1335 1353 1313 +f 1292 1334 1335 +f 1297 1329 1300 +f 1279 1290 1237 +f 1301 103 1314 +f 70 1301 102 +f 23 1333 1268 +f 380 1285 390 +f 772 325 1275 +f 1314 103 1315 +f 2473 2458 2487 +f 1276 1281 1267 +f 1344 95 1375 +f 2053 1771 1572 +f 1246 1256 1373 +f 1373 1256 1351 +f 1340 1302 1128 +f 1350 1313 1332 +f 1329 1297 1292 +f 2434 2473 2487 +f 106 1337 271 +f 23 471 1333 +f 622 723 509 +f 1388 1517 2127 +f 1991 1990 1989 +f 183 1636 1226 +f 2133 1605 2151 +f 1260 1370 1339 +f 1339 1370 1326 +f 867 1894 1902 +f 390 426 412 +f 1235 1263 1242 +f 1399 1422 1233 +f 305 11 1333 +f 1300 1329 1306 +f 1302 1350 1332 +f 1350 1309 1313 +f 1309 1335 1313 +f 2470 2102 1502 +f 1787 1531 1599 +f 1724 1725 1691 +f 1827 1601 1927 +f 1678 1358 1476 +f 1823 1812 1846 +f 1805 1824 1708 +f 1746 1676 1797 +f 325 2395 429 +f 1835 1677 1826 +f 1507 1790 1722 +f 1526 1672 858 +f 158 147 1342 +f 1462 1473 1322 +f 1474 1414 1565 +f 1761 1900 1877 +f 940 1759 1008 +f 1565 1015 1008 +f 1924 1533 1933 +f 1878 826 830 +f 1565 1414 1015 +f 1402 1088 1008 +f 1538 1532 1651 +f 1015 1552 1008 +f 1538 1591 1474 +f 1532 1538 1474 +f 1474 1591 1414 +f 1484 1402 1008 +f 1552 1484 1008 +f 1414 1460 1015 +f 1015 1460 1552 +f 806 1289 945 +f 1597 1538 1659 +f 1484 1319 1402 +f 1056 1402 1319 +f 1538 1597 1591 +f 1591 960 1414 +f 1414 960 1460 +f 1925 1466 1455 +f 1552 1400 1484 +f 1484 1400 1319 +f 1400 113 1319 +f 1597 1580 1591 +f 1460 1400 1552 +f 1514 1441 966 +f 1597 1659 1409 +f 1657 113 1400 +f 1460 1657 1400 +f 1288 1095 1634 +f 1551 1597 1409 +f 1580 1598 1591 +f 1591 1598 960 +f 1536 1990 2031 +f 960 1657 1460 +f 1809 1746 1797 +f 1423 1433 1432 +f 2478 1362 1409 +f 1463 1545 113 +f 1657 1463 113 +f 1457 1287 1305 +f 1682 1716 1746 +f 1434 1761 1885 +f 1013 1139 1617 +f 2379 1362 2478 +f 1420 1597 1551 +f 1420 1580 1597 +f 1664 1808 1712 +f 2256 2250 2231 +f 1362 1551 1409 +f 2196 2214 2213 +f 1691 1725 1777 +f 1626 192 1666 +f 1534 1574 2058 +f 1574 1600 1605 +f 1600 1606 1605 +f 1606 1641 1605 +f 1573 1420 1551 +f 1657 1485 1463 +f 678 1806 1742 +f 1534 1553 1574 +f 1574 1575 1600 +f 1810 2170 585 +f 1623 1641 1606 +f 1407 1657 960 +f 1598 1407 960 +f 1485 1142 1463 +f 1716 1581 1676 +f 1738 1743 1733 +f 843 2064 835 +f 1539 1575 1574 +f 1553 1539 1574 +f 1575 1592 1600 +f 1592 1624 1606 +f 1600 1592 1606 +f 1642 585 1641 +f 1623 1642 1641 +f 1485 164 1142 +f 1738 1516 1743 +f 1809 1720 1798 +f 1533 1535 1534 +f 1592 1607 1624 +f 1624 1623 1606 +f 1163 566 1116 +f 1407 1485 1657 +f 1432 1449 1439 +f 1100 802 2382 +f 1743 1516 1722 +f 1746 1716 1676 +f 1535 1539 1534 +f 1534 1539 1553 +f 1642 1623 1624 +f 1095 1208 1654 +f 967 1407 1598 +f 1580 967 1598 +f 1809 1797 1720 +f 1924 1524 1535 +f 1533 1924 1535 +f 1539 1576 1575 +f 1642 216 585 +f 1407 1529 1485 +f 1485 1529 164 +f 1472 1462 1482 +f 1415 1431 1240 +f 966 1194 714 +f 383 1182 152 +f 474 2337 446 +f 1743 1841 1757 +f 1486 1524 1924 +f 1535 1525 1539 +f 1575 1576 1592 +f 1420 967 1580 +f 1288 1634 1613 +f 459 427 1265 +f 1404 2179 1393 +f 1404 1403 1800 +f 1404 1410 1403 +f 1410 1749 1403 +f 1349 1351 218 +f 1486 1498 1524 +f 1535 1524 1525 +f 1607 1636 1624 +f 183 1642 1624 +f 1636 183 1624 +f 1107 1349 218 +f 1351 845 218 +f 164 1519 1142 +f 845 413 218 +f 1525 1576 1539 +f 1576 1582 1592 +f 1592 2134 1607 +f 2134 1636 1607 +f 2147 1491 1401 +f 1407 1589 1529 +f 1529 1519 164 +f 1693 1763 1444 +f 1924 1479 1486 +f 1592 1582 2134 +f 499 165 874 +f 2176 1857 1959 +f 2327 2368 2326 +f 2358 821 953 +f 953 821 1573 +f 1824 1704 1464 +f 1731 1358 1678 +f 1394 1410 1404 +f 1394 1418 1410 +f 1466 1479 1839 +f 1486 1479 1498 +f 1498 1525 1524 +f 1576 2080 1582 +f 1785 1684 1898 +f 804 398 802 +f 804 925 398 +f 1447 1562 2358 +f 2358 1562 821 +f 821 1620 1573 +f 1620 1420 1573 +f 1420 1556 967 +f 1393 1394 1404 +f 1525 2080 1576 +f 1621 1420 1620 +f 1621 1556 1420 +f 967 1589 1407 +f 1505 5 1357 +f 1266 1258 1436 +f 1393 1395 1394 +f 2176 2175 1848 +f 1455 1466 1839 +f 1525 1540 2080 +f 1582 2080 2118 +f 1100 804 802 +f 1556 1589 967 +f 1589 1082 1529 +f 1093 1685 1357 +f 1504 1093 1357 +f 1425 1418 1394 +f 1475 1479 1466 +f 1479 1506 1498 +f 1789 1784 1730 +f 2501 2465 2489 +f 1438 1458 1430 +f 1462 1458 1473 +f 1454 805 1529 +f 1082 1454 1529 +f 1529 805 1519 +f 1425 1394 1395 +f 1425 1744 1418 +f 1479 1475 1506 +f 1540 2060 2080 +f 1556 1082 1589 +f 1443 945 1511 +f 1506 1536 1498 +f 1498 1536 1525 +f 1525 1536 1540 +f 1670 852 1672 +f 1998 1388 1389 +f 1511 966 1509 +f 1509 966 714 +f 1442 1443 1496 +f 1562 1635 821 +f 155 1322 1473 +f 1439 1458 1438 +f 1426 1425 1395 +f 1475 1499 1506 +f 1735 1588 1776 +f 2422 2454 2421 +f 1423 1432 1415 +f 1559 2101 2073 +f 845 866 413 +f 1429 1620 821 +f 1620 1429 1621 +f 1228 1250 1687 +f 1002 945 1443 +f 2382 802 1083 +f 1859 1411 1395 +f 1411 1426 1395 +f 1426 1744 1425 +f 1590 1437 1483 +f 1480 1475 1466 +f 1480 1499 1475 +f 1510 1733 1743 +f 1663 1696 1658 +f 1430 1453 1452 +f 1452 1472 1471 +f 1452 1471 1448 +f 1430 1452 1421 +f 1430 1421 1422 +f 1429 1082 1556 +f 1621 1429 1556 +f 1351 2386 845 +f 1126 1059 487 +f 1639 1437 1563 +f 1504 1928 1093 +f 1499 1536 1506 +f 1588 1770 1727 +f 1110 1747 1397 +f 1776 1588 1531 +f 1322 1320 1482 +f 1590 1629 1571 +f 1730 1877 1838 +f 1429 935 1082 +f 1082 935 1454 +f 804 1443 925 +f 1139 1007 1639 +f 1925 1480 1466 +f 1934 1989 1480 +f 1499 1989 1536 +f 1727 1526 1531 +f 1593 1614 502 +f 2455 2431 2400 +f 1755 1680 908 +f 1563 1571 1564 +f 1647 1078 1501 +f 2490 1635 1106 +f 1496 1511 717 +f 2454 2431 516 +f 1478 1153 1093 +f 1870 1426 1411 +f 1426 1723 1744 +f 962 986 1412 +f 717 1511 1509 +f 1825 1704 1824 +f 2225 2234 2253 +f 1490 1557 1188 +f 1635 80 821 +f 805 1454 935 +f 1186 706 695 +f 1194 1161 714 +f 1512 1007 1013 +f 592 97 204 +f 1258 1266 1257 +f 82 1333 471 +f 1694 1710 1505 +f 1643 490 1661 +f 1661 490 1114 +f 1518 2068 2484 +f 1750 1808 1664 +f 1656 1635 2490 +f 935 1521 805 +f 1546 1629 1076 +f 1301 70 1277 +f 966 1441 1194 +f 1148 1825 1824 +f 1614 1609 1643 +f 1114 1092 1921 +f 1770 1739 1670 +f 1631 1632 1646 +f 821 1016 1429 +f 1429 1016 935 +f 1632 1095 1654 +f 1083 262 688 +f 1724 1686 1725 +f 1644 490 1643 +f 1092 1149 1921 +f 3 893 1832 +f 988 1640 1188 +f 916 1107 284 +f 1656 80 1635 +f 1016 821 80 +f 1016 1521 935 +f 1478 1202 1153 +f 1401 1928 29 +f 1440 1478 1928 +f 1849 1700 1865 +f 1595 1611 1612 +f 1208 198 341 +f 1464 1704 1746 +f 2143 984 1721 +f 1848 1849 1868 +f 1662 1114 490 +f 1669 1787 1682 +f 1656 1618 80 +f 198 1208 916 +f 1440 1928 1401 +f 1521 1369 805 +f 1252 1107 916 +f 1745 678 1672 +f 1703 1779 1721 +f 1750 1465 1808 +f 1609 1644 1643 +f 1092 1114 1662 +f 1826 1523 1793 +f 2262 2261 2224 +f 1696 2166 1767 +f 1016 1648 1521 +f 1208 1252 916 +f 833 688 1067 +f 1794 1803 1558 +f 28 17 512 +f 1750 861 1566 +f 1594 1644 1609 +f 1644 1645 490 +f 490 1645 1662 +f 2229 2262 2224 +f 1602 861 1760 +f 1530 1777 1760 +f 872 1706 1673 +f 1696 1668 2166 +f 1708 1809 1798 +f 1581 1716 1814 +f 1709 1794 1680 +f 1233 1421 1257 +f 1724 1476 1686 +f 1469 1481 1965 +f 1965 1481 1492 +f 2073 1549 1559 +f 1594 1615 1644 +f 1799 1706 1755 +f 1725 1686 1837 +f 1720 1797 1572 +f 1618 2467 2022 +f 1618 1579 80 +f 1648 1016 80 +f 2134 2152 1636 +f 1611 1632 1631 +f 1761 1434 1470 +f 1559 1577 1594 +f 1603 1615 1594 +f 1615 1645 1644 +f 1637 1662 1645 +f 1662 1199 1092 +f 1199 1149 1092 +f 1451 1108 1149 +f 665 734 756 +f 1865 1700 1714 +f 1709 1841 1794 +f 1618 2022 1579 +f 1648 1413 1369 +f 1521 1648 1369 +f 1520 11 1401 +f 1446 1470 1434 +f 1798 1691 1754 +f 2063 1544 2073 +f 2073 1544 1549 +f 1594 1577 1603 +f 1615 1637 1645 +f 1637 1199 1662 +f 1427 1149 1199 +f 2167 1108 1451 +f 1997 1673 1705 +f 1706 1799 1705 +f 1841 1709 1757 +f 1604 1579 2022 +f 1579 707 80 +f 80 707 1648 +f 1520 1401 1491 +f 1649 1520 1491 +f 1435 1434 1885 +f 1470 1469 1461 +f 1481 1508 2024 +f 2370 1544 2063 +f 1549 1568 1559 +f 1559 1568 1577 +f 1603 1610 1615 +f 1615 1610 1637 +f 999 1199 1637 +f 1451 1149 1427 +f 1137 1825 1148 +f 1706 1705 1673 +f 1138 1604 2116 +f 1138 1579 1604 +f 1413 1648 707 +f 2360 2024 1508 +f 598 1075 1116 +f 229 93 1468 +f 1839 1479 1684 +f 2216 2229 2224 +f 1610 1625 1637 +f 329 999 1637 +f 1199 1017 1427 +f 1017 303 1427 +f 303 1451 1427 +f 1792 1754 1777 +f 2309 2391 2301 +f 1655 1138 2116 +f 1138 707 1579 +f 1649 1491 206 +f 1406 1885 1398 +f 1406 1419 1885 +f 1419 1435 1885 +f 1434 1435 1446 +f 1470 1481 1469 +f 1577 1583 1603 +f 999 1017 1199 +f 81 67 941 +f 67 1650 941 +f 1259 1815 2164 +f 1619 2116 2045 +f 1424 707 1138 +f 1702 1649 206 +f 1687 1406 1398 +f 1477 1481 1470 +f 1568 1569 1577 +f 1577 1569 1583 +f 1603 1583 1610 +f 1625 329 1637 +f 2167 340 273 +f 81 273 340 +f 81 962 67 +f 1547 1619 1488 +f 1830 1739 1770 +f 938 1424 1138 +f 1424 1413 707 +f 1527 1649 1702 +f 1527 1520 1649 +f 1527 1268 1520 +f 1250 1406 1687 +f 1441 1353 1115 +f 1203 1413 1051 +f 1250 1419 1406 +f 1477 2372 1481 +f 1481 2372 1508 +f 2449 1560 1568 +f 1549 2449 1568 +f 1568 1560 1569 +f 1569 1584 1583 +f 1652 329 1625 +f 329 817 999 +f 285 1017 999 +f 303 10 1451 +f 10 2167 1451 +f 1412 1650 67 +f 1412 1488 1650 +f 1547 1023 1619 +f 1023 1655 1619 +f 1655 938 1138 +f 1456 1413 1424 +f 1457 1470 1446 +f 1457 1477 1470 +f 329 1652 817 +f 10 340 2167 +f 938 1546 1424 +f 1546 1456 1424 +f 1259 1548 1779 +f 2052 2031 1990 +f 1440 1202 1478 +f 1428 1419 1250 +f 1428 1435 1419 +f 1428 1446 1435 +f 1934 1935 1955 +f 1560 1584 1569 +f 1610 1638 1625 +f 1638 1652 1625 +f 817 1077 999 +f 1077 285 999 +f 980 303 1017 +f 962 1412 67 +f 1494 1023 1547 +f 325 271 1270 +f 1443 1511 1496 +f 1450 1268 1527 +f 1514 1353 1441 +f 1287 1446 1428 +f 1446 1287 1457 +f 1305 2372 1477 +f 1992 1990 1991 +f 1992 1991 1971 +f 1971 1991 1955 +f 2449 1549 2418 +f 1583 1616 1610 +f 1610 1616 1638 +f 10 1396 340 +f 340 1445 81 +f 1445 962 81 +f 1790 984 1753 +f 984 2148 1753 +f 1588 1713 1770 +f 969 978 958 +f 1741 1779 1703 +f 1758 1846 1754 +f 1827 1819 1029 +f 1818 1530 1712 +f 1750 1566 2127 +f 2459 2434 2483 +f 1798 1720 1771 +f 1794 1841 1803 +f 216 1755 1810 +f 1098 1735 1748 +f 1735 1497 1748 +f 1502 2102 1601 +f 881 1502 1601 +f 1455 1839 1744 +f 1706 1709 1680 +f 1212 1741 1703 +f 1788 1969 1671 +f 1075 1074 1692 +f 951 2500 881 +f 2490 2486 2463 +f 1748 1497 1781 +f 1721 984 1840 +f 1815 1259 1741 +f 1626 1756 1837 +f 975 987 1542 +f 2230 2236 2235 +f 1772 678 734 +f 1542 1671 975 +f 1806 1772 1780 +f 678 1772 1806 +f 2218 2225 2268 +f 1828 1732 2007 +f 1526 1688 1531 +f 1752 1526 1554 +f 1844 1818 1712 +f 1823 1846 1804 +f 1781 1669 1704 +f 1721 1779 2143 +f 1770 1670 1526 +f 1497 1669 1781 +f 1098 1713 1735 +f 1742 1815 1741 +f 1526 858 1875 +f 1599 1531 1688 +f 1803 1790 1558 +f 1703 1721 1683 +f 1832 1766 957 +f 1542 1679 1671 +f 1679 1788 1671 +f 1927 1819 1827 +f 1718 1745 1739 +f 1684 1022 1839 +f 1459 1283 1299 +f 1022 1410 1418 +f 2368 2393 2326 +f 1669 1497 1776 +f 1875 858 1212 +f 1739 1745 852 +f 1964 1918 1461 +f 1356 133 1331 +f 1765 1829 1468 +f 858 1742 1741 +f 1006 1674 1021 +f 1723 1936 1935 +f 1468 1713 1098 +f 1724 1678 1476 +f 1680 1783 908 +f 1731 1543 520 +f 1683 1721 1840 +f 1467 1679 1542 +f 1812 1708 1846 +f 1679 1975 1788 +f 1713 1830 1770 +f 1803 1722 1790 +f 2301 2391 2349 +f 1713 1588 1735 +f 1836 1530 1818 +f 1837 1756 861 +f 886 571 556 +f 1181 1805 1812 +f 1706 1680 1755 +f 1677 1729 1775 +f 1776 1787 1669 +f 1526 1670 1672 +f 1727 1770 1526 +f 987 1467 1542 +f 1567 1704 1137 +f 1693 1865 1714 +f 897 1762 912 +f 1135 1697 1062 +f 1697 376 1062 +f 1543 1731 1678 +f 1793 1679 1467 +f 1777 1602 1760 +f 1846 1798 1754 +f 1835 1096 1677 +f 1033 1030 940 +f 1450 1527 1702 +f 1717 376 1697 +f 1711 1717 1697 +f 1717 165 376 +f 1840 984 1790 +f 1669 1746 1704 +f 1669 1682 1746 +f 2301 2349 2308 +f 1882 1444 1898 +f 1820 1789 1730 +f 861 1380 1566 +f 2301 2308 2266 +f 1771 1543 1691 +f 1958 1659 1651 +f 1697 1360 1711 +f 1711 1737 1717 +f 1717 1737 165 +f 1790 1753 1558 +f 1668 1696 1663 +f 1360 1702 1711 +f 1702 1707 1711 +f 1707 1737 1711 +f 1737 1751 165 +f 1444 1782 1693 +f 1716 1787 1599 +f 1744 1839 1022 +f 1898 1444 1785 +f 206 1707 1702 +f 1764 2468 1751 +f 316 1844 893 +f 893 1844 915 +f 1845 1804 1758 +f 1380 861 1756 +f 1780 670 1021 +f 1714 2172 1763 +f 1783 1558 1663 +f 1750 2127 1465 +f 1798 1771 1691 +f 1691 1543 1724 +f 1872 1910 839 +f 1737 2044 1751 +f 1751 2044 1764 +f 1757 1701 482 +f 1725 1602 1777 +f 1836 1845 1530 +f 2102 2470 1503 +f 2496 1899 544 +f 763 2484 946 +f 987 1719 1467 +f 1845 1758 1792 +f 1725 1837 1602 +f 1872 1866 1873 +f 1712 1530 1760 +f 489 1799 216 +f 1760 861 1750 +f 2068 2466 2460 +f 1696 2159 2168 +f 377 1377 1280 +f 1797 1676 1572 +f 1581 2053 1572 +f 1676 1581 1572 +f 1764 2498 2468 +f 2468 2498 1994 +f 1861 1695 1860 +f 2481 2004 2495 +f 1826 1677 1523 +f 1670 1739 852 +f 2234 2269 2253 +f 1724 1543 1678 +f 1658 2168 1791 +f 1397 1747 1719 +f 1696 2168 1658 +f 979 519 272 +f 1774 1975 1679 +f 975 1671 932 +f 1787 1716 1682 +f 1835 1826 1747 +f 2501 2469 961 +f 1810 908 1791 +f 1982 1768 191 +f 1137 1704 1825 +f 1804 1846 1758 +f 2004 2044 1737 +f 913 1969 902 +f 2498 1795 1801 +f 915 1844 1712 +f 1689 915 1712 +f 1740 1752 1541 +f 695 661 199 +f 1865 1693 1782 +f 1824 1464 1809 +f 1829 1765 1718 +f 1816 1768 1982 +f 1816 1622 1768 +f 1622 2165 1681 +f 1768 1622 1681 +f 670 1772 228 +f 1283 1459 52 +f 1785 1444 1749 +f 1675 1075 1685 +f 1567 1781 1704 +f 1858 1857 1848 +f 1526 1752 1688 +f 1791 2160 1810 +f 908 1658 1791 +f 1813 1773 1558 +f 1845 1792 1530 +f 69 376 165 +f 3 1832 1834 +f 1722 1516 1507 +f 1801 1821 1994 +f 1833 1982 2046 +f 1821 1833 2046 +f 1833 1816 1982 +f 1022 1785 1749 +f 2160 2170 1810 +f 1147 1719 1726 +f 1683 1840 1507 +f 1467 1719 1793 +f 1795 1802 1801 +f 1802 1811 1801 +f 1801 1811 1821 +f 1690 2165 1622 +f 1934 1480 1925 +f 229 1468 1091 +f 1780 2164 1742 +f 1672 1742 858 +f 1833 1417 1816 +f 1417 1622 1816 +f 1831 2165 1690 +f 1668 1663 1558 +f 1719 1747 1826 +f 1760 1750 1664 +f 1817 1690 1622 +f 1530 1792 1777 +f 948 1796 1802 +f 1796 1811 1802 +f 1515 1817 1622 +f 1695 1861 1831 +f 1783 1663 1658 +f 1749 1410 1022 +f 854 1796 948 +f 1811 1842 1833 +f 1821 1811 1833 +f 1833 1842 1417 +f 1622 1417 1515 +f 127 1804 1845 +f 1686 1626 1837 +f 1608 1690 1817 +f 1523 1775 1762 +f 127 1845 1836 +f 1812 1805 1708 +f 1523 1677 1775 +f 1780 1772 670 +f 1758 1754 1792 +f 1204 1796 854 +f 1822 1842 1811 +f 1608 1831 1690 +f 1822 1811 1796 +f 1842 1416 1417 +f 1417 1416 1515 +f 1515 1608 1817 +f 1728 1831 1608 +f 908 1783 1658 +f 127 1836 316 +f 1805 1148 1824 +f 852 1745 1672 +f 1478 1093 1928 +f 1822 1843 1842 +f 1843 959 1842 +f 1842 959 1416 +f 1728 1695 1831 +f 1728 1860 1695 +f 2346 446 2337 +f 1602 1837 861 +f 1087 1096 1835 +f 1708 1824 1809 +f 2004 1737 505 +f 1567 1748 1781 +f 520 1543 1883 +f 1760 1664 1712 +f 128 1336 72 +f 2053 1883 1543 +f 1822 180 1843 +f 1786 1608 1515 +f 929 2462 519 +f 512 2402 506 +f 1212 1703 1683 +f 1830 1829 1739 +f 2053 1543 1771 +f 1416 1769 1515 +f 1769 1786 1515 +f 1786 1728 1608 +f 1712 1808 1689 +f 1794 1558 1783 +f 1497 1735 1776 +f 1127 1567 1137 +f 1123 1748 1567 +f 36 205 1185 +f 959 1734 1416 +f 1738 1733 1541 +f 1774 1762 1974 +f 1752 1554 1541 +f 1752 1740 1688 +f 1526 1875 1554 +f 1468 1829 1830 +f 1755 908 1810 +f 1716 1599 1814 +f 1806 1780 1742 +f 2308 2349 2340 +f 1832 915 1689 +f 1713 1468 1830 +f 1814 1599 1346 +f 1832 1689 1766 +f 1022 1684 1785 +f 1093 1153 1116 +f 1672 678 1742 +f 1675 1685 1093 +f 1841 1743 1722 +f 1814 2053 1581 +f 1464 1746 1809 +f 2485 2497 2493 +f 1416 1734 1769 +f 1665 1728 1786 +f 1665 1951 1728 +f 1951 1860 1728 +f 1951 2094 1860 +f 1844 1836 1818 +f 316 1836 1844 +f 1776 1531 1787 +f 1719 1826 1793 +f 2147 1401 29 +f 2111 2121 1548 +f 1741 1259 1779 +f 1843 347 1834 +f 1843 1734 959 +f 1766 1769 1734 +f 957 1766 1734 +f 1766 1786 1769 +f 1766 1689 1786 +f 1689 1665 1786 +f 1754 1691 1777 +f 1507 1840 1790 +f 1761 1470 1461 +f 1523 1679 1793 +f 1091 1468 1098 +f 1820 1730 1838 +f 1843 1834 1734 +f 1808 1951 1665 +f 1588 1727 1531 +f 893 915 1832 +f 1523 1774 1679 +f 272 2488 710 +f 1093 1116 1675 +f 2340 2349 2348 +f 1832 1734 1834 +f 1832 957 1734 +f 1951 1808 2094 +f 1685 1692 1505 +f 1043 295 698 +f 2143 1779 2121 +f 1689 1808 1665 +f 1693 1714 1763 +f 1738 2157 1516 +f 1114 1921 236 +f 1268 1333 1520 +f 1149 1108 431 +f 508 2144 1912 +f 1957 1108 1537 +f 431 1108 1957 +f 1018 1108 2167 +f 1338 1957 1681 +f 2163 1957 1338 +f 1983 1390 2093 +f 30 557 37 +f 1714 2173 2172 +f 1983 1984 1390 +f 1984 2065 1390 +f 884 1762 897 +f 2065 1984 1214 +f 1950 1974 1762 +f 884 1950 1762 +f 2012 1698 1861 +f 1214 2116 803 +f 1950 1938 1974 +f 1938 1967 1974 +f 1900 1761 1461 +f 865 1929 884 +f 884 1929 1950 +f 2062 2071 2042 +f 919 1985 1732 +f 1593 502 2146 +f 1995 1213 2098 +f 1522 2476 1651 +f 2174 1849 2175 +f 1480 1989 1499 +f 1929 1938 1950 +f 1605 2058 1574 +f 2097 1605 2133 +f 1912 2014 1886 +f 2092 2082 2083 +f 206 1930 505 +f 2101 2100 2092 +f 2073 2101 2092 +f 839 1910 865 +f 1910 1901 1929 +f 865 1910 1929 +f 1967 1788 1975 +f 2073 2092 2063 +f 2101 1593 2100 +f 2015 1876 1698 +f 1853 1884 2014 +f 1831 1698 2165 +f 1316 273 81 +f 1901 1920 1929 +f 1929 1920 1938 +f 1920 1968 1967 +f 1938 1920 1967 +f 1849 2174 1700 +f 2173 1700 2174 +f 2062 2072 2091 +f 803 2467 2059 +f 2239 1736 2240 +f 1505 1357 1685 +f 1358 1686 1476 +f 1967 1968 1788 +f 1968 1969 1788 +f 2065 2110 2156 +f 2065 1214 2110 +f 2110 1214 503 +f 273 2093 1018 +f 273 1983 2093 +f 532 1886 2155 +f 2034 2021 1947 +f 216 1810 585 +f 1912 543 2014 +f 1390 2051 1537 +f 1872 1873 1910 +f 1984 2045 1214 +f 597 1912 1886 +f 1593 2146 2100 +f 2071 2062 2090 +f 2034 2046 1982 +f 2034 1947 2046 +f 1214 2045 2116 +f 1873 1887 1910 +f 1887 1901 1910 +f 1562 1447 1106 +f 2163 431 1957 +f 1948 1972 1936 +f 1972 1948 1992 +f 2014 2015 2013 +f 1853 2014 2013 +f 1550 1884 1853 +f 1947 2468 1994 +f 1355 1550 2154 +f 1355 1884 1550 +f 2081 2108 2128 +f 2024 1965 1492 +f 2024 2032 1965 +f 2116 1604 803 +f 1901 1911 1920 +f 1939 1968 1920 +f 1911 1939 1920 +f 872 1626 1666 +f 2062 2091 2120 +f 1819 1927 1759 +f 1021 1674 1780 +f 872 1673 1756 +f 1550 501 2171 +f 1378 1550 2171 +f 2146 2162 2145 +f 1358 482 192 +f 2109 2120 2119 +f 1866 1872 2227 +f 1391 2012 1860 +f 2136 2137 2161 +f 2162 1661 236 +f 1887 1894 1901 +f 1901 1894 1911 +f 505 1707 206 +f 2120 2137 2136 +f 2142 2164 1674 +f 1860 2012 1861 +f 1894 1939 1911 +f 2080 2060 2118 +f 2162 236 508 +f 2164 1815 1742 +f 1018 2093 1537 +f 2154 1378 2161 +f 2041 2098 2491 +f 2043 2042 2032 +f 1108 1018 1537 +f 1465 2094 1808 +f 502 1643 1661 +f 2467 1618 1656 +f 2119 2136 2135 +f 2119 2108 2071 +f 878 1183 1195 +f 2101 1594 1593 +f 2033 2370 2063 +f 2482 2491 2098 +f 1282 2406 1275 +f 2003 1948 1956 +f 2043 2032 2024 +f 2025 2043 2024 +f 2154 1550 1378 +f 1795 2498 1764 +f 2142 1548 2164 +f 2431 2454 2422 +f 1981 2011 1993 +f 2349 2391 2362 +f 502 2162 2146 +f 2025 2024 2360 +f 2129 2120 2091 +f 1732 1985 2007 +f 2171 1308 209 +f 1930 1995 2041 +f 1390 1238 2051 +f 1866 1878 1887 +f 1878 1894 1887 +f 1965 2032 2011 +f 874 2480 2492 +f 2071 2108 2069 +f 1358 1731 482 +f 430 2021 2034 +f 1965 2003 1964 +f 1855 1889 831 +f 1668 1773 2150 +f 1390 2156 1238 +f 898 869 1903 +f 2391 2407 2362 +f 2121 2111 2074 +f 1548 1259 2164 +f 2099 2129 2091 +f 1550 1853 501 +f 1853 1852 501 +f 952 2017 969 +f 2085 2121 2074 +f 2130 2006 1391 +f 2144 1367 543 +f 2100 2146 2099 +f 1545 1319 113 +f 1903 1922 898 +f 1922 1931 898 +f 585 2170 1641 +f 2007 2017 952 +f 2017 2074 969 +f 1558 1753 1813 +f 837 2005 1517 +f 2005 2006 2130 +f 1532 1474 1528 +f 2003 1981 1948 +f 2070 2071 2069 +f 1922 919 1931 +f 2017 2085 2074 +f 2085 2104 2121 +f 2100 2099 2082 +f 2156 2110 2034 +f 505 2474 2004 +f 1903 871 1922 +f 1922 1952 919 +f 919 1952 1985 +f 1985 2001 2007 +f 2001 2036 2017 +f 2007 2001 2017 +f 2017 2036 2085 +f 2036 2047 2085 +f 2047 2075 2085 +f 2075 2104 2085 +f 1948 1993 2023 +f 2400 2422 2407 +f 2011 2070 1993 +f 2033 2043 2025 +f 2012 2015 1698 +f 1876 1338 2165 +f 871 1940 1922 +f 1985 1976 2001 +f 2121 2104 2143 +f 1051 1413 1456 +f 2358 1362 2379 +f 1859 1789 1870 +f 2090 2109 2071 +f 1405 1398 1885 +f 1886 1884 1355 +f 1922 1960 1952 +f 1952 1960 1985 +f 1960 1976 1985 +f 1956 1948 1936 +f 2135 209 2128 +f 2157 1875 1212 +f 2160 2168 2169 +f 1900 1461 1918 +f 2001 2018 2036 +f 2075 2086 2104 +f 2111 2142 2103 +f 1937 1956 1936 +f 2023 2070 2061 +f 2135 2128 2108 +f 2042 2071 2011 +f 2138 413 2383 +f 2033 2072 2043 +f 1922 1940 1960 +f 2070 2069 2061 +f 2069 2108 2061 +f 2108 2119 2135 +f 1855 1904 1889 +f 1889 1904 871 +f 871 1904 1940 +f 1976 2018 2001 +f 2036 2018 2047 +f 2122 2143 2104 +f 216 1642 489 +f 2148 984 2143 +f 1975 1974 1967 +f 2157 1683 1516 +f 1614 1593 1594 +f 2269 2270 2276 +f 1926 2147 29 +f 2082 2091 2072 +f 430 503 2059 +f 1904 1905 1940 +f 1940 1961 1960 +f 1961 1976 1960 +f 2087 2086 2075 +f 2065 2156 1390 +f 1820 1838 1900 +f 534 1308 837 +f 2167 273 1018 +f 831 1850 1855 +f 2019 2037 2018 +f 2018 2037 2047 +f 2037 2075 2047 +f 2086 2095 2104 +f 2095 2122 2104 +f 2122 2148 2143 +f 1926 1213 1995 +f 1405 1885 1761 +f 2006 2013 2012 +f 2211 2233 2216 +f 1855 1890 1904 +f 1904 1895 1905 +f 1905 1932 1940 +f 1961 1977 1976 +f 1976 1986 2018 +f 2484 2476 1518 +f 1870 1411 1859 +f 1548 2142 2111 +f 1904 1890 1895 +f 1895 1932 1905 +f 1940 1932 1961 +f 1976 1977 1986 +f 1986 2008 2018 +f 2018 2008 2019 +f 2087 2075 2037 +f 2087 2095 2086 +f 2094 1391 1860 +f 1852 1853 2006 +f 1853 2013 2006 +f 929 979 850 +f 1855 1874 1890 +f 2008 2028 2019 +f 1993 2070 2023 +f 1705 1799 1998 +f 1491 2147 206 +f 1851 1856 1855 +f 1895 1890 1874 +f 2038 2019 2028 +f 2038 2048 2037 +f 2019 2038 2037 +f 2048 2067 2087 +f 2037 2048 2087 +f 2087 2067 2095 +f 2095 2149 2122 +f 2149 2148 2122 +f 1308 2005 837 +f 209 1308 1387 +f 1601 2102 1927 +f 254 170 201 +f 1800 1403 1763 +f 1510 1346 1740 +f 870 871 1903 +f 1919 1650 1619 +f 2148 1667 1753 +f 1932 1923 1961 +f 1977 1953 1986 +f 2067 2112 2095 +f 2112 2149 2095 +f 2148 2149 1667 +f 2422 2421 2407 +f 1926 2026 1213 +f 1912 2144 543 +f 2128 1387 2153 +f 1733 1510 1740 +f 990 853 2489 +f 503 1214 803 +f 1921 431 2163 +f 2146 2145 2129 +f 2144 1921 2163 +f 1855 1856 1874 +f 1895 1923 1932 +f 1923 1941 1961 +f 1961 1941 1977 +f 2048 2076 2067 +f 2076 2113 2067 +f 2067 2113 2112 +f 1723 1900 1937 +f 1870 1900 1723 +f 1367 2163 1338 +f 520 1346 1510 +f 1698 1831 1861 +f 1984 1919 2045 +f 1895 1891 1923 +f 2008 1986 2028 +f 1948 1981 1993 +f 1883 1346 520 +f 1883 1814 1346 +f 1930 206 2147 +f 2499 2486 1447 +f 1891 1906 1923 +f 1923 1953 1941 +f 1953 1977 1941 +f 1953 1987 1986 +f 2113 2123 2112 +f 2123 2149 2112 +f 1387 1308 1226 +f 1599 1688 1346 +f 2093 1390 1537 +f 2003 2011 1981 +f 1987 2028 1986 +f 2038 2049 2048 +f 2048 2049 2076 +f 1813 1667 2149 +f 2123 1813 2149 +f 1461 1469 1964 +f 1757 1510 1743 +f 505 1930 1999 +f 2223 1784 1789 +f 1532 1522 1651 +f 1906 1913 1923 +f 1913 1943 1923 +f 1943 1942 1923 +f 1923 1942 1953 +f 1942 1987 1953 +f 1308 1852 2005 +f 2053 1814 1883 +f 1733 1740 1541 +f 2154 1886 1355 +f 1503 1528 1474 +f 1874 1879 1895 +f 1895 1879 1891 +f 2076 2124 2113 +f 2113 2124 2123 +f 1896 1891 1879 +f 1891 1896 1906 +f 1942 1962 1987 +f 1962 2009 2028 +f 1987 1962 2028 +f 2009 2038 2028 +f 2109 2119 2071 +f 1918 1956 1937 +f 1851 1864 1856 +f 1896 1897 1906 +f 1906 1897 1913 +f 1943 1962 1942 +f 2049 2077 2076 +f 2124 2125 2123 +f 1930 2147 1926 +f 1902 1894 1878 +f 482 1510 1757 +f 2129 2137 2120 +f 503 803 2059 +f 1847 1857 1851 +f 1851 1857 1864 +f 2039 2038 2009 +f 2038 2039 2049 +f 2076 2077 2124 +f 2150 1813 2123 +f 482 520 1510 +f 1994 1821 2046 +f 2044 2004 1764 +f 1864 1867 1856 +f 1867 1874 1856 +f 1897 1944 1913 +f 1943 1944 1962 +f 2124 2126 2125 +f 2150 2123 2125 +f 2099 2146 2129 +f 2041 1995 2098 +f 1605 1641 2151 +f 1847 1959 1857 +f 1874 1867 1879 +f 1913 1944 1943 +f 1944 1963 1962 +f 2077 2096 2124 +f 2096 2126 2124 +f 2126 2150 2125 +f 941 1650 1919 +f 2135 2136 209 +f 1884 1886 2014 +f 2049 2029 2077 +f 1388 2127 1389 +f 1389 2127 1566 +f 1930 1926 1995 +f 941 1919 1316 +f 2110 503 430 +f 1867 1880 1879 +f 1879 1880 1896 +f 1897 1907 1944 +f 1963 1978 1962 +f 1962 1978 2009 +f 2039 2029 2049 +f 2077 2078 2096 +f 822 823 827 +f 2166 1668 2150 +f 81 941 1316 +f 2204 2216 2203 +f 2011 2071 2070 +f 1880 1892 1896 +f 1892 1907 1897 +f 1896 1892 1897 +f 1907 1914 1944 +f 1978 2010 2009 +f 2010 2039 2009 +f 1688 1740 1346 +f 1789 1820 1870 +f 2130 1391 2094 +f 1944 1945 1963 +f 2029 2078 2077 +f 1767 2150 2126 +f 1767 2166 2150 +f 803 2022 2467 +f 1503 1927 2102 +f 1914 1954 1944 +f 1944 1954 1945 +f 1963 1970 1978 +f 2078 2105 2096 +f 2105 2126 2096 +f 1965 2011 2003 +f 192 1626 1358 +f 2101 1559 1594 +f 1930 2041 1999 +f 1698 1876 2165 +f 1398 1871 891 +f 2165 1338 1681 +f 1970 2010 1978 +f 2010 2030 2029 +f 2039 2010 2029 +f 2030 2055 2078 +f 2029 2030 2078 +f 1849 1848 2175 +f 1871 1862 891 +f 543 2015 2014 +f 1857 1858 1864 +f 1864 1858 1867 +f 1963 1945 1970 +f 2055 2088 2078 +f 2078 2088 2105 +f 2105 2131 2126 +f 2126 2131 1767 +f 2063 2083 2033 +f 2161 2171 209 +f 2032 2042 2011 +f 1813 2150 1773 +f 1914 1908 1954 +f 1970 1979 2010 +f 2088 2131 2105 +f 2015 543 1876 +f 1694 1692 1048 +f 1395 2207 1859 +f 1395 1393 2207 +f 1730 1784 1736 +f 2500 2466 2470 +f 1709 1701 1757 +f 1945 1979 1970 +f 2030 2050 2055 +f 2350 2317 2286 +f 2154 2155 1886 +f 871 860 1889 +f 2161 209 2136 +f 2497 2463 2493 +f 2190 2204 2203 +f 1800 2179 1404 +f 2477 2469 1385 +f 1385 1715 2477 +f 2128 209 1387 +f 1858 1868 1867 +f 1867 1881 1880 +f 1893 1892 1880 +f 1881 1893 1880 +f 1893 1907 1892 +f 1907 1908 1914 +f 1954 1979 1945 +f 1979 1980 2010 +f 2131 2159 1767 +f 1765 93 339 +f 1761 1877 1405 +f 523 1347 515 +f 1541 2157 1738 +f 2144 2163 1367 +f 1380 1389 1566 +f 2317 2392 2316 +f 1994 2498 1801 +f 1867 1868 1881 +f 1980 2050 2030 +f 2010 1980 2030 +f 2050 2089 2055 +f 2055 2089 2088 +f 2088 2114 2131 +f 1538 1651 1659 +f 2145 2155 2129 +f 2140 29 1928 +f 2370 2033 2025 +f 2252 2239 2240 +f 2239 2252 1862 +f 2392 2391 2316 +f 2469 2501 1385 +f 2477 1715 1710 +f 502 1614 1643 +f 2438 1227 2431 +f 1915 1907 1893 +f 1915 1908 1907 +f 1954 1908 1979 +f 1908 1988 1979 +f 1979 1988 1980 +f 2114 2159 2131 +f 2155 2154 2129 +f 508 1966 2144 +f 872 1756 1626 +f 1710 1715 1505 +f 236 1966 508 +f 2272 2284 1398 +f 2325 2355 2319 +f 1548 2121 1779 +f 1532 1528 1522 +f 1980 2056 2050 +f 2050 2056 2089 +f 2013 2015 2012 +f 1964 2003 1956 +f 2006 2012 1391 +f 1565 1927 1503 +f 2244 2243 2226 +f 5 1715 1385 +f 1858 1848 1868 +f 1915 1946 1908 +f 1946 1988 1908 +f 1980 2020 2056 +f 2115 2159 2114 +f 2092 2083 2063 +f 1398 2284 1687 +f 2162 2155 2145 +f 519 2475 2488 +f 2158 5 1385 +f 5 1505 1715 +f 1692 1694 1505 +f 1988 2020 1980 +f 2115 2169 2159 +f 2169 2168 2159 +f 2083 2082 2072 +f 1316 1984 1983 +f 1488 1619 1650 +f 2083 2072 2033 +f 2361 1210 1233 +f 1933 1946 1915 +f 2056 2079 2089 +f 2088 2115 2114 +f 2099 2091 2082 +f 2162 532 2155 +f 1852 2006 2005 +f 2023 2061 2052 +f 2176 2184 2175 +f 2162 985 532 +f 1909 1893 1881 +f 1909 1915 1893 +f 1988 2040 2020 +f 2040 2056 2020 +f 2089 2079 2088 +f 2088 2079 2115 +f 1782 1444 1882 +f 1216 1215 2320 +f 867 1939 1894 +f 867 903 1939 +f 1372 2398 1379 +f 1863 504 2027 +f 2158 1385 504 +f 1868 1782 1881 +f 1909 1933 1915 +f 2040 1988 1946 +f 1481 2024 1492 +f 2120 2136 2119 +f 1522 1528 1518 +f 1871 1398 1405 +f 1221 1408 1399 +f 1357 5 2158 +f 2179 1800 1763 +f 1868 1865 1782 +f 1882 1881 1782 +f 1882 1909 1881 +f 2040 2057 2056 +f 2106 2079 2056 +f 2057 2106 2056 +f 2106 2132 2079 +f 2132 2115 2079 +f 2115 2132 2169 +f 532 985 597 +f 2092 2100 2082 +f 1210 1221 1399 +f 1399 1233 1210 +f 2130 2002 1517 +f 1849 1865 1868 +f 1933 2040 1946 +f 52 1269 30 +f 1667 1813 1753 +f 1997 1380 1673 +f 940 1008 1088 +f 1947 1994 2046 +f 1882 1916 1909 +f 1924 1933 1909 +f 1533 2040 1933 +f 1533 1534 2040 +f 2058 2040 1534 +f 2058 2057 2040 +f 1238 191 1768 +f 1997 1389 1380 +f 1875 1541 1554 +f 1854 504 1863 +f 1854 2158 504 +f 2396 1275 2406 +f 2426 2443 153 +f 1916 1924 1909 +f 1925 1935 1934 +f 1870 1723 1426 +f 2058 2097 2057 +f 2097 2106 2057 +f 2132 2151 2169 +f 2151 2160 2169 +f 1106 1635 1562 +f 1957 1768 1681 +f 1957 2051 1768 +f 526 535 33 +f 1614 1594 1609 +f 2233 2229 2216 +f 2496 2027 2084 +f 2496 1863 2027 +f 2117 1854 1863 +f 2016 2158 1854 +f 2016 1504 1357 +f 2158 2016 1357 +f 1114 236 1661 +f 2129 2154 2137 +f 2133 2106 2097 +f 2491 1999 2041 +f 2051 1238 1768 +f 2061 2108 2081 +f 2189 2195 2186 +f 2348 2349 2362 +f 1701 192 482 +f 505 1737 1707 +f 2133 2132 2106 +f 2132 2133 2151 +f 2151 2170 2160 +f 502 1661 2162 +f 1998 1389 1997 +f 2297 2352 2329 +f 2352 2364 2329 +f 2394 2414 2364 +f 2352 2394 2364 +f 2402 512 2415 +f 2255 2254 2243 +f 2446 1365 2456 +f 2271 2282 2298 +f 846 2283 2264 +f 2293 2310 2318 +f 2254 2295 2294 +f 2283 2290 2278 +f 2270 2294 2293 +f 2423 2455 2400 +f 2281 2287 2267 +f 2190 2191 2204 +f 2271 2263 2282 +f 2334 2329 2364 +f 2424 2432 2409 +f 2282 2263 2298 +f 1409 1659 1958 +f 2263 2302 2298 +f 2297 2329 2296 +f 1256 446 2346 +f 1958 2502 2478 +f 2437 2399 2444 +f 263 2366 2359 +f 849 827 823 +f 2311 2325 2290 +f 2499 2379 2434 +f 2446 2456 2423 +f 947 2358 2379 +f 2499 947 2379 +f 2205 2195 2212 +f 2245 2237 2227 +f 2245 2256 2237 +f 2256 2263 2271 +f 556 571 2305 +f 1528 2068 1518 +f 2424 2439 2432 +f 2302 2352 2297 +f 1866 2237 826 +f 2248 2242 2211 +f 2334 2364 2363 +f 2235 2244 2226 +f 2255 2295 2254 +f 2329 2324 2296 +f 2439 2447 1973 +f 2329 2334 2324 +f 2409 2432 2414 +f 2293 2318 2276 +f 866 2425 2416 +f 1487 1493 2372 +f 2237 2231 2230 +f 2415 512 17 +f 2035 1236 26 +f 921 2138 688 +f 2491 2482 2462 +f 6 181 197 +f 2481 948 1795 +f 2138 2383 2382 +f 2377 2394 2352 +f 2377 506 2394 +f 2394 506 2402 +f 2401 2402 2415 +f 2394 2402 2401 +f 2318 2326 2276 +f 2439 2457 2432 +f 2298 2302 2297 +f 2244 2249 2243 +f 2404 1100 2382 +f 2238 2245 2227 +f 2245 2257 2256 +f 2257 2263 2256 +f 2324 2334 2328 +f 2257 2289 2263 +f 2289 2302 2263 +f 2236 2231 2250 +f 2138 2382 688 +f 2383 2404 2382 +f 1100 2404 2343 +f 2353 2352 2302 +f 2353 2377 2352 +f 2237 2230 2220 +f 2335 2355 2325 +f 2308 2340 2315 +f 2253 2269 2276 +f 2311 2335 2325 +f 2439 2424 511 +f 2268 2267 2248 +f 2383 413 2404 +f 123 971 832 +f 2234 2243 2269 +f 2225 2213 2234 +f 2219 2213 2225 +f 2195 2196 2212 +f 1544 2418 1549 +f 413 866 2404 +f 2404 866 2416 +f 2416 2417 2404 +f 2404 2417 2343 +f 2415 2409 2401 +f 2196 2219 2212 +f 2268 2248 2218 +f 2206 2214 2197 +f 2417 2332 2343 +f 2343 2332 832 +f 2330 2302 2289 +f 2330 2353 2302 +f 2453 2454 515 +f 2218 2248 2217 +f 2218 2217 2205 +f 2276 2281 2268 +f 2178 2197 2177 +f 2197 2189 2177 +f 2332 2066 832 +f 832 2066 123 +f 2231 2236 2230 +f 669 950 1144 +f 2217 2211 2199 +f 1216 1209 1217 +f 2066 2365 123 +f 2230 2226 2214 +f 2290 2325 2304 +f 2325 2319 2304 +f 2217 2248 2211 +f 2191 2192 2199 +f 510 525 2035 +f 2417 1917 2332 +f 2332 1917 2066 +f 2408 2413 2341 +f 2248 2267 2242 +f 2326 2333 2281 +f 1340 2365 2066 +f 2440 1302 1340 +f 2226 2230 2235 +f 1153 1163 1116 +f 2431 2455 2438 +f 2416 2425 2417 +f 2495 2474 2462 +f 2290 2304 2277 +f 825 2227 1872 +f 151 239 1038 +f 9 151 1038 +f 545 928 2381 +f 2440 2406 1384 +f 928 1596 2381 +f 2186 2188 2185 +f 2456 26 1888 +f 2287 2333 2262 +f 2425 2342 2417 +f 2342 1917 2417 +f 1917 877 2066 +f 2336 1340 2066 +f 2336 2440 1340 +f 2328 2351 2327 +f 825 2238 2227 +f 2351 2368 2327 +f 1222 2388 1211 +f 678 756 734 +f 428 263 1343 +f 2188 2191 2190 +f 2341 2376 2333 +f 2066 877 2336 +f 2290 2277 2278 +f 739 634 592 +f 675 304 14 +f 2384 675 14 +f 2199 2211 2204 +f 2191 2199 2204 +f 2322 2318 2310 +f 2287 2262 2233 +f 2185 2188 2184 +f 2386 2425 845 +f 2384 572 675 +f 1128 123 2365 +f 832 971 2343 +f 2188 2186 2191 +f 2185 2184 2176 +f 2345 1917 2342 +f 2345 877 1917 +f 2336 2406 2440 +f 971 1100 2343 +f 2299 2289 2257 +f 2299 2303 2289 +f 2249 2255 2243 +f 506 513 512 +f 2437 955 1219 +f 1587 2398 1324 +f 877 2396 2336 +f 2336 2396 2406 +f 2463 2479 879 +f 2376 2412 2350 +f 2281 2267 2268 +f 2303 2330 2289 +f 624 635 159 +f 1996 2356 1561 +f 2449 2436 1996 +f 2356 2054 2451 +f 928 2398 1587 +f 2333 2350 2262 +f 2035 26 2456 +f 2346 2342 2425 +f 2346 2345 2342 +f 1544 2380 2418 +f 2412 2392 2350 +f 622 509 1151 +f 2436 2054 1996 +f 545 2451 928 +f 2326 2341 2333 +f 2346 2425 2386 +f 1365 2035 2456 +f 2369 2377 2353 +f 2369 506 2377 +f 2451 900 928 +f 900 2398 928 +f 1235 1888 1244 +f 2337 2345 2346 +f 877 772 2396 +f 772 1275 2396 +f 2432 2446 2414 +f 2294 2295 2310 +f 2369 2330 828 +f 2418 2419 2436 +f 2450 2429 2436 +f 2436 2429 2054 +f 2490 2494 1656 +f 1321 155 2338 +f 1256 2346 2386 +f 2448 877 2345 +f 877 2448 772 +f 2446 2423 2414 +f 2351 2334 2363 +f 2243 2254 2269 +f 2380 2419 2418 +f 2419 2450 2436 +f 2283 2278 2264 +f 822 2197 823 +f 1008 1759 1565 +f 2448 2345 2337 +f 2270 2293 2276 +f 2323 2324 2328 +f 2429 1012 2054 +f 2226 2243 2213 +f 2395 325 772 +f 2370 2367 2380 +f 2054 2435 2451 +f 2435 2397 2451 +f 2451 2397 900 +f 1774 1974 1975 +f 2305 2290 2283 +f 846 2305 2283 +f 2320 1215 2285 +f 2139 2448 2337 +f 2448 2395 772 +f 1232 1231 1216 +f 2272 2285 2284 +f 2367 2371 2380 +f 2371 2405 2380 +f 2380 2405 2419 +f 2419 2429 2450 +f 2429 176 1012 +f 2397 2373 900 +f 2373 2398 900 +f 2373 1379 2398 +f 2372 1500 1508 +f 1133 1303 1142 +f 2252 2273 2272 +f 891 2252 2272 +f 2419 2405 2429 +f 2405 2430 2429 +f 2429 2430 176 +f 2189 2186 2181 +f 2212 2219 2218 +f 2312 2139 2337 +f 2139 2384 2448 +f 2448 2384 2395 +f 899 855 843 +f 2272 2273 2285 +f 2331 2303 2299 +f 176 2435 2054 +f 1012 176 2054 +f 2177 2185 2176 +f 2218 2219 2225 +f 1216 1220 1215 +f 2378 2139 2312 +f 2384 14 2395 +f 2324 2295 2255 +f 2240 2273 2252 +f 2371 2387 2405 +f 2410 2430 2405 +f 2430 2442 176 +f 2435 2344 2397 +f 2397 2344 2373 +f 2456 1888 2455 +f 2242 2267 2233 +f 2233 2262 2229 +f 2378 2384 2139 +f 2323 2310 2295 +f 2323 2322 2310 +f 2240 2274 2273 +f 974 841 990 +f 2490 1447 2486 +f 2387 2410 2405 +f 2442 2141 176 +f 2344 1778 2373 +f 972 1379 2373 +f 1778 972 2373 +f 1379 972 428 +f 1211 2437 1223 +f 1228 1215 1220 +f 702 2378 2312 +f 17 518 2415 +f 1888 26 1244 +f 2324 2323 2295 +f 2305 2311 2290 +f 2307 2285 2273 +f 2274 2307 2273 +f 2307 2320 2285 +f 2369 531 506 +f 2435 2258 2344 +f 2296 2324 2288 +f 1233 1217 2361 +f 2360 2371 2367 +f 2410 2442 2430 +f 176 2141 2258 +f 176 2258 2435 +f 539 2331 66 +f 2350 2392 2317 +f 2268 2225 2253 +f 1508 1500 2371 +f 2360 1508 2371 +f 2371 1500 2387 +f 972 2366 428 +f 1626 1686 1358 +f 1759 1807 1819 +f 2277 2257 2245 +f 2277 2299 2257 +f 1784 2228 1736 +f 2265 2240 1736 +f 2228 2265 1736 +f 2265 2274 2240 +f 1209 2320 2307 +f 2320 1209 1216 +f 1555 1584 1560 +f 2387 1500 2372 +f 2410 2420 2442 +f 2433 972 1778 +f 2433 2366 972 +f 955 522 1225 +f 2339 2307 2274 +f 2372 1493 2387 +f 2411 2420 2410 +f 2420 954 2442 +f 2442 954 2141 +f 2344 2433 1778 +f 2205 2212 2218 +f 2328 2334 2351 +f 2394 2401 2414 +f 2250 2256 2271 +f 2339 1209 2307 +f 2328 2322 2323 +f 866 845 2425 +f 3 316 893 +f 2387 2411 2410 +f 2441 2141 954 +f 2141 2441 2258 +f 2354 2433 2344 +f 2254 2294 2270 +f 2269 2254 2270 +f 863 2305 846 +f 2441 2354 2258 +f 2258 2354 2344 +f 2319 2355 51 +f 2223 2228 1784 +f 1493 2411 2387 +f 1560 2449 1555 +f 2288 2324 2255 +f 825 2251 2238 +f 2251 2245 2238 +f 1299 84 1312 +f 2246 2265 2228 +f 2313 2274 2265 +f 2313 2339 2274 +f 2251 2277 2245 +f 2319 51 2331 +f 891 1862 2252 +f 2443 954 2420 +f 2443 2441 954 +f 511 2447 2439 +f 2242 2233 2211 +f 188 15 814 +f 2443 2426 2441 +f 2426 2354 2441 +f 2306 2403 2433 +f 2433 2403 2366 +f 539 2303 2331 +f 2246 2228 2223 +f 1030 1819 1807 +f 2354 2306 2433 +f 2413 2412 2376 +f 2438 2455 1888 +f 1848 1857 2176 +f 2207 2208 2223 +f 2208 2246 2223 +f 1209 2339 1217 +f 2339 2361 1217 +f 1221 1210 2388 +f 554 109 78 +f 386 1375 95 +f 2327 2326 2318 +f 2179 2182 1393 +f 2182 2208 1393 +f 1393 2208 2207 +f 2361 2399 2388 +f 2388 2399 1211 +f 2306 2354 2426 +f 2403 2359 2366 +f 2214 2226 2213 +f 2268 2253 2276 +f 889 2200 2179 +f 2200 2182 2179 +f 2200 2221 2182 +f 2221 2208 2182 +f 2314 2265 2246 +f 2314 2313 2265 +f 2339 2374 2361 +f 2478 2434 2379 +f 2205 2217 2199 +f 2208 2259 2246 +f 2259 2275 2246 +f 2314 2321 2313 +f 2313 2347 2339 +f 2347 2374 2339 +f 2374 2399 2361 +f 153 154 2426 +f 154 2306 2426 +f 2385 2359 2403 +f 2221 2259 2208 +f 2306 2357 2403 +f 2357 2385 2403 +f 2237 2256 2231 +f 2172 2180 889 +f 2180 2200 889 +f 2200 2201 2221 +f 2246 2291 2314 +f 2374 2444 2399 +f 571 555 2311 +f 2192 2205 2199 +f 2173 2180 2172 +f 2279 2246 2275 +f 2279 2291 2246 +f 2292 2314 2291 +f 2321 2362 2313 +f 2362 2347 2313 +f 2347 2389 2374 +f 2444 955 2437 +f 2292 2291 2279 +f 2452 2444 2374 +f 2054 2356 1996 +f 2338 2306 154 +f 2186 2192 2191 +f 2193 2201 2200 +f 2259 2221 2201 +f 2247 2259 2201 +f 2452 955 2444 +f 2278 2277 2251 +f 2338 2357 2306 +f 2181 2186 2185 +f 2276 2326 2281 +f 2432 2457 2446 +f 2198 2201 2193 +f 2198 2232 2201 +f 2232 2247 2201 +f 2389 2452 2374 +f 2452 1630 955 +f 1403 1749 1444 +f 1555 1996 1561 +f 2357 2427 2385 +f 2385 2428 230 +f 2409 2415 2424 +f 2304 2331 2299 +f 2193 2200 2180 +f 2445 2452 2389 +f 1565 1759 1927 +f 2380 1544 2370 +f 2338 2427 2357 +f 2427 2428 2385 +f 230 222 253 +f 2202 2198 2193 +f 2202 2209 2198 +f 2209 2241 2198 +f 2241 2232 2198 +f 2266 2275 2259 +f 2365 1340 1128 +f 2415 518 2424 +f 2338 170 2427 +f 170 2428 2427 +f 2181 2185 2177 +f 2196 2195 2189 +f 2183 2193 2180 +f 2453 1630 2452 +f 2197 2214 2189 +f 2401 2409 2414 +f 822 2220 2197 +f 1210 2361 2388 +f 2187 2193 2183 +f 2187 2202 2193 +f 2266 2279 2275 +f 2279 2300 2292 +f 2375 2347 2362 +f 2375 2390 2347 +f 2390 2389 2347 +f 2453 2452 2445 +f 1347 1630 2453 +f 1630 1347 522 +f 2220 2206 2197 +f 2262 2350 2286 +f 170 254 2428 +f 2457 1973 2446 +f 1973 1365 2446 +f 2174 2183 2180 +f 2194 2202 2187 +f 2222 2241 2209 +f 2222 2260 2241 +f 2266 2259 2247 +f 2390 2445 2389 +f 2264 2251 825 +f 2363 2368 2351 +f 2326 2393 2341 +f 1855 1850 1851 +f 2210 2209 2202 +f 2210 2222 2209 +f 2261 2260 2222 +f 2280 2279 2266 +f 2280 2300 2279 +f 251 263 2359 +f 2277 2304 2299 +f 2220 2230 2206 +f 2202 2194 2210 +f 2213 2243 2234 +f 2328 2327 2322 +f 2294 2310 2293 +f 2214 2196 2189 +f 2196 2213 2219 +f 2224 2222 2210 +f 2421 2390 2375 +f 2206 2230 2214 +f 2194 2203 2210 +f 2224 2261 2222 +f 2421 2445 2390 +f 2322 2327 2318 +f 2393 2408 2341 +f 1365 1973 510 +f 2216 2210 2203 +f 2216 2224 2210 +f 2266 2308 2280 +f 2280 2308 2300 +f 2407 2421 2375 +f 2175 2183 2174 +f 2194 2190 2203 +f 2454 2445 2421 +f 522 1347 523 +f 2456 2455 2423 +f 823 2197 2178 +f 2281 2333 2287 +f 2188 2187 2183 +f 2188 2190 2194 +f 2187 2188 2194 +f 2308 2315 2300 +f 2407 2375 2362 +f 2443 2420 2503 +f 2420 2411 2503 +f 2411 1493 2503 +f 1493 1487 2503 +f 1487 1318 2503 +f 1318 1320 2503 +f 1320 2443 2503 diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/Duck.glb b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/Duck.glb new file mode 100644 index 0000000000000000000000000000000000000000..94bef4cde7680d26a04007f779f3eb866fd60d42 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/Duck.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65bf938f54d6073e619e76e007820bbf980cdc3dc0daec0d94830ffc4ae54ab5 +size 120484 diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/api-logo.svg b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/api-logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..bce49a58f0e8a89980e96b8f3bb99f7da48e6254 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/api-logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/camera.svg b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/camera.svg new file mode 100644 index 0000000000000000000000000000000000000000..b46daebb74be9fffa8868fcee3d9f2e8759d08d3 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/camera.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/clear.svg b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/clear.svg new file mode 100644 index 0000000000000000000000000000000000000000..bea03307482b585d819f3d581731e17e0ed37c29 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/clear.svg @@ -0,0 +1,67 @@ + + + + + + + + + + + + + diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/edit.svg b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/edit.svg new file mode 100644 index 0000000000000000000000000000000000000000..07fbe15983f2a5a9f9447c21a414a5c82ee8dadf --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/edit.svg @@ -0,0 +1,39 @@ + + + + + + diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/javascript.svg b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/javascript.svg new file mode 100644 index 0000000000000000000000000000000000000000..426b76c2fb75e27d9825661ddf341ac7aa0e5ced --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/javascript.svg @@ -0,0 +1,16 @@ + diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/logo.svg b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..069779a490d8e0dc7cbfe41ed8a81fd6e5444dc9 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/logo.svg @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/logo_error.svg b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/logo_error.svg new file mode 100644 index 0000000000000000000000000000000000000000..5662b675528d13bd1cd70254cc125e27104f4409 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/logo_error.svg @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + ERROR + + + diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/python.svg b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/python.svg new file mode 100644 index 0000000000000000000000000000000000000000..ae0065b85722deca4baac8222b2ebf1df4a1c82b --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/python.svg @@ -0,0 +1,20 @@ + diff --git a/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/undo-solid.svg b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/undo-solid.svg new file mode 100644 index 0000000000000000000000000000000000000000..bbbc9670bbf3efdd50fb683f2fb5eac6eaff9f81 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/templates/cdn/static/img/undo-solid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/valley/lib/python3.10/site-packages/gradio/test_data/__init__.py b/valley/lib/python3.10/site-packages/gradio/test_data/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/valley/lib/python3.10/site-packages/gradio/test_data/__pycache__/__init__.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/test_data/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..298c662f519331159b9936c433035d8619c3bd7e Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/test_data/__pycache__/__init__.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/test_data/cheetah1-copy.jpg b/valley/lib/python3.10/site-packages/gradio/test_data/cheetah1-copy.jpg new file mode 100644 index 0000000000000000000000000000000000000000..66d3b48fd19cd8cd8d8437b6f33183b3d3d42589 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/test_data/cheetah1-copy.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35550bfbba996e59c242af00f6a14a9c0d055dfbc52ad069a1a4e8c1c39ca095 +size 20552 diff --git a/valley/lib/python3.10/site-packages/gradio/test_data/cheetah1.jpg b/valley/lib/python3.10/site-packages/gradio/test_data/cheetah1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..66d3b48fd19cd8cd8d8437b6f33183b3d3d42589 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/test_data/cheetah1.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35550bfbba996e59c242af00f6a14a9c0d055dfbc52ad069a1a4e8c1c39ca095 +size 20552 diff --git a/valley/lib/python3.10/site-packages/gradio/test_data/cheetah2.jpg b/valley/lib/python3.10/site-packages/gradio/test_data/cheetah2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f312c4f2abbefd552500da80a4c5242d77c752c1 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/test_data/cheetah2.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6882e714aa43d60a429f704a5ddd3af4b3708f89701b3bcc9626121349853795 +size 72783 diff --git a/valley/lib/python3.10/site-packages/gradio/test_data/flagged_no_log/b.txt b/valley/lib/python3.10/site-packages/gradio/test_data/flagged_no_log/b.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/valley/lib/python3.10/site-packages/gradio/test_data/lion.jpg b/valley/lib/python3.10/site-packages/gradio/test_data/lion.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2cf5afb1f0bfe6dac09b7fd6bfeb68e5e80dbe33 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/test_data/lion.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c45ece00075f152cb2e6cfd5f1dfd7dc8e83042264685b4f470026240eff3ef +size 18489 diff --git a/valley/lib/python3.10/site-packages/gradio/test_data/test_audio.wav b/valley/lib/python3.10/site-packages/gradio/test_data/test_audio.wav new file mode 100644 index 0000000000000000000000000000000000000000..fdcd1f3e0c1888812f7c743effe7e7a6021693a4 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/test_data/test_audio.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d99921f99c5029251e2372a70aba0b0f08a6edd4a2dce5f6efc27c0eef18b15 +size 47148 diff --git a/valley/lib/python3.10/site-packages/gradio/test_data/test_image.png b/valley/lib/python3.10/site-packages/gradio/test_data/test_image.png new file mode 100644 index 0000000000000000000000000000000000000000..409e16bc4bc041a368443cd79c1201f141f1e114 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/test_data/test_image.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:396c7b535869e4418fd9d9657635e5134c6ba626819059f0b26e9b8fbc82a761 +size 1951 diff --git a/valley/lib/python3.10/site-packages/gradio/themes/__init__.py b/valley/lib/python3.10/site-packages/gradio/themes/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..583b37b242134f43a57d5ec27be44a0e6d65e85f --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/themes/__init__.py @@ -0,0 +1,10 @@ +from gradio.themes import utils # noqa: F401 +from gradio.themes.base import Base, ThemeClass # noqa: F401 +from gradio.themes.default import Default # noqa: F401 +from gradio.themes.glass import Glass # noqa: F401 +from gradio.themes.monochrome import Monochrome # noqa: F401 +from gradio.themes.soft import Soft # noqa: F401 +from gradio.themes.utils import colors, sizes # noqa: F401 +from gradio.themes.utils.colors import Color # noqa: F401 +from gradio.themes.utils.fonts import Font, GoogleFont # noqa: F401 +from gradio.themes.utils.sizes import Size # noqa: F401 diff --git a/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/__init__.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7d03cd2518e1b2590f5fd479fccee131dda1e395 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/__init__.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/app.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/app.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3ab3561c99cae6e48c4babf66cd70066a2f9148c Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/app.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/base.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/base.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0c88da033f401ca52c980b6d6302fba2da537576 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/base.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/default.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/default.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..152a35ff3c42274d97dcd6234d0e2a519dde7ca4 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/default.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/glass.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/glass.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..91567af658c62a79b4ce9c02f6bc5c81af32ea9f Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/glass.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/soft.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/soft.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..beb1862bf66a74965c3f83b27f28d70524167fdf Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/soft.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/upload_theme.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/upload_theme.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e13e37b42637496a8b2beaf76bc5c5090a294efc Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/themes/__pycache__/upload_theme.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/themes/app.py b/valley/lib/python3.10/site-packages/gradio/themes/app.py new file mode 100644 index 0000000000000000000000000000000000000000..dc3f75fffec90c794d8a4618a935c7ed72743677 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/themes/app.py @@ -0,0 +1,147 @@ +import time + +from theme_dropdown import create_theme_dropdown # noqa: F401 + +import gradio as gr + +dropdown, js = create_theme_dropdown() + +with gr.Blocks(theme=gr.themes.Default()) as demo: + with gr.Row().style(equal_height=True): + with gr.Column(scale=10): + gr.Markdown( + """ + # Theme preview: `{THEME}` + To use this theme, set `theme='{AUTHOR}/{SPACE_NAME}'` in `gr.Blocks()` or `gr.Interface()`. + You can append an `@` and a semantic version expression, e.g. @>=1.0.0,<2.0.0 to pin to a given version + of this theme. + """ + ) + with gr.Column(scale=3): + with gr.Box(): + dropdown.render() + toggle_dark = gr.Button(value="Toggle Dark").style(full_width=True) + + dropdown.change(None, dropdown, None, _js=js) + toggle_dark.click( + None, + _js=""" + () => { + document.body.classList.toggle('dark'); + document.querySelector('gradio-app').style.backgroundColor = 'var(--color-background-primary)' + } + """, + ) + + name = gr.Textbox( + label="Name", + info="Full name, including middle name. No special characters.", + placeholder="John Doe", + value="John Doe", + interactive=True, + ) + + with gr.Row(): + slider1 = gr.Slider(label="Slider 1") + slider2 = gr.Slider(label="Slider 2") + gr.CheckboxGroup(["A", "B", "C"], label="Checkbox Group") + + with gr.Row(): + with gr.Column(variant="panel", scale=1): + gr.Markdown("## Panel 1") + radio = gr.Radio( + ["A", "B", "C"], + label="Radio", + info="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", + ) + drop = gr.Dropdown(["Option 1", "Option 2", "Option 3"], show_label=False) + drop_2 = gr.Dropdown( + ["Option A", "Option B", "Option C"], + multiselect=True, + value=["Option A"], + label="Dropdown", + interactive=True, + ) + check = gr.Checkbox(label="Go") + with gr.Column(variant="panel", scale=2): + img = gr.Image( + "https://gradio.app/assets/img/header-image.jpg", label="Image" + ).style(height=320) + with gr.Row(): + go_btn = gr.Button("Go", label="Primary Button", variant="primary") + clear_btn = gr.Button( + "Clear", label="Secondary Button", variant="secondary" + ) + + def go(*args): + time.sleep(3) + return "https://gradio.app/assets/img/header-image.jpg" + + go_btn.click(go, [radio, drop, drop_2, check, name], img, api_name="go") + + def clear(): + time.sleep(0.2) + return None + + clear_btn.click(clear, None, img) + + with gr.Row(): + btn1 = gr.Button("Button 1").style(size="sm") + btn2 = gr.UploadButton().style(size="sm") + stop_btn = gr.Button("Stop", label="Stop Button", variant="stop").style( + size="sm" + ) + + with gr.Row(): + gr.Dataframe(value=[[1, 2, 3], [4, 5, 6], [7, 8, 9]], label="Dataframe") + gr.JSON( + value={"a": 1, "b": 2, "c": {"test": "a", "test2": [1, 2, 3]}}, label="JSON" + ) + gr.Label(value={"cat": 0.7, "dog": 0.2, "fish": 0.1}) + gr.File() + with gr.Row(): + gr.ColorPicker() + gr.Video("https://gradio-static-files.s3.us-west-2.amazonaws.com/world.mp4") + gr.Gallery( + [ + ( + "https://gradio-static-files.s3.us-west-2.amazonaws.com/lion.jpg", + "lion", + ), + ( + "https://gradio-static-files.s3.us-west-2.amazonaws.com/logo.png", + "logo", + ), + ( + "https://gradio-static-files.s3.us-west-2.amazonaws.com/tower.jpg", + "tower", + ), + ] + ).style(height="200px", grid=2) + + with gr.Row(): + with gr.Column(scale=2): + chatbot = gr.Chatbot([("Hello", "Hi")], label="Chatbot") + chat_btn = gr.Button("Add messages") + + def chat(history): + time.sleep(2) + yield [["How are you?", "I am good."]] + + chat_btn.click( + lambda history: history + + [["How are you?", "I am good."]] + + (time.sleep(2) or []), + chatbot, + chatbot, + ) + with gr.Column(scale=1): + with gr.Accordion("Advanced Settings"): + gr.Markdown("Hello") + gr.Number(label="Chatbot control 1") + gr.Number(label="Chatbot control 2") + gr.Number(label="Chatbot control 3") + + +if __name__ == "__main__": + demo.queue().launch() diff --git a/valley/lib/python3.10/site-packages/gradio/themes/base.py b/valley/lib/python3.10/site-packages/gradio/themes/base.py new file mode 100644 index 0000000000000000000000000000000000000000..e6bd49b8218f92c5e8559cc62068df689aade6c8 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/themes/base.py @@ -0,0 +1,1788 @@ +from __future__ import annotations + +import json +import re +import tempfile +import textwrap +from pathlib import Path +from typing import Dict, Iterable + +import huggingface_hub +import requests +import semantic_version as semver +from huggingface_hub import CommitOperationAdd + +from gradio.documentation import document, set_documentation_group +from gradio.themes.utils import ( + colors, + fonts, + get_matching_version, + get_theme_assets, + sizes, +) +from gradio.themes.utils.readme_content import README_CONTENT + +set_documentation_group("themes") + + +class ThemeClass: + def __init__(self): + self._stylesheets = [] + + def _get_theme_css(self): + css = {} + dark_css = {} + + for attr, val in self.__dict__.items(): + if attr.startswith("_"): + continue + if val is None: + if attr.endswith("_dark"): + dark_css[attr[:-5]] = None + continue + else: + raise ValueError( + f"Cannot set '{attr}' to None - only dark mode variables can be None." + ) + val = str(val) + pattern = r"(\*)([\w_]+)(\b)" + + def repl_func(match): + full_match = match.group(0) + if full_match.startswith("*") and full_match.endswith("_dark"): + raise ValueError( + f"Cannot refer '{attr}' to '{val}' - dark variable references are automatically used for dark mode attributes, so do not use the _dark suffix in the value." + ) + if ( + attr.endswith("_dark") + and full_match.startswith("*") + and attr[:-5] == full_match[1:] + ): + raise ValueError( + f"Cannot refer '{attr}' to '{val}' - if dark and light mode values are the same, set dark mode version to None." + ) + + word = match.group(2) + word = word.replace("_", "-") + return f"var(--{word})" + + val = re.sub(pattern, repl_func, val) + + attr = attr.replace("_", "-") + + if attr.endswith("-dark"): + attr = attr[:-5] + dark_css[attr] = val + else: + css[attr] = val + + for attr, val in css.items(): + if attr not in dark_css: + dark_css[attr] = val + + css_code = ( + ":root {\n" + + "\n".join([f" --{attr}: {val};" for attr, val in css.items()]) + + "\n}" + ) + dark_css_code = ( + ".dark {\n" + + "\n".join([f" --{attr}: {val};" for attr, val in dark_css.items()]) + + "\n}" + ) + + return css_code + "\n" + dark_css_code + + def to_dict(self): + """Convert the theme into a python dictionary.""" + schema = {"theme": {}} + for prop in dir(self): + if ( + not prop.startswith("_") + or prop.startswith("_font") + or prop == "_stylesheets" + ) and isinstance(getattr(self, prop), (list, str)): + schema["theme"][prop] = getattr(self, prop) + return schema + + @classmethod + def load(cls, path: str) -> "ThemeClass": + """Load a theme from a json file. + + Parameters: + path: The filepath to read. + """ + theme = json.load(open(path), object_hook=fonts.as_font) + return cls.from_dict(theme) + + @classmethod + def from_dict(cls, theme: Dict[str, Dict[str, str]]) -> "ThemeClass": + """Create a theme instance from a dictionary representation. + + Parameters: + theme: The dictionary representation of the theme. + """ + base = cls() + for prop, value in theme["theme"].items(): + setattr(base, prop, value) + return base + + def dump(self, filename: str): + """Write the theme to a json file. + + Parameters: + filename: The path to write the theme too + """ + as_dict = self.to_dict() + json.dump(as_dict, open(Path(filename), "w"), cls=fonts.FontEncoder) + + @classmethod + def from_hub(cls, repo_name: str, hf_token: str | None = None): + """Load a theme from the hub. + + This DOES NOT require a HuggingFace account for downloading publicly available themes. + + Parameters: + repo_name: string of the form /@. If a semantic version expression is omitted, the latest version will be fetched. + hf_token: HuggingFace Token. Only needed to download private themes. + """ + if "@" not in repo_name: + name, version = repo_name, None + else: + name, version = repo_name.split("@") + + api = huggingface_hub.HfApi(token=hf_token) + + try: + space_info = api.space_info(name) + except requests.HTTPError as e: + raise ValueError(f"The space {name} does not exist") from e + + assets = get_theme_assets(space_info) + matching_version = get_matching_version(assets, version) + + if not matching_version: + raise ValueError( + f"Cannot find a matching version for expression {version} " + f"from files {[f.filename for f in assets]}" + ) + + theme_file = huggingface_hub.hf_hub_download( + repo_id=name, + repo_type="space", + filename=f"themes/theme_schema@{matching_version.version}.json", + ) + return cls.load(theme_file) + + @staticmethod + def _get_next_version(space_info: huggingface_hub.hf_api.SpaceInfo) -> str: + assets = get_theme_assets(space_info) + latest_version = max(assets, key=lambda asset: asset.version).version + return str(latest_version.next_patch()) + + @staticmethod + def _theme_version_exists( + space_info: huggingface_hub.hf_api.SpaceInfo, version: str + ) -> bool: + assets = get_theme_assets(space_info) + return any(a.version == semver.Version(version) for a in assets) + + def push_to_hub( + self, + repo_name: str, + org_name: str | None = None, + version: str | None = None, + hf_token: str | None = None, + theme_name: str | None = None, + description: str | None = None, + private: bool = False, + ): + """Upload a theme to the HuggingFace hub. + + This requires a HuggingFace account. + + Parameters: + repo_name: The name of the repository to store the theme assets, e.g. 'my_theme' or 'sunset'. + org_name: The name of the org to save the space in. If None (the default), the username corresponding to the logged in user, or hƒ_token is used. + version: A semantic version tag for theme. Bumping the version tag lets you publish updates to a theme without changing the look of applications that already loaded your theme. + hf_token: API token for your HuggingFace account + theme_name: Name for the name. If None, defaults to repo_name + description: A long form description to your theme. + """ + + from gradio import __version__ + + api = huggingface_hub.HfApi() + + if not hf_token: + try: + author = huggingface_hub.whoami()["name"] + except OSError as e: + raise ValueError( + "In order to push to hub, log in via `huggingface-cli login` " + "or provide a theme_token to push_to_hub. For more information " + "see https://huggingface.co/docs/huggingface_hub/quick-start#login" + ) from e + else: + author = huggingface_hub.whoami(token=hf_token)["name"] + + space_id = f"{org_name or author}/{repo_name}" + + try: + space_info = api.space_info(space_id) + except requests.HTTPError: + space_info = None + + space_exists = space_info is not None + + # If no version, set the version to next patch release + if not version: + if space_exists: + version = self._get_next_version(space_info) + else: + version = "0.0.1" + else: + _ = semver.Version(version) + + if space_exists and self._theme_version_exists(space_info, version): + raise ValueError( + f"The space {space_id} already has a " + f"theme with version {version}. See: themes/theme_schema@{version}.json. " + "To manually override this version, use the HuggingFace hub UI." + ) + + theme_name = theme_name or repo_name + + with tempfile.NamedTemporaryFile( + mode="w", delete=False, suffix=".json" + ) as css_file: + contents = self.to_dict() + contents["version"] = version + json.dump(contents, css_file, cls=fonts.FontEncoder) + with tempfile.NamedTemporaryFile(mode="w", delete=False) as readme_file: + readme_content = README_CONTENT.format( + theme_name=theme_name, + description=description or "Add a description of this theme here!", + author=author, + gradio_version=__version__, + ) + readme_file.write(textwrap.dedent(readme_content)) + with tempfile.NamedTemporaryFile(mode="w", delete=False) as app_file: + contents = open(str(Path(__file__).parent / "app.py")).read() + contents = re.sub( + r"theme=gr.themes.Default\(\)", + f"theme='{space_id}'", + contents, + ) + contents = re.sub(r"{THEME}", theme_name or repo_name, contents) + contents = re.sub(r"{AUTHOR}", org_name or author, contents) + contents = re.sub(r"{SPACE_NAME}", repo_name, contents) + app_file.write(contents) + + operations = [ + CommitOperationAdd( + path_in_repo=f"themes/theme_schema@{version}.json", + path_or_fileobj=css_file.name, + ), + CommitOperationAdd( + path_in_repo="README.md", path_or_fileobj=readme_file.name + ), + CommitOperationAdd(path_in_repo="app.py", path_or_fileobj=app_file.name), + CommitOperationAdd( + path_in_repo="theme_dropdown.py", + path_or_fileobj=str( + Path(__file__).parent / "utils" / "theme_dropdown.py" + ), + ), + ] + + huggingface_hub.create_repo( + space_id, + repo_type="space", + space_sdk="gradio", + token=hf_token, + exist_ok=True, + private=private, + ) + + api.create_commit( + repo_id=space_id, + commit_message="Updating theme", + repo_type="space", + operations=operations, + token=hf_token, + ) + url = f"https://huggingface.co/spaces/{space_id}" + print(f"See your theme here! {url}") + return url + + +@document("push_to_hub", "from_hub", "load", "dump", "from_dict", "to_dict") +class Base(ThemeClass): + def __init__( + self, + *, + primary_hue: colors.Color | str = colors.blue, + secondary_hue: colors.Color | str = colors.blue, + neutral_hue: colors.Color | str = colors.gray, + text_size: sizes.Size | str = sizes.text_md, + spacing_size: sizes.Size | str = sizes.spacing_md, + radius_size: sizes.Size | str = sizes.radius_md, + font: fonts.Font + | str + | Iterable[fonts.Font | str] = ( + fonts.GoogleFont("Source Sans Pro"), + "ui-sans-serif", + "system-ui", + "sans-serif", + ), + font_mono: fonts.Font + | str + | Iterable[fonts.Font | str] = ( + fonts.GoogleFont("IBM Plex Mono"), + "ui-monospace", + "Consolas", + "monospace", + ), + ): + """ + Parameters: + primary_hue: The primary hue of the theme. Load a preset, like gradio.themes.colors.green (or just the string "green"), or pass your own gradio.themes.utils.Color object. + secondary_hue: The secondary hue of the theme. Load a preset, like gradio.themes.colors.green (or just the string "green"), or pass your own gradio.themes.utils.Color object. + neutral_hue: The neutral hue of the theme, used . Load a preset, like gradio.themes.colors.green (or just the string "green"), or pass your own gradio.themes.utils.Color object. + text_size: The size of the text. Load a preset, like gradio.themes.sizes.text_sm (or just the string "sm"), or pass your own gradio.themes.utils.Size object. + spacing_size: The size of the spacing. Load a preset, like gradio.themes.sizes.spacing_sm (or just the string "sm"), or pass your own gradio.themes.utils.Size object. + radius_size: The radius size of corners. Load a preset, like gradio.themes.sizes.radius_sm (or just the string "sm"), or pass your own gradio.themes.utils.Size object. + font: The primary font to use for the theme. Pass a string for a system font, or a gradio.themes.font.GoogleFont object to load a font from Google Fonts. Pass a list of fonts for fallbacks. + font_mono: The monospace font to use for the theme, applies to code. Pass a string for a system font, or a gradio.themes.font.GoogleFont object to load a font from Google Fonts. Pass a list of fonts for fallbacks. + """ + + def expand_shortcut(shortcut, mode="color", prefix=None): + if not isinstance(shortcut, str): + return shortcut + if mode == "color": + for color in colors.Color.all: + if color.name == shortcut: + return color + raise ValueError(f"Color shortcut {shortcut} not found.") + elif mode == "size": + for size in sizes.Size.all: + if size.name == prefix + "_" + shortcut: + return size + raise ValueError(f"Size shortcut {shortcut} not found.") + + primary_hue = expand_shortcut(primary_hue, mode="color") + secondary_hue = expand_shortcut(secondary_hue, mode="color") + neutral_hue = expand_shortcut(neutral_hue, mode="color") + text_size = expand_shortcut(text_size, mode="size", prefix="text") + spacing_size = expand_shortcut(spacing_size, mode="size", prefix="spacing") + radius_size = expand_shortcut(radius_size, mode="size", prefix="radius") + + # Hue ranges + self.primary_50 = primary_hue.c50 + self.primary_100 = primary_hue.c100 + self.primary_200 = primary_hue.c200 + self.primary_300 = primary_hue.c300 + self.primary_400 = primary_hue.c400 + self.primary_500 = primary_hue.c500 + self.primary_600 = primary_hue.c600 + self.primary_700 = primary_hue.c700 + self.primary_800 = primary_hue.c800 + self.primary_900 = primary_hue.c900 + self.primary_950 = primary_hue.c950 + + self.secondary_50 = secondary_hue.c50 + self.secondary_100 = secondary_hue.c100 + self.secondary_200 = secondary_hue.c200 + self.secondary_300 = secondary_hue.c300 + self.secondary_400 = secondary_hue.c400 + self.secondary_500 = secondary_hue.c500 + self.secondary_600 = secondary_hue.c600 + self.secondary_700 = secondary_hue.c700 + self.secondary_800 = secondary_hue.c800 + self.secondary_900 = secondary_hue.c900 + self.secondary_950 = secondary_hue.c950 + + self.neutral_50 = neutral_hue.c50 + self.neutral_100 = neutral_hue.c100 + self.neutral_200 = neutral_hue.c200 + self.neutral_300 = neutral_hue.c300 + self.neutral_400 = neutral_hue.c400 + self.neutral_500 = neutral_hue.c500 + self.neutral_600 = neutral_hue.c600 + self.neutral_700 = neutral_hue.c700 + self.neutral_800 = neutral_hue.c800 + self.neutral_900 = neutral_hue.c900 + self.neutral_950 = neutral_hue.c950 + + # Spacing + self.spacing_xxs = spacing_size.xxs + self.spacing_xs = spacing_size.xs + self.spacing_sm = spacing_size.sm + self.spacing_md = spacing_size.md + self.spacing_lg = spacing_size.lg + self.spacing_xl = spacing_size.xl + self.spacing_xxl = spacing_size.xxl + + self.radius_xxs = radius_size.xxs + self.radius_xs = radius_size.xs + self.radius_sm = radius_size.sm + self.radius_md = radius_size.md + self.radius_lg = radius_size.lg + self.radius_xl = radius_size.xl + self.radius_xxl = radius_size.xxl + + self.text_xxs = text_size.xxs + self.text_xs = text_size.xs + self.text_sm = text_size.sm + self.text_md = text_size.md + self.text_lg = text_size.lg + self.text_xl = text_size.xl + self.text_xxl = text_size.xxl + + # Font + if not isinstance(font, Iterable): + font = [font] + self._font = [ + fontfam if isinstance(fontfam, fonts.Font) else fonts.Font(fontfam) + for fontfam in font + ] + if not isinstance(font_mono, Iterable): + font_mono = [font_mono] + self._font_mono = [ + fontfam if isinstance(fontfam, fonts.Font) else fonts.Font(fontfam) + for fontfam in font_mono + ] + self.font = ", ".join(str(font) for font in self._font) + self.font_mono = ", ".join(str(font) for font in self._font_mono) + + self._stylesheets = [] + for font in self._font + self._font_mono: + font_stylesheet = font.stylesheet() + if font_stylesheet: + self._stylesheets.append(font_stylesheet) + + self.set() + + def set( + self, + *, + # Body + body_background_fill=None, + body_background_fill_dark=None, + body_text_color=None, + body_text_color_dark=None, + body_text_size=None, + body_text_color_subdued=None, + body_text_color_subdued_dark=None, + body_text_weight=None, + embed_radius=None, + # Core Colors + background_fill_primary=None, + background_fill_primary_dark=None, + background_fill_secondary=None, + background_fill_secondary_dark=None, + border_color_accent=None, + border_color_accent_dark=None, + border_color_primary=None, + border_color_primary_dark=None, + color_accent=None, + color_accent_soft=None, + color_accent_soft_dark=None, + # Text + link_text_color=None, + link_text_color_dark=None, + link_text_color_active=None, + link_text_color_active_dark=None, + link_text_color_hover=None, + link_text_color_hover_dark=None, + link_text_color_visited=None, + link_text_color_visited_dark=None, + prose_text_size=None, + prose_text_weight=None, + prose_header_text_weight=None, + # Shadows + shadow_drop=None, + shadow_drop_lg=None, + shadow_inset=None, + shadow_spread=None, + shadow_spread_dark=None, + # Layout Atoms + block_background_fill=None, + block_background_fill_dark=None, + block_border_color=None, + block_border_color_dark=None, + block_border_width=None, + block_border_width_dark=None, + block_info_text_color=None, + block_info_text_color_dark=None, + block_info_text_size=None, + block_info_text_weight=None, + block_label_background_fill=None, + block_label_background_fill_dark=None, + block_label_border_color=None, + block_label_border_color_dark=None, + block_label_border_width=None, + block_label_border_width_dark=None, + block_label_text_color=None, + block_label_text_color_dark=None, + block_label_margin=None, + block_label_padding=None, + block_label_radius=None, + block_label_right_radius=None, + block_label_text_size=None, + block_label_text_weight=None, + block_padding=None, + block_radius=None, + block_shadow=None, + block_shadow_dark=None, + block_title_background_fill=None, + block_title_background_fill_dark=None, + block_title_border_color=None, + block_title_border_color_dark=None, + block_title_border_width=None, + block_title_border_width_dark=None, + block_title_text_color=None, + block_title_text_color_dark=None, + block_title_padding=None, + block_title_radius=None, + block_title_text_size=None, + block_title_text_weight=None, + container_radius=None, + form_gap_width=None, + layout_gap=None, + panel_background_fill=None, + panel_background_fill_dark=None, + panel_border_color=None, + panel_border_color_dark=None, + panel_border_width=None, + panel_border_width_dark=None, + section_header_text_size=None, + section_header_text_weight=None, + # Component Atoms + checkbox_background_color=None, + checkbox_background_color_dark=None, + checkbox_background_color_focus=None, + checkbox_background_color_focus_dark=None, + checkbox_background_color_hover=None, + checkbox_background_color_hover_dark=None, + checkbox_background_color_selected=None, + checkbox_background_color_selected_dark=None, + checkbox_border_color=None, + checkbox_border_color_dark=None, + checkbox_border_color_focus=None, + checkbox_border_color_focus_dark=None, + checkbox_border_color_hover=None, + checkbox_border_color_hover_dark=None, + checkbox_border_color_selected=None, + checkbox_border_color_selected_dark=None, + checkbox_border_radius=None, + checkbox_border_width=None, + checkbox_border_width_dark=None, + checkbox_check=None, + radio_circle=None, + checkbox_shadow=None, + checkbox_label_background_fill=None, + checkbox_label_background_fill_dark=None, + checkbox_label_background_fill_hover=None, + checkbox_label_background_fill_hover_dark=None, + checkbox_label_background_fill_selected=None, + checkbox_label_background_fill_selected_dark=None, + checkbox_label_border_color=None, + checkbox_label_border_color_dark=None, + checkbox_label_border_color_hover=None, + checkbox_label_border_color_hover_dark=None, + checkbox_label_border_width=None, + checkbox_label_border_width_dark=None, + checkbox_label_gap=None, + checkbox_label_padding=None, + checkbox_label_shadow=None, + checkbox_label_text_size=None, + checkbox_label_text_weight=None, + checkbox_label_text_color=None, + checkbox_label_text_color_dark=None, + checkbox_label_text_color_selected=None, + checkbox_label_text_color_selected_dark=None, + error_background_fill=None, + error_background_fill_dark=None, + error_border_color=None, + error_border_color_dark=None, + error_border_width=None, + error_border_width_dark=None, + error_text_color=None, + error_text_color_dark=None, + input_background_fill=None, + input_background_fill_dark=None, + input_background_fill_focus=None, + input_background_fill_focus_dark=None, + input_background_fill_hover=None, + input_background_fill_hover_dark=None, + input_border_color=None, + input_border_color_dark=None, + input_border_color_focus=None, + input_border_color_focus_dark=None, + input_border_color_hover=None, + input_border_color_hover_dark=None, + input_border_width=None, + input_border_width_dark=None, + input_padding=None, + input_placeholder_color=None, + input_placeholder_color_dark=None, + input_radius=None, + input_shadow=None, + input_shadow_dark=None, + input_shadow_focus=None, + input_shadow_focus_dark=None, + input_text_size=None, + input_text_weight=None, + loader_color=None, + loader_color_dark=None, + slider_color=None, + slider_color_dark=None, + stat_background_fill=None, + stat_background_fill_dark=None, + table_border_color=None, + table_border_color_dark=None, + table_even_background_fill=None, + table_even_background_fill_dark=None, + table_odd_background_fill=None, + table_odd_background_fill_dark=None, + table_radius=None, + table_row_focus=None, + table_row_focus_dark=None, + # Buttons + button_border_width=None, + button_border_width_dark=None, + button_cancel_background_fill=None, + button_cancel_background_fill_dark=None, + button_cancel_background_fill_hover=None, + button_cancel_background_fill_hover_dark=None, + button_cancel_border_color=None, + button_cancel_border_color_dark=None, + button_cancel_border_color_hover=None, + button_cancel_border_color_hover_dark=None, + button_cancel_text_color=None, + button_cancel_text_color_dark=None, + button_cancel_text_color_hover=None, + button_cancel_text_color_hover_dark=None, + button_large_padding=None, + button_large_radius=None, + button_large_text_size=None, + button_large_text_weight=None, + button_primary_background_fill=None, + button_primary_background_fill_dark=None, + button_primary_background_fill_hover=None, + button_primary_background_fill_hover_dark=None, + button_primary_border_color=None, + button_primary_border_color_dark=None, + button_primary_border_color_hover=None, + button_primary_border_color_hover_dark=None, + button_primary_text_color=None, + button_primary_text_color_dark=None, + button_primary_text_color_hover=None, + button_primary_text_color_hover_dark=None, + button_secondary_background_fill=None, + button_secondary_background_fill_dark=None, + button_secondary_background_fill_hover=None, + button_secondary_background_fill_hover_dark=None, + button_secondary_border_color=None, + button_secondary_border_color_dark=None, + button_secondary_border_color_hover=None, + button_secondary_border_color_hover_dark=None, + button_secondary_text_color=None, + button_secondary_text_color_dark=None, + button_secondary_text_color_hover=None, + button_secondary_text_color_hover_dark=None, + button_shadow=None, + button_shadow_active=None, + button_shadow_hover=None, + button_small_padding=None, + button_small_radius=None, + button_small_text_size=None, + button_small_text_weight=None, + button_transition=None, + ) -> Base: + """ + Parameters: + body_background_fill: The background of the entire app. + body_background_fill_dark: The background of the entire app in dark mode. + body_text_color: The default text color. + body_text_color_dark: The default text color in dark mode. + body_text_size: The default text size. + body_text_color_subdued: The text color used for softer, less important text. + body_text_color_subdued_dark: The text color used for softer, less important text in dark mode. + body_text_weight: The default text weight. + embed_radius: The corner radius used for embedding when the app is embedded within a page. + background_fill_primary: The background primarily used for items placed directly on the page. + background_fill_primary_dark: The background primarily used for items placed directly on the page in dark mode. + background_fill_secondary: The background primarily used for items placed on top of another item. + background_fill_secondary_dark: The background primarily used for items placed on top of another item in dark mode. + border_color_accent: The border color used for accented items. + border_color_accent_dark: The border color used for accented items in dark mode. + border_color_primary: The border color primarily used for items placed directly on the page. + border_color_primary_dark: The border color primarily used for items placed directly on the page in dark mode. + color_accent: The color used for accented items. + color_accent_soft: The softer color used for accented items. + color_accent_soft_dark: The softer color used for accented items in dark mode. + link_text_color: The text color used for links. + link_text_color_dark: The text color used for links in dark mode. + link_text_color_active: The text color used for links when they are active. + link_text_color_active_dark: The text color used for links when they are active in dark mode. + link_text_color_hover: The text color used for links when they are hovered over. + link_text_color_hover_dark: The text color used for links when they are hovered over in dark mode. + link_text_color_visited: The text color used for links when they have been visited. + link_text_color_visited_dark: The text color used for links when they have been visited in dark mode. + prose_text_size: The text size used for markdown and other prose. + prose_text_weight: The text weight used for markdown and other prose. + prose_header_text_weight: The text weight of a header used for markdown and other prose. + shadow_drop: Drop shadow used by other shadowed items. + shadow_drop_lg: Larger drop shadow used by other shadowed items. + shadow_inset: Inset shadow used by other shadowed items. + shadow_spread: Size of shadow spread used by shadowed items. + shadow_spread_dark: Size of shadow spread used by shadowed items in dark mode. + block_background_fill: The background around an item. + block_background_fill_dark: The background around an item in dark mode. + block_border_color: The border color around an item. + block_border_color_dark: The border color around an item in dark mode. + block_border_width: The border width around an item. + block_border_width_dark: The border width around an item in dark mode. + block_info_text_color: The color of the info text. + block_info_text_color_dark: The color of the info text in dark mode. + block_info_text_size: The size of the info text. + block_info_text_weight: The weight of the info text. + block_label_background_fill: The background of the title label of a media element (e.g. image). + block_label_background_fill_dark: The background of the title label of a media element (e.g. image) in dark mode. + block_label_border_color: The border color of the title label of a media element (e.g. image). + block_label_border_color_dark: The border color of the title label of a media element (e.g. image) in dark mode. + block_label_border_width: The border width of the title label of a media element (e.g. image). + block_label_border_width_dark: The border width of the title label of a media element (e.g. image) in dark mode. + block_label_text_color: The text color of the title label of a media element (e.g. image). + block_label_text_color_dark: The text color of the title label of a media element (e.g. image) in dark mode. + block_label_margin: The margin of the title label of a media element (e.g. image) from its surrounding container. + block_label_padding: The padding of the title label of a media element (e.g. image). + block_label_radius: The corner radius of the title label of a media element (e.g. image). + block_label_right_radius: The corner radius of a right-aligned helper label. + block_label_text_size: The text size of the title label of a media element (e.g. image). + block_label_text_weight: The text weight of the title label of a media element (e.g. image). + block_padding: The padding around an item. + block_radius: The corner radius around an item. + block_shadow: The shadow under an item. + block_shadow_dark: The shadow under an item in dark mode. + block_title_background_fill: The background of the title of a form element (e.g. textbox). + block_title_background_fill_dark: The background of the title of a form element (e.g. textbox) in dark mode. + block_title_border_color: The border color of the title of a form element (e.g. textbox). + block_title_border_color_dark: The border color of the title of a form element (e.g. textbox) in dark mode. + block_title_border_width: The border width of the title of a form element (e.g. textbox). + block_title_border_width_dark: The border width of the title of a form element (e.g. textbox) in dark mode. + block_title_text_color: The text color of the title of a form element (e.g. textbox). + block_title_text_color_dark: The text color of the title of a form element (e.g. textbox) in dark mode. + block_title_padding: The padding of the title of a form element (e.g. textbox). + block_title_radius: The corner radius of the title of a form element (e.g. textbox). + block_title_text_size: The text size of the title of a form element (e.g. textbox). + block_title_text_weight: The text weight of the title of a form element (e.g. textbox). + container_radius: The corner radius of a layout component that holds other content. + form_gap_width: The border gap between form elements, (e.g. consecutive textboxes). + layout_gap: The gap between items within a row or column. + panel_background_fill: The background of a panel. + panel_background_fill_dark: The background of a panel in dark mode. + panel_border_color: The border color of a panel. + panel_border_color_dark: The border color of a panel in dark mode. + panel_border_width: The border width of a panel. + panel_border_width_dark: The border width of a panel in dark mode. + section_header_text_size: The text size of a section header (e.g. tab name). + section_header_text_weight: The text weight of a section header (e.g. tab name). + checkbox_background_color: The background of a checkbox square or radio circle. + checkbox_background_color_dark: The background of a checkbox square or radio circle in dark mode. + checkbox_background_color_focus: The background of a checkbox square or radio circle when focused. + checkbox_background_color_focus_dark: The background of a checkbox square or radio circle when focused in dark mode. + checkbox_background_color_hover: The background of a checkbox square or radio circle when hovered over. + checkbox_background_color_hover_dark: The background of a checkbox square or radio circle when hovered over in dark mode. + checkbox_background_color_selected: The background of a checkbox square or radio circle when selected. + checkbox_background_color_selected_dark: The background of a checkbox square or radio circle when selected in dark mode. + checkbox_border_color: The border color of a checkbox square or radio circle. + checkbox_border_color_dark: The border color of a checkbox square or radio circle in dark mode. + checkbox_border_color_focus: The border color of a checkbox square or radio circle when focused. + checkbox_border_color_focus_dark: The border color of a checkbox square or radio circle when focused in dark mode. + checkbox_border_color_hover: The border color of a checkbox square or radio circle when hovered over. + checkbox_border_color_hover_dark: The border color of a checkbox square or radio circle when hovered over in dark mode. + checkbox_border_color_selected: The border color of a checkbox square or radio circle when selected. + checkbox_border_color_selected_dark: The border color of a checkbox square or radio circle when selected in dark mode. + checkbox_border_radius: The corner radius of a checkbox square. + checkbox_border_width: The border width of a checkbox square or radio circle. + checkbox_border_width_dark: The border width of a checkbox square or radio circle in dark mode. + checkbox_check: The checkmark visual of a checkbox square. + radio_circle: The circle visual of a radio circle. + checkbox_shadow: The shadow of a checkbox square or radio circle. + checkbox_label_background_fill: The background of the surrounding button of a checkbox or radio element. + checkbox_label_background_fill_dark: The background of the surrounding button of a checkbox or radio element in dark mode. + checkbox_label_background_fill_hover: The background of the surrounding button of a checkbox or radio element when hovered over. + checkbox_label_background_fill_hover_dark: The background of the surrounding button of a checkbox or radio element when hovered over in dark mode. + checkbox_label_background_fill_selected: The background of the surrounding button of a checkbox or radio element when selected. + checkbox_label_background_fill_selected_dark: The background of the surrounding button of a checkbox or radio element when selected in dark mode. + checkbox_label_border_color: The border color of the surrounding button of a checkbox or radio element. + checkbox_label_border_color_dark: The border color of the surrounding button of a checkbox or radio element in dark mode. + checkbox_label_border_color_hover: The border color of the surrounding button of a checkbox or radio element when hovered over. + checkbox_label_border_color_hover_dark: The border color of the surrounding button of a checkbox or radio element when hovered over in dark mode. + checkbox_label_border_width: The border width of the surrounding button of a checkbox or radio element. + checkbox_label_border_width_dark: The border width of the surrounding button of a checkbox or radio element in dark mode. + checkbox_label_gap: The gap consecutive checkbox or radio elements. + checkbox_label_padding: The padding of the surrounding button of a checkbox or radio element. + checkbox_label_shadow: The shadow of the surrounding button of a checkbox or radio element. + checkbox_label_text_size: The text size of the label accompanying a checkbox or radio element. + checkbox_label_text_weight: The text weight of the label accompanying a checkbox or radio element. + checkbox_label_text_color: The text color of the label accompanying a checkbox or radio element. + checkbox_label_text_color_dark: The text color of the label accompanying a checkbox or radio element in dark mode. + checkbox_label_text_color_selected: The text color of the label accompanying a checkbox or radio element when selected. + checkbox_label_text_color_selected_dark: The text color of the label accompanying a checkbox or radio element when selected in dark mode. + error_background_fill: The background of an error message. + error_background_fill_dark: The background of an error message in dark mode. + error_border_color: The border color of an error message. + error_border_color_dark: The border color of an error message in dark mode. + error_border_width: The border width of an error message. + error_border_width_dark: The border width of an error message in dark mode. + error_text_color: The text color of an error message. + error_text_color_dark: The text color of an error message in dark mode. + input_background_fill: The background of an input field. + input_background_fill_dark: The background of an input field in dark mode. + input_background_fill_focus: The background of an input field when focused. + input_background_fill_focus_dark: The background of an input field when focused in dark mode. + input_background_fill_hover: The background of an input field when hovered over. + input_background_fill_hover_dark: The background of an input field when hovered over in dark mode. + input_border_color: The border color of an input field. + input_border_color_dark: The border color of an input field in dark mode. + input_border_color_focus: The border color of an input field when focused. + input_border_color_focus_dark: The border color of an input field when focused in dark mode. + input_border_color_hover: The border color of an input field when hovered over. + input_border_color_hover_dark: The border color of an input field when hovered over in dark mode. + input_border_width: The border width of an input field. + input_border_width_dark: The border width of an input field in dark mode. + input_padding: The padding of an input field. + input_placeholder_color: The placeholder text color of an input field. + input_placeholder_color_dark: The placeholder text color of an input field in dark mode. + input_radius: The corner radius of an input field. + input_shadow: The shadow of an input field. + input_shadow_dark: The shadow of an input field in dark mode. + input_shadow_focus: The shadow of an input field when focused. + input_shadow_focus_dark: The shadow of an input field when focused in dark mode. + input_text_size: The text size of an input field. + input_text_weight: The text weight of an input field. + loader_color: The color of the loading animation while a request is pending. + loader_color_dark: The color of the loading animation while a request is pending in dark mode. + slider_color: The color of the slider in a range element. + slider_color_dark: The color of the slider in a range element in dark mode. + stat_background_fill: The background used for stats visuals (e.g. confidence bars in label). + stat_background_fill_dark: The background used for stats visuals (e.g. confidence bars in label) in dark mode. + table_border_color: The border color of a table. + table_border_color_dark: The border color of a table in dark mode. + table_even_background_fill: The background of even rows in a table. + table_even_background_fill_dark: The background of even rows in a table in dark mode. + table_odd_background_fill: The background of odd rows in a table. + table_odd_background_fill_dark: The background of odd rows in a table in dark mode. + table_radius: The corner radius of a table. + table_row_focus: The background of a focused row in a table. + table_row_focus_dark: The background of a focused row in a table in dark mode. + button_border_width: The border width of a button. + button_border_width_dark: The border width of a button in dark mode. + button_cancel_background_fill: The background of a button of "cancel" variant. + button_cancel_background_fill_dark: The background of a button of "cancel" variant in dark mode. + button_cancel_background_fill_hover: The background of a button of "cancel" variant when hovered over. + button_cancel_background_fill_hover_dark: The background of a button of "cancel" variant when hovered over in dark mode. + button_cancel_border_color: The border color of a button of "cancel" variant. + button_cancel_border_color_dark: The border color of a button of "cancel" variant in dark mode. + button_cancel_border_color_hover: The border color of a button of "cancel" variant when hovered over. + button_cancel_border_color_hover_dark: The border color of a button of "cancel" variant when hovered over in dark mode. + button_cancel_text_color: The text color of a button of "cancel" variant. + button_cancel_text_color_dark: The text color of a button of "cancel" variant in dark mode. + button_cancel_text_color_hover: The text color of a button of "cancel" variant when hovered over. + button_cancel_text_color_hover_dark: The text color of a button of "cancel" variant when hovered over in dark mode. + button_large_padding: The padding of a button with the default "large" size. + button_large_radius: The corner radius of a button with the default "large" size. + button_large_text_size: The text size of a button with the default "large" size. + button_large_text_weight: The text weight of a button with the default "large" size. + button_primary_background_fill: The background of a button of "primary" variant. + button_primary_background_fill_dark: The background of a button of "primary" variant in dark mode. + button_primary_background_fill_hover: The background of a button of "primary" variant when hovered over. + button_primary_background_fill_hover_dark: The background of a button of "primary" variant when hovered over in dark mode. + button_primary_border_color: The border color of a button of "primary" variant. + button_primary_border_color_dark: The border color of a button of "primary" variant in dark mode. + button_primary_border_color_hover: The border color of a button of "primary" variant when hovered over. + button_primary_border_color_hover_dark: The border color of a button of "primary" variant when hovered over in dark mode. + button_primary_text_color: The text color of a button of "primary" variant. + button_primary_text_color_dark: The text color of a button of "primary" variant in dark mode. + button_primary_text_color_hover: The text color of a button of "primary" variant when hovered over. + button_primary_text_color_hover_dark: The text color of a button of "primary" variant when hovered over in dark mode. + button_secondary_background_fill: The background of a button of default "secondary" variant. + button_secondary_background_fill_dark: The background of a button of default "secondary" variant in dark mode. + button_secondary_background_fill_hover: The background of a button of default "secondary" variant when hovered over. + button_secondary_background_fill_hover_dark: The background of a button of default "secondary" variant when hovered over in dark mode. + button_secondary_border_color: The border color of a button of default "secondary" variant. + button_secondary_border_color_dark: The border color of a button of default "secondary" variant in dark mode. + button_secondary_border_color_hover: The border color of a button of default "secondary" variant when hovered over. + button_secondary_border_color_hover_dark: The border color of a button of default "secondary" variant when hovered over in dark mode. + button_secondary_text_color: The text color of a button of default "secondary" variant. + button_secondary_text_color_dark: The text color of a button of default "secondary" variant in dark mode. + button_secondary_text_color_hover: The text color of a button of default "secondary" variant when hovered over. + button_secondary_text_color_hover_dark: The text color of a button of default "secondary" variant when hovered over in dark mode. + button_shadow: The shadow under a button. + button_shadow_active: The shadow under a button when pressed. + button_shadow_hover: The shadow under a button when hovered over. + button_small_padding: The padding of a button set to "small" size. + button_small_radius: The corner radius of a button set to "small" size. + button_small_text_size: The text size of a button set to "small" size. + button_small_text_weight: The text weight of a button set to "small" size. + button_transition: The transition animation duration of a button between regular, hover, and focused states. + """ + + # Body + self.body_background_fill = body_background_fill or getattr( + self, "body_background_fill", "*background_fill_primary" + ) + self.body_background_fill_dark = body_background_fill_dark or getattr( + self, "body_background_fill_dark", "*background_fill_primary" + ) + self.body_text_color = body_text_color or getattr( + self, "body_text_color", "*neutral_800" + ) + self.body_text_color_dark = body_text_color_dark or getattr( + self, "body_text_color_dark", "*neutral_100" + ) + self.body_text_size = body_text_size or getattr( + self, "body_text_size", "*text_md" + ) + self.body_text_weight = body_text_weight or getattr( + self, "body_text_weight", "400" + ) + self.embed_radius = embed_radius or getattr(self, "embed_radius", "*radius_lg") + # Core Colors + self.color_accent = color_accent or getattr( + self, "color_accent", "*primary_500" + ) + self.color_accent_soft = color_accent_soft or getattr( + self, "color_accent_soft", "*primary_50" + ) + self.color_accent_soft_dark = color_accent_soft_dark or getattr( + self, "color_accent_soft_dark", "*neutral_700" + ) + self.background_fill_primary = background_fill_primary or getattr( + self, "background_primary", "white" + ) + self.background_fill_primary_dark = background_fill_primary_dark or getattr( + self, "background_primary_dark", "*neutral_950" + ) + self.background_fill_secondary = background_fill_secondary or getattr( + self, "background_secondary", "*neutral_50" + ) + self.background_fill_secondary_dark = background_fill_secondary_dark or getattr( + self, "background_secondary_dark", "*neutral_900" + ) + self.border_color_accent = border_color_accent or getattr( + self, "border_color_accent", "*primary_300" + ) + self.border_color_accent_dark = border_color_accent_dark or getattr( + self, "border_color_accent_dark", "*neutral_600" + ) + self.border_color_primary = border_color_primary or getattr( + self, "border_color_primary", "*neutral_200" + ) + self.border_color_primary_dark = border_color_primary_dark or getattr( + self, "border_color_primary_dark", "*neutral_700" + ) + # Text Colors + self.link_text_color = link_text_color or getattr( + self, "link_text_color", "*secondary_600" + ) + self.link_text_color_active = link_text_color_active or getattr( + self, "link_text_color_active", "*secondary_600" + ) + self.link_text_color_active_dark = link_text_color_active_dark or getattr( + self, "link_text_color_active_dark", "*secondary_500" + ) + self.link_text_color_dark = link_text_color_dark or getattr( + self, "link_text_color_dark", "*secondary_500" + ) + self.link_text_color_hover = link_text_color_hover or getattr( + self, "link_text_color_hover", "*secondary_700" + ) + self.link_text_color_hover_dark = link_text_color_hover_dark or getattr( + self, "link_text_color_hover_dark", "*secondary_400" + ) + self.link_text_color_visited = link_text_color_visited or getattr( + self, "link_text_color_visited", "*secondary_500" + ) + self.link_text_color_visited_dark = link_text_color_visited_dark or getattr( + self, "link_text_color_visited_dark", "*secondary_600" + ) + self.body_text_color_subdued = body_text_color_subdued or getattr( + self, "body_text_color_subdued", "*neutral_400" + ) + self.body_text_color_subdued_dark = body_text_color_subdued_dark or getattr( + self, "body_text_color_subdued_dark", "*neutral_400" + ) + # Shadows + self.shadow_drop = shadow_drop or getattr( + self, "shadow_drop", "rgba(0,0,0,0.05) 0px 1px 2px 0px" + ) + self.shadow_drop_lg = shadow_drop_lg or getattr( + self, + "shadow_drop_lg", + "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)", + ) + self.shadow_inset = shadow_inset or getattr( + self, "shadow_inset", "rgba(0,0,0,0.05) 0px 2px 4px 0px inset" + ) + self.shadow_spread = shadow_spread or getattr(self, "shadow_spread", "3px") + self.shadow_spread_dark = shadow_spread_dark or getattr( + self, "shadow_spread_dark", "1px" + ) + # Layout Atoms + self.block_background_fill = block_background_fill or getattr( + self, "block_background_fill", "*background_fill_primary" + ) + self.block_background_fill_dark = block_background_fill_dark or getattr( + self, "block_background_fill_dark", "*neutral_800" + ) + self.block_border_color = block_border_color or getattr( + self, "block_border_color", "*border_color_primary" + ) + self.block_border_color_dark = block_border_color_dark or getattr( + self, "block_border_color_dark", "*border_color_primary" + ) + self.block_border_width = block_border_width or getattr( + self, "block_border_width", "1px" + ) + self.block_border_width_dark = block_border_width_dark or getattr( + self, "block_border_width_dark", None + ) + self.block_info_text_color = block_info_text_color or getattr( + self, "block_info_text_color", "*body_text_color_subdued" + ) + self.block_info_text_color_dark = block_info_text_color_dark or getattr( + self, "block_info_text_color_dark", "*body_text_color_subdued" + ) + self.block_info_text_size = block_info_text_size or getattr( + self, "block_info_text_size", "*text_sm" + ) + self.block_info_text_weight = block_info_text_weight or getattr( + self, "block_info_text_weight", "400" + ) + self.block_label_background_fill = block_label_background_fill or getattr( + self, "block_label_background_fill", "*background_fill_primary" + ) + self.block_label_background_fill_dark = ( + block_label_background_fill_dark + or getattr( + self, "block_label_background_fill_dark", "*background_fill_secondary" + ) + ) + self.block_label_border_color = block_label_border_color or getattr( + self, "block_label_border_color", "*border_color_primary" + ) + self.block_label_border_color_dark = block_label_border_color_dark or getattr( + self, "block_label_border_color_dark", "*border_color_primary" + ) + self.block_label_border_width = block_label_border_width or getattr( + self, "block_label_border_width", "1px" + ) + self.block_label_border_width_dark = block_label_border_width_dark or getattr( + self, "block_label_border_width_dark", None + ) + self.block_label_text_color = block_label_text_color or getattr( + self, "block_label_text_color", "*neutral_500" + ) + self.block_label_text_color_dark = block_label_text_color_dark or getattr( + self, "block_label_text_color_dark", "*neutral_200" + ) + self.block_label_margin = block_label_margin or getattr( + self, "block_label_margin", "0" + ) + self.block_label_padding = block_label_padding or getattr( + self, "block_label_padding", "*spacing_sm *spacing_lg" + ) + self.block_label_radius = block_label_radius or getattr( + self, + "block_label_radius", + "calc(*radius_lg - 1px) 0 calc(*radius_lg - 1px) 0", + ) + self.block_label_right_radius = block_label_right_radius or getattr( + self, + "block_label_right_radius", + "0 calc(*radius_lg - 1px) 0 calc(*radius_lg - 1px)", + ) + self.block_label_text_size = block_label_text_size or getattr( + self, "block_label_text_size", "*text_sm" + ) + self.block_label_text_weight = block_label_text_weight or getattr( + self, "block_label_text_weight", "400" + ) + self.block_padding = block_padding or getattr( + self, "block_padding", "*spacing_xl calc(*spacing_xl + 2px)" + ) + self.block_radius = block_radius or getattr(self, "block_radius", "*radius_lg") + self.block_shadow = block_shadow or getattr(self, "block_shadow", "none") + self.block_shadow_dark = block_shadow_dark or getattr( + self, "block_shadow_dark", None + ) + self.block_title_background_fill = block_title_background_fill or getattr( + self, "block_title_background_fill", "none" + ) + self.block_title_background_fill_dark = ( + block_title_background_fill_dark + or getattr(self, "block_title_background_fill_dark", None) + ) + self.block_title_border_color = block_title_border_color or getattr( + self, "block_title_border_color", "none" + ) + self.block_title_border_color_dark = block_title_border_color_dark or getattr( + self, "block_title_border_color_dark", None + ) + self.block_title_border_width = block_title_border_width or getattr( + self, "block_title_border_width", "0px" + ) + self.block_title_border_width_dark = block_title_border_width_dark or getattr( + self, "block_title_border_width_dark", None + ) + self.block_title_text_color = block_title_text_color or getattr( + self, "block_title_text_color", "*neutral_500" + ) + self.block_title_text_color_dark = block_title_text_color_dark or getattr( + self, "block_title_text_color_dark", "*neutral_200" + ) + self.block_title_padding = block_title_padding or getattr( + self, "block_title_padding", "0" + ) + self.block_title_radius = block_title_radius or getattr( + self, "block_title_radius", "none" + ) + self.block_title_text_size = block_title_text_size or getattr( + self, "block_title_text_size", "*text_md" + ) + self.block_title_text_weight = block_title_text_weight or getattr( + self, "block_title_text_weight", "400" + ) + self.container_radius = container_radius or getattr( + self, "container_radius", "*radius_lg" + ) + self.form_gap_width = form_gap_width or getattr(self, "form_gap_width", "0px") + self.layout_gap = layout_gap or getattr(self, "layout_gap", "*spacing_xxl") + self.panel_background_fill = panel_background_fill or getattr( + self, "panel_background_fill", "*background_fill_secondary" + ) + self.panel_background_fill_dark = panel_background_fill_dark or getattr( + self, "panel_background_fill_dark", "*background_fill_secondary" + ) + self.panel_border_color = panel_border_color or getattr( + self, "panel_border_color", "*border_color_primary" + ) + self.panel_border_color_dark = panel_border_color_dark or getattr( + self, "panel_border_color_dark", "*border_color_primary" + ) + self.panel_border_width = panel_border_width or getattr( + self, "panel_border_width", "0" + ) + self.panel_border_width_dark = panel_border_width_dark or getattr( + self, "panel_border_width_dark", None + ) + self.section_header_text_size = section_header_text_size or getattr( + self, "section_header_text_size", "*text_md" + ) + self.section_header_text_weight = section_header_text_weight or getattr( + self, "section_header_text_weight", "400" + ) + # Component Atoms + self.checkbox_background_color = checkbox_background_color or getattr( + self, "checkbox_background_color", "*background_fill_primary" + ) + self.checkbox_background_color_dark = checkbox_background_color_dark or getattr( + self, "checkbox_background_color_dark", "*neutral_800" + ) + self.checkbox_background_color_focus = ( + checkbox_background_color_focus + or getattr( + self, "checkbox_background_color_focus", "*checkbox_background_color" + ) + ) + self.checkbox_background_color_focus_dark = ( + checkbox_background_color_focus_dark + or getattr( + self, + "checkbox_background_color_focus_dark", + "*checkbox_background_color", + ) + ) + self.checkbox_background_color_hover = ( + checkbox_background_color_hover + or getattr( + self, "checkbox_background_color_hover", "*checkbox_background_color" + ) + ) + self.checkbox_background_color_hover_dark = ( + checkbox_background_color_hover_dark + or getattr( + self, + "checkbox_background_color_hover_dark", + "*checkbox_background_color", + ) + ) + self.checkbox_background_color_selected = ( + checkbox_background_color_selected + or getattr(self, "checkbox_background_color_selected", "*secondary_600") + ) + self.checkbox_background_color_selected_dark = ( + checkbox_background_color_selected_dark + or getattr( + self, "checkbox_background_color_selected_dark", "*secondary_600" + ) + ) + self.checkbox_border_color = checkbox_border_color or getattr( + self, "checkbox_border_color", "*neutral_300" + ) + self.checkbox_border_color_dark = checkbox_border_color_dark or getattr( + self, "checkbox_border_color_dark", "*neutral_700" + ) + self.checkbox_border_color_focus = checkbox_border_color_focus or getattr( + self, "checkbox_border_color_focus", "*secondary_500" + ) + self.checkbox_border_color_focus_dark = ( + checkbox_border_color_focus_dark + or getattr(self, "checkbox_border_color_focus_dark", "*secondary_500") + ) + self.checkbox_border_color_hover = checkbox_border_color_hover or getattr( + self, "checkbox_border_color_hover", "*neutral_300" + ) + self.checkbox_border_color_hover_dark = ( + checkbox_border_color_hover_dark + or getattr(self, "checkbox_border_color_hover_dark", "*neutral_600") + ) + self.checkbox_border_color_selected = checkbox_border_color_selected or getattr( + self, "checkbox_border_color_selected", "*secondary_600" + ) + self.checkbox_border_color_selected_dark = ( + checkbox_border_color_selected_dark + or getattr(self, "checkbox_border_color_selected_dark", "*secondary_600") + ) + self.checkbox_border_radius = checkbox_border_radius or getattr( + self, "checkbox_border_radius", "*radius_sm" + ) + self.checkbox_border_width = checkbox_border_width or getattr( + self, "checkbox_border_width", "*input_border_width" + ) + self.checkbox_border_width_dark = checkbox_border_width_dark or getattr( + self, "checkbox_border_width_dark", "*input_border_width" + ) + self.checkbox_label_background_fill = checkbox_label_background_fill or getattr( + self, "checkbox_label_background_fill", "*button_secondary_background_fill" + ) + self.checkbox_label_background_fill_dark = ( + checkbox_label_background_fill_dark + or getattr( + self, + "checkbox_label_background_fill_dark", + "*button_secondary_background_fill", + ) + ) + self.checkbox_label_background_fill_hover = ( + checkbox_label_background_fill_hover + or getattr( + self, + "checkbox_label_background_fill_hover", + "*button_secondary_background_fill_hover", + ) + ) + self.checkbox_label_background_fill_hover_dark = ( + checkbox_label_background_fill_hover_dark + or getattr( + self, + "checkbox_label_background_fill_hover_dark", + "*button_secondary_background_fill_hover", + ) + ) + self.checkbox_label_background_fill_selected = ( + checkbox_label_background_fill_selected + or getattr( + self, + "checkbox_label_background_fill_selected", + "*checkbox_label_background_fill", + ) + ) + self.checkbox_label_background_fill_selected_dark = ( + checkbox_label_background_fill_selected_dark + or getattr( + self, + "checkbox_label_background_fill_selected_dark", + "*checkbox_label_background_fill", + ) + ) + self.checkbox_label_border_color = checkbox_label_border_color or getattr( + self, "checkbox_label_border_color", "*border_color_primary" + ) + self.checkbox_label_border_color_dark = ( + checkbox_label_border_color_dark + or getattr( + self, "checkbox_label_border_color_dark", "*border_color_primary" + ) + ) + self.checkbox_label_border_color_hover = ( + checkbox_label_border_color_hover + or getattr( + self, + "checkbox_label_border_color_hover", + "*checkbox_label_border_color", + ) + ) + self.checkbox_label_border_color_hover_dark = ( + checkbox_label_border_color_hover_dark + or getattr( + self, + "checkbox_label_border_color_hover_dark", + "*checkbox_label_border_color", + ) + ) + self.checkbox_label_border_width = checkbox_label_border_width or getattr( + self, "checkbox_label_border_width", "*input_border_width" + ) + self.checkbox_label_border_width_dark = ( + checkbox_label_border_width_dark + or getattr(self, "checkbox_label_border_width_dark", "*input_border_width") + ) + self.checkbox_label_gap = checkbox_label_gap or getattr( + self, "checkbox_label_gap", "*spacing_lg" + ) + self.checkbox_label_padding = checkbox_label_padding or getattr( + self, "checkbox_label_padding", "*spacing_md calc(2 * *spacing_md)" + ) + self.checkbox_label_shadow = checkbox_label_shadow or getattr( + self, "checkbox_label_shadow", "none" + ) + self.checkbox_label_text_size = checkbox_label_text_size or getattr( + self, "checkbox_label_text_size", "*text_md" + ) + self.checkbox_label_text_weight = checkbox_label_text_weight or getattr( + self, "checkbox_label_text_weight", "400" + ) + self.checkbox_check = checkbox_check or getattr( + self, + "checkbox_check", + """url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")""", + ) + self.radio_circle = radio_circle or getattr( + self, + "radio_circle", + """url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")""", + ) + self.checkbox_shadow = checkbox_shadow or getattr( + self, "checkbox_shadow", "*input_shadow" + ) + self.checkbox_label_text_color = checkbox_label_text_color or getattr( + self, "checkbox_label_text_color", "*body_text_color" + ) + self.checkbox_label_text_color_dark = checkbox_label_text_color_dark or getattr( + self, "checkbox_label_text_color_dark", "*body_text_color" + ) + self.checkbox_label_text_color_selected = ( + checkbox_label_text_color_selected + or getattr( + self, "checkbox_label_text_color_selected", "*checkbox_label_text_color" + ) + ) + self.checkbox_label_text_color_selected_dark = ( + checkbox_label_text_color_selected_dark + or getattr( + self, + "checkbox_label_text_color_selected_dark", + "*checkbox_label_text_color", + ) + ) + self.error_background_fill = error_background_fill or getattr( + self, "error_background_fill", colors.red.c100 + ) + self.error_background_fill_dark = error_background_fill_dark or getattr( + self, "error_background_fill_dark", "*background_fill_primary" + ) + self.error_border_color = error_border_color or getattr( + self, "error_border_color", colors.red.c200 + ) + self.error_border_color_dark = error_border_color_dark or getattr( + self, "error_border_color_dark", "*border_color_primary" + ) + self.error_border_width = error_border_width or getattr( + self, "error_border_width", "1px" + ) + self.error_border_width_dark = error_border_width_dark or getattr( + self, "error_border_width_dark", None + ) + self.error_text_color = error_text_color or getattr( + self, "error_text_color", colors.red.c500 + ) + self.error_text_color_dark = error_text_color_dark or getattr( + self, "error_text_color_dark", colors.red.c500 + ) + self.input_background_fill = input_background_fill or getattr( + self, "input_background_fill", "*neutral_100" + ) + self.input_background_fill_dark = input_background_fill_dark or getattr( + self, "input_background_fill_dark", "*neutral_700" + ) + self.input_background_fill_focus = input_background_fill_focus or getattr( + self, "input_background_fill_focus", "*secondary_500" + ) + self.input_background_fill_focus_dark = ( + input_background_fill_focus_dark + or getattr(self, "input_background_fill_focus_dark", "*secondary_600") + ) + self.input_background_fill_hover = input_background_fill_hover or getattr( + self, "input_background_fill_hover", "*input_background_fill" + ) + self.input_background_fill_hover_dark = ( + input_background_fill_hover_dark + or getattr( + self, "input_background_fill_hover_dark", "*input_background_fill" + ) + ) + self.input_border_color = input_border_color or getattr( + self, "input_border_color", "*border_color_primary" + ) + self.input_border_color_dark = input_border_color_dark or getattr( + self, "input_border_color_dark", "*border_color_primary" + ) + self.input_border_color_focus = input_border_color_focus or getattr( + self, "input_border_color_focus", "*secondary_300" + ) + self.input_border_color_focus_dark = input_border_color_focus_dark or getattr( + self, "input_border_color_focus_dark", "*neutral_700" + ) + self.input_border_color_hover = input_border_color_hover or getattr( + self, "input_border_color_hover", "*input_border_color" + ) + self.input_border_color_hover_dark = input_border_color_hover_dark or getattr( + self, "input_border_color_hover_dark", "*input_border_color" + ) + self.input_border_width = input_border_width or getattr( + self, "input_border_width", "0px" + ) + self.input_border_width_dark = input_border_width_dark or getattr( + self, "input_border_width_dark", None + ) + self.input_padding = input_padding or getattr( + self, "input_padding", "*spacing_xl" + ) + self.input_placeholder_color = input_placeholder_color or getattr( + self, "input_placeholder_color", "*neutral_400" + ) + self.input_placeholder_color_dark = input_placeholder_color_dark or getattr( + self, "input_placeholder_color_dark", "*neutral_500" + ) + self.input_radius = input_radius or getattr(self, "input_radius", "*radius_lg") + self.input_shadow = input_shadow or getattr(self, "input_shadow", "none") + self.input_shadow_dark = input_shadow_dark or getattr( + self, "input_shadow_dark", None + ) + self.input_shadow_focus = input_shadow_focus or getattr( + self, "input_shadow_focus", "*input_shadow" + ) + self.input_shadow_focus_dark = input_shadow_focus_dark or getattr( + self, "input_shadow_focus_dark", None + ) + self.input_text_size = input_text_size or getattr( + self, "input_text_size", "*text_md" + ) + self.input_text_weight = input_text_weight or getattr( + self, "input_text_weight", "400" + ) + self.loader_color = loader_color or getattr( + self, "loader_color", "*color_accent" + ) + self.loader_color_dark = loader_color_dark or getattr( + self, "loader_color_dark", None + ) + self.prose_text_size = prose_text_size or getattr( + self, "prose_text_size", "*text_md" + ) + self.prose_text_weight = prose_text_weight or getattr( + self, "prose_text_weight", "400" + ) + self.prose_header_text_weight = prose_header_text_weight or getattr( + self, "prose_header_text_weight", "600" + ) + self.slider_color = slider_color or getattr(self, "slider_color", "") + self.slider_color_dark = slider_color_dark or getattr( + self, "slider_color_dark", None + ) + self.stat_background_fill = stat_background_fill or getattr( + self, "stat_background_fill", "*primary_300" + ) + self.stat_background_fill_dark = stat_background_fill_dark or getattr( + self, "stat_background_fill_dark", "*primary_500" + ) + self.table_border_color = table_border_color or getattr( + self, "table_border_color", "*neutral_300" + ) + self.table_border_color_dark = table_border_color_dark or getattr( + self, "table_border_color_dark", "*neutral_700" + ) + self.table_even_background_fill = table_even_background_fill or getattr( + self, "table_even_background_fill", "white" + ) + self.table_even_background_fill_dark = ( + table_even_background_fill_dark + or getattr(self, "table_even_background_fill_dark", "*neutral_950") + ) + self.table_odd_background_fill = table_odd_background_fill or getattr( + self, "table_odd_background_fill", "*neutral_50" + ) + self.table_odd_background_fill_dark = table_odd_background_fill_dark or getattr( + self, "table_odd_background_fill_dark", "*neutral_900" + ) + self.table_radius = table_radius or getattr(self, "table_radius", "*radius_lg") + self.table_row_focus = table_row_focus or getattr( + self, "table_row_focus", "*color_accent_soft" + ) + self.table_row_focus_dark = table_row_focus_dark or getattr( + self, "table_row_focus_dark", "*color_accent_soft" + ) + # Buttons + self.button_border_width = button_border_width or getattr( + self, "button_border_width", "*input_border_width" + ) + self.button_border_width_dark = button_border_width_dark or getattr( + self, "button_border_width_dark", "*input_border_width" + ) + self.button_cancel_background_fill = button_cancel_background_fill or getattr( + self, "button_cancel_background_fill", "*button_secondary_background_fill" + ) + self.button_cancel_background_fill_dark = ( + button_cancel_background_fill_dark + or getattr( + self, + "button_cancel_background_fill_dark", + "*button_secondary_background_fill", + ) + ) + self.button_cancel_background_fill_hover = ( + button_cancel_background_fill_hover + or getattr( + self, + "button_cancel_background_fill_hover", + "*button_cancel_background_fill", + ) + ) + self.button_cancel_background_fill_hover_dark = ( + button_cancel_background_fill_hover_dark + or getattr( + self, + "button_cancel_background_fill_hover_dark", + "*button_cancel_background_fill", + ) + ) + self.button_cancel_border_color = button_cancel_border_color or getattr( + self, "button_cancel_border_color", "*button_secondary_border_color" + ) + self.button_cancel_border_color_dark = ( + button_cancel_border_color_dark + or getattr( + self, + "button_cancel_border_color_dark", + "*button_secondary_border_color", + ) + ) + self.button_cancel_border_color_hover = ( + button_cancel_border_color_hover + or getattr( + self, + "button_cancel_border_color_hover", + "*button_cancel_border_color", + ) + ) + self.button_cancel_border_color_hover_dark = ( + button_cancel_border_color_hover_dark + or getattr( + self, + "button_cancel_border_color_hover_dark", + "*button_cancel_border_color", + ) + ) + self.button_cancel_text_color = button_cancel_text_color or getattr( + self, "button_cancel_text_color", "*button_secondary_text_color" + ) + self.button_cancel_text_color_dark = button_cancel_text_color_dark or getattr( + self, "button_cancel_text_color_dark", "*button_secondary_text_color" + ) + self.button_cancel_text_color_hover = button_cancel_text_color_hover or getattr( + self, "button_cancel_text_color_hover", "*button_cancel_text_color" + ) + self.button_cancel_text_color_hover_dark = ( + button_cancel_text_color_hover_dark + or getattr( + self, "button_cancel_text_color_hover_dark", "*button_cancel_text_color" + ) + ) + self.button_large_padding = button_large_padding or getattr( + self, "button_large_padding", "*spacing_lg calc(2 * *spacing_lg)" + ) + self.button_large_radius = button_large_radius or getattr( + self, "button_large_radius", "*radius_lg" + ) + self.button_large_text_size = button_large_text_size or getattr( + self, "button_large_text_size", "*text_lg" + ) + self.button_large_text_weight = button_large_text_weight or getattr( + self, "button_large_text_weight", "600" + ) + self.button_primary_background_fill = button_primary_background_fill or getattr( + self, "button_primary_background_fill", "*primary_200" + ) + self.button_primary_background_fill_dark = ( + button_primary_background_fill_dark + or getattr(self, "button_primary_background_fill_dark", "*primary_700") + ) + self.button_primary_background_fill_hover = ( + button_primary_background_fill_hover + or getattr( + self, + "button_primary_background_fill_hover", + "*button_primary_background_fill", + ) + ) + self.button_primary_background_fill_hover_dark = ( + button_primary_background_fill_hover_dark + or getattr( + self, + "button_primary_background_fill_hover_dark", + "*button_primary_background_fill", + ) + ) + self.button_primary_border_color = button_primary_border_color or getattr( + self, "button_primary_border_color", "*primary_200" + ) + self.button_primary_border_color_dark = ( + button_primary_border_color_dark + or getattr(self, "button_primary_border_color_dark", "*primary_600") + ) + self.button_primary_border_color_hover = ( + button_primary_border_color_hover + or getattr( + self, + "button_primary_border_color_hover", + "*button_primary_border_color", + ) + ) + self.button_primary_border_color_hover_dark = ( + button_primary_border_color_hover_dark + or getattr( + self, + "button_primary_border_color_hover_dark", + "*button_primary_border_color", + ) + ) + self.button_primary_text_color = button_primary_text_color or getattr( + self, "button_primary_text_color", "*primary_600" + ) + self.button_primary_text_color_dark = button_primary_text_color_dark or getattr( + self, "button_primary_text_color_dark", "white" + ) + self.button_primary_text_color_hover = ( + button_primary_text_color_hover + or getattr( + self, "button_primary_text_color_hover", "*button_primary_text_color" + ) + ) + self.button_primary_text_color_hover_dark = ( + button_primary_text_color_hover_dark + or getattr( + self, + "button_primary_text_color_hover_dark", + "*button_primary_text_color", + ) + ) + self.button_secondary_background_fill = ( + button_secondary_background_fill + or getattr(self, "button_secondary_background_fill", "*neutral_200") + ) + self.button_secondary_background_fill_dark = ( + button_secondary_background_fill_dark + or getattr(self, "button_secondary_background_fill_dark", "*neutral_600") + ) + self.button_secondary_background_fill_hover = ( + button_secondary_background_fill_hover + or getattr( + self, + "button_secondary_background_fill_hover", + "*button_secondary_background_fill", + ) + ) + self.button_secondary_background_fill_hover_dark = ( + button_secondary_background_fill_hover_dark + or getattr( + self, + "button_secondary_background_fill_hover_dark", + "*button_secondary_background_fill", + ) + ) + self.button_secondary_border_color = button_secondary_border_color or getattr( + self, "button_secondary_border_color", "*neutral_200" + ) + self.button_secondary_border_color_dark = ( + button_secondary_border_color_dark + or getattr(self, "button_secondary_border_color_dark", "*neutral_600") + ) + self.button_secondary_border_color_hover = ( + button_secondary_border_color_hover + or getattr( + self, + "button_secondary_border_color_hover", + "*button_secondary_border_color", + ) + ) + self.button_secondary_border_color_hover_dark = ( + button_secondary_border_color_hover_dark + or getattr( + self, + "button_secondary_border_color_hover_dark", + "*button_secondary_border_color", + ) + ) + self.button_secondary_text_color = button_secondary_text_color or getattr( + self, "button_secondary_text_color", "*neutral_700" + ) + self.button_secondary_text_color_dark = ( + button_secondary_text_color_dark + or getattr(self, "button_secondary_text_color_dark", "white") + ) + self.button_secondary_text_color_hover = ( + button_secondary_text_color_hover + or getattr( + self, + "button_secondary_text_color_hover", + "*button_secondary_text_color", + ) + ) + self.button_secondary_text_color_hover_dark = ( + button_secondary_text_color_hover_dark + or getattr( + self, + "button_secondary_text_color_hover_dark", + "*button_secondary_text_color", + ) + ) + self.button_shadow = button_shadow or getattr(self, "button_shadow", "none") + self.button_shadow_active = button_shadow_active or getattr( + self, "button_shadow_active", "none" + ) + self.button_shadow_hover = button_shadow_hover or getattr( + self, "button_shadow_hover", "none" + ) + self.button_small_padding = button_small_padding or getattr( + self, "button_small_padding", "*spacing_sm calc(2 * *spacing_sm)" + ) + self.button_small_radius = button_small_radius or getattr( + self, "button_small_radius", "*radius_lg" + ) + self.button_small_text_size = button_small_text_size or getattr( + self, "button_small_text_size", "*text_md" + ) + self.button_small_text_weight = button_small_text_weight or getattr( + self, "button_small_text_weight", "400" + ) + self.button_transition = button_transition or getattr( + self, "button_transition", "background-color 0.2s ease" + ) + return self diff --git a/valley/lib/python3.10/site-packages/gradio/themes/default.py b/valley/lib/python3.10/site-packages/gradio/themes/default.py new file mode 100644 index 0000000000000000000000000000000000000000..ac63779525d8b155b91355467ae58d0b993387aa --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/themes/default.py @@ -0,0 +1,90 @@ +from __future__ import annotations + +from typing import Iterable + +from gradio.themes.base import Base +from gradio.themes.utils import colors, fonts, sizes + + +class Default(Base): + def __init__( + self, + *, + primary_hue: colors.Color | str = colors.orange, + secondary_hue: colors.Color | str = colors.blue, + neutral_hue: colors.Color | str = colors.gray, + spacing_size: sizes.Size | str = sizes.spacing_md, + radius_size: sizes.Size | str = sizes.radius_md, + text_size: sizes.Size | str = sizes.text_md, + font: fonts.Font + | str + | Iterable[fonts.Font | str] = ( + fonts.GoogleFont("Source Sans Pro"), + "ui-sans-serif", + "system-ui", + "sans-serif", + ), + font_mono: fonts.Font + | str + | Iterable[fonts.Font | str] = ( + fonts.GoogleFont("IBM Plex Mono"), + "ui-monospace", + "Consolas", + "monospace", + ), + ): + super().__init__( + primary_hue=primary_hue, + secondary_hue=secondary_hue, + neutral_hue=neutral_hue, + spacing_size=spacing_size, + radius_size=radius_size, + text_size=text_size, + font=font, + font_mono=font_mono, + ) + super().set( + # Colors + input_background_fill_dark="*neutral_800", + # Transition + button_transition="none", + # Shadows + button_shadow="*shadow_drop", + button_shadow_hover="*shadow_drop_lg", + button_shadow_active="*shadow_inset", + input_shadow="0 0 0 *shadow_spread transparent, *shadow_inset", + input_shadow_focus="0 0 0 *shadow_spread *secondary_50, *shadow_inset", + input_shadow_focus_dark="0 0 0 *shadow_spread *neutral_700, *shadow_inset", + checkbox_label_shadow="*shadow_drop", + block_shadow="*shadow_drop", + form_gap_width="1px", + # Button borders + input_border_width="1px", + input_background_fill="white", + # Gradients + stat_background_fill="linear-gradient(to right, *primary_400, *primary_200)", + stat_background_fill_dark="linear-gradient(to right, *primary_400, *primary_600)", + error_background_fill=f"linear-gradient(to right, {colors.red.c100}, *background_fill_secondary)", + error_background_fill_dark="*background_fill_primary", + checkbox_label_background_fill="linear-gradient(to top, *neutral_50, white)", + checkbox_label_background_fill_dark="linear-gradient(to top, *neutral_900, *neutral_800)", + checkbox_label_background_fill_hover="linear-gradient(to top, *neutral_100, white)", + checkbox_label_background_fill_hover_dark="linear-gradient(to top, *neutral_900, *neutral_800)", + button_primary_background_fill="linear-gradient(to bottom right, *primary_100, *primary_300)", + button_primary_background_fill_dark="linear-gradient(to bottom right, *primary_500, *primary_600)", + button_primary_background_fill_hover="linear-gradient(to bottom right, *primary_100, *primary_200)", + button_primary_background_fill_hover_dark="linear-gradient(to bottom right, *primary_500, *primary_500)", + button_primary_border_color_dark="*primary_500", + button_secondary_background_fill="linear-gradient(to bottom right, *neutral_100, *neutral_200)", + button_secondary_background_fill_dark="linear-gradient(to bottom right, *neutral_600, *neutral_700)", + button_secondary_background_fill_hover="linear-gradient(to bottom right, *neutral_100, *neutral_100)", + button_secondary_background_fill_hover_dark="linear-gradient(to bottom right, *neutral_600, *neutral_600)", + button_cancel_background_fill=f"linear-gradient(to bottom right, {colors.red.c100}, {colors.red.c200})", + button_cancel_background_fill_dark=f"linear-gradient(to bottom right, {colors.red.c600}, {colors.red.c700})", + button_cancel_background_fill_hover=f"linear-gradient(to bottom right, {colors.red.c100}, {colors.red.c100})", + button_cancel_background_fill_hover_dark=f"linear-gradient(to bottom right, {colors.red.c600}, {colors.red.c600})", + button_cancel_border_color=colors.red.c200, + button_cancel_border_color_dark=colors.red.c600, + button_cancel_text_color=colors.red.c600, + button_cancel_text_color_dark="white", + ) diff --git a/valley/lib/python3.10/site-packages/gradio/themes/glass.py b/valley/lib/python3.10/site-packages/gradio/themes/glass.py new file mode 100644 index 0000000000000000000000000000000000000000..f1a130437de2f7117cbc80e1a1b3f20620507be9 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/themes/glass.py @@ -0,0 +1,98 @@ +from __future__ import annotations + +from typing import Iterable + +from gradio.themes.base import Base +from gradio.themes.utils import colors, fonts, sizes + + +class Glass(Base): + def __init__( + self, + *, + primary_hue: colors.Color | str = colors.stone, + secondary_hue: colors.Color | str = colors.stone, + neutral_hue: colors.Color | str = colors.stone, + spacing_size: sizes.Size | str = sizes.spacing_sm, + radius_size: sizes.Size | str = sizes.radius_sm, + text_size: sizes.Size | str = sizes.text_sm, + font: fonts.Font + | str + | Iterable[fonts.Font | str] = ( + "Optima", + "Candara", + "Noto Sans", + "source-sans-pro", + "sans-serif", + ), + font_mono: fonts.Font + | str + | Iterable[fonts.Font | str] = ( + fonts.GoogleFont("IBM Plex Mono"), + "ui-monospace", + "Consolas", + "monospace", + ), + ): + super().__init__( + primary_hue=primary_hue, + secondary_hue=secondary_hue, + neutral_hue=neutral_hue, + spacing_size=spacing_size, + radius_size=radius_size, + text_size=text_size, + font=font, + font_mono=font_mono, + ) + super().set( + body_background_fill_dark="*primary_800", + background_fill_secondary_dark="*primary_800", + block_background_fill_dark="*primary_800", + button_primary_background_fill="linear-gradient(180deg, *primary_50 0%, *primary_200 50%, *primary_300 50%, *primary_200 100%)", + button_primary_background_fill_hover="linear-gradient(180deg, *primary_100 0%, *primary_200 50%, *primary_300 50%, *primary_200 100%)", + button_primary_background_fill_dark="linear-gradient(180deg, *primary_400 0%, *primary_500 50%, *primary_600 50%, *primary_500 100%)", + button_primary_background_fill_hover_dark="linear-gradient(180deg, *primary_400 0%, *primary_500 50%, *primary_600 50%, *primary_500 100%)", + button_secondary_background_fill="*button_primary_background_fill", + button_secondary_background_fill_hover="*button_primary_background_fill_hover", + button_secondary_background_fill_dark="*button_primary_background_fill", + button_secondary_background_fill_hover_dark="*button_primary_background_fill_hover", + button_cancel_background_fill="*button_primary_background_fill", + button_cancel_background_fill_hover="*button_primary_background_fill_hover", + button_cancel_background_fill_dark="*button_primary_background_fill", + button_cancel_background_fill_hover_dark="*button_primary_background_fill_hover", + button_cancel_border_color="*button_secondary_border_color", + button_cancel_border_color_dark="*button_secondary_border_color", + button_cancel_text_color="*button_secondary_text_color", + checkbox_border_width="0px", + checkbox_label_background_fill="*button_secondary_background_fill", + checkbox_label_background_fill_dark="*button_secondary_background_fill", + checkbox_label_background_fill_hover="*button_secondary_background_fill_hover", + checkbox_label_background_fill_hover_dark="*button_secondary_background_fill_hover", + checkbox_label_border_width="1px", + checkbox_background_color_dark="*primary_600", + button_border_width="1px", + button_shadow_active="*shadow_inset", + input_background_fill="linear-gradient(0deg, *secondary_50 0%, white 100%)", + input_background_fill_dark="*secondary_600", + input_border_color_focus_dark="*primary_400", + input_border_width="1px", + slider_color="*primary_400", + block_label_text_color="*primary_500", + block_title_text_color="*primary_500", + block_label_text_weight="600", + block_title_text_weight="600", + block_label_text_size="*text_md", + block_title_text_size="*text_md", + block_label_background_fill="*primary_200", + block_label_background_fill_dark="*primary_700", + block_border_width="0px", + block_border_width_dark="1px", + panel_border_width="1px", + border_color_primary_dark="*primary_500", + background_fill_primary_dark="*neutral_700", + background_fill_secondary="*primary_100", + block_background_fill="*primary_50", + block_shadow="*primary_400 0px 0px 3px 0px", + table_even_background_fill_dark="*neutral_700", + table_odd_background_fill_dark="*neutral_700", + ) diff --git a/valley/lib/python3.10/site-packages/gradio/themes/monochrome.py b/valley/lib/python3.10/site-packages/gradio/themes/monochrome.py new file mode 100644 index 0000000000000000000000000000000000000000..57efeb1e2478ff4b6a4c49f43cc293f3c84e55cb --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/themes/monochrome.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from typing import Iterable + +from gradio.themes.base import Base +from gradio.themes.utils import colors, fonts, sizes + + +class Monochrome(Base): + def __init__( + self, + *, + primary_hue: colors.Color | str = colors.neutral, + secondary_hue: colors.Color | str = colors.neutral, + neutral_hue: colors.Color | str = colors.neutral, + spacing_size: sizes.Size | str = sizes.spacing_lg, + radius_size: sizes.Size | str = sizes.radius_none, + text_size: sizes.Size | str = sizes.text_md, + font: fonts.Font + | str + | Iterable[fonts.Font | str] = ( + fonts.GoogleFont("Quicksand"), + "ui-sans-serif", + "system-ui", + "sans-serif", + ), + font_mono: fonts.Font + | str + | Iterable[fonts.Font | str] = ( + fonts.GoogleFont("IBM Plex Mono"), + "ui-monospace", + "Consolas", + "monospace", + ), + ): + super().__init__( + primary_hue=primary_hue, + secondary_hue=secondary_hue, + neutral_hue=neutral_hue, + spacing_size=spacing_size, + radius_size=radius_size, + text_size=text_size, + font=font, + font_mono=font_mono, + ) + super().set( + # Colors + slider_color="*neutral_900", + slider_color_dark="*neutral_500", + body_text_color="*neutral_900", + block_label_text_color="*body_text_color", + block_title_text_color="*body_text_color", + body_text_color_subdued="*neutral_700", + background_fill_primary_dark="*neutral_900", + background_fill_secondary_dark="*neutral_800", + block_background_fill_dark="*neutral_800", + input_background_fill_dark="*neutral_700", + # Button Colors + button_primary_background_fill="*neutral_900", + button_primary_background_fill_hover="*neutral_700", + button_primary_text_color="white", + button_primary_background_fill_dark="*neutral_600", + button_primary_background_fill_hover_dark="*neutral_600", + button_primary_text_color_dark="white", + button_secondary_background_fill="*button_primary_background_fill", + button_secondary_background_fill_hover="*button_primary_background_fill_hover", + button_secondary_text_color="*button_primary_text_color", + button_cancel_background_fill="*button_primary_background_fill", + button_cancel_background_fill_hover="*button_primary_background_fill_hover", + button_cancel_text_color="*button_primary_text_color", + checkbox_label_background_fill="*button_primary_background_fill", + checkbox_label_background_fill_hover="*button_primary_background_fill_hover", + checkbox_label_text_color="*button_primary_text_color", + checkbox_background_color_selected="*neutral_600", + checkbox_background_color_dark="*neutral_700", + checkbox_background_color_selected_dark="*neutral_700", + checkbox_border_color_selected_dark="*neutral_800", + # Padding + checkbox_label_padding="*spacing_md", + button_large_padding="*spacing_lg", + button_small_padding="*spacing_sm", + # Borders + block_border_width="0px", + block_border_width_dark="1px", + shadow_drop_lg="0 1px 4px 0 rgb(0 0 0 / 0.1)", + block_shadow="*shadow_drop_lg", + block_shadow_dark="none", + # Block Labels + block_title_text_weight="600", + block_label_text_weight="600", + block_label_text_size="*text_md", + ) diff --git a/valley/lib/python3.10/site-packages/gradio/themes/soft.py b/valley/lib/python3.10/site-packages/gradio/themes/soft.py new file mode 100644 index 0000000000000000000000000000000000000000..ec517b92d9add0b9583e139fe69a4dbb2c886e56 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/themes/soft.py @@ -0,0 +1,110 @@ +from __future__ import annotations + +from typing import Iterable + +from gradio.themes.base import Base +from gradio.themes.utils import colors, fonts, sizes + + +class Soft(Base): + def __init__( + self, + *, + primary_hue: colors.Color | str = colors.indigo, + secondary_hue: colors.Color | str = colors.indigo, + neutral_hue: colors.Color | str = colors.gray, + spacing_size: sizes.Size | str = sizes.spacing_md, + radius_size: sizes.Size | str = sizes.radius_md, + text_size: sizes.Size | str = sizes.text_md, + font: fonts.Font + | str + | Iterable[fonts.Font | str] = ( + fonts.GoogleFont("Montserrat"), + "ui-sans-serif", + "system-ui", + "sans-serif", + ), + font_mono: fonts.Font + | str + | Iterable[fonts.Font | str] = ( + fonts.GoogleFont("IBM Plex Mono"), + "ui-monospace", + "Consolas", + "monospace", + ), + ): + super().__init__( + primary_hue=primary_hue, + secondary_hue=secondary_hue, + neutral_hue=neutral_hue, + spacing_size=spacing_size, + radius_size=radius_size, + text_size=text_size, + font=font, + font_mono=font_mono, + ) + super().set( + # Colors + background_fill_primary="*neutral_50", + slider_color="*primary_500", + slider_color_dark="*primary_600", + # Shadows + shadow_drop="0 1px 4px 0 rgb(0 0 0 / 0.1)", + shadow_drop_lg="0 2px 5px 0 rgb(0 0 0 / 0.1)", + # Block Labels + block_background_fill="white", + block_label_padding="*spacing_sm *spacing_md", + block_label_background_fill="*primary_100", + block_label_background_fill_dark="*primary_600", + block_label_radius="*radius_md", + block_label_text_size="*text_md", + block_label_text_weight="600", + block_label_text_color="*primary_500", + block_label_text_color_dark="*white", + block_title_radius="*block_label_radius", + block_title_padding="*block_label_padding", + block_title_background_fill="*block_label_background_fill", + block_title_text_weight="600", + block_title_text_color="*primary_500", + block_title_text_color_dark="*white", + block_label_margin="*spacing_md", + # Inputs + input_background_fill="white", + input_border_color="*neutral_50", + input_shadow="*shadow_drop", + input_shadow_focus="*shadow_drop_lg", + checkbox_shadow="none", + # Buttons + shadow_spread="6px", + button_shadow="*shadow_drop_lg", + button_shadow_hover="*shadow_drop_lg", + checkbox_label_shadow="*shadow_drop_lg", + button_shadow_active="*shadow_inset", + button_primary_background_fill="*primary_500", + button_primary_background_fill_hover="*primary_400", + button_primary_background_fill_hover_dark="*primary_500", + button_primary_text_color="white", + button_secondary_background_fill="white", + button_secondary_background_fill_hover="*neutral_100", + button_secondary_background_fill_hover_dark="*primary_500", + button_secondary_text_color="*neutral_800", + button_cancel_background_fill="*button_secondary_background_fill", + button_cancel_background_fill_hover="*button_secondary_background_fill_hover", + button_cancel_background_fill_hover_dark="*button_secondary_background_fill_hover", + button_cancel_text_color="*button_secondary_text_color", + checkbox_label_background_fill_selected="*primary_500", + checkbox_label_background_fill_selected_dark="*primary_600", + checkbox_border_width="1px", + checkbox_border_color="*neutral_100", + checkbox_border_color_dark="*neutral_600", + checkbox_background_color_selected="*primary_600", + checkbox_background_color_selected_dark="*primary_700", + checkbox_border_color_focus="*primary_500", + checkbox_border_color_focus_dark="*primary_600", + checkbox_border_color_selected="*primary_600", + checkbox_border_color_selected_dark="*primary_700", + checkbox_label_text_color_selected="white", + # Borders + block_border_width="0px", + panel_border_width="1px", + ) diff --git a/valley/lib/python3.10/site-packages/gradio/themes/upload_theme.py b/valley/lib/python3.10/site-packages/gradio/themes/upload_theme.py new file mode 100644 index 0000000000000000000000000000000000000000..ee11e056d488579e818bc4814d6b13892e6b6e0b --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/themes/upload_theme.py @@ -0,0 +1,59 @@ +from __future__ import annotations + +import argparse + +from gradio.themes import ThemeClass + + +def main(): + parser = argparse.ArgumentParser(description="Upload a demo to a space") + parser.add_argument("theme", type=str, help="Theme json file") + parser.add_argument("repo_name", type=str, help="HF repo name to store the theme") + parser.add_argument( + "--org_name", + type=str, + help="The name of the org to save the space in. If None (the default), the username corresponding to the logged in user, or hƒ_token is used.", + ) + parser.add_argument("--version", type=str, help="Semver version") + parser.add_argument("--hf_token", type=str, help="HF Token") + parser.add_argument( + "--theme-name", + type=str, + help="Name of theme.", + ) + parser.add_argument( + "--description", + type=str, + help="Description of theme", + ) + args = parser.parse_args() + upload_theme( + args.theme, + args.repo_name, + args.org_name, + args.version, + args.hf_token, + args.theme_name, + args.description, + ) + + +def upload_theme( + theme: str, + repo_name: str, + org_name: str | None = None, + version: str | None = None, + hf_token: str | None = None, + theme_name: str | None = None, + description: str | None = None, +): + theme = ThemeClass.load(theme) + + return theme.push_to_hub( + repo_name=repo_name, + version=version, + hf_token=hf_token, + theme_name=theme_name, + description=description, + org_name=org_name, + ) diff --git a/valley/lib/python3.10/site-packages/gradio/themes/utils/__init__.py b/valley/lib/python3.10/site-packages/gradio/themes/utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3e974b1893ff8a363f552207241494a0545cdb16 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/themes/utils/__init__.py @@ -0,0 +1,8 @@ +from .colors import * # noqa: F401 +from .fonts import * # noqa: F401 +from .semver_match import ( # noqa: F401 + ThemeAsset, + get_matching_version, + get_theme_assets, +) +from .sizes import * # noqa: F401 diff --git a/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/__init__.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..809620a15ddcdf88bff21de19437aa8816eae2f2 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/__init__.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/colors.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/colors.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fd69078c69ed92d83621e1756278a83b84a227b7 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/colors.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/fonts.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/fonts.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f9f57e6861c7854d3bced663d3fc1e96204f173b Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/fonts.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/readme_content.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/readme_content.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c6be81892f7367769342b15520472626e61c6751 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/readme_content.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/semver_match.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/semver_match.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dd61d767b2972b91d9c821cf6ba5b6ea9ff14050 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/semver_match.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/sizes.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/sizes.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8de8eda943ac557dc1b529f0eb3ac43656be450d Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/sizes.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/theme_dropdown.cpython-310.pyc b/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/theme_dropdown.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..516a278e5d663a49479b382f46732500c39bf116 Binary files /dev/null and b/valley/lib/python3.10/site-packages/gradio/themes/utils/__pycache__/theme_dropdown.cpython-310.pyc differ diff --git a/valley/lib/python3.10/site-packages/gradio/themes/utils/colors.py b/valley/lib/python3.10/site-packages/gradio/themes/utils/colors.py new file mode 100644 index 0000000000000000000000000000000000000000..02afdd5f5c6a83921d9c417f9814d9cb50ebf9cf --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/themes/utils/colors.py @@ -0,0 +1,344 @@ +from __future__ import annotations + + +class Color: + all = [] + + def __init__( + self, + c50: str, + c100: str, + c200: str, + c300: str, + c400: str, + c500: str, + c600: str, + c700: str, + c800: str, + c900: str, + c950: str, + name: str | None = None, + ): + self.c50 = c50 + self.c100 = c100 + self.c200 = c200 + self.c300 = c300 + self.c400 = c400 + self.c500 = c500 + self.c600 = c600 + self.c700 = c700 + self.c800 = c800 + self.c900 = c900 + self.c950 = c950 + self.name = name + Color.all.append(self) + + +slate = Color( + name="slate", + c50="#f8fafc", + c100="#f1f5f9", + c200="#e2e8f0", + c300="#cbd5e1", + c400="#94a3b8", + c500="#64748b", + c600="#475569", + c700="#334155", + c800="#1e293b", + c900="#0f172a", + c950="#0a0f1e", +) +gray = Color( + name="gray", + c50="#f9fafb", + c100="#f3f4f6", + c200="#e5e7eb", + c300="#d1d5db", + c400="#9ca3af", + c500="#6b7280", + c600="#4b5563", + c700="#374151", + c800="#1f2937", + c900="#111827", + c950="#0b0f19", +) +zinc = Color( + name="zinc", + c50="#fafafa", + c100="#f4f4f5", + c200="#e4e4e7", + c300="#d4d4d8", + c400="#a1a1aa", + c500="#71717a", + c600="#52525b", + c700="#3f3f46", + c800="#27272a", + c900="#18181b", + c950="#0f0f11", +) +neutral = Color( + name="neutral", + c50="#fafafa", + c100="#f5f5f5", + c200="#e5e5e5", + c300="#d4d4d4", + c400="#a3a3a3", + c500="#737373", + c600="#525252", + c700="#404040", + c800="#262626", + c900="#171717", + c950="#0f0f0f", +) +stone = Color( + name="stone", + c50="#fafaf9", + c100="#f5f5f4", + c200="#e7e5e4", + c300="#d6d3d1", + c400="#a8a29e", + c500="#78716c", + c600="#57534e", + c700="#44403c", + c800="#292524", + c900="#1c1917", + c950="#0f0e0d", +) +red = Color( + name="red", + c50="#fef2f2", + c100="#fee2e2", + c200="#fecaca", + c300="#fca5a5", + c400="#f87171", + c500="#ef4444", + c600="#dc2626", + c700="#b91c1c", + c800="#991b1b", + c900="#7f1d1d", + c950="#6c1e1e", +) +orange = Color( + name="orange", + c50="#fff7ed", + c100="#ffedd5", + c200="#fed7aa", + c300="#fdba74", + c400="#fb923c", + c500="#f97316", + c600="#ea580c", + c700="#c2410c", + c800="#9a3412", + c900="#7c2d12", + c950="#6c2e12", +) +amber = Color( + name="amber", + c50="#fffbeb", + c100="#fef3c7", + c200="#fde68a", + c300="#fcd34d", + c400="#fbbf24", + c500="#f59e0b", + c600="#d97706", + c700="#b45309", + c800="#92400e", + c900="#78350f", + c950="#6c370f", +) +yellow = Color( + name="yellow", + c50="#fefce8", + c100="#fef9c3", + c200="#fef08a", + c300="#fde047", + c400="#facc15", + c500="#eab308", + c600="#ca8a04", + c700="#a16207", + c800="#854d0e", + c900="#713f12", + c950="#653b12", +) +lime = Color( + name="lime", + c50="#f7fee7", + c100="#ecfccb", + c200="#d9f99d", + c300="#bef264", + c400="#a3e635", + c500="#84cc16", + c600="#65a30d", + c700="#4d7c0f", + c800="#3f6212", + c900="#365314", + c950="#2f4e14", +) +green = Color( + name="green", + c50="#f0fdf4", + c100="#dcfce7", + c200="#bbf7d0", + c300="#86efac", + c400="#4ade80", + c500="#22c55e", + c600="#16a34a", + c700="#15803d", + c800="#166534", + c900="#14532d", + c950="#134e28", +) +emerald = Color( + name="emerald", + c50="#ecfdf5", + c100="#d1fae5", + c200="#a7f3d0", + c300="#6ee7b7", + c400="#34d399", + c500="#10b981", + c600="#059669", + c700="#047857", + c800="#065f46", + c900="#064e3b", + c950="#054436", +) +teal = Color( + name="teal", + c50="#f0fdfa", + c100="#ccfbf1", + c200="#99f6e4", + c300="#5eead4", + c400="#2dd4bf", + c500="#14b8a6", + c600="#0d9488", + c700="#0f766e", + c800="#115e59", + c900="#134e4a", + c950="#12443e", +) +cyan = Color( + name="cyan", + c50="#ecfeff", + c100="#cffafe", + c200="#a5f3fc", + c300="#67e8f9", + c400="#22d3ee", + c500="#06b6d4", + c600="#0891b2", + c700="#0e7490", + c800="#155e75", + c900="#164e63", + c950="#14455c", +) +sky = Color( + name="sky", + c50="#f0f9ff", + c100="#e0f2fe", + c200="#bae6fd", + c300="#7dd3fc", + c400="#38bdf8", + c500="#0ea5e9", + c600="#0284c7", + c700="#0369a1", + c800="#075985", + c900="#0c4a6e", + c950="#0b4165", +) +blue = Color( + name="blue", + c50="#eff6ff", + c100="#dbeafe", + c200="#bfdbfe", + c300="#93c5fd", + c400="#60a5fa", + c500="#3b82f6", + c600="#2563eb", + c700="#1d4ed8", + c800="#1e40af", + c900="#1e3a8a", + c950="#1d3660", +) +indigo = Color( + name="indigo", + c50="#eef2ff", + c100="#e0e7ff", + c200="#c7d2fe", + c300="#a5b4fc", + c400="#818cf8", + c500="#6366f1", + c600="#4f46e5", + c700="#4338ca", + c800="#3730a3", + c900="#312e81", + c950="#2b2c5e", +) +violet = Color( + name="violet", + c50="#f5f3ff", + c100="#ede9fe", + c200="#ddd6fe", + c300="#c4b5fd", + c400="#a78bfa", + c500="#8b5cf6", + c600="#7c3aed", + c700="#6d28d9", + c800="#5b21b6", + c900="#4c1d95", + c950="#431d7f", +) +purple = Color( + name="purple", + c50="#faf5ff", + c100="#f3e8ff", + c200="#e9d5ff", + c300="#d8b4fe", + c400="#c084fc", + c500="#a855f7", + c600="#9333ea", + c700="#7e22ce", + c800="#6b21a8", + c900="#581c87", + c950="#4c1a73", +) +fuchsia = Color( + name="fuchsia", + c50="#fdf4ff", + c100="#fae8ff", + c200="#f5d0fe", + c300="#f0abfc", + c400="#e879f9", + c500="#d946ef", + c600="#c026d3", + c700="#a21caf", + c800="#86198f", + c900="#701a75", + c950="#5e1a66", +) +pink = Color( + name="pink", + c50="#fdf2f8", + c100="#fce7f3", + c200="#fbcfe8", + c300="#f9a8d4", + c400="#f472b6", + c500="#ec4899", + c600="#db2777", + c700="#be185d", + c800="#9d174d", + c900="#831843", + c950="#6e1a3d", +) +rose = Color( + name="rose", + c50="#fff1f2", + c100="#ffe4e6", + c200="#fecdd3", + c300="#fda4af", + c400="#fb7185", + c500="#f43f5e", + c600="#e11d48", + c700="#be123c", + c800="#9f1239", + c900="#881337", + c950="#771d3a", +) diff --git a/valley/lib/python3.10/site-packages/gradio/themes/utils/fonts.py b/valley/lib/python3.10/site-packages/gradio/themes/utils/fonts.py new file mode 100644 index 0000000000000000000000000000000000000000..97f30ab1583140e5c0d1f197f5d73322e2b3e224 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/themes/utils/fonts.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +import json + + +class FontEncoder(json.JSONEncoder): + def default(self, obj): + if isinstance(obj, Font): + return { + "__gradio_font__": True, + "name": obj.name, + "class": "google" if isinstance(obj, GoogleFont) else "font", + } + # Let the base class default method raise the TypeError + return json.JSONEncoder.default(self, obj) + + +def as_font(dct): + if "__gradio_font__" in dct: + name = dct["name"] + return GoogleFont(name) if dct["class"] == "google" else Font(name) + return dct + + +class Font: + def __init__(self, name: str): + self.name = name + + def __str__(self) -> str: + return ( + self.name + if self.name in ["sans-serif", "serif", "monospace", "cursive", "fantasy"] + else f"'{self.name}'" + ) + + def stylesheet(self) -> str: + return None + + def __eq__(self, other: Font) -> bool: + return self.name == other.name and self.stylesheet() == other.stylesheet() + + +class GoogleFont(Font): + def stylesheet(self) -> str: + return f'https://fonts.googleapis.com/css2?family={self.name.replace(" ", "+")}:wght@400;600&display=swap' diff --git a/valley/lib/python3.10/site-packages/gradio/themes/utils/readme_content.py b/valley/lib/python3.10/site-packages/gradio/themes/utils/readme_content.py new file mode 100644 index 0000000000000000000000000000000000000000..93e72696dd8a42dbefb9b778f4e1a274d87919e8 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/themes/utils/readme_content.py @@ -0,0 +1,18 @@ +README_CONTENT = """ +--- +tags: [gradio-theme] +title: {theme_name} +colorFrom: orange +colorTo: purple +sdk: gradio +sdk_version: {gradio_version} +app_file: app.py +pinned: false +license: apache-2.0 +--- +# {theme_name} +## Description +{description} +## Contributions +Thanks to [@{author}](https://huggingface.co/{author}) for adding this gradio theme! +""" diff --git a/valley/lib/python3.10/site-packages/gradio/themes/utils/semver_match.py b/valley/lib/python3.10/site-packages/gradio/themes/utils/semver_match.py new file mode 100644 index 0000000000000000000000000000000000000000..6174360688b70b1cd7485311ac8021aab544e9b1 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/themes/utils/semver_match.py @@ -0,0 +1,42 @@ +from __future__ import annotations + +from dataclasses import dataclass, field +from typing import List + +import huggingface_hub +import semantic_version +import semantic_version as semver + + +@dataclass +class ThemeAsset: + filename: str + version: semver.Version = field(init=False) + + def __post_init__(self): + self.version = semver.Version(self.filename.split("@")[1].replace(".json", "")) + + +def get_theme_assets(space_info: huggingface_hub.hf_api.SpaceInfo) -> List[ThemeAsset]: + if "gradio-theme" not in getattr(space_info, "tags", []): + raise ValueError(f"{space_info.id} is not a valid gradio-theme space!") + + return [ + ThemeAsset(filename.rfilename) + for filename in space_info.siblings + if filename.rfilename.startswith("themes/") + ] + + +def get_matching_version( + assets: List[ThemeAsset], expression: str | None +) -> ThemeAsset | None: + + expression = expression or "*" + + # Return most recent version that matches + matching_version = semantic_version.SimpleSpec(expression).select( + [a.version for a in assets] + ) + + return next((a for a in assets if a.version == matching_version), None) diff --git a/valley/lib/python3.10/site-packages/gradio/themes/utils/sizes.py b/valley/lib/python3.10/site-packages/gradio/themes/utils/sizes.py new file mode 100644 index 0000000000000000000000000000000000000000..7b4aeb808ed53f6d8bd8be045d042784276c33c8 --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/themes/utils/sizes.py @@ -0,0 +1,126 @@ +class Size: + all = [] + + def __init__( + self, xxs: str, xs: str, sm: str, md: str, lg: str, xl: str, xxl: str, name=None + ): + self.xxs = xxs + self.xs = xs + self.sm = sm + self.md = md + self.lg = lg + self.xl = xl + self.xxl = xxl + self.name = name + Size.all.append(self) + + +radius_none = Size( + name="radius_none", + xxs="0px", + xs="0px", + sm="0px", + md="0px", + lg="0px", + xl="0px", + xxl="0px", +) + +radius_sm = Size( + name="radius_sm", + xxs="1px", + xs="1px", + sm="2px", + md="4px", + lg="6px", + xl="8px", + xxl="12px", +) + +radius_md = Size( + name="radius_md", + xxs="1px", + xs="2px", + sm="4px", + md="6px", + lg="8px", + xl="12px", + xxl="22px", +) + +radius_lg = Size( + name="radius_lg", + xxs="2px", + xs="4px", + sm="6px", + md="8px", + lg="12px", + xl="16px", + xxl="24px", +) + +spacing_sm = Size( + name="spacing_sm", + xxs="1px", + xs="1px", + sm="2px", + md="4px", + lg="6px", + xl="9px", + xxl="12px", +) + +spacing_md = Size( + name="spacing_md", + xxs="1px", + xs="2px", + sm="4px", + md="6px", + lg="8px", + xl="10px", + xxl="16px", +) + +spacing_lg = Size( + name="spacing_lg", + xxs="2px", + xs="4px", + sm="6px", + md="8px", + lg="10px", + xl="14px", + xxl="28px", +) + +text_sm = Size( + name="text_sm", + xxs="8px", + xs="9px", + sm="11px", + md="13px", + lg="16px", + xl="20px", + xxl="24px", +) + +text_md = Size( + name="text_md", + xxs="9px", + xs="10px", + sm="12px", + md="14px", + lg="16px", + xl="22px", + xxl="26px", +) + +text_lg = Size( + name="text_lg", + xxs="10px", + xs="12px", + sm="14px", + md="16px", + lg="20px", + xl="24px", + xxl="28px", +) diff --git a/valley/lib/python3.10/site-packages/gradio/themes/utils/theme_dropdown.py b/valley/lib/python3.10/site-packages/gradio/themes/utils/theme_dropdown.py new file mode 100644 index 0000000000000000000000000000000000000000..6235388fd00549553df44028f3ccf03e946994ea --- /dev/null +++ b/valley/lib/python3.10/site-packages/gradio/themes/utils/theme_dropdown.py @@ -0,0 +1,57 @@ +import os +import pathlib + +from gradio.themes.utils import ThemeAsset + + +def create_theme_dropdown(): + import gradio as gr + + asset_path = pathlib.Path(__file__).parent / "themes" + themes = [] + for theme_asset in os.listdir(str(asset_path)): + themes.append( + (ThemeAsset(theme_asset), gr.Theme.load(str(asset_path / theme_asset))) + ) + + def make_else_if(theme_asset): + return f""" + else if (theme == '{str(theme_asset[0].version)}') {{ + var theme_css = `{theme_asset[1]._get_theme_css()}` + }}""" + + head, tail = themes[0], themes[1:] + if_statement = f""" + if (theme == "{str(head[0].version)}") {{ + var theme_css = `{head[1]._get_theme_css()}` + }} {" ".join(make_else_if(t) for t in tail)} + """ + + latest_to_oldest = sorted([t[0] for t in themes], key=lambda asset: asset.version)[ + ::-1 + ] + latest_to_oldest = [str(t.version) for t in latest_to_oldest] + + component = gr.Dropdown( + choices=latest_to_oldest, + value=latest_to_oldest[0], + render=False, + label="Select Version", + ).style(container=False) + + return ( + component, + f""" + (theme) => {{ + if (!document.querySelector('.theme-css')) {{ + var theme_elem = document.createElement('style'); + theme_elem.classList.add('theme-css'); + document.head.appendChild(theme_elem); + }} else {{ + var theme_elem = document.querySelector('.theme-css'); + }} + {if_statement} + theme_elem.innerHTML = theme_css; + }} + """, + ) diff --git a/valley/lib/python3.10/site-packages/imageio-2.35.1.dist-info/LICENSE b/valley/lib/python3.10/site-packages/imageio-2.35.1.dist-info/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..33b1352017fa3939ee32c08e027f57deefb9470f --- /dev/null +++ b/valley/lib/python3.10/site-packages/imageio-2.35.1.dist-info/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2014-2022, imageio developers +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +