streamlit-webrtc 0.47.9__py3-none-any.whl → 0.48.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamlit_webrtc/_compat.py +8 -0
- streamlit_webrtc/component.py +9 -3
- {streamlit_webrtc-0.47.9.dist-info → streamlit_webrtc-0.48.0.dist-info}/METADATA +3 -3
- {streamlit_webrtc-0.47.9.dist-info → streamlit_webrtc-0.48.0.dist-info}/RECORD +6 -11
- {streamlit_webrtc-0.47.9.dist-info → streamlit_webrtc-0.48.0.dist-info}/WHEEL +1 -1
- streamlit_webrtc/frontend/build/asset-manifest.json +0 -10
- streamlit_webrtc/frontend/build/index.html +0 -1
- streamlit_webrtc/frontend/build/static/js/main.ff279b83.js +0 -103
- streamlit_webrtc/frontend/build/static/js/main.ff279b83.js.LICENSE.txt +0 -122
- streamlit_webrtc/frontend/build/static/js/main.ff279b83.js.map +0 -1
- {streamlit_webrtc-0.47.9.dist-info → streamlit_webrtc-0.48.0.dist-info}/LICENSE +0 -0
@@ -1,103 +0,0 @@
|
|
1
|
-
/*! For license information please see main.ff279b83.js.LICENSE.txt */
|
2
|
-
(()=>{var e={5243:(e,t,n)=>{"use strict";n.d(t,{A:()=>ie});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(r){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),i=Math.abs,o=String.fromCharCode,a=Object.assign;function s(e){return e.trim()}function l(e,t,n){return e.replace(t,n)}function c(e,t){return e.indexOf(t)}function u(e,t){return 0|e.charCodeAt(t)}function d(e,t,n){return e.slice(t,n)}function f(e){return e.length}function p(e){return e.length}function h(e,t){return t.push(e),e}var m=1,y=1,b=0,v=0,g=0,w="";function _(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:m,column:y,length:a,return:""}}function S(e,t){return a(_("",null,null,"",null,null,0),e,{length:-e.length},t)}function A(){return g=v>0?u(w,--v):0,y--,10===g&&(y=1,m--),g}function x(){return g=v<b?u(w,v++):0,y++,10===g&&(y=1,m++),g}function k(){return u(w,v)}function C(){return v}function T(e,t){return d(w,e,t)}function I(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function E(e){return m=y=1,b=f(w=e),v=0,[]}function R(e){return w="",e}function O(e){return s(T(v-1,D(91===e?e+2:40===e?e+1:e)))}function P(e){for(;(g=k())&&g<33;)x();return I(e)>2||I(g)>3?"":" "}function M(e,t){for(;--t&&x()&&!(g<48||g>102||g>57&&g<65||g>70&&g<97););return T(e,C()+(t<6&&32==k()&&32==x()))}function D(e){for(;x();)switch(g){case e:return v;case 34:case 39:34!==e&&39!==e&&D(g);break;case 40:41===e&&D(e);break;case 92:x()}return v}function N(e,t){for(;x()&&e+g!==57&&(e+g!==84||47!==k()););return"/*"+T(t,v-1)+"*"+o(47===e?e:x())}function L(e){for(;!I(k());)x();return T(e,v)}var F="-ms-",B="-moz-",j="-webkit-",z="comm",U="rule",V="decl",$="@keyframes";function W(e,t){for(var n="",r=p(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function H(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case V:return e.return=e.return||e.value;case z:return"";case $:return e.return=e.value+"{"+W(e.children,r)+"}";case U:e.value=e.props.join(",")}return f(n=W(e.children,r))?e.return=e.value+"{"+n+"}":""}function Y(e){return R(G("",null,null,null,[""],e=E(e),0,[0],e))}function G(e,t,n,r,i,a,s,d,p){for(var m=0,y=0,b=s,v=0,g=0,w=0,_=1,S=1,T=1,I=0,E="",R=i,D=a,F=r,B=E;S;)switch(w=I,I=x()){case 40:if(108!=w&&58==u(B,b-1)){-1!=c(B+=l(O(I),"&","&\f"),"&\f")&&(T=-1);break}case 34:case 39:case 91:B+=O(I);break;case 9:case 10:case 13:case 32:B+=P(w);break;case 92:B+=M(C()-1,7);continue;case 47:switch(k()){case 42:case 47:h(K(N(x(),C()),t,n),p);break;default:B+="/"}break;case 123*_:d[m++]=f(B)*T;case 125*_:case 59:case 0:switch(I){case 0:case 125:S=0;case 59+y:-1==T&&(B=l(B,/\f/g,"")),g>0&&f(B)-b&&h(g>32?Q(B+";",r,n,b-1):Q(l(B," ","")+";",r,n,b-2),p);break;case 59:B+=";";default:if(h(F=q(B,t,n,m,y,i,d,E,R=[],D=[],b),a),123===I)if(0===y)G(B,t,F,F,R,a,b,d,D);else switch(99===v&&110===u(B,3)?100:v){case 100:case 108:case 109:case 115:G(e,F,F,r&&h(q(e,F,F,0,0,i,d,E,i,R=[],b),D),i,D,b,d,r?R:D);break;default:G(B,F,F,F,[""],D,0,d,D)}}m=y=g=0,_=T=1,E=B="",b=s;break;case 58:b=1+f(B),g=w;default:if(_<1)if(123==I)--_;else if(125==I&&0==_++&&125==A())continue;switch(B+=o(I),I*_){case 38:T=y>0?1:(B+="\f",-1);break;case 44:d[m++]=(f(B)-1)*T,T=1;break;case 64:45===k()&&(B+=O(x())),v=k(),y=b=f(E=B+=L(C())),I++;break;case 45:45===w&&2==f(B)&&(_=0)}}return a}function q(e,t,n,r,o,a,c,u,f,h,m){for(var y=o-1,b=0===o?a:[""],v=p(b),g=0,w=0,S=0;g<r;++g)for(var A=0,x=d(e,y+1,y=i(w=c[g])),k=e;A<v;++A)(k=s(w>0?b[A]+" "+x:l(x,/&\f/g,b[A])))&&(f[S++]=k);return _(e,t,n,0===o?U:u,f,h,m)}function K(e,t,n){return _(e,t,n,z,o(g),d(e,2,-2),0)}function Q(e,t,n,r){return _(e,t,n,V,d(e,0,r),d(e,r+1,-1),r)}var X=function(e,t,n){for(var r=0,i=0;r=i,i=k(),38===r&&12===i&&(t[n]=1),!I(i);)x();return T(e,v)},J=function(e,t){return R(function(e,t){var n=-1,r=44;do{switch(I(r)){case 0:38===r&&12===k()&&(t[n]=1),e[n]+=X(v-1,t,n);break;case 2:e[n]+=O(r);break;case 4:if(44===r){e[++n]=58===k()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=o(r)}}while(r=x());return e}(E(e),t))},Z=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Z.get(n))&&!r){Z.set(e,!0);for(var i=[],o=J(t,i),a=n.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},te=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ne(e,t){switch(function(e,t){return 45^u(e,0)?(((t<<2^u(e,0))<<2^u(e,1))<<2^u(e,2))<<2^u(e,3):0}(e,t)){case 5103:return j+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return j+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return j+e+B+e+F+e+e;case 6828:case 4268:return j+e+F+e+e;case 6165:return j+e+F+"flex-"+e+e;case 5187:return j+e+l(e,/(\w+).+(:[^]+)/,j+"box-$1$2"+F+"flex-$1$2")+e;case 5443:return j+e+F+"flex-item-"+l(e,/flex-|-self/,"")+e;case 4675:return j+e+F+"flex-line-pack"+l(e,/align-content|flex-|-self/,"")+e;case 5548:return j+e+F+l(e,"shrink","negative")+e;case 5292:return j+e+F+l(e,"basis","preferred-size")+e;case 6060:return j+"box-"+l(e,"-grow","")+j+e+F+l(e,"grow","positive")+e;case 4554:return j+l(e,/([^-])(transform)/g,"$1"+j+"$2")+e;case 6187:return l(l(l(e,/(zoom-|grab)/,j+"$1"),/(image-set)/,j+"$1"),e,"")+e;case 5495:case 3959:return l(e,/(image-set\([^]*)/,j+"$1$`$1");case 4968:return l(l(e,/(.+:)(flex-)?(.*)/,j+"box-pack:$3"+F+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+j+e+e;case 4095:case 3583:case 4068:case 2532:return l(e,/(.+)-inline(.+)/,j+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(f(e)-1-t>6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+j+"$2-$3$1"+B+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?ne(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,f(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+j)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+j+(45===u(e,14)?"inline-":"")+"box$3$1"+j+"$2$3$1"+F+"$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return j+e+F+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return j+e+F+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return j+e+F+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return j+e+F+e+e}return e}var re=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case V:e.return=ne(e.value,e.length);break;case $:return W([S(e,{value:l(e.value,"@","@"+j)})],r);case U:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return W([S(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return W([S(e,{props:[l(t,/:(plac\w+)/,":"+j+"input-$1")]}),S(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),S(e,{props:[l(t,/:(plac\w+)/,F+"input-$1")]})],r)}return""}))}}],ie=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i=e.stylisPlugins||re;var o,a,s={},l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;l.push(e)}));var c,u,d=[H,(u=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&u(e)})],f=function(e){var t=p(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}([ee,te].concat(i,d));a=function(e,t,n,r){c=n,W(Y(e?e+"{"+t.styles+"}":t.styles),f),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new r({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:a};return h.sheet.hydrate(l),h}},5208:(e,t,n)=>{"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{A:()=>r})},10:(e,t,n)=>{"use strict";n.d(t,{T:()=>l,i:()=>o,w:()=>s});var r=n(7565),i=n(5243),o=(n(4013),n(6714),!0),a=r.createContext("undefined"!==typeof HTMLElement?(0,i.A)({key:"css"}):null);a.Provider;var s=function(e){return(0,r.forwardRef)((function(t,n){var i=(0,r.useContext)(a);return e(t,i,n)}))};o||(s=function(e){return function(t){var n=(0,r.useContext)(a);return null===n?(n=(0,i.A)({key:"css"}),r.createElement(a.Provider,{value:n},e(t,n))):e(t,n)}});var l=r.createContext({})},4013:(e,t,n)=>{"use strict";n.d(t,{J:()=>h});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=n(5208),o=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!==typeof e},c=(0,i.A)((function(e){return s(e)?e:e.replace(o,"-$&").toLowerCase()})),u=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(a,(function(e,t,n){return f={name:t,styles:n,next:f},t}))}return 1===r[e]||s(e)||"number"!==typeof t||0===t?t:t+"px"};function d(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return f={name:n.name,styles:n.styles,next:f},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)f={name:r.name,styles:r.styles,next:f},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=d(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!==typeof a)null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":l(a)&&(r+=c(o)+":"+u(o,a)+";");else if(!Array.isArray(a)||"string"!==typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=d(e,t,a);switch(o){case"animation":case"animationName":r+=c(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var f=0;f<a.length;f++)l(a[f])&&(r+=c(o)+":"+u(o,a[f])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=f,o=n(e);return f=i,d(e,t,o)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var f,p=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var h=function(e,t,n){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";f=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=d(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++)i+=d(n,t,e[a]),r&&(i+=o[a]);p.lastIndex=0;for(var s,l="";null!==(s=p.exec(i));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:f}}},6714:(e,t,n)=>{"use strict";var r;n.d(t,{i:()=>s,s:()=>a});var i=n(7565),o=!!(r||(r=n.t(i,2))).useInsertionEffect&&(r||(r=n.t(i,2))).useInsertionEffect,a=o||function(e){return e()},s=o||i.useLayoutEffect},8592:(e,t,n)=>{"use strict";n.d(t,{Rk:()=>r,SF:()=>i,sk:()=>o});function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var i=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},o=function(e,t,n){i(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}},1993:(e,t,n)=>{"use strict";var r=n(4994);t.A=void 0;var i=r(n(549)),o=n(7929),a=(0,i.default)((0,o.jsx)("path",{d:"M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 13H3V5h18v11z"}),"VideoLabel");t.A=a},4787:(e,t,n)=>{"use strict";var r=n(4994);t.A=void 0;var i=r(n(549)),o=n(7929),a=(0,i.default)((0,o.jsx)("path",{d:"m21 6.5-4 4V7c0-.55-.45-1-1-1H9.82L21 17.18V6.5zM3.27 2 2 3.27 4.73 6H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.21 0 .39-.08.54-.18L19.73 21 21 19.73 3.27 2z"}),"VideocamOff");t.A=a},549:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(443)},402:(e,t,n)=>{"use strict";n.d(t,{A:()=>F});var r=n(8168),i=n(8587),o=n(9476),a=n(2147),s=n(928);var l=n(8176);const c={black:"#000",white:"#fff"},u={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},d={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},f={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},p={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},h={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},m={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},y={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},b=["mode","contrastThreshold","tonalOffset"],v={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:c.white,default:c.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},g={text:{primary:c.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:c.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function w(e,t,n,r){const i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,l.a)(e.main,i):"dark"===t&&(e.dark=(0,l.e$)(e.main,o)))}function _(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:s=.2}=e,_=(0,i.A)(e,b),S=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:h[200],light:h[50],dark:h[400]}:{main:h[700],light:h[400],dark:h[800]}}(t),A=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:d[200],light:d[50],dark:d[400]}:{main:d[500],light:d[300],dark:d[700]}}(t),x=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:f[500],light:f[300],dark:f[700]}:{main:f[700],light:f[400],dark:f[800]}}(t),k=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m[400],light:m[300],dark:m[700]}:{main:m[700],light:m[500],dark:m[900]}}(t),C=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:y[400],light:y[300],dark:y[700]}:{main:y[800],light:y[500],dark:y[900]}}(t),T=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:p[400],light:p[300],dark:p[700]}:{main:"#ed6c02",light:p[500],dark:p[900]}}(t);function I(e){return(0,l.eM)(e,g.text.primary)>=n?g.text.primary:v.text.primary}const E=e=>{let{color:t,name:n,mainShade:i=500,lightShade:a=300,darkShade:l=700}=e;if(t=(0,r.A)({},t),!t.main&&t[i]&&(t.main=t[i]),!t.hasOwnProperty("main"))throw new Error((0,o.A)(11,n?` (${n})`:"",i));if("string"!==typeof t.main)throw new Error((0,o.A)(12,n?` (${n})`:"",JSON.stringify(t.main)));return w(t,"light",a,s),w(t,"dark",l,s),t.contrastText||(t.contrastText=I(t.main)),t},R={dark:g,light:v};return(0,a.A)((0,r.A)({common:(0,r.A)({},c),mode:t,primary:E({color:S,name:"primary"}),secondary:E({color:A,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:E({color:x,name:"error"}),warning:E({color:T,name:"warning"}),info:E({color:k,name:"info"}),success:E({color:C,name:"success"}),grey:u,contrastThreshold:n,getContrastText:I,augmentColor:E,tonalOffset:s},R[t]),_)}const S=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const A={textTransform:"uppercase"},x='"Roboto", "Helvetica", "Arial", sans-serif';function k(e,t){const n="function"===typeof t?t(e):t,{fontFamily:o=x,fontSize:s=14,fontWeightLight:l=300,fontWeightRegular:c=400,fontWeightMedium:u=500,fontWeightBold:d=700,htmlFontSize:f=16,allVariants:p,pxToRem:h}=n,m=(0,i.A)(n,S);const y=s/14,b=h||(e=>e/f*y+"rem"),v=(e,t,n,i,a)=>{return(0,r.A)({fontFamily:o,fontWeight:e,fontSize:b(t),lineHeight:n},o===x?{letterSpacing:(s=i/t,Math.round(1e5*s)/1e5)+"em"}:{},a,p);var s},g={h1:v(l,96,1.167,-1.5),h2:v(l,60,1.2,-.5),h3:v(c,48,1.167,0),h4:v(c,34,1.235,.25),h5:v(c,24,1.334,0),h6:v(u,20,1.6,.15),subtitle1:v(c,16,1.75,.15),subtitle2:v(u,14,1.57,.1),body1:v(c,16,1.5,.15),body2:v(c,14,1.43,.15),button:v(u,14,1.75,.4,A),caption:v(c,12,1.66,.4),overline:v(c,12,2.66,1,A)};return(0,a.A)((0,r.A)({htmlFontSize:f,pxToRem:b,fontFamily:o,fontSize:s,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:u,fontWeightBold:d},g),m,{clone:!1})}function C(){return[`${arguments.length<=0?void 0:arguments[0]}px ${arguments.length<=1?void 0:arguments[1]}px ${arguments.length<=2?void 0:arguments[2]}px ${arguments.length<=3?void 0:arguments[3]}px rgba(0,0,0,0.2)`,`${arguments.length<=4?void 0:arguments[4]}px ${arguments.length<=5?void 0:arguments[5]}px ${arguments.length<=6?void 0:arguments[6]}px ${arguments.length<=7?void 0:arguments[7]}px rgba(0,0,0,0.14)`,`${arguments.length<=8?void 0:arguments[8]}px ${arguments.length<=9?void 0:arguments[9]}px ${arguments.length<=10?void 0:arguments[10]}px ${arguments.length<=11?void 0:arguments[11]}px rgba(0,0,0,0.12)`].join(",")}const T=["none",C(0,2,1,-1,0,1,1,0,0,1,3,0),C(0,3,1,-2,0,2,2,0,0,1,5,0),C(0,3,3,-2,0,3,4,0,0,1,8,0),C(0,2,4,-1,0,4,5,0,0,1,10,0),C(0,3,5,-1,0,5,8,0,0,1,14,0),C(0,3,5,-1,0,6,10,0,0,1,18,0),C(0,4,5,-2,0,7,10,1,0,2,16,1),C(0,5,5,-3,0,8,10,1,0,3,14,2),C(0,5,6,-3,0,9,12,1,0,3,16,2),C(0,6,6,-3,0,10,14,1,0,4,18,3),C(0,6,7,-4,0,11,15,1,0,4,20,3),C(0,7,8,-4,0,12,17,2,0,5,22,4),C(0,7,8,-4,0,13,19,2,0,5,24,4),C(0,7,9,-4,0,14,21,2,0,5,26,4),C(0,8,9,-5,0,15,22,2,0,6,28,5),C(0,8,10,-5,0,16,24,2,0,6,30,5),C(0,8,11,-5,0,17,26,2,0,6,32,5),C(0,9,11,-5,0,18,28,2,0,7,34,6),C(0,9,12,-6,0,19,29,2,0,7,36,6),C(0,10,13,-6,0,20,31,3,0,8,38,7),C(0,10,13,-6,0,21,33,3,0,8,40,7),C(0,10,14,-6,0,22,35,3,0,8,42,7),C(0,11,14,-7,0,23,36,3,0,9,44,8),C(0,11,15,-7,0,24,38,3,0,9,46,8)],I=["duration","easing","delay"],E={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},R={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function O(e){return`${Math.round(e)}ms`}function P(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function M(e){const t=(0,r.A)({},E,e.easing),n=(0,r.A)({},R,e.duration);return(0,r.A)({getAutoHeightDuration:P,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{duration:o=n.standard,easing:a=t.easeInOut,delay:s=0}=r;(0,i.A)(r,I);return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"===typeof o?o:O(o)} ${a} ${"string"===typeof s?s:O(s)}`)).join(",")}},e,{easing:t,duration:n})}const D={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},N=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function L(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:n={},transitions:l={},typography:c={}}=e,u=(0,i.A)(e,N);if(e.vars)throw new Error((0,o.A)(18));const d=_(n),f=(0,s.A)(e);let p=(0,a.A)(f,{mixins:(h=f.breakpoints,m=t,(0,r.A)({toolbar:{minHeight:56,[h.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[h.up("sm")]:{minHeight:64}}},m)),palette:d,shadows:T.slice(),typography:k(d,c),transitions:M(l),zIndex:(0,r.A)({},D)});var h,m;p=(0,a.A)(p,u);for(var y=arguments.length,b=new Array(y>1?y-1:0),v=1;v<y;v++)b[v-1]=arguments[v];return p=b.reduce(((e,t)=>(0,a.A)(e,t)),p),p}const F=L},7996:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(0,n(402).A)()},8099:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>_,ep:()=>g});var r=n(8587),i=n(8168),o=n(4843),a=n(928),s=n(8459);const l=["variant"];function c(e){return 0===e.length}function u(e){const{variant:t}=e,n=(0,r.A)(e,l);let i=t||"";return Object.keys(n).sort().forEach((t=>{i+="color"===t?c(i)?e[t]:(0,s.A)(e[t]):`${c(i)?t:(0,s.A)(t)}${(0,s.A)(e[t].toString())}`})),i}var d=n(5514);const f=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],p=["theme"],h=["theme"];function m(e){return 0===Object.keys(e).length}function y(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const b=(0,a.A)();var v=n(7996);const g=e=>y(e)&&"classes"!==e,w=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{defaultTheme:t=b,rootShouldForwardProp:n=y,slotShouldForwardProp:a=y,styleFunctionSx:s=d.A}=e,l=e=>{const n=m(e.theme)?t:e.theme;return s((0,i.A)({},e,{theme:n}))};return l.__mui_systemSx=!0,function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.q_)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:c,slot:d,skipVariantsResolver:b,skipSx:v,overridesResolver:g}=s,w=(0,r.A)(s,f),_=void 0!==b?b:d&&"Root"!==d||!1,S=v||!1;let A=y;"Root"===d?A=n:d?A=a:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(A=void 0);const x=(0,o.Ay)(e,(0,i.A)({shouldForwardProp:A,label:undefined},w)),k=function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];const s=o?o.map((e=>"function"===typeof e&&e.__emotion_real!==e?n=>{let{theme:o}=n,a=(0,r.A)(n,p);return e((0,i.A)({theme:m(o)?t:o},a))}:e)):[];let d=e;c&&g&&s.push((e=>{const n=m(e.theme)?t:e.theme,r=((e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null)(c,n);if(r){const t={};return Object.entries(r).forEach((r=>{let[o,a]=r;t[o]="function"===typeof a?a((0,i.A)({},e,{theme:n})):a})),g(e,t)}return null})),c&&!_&&s.push((e=>{const n=m(e.theme)?t:e.theme;return((e,t,n,r)=>{var i,o;const{ownerState:a={}}=e,s=[],l=null==n||null==(i=n.components)||null==(o=i[r])?void 0:o.variants;return l&&l.forEach((n=>{let r=!0;Object.keys(n.props).forEach((t=>{a[t]!==n.props[t]&&e[t]!==n.props[t]&&(r=!1)})),r&&s.push(t[u(n.props)])})),s})(e,((e,t)=>{let n=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants);const r={};return n.forEach((e=>{const t=u(e.props);r[t]=e.style})),r})(c,n),n,c)})),S||s.push(l);const f=s.length-o.length;if(Array.isArray(e)&&f>0){const t=new Array(f).fill("");d=[...e,...t],d.raw=[...e.raw,...t]}else"function"===typeof e&&e.__emotion_real!==e&&(d=n=>{let{theme:o}=n,a=(0,r.A)(n,h);return e((0,i.A)({theme:m(o)?t:o},a))});return x(d,...s)};return x.withConfig&&(k.withConfig=x.withConfig),k}}({defaultTheme:v.A,rootShouldForwardProp:g}),_=w},8167:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(965),i=n(5841);var o=n(7996);function a(e){let{props:t,name:n}=e;return function(e){let{props:t,name:n,defaultTheme:o}=e;const a=(0,i.A)(o);return(0,r.A)({theme:a,name:n,props:t})}({props:t,name:n,defaultTheme:o.A})}},3777:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(8459).A},8063:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(8168),i=n(7565),o=n(8587),a=n(8854),s=n(9360),l=n(3777),c=n(8167),u=n(8099),d=n(8210);function f(e){return(0,d.A)("MuiSvgIcon",e)}(0,n(2458).A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var p=n(7929);const h=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],m=(0,u.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${(0,l.A)(n.color)}`],t[`fontSize${(0,l.A)(n.fontSize)}`]]}})((e=>{let{theme:t,ownerState:n}=e;var r,i,o,a,s,l,c,u,d,f,p,h,m,y,b,v,g;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:null==(r=t.transitions)||null==(i=r.create)?void 0:i.call(r,"fill",{duration:null==(o=t.transitions)||null==(a=o.duration)?void 0:a.shorter}),fontSize:{inherit:"inherit",small:(null==(s=t.typography)||null==(l=s.pxToRem)?void 0:l.call(s,20))||"1.25rem",medium:(null==(c=t.typography)||null==(u=c.pxToRem)?void 0:u.call(c,24))||"1.5rem",large:(null==(d=t.typography)||null==(f=d.pxToRem)?void 0:f.call(d,35))||"2.1875rem"}[n.fontSize],color:null!=(p=null==(h=(t.vars||t).palette)||null==(m=h[n.color])?void 0:m.main)?p:{action:null==(y=(t.vars||t).palette)||null==(b=y.action)?void 0:b.active,disabled:null==(v=(t.vars||t).palette)||null==(g=v.action)?void 0:g.disabled,inherit:void 0}[n.color]}})),y=i.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiSvgIcon"}),{children:i,className:u,color:d="inherit",component:y="svg",fontSize:b="medium",htmlColor:v,inheritViewBox:g=!1,titleAccess:w,viewBox:_="0 0 24 24"}=n,S=(0,o.A)(n,h),A=(0,r.A)({},n,{color:d,component:y,fontSize:b,instanceFontSize:e.fontSize,inheritViewBox:g,viewBox:_}),x={};g||(x.viewBox=_);const k=(e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root","inherit"!==t&&`color${(0,l.A)(t)}`,`fontSize${(0,l.A)(n)}`]};return(0,s.A)(i,f,r)})(A);return(0,p.jsxs)(m,(0,r.A)({as:y,className:(0,a.A)(k.root,u),focusable:"false",color:v,"aria-hidden":!w||void 0,role:w?"img":void 0,ref:t},x,S,{ownerState:A,children:[i,w?(0,p.jsx)("title",{children:w}):null]}))}));y.muiName="SvgIcon";const b=y;function v(e,t){function n(n,i){return(0,p.jsx)(b,(0,r.A)({"data-testid":`${t}Icon`,ref:i},n,{children:e}))}return n.muiName=b.muiName,i.memo(i.forwardRef(n))}},443:(e,t,n)=>{"use strict";n.r(t),n.d(t,{capitalize:()=>i.A,createChainedFunction:()=>o,createSvgIcon:()=>a.A,debounce:()=>s,deprecatedPropType:()=>l,isMuiElement:()=>c.A,ownerDocument:()=>u,ownerWindow:()=>d,requirePropFactory:()=>f,setRef:()=>p,unstable_ClassNameGenerator:()=>x,unstable_useEnhancedEffect:()=>h.A,unstable_useId:()=>v,unsupportedProp:()=>g,useControlled:()=>w,useEventCallback:()=>_.A,useForkRef:()=>S.A,useIsFocusVisible:()=>A.A});var r=n(896),i=n(3777);const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(((e,t)=>null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}),(()=>{}))};var a=n(8063);const s=n(2958).A;const l=function(e,t){return()=>null};var c=n(6701);const u=n(1811).A;const d=n(5350).A;n(8168);const f=function(e,t){return()=>null};const p=n(976).A;var h=n(5267),m=n(7565);let y=0;const b=n.t(m,2).useId;const v=function(e){if(void 0!==b){const t=b();return null!=e?e:t}return function(e){const[t,n]=m.useState(e),r=e||t;return m.useEffect((()=>{null==t&&(y+=1,n(`mui-${y}`))}),[t]),r}(e)};const g=function(e,t,n,r,i){return null};const w=function(e){let{controlled:t,default:n,name:r,state:i="value"}=e;const{current:o}=m.useRef(void 0!==t),[a,s]=m.useState(n);return[o?t:a,m.useCallback((e=>{o||s(e)}),[])]};var _=n(1419),S=n(5523),A=n(5789);const x={configure:e=>{console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.","","You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead","","The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401","","The updated documentation: https://mui.com/guides/classname-generator/"].join("\n")),r.A.configure(e)}}},6701:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(7565);const i=function(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}},5267:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(8829).A},1419:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(7565),i=n(8829);const o=function(e){const t=r.useRef(e);return(0,i.A)((()=>{t.current=e})),r.useCallback((function(){return(0,t.current)(...arguments)}),[])}},5523:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(5713).A},5789:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(7565);let i,o=!0,a=!1;const s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function l(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function c(){o=!1}function u(){"hidden"===this.visibilityState&&a&&(o=!0)}function d(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return o||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!s[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}const f=function(){const e=r.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",l,!0),t.addEventListener("mousedown",c,!0),t.addEventListener("pointerdown",c,!0),t.addEventListener("touchstart",c,!0),t.addEventListener("visibilitychange",u,!0))}),[]),t=r.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!d(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(a=!0,window.clearTimeout(i),i=window.setTimeout((()=>{a=!1}),100),t.current=!1,!0)},ref:e}}},7953:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(7565).createContext(null)},9289:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(7565),i=n(7953);function o(){return r.useContext(i.A)}},4843:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>w,q_:()=>_});var r=n(7565),i=n(8168),o=n(5208),a=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;const s=(0,o.A)((function(e){return a.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var l=n(10),c=n(8592),u=n(4013),d=n(6714),f=s,p=function(e){return"theme"!==e},h=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?f:p},m=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},y=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;(0,c.SF)(t,n,r);(0,d.s)((function(){return(0,c.sk)(t,n,r)}));return null};const b=function e(t,n){var o,a,s=t.__emotion_real===t,d=s&&t.__emotion_base||t;void 0!==n&&(o=n.label,a=n.target);var f=m(t,n,s),p=f||h(d),b=!p("as");return function(){var v=arguments,g=s&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&g.push("label:"+o+";"),null==v[0]||void 0===v[0].raw)g.push.apply(g,v);else{0,g.push(v[0][0]);for(var w=v.length,_=1;_<w;_++)g.push(v[_],v[0][_])}var S=(0,l.w)((function(e,t,n){var i=b&&e.as||d,o="",s=[],m=e;if(null==e.theme){for(var v in m={},e)m[v]=e[v];m.theme=(0,r.useContext)(l.T)}"string"===typeof e.className?o=(0,c.Rk)(t.registered,s,e.className):null!=e.className&&(o=e.className+" ");var w=(0,u.J)(g.concat(s),t.registered,m);o+=t.key+"-"+w.name,void 0!==a&&(o+=" "+a);var _=b&&void 0===f?h(i):p,S={};for(var A in e)b&&"as"===A||_(A)&&(S[A]=e[A]);return S.className=o,S.ref=n,(0,r.createElement)(r.Fragment,null,(0,r.createElement)(y,{cache:t,serialized:w,isStringTag:"string"===typeof i}),(0,r.createElement)(i,S))}));return S.displayName=void 0!==o?o:"Styled("+("string"===typeof d?d:d.displayName||d.name||"Component")+")",S.defaultProps=t.defaultProps,S.__emotion_real=S,S.__emotion_base=d,S.__emotion_styles=g,S.__emotion_forwardProp=f,Object.defineProperty(S,"toString",{value:function(){return"."+a}}),S.withComponent=function(t,r){return e(t,(0,i.A)({},n,r,{shouldForwardProp:m(S,r,!0)})).apply(void 0,g)},S}};var v=b.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){v[e]=v(e)}));const g=v;function w(e,t){return g(e,t)}const _=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},129:(e,t,n)=>{"use strict";n.d(t,{EU:()=>s,NI:()=>a,iZ:()=>c,kW:()=>u,vf:()=>l,zu:()=>i});var r=n(2147);const i={xs:0,sm:600,md:900,lg:1200,xl:1536},o={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${i[e]}px)`};function a(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||o;return t.reduce(((r,i,o)=>(r[e.up(e.keys[o])]=n(t[o]),r)),{})}if("object"===typeof t){const e=r.breakpoints||o;return Object.keys(t).reduce(((r,o)=>{if(-1!==Object.keys(e.values||i).indexOf(o)){r[e.up(o)]=n(t[o],o)}else{const e=o;r[e]=t[e]}return r}),{})}return n(t)}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}function l(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function c(e){const t=s(e);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];const a=[t,...i].reduce(((e,t)=>(0,r.A)(e,t)),{});return l(Object.keys(t),a)}function u(e){let{values:t,breakpoints:n,base:r}=e;const i=r||function(e,t){if("object"!==typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach(((t,r)=>{r<e.length&&(n[t]=!0)})):r.forEach((t=>{null!=e[t]&&(n[t]=!0)})),n}(t,n),o=Object.keys(i);if(0===o.length)return t;let a;return o.reduce(((e,n,r)=>(Array.isArray(t)?(e[n]=null!=t[r]?t[r]:t[a],a=r):"object"===typeof t?(e[n]=null!=t[n]?t[n]:t[a],a=n):e[n]=t,e)),{})}},8176:(e,t,n)=>{"use strict";n.d(t,{X4:()=>c,a:()=>d,e$:()=>u,eM:()=>l});var r=n(9476);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,r.A)(9,e));let i,a=e.substring(t+1,e.length-1);if("color"===n){if(a=a.split(" "),i=a.shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i))throw new Error((0,r.A)(10,i))}else a=a.split(",");return a=a.map((e=>parseFloat(e))),{type:n,values:a,colorSpace:i}}function a(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function s(e){let t="hsl"===(e=o(e)).type||"hsla"===e.type?o(function(e){e=o(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-s*Math.max(Math.min(t-3,9-t,1),-1)};let c="rgb";const u=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),a({type:c,values:u})}(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function l(e,t){const n=s(e),r=s(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function c(e,t){return e=o(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,a(e)}function u(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return a(e)}function d(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return a(e)}},928:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(8168),i=n(8587),o=n(2147);const a=["values","unit","step"],s=e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>(0,r.A)({},e,{[t.key]:t.val})),{})};const l={borderRadius:4};var c=n(3742);const u=["breakpoints","palette","spacing","shape"];const d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:n={},spacing:d,shape:f={}}=e,p=(0,i.A)(e,u),h=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5}=e,l=(0,i.A)(e,a),c=s(t),u=Object.keys(c);function d(e){return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${n})`}function f(e){return`@media (max-width:${("number"===typeof t[e]?t[e]:e)-o/100}${n})`}function p(e,r){const i=u.indexOf(r);return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"===typeof t[u[i]]?t[u[i]]:r)-o/100}${n})`}return(0,r.A)({keys:u,values:c,up:d,down:f,between:p,only:function(e){return u.indexOf(e)+1<u.length?p(e,u[u.indexOf(e)+1]):d(e)},not:function(e){const t=u.indexOf(e);return 0===t?d(u[1]):t===u.length-1?f(u[t]):p(e,u[u.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},l)}(t),m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,c.LX)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(0===n.length?[1]:n).map((e=>{const n=t(e);return"number"===typeof n?`${n}px`:n})).join(" ")};return n.mui=!0,n}(d);let y=(0,o.A)({breakpoints:h,direction:"ltr",components:{},palette:(0,r.A)({mode:"light"},n),spacing:m,shape:(0,r.A)({},l,f)},p);for(var b=arguments.length,v=new Array(b>1?b-1:0),g=1;g<b;g++)v[g-1]=arguments[g];return y=v.reduce(((e,t)=>(0,o.A)(e,t)),y),y}},8694:(e,t,n)=>{"use strict";n.d(t,{en:()=>Q,y6:()=>K});var r=n(2256),i=n(4953);const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),o=e=>Object.keys(e).reduce(((t,n)=>r[n]?(0,i.A)(t,r[n](e)):t),{});return o.propTypes={},o.filterProps=t.reduce(((e,t)=>e.concat(t.filterProps)),[]),o};var a=n(3742),s=n(129);function l(e){return"number"!==typeof e?e:`${e}px solid`}const c=(0,r.A)({prop:"border",themeKey:"borders",transform:l}),u=(0,r.A)({prop:"borderTop",themeKey:"borders",transform:l}),d=(0,r.A)({prop:"borderRight",themeKey:"borders",transform:l}),f=(0,r.A)({prop:"borderBottom",themeKey:"borders",transform:l}),p=(0,r.A)({prop:"borderLeft",themeKey:"borders",transform:l}),h=(0,r.A)({prop:"borderColor",themeKey:"palette"}),m=(0,r.A)({prop:"borderTopColor",themeKey:"palette"}),y=(0,r.A)({prop:"borderRightColor",themeKey:"palette"}),b=(0,r.A)({prop:"borderBottomColor",themeKey:"palette"}),v=(0,r.A)({prop:"borderLeftColor",themeKey:"palette"}),g=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,a.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,a._W)(t,e)});return(0,s.NI)(e,e.borderRadius,n)}return null};g.propTypes={},g.filterProps=["borderRadius"];const w=o(c,u,d,f,p,h,m,y,b,v,g),_=o((0,r.A)({prop:"displayPrint",cssProperty:!1,transform:e=>({"@media print":{display:e}})}),(0,r.A)({prop:"display"}),(0,r.A)({prop:"overflow"}),(0,r.A)({prop:"textOverflow"}),(0,r.A)({prop:"visibility"}),(0,r.A)({prop:"whiteSpace"})),S=o((0,r.A)({prop:"flexBasis"}),(0,r.A)({prop:"flexDirection"}),(0,r.A)({prop:"flexWrap"}),(0,r.A)({prop:"justifyContent"}),(0,r.A)({prop:"alignItems"}),(0,r.A)({prop:"alignContent"}),(0,r.A)({prop:"order"}),(0,r.A)({prop:"flex"}),(0,r.A)({prop:"flexGrow"}),(0,r.A)({prop:"flexShrink"}),(0,r.A)({prop:"alignSelf"}),(0,r.A)({prop:"justifyItems"}),(0,r.A)({prop:"justifySelf"})),A=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,a.MA)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,a._W)(t,e)});return(0,s.NI)(e,e.gap,n)}return null};A.propTypes={},A.filterProps=["gap"];const x=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,a.MA)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,a._W)(t,e)});return(0,s.NI)(e,e.columnGap,n)}return null};x.propTypes={},x.filterProps=["columnGap"];const k=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,a.MA)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,a._W)(t,e)});return(0,s.NI)(e,e.rowGap,n)}return null};k.propTypes={},k.filterProps=["rowGap"];const C=o(A,x,k,(0,r.A)({prop:"gridColumn"}),(0,r.A)({prop:"gridRow"}),(0,r.A)({prop:"gridAutoFlow"}),(0,r.A)({prop:"gridAutoColumns"}),(0,r.A)({prop:"gridAutoRows"}),(0,r.A)({prop:"gridTemplateColumns"}),(0,r.A)({prop:"gridTemplateRows"}),(0,r.A)({prop:"gridTemplateAreas"}),(0,r.A)({prop:"gridArea"})),T=o((0,r.A)({prop:"position"}),(0,r.A)({prop:"zIndex",themeKey:"zIndex"}),(0,r.A)({prop:"top"}),(0,r.A)({prop:"right"}),(0,r.A)({prop:"bottom"}),(0,r.A)({prop:"left"}));function I(e,t){return"grey"===t?t:e}const E=o((0,r.A)({prop:"color",themeKey:"palette",transform:I}),(0,r.A)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:I}),(0,r.A)({prop:"backgroundColor",themeKey:"palette",transform:I})),R=(0,r.A)({prop:"boxShadow",themeKey:"shadows"});function O(e){return e<=1&&0!==e?100*e+"%":e}const P=(0,r.A)({prop:"width",transform:O}),M=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r,i;return{maxWidth:(null==(n=e.theme)||null==(r=n.breakpoints)||null==(i=r.values)?void 0:i[t])||s.zu[t]||O(t)}};return(0,s.NI)(e,e.maxWidth,t)}return null};M.filterProps=["maxWidth"];const D=(0,r.A)({prop:"minWidth",transform:O}),N=(0,r.A)({prop:"height",transform:O}),L=(0,r.A)({prop:"maxHeight",transform:O}),F=(0,r.A)({prop:"minHeight",transform:O}),B=((0,r.A)({prop:"size",cssProperty:"width",transform:O}),(0,r.A)({prop:"size",cssProperty:"height",transform:O}),o(P,M,D,N,L,F,(0,r.A)({prop:"boxSizing"}))),j=(0,r.A)({prop:"fontFamily",themeKey:"typography"}),z=(0,r.A)({prop:"fontSize",themeKey:"typography"}),U=(0,r.A)({prop:"fontStyle",themeKey:"typography"}),V=(0,r.A)({prop:"fontWeight",themeKey:"typography"}),$=(0,r.A)({prop:"letterSpacing"}),W=(0,r.A)({prop:"textTransform"}),H=(0,r.A)({prop:"lineHeight"}),Y=(0,r.A)({prop:"textAlign"}),G=o((0,r.A)({prop:"typography",cssProperty:!1,themeKey:"typography"}),j,z,U,V,$,H,Y,W),q={borders:w.filterProps,display:_.filterProps,flexbox:S.filterProps,grid:C.filterProps,positions:T.filterProps,palette:E.filterProps,shadows:R.filterProps,sizing:B.filterProps,spacing:a.Ay.filterProps,typography:G.filterProps},K={borders:w,display:_,flexbox:S,grid:C,positions:T,palette:E,shadows:R,sizing:B,spacing:a.Ay,typography:G},Q=Object.keys(q).reduce(((e,t)=>(q[t].forEach((n=>{e[n]=K[t]})),e)),{})},4953:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(2147);const i=function(e,t){return t?(0,r.A)(e,t,{clone:!1}):e}},3742:(e,t,n)=>{"use strict";n.d(t,{LX:()=>h,MA:()=>p,Ay:()=>_,_W:()=>m});var r=n(129),i=n(2256),o=n(4953);const a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),r=a[t],i=s[n]||"";return Array.isArray(i)?i.map((e=>r+e)):[r+i]})),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],f=[...u,...d];function p(e,t,n,r){var o;const a=null!=(o=(0,i.Y)(e,t,!1))?o:n;return"number"===typeof a?e=>"string"===typeof e?e:a*e:Array.isArray(a)?e=>"string"===typeof e?e:a[e]:"function"===typeof a?a:()=>{}}function h(e){return p(e,"spacing",8)}function m(e,t){if("string"===typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:`-${n}`}function y(e,t,n,i){if(-1===t.indexOf(n))return null;const o=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=m(t,n),e)),{})}(c(n),i),a=e[n];return(0,r.NI)(e,a,o)}function b(e,t){const n=h(e.theme);return Object.keys(e).map((r=>y(e,t,r,n))).reduce(o.A,{})}function v(e){return b(e,u)}function g(e){return b(e,d)}function w(e){return b(e,f)}v.propTypes={},v.filterProps=u,g.propTypes={},g.filterProps=d,w.propTypes={},w.filterProps=f;const _=w},2256:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,Y:()=>o});var r=n(8459),i=n(129);function o(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function a(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||i:o(e,n)||i,t&&(r=t(r,i)),r}const s=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=o(e.theme,s)||{};return(0,i.NI)(e,c,(e=>{let i=a(u,l,e);return e===i&&"string"===typeof e&&(i=a(u,l,`${t}${"default"===e?"":(0,r.A)(e)}`,e)),!1===n?i:{[n]:i}}))};return c.propTypes={},c.filterProps=[t],c}},5514:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(4953),i=n(8694),o=n(129);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.y6;const t=Object.keys(e).reduce(((t,n)=>(e[n].filterProps.forEach((r=>{t[r]=e[n]})),t)),{});function n(e,n,r){const i={[e]:n,theme:r},o=t[e];return o?o(i):{[e]:n}}return function e(i){const{sx:a,theme:s={}}=i||{};if(!a)return null;function l(i){let a=i;if("function"===typeof i)a=i(s);else if("object"!==typeof i)return i;if(!a)return null;const l=(0,o.EU)(s.breakpoints),c=Object.keys(l);let u=l;return Object.keys(a).forEach((i=>{const l=(c=a[i],d=s,"function"===typeof c?c(d):c);var c,d;if(null!==l&&void 0!==l)if("object"===typeof l)if(t[i])u=(0,r.A)(u,n(i,l,s));else{const t=(0,o.NI)({theme:s},l,(e=>({[i]:e})));!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce(((e,t)=>e.concat(Object.keys(t))),[]),i=new Set(r);return t.every((e=>i.size===Object.keys(e).length))}(t,l)?u=(0,r.A)(u,t):u[i]=e({sx:l,theme:s})}else u=(0,r.A)(u,n(i,l,s))})),(0,o.vf)(c,u)}return Array.isArray(a)?a.map(l):l(a)}}();a.filterProps=["sx"];const s=a},5841:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(928),i=n(4648);const o=(0,r.A)();const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;return(0,i.A)(e)}},965:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(4263);function i(e){const{theme:t,name:n,props:i}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,r.A)(t.components[n].defaultProps,i):i}},4648:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9289);const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=(0,r.A)();return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}},896:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const r=e=>e,i=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})()},8459:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9476);function i(e){if("string"!==typeof e)throw new Error((0,r.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},9360:(e,t,n)=>{"use strict";function r(e,t,n){const r={};return Object.keys(e).forEach((i=>{r[i]=e[i].reduce(((e,r)=>(r&&(e.push(t(r)),n&&n[r]&&e.push(n[r])),e)),[]).join(" ")})),r}n.d(t,{A:()=>r})},2958:(e,t,n)=>{"use strict";function r(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(t),t=setTimeout((()=>{e.apply(this,i)}),n)}return r.clear=()=>{clearTimeout(t)},r}n.d(t,{A:()=>r})},2147:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,Q:()=>i});var r=n(8168);function i(e){return null!==e&&"object"===typeof e&&e.constructor===Object}function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const a=n.clone?(0,r.A)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((r=>{"__proto__"!==r&&(i(t[r])&&r in e&&i(e[r])?a[r]=o(e[r],t[r],n):a[r]=t[r])})),a}},9476:(e,t,n)=>{"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}n.d(t,{A:()=>r})},8210:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(896);const i={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const o=i[t];return o?`${n}-${o}`:`${r.A.generate(e)}-${t}`}},2458:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(8210);function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const i={};return t.forEach((t=>{i[t]=(0,r.A)(e,t,n)})),i}},1811:(e,t,n)=>{"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{A:()=>r})},5350:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(1811);function i(e){return(0,r.A)(e).defaultView||window}},4263:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(8168);function i(e,t){const n=(0,r.A)({},t);return Object.keys(e).forEach((t=>{void 0===n[t]&&(n[t]=e[t])})),n}},976:(e,t,n)=>{"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,{A:()=>r})},8829:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(7565);const i="undefined"!==typeof window?r.useLayoutEffect:r.useEffect},5713:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(7565),i=n(976);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{(0,i.A)(t,e)}))}),t)}},8854:(e,t,n)=>{"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}n.d(t,{A:()=>i});const i=function(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}},2341:(e,t,n)=>{"use strict";var r=n(325),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var i=p(n);i&&i!==h&&e(t,i,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),y=0;y<a.length;++y){var b=a[y];if(!o[b]&&(!r||!r[b])&&(!m||!m[b])&&(!s||!s[b])){var v=f(n,b);try{c(t,b,v)}catch(g){}}}}return t}},2329:(e,t)=>{"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,y=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,g=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function _(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case o:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case c:case f:case y:case m:case l:return e;default:return t}}case i:return t}}}function S(e){return _(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=o,t.Lazy=y,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return S(e)||_(e)===u},t.isConcurrentMode=S,t.isContextConsumer=function(e){return _(e)===c},t.isContextProvider=function(e){return _(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return _(e)===f},t.isFragment=function(e){return _(e)===o},t.isLazy=function(e){return _(e)===y},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===i},t.isProfiler=function(e){return _(e)===s},t.isStrictMode=function(e){return _(e)===a},t.isSuspense=function(e){return _(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===d||e===s||e===a||e===p||e===h||"object"===typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===f||e.$$typeof===v||e.$$typeof===g||e.$$typeof===w||e.$$typeof===b)},t.typeOf=_},325:(e,t,n)=>{"use strict";e.exports=n(2329)},5181:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,i){for(var o,a,s=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var c in o=Object(arguments[l]))n.call(o,c)&&(s[c]=o[c]);if(t){a=t(o);for(var u=0;u<a.length;u++)r.call(o,a[u])&&(s[a[u]]=o[a[u]])}}return s}},5764:(e,t,n)=>{"use strict";var r=n(7565),i=n(5181),o=n(9611);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=new Set,l={};function c(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(l[e]=t,e=0;e<t.length;e++)s.add(t[e])}var d=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,h={},m={};function y(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){b[e]=new y(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];b[t]=new y(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){b[e]=new y(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){b[e]=new y(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){b[e]=new y(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){b[e]=new y(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){b[e]=new y(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){b[e]=new y(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){b[e]=new y(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function g(e){return e[1].toUpperCase()}function w(e,t,n,r){var i=b.hasOwnProperty(t)?b[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!p.call(m,e)||!p.call(h,e)&&(f.test(e)?m[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,g);b[t]=new y(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,g);b[t]=new y(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,g);b[t]=new y(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){b[e]=new y(e,1,!1,e.toLowerCase(),null,!1,!1)})),b.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){b[e]=new y(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,S=60103,A=60106,x=60107,k=60108,C=60114,T=60109,I=60110,E=60112,R=60113,O=60120,P=60115,M=60116,D=60121,N=60128,L=60129,F=60130,B=60131;if("function"===typeof Symbol&&Symbol.for){var j=Symbol.for;S=j("react.element"),A=j("react.portal"),x=j("react.fragment"),k=j("react.strict_mode"),C=j("react.profiler"),T=j("react.provider"),I=j("react.context"),E=j("react.forward_ref"),R=j("react.suspense"),O=j("react.suspense_list"),P=j("react.memo"),M=j("react.lazy"),D=j("react.block"),j("react.scope"),N=j("react.opaque.id"),L=j("react.debug_trace_mode"),F=j("react.offscreen"),B=j("react.legacy_hidden")}var z,U="function"===typeof Symbol&&Symbol.iterator;function V(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=U&&e[U]||e["@@iterator"])?e:null}function $(e){if(void 0===z)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||""}return"\n"+z+e}var W=!1;function H(e,t){if(!e||W)return"";W=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&"string"===typeof l.stack){for(var i=l.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{W=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?$(e):""}function Y(e){switch(e.tag){case 5:return $(e.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return e=H(e.type,!1);case 11:return e=H(e.type.render,!1);case 22:return e=H(e.type._render,!1);case 1:return e=H(e.type,!0);default:return""}}function G(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case x:return"Fragment";case A:return"Portal";case C:return"Profiler";case k:return"StrictMode";case R:return"Suspense";case O:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case I:return(e.displayName||"Context")+".Consumer";case T:return(e._context.displayName||"Context")+".Provider";case E:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case P:return G(e.type);case D:return G(e._render);case M:t=e._payload,e=e._init;try{return G(e(t))}catch(n){}}return null}function q(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Q(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function X(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function J(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=q(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=q(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ie(e,t.type,n):t.hasOwnProperty("defaultValue")&&ie(e,t.type,q(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ie(e,t,n){"number"===t&&J(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function oe(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+q(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function le(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:q(n)}}function ce(e,t){var n=q(t.value),r=q(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ue(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var de={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function fe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?fe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var he,me,ye=(me=function(e,t){if(e.namespaceURI!==de.svg||"innerHTML"in e)e.innerHTML=t;else{for((he=he||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=he.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return me(e,t)}))}:me);function be(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ve={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ge=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}function _e(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(ve).forEach((function(e){ge.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ve[t]=ve[e]}))}));var Se=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ae(e,t){if(t){if(Se[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function xe(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function ke(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,Te=null,Ie=null;function Ee(e){if(e=ni(e)){if("function"!==typeof Ce)throw Error(a(280));var t=e.stateNode;t&&(t=ii(t),Ce(e.stateNode,e.type,t))}}function Re(e){Te?Ie?Ie.push(e):Ie=[e]:Te=e}function Oe(){if(Te){var e=Te,t=Ie;if(Ie=Te=null,Ee(e),t)for(e=0;e<t.length;e++)Ee(t[e])}}function Pe(e,t){return e(t)}function Me(e,t,n,r,i){return e(t,n,r,i)}function De(){}var Ne=Pe,Le=!1,Fe=!1;function Be(){null===Te&&null===Ie||(De(),Oe())}function je(e,t){var n=e.stateNode;if(null===n)return null;var r=ii(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var ze=!1;if(d)try{var Ue={};Object.defineProperty(Ue,"passive",{get:function(){ze=!0}}),window.addEventListener("test",Ue,Ue),window.removeEventListener("test",Ue,Ue)}catch(me){ze=!1}function Ve(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var $e=!1,We=null,He=!1,Ye=null,Ge={onError:function(e){$e=!0,We=e}};function qe(e,t,n,r,i,o,a,s,l){$e=!1,We=null,Ve.apply(Ge,arguments)}function Ke(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Xe(e){if(Ke(e)!==e)throw Error(a(188))}function Je(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ke(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Xe(i),e;if(o===r)return Xe(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Ze(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var et,tt,nt,rt,it=!1,ot=[],at=null,st=null,lt=null,ct=new Map,ut=new Map,dt=[],ft="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pt(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function ht(e,t){switch(e){case"focusin":case"focusout":at=null;break;case"dragenter":case"dragleave":st=null;break;case"mouseover":case"mouseout":lt=null;break;case"pointerover":case"pointerout":ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ut.delete(t.pointerId)}}function mt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=pt(t,n,r,i,o),null!==t&&(null!==(t=ni(t))&&tt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function yt(e){var t=ti(e.target);if(null!==t){var n=Ke(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Qe(n)))return e.blockedOn=t,void rt(e.lanePriority,(function(){o.unstable_runWithPriority(e.priority,(function(){nt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function bt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ni(n))&&tt(t),e.blockedOn=n,!1;t.shift()}return!0}function vt(e,t,n){bt(e)&&n.delete(t)}function gt(){for(it=!1;0<ot.length;){var e=ot[0];if(null!==e.blockedOn){null!==(e=ni(e.blockedOn))&&et(e);break}for(var t=e.targetContainers;0<t.length;){var n=Jt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&ot.shift()}null!==at&&bt(at)&&(at=null),null!==st&&bt(st)&&(st=null),null!==lt&&bt(lt)&&(lt=null),ct.forEach(vt),ut.forEach(vt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,it||(it=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,gt)))}function _t(e){function t(t){return wt(t,e)}if(0<ot.length){wt(ot[0],e);for(var n=1;n<ot.length;n++){var r=ot[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==at&&wt(at,e),null!==st&&wt(st,e),null!==lt&&wt(lt,e),ct.forEach(t),ut.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)yt(n),null===n.blockedOn&&dt.shift()}function St(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var At={animationend:St("Animation","AnimationEnd"),animationiteration:St("Animation","AnimationIteration"),animationstart:St("Animation","AnimationStart"),transitionend:St("Transition","TransitionEnd")},xt={},kt={};function Ct(e){if(xt[e])return xt[e];if(!At[e])return e;var t,n=At[e];for(t in n)if(n.hasOwnProperty(t)&&t in kt)return xt[e]=n[t];return e}d&&(kt=document.createElement("div").style,"AnimationEvent"in window||(delete At.animationend.animation,delete At.animationiteration.animation,delete At.animationstart.animation),"TransitionEvent"in window||delete At.transitionend.transition);var Tt=Ct("animationend"),It=Ct("animationiteration"),Et=Ct("animationstart"),Rt=Ct("transitionend"),Ot=new Map,Pt=new Map,Mt=["abort","abort",Tt,"animationEnd",It,"animationIteration",Et,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Rt,"transitionEnd","waiting","waiting"];function Dt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Pt.set(r,t),Ot.set(r,i),c(i,[r])}}(0,o.unstable_now)();var Nt=8;function Lt(e){if(0!==(1&e))return Nt=15,1;if(0!==(2&e))return Nt=14,2;if(0!==(4&e))return Nt=13,4;var t=24&e;return 0!==t?(Nt=12,t):0!==(32&e)?(Nt=11,32):0!==(t=192&e)?(Nt=10,t):0!==(256&e)?(Nt=9,256):0!==(t=3584&e)?(Nt=8,t):0!==(4096&e)?(Nt=7,4096):0!==(t=4186112&e)?(Nt=6,t):0!==(t=62914560&e)?(Nt=5,t):67108864&e?(Nt=4,67108864):0!==(134217728&e)?(Nt=3,134217728):0!==(t=805306368&e)?(Nt=2,t):0!==(1073741824&e)?(Nt=1,1073741824):(Nt=8,e)}function Ft(e,t){var n=e.pendingLanes;if(0===n)return Nt=0;var r=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==o)r=o,i=Nt=15;else if(0!==(o=134217727&n)){var l=o&~a;0!==l?(r=Lt(l),i=Nt):0!==(s&=o)&&(r=Lt(s),i=Nt)}else 0!==(o=n&~a)?(r=Lt(o),i=Nt):0!==s&&(r=Lt(s),i=Nt);if(0===r)return 0;if(r=n&((0>(r=31-$t(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(Lt(t),i<=Nt)return t;Nt=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-$t(t)),r|=e[n],t&=~i;return r}function Bt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function jt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=zt(24&~t))?jt(10,t):e;case 10:return 0===(e=zt(192&~t))?jt(8,t):e;case 8:return 0===(e=zt(3584&~t))&&(0===(e=zt(4186112&~t))&&(e=512)),e;case 2:return 0===(t=zt(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function zt(e){return e&-e}function Ut(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Vt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-$t(t)]=n}var $t=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Wt(e)/Ht|0)|0},Wt=Math.log,Ht=Math.LN2;var Yt=o.unstable_UserBlockingPriority,Gt=o.unstable_runWithPriority,qt=!0;function Kt(e,t,n,r){Le||De();var i=Xt,o=Le;Le=!0;try{Me(i,e,t,n,r)}finally{(Le=o)||Be()}}function Qt(e,t,n,r){Gt(Yt,Xt.bind(null,e,t,n,r))}function Xt(e,t,n,r){var i;if(qt)if((i=0===(4&t))&&0<ot.length&&-1<ft.indexOf(e))e=pt(null,e,t,n,r),ot.push(e);else{var o=Jt(e,t,n,r);if(null===o)i&&ht(e,r);else{if(i){if(-1<ft.indexOf(e))return e=pt(o,e,t,n,r),void ot.push(e);if(function(e,t,n,r,i){switch(t){case"focusin":return at=mt(at,e,t,n,r,i),!0;case"dragenter":return st=mt(st,e,t,n,r,i),!0;case"mouseover":return lt=mt(lt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return ct.set(o,mt(ct.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ut.set(o,mt(ut.get(o)||null,e,t,n,r,i)),!0}return!1}(o,e,t,n,r))return;ht(e,r)}Dr(e,t,r,null,n)}}}function Jt(e,t,n,r){var i=ke(r);if(null!==(i=ti(i))){var o=Ke(i);if(null===o)i=null;else{var a=o.tag;if(13===a){if(null!==(i=Qe(o)))return i;i=null}else if(3===a){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return Dr(e,t,r,i,n),null}var Zt=null,en=null,tn=null;function nn(){if(tn)return tn;var e,t,n=en,r=n.length,i="value"in Zt?Zt.value:Zt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return tn=i.slice(e,1<t?1-t:void 0)}function rn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function on(){return!0}function an(){return!1}function sn(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?on:an,this.isPropagationStopped=an,this}return i(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=on)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=on)},persist:function(){},isPersistent:on}),t}var ln,cn,un,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fn=sn(dn),pn=i({},dn,{view:0,detail:0}),hn=sn(pn),mn=i({},pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==un&&(un&&"mousemove"===e.type?(ln=e.screenX-un.screenX,cn=e.screenY-un.screenY):cn=ln=0,un=e),ln)},movementY:function(e){return"movementY"in e?e.movementY:cn}}),yn=sn(mn),bn=sn(i({},mn,{dataTransfer:0})),vn=sn(i({},pn,{relatedTarget:0})),gn=sn(i({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=i({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_n=sn(wn),Sn=sn(i({},dn,{data:0})),An={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},kn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=kn[e])&&!!t[e]}function Tn(){return Cn}var In=i({},pn,{key:function(e){if(e.key){var t=An[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=rn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?xn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tn,charCode:function(e){return"keypress"===e.type?rn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?rn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),En=sn(In),Rn=sn(i({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),On=sn(i({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tn})),Pn=sn(i({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Mn=i({},mn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Dn=sn(Mn),Nn=[9,13,27,32],Ln=d&&"CompositionEvent"in window,Fn=null;d&&"documentMode"in document&&(Fn=document.documentMode);var Bn=d&&"TextEvent"in window&&!Fn,jn=d&&(!Ln||Fn&&8<Fn&&11>=Fn),zn=String.fromCharCode(32),Un=!1;function Vn(e,t){switch(e){case"keyup":return-1!==Nn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $n(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Wn=!1;var Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Yn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function Gn(e,t,n,r){Re(r),0<(t=Lr(t,"onChange")).length&&(n=new fn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qn=null,Kn=null;function Qn(e){Ir(e,0)}function Xn(e){if(X(ri(e)))return e}function Jn(e,t){if("change"===e)return t}var Zn=!1;if(d){var er;if(d){var tr="oninput"in document;if(!tr){var nr=document.createElement("div");nr.setAttribute("oninput","return;"),tr="function"===typeof nr.oninput}er=tr}else er=!1;Zn=er&&(!document.documentMode||9<document.documentMode)}function rr(){qn&&(qn.detachEvent("onpropertychange",ir),Kn=qn=null)}function ir(e){if("value"===e.propertyName&&Xn(Kn)){var t=[];if(Gn(t,Kn,e,ke(e)),e=Qn,Le)e(t);else{Le=!0;try{Pe(e,t)}finally{Le=!1,Be()}}}}function or(e,t,n){"focusin"===e?(rr(),Kn=n,(qn=t).attachEvent("onpropertychange",ir)):"focusout"===e&&rr()}function ar(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(Kn)}function sr(e,t){if("click"===e)return Xn(t)}function lr(e,t){if("input"===e||"change"===e)return Xn(t)}var cr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},ur=Object.prototype.hasOwnProperty;function dr(e,t){if(cr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!ur.call(t,n[r])||!cr(e[n[r]],t[n[r]]))return!1;return!0}function fr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pr(e,t){var n,r=fr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=fr(r)}}function hr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function mr(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var br=d&&"documentMode"in document&&11>=document.documentMode,vr=null,gr=null,wr=null,_r=!1;function Sr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;_r||null==vr||vr!==J(r)||("selectionStart"in(r=vr)&&yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},wr&&dr(wr,r)||(wr=r,0<(r=Lr(gr,"onSelect")).length&&(t=new fn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vr)))}Dt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Dt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Dt(Mt,2);for(var Ar="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),xr=0;xr<Ar.length;xr++)Pt.set(Ar[xr],0);u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cr=new Set("cancel close invalid load scroll toggle".split(" ").concat(kr));function Tr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,s,l,c){if(qe.apply(this,arguments),$e){if(!$e)throw Error(a(198));var u=We;$e=!1,We=null,He||(He=!0,Ye=u)}}(r,t,void 0,e),e.currentTarget=null}function Ir(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Tr(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Tr(i,s,c),o=l}}}if(He)throw e=Ye,He=!1,Ye=null,e}function Er(e,t){var n=oi(t),r=e+"__bubble";n.has(r)||(Mr(t,e,2,!1),n.add(r))}var Rr="_reactListening"+Math.random().toString(36).slice(2);function Or(e){e[Rr]||(e[Rr]=!0,s.forEach((function(t){Cr.has(t)||Pr(t,!1,e,null),Pr(t,!0,e,null)})))}function Pr(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===e&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!t&&Cr.has(e)){if("scroll"!==e)return;i|=2,o=r}var a=oi(o),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(i|=4),Mr(o,e,i,t),a.add(s))}function Mr(e,t,n,r){var i=Pt.get(t);switch(void 0===i?2:i){case 0:i=Kt;break;case 1:i=Qt;break;default:i=Xt}n=i.bind(null,t,n,e),i=void 0,!ze||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Dr(e,t,n,r,i){var o=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=ti(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Fe)return e(t,n);Fe=!0;try{return Ne(e,t,n)}finally{Fe=!1,Be()}}((function(){var r=o,i=ke(n),a=[];e:{var s=Ot.get(e);if(void 0!==s){var l=fn,c=e;switch(e){case"keypress":if(0===rn(n))break e;case"keydown":case"keyup":l=En;break;case"focusin":c="focus",l=vn;break;case"focusout":c="blur",l=vn;break;case"beforeblur":case"afterblur":l=vn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=yn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=bn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=On;break;case Tt:case It:case Et:l=gn;break;case Rt:l=Pn;break;case"scroll":l=hn;break;case"wheel":l=Dn;break;case"copy":case"cut":case"paste":l=_n;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Rn}var u=0!==(4&t),d=!u&&"scroll"===e,f=u?null!==s?s+"Capture":null:s;u=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=je(h,f))&&u.push(Nr(h,m,p)))),d)break;h=h.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(c=n.relatedTarget||n.fromElement)||!ti(c)&&!c[Zr])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?ti(c):null)&&(c!==(d=Ke(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=yn,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=Rn,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:ri(l),p=null==c?s:ri(c),(s=new u(m,h+"leave",l,n,i)).target=d,s.relatedTarget=p,m=null,ti(i)===r&&((u=new u(f,h+"enter",c,n,i)).target=p,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(f=c,h=0,p=u=l;p;p=Fr(p))h++;for(p=0,m=f;m;m=Fr(m))p++;for(;0<h-p;)u=Fr(u),h--;for(;0<p-h;)f=Fr(f),p--;for(;h--;){if(u===f||null!==f&&u===f.alternate)break e;u=Fr(u),f=Fr(f)}u=null}else u=null;null!==l&&Br(a,s,l,u,!1),null!==c&&null!==d&&Br(a,d,c,u,!0)}if("select"===(l=(s=r?ri(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var y=Jn;else if(Yn(s))if(Zn)y=lr;else{y=ar;var b=or}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(y=sr);switch(y&&(y=y(e,r))?Gn(a,y,n,i):(b&&b(e,s,r),"focusout"===e&&(b=s._wrapperState)&&b.controlled&&"number"===s.type&&ie(s,"number",s.value)),b=r?ri(r):window,e){case"focusin":(Yn(b)||"true"===b.contentEditable)&&(vr=b,gr=r,wr=null);break;case"focusout":wr=gr=vr=null;break;case"mousedown":_r=!0;break;case"contextmenu":case"mouseup":case"dragend":_r=!1,Sr(a,n,i);break;case"selectionchange":if(br)break;case"keydown":case"keyup":Sr(a,n,i)}var v;if(Ln)e:{switch(e){case"compositionstart":var g="onCompositionStart";break e;case"compositionend":g="onCompositionEnd";break e;case"compositionupdate":g="onCompositionUpdate";break e}g=void 0}else Wn?Vn(e,n)&&(g="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(g="onCompositionStart");g&&(jn&&"ko"!==n.locale&&(Wn||"onCompositionStart"!==g?"onCompositionEnd"===g&&Wn&&(v=nn()):(en="value"in(Zt=i)?Zt.value:Zt.textContent,Wn=!0)),0<(b=Lr(r,g)).length&&(g=new Sn(g,e,null,n,i),a.push({event:g,listeners:b}),v?g.data=v:null!==(v=$n(n))&&(g.data=v))),(v=Bn?function(e,t){switch(e){case"compositionend":return $n(t);case"keypress":return 32!==t.which?null:(Un=!0,zn);case"textInput":return(e=t.data)===zn&&Un?null:e;default:return null}}(e,n):function(e,t){if(Wn)return"compositionend"===e||!Ln&&Vn(e,t)?(e=nn(),tn=en=Zt=null,Wn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return jn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Lr(r,"onBeforeInput")).length&&(i=new Sn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=v))}Ir(a,t)}))}function Nr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Lr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=je(e,n))&&r.unshift(Nr(e,o,i)),null!=(o=je(e,t))&&r.push(Nr(e,o,i))),e=e.return}return r}function Fr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Br(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=je(n,o))&&a.unshift(Nr(n,l,s)):i||null!=(l=je(n,o))&&a.push(Nr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function jr(){}var zr=null,Ur=null;function Vr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function $r(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Wr="function"===typeof setTimeout?setTimeout:void 0,Hr="function"===typeof clearTimeout?clearTimeout:void 0;function Yr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Gr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function qr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Kr=0;var Qr=Math.random().toString(36).slice(2),Xr="__reactFiber$"+Qr,Jr="__reactProps$"+Qr,Zr="__reactContainer$"+Qr,ei="__reactEvents$"+Qr;function ti(e){var t=e[Xr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Zr]||n[Xr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=qr(e);null!==e;){if(n=e[Xr])return n;e=qr(e)}return t}n=(e=n).parentNode}return null}function ni(e){return!(e=e[Xr]||e[Zr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ri(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function ii(e){return e[Jr]||null}function oi(e){var t=e[ei];return void 0===t&&(t=e[ei]=new Set),t}var ai=[],si=-1;function li(e){return{current:e}}function ci(e){0>si||(e.current=ai[si],ai[si]=null,si--)}function ui(e,t){si++,ai[si]=e.current,e.current=t}var di={},fi=li(di),pi=li(!1),hi=di;function mi(e,t){var n=e.type.contextTypes;if(!n)return di;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function yi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function bi(){ci(pi),ci(fi)}function vi(e,t,n){if(fi.current!==di)throw Error(a(168));ui(fi,t),ui(pi,n)}function gi(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in e))throw Error(a(108,G(t)||"Unknown",o));return i({},n,r)}function wi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||di,hi=fi.current,ui(fi,e),ui(pi,pi.current),!0}function _i(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=gi(e,t,hi),r.__reactInternalMemoizedMergedChildContext=e,ci(pi),ci(fi),ui(fi,e)):ci(pi),ui(pi,n)}var Si=null,Ai=null,xi=o.unstable_runWithPriority,ki=o.unstable_scheduleCallback,Ci=o.unstable_cancelCallback,Ti=o.unstable_shouldYield,Ii=o.unstable_requestPaint,Ei=o.unstable_now,Ri=o.unstable_getCurrentPriorityLevel,Oi=o.unstable_ImmediatePriority,Pi=o.unstable_UserBlockingPriority,Mi=o.unstable_NormalPriority,Di=o.unstable_LowPriority,Ni=o.unstable_IdlePriority,Li={},Fi=void 0!==Ii?Ii:function(){},Bi=null,ji=null,zi=!1,Ui=Ei(),Vi=1e4>Ui?Ei:function(){return Ei()-Ui};function $i(){switch(Ri()){case Oi:return 99;case Pi:return 98;case Mi:return 97;case Di:return 96;case Ni:return 95;default:throw Error(a(332))}}function Wi(e){switch(e){case 99:return Oi;case 98:return Pi;case 97:return Mi;case 96:return Di;case 95:return Ni;default:throw Error(a(332))}}function Hi(e,t){return e=Wi(e),xi(e,t)}function Yi(e,t,n){return e=Wi(e),ki(e,t,n)}function Gi(){if(null!==ji){var e=ji;ji=null,Ci(e)}qi()}function qi(){if(!zi&&null!==Bi){zi=!0;var e=0;try{var t=Bi;Hi(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Bi=null}catch(n){throw null!==Bi&&(Bi=Bi.slice(e+1)),ki(Oi,Gi),n}finally{zi=!1}}}var Ki=_.ReactCurrentBatchConfig;function Qi(e,t){if(e&&e.defaultProps){for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Xi=li(null),Ji=null,Zi=null,eo=null;function to(){eo=Zi=Ji=null}function no(e){var t=Xi.current;ci(Xi),e.type._context._currentValue=t}function ro(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function io(e,t){Ji=e,eo=Zi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(La=!0),e.firstContext=null)}function oo(e,t){if(eo!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(eo=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Zi){if(null===Ji)throw Error(a(308));Zi=t,Ji.dependencies={lanes:0,firstContext:t,responders:null}}else Zi=Zi.next=t;return e._currentValue}var ao=!1;function so(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function lo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function co(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function uo(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function fo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function po(e,t,n,r){var o=e.updateQueue;ao=!1;var a=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var c=l,u=c.next;c.next=null,null===s?a=u:s.next=u,s=c;var d=e.alternate;if(null!==d){var f=(d=d.updateQueue).lastBaseUpdate;f!==s&&(null===f?d.firstBaseUpdate=u:f.next=u,d.lastBaseUpdate=c)}}if(null!==a){for(f=o.baseState,s=0,d=u=c=null;;){l=a.lane;var p=a.eventTime;if((r&l)===l){null!==d&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,m=a;switch(l=t,p=n,m.tag){case 1:if("function"===typeof(h=m.payload)){f=h.call(p,f,l);break e}f=h;break e;case 3:h.flags=-4097&h.flags|64;case 0:if(null===(l="function"===typeof(h=m.payload)?h.call(p,f,l):h)||void 0===l)break e;f=i({},f,l);break e;case 2:ao=!0}}null!==a.callback&&(e.flags|=32,null===(l=o.effects)?o.effects=[a]:l.push(a))}else p={eventTime:p,lane:l,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===d?(u=d=p,c=f):d=d.next=p,s|=l;if(null===(a=a.next)){if(null===(l=o.shared.pending))break;a=l.next,l.next=null,o.lastBaseUpdate=l,o.shared.pending=null}}null===d&&(c=f),o.baseState=c,o.firstBaseUpdate=u,o.lastBaseUpdate=d,Us|=s,e.lanes=s,e.memoizedState=f}}function ho(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(a(191,i));i.call(r)}}}var mo=(new r.Component).refs;function yo(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:i({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var bo={isMounted:function(e){return!!(e=e._reactInternals)&&Ke(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fl(),i=pl(e),o=co(r,i);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),uo(e,o),hl(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fl(),i=pl(e),o=co(r,i);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),uo(e,o),hl(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fl(),r=pl(e),i=co(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),uo(e,i),hl(e,r,n)}};function vo(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!dr(n,r)||!dr(i,o))}function go(e,t,n){var r=!1,i=di,o=t.contextType;return"object"===typeof o&&null!==o?o=oo(o):(i=yi(t)?hi:fi.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?mi(e,i):di),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=bo,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function wo(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&bo.enqueueReplaceState(t,t.state,null)}function _o(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=mo,so(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=oo(o):(o=yi(t)?hi:fi.current,i.context=mi(e,o)),po(e,n,i,r),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(yo(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&bo.enqueueReplaceState(i,i.state,null),po(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4)}var So=Array.isArray;function Ao(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=r.refs;t===mo&&(t=r.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function xo(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function ko(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Yl(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Ql(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=Ao(e,t,n),r.return=e,r):((r=Gl(n.type,n.key,n.props,null,e.mode,r)).ref=Ao(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Xl(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=ql(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function f(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Ql(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case S:return(n=Gl(t.type,t.key,t.props,null,e.mode,n)).ref=Ao(e,null,t),n.return=e,n;case A:return(t=Xl(t,e.mode,n)).return=e,t}if(So(t)||V(t))return(t=ql(t,e.mode,n,null)).return=e,t;xo(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case S:return n.key===i?n.type===x?d(e,t,n.props.children,r,i):c(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null}if(So(n)||V(n))return null!==i?null:d(e,t,n,r,null);xo(e,n)}return null}function h(e,t,n,r,i){if("string"===typeof r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case S:return e=e.get(null===r.key?n:r.key)||null,r.type===x?d(t,e,r.props.children,i,r.key):c(t,e,r,i);case A:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(So(r)||V(r))return d(t,e=e.get(n)||null,r,i,null);xo(t,r)}return null}function m(i,a,s,l){for(var c=null,u=null,d=a,m=a=0,y=null;null!==d&&m<s.length;m++){d.index>m?(y=d,d=null):y=d.sibling;var b=p(i,d,s[m],l);if(null===b){null===d&&(d=y);break}e&&d&&null===b.alternate&&t(i,d),a=o(b,a,m),null===u?c=b:u.sibling=b,u=b,d=y}if(m===s.length)return n(i,d),c;if(null===d){for(;m<s.length;m++)null!==(d=f(i,s[m],l))&&(a=o(d,a,m),null===u?c=d:u.sibling=d,u=d);return c}for(d=r(i,d);m<s.length;m++)null!==(y=h(d,i,m,s[m],l))&&(e&&null!==y.alternate&&d.delete(null===y.key?m:y.key),a=o(y,a,m),null===u?c=y:u.sibling=y,u=y);return e&&d.forEach((function(e){return t(i,e)})),c}function y(i,s,l,c){var u=V(l);if("function"!==typeof u)throw Error(a(150));if(null==(l=u.call(l)))throw Error(a(151));for(var d=u=null,m=s,y=s=0,b=null,v=l.next();null!==m&&!v.done;y++,v=l.next()){m.index>y?(b=m,m=null):b=m.sibling;var g=p(i,m,v.value,c);if(null===g){null===m&&(m=b);break}e&&m&&null===g.alternate&&t(i,m),s=o(g,s,y),null===d?u=g:d.sibling=g,d=g,m=b}if(v.done)return n(i,m),u;if(null===m){for(;!v.done;y++,v=l.next())null!==(v=f(i,v.value,c))&&(s=o(v,s,y),null===d?u=v:d.sibling=v,d=v);return u}for(m=r(i,m);!v.done;y++,v=l.next())null!==(v=h(m,i,y,v.value,c))&&(e&&null!==v.alternate&&m.delete(null===v.key?y:v.key),s=o(v,s,y),null===d?u=v:d.sibling=v,d=v);return e&&m.forEach((function(e){return t(i,e)})),u}return function(e,r,o,l){var c="object"===typeof o&&null!==o&&o.type===x&&null===o.key;c&&(o=o.props.children);var u="object"===typeof o&&null!==o;if(u)switch(o.$$typeof){case S:e:{for(u=o.key,c=r;null!==c;){if(c.key===u){if(7===c.tag){if(o.type===x){n(e,c.sibling),(r=i(c,o.props.children)).return=e,e=r;break e}}else if(c.elementType===o.type){n(e,c.sibling),(r=i(c,o.props)).ref=Ao(e,c,o),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}o.type===x?((r=ql(o.props.children,e.mode,l,o.key)).return=e,e=r):((l=Gl(o.type,o.key,o.props,null,e.mode,l)).ref=Ao(e,r,o),l.return=e,e=l)}return s(e);case A:e:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Xl(o,e.mode,l)).return=e,e=r}return s(e)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Ql(o,e.mode,l)).return=e,e=r),s(e);if(So(o))return m(e,r,o,l);if(V(o))return y(e,r,o,l);if(u&&xo(e,o),"undefined"===typeof o&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,G(e.type)||"Component"))}return n(e,r)}}var Co=ko(!0),To=ko(!1),Io={},Eo=li(Io),Ro=li(Io),Oo=li(Io);function Po(e){if(e===Io)throw Error(a(174));return e}function Mo(e,t){switch(ui(Oo,t),ui(Ro,e),ui(Eo,Io),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pe(null,"");break;default:t=pe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ci(Eo),ui(Eo,t)}function Do(){ci(Eo),ci(Ro),ci(Oo)}function No(e){Po(Oo.current);var t=Po(Eo.current),n=pe(t,e.type);t!==n&&(ui(Ro,e),ui(Eo,n))}function Lo(e){Ro.current===e&&(ci(Eo),ci(Ro))}var Fo=li(0);function Bo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var jo=null,zo=null,Uo=!1;function Vo(e,t){var n=Wl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function $o(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Wo(e){if(Uo){var t=zo;if(t){var n=t;if(!$o(e,t)){if(!(t=Gr(n.nextSibling))||!$o(e,t))return e.flags=-1025&e.flags|2,Uo=!1,void(jo=e);Vo(jo,n)}jo=e,zo=Gr(t.firstChild)}else e.flags=-1025&e.flags|2,Uo=!1,jo=e}}function Ho(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;jo=e}function Yo(e){if(e!==jo)return!1;if(!Uo)return Ho(e),Uo=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!$r(t,e.memoizedProps))for(t=zo;t;)Vo(e,t),t=Gr(t.nextSibling);if(Ho(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){zo=Gr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}zo=null}}else zo=jo?Gr(e.stateNode.nextSibling):null;return!0}function Go(){zo=jo=null,Uo=!1}var qo=[];function Ko(){for(var e=0;e<qo.length;e++)qo[e]._workInProgressVersionPrimary=null;qo.length=0}var Qo=_.ReactCurrentDispatcher,Xo=_.ReactCurrentBatchConfig,Jo=0,Zo=null,ea=null,ta=null,na=!1,ra=!1;function ia(){throw Error(a(321))}function oa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cr(e[n],t[n]))return!1;return!0}function aa(e,t,n,r,i,o){if(Jo=o,Zo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Qo.current=null===e||null===e.memoizedState?Pa:Ma,e=n(r,i),ra){o=0;do{if(ra=!1,!(25>o))throw Error(a(301));o+=1,ta=ea=null,t.updateQueue=null,Qo.current=Da,e=n(r,i)}while(ra)}if(Qo.current=Oa,t=null!==ea&&null!==ea.next,Jo=0,ta=ea=Zo=null,na=!1,t)throw Error(a(300));return e}function sa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ta?Zo.memoizedState=ta=e:ta=ta.next=e,ta}function la(){if(null===ea){var e=Zo.alternate;e=null!==e?e.memoizedState:null}else e=ea.next;var t=null===ta?Zo.memoizedState:ta.next;if(null!==t)ta=t,ea=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ea=e).memoizedState,baseState:ea.baseState,baseQueue:ea.baseQueue,queue:ea.queue,next:null},null===ta?Zo.memoizedState=ta=e:ta=ta.next=e}return ta}function ca(e,t){return"function"===typeof t?t(e):t}function ua(e){var t=la(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ea,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var l=s=o=null,c=i;do{var u=c.lane;if((Jo&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(s=l=d,o=r):l=l.next=d,Zo.lanes|=u,Us|=u}c=c.next}while(null!==c&&c!==i);null===l?o=r:l.next=s,cr(r,t.memoizedState)||(La=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function da(e){var t=la(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);cr(o,t.memoizedState)||(La=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function fa(e,t,n){var r=t._getVersion;r=r(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(Jo&e)===e)&&(t._workInProgressVersionPrimary=r,qo.push(t))),e)return n(t._source);throw qo.push(t),Error(a(350))}function pa(e,t,n,r){var i=Ms;if(null===i)throw Error(a(349));var o=t._getVersion,s=o(t._source),l=Qo.current,c=l.useState((function(){return fa(i,t,n)})),u=c[1],d=c[0];c=ta;var f=e.memoizedState,p=f.refs,h=p.getSnapshot,m=f.source;f=f.subscribe;var y=Zo;return e.memoizedState={refs:p,source:t,subscribe:r},l.useEffect((function(){p.getSnapshot=n,p.setSnapshot=u;var e=o(t._source);if(!cr(s,e)){e=n(t._source),cr(d,e)||(u(e),e=pl(y),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,a=e;0<a;){var l=31-$t(a),c=1<<l;r[l]|=e,a&=~c}}}),[n,t,r]),l.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=pl(y);i.mutableReadLanes|=r&i.pendingLanes}catch(o){n((function(){throw o}))}}))}),[t,r]),cr(h,n)&&cr(m,t)&&cr(f,r)||((e={pending:null,dispatch:null,lastRenderedReducer:ca,lastRenderedState:d}).dispatch=u=Ra.bind(null,Zo,e),c.queue=e,c.baseQueue=null,d=fa(i,t,n),c.memoizedState=c.baseState=d),d}function ha(e,t,n){return pa(la(),e,t,n)}function ma(e){var t=sa();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ca,lastRenderedState:e}).dispatch=Ra.bind(null,Zo,e),[t.memoizedState,e]}function ya(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Zo.updateQueue)?(t={lastEffect:null},Zo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ba(e){return e={current:e},sa().memoizedState=e}function va(){return la().memoizedState}function ga(e,t,n,r){var i=sa();Zo.flags|=e,i.memoizedState=ya(1|t,n,void 0,void 0===r?null:r)}function wa(e,t,n,r){var i=la();r=void 0===r?null:r;var o=void 0;if(null!==ea){var a=ea.memoizedState;if(o=a.destroy,null!==r&&oa(r,a.deps))return void ya(t,n,o,r)}Zo.flags|=e,i.memoizedState=ya(1|t,n,o,r)}function _a(e,t){return ga(516,4,e,t)}function Sa(e,t){return wa(516,4,e,t)}function Aa(e,t){return wa(4,2,e,t)}function xa(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ka(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,wa(4,2,xa.bind(null,t,e),n)}function Ca(){}function Ta(e,t){var n=la();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&oa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ia(e,t){var n=la();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&oa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ea(e,t){var n=$i();Hi(98>n?98:n,(function(){e(!0)})),Hi(97<n?97:n,(function(){var n=Xo.transition;Xo.transition=1;try{e(!1),t()}finally{Xo.transition=n}}))}function Ra(e,t,n){var r=fl(),i=pl(e),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?o.next=o:(o.next=a.next,a.next=o),t.pending=o,a=e.alternate,e===Zo||null!==a&&a===Zo)ra=na=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,l=a(s,n);if(o.eagerReducer=a,o.eagerState=l,cr(l,s))return}catch(c){}hl(e,i,r)}}var Oa={readContext:oo,useCallback:ia,useContext:ia,useEffect:ia,useImperativeHandle:ia,useLayoutEffect:ia,useMemo:ia,useReducer:ia,useRef:ia,useState:ia,useDebugValue:ia,useDeferredValue:ia,useTransition:ia,useMutableSource:ia,useOpaqueIdentifier:ia,unstable_isNewReconciler:!1},Pa={readContext:oo,useCallback:function(e,t){return sa().memoizedState=[e,void 0===t?null:t],e},useContext:oo,useEffect:_a,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ga(4,2,xa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ga(4,2,e,t)},useMemo:function(e,t){var n=sa();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=sa();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Ra.bind(null,Zo,e),[r.memoizedState,e]},useRef:ba,useState:ma,useDebugValue:Ca,useDeferredValue:function(e){var t=ma(e),n=t[0],r=t[1];return _a((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=ma(!1),t=e[0];return ba(e=Ea.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=sa();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},pa(r,e,t,n)},useOpaqueIdentifier:function(){if(Uo){var e=!1,t=function(e){return{$$typeof:N,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Kr++).toString(36))),Error(a(355))})),n=ma(t)[1];return 0===(2&Zo.mode)&&(Zo.flags|=516,ya(5,(function(){n("r:"+(Kr++).toString(36))}),void 0,null)),t}return ma(t="r:"+(Kr++).toString(36)),t},unstable_isNewReconciler:!1},Ma={readContext:oo,useCallback:Ta,useContext:oo,useEffect:Sa,useImperativeHandle:ka,useLayoutEffect:Aa,useMemo:Ia,useReducer:ua,useRef:va,useState:function(){return ua(ca)},useDebugValue:Ca,useDeferredValue:function(e){var t=ua(ca),n=t[0],r=t[1];return Sa((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=ua(ca)[0];return[va().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return ua(ca)[0]},unstable_isNewReconciler:!1},Da={readContext:oo,useCallback:Ta,useContext:oo,useEffect:Sa,useImperativeHandle:ka,useLayoutEffect:Aa,useMemo:Ia,useReducer:da,useRef:va,useState:function(){return da(ca)},useDebugValue:Ca,useDeferredValue:function(e){var t=da(ca),n=t[0],r=t[1];return Sa((function(){var t=Xo.transition;Xo.transition=1;try{r(e)}finally{Xo.transition=t}}),[e]),n},useTransition:function(){var e=da(ca)[0];return[va().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return da(ca)[0]},unstable_isNewReconciler:!1},Na=_.ReactCurrentOwner,La=!1;function Fa(e,t,n,r){t.child=null===e?To(t,null,n,r):Co(t,e.child,n,r)}function Ba(e,t,n,r,i){n=n.render;var o=t.ref;return io(t,i),r=aa(e,t,n,r,o,i),null===e||La?(t.flags|=1,Fa(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,os(e,t,i))}function ja(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!==typeof a||Hl(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Gl(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,za(e,t,a,r,i,o))}return a=e.child,0===(i&o)&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:dr)(i,r)&&e.ref===t.ref)?os(e,t,o):(t.flags|=1,(e=Yl(a,r)).ref=t.ref,e.return=t,t.child=e)}function za(e,t,n,r,i,o){if(null!==e&&dr(e.memoizedProps,r)&&e.ref===t.ref){if(La=!1,0===(o&i))return t.lanes=e.lanes,os(e,t,o);0!==(16384&e.flags)&&(La=!0)}return $a(e,t,n,r,o)}function Ua(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},Sl(t,n);else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Sl(t,e),null;t.memoizedState={baseLanes:0},Sl(t,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Sl(t,r);return Fa(e,t,i,n),t.child}function Va(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function $a(e,t,n,r,i){var o=yi(n)?hi:fi.current;return o=mi(t,o),io(t,i),n=aa(e,t,n,r,o,i),null===e||La?(t.flags|=1,Fa(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,os(e,t,i))}function Wa(e,t,n,r,i){if(yi(n)){var o=!0;wi(t)}else o=!1;if(io(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),go(t,n,r),_o(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=oo(c):c=mi(t,c=yi(n)?hi:fi.current);var u=n.getDerivedStateFromProps,d="function"===typeof u||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||l!==c)&&wo(t,a,r,c),ao=!1;var f=t.memoizedState;a.state=f,po(t,r,a,i),l=t.memoizedState,s!==r||f!==l||pi.current||ao?("function"===typeof u&&(yo(t,n,u,r),l=t.memoizedState),(s=ao||vo(t,n,s,r,f,l,c))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,lo(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Qi(t.type,s),a.props=c,d=t.pendingProps,f=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=oo(l):l=mi(t,l=yi(n)?hi:fi.current);var p=n.getDerivedStateFromProps;(u="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==d||f!==l)&&wo(t,a,r,l),ao=!1,f=t.memoizedState,a.state=f,po(t,r,a,i);var h=t.memoizedState;s!==d||f!==h||pi.current||ao?("function"===typeof p&&(yo(t,n,p,r),h=t.memoizedState),(c=ao||vo(t,n,c,r,f,h,l))?(u||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=256),r=!1)}return Ha(e,t,n,r,o,i)}function Ha(e,t,n,r,i,o){Va(e,t);var a=0!==(64&t.flags);if(!r&&!a)return i&&_i(t,n,!1),os(e,t,o);r=t.stateNode,Na.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Co(t,e.child,null,o),t.child=Co(t,null,s,o)):Fa(e,t,s,o),t.memoizedState=r.state,i&&_i(t,n,!0),t.child}function Ya(e){var t=e.stateNode;t.pendingContext?vi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&vi(0,t.context,!1),Mo(e,t.containerInfo)}var Ga,qa,Ka,Qa,Xa={dehydrated:null,retryLane:0};function Ja(e,t,n){var r,i=t.pendingProps,o=Fo.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&o)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),ui(Fo,1&o),null===e?(void 0!==i.fallback&&Wo(t),e=i.children,o=i.fallback,a?(e=Za(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xa,e):"number"===typeof i.unstable_expectedLoadTime?(e=Za(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xa,t.lanes=33554432,e):((n=Kl({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(i=ts(e,t,i.children,i.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Xa,i):(n=es(e,t,i.children,n),t.memoizedState=null,n))}function Za(e,t,n,r){var i=e.mode,o=e.child;return t={mode:"hidden",children:t},0===(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=Kl(t,i,0,null),n=ql(n,i,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function es(e,t,n,r){var i=e.child;return e=i.sibling,n=Yl(i,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ts(e,t,n,r,i){var o=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0===(2&o)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Yl(a,s),null!==e?r=Yl(e,r):(r=ql(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function ns(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ro(e.return,t)}function rs(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.lastEffect=o)}function is(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Fa(e,t,r.children,n),0!==(2&(r=Fo.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ns(e,n);else if(19===e.tag)ns(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ui(Fo,r),0===(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Bo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rs(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Bo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rs(t,!0,n,null,o,t.lastEffect);break;case"together":rs(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function os(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Us|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Yl(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Yl(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function as(e,t){if(!Uo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ss(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return yi(t.type)&&bi(),null;case 3:return Do(),ci(pi),ci(fi),Ko(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Yo(t)?t.flags|=4:r.hydrate||(t.flags|=256)),qa(t),null;case 5:Lo(t);var o=Po(Oo.current);if(n=t.type,null!==e&&null!=t.stateNode)Ka(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Po(Eo.current),Yo(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Xr]=t,r[Jr]=s,n){case"dialog":Er("cancel",r),Er("close",r);break;case"iframe":case"object":case"embed":Er("load",r);break;case"video":case"audio":for(e=0;e<kr.length;e++)Er(kr[e],r);break;case"source":Er("error",r);break;case"img":case"image":case"link":Er("error",r),Er("load",r);break;case"details":Er("toggle",r);break;case"input":ee(r,s),Er("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Er("invalid",r);break;case"textarea":le(r,s),Er("invalid",r)}for(var c in Ae(n,s),e=null,s)s.hasOwnProperty(c)&&(o=s[c],"children"===c?"string"===typeof o?r.textContent!==o&&(e=["children",o]):"number"===typeof o&&r.textContent!==""+o&&(e=["children",""+o]):l.hasOwnProperty(c)&&null!=o&&"onScroll"===c&&Er("scroll",r));switch(n){case"input":Q(r),re(r,s,!0);break;case"textarea":Q(r),ue(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=jr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(c=9===o.nodeType?o:o.ownerDocument,e===de.html&&(e=fe(n)),e===de.html?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Xr]=t,e[Jr]=r,Ga(e,t,!1,!1),t.stateNode=e,c=xe(n,r),n){case"dialog":Er("cancel",e),Er("close",e),o=r;break;case"iframe":case"object":case"embed":Er("load",e),o=r;break;case"video":case"audio":for(o=0;o<kr.length;o++)Er(kr[o],e);o=r;break;case"source":Er("error",e),o=r;break;case"img":case"image":case"link":Er("error",e),Er("load",e),o=r;break;case"details":Er("toggle",e),o=r;break;case"input":ee(e,r),o=Z(e,r),Er("invalid",e);break;case"option":o=oe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=i({},r,{value:void 0}),Er("invalid",e);break;case"textarea":le(e,r),o=se(e,r),Er("invalid",e);break;default:o=r}Ae(n,o);var u=o;for(s in u)if(u.hasOwnProperty(s)){var d=u[s];"style"===s?_e(e,d):"dangerouslySetInnerHTML"===s?null!=(d=d?d.__html:void 0)&&ye(e,d):"children"===s?"string"===typeof d?("textarea"!==n||""!==d)&&be(e,d):"number"===typeof d&&be(e,""+d):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(l.hasOwnProperty(s)?null!=d&&"onScroll"===s&&Er("scroll",e):null!=d&&w(e,s,d,c))}switch(n){case"input":Q(e),re(e,r,!1);break;case"textarea":Q(e),ue(e);break;case"option":null!=r.value&&e.setAttribute("value",""+q(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ae(e,!!r.multiple,s,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=jr)}Vr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Qa(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=Po(Oo.current),Po(Eo.current),Yo(t)?(r=t.stateNode,n=t.memoizedProps,r[Xr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Xr]=t,t.stateNode=r)}return null;case 13:return ci(Fo),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Yo(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Fo.current)?0===Bs&&(Bs=3):(0!==Bs&&3!==Bs||(Bs=4),null===Ms||0===(134217727&Us)&&0===(134217727&Vs)||vl(Ms,Ns))),(r||n)&&(t.flags|=4),null);case 4:return Do(),qa(t),null===e&&Or(t.stateNode.containerInfo),null;case 10:return no(t),null;case 19:if(ci(Fo),null===(r=t.memoizedState))return null;if(s=0!==(64&t.flags),null===(c=r.rendering))if(s)as(r,!1);else{if(0!==Bs||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(c=Bo(e))){for(t.flags|=64,as(r,!1),null!==(s=c.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(c=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ui(Fo,1&Fo.current|2),t.child}e=e.sibling}null!==r.tail&&Vi()>Ys&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=Bo(c))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),as(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!Uo)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Vi()-r.renderingStartTime>Ys&&1073741824!==n&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Vi(),n.sibling=null,t=Fo.current,ui(Fo,s?1&t|2:1&t),n):null;case 23:case 24:return Al(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function ls(e){switch(e.tag){case 1:yi(e.type)&&bi();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Do(),ci(pi),ci(fi),Ko(),0!==(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Lo(e),null;case 13:return ci(Fo),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ci(Fo),null;case 4:return Do(),null;case 10:return no(e),null;case 23:case 24:return Al(),null;default:return null}}function cs(e,t){try{var n="",r=t;do{n+=Y(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i}}function us(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Ga=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},qa=function(){},Ka=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Po(Eo.current);var a,s=null;switch(n){case"input":o=Z(e,o),r=Z(e,r),s=[];break;case"option":o=oe(e,o),r=oe(e,r),s=[];break;case"select":o=i({},o,{value:void 0}),r=i({},r,{value:void 0}),s=[];break;case"textarea":o=se(e,o),r=se(e,r),s=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(e.onclick=jr)}for(d in Ae(n,r),n=null,o)if(!r.hasOwnProperty(d)&&o.hasOwnProperty(d)&&null!=o[d])if("style"===d){var c=o[d];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(l.hasOwnProperty(d)?s||(s=[]):(s=s||[]).push(d,null));for(d in r){var u=r[d];if(c=null!=o?o[d]:void 0,r.hasOwnProperty(d)&&u!==c&&(null!=u||null!=c))if("style"===d)if(c){for(a in c)!c.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&c[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(s||(s=[]),s.push(d,n)),n=u;else"dangerouslySetInnerHTML"===d?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(s=s||[]).push(d,u)):"children"===d?"string"!==typeof u&&"number"!==typeof u||(s=s||[]).push(d,""+u):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(l.hasOwnProperty(d)?(null!=u&&"onScroll"===d&&Er("scroll",e),s||c===u||(s=[])):"object"===typeof u&&null!==u&&u.$$typeof===N?u.toString():(s=s||[]).push(d,u))}n&&(s=s||[]).push("style",n);var d=s;(t.updateQueue=d)&&(t.flags|=4)}},Qa=function(e,t,n,r){n!==r&&(t.flags|=4)};var ds="function"===typeof WeakMap?WeakMap:Map;function fs(e,t,n){(n=co(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Qs||(Qs=!0,Xs=r),us(0,t)},n}function ps(e,t,n){(n=co(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return us(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Js?Js=new Set([this]):Js.add(this),us(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var hs="function"===typeof WeakSet?WeakSet:Set;function ms(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){zl(e,n)}else t.current=null}function ys(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Qi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Yr(t.stateNode.containerInfo))}throw Error(a(163))}function bs(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!==(4&(i=i.tag))&&0!==(1&i)&&(Fl(n,e),Ll(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Qi(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&ho(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}ho(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Vr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&_t(n)))))}throw Error(a(163))}function vs(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=void 0!==i&&null!==i&&i.hasOwnProperty("display")?i.display:null,r.style.display=we("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function gs(e,t){if(Ai&&"function"===typeof Ai.onCommitFiberUnmount)try{Ai.onCommitFiberUnmount(Si,t)}catch(o){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!==(4&r))Fl(t,n);else{r=t;try{i()}catch(o){zl(r,o)}}n=n.next}while(n!==e)}break;case 1:if(ms(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){zl(t,o)}break;case 5:ms(t);break;case 4:ks(e,t)}}function ws(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function _s(e){return 5===e.tag||3===e.tag||4===e.tag}function Ss(e){e:{for(var t=e.return;null!==t;){if(_s(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(be(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||_s(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?As(e,n,t):xs(e,n,t)}function As(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=jr));else if(4!==r&&null!==(e=e.child))for(As(e,t,n),e=e.sibling;null!==e;)As(e,t,n),e=e.sibling}function xs(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(xs(e,t,n),e=e.sibling;null!==e;)xs(e,t,n),e=e.sibling}function ks(e,t){for(var n,r,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(a(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag){e:for(var s=e,l=i,c=l;;)if(gs(s,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===l)break e;for(;null===c.sibling;){if(null===c.return||c.return===l)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(s=n,l=i.stateNode,8===s.nodeType?s.parentNode.removeChild(l):s.removeChild(l)):n.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(gs(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function Cs(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Jr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),xe(e,i),t=xe(e,r),i=0;i<o.length;i+=2){var s=o[i],l=o[i+1];"style"===s?_e(n,l):"dangerouslySetInnerHTML"===s?ye(n,l):"children"===s?be(n,l):w(n,s,l,t)}switch(e){case"input":ne(n,r);break;case"textarea":ce(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?ae(n,!!r.multiple,o,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,_t(n.containerInfo)));case 13:return null!==t.memoizedState&&(Hs=Vi(),vs(t.child,!0)),void Ts(t);case 19:return void Ts(t);case 23:case 24:return void vs(t,null!==t.memoizedState)}throw Error(a(163))}function Ts(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new hs),t.forEach((function(t){var r=Vl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Is(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Es=Math.ceil,Rs=_.ReactCurrentDispatcher,Os=_.ReactCurrentOwner,Ps=0,Ms=null,Ds=null,Ns=0,Ls=0,Fs=li(0),Bs=0,js=null,zs=0,Us=0,Vs=0,$s=0,Ws=null,Hs=0,Ys=1/0;function Gs(){Ys=Vi()+500}var qs,Ks=null,Qs=!1,Xs=null,Js=null,Zs=!1,el=null,tl=90,nl=[],rl=[],il=null,ol=0,al=null,sl=-1,ll=0,cl=0,ul=null,dl=!1;function fl(){return 0!==(48&Ps)?Vi():-1!==sl?sl:sl=Vi()}function pl(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===$i()?1:2;if(0===ll&&(ll=zs),0!==Ki.transition){0!==cl&&(cl=null!==Ws?Ws.pendingLanes:0),e=ll;var t=4186112&~cl;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=$i(),0!==(4&Ps)&&98===e?e=jt(12,ll):e=jt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ll),e}function hl(e,t,n){if(50<ol)throw ol=0,al=null,Error(a(185));if(null===(e=ml(e,t)))return null;Vt(e,t,n),e===Ms&&(Vs|=t,4===Bs&&vl(e,Ns));var r=$i();1===t?0!==(8&Ps)&&0===(48&Ps)?gl(e):(yl(e,n),0===Ps&&(Gs(),Gi())):(0===(4&Ps)||98!==r&&99!==r||(null===il?il=new Set([e]):il.add(e)),yl(e,n)),Ws=e}function ml(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function yl(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-$t(s),c=1<<l,u=o[l];if(-1===u){if(0===(c&r)||0!==(c&i)){u=t,Lt(c);var d=Nt;o[l]=10<=d?u+250:6<=d?u+5e3:-1}}else u<=t&&(e.expiredLanes|=c);s&=~c}if(r=Ft(e,e===Ms?Ns:0),t=Nt,0===r)null!==n&&(n!==Li&&Ci(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Li&&Ci(n)}15===t?(n=gl.bind(null,e),null===Bi?(Bi=[n],ji=ki(Oi,qi)):Bi.push(n),n=Li):14===t?n=Yi(99,gl.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=Yi(n,bl.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function bl(e){if(sl=-1,cl=ll=0,0!==(48&Ps))throw Error(a(327));var t=e.callbackNode;if(Nl()&&e.callbackNode!==t)return null;var n=Ft(e,e===Ms?Ns:0);if(0===n)return null;var r=n,i=Ps;Ps|=16;var o=Cl();for(Ms===e&&Ns===r||(Gs(),xl(e,r));;)try{El();break}catch(l){kl(e,l)}if(to(),Rs.current=o,Ps=i,null!==Ds?r=0:(Ms=null,Ns=0,r=Bs),0!==(zs&Vs))xl(e,0);else if(0!==r){if(2===r&&(Ps|=64,e.hydrate&&(e.hydrate=!1,Yr(e.containerInfo)),0!==(n=Bt(e))&&(r=Tl(e,n))),1===r)throw t=js,xl(e,0),vl(e,n),yl(e,Vi()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:Pl(e);break;case 3:if(vl(e,n),(62914560&n)===n&&10<(r=Hs+500-Vi())){if(0!==Ft(e,0))break;if(((i=e.suspendedLanes)&n)!==n){fl(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Wr(Pl.bind(null,e),r);break}Pl(e);break;case 4:if(vl(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var s=31-$t(n);o=1<<s,(s=r[s])>i&&(i=s),n&=~o}if(n=i,10<(n=(120>(n=Vi()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Es(n/1960))-n)){e.timeoutHandle=Wr(Pl.bind(null,e),n);break}Pl(e);break;default:throw Error(a(329))}}return yl(e,Vi()),e.callbackNode===t?bl.bind(null,e):null}function vl(e,t){for(t&=~$s,t&=~Vs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-$t(t),r=1<<n;e[n]=-1,t&=~r}}function gl(e){if(0!==(48&Ps))throw Error(a(327));if(Nl(),e===Ms&&0!==(e.expiredLanes&Ns)){var t=Ns,n=Tl(e,t);0!==(zs&Vs)&&(n=Tl(e,t=Ft(e,t)))}else n=Tl(e,t=Ft(e,0));if(0!==e.tag&&2===n&&(Ps|=64,e.hydrate&&(e.hydrate=!1,Yr(e.containerInfo)),0!==(t=Bt(e))&&(n=Tl(e,t))),1===n)throw n=js,xl(e,0),vl(e,t),yl(e,Vi()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Pl(e),yl(e,Vi()),null}function wl(e,t){var n=Ps;Ps|=1;try{return e(t)}finally{0===(Ps=n)&&(Gs(),Gi())}}function _l(e,t){var n=Ps;Ps&=-2,Ps|=8;try{return e(t)}finally{0===(Ps=n)&&(Gs(),Gi())}}function Sl(e,t){ui(Fs,Ls),Ls|=t,zs|=t}function Al(){Ls=Fs.current,ci(Fs)}function xl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Hr(n)),null!==Ds)for(n=Ds.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&bi();break;case 3:Do(),ci(pi),ci(fi),Ko();break;case 5:Lo(r);break;case 4:Do();break;case 13:case 19:ci(Fo);break;case 10:no(r);break;case 23:case 24:Al()}n=n.return}Ms=e,Ds=Yl(e.current,null),Ns=Ls=zs=t,Bs=0,js=null,$s=Vs=Us=0}function kl(e,t){for(;;){var n=Ds;try{if(to(),Qo.current=Oa,na){for(var r=Zo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}na=!1}if(Jo=0,ta=ea=Zo=null,ra=!1,Os.current=null,null===n||null===n.return){Bs=1,js=t,Ds=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Ns,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==l&&"object"===typeof l&&"function"===typeof l.then){var c=l;if(0===(2&s.mode)){var u=s.alternate;u?(s.updateQueue=u.updateQueue,s.memoizedState=u.memoizedState,s.lanes=u.lanes):(s.updateQueue=null,s.memoizedState=null)}var d=0!==(1&Fo.current),f=a;do{var p;if(p=13===f.tag){var h=f.memoizedState;if(null!==h)p=null!==h.dehydrated;else{var m=f.memoizedProps;p=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!d)}}if(p){var y=f.updateQueue;if(null===y){var b=new Set;b.add(c),f.updateQueue=b}else y.add(c);if(0===(2&f.mode)){if(f.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var v=co(-1,1);v.tag=2,uo(s,v)}s.lanes|=1;break e}l=void 0,s=t;var g=o.pingCache;if(null===g?(g=o.pingCache=new ds,l=new Set,g.set(c,l)):void 0===(l=g.get(c))&&(l=new Set,g.set(c,l)),!l.has(s)){l.add(s);var w=Ul.bind(null,o,c,s);c.then(w,w)}f.flags|=4096,f.lanes=t;break e}f=f.return}while(null!==f);l=Error((G(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Bs&&(Bs=2),l=cs(l,s),f=a;do{switch(f.tag){case 3:o=l,f.flags|=4096,t&=-t,f.lanes|=t,fo(f,fs(0,o,t));break e;case 1:o=l;var _=f.type,S=f.stateNode;if(0===(64&f.flags)&&("function"===typeof _.getDerivedStateFromError||null!==S&&"function"===typeof S.componentDidCatch&&(null===Js||!Js.has(S)))){f.flags|=4096,t&=-t,f.lanes|=t,fo(f,ps(f,o,t));break e}}f=f.return}while(null!==f)}Ol(n)}catch(A){t=A,Ds===n&&null!==n&&(Ds=n=n.return);continue}break}}function Cl(){var e=Rs.current;return Rs.current=Oa,null===e?Oa:e}function Tl(e,t){var n=Ps;Ps|=16;var r=Cl();for(Ms===e&&Ns===t||xl(e,t);;)try{Il();break}catch(i){kl(e,i)}if(to(),Ps=n,Rs.current=r,null!==Ds)throw Error(a(261));return Ms=null,Ns=0,Bs}function Il(){for(;null!==Ds;)Rl(Ds)}function El(){for(;null!==Ds&&!Ti();)Rl(Ds)}function Rl(e){var t=qs(e.alternate,e,Ls);e.memoizedProps=e.pendingProps,null===t?Ol(e):Ds=t,Os.current=null}function Ol(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=ss(n,t,Ls)))return void(Ds=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Ls)||0===(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=ls(t)))return n.flags&=2047,void(Ds=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Ds=t);Ds=t=e}while(null!==t);0===Bs&&(Bs=5)}function Pl(e){var t=$i();return Hi(99,Ml.bind(null,e,t)),null}function Ml(e,t){do{Nl()}while(null!==el);if(0!==(48&Ps))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var s=e.eventTimes,l=e.expirationTimes;0<o;){var c=31-$t(o),u=1<<c;i[c]=0,s[c]=-1,l[c]=-1,o&=~u}if(null!==il&&0===(24&r)&&il.has(e)&&il.delete(e),e===Ms&&(Ds=Ms=null,Ns=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=Ps,Ps|=32,Os.current=null,zr=qt,yr(s=mr())){if("selectionStart"in s)l={start:s.selectionStart,end:s.selectionEnd};else e:if(l=(l=s.ownerDocument)&&l.defaultView||window,(u=l.getSelection&&l.getSelection())&&0!==u.rangeCount){l=u.anchorNode,o=u.anchorOffset,c=u.focusNode,u=u.focusOffset;try{l.nodeType,c.nodeType}catch(C){l=null;break e}var d=0,f=-1,p=-1,h=0,m=0,y=s,b=null;t:for(;;){for(var v;y!==l||0!==o&&3!==y.nodeType||(f=d+o),y!==c||0!==u&&3!==y.nodeType||(p=d+u),3===y.nodeType&&(d+=y.nodeValue.length),null!==(v=y.firstChild);)b=y,y=v;for(;;){if(y===s)break t;if(b===l&&++h===o&&(f=d),b===c&&++m===u&&(p=d),null!==(v=y.nextSibling))break;b=(y=b).parentNode}y=v}l=-1===f||-1===p?null:{start:f,end:p}}else l=null;l=l||{start:0,end:0}}else l=null;Ur={focusedElem:s,selectionRange:l},qt=!1,ul=null,dl=!1,Ks=r;do{try{Dl()}catch(C){if(null===Ks)throw Error(a(330));zl(Ks,C),Ks=Ks.nextEffect}}while(null!==Ks);ul=null,Ks=r;do{try{for(s=e;null!==Ks;){var g=Ks.flags;if(16&g&&be(Ks.stateNode,""),128&g){var w=Ks.alternate;if(null!==w){var _=w.ref;null!==_&&("function"===typeof _?_(null):_.current=null)}}switch(1038&g){case 2:Ss(Ks),Ks.flags&=-3;break;case 6:Ss(Ks),Ks.flags&=-3,Cs(Ks.alternate,Ks);break;case 1024:Ks.flags&=-1025;break;case 1028:Ks.flags&=-1025,Cs(Ks.alternate,Ks);break;case 4:Cs(Ks.alternate,Ks);break;case 8:ks(s,l=Ks);var S=l.alternate;ws(l),null!==S&&ws(S)}Ks=Ks.nextEffect}}catch(C){if(null===Ks)throw Error(a(330));zl(Ks,C),Ks=Ks.nextEffect}}while(null!==Ks);if(_=Ur,w=mr(),g=_.focusedElem,s=_.selectionRange,w!==g&&g&&g.ownerDocument&&hr(g.ownerDocument.documentElement,g)){null!==s&&yr(g)&&(w=s.start,void 0===(_=s.end)&&(_=w),"selectionStart"in g?(g.selectionStart=w,g.selectionEnd=Math.min(_,g.value.length)):(_=(w=g.ownerDocument||document)&&w.defaultView||window).getSelection&&(_=_.getSelection(),l=g.textContent.length,S=Math.min(s.start,l),s=void 0===s.end?S:Math.min(s.end,l),!_.extend&&S>s&&(l=s,s=S,S=l),l=pr(g,S),o=pr(g,s),l&&o&&(1!==_.rangeCount||_.anchorNode!==l.node||_.anchorOffset!==l.offset||_.focusNode!==o.node||_.focusOffset!==o.offset)&&((w=w.createRange()).setStart(l.node,l.offset),_.removeAllRanges(),S>s?(_.addRange(w),_.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),_.addRange(w))))),w=[];for(_=g;_=_.parentNode;)1===_.nodeType&&w.push({element:_,left:_.scrollLeft,top:_.scrollTop});for("function"===typeof g.focus&&g.focus(),g=0;g<w.length;g++)(_=w[g]).element.scrollLeft=_.left,_.element.scrollTop=_.top}qt=!!zr,Ur=zr=null,e.current=n,Ks=r;do{try{for(g=e;null!==Ks;){var A=Ks.flags;if(36&A&&bs(g,Ks.alternate,Ks),128&A){w=void 0;var x=Ks.ref;if(null!==x){var k=Ks.stateNode;Ks.tag,w=k,"function"===typeof x?x(w):x.current=w}}Ks=Ks.nextEffect}}catch(C){if(null===Ks)throw Error(a(330));zl(Ks,C),Ks=Ks.nextEffect}}while(null!==Ks);Ks=null,Fi(),Ps=i}else e.current=n;if(Zs)Zs=!1,el=e,tl=t;else for(Ks=r;null!==Ks;)t=Ks.nextEffect,Ks.nextEffect=null,8&Ks.flags&&((A=Ks).sibling=null,A.stateNode=null),Ks=t;if(0===(r=e.pendingLanes)&&(Js=null),1===r?e===al?ol++:(ol=0,al=e):ol=0,n=n.stateNode,Ai&&"function"===typeof Ai.onCommitFiberRoot)try{Ai.onCommitFiberRoot(Si,n,void 0,64===(64&n.current.flags))}catch(C){}if(yl(e,Vi()),Qs)throw Qs=!1,e=Xs,Xs=null,e;return 0!==(8&Ps)||Gi(),null}function Dl(){for(;null!==Ks;){var e=Ks.alternate;dl||null===ul||(0!==(8&Ks.flags)?Ze(Ks,ul)&&(dl=!0):13===Ks.tag&&Is(e,Ks)&&Ze(Ks,ul)&&(dl=!0));var t=Ks.flags;0!==(256&t)&&ys(e,Ks),0===(512&t)||Zs||(Zs=!0,Yi(97,(function(){return Nl(),null}))),Ks=Ks.nextEffect}}function Nl(){if(90!==tl){var e=97<tl?97:tl;return tl=90,Hi(e,Bl)}return!1}function Ll(e,t){nl.push(t,e),Zs||(Zs=!0,Yi(97,(function(){return Nl(),null})))}function Fl(e,t){rl.push(t,e),Zs||(Zs=!0,Yi(97,(function(){return Nl(),null})))}function Bl(){if(null===el)return!1;var e=el;if(el=null,0!==(48&Ps))throw Error(a(331));var t=Ps;Ps|=32;var n=rl;rl=[];for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1],s=i.destroy;if(i.destroy=void 0,"function"===typeof s)try{s()}catch(c){if(null===o)throw Error(a(330));zl(o,c)}}for(n=nl,nl=[],r=0;r<n.length;r+=2){i=n[r],o=n[r+1];try{var l=i.create;i.destroy=l()}catch(c){if(null===o)throw Error(a(330));zl(o,c)}}for(l=e.current.firstEffect;null!==l;)e=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=e;return Ps=t,Gi(),!0}function jl(e,t,n){uo(e,t=fs(0,t=cs(n,t),1)),t=fl(),null!==(e=ml(e,1))&&(Vt(e,1,t),yl(e,t))}function zl(e,t){if(3===e.tag)jl(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){jl(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Js||!Js.has(r))){var i=ps(n,e=cs(t,e),1);if(uo(n,i),i=fl(),null!==(n=ml(n,1)))Vt(n,1,i),yl(n,i);else if("function"===typeof r.componentDidCatch&&(null===Js||!Js.has(r)))try{r.componentDidCatch(t,e)}catch(o){}break}}n=n.return}}function Ul(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=fl(),e.pingedLanes|=e.suspendedLanes&n,Ms===e&&(Ns&n)===n&&(4===Bs||3===Bs&&(62914560&Ns)===Ns&&500>Vi()-Hs?xl(e,0):$s|=n),yl(e,t)}function Vl(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===$i()?1:2:(0===ll&&(ll=zs),0===(t=zt(62914560&~ll))&&(t=4194304))),n=fl(),null!==(e=ml(e,t))&&(Vt(e,t,n),yl(e,n))}function $l(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Wl(e,t,n,r){return new $l(e,t,n,r)}function Hl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Yl(e,t){var n=e.alternate;return null===n?((n=Wl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Gl(e,t,n,r,i,o){var s=2;if(r=e,"function"===typeof e)Hl(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case x:return ql(n.children,i,o,t);case L:s=8,i|=16;break;case k:s=8,i|=1;break;case C:return(e=Wl(12,n,t,8|i)).elementType=C,e.type=C,e.lanes=o,e;case R:return(e=Wl(13,n,t,i)).type=R,e.elementType=R,e.lanes=o,e;case O:return(e=Wl(19,n,t,i)).elementType=O,e.lanes=o,e;case F:return Kl(n,i,o,t);case B:return(e=Wl(24,n,t,i)).elementType=B,e.lanes=o,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case T:s=10;break e;case I:s=9;break e;case E:s=11;break e;case P:s=14;break e;case M:s=16,r=null;break e;case D:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Wl(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function ql(e,t,n,r){return(e=Wl(7,e,r,t)).lanes=n,e}function Kl(e,t,n,r){return(e=Wl(23,e,r,t)).elementType=F,e.lanes=n,e}function Ql(e,t,n){return(e=Wl(6,e,null,t)).lanes=n,e}function Xl(e,t,n){return(t=Wl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Jl(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ut(0),this.expirationTimes=Ut(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ut(0),this.mutableSourceEagerHydrationData=null}function Zl(e,t,n,r){var i=t.current,o=fl(),s=pl(i);e:if(n){t:{if(Ke(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(yi(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var c=n.type;if(yi(c)){n=gi(n,c,l);break e}}n=l}else n=di;return null===t.context?t.context=n:t.pendingContext=n,(t=co(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),uo(i,t),hl(i,s,o),s}function ec(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function tc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function nc(e,t){tc(e,t),(e=e.alternate)&&tc(e,t)}function rc(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Jl(e,t,null!=n&&!0===n.hydrate),t=Wl(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,so(t),e[Zr]=n.current,Or(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var i=(t=r[e])._getVersion;i=i(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}function ic(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function oc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var s=i;i=function(){var e=ec(a);s.call(e)}}Zl(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new rc(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"===typeof i){var l=i;i=function(){var e=ec(a);l.call(e)}}_l((function(){Zl(t,a,e,i)}))}return ec(a)}function ac(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ic(t))throw Error(a(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:A,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)}qs=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||pi.current)La=!0;else{if(0===(n&r)){switch(La=!1,t.tag){case 3:Ya(t),Go();break;case 5:No(t);break;case 1:yi(t.type)&&wi(t);break;case 4:Mo(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;ui(Xi,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Ja(e,t,n):(ui(Fo,1&Fo.current),null!==(t=os(e,t,n))?t.sibling:null);ui(Fo,1&Fo.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return is(e,t,n);t.flags|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),ui(Fo,Fo.current),r)break;return null;case 23:case 24:return t.lanes=0,Ua(e,t,n)}return os(e,t,n)}La=0!==(16384&e.flags)}else La=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=mi(t,fi.current),io(t,n),i=aa(null,t,r,e,i,n),t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,yi(r)){var o=!0;wi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,so(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&yo(t,r,s,e),i.updater=bo,t.stateNode=i,i._reactInternals=t,_o(t,r,e,n),t=Ha(null,t,r,!0,o,n)}else t.tag=0,Fa(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"===typeof e)return Hl(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===E)return 11;if(e===P)return 14}return 2}(i),e=Qi(i,e),o){case 0:t=$a(null,t,i,e,n);break e;case 1:t=Wa(null,t,i,e,n);break e;case 11:t=Ba(null,t,i,e,n);break e;case 14:t=ja(null,t,i,Qi(i.type,e),r,n);break e}throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,$a(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 1:return r=t.type,i=t.pendingProps,Wa(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 3:if(Ya(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,lo(e,t),po(t,r,null,n),(r=t.memoizedState.element)===i)Go(),t=os(e,t,n);else{if((o=(i=t.stateNode).hydrate)&&(zo=Gr(t.stateNode.containerInfo.firstChild),jo=t,o=Uo=!0),o){if(null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)(o=e[i])._workInProgressVersionPrimary=e[i+1],qo.push(o);for(n=To(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Fa(e,t,r,n),Go();t=t.child}return t;case 5:return No(t),null===e&&Wo(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,$r(r,i)?s=null:null!==o&&$r(r,o)&&(t.flags|=16),Va(e,t),Fa(e,t,s,n),t.child;case 6:return null===e&&Wo(t),null;case 13:return Ja(e,t,n);case 4:return Mo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Co(t,null,r,n):Fa(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ba(e,t,r,i=t.elementType===r?i:Qi(r,i),n);case 7:return Fa(e,t,t.pendingProps,n),t.child;case 8:case 12:return Fa(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value;var l=t.type._context;if(ui(Xi,l._currentValue),l._currentValue=o,null!==s)if(l=s.value,0===(o=cr(l,o)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(l,o):1073741823))){if(s.children===i.children&&!pi.current){t=os(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){s=l.child;for(var u=c.firstContext;null!==u;){if(u.context===r&&0!==(u.observedBits&o)){1===l.tag&&((u=co(-1,n&-n)).tag=2,uo(l,u)),l.lanes|=n,null!==(u=l.alternate)&&(u.lanes|=n),ro(l.return,n),c.lanes|=n;break}u=u.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}Fa(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,io(t,n),r=r(i=oo(i,o.unstable_observedBits)),t.flags|=1,Fa(e,t,r,n),t.child;case 14:return o=Qi(i=t.type,t.pendingProps),ja(e,t,i,o=Qi(i.type,o),r,n);case 15:return za(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Qi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,yi(r)?(e=!0,wi(t)):e=!1,io(t,n),go(t,r,i),_o(t,r,i,n),Ha(null,t,r,!0,e,n);case 19:return is(e,t,n);case 23:case 24:return Ua(e,t,n)}throw Error(a(156,t.tag))},rc.prototype.render=function(e){Zl(e,this._internalRoot,null,null)},rc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Zl(null,e,null,(function(){t[Zr]=null}))},et=function(e){13===e.tag&&(hl(e,4,fl()),nc(e,4))},tt=function(e){13===e.tag&&(hl(e,67108864,fl()),nc(e,67108864))},nt=function(e){if(13===e.tag){var t=fl(),n=pl(e);hl(e,n,t),nc(e,n)}},rt=function(e,t){return t()},Ce=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ii(r);if(!i)throw Error(a(90));X(r),ne(r,i)}}}break;case"textarea":ce(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},Pe=wl,Me=function(e,t,n,r,i){var o=Ps;Ps|=4;try{return Hi(98,e.bind(null,t,n,r,i))}finally{0===(Ps=o)&&(Gs(),Gi())}},De=function(){0===(49&Ps)&&(function(){if(null!==il){var e=il;il=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,yl(e,Vi())}))}Gi()}(),Nl())},Ne=function(e,t){var n=Ps;Ps|=2;try{return e(t)}finally{0===(Ps=n)&&(Gs(),Gi())}};var sc={Events:[ni,ri,ii,Re,Oe,Nl,{current:!1}]},lc={findFiberByHostInstance:ti,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},cc={bundleType:lc.bundleType,version:lc.version,rendererPackageName:lc.rendererPackageName,rendererConfig:lc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Je(e))?null:e.stateNode},findFiberByHostInstance:lc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uc.isDisabled&&uc.supportsFiber)try{Si=uc.inject(cc),Ai=uc}catch(me){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sc,t.createPortal=ac,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Je(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Ps;if(0!==(48&n))return e(t);Ps|=1;try{if(e)return Hi(99,e.bind(null,t))}finally{Ps=n,Gi()}},t.hydrate=function(e,t,n){if(!ic(t))throw Error(a(200));return oc(null,e,t,!0,n)},t.render=function(e,t,n){if(!ic(t))throw Error(a(200));return oc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!ic(e))throw Error(a(40));return!!e._reactRootContainer&&(_l((function(){oc(null,null,e,!1,(function(){e._reactRootContainer=null,e[Zr]=null}))})),!0)},t.unstable_batchedUpdates=wl,t.unstable_createPortal=function(e,t){return ac(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ic(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return oc(e,t,n,!1,r)},t.version="17.0.2"},6396:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(5764)},7643:(e,t,n)=>{"use strict";n(5181);var r=n(7565),i=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),t.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:a.current}}t.jsx=c,t.jsxs=c},8540:(e,t,n)=>{"use strict";var r=n(5181),i=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,l=60112;t.Suspense=60113;var c=60115,u=60116;if("function"===typeof Symbol&&Symbol.for){var d=Symbol.for;i=d("react.element"),o=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),a=d("react.provider"),s=d("react.context"),l=d("react.forward_ref"),t.Suspense=d("react.suspense"),c=d("react.memo"),u=d("react.lazy")}var f="function"===typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function y(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}function b(){}function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=y.prototype;var g=v.prototype=new b;g.constructor=v,r(g,y.prototype),g.isPureReactComponent=!0;var w={current:null},_=Object.prototype.hasOwnProperty,S={key:!0,ref:!0,__self:!0,__source:!0};function A(e,t,n){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)_.call(t,r)&&!S.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:w.current}}function x(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var k=/\/+/g;function C(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function T(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case i:case o:l=!0}}if(l)return a=a(l=e),e=""===r?"."+C(l,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(k,"$&/")+"/"),T(a,t,n,"",(function(e){return e}))):null!=a&&(x(a)&&(a=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(k,"$&/")+"/")+e)),t.push(a)),1;if(l=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var u=r+C(s=e[c],c);l+=T(s,t,n,u,a)}else if(u=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"===typeof u)for(e=u.call(e),c=0;!(s=e.next()).done;)l+=T(s=s.value,t,n,u=r+C(s,c++),a);else if("object"===s)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return l}function I(e,t,n){if(null==e)return e;var r=[],i=0;return T(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function E(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var R={current:null};function O(){var e=R.current;if(null===e)throw Error(p(321));return e}var P={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:I,forEach:function(e,t,n){I(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return I(e,(function(){t++})),t},toArray:function(e){return I(e,(function(e){return e}))||[]},only:function(e){if(!x(e))throw Error(p(143));return e}},t.Component=y,t.PureComponent=v,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(p(267,e));var o=r({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=w.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)_.call(t,u)&&!S.hasOwnProperty(u)&&(o[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){c=Array(u);for(var d=0;d<u;d++)c[d]=arguments[d+2];o.children=c}return{$$typeof:i,type:e.type,key:a,ref:s,props:o,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=A,t.createFactory=function(e){var t=A.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=x,t.lazy=function(e){return{$$typeof:u,_payload:{_status:-1,_result:e},_init:E}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return O().useCallback(e,t)},t.useContext=function(e,t){return O().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return O().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return O().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return O().useLayoutEffect(e,t)},t.useMemo=function(e,t){return O().useMemo(e,t)},t.useReducer=function(e,t,n){return O().useReducer(e,t,n)},t.useRef=function(e){return O().useRef(e)},t.useState=function(e){return O().useState(e)},t.version="17.0.2"},7565:(e,t,n)=>{"use strict";e.exports=n(8540)},7929:(e,t,n)=>{"use strict";e.exports=n(7643)},7508:(e,t)=>{"use strict";var n,r,i,o;if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var c=null,u=null,d=function(){if(null!==c)try{var e=t.unstable_now();c(!0,e),c=null}catch(n){throw setTimeout(d,0),n}};n=function(e){null!==c?setTimeout(n,0,e):(c=e,setTimeout(d,0))},r=function(e,t){u=setTimeout(e,t)},i=function(){clearTimeout(u)},t.unstable_shouldYield=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var f=window.setTimeout,p=window.clearTimeout;if("undefined"!==typeof console){var h=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var m=!1,y=null,b=-1,v=5,g=0;t.unstable_shouldYield=function(){return t.unstable_now()>=g},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,_=w.port2;w.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();g=e+v;try{y(!0,e)?_.postMessage(null):(m=!1,y=null)}catch(n){throw _.postMessage(null),n}}else m=!1},n=function(e){y=e,m||(m=!0,_.postMessage(null))},r=function(e,n){b=f((function(){e(t.unstable_now())}),n)},i=function(){p(b),b=-1}}function S(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<k(i,t)))break e;e[r]=t,e[n]=i,n=r}}function A(e){return void 0===(e=e[0])?null:e}function x(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,l=e[s];if(void 0!==a&&0>k(a,n))void 0!==l&&0>k(l,a)?(e[r]=l,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==l&&0>k(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function k(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],T=[],I=1,E=null,R=3,O=!1,P=!1,M=!1;function D(e){for(var t=A(T);null!==t;){if(null===t.callback)x(T);else{if(!(t.startTime<=e))break;x(T),t.sortIndex=t.expirationTime,S(C,t)}t=A(T)}}function N(e){if(M=!1,D(e),!P)if(null!==A(C))P=!0,n(L);else{var t=A(T);null!==t&&r(N,t.startTime-e)}}function L(e,n){P=!1,M&&(M=!1,i()),O=!0;var o=R;try{for(D(n),E=A(C);null!==E&&(!(E.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=E.callback;if("function"===typeof a){E.callback=null,R=E.priorityLevel;var s=a(E.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?E.callback=s:E===A(C)&&x(C),D(n)}else x(C);E=A(C)}if(null!==E)var l=!0;else{var c=A(T);null!==c&&r(N,c.startTime-n),l=!1}return l}finally{E=null,R=o,O=!1}}var F=o;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){P||O||(P=!0,n(L))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return A(C)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,o,a){var s=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:I++,callback:o,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>s?(e.sortIndex=a,S(T,e),null===A(C)&&e===A(T)&&(M?i():M=!0,r(N,a-s))):(e.sortIndex=l,S(C,e),P||O||(P=!0,n(L))),e},t.unstable_wrapCallback=function(e){var t=R;return function(){var n=R;R=t;try{return e.apply(this,arguments)}finally{R=n}}}},9611:(e,t,n)=>{"use strict";e.exports=n(7508)},2558:e=>{"use strict";const t={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map((e=>e.trim()))},t.splitSections=function(e){return e.split("\nm=").map(((e,t)=>(t>0?"m="+e:e).trim()+"\r\n"))},t.getDescription=function(e){const n=t.splitSections(e);return n&&n[0]},t.getMediaSections=function(e){const n=t.splitSections(e);return n.shift(),n},t.matchPrefix=function(e,n){return t.splitLines(e).filter((e=>0===e.indexOf(n)))},t.parseCandidate=function(e){let t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");const n={foundation:t[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let r=8;r<t.length;r+=2)switch(t[r]){case"raddr":n.relatedAddress=t[r+1];break;case"rport":n.relatedPort=parseInt(t[r+1],10);break;case"tcptype":n.tcpType=t[r+1];break;case"ufrag":n.ufrag=t[r+1],n.usernameFragment=t[r+1];break;default:void 0===n[t[r]]&&(n[t[r]]=t[r+1])}return n},t.writeCandidate=function(e){const t=[];t.push(e.foundation);const n=e.component;"rtp"===n?t.push(1):"rtcp"===n?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);const r=e.type;return t.push("typ"),t.push(r),"host"!==r&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substring(14).split(" ")},t.parseRtpMap=function(e){let t=e.substring(9).split(" ");const n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},t.writeRtpMap=function(e){let t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);const n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},t.parseExtmap=function(e){const t=e.substring(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1],attributes:t.slice(2).join(" ")}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},t.parseFmtp=function(e){const t={};let n;const r=e.substring(e.indexOf(" ")+1).split(";");for(let i=0;i<r.length;i++)n=r[i].trim().split("="),t[n[0].trim()]=n[1];return t},t.writeFmtp=function(e){let t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){const r=[];Object.keys(e.parameters).forEach((t=>{void 0!==e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)})),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){const t=e.substring(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){let t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach((e=>{t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"})),t},t.parseSsrcMedia=function(e){const t=e.indexOf(" "),n={ssrc:parseInt(e.substring(7,t),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substring(t+1,r),n.value=e.substring(r+1)):n.attribute=e.substring(t+1),n},t.parseSsrcGroup=function(e){const t=e.substring(13).split(" ");return{semantics:t.shift(),ssrcs:t.map((e=>parseInt(e,10)))}},t.getMid=function(e){const n=t.matchPrefix(e,"a=mid:")[0];if(n)return n.substring(6)},t.parseFingerprint=function(e){const t=e.substring(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},t.getDtlsParameters=function(e,n){return{role:"auto",fingerprints:t.matchPrefix(e+n,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){let n="a=setup:"+t+"\r\n";return e.fingerprints.forEach((e=>{n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"})),n},t.parseCryptoLine=function(e){const t=e.substring(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"===typeof e.keyParams?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;const t=e.substring(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,n){return t.matchPrefix(e+n,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,n){const r=t.matchPrefix(e+n,"a=ice-ufrag:")[0],i=t.matchPrefix(e+n,"a=ice-pwd:")[0];return r&&i?{usernameFragment:r.substring(12),password:i.substring(10)}:null},t.writeIceParameters=function(e){let t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},t.parseRtpParameters=function(e){const n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=t.splitLines(e)[0].split(" ");n.profile=r[2];for(let o=3;o<r.length;o++){const i=r[o],a=t.matchPrefix(e,"a=rtpmap:"+i+" ")[0];if(a){const r=t.parseRtpMap(a),o=t.matchPrefix(e,"a=fmtp:"+i+" ");switch(r.parameters=o.length?t.parseFmtp(o[0]):{},r.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+i+" ").map(t.parseRtcpFb),n.codecs.push(r),r.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(r.name.toUpperCase())}}}t.matchPrefix(e,"a=extmap:").forEach((e=>{n.headerExtensions.push(t.parseExtmap(e))}));const i=t.matchPrefix(e,"a=rtcp-fb:* ").map(t.parseRtcpFb);return n.codecs.forEach((e=>{i.forEach((t=>{e.rtcpFeedback.find((e=>e.type===t.type&&e.parameter===t.parameter))||e.rtcpFeedback.push(t)}))})),n},t.writeRtpDescription=function(e,n){let r="";r+="m="+e+" ",r+=n.codecs.length>0?"9":"0",r+=" "+(n.profile||"UDP/TLS/RTP/SAVPF")+" ",r+=n.codecs.map((e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType)).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach((e=>{r+=t.writeRtpMap(e),r+=t.writeFmtp(e),r+=t.writeRtcpFb(e)}));let i=0;return n.codecs.forEach((e=>{e.maxptime>i&&(i=e.maxptime)})),i>0&&(r+="a=maxptime:"+i+"\r\n"),n.headerExtensions&&n.headerExtensions.forEach((e=>{r+=t.writeExtmap(e)})),r},t.parseRtpEncodingParameters=function(e){const n=[],r=t.parseRtpParameters(e),i=-1!==r.fecMechanisms.indexOf("RED"),o=-1!==r.fecMechanisms.indexOf("ULPFEC"),a=t.matchPrefix(e,"a=ssrc:").map((e=>t.parseSsrcMedia(e))).filter((e=>"cname"===e.attribute)),s=a.length>0&&a[0].ssrc;let l;const c=t.matchPrefix(e,"a=ssrc-group:FID").map((e=>e.substring(17).split(" ").map((e=>parseInt(e,10)))));c.length>0&&c[0].length>1&&c[0][0]===s&&(l=c[0][1]),r.codecs.forEach((e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let t={ssrc:s,codecPayloadType:parseInt(e.parameters.apt,10)};s&&l&&(t.rtx={ssrc:l}),n.push(t),i&&(t=JSON.parse(JSON.stringify(t)),t.fec={ssrc:s,mechanism:o?"red+ulpfec":"red"},n.push(t))}})),0===n.length&&s&&n.push({ssrc:s});let u=t.matchPrefix(e,"b=");return u.length&&(u=0===u[0].indexOf("b=TIAS:")?parseInt(u[0].substring(7),10):0===u[0].indexOf("b=AS:")?1e3*parseInt(u[0].substring(5),10)*.95-16e3:void 0,n.forEach((e=>{e.maxBitrate=u}))),n},t.parseRtcpParameters=function(e){const n={},r=t.matchPrefix(e,"a=ssrc:").map((e=>t.parseSsrcMedia(e))).filter((e=>"cname"===e.attribute))[0];r&&(n.cname=r.value,n.ssrc=r.ssrc);const i=t.matchPrefix(e,"a=rtcp-rsize");n.reducedSize=i.length>0,n.compound=0===i.length;const o=t.matchPrefix(e,"a=rtcp-mux");return n.mux=o.length>0,n},t.writeRtcpParameters=function(e){let t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},t.parseMsid=function(e){let n;const r=t.matchPrefix(e,"a=msid:");if(1===r.length)return n=r[0].substring(7).split(" "),{stream:n[0],track:n[1]};const i=t.matchPrefix(e,"a=ssrc:").map((e=>t.parseSsrcMedia(e))).filter((e=>"msid"===e.attribute));return i.length>0?(n=i[0].value.split(" "),{stream:n[0],track:n[1]}):void 0},t.parseSctpDescription=function(e){const n=t.parseMLine(e),r=t.matchPrefix(e,"a=max-message-size:");let i;r.length>0&&(i=parseInt(r[0].substring(19),10)),isNaN(i)&&(i=65536);const o=t.matchPrefix(e,"a=sctp-port:");if(o.length>0)return{port:parseInt(o[0].substring(12),10),protocol:n.fmt,maxMessageSize:i};const a=t.matchPrefix(e,"a=sctpmap:");if(a.length>0){const e=a[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:i}}},t.writeSctpDescription=function(e,t){let n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,22)},t.writeSessionBoilerplate=function(e,n,r){let i;const o=void 0!==n?n:2;i=e||t.generateSessionId();return"v=0\r\no="+(r||"thisisadapterortc")+" "+i+" "+o+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.getDirection=function(e,n){const r=t.splitLines(e);for(let t=0;t<r.length;t++)switch(r[t]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return r[t].substring(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substring(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){const n=t.splitLines(e)[0].substring(2).split(" ");return{kind:n[0],port:parseInt(n[1],10),protocol:n[2],fmt:n.slice(3).join(" ")}},t.parseOLine=function(e){const n=t.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:n[0],sessionId:n[1],sessionVersion:parseInt(n[2],10),netType:n[3],addressType:n[4],address:n[5]}},t.isValidSDP=function(e){if("string"!==typeof e||0===e.length)return!1;const n=t.splitLines(e);for(let t=0;t<n.length;t++)if(n[t].length<2||"="!==n[t].charAt(1))return!1;return!0},e.exports=t},5573:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7929),a=function(e){function t(t){var n=e.call(this,t)||this;return n.state={error:void 0},n}return r(t,e),t.getDerivedStateFromError=function(e){return{error:e}},t.prototype.render=function(){return null!=this.state.error?(0,o.jsxs)("div",{children:[(0,o.jsx)("h1",{children:"Component Error"},void 0),(0,o.jsx)("span",{children:this.state.error.message},void 0)]},void 0):this.props.children},t}(i(n(7565)).default.PureComponent);t.default=a},3161:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useRenderData=void 0;var l=n(7929),c=a(n(7565)),u=n(8415),d=n(6755),f=s(n(5573)),p=c.default.createContext(void 0);t.useRenderData=function(){var e=(0,c.useContext)(p);if(null==e)throw new Error("useRenderData() must be used inside <StreamlitProvider />");return e};t.default=function(e){var t=(0,d.useNullableRenderData)();return(0,c.useEffect)((function(){u.Streamlit.setFrameHeight()})),null==t?null:(0,l.jsx)(f.default,{children:(0,l.jsx)(p.Provider,r({value:t},{children:e.children}),void 0)},void 0)}},6641:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useNullableRenderData=t.StreamlitProvider=t.useRenderData=void 0;var i=n(3161);Object.defineProperty(t,"useRenderData",{enumerable:!0,get:function(){return i.useRenderData}}),Object.defineProperty(t,"StreamlitProvider",{enumerable:!0,get:function(){return r(i).default}});var o=n(6755);Object.defineProperty(t,"useNullableRenderData",{enumerable:!0,get:function(){return o.useNullableRenderData}})},6755:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useNullableRenderData=void 0;var r=n(7565),i=n(8415);t.useNullableRenderData=function(){var e=(0,r.useState)(),t=e[0],n=e[1];return(0,r.useEffect)((function(){var e=function(e){n(e.detail)};i.Streamlit.events.addEventListener(i.Streamlit.RENDER_EVENT,e),i.Streamlit.setComponentReady();return function(){i.Streamlit.events.removeEventListener(i.Streamlit.RENDER_EVENT,e)}}),[]),t}},8415:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ArrowTable:()=>ia,Streamlit:()=>aa,StreamlitComponentBase:()=>ca,withStreamlitConnection:()=>ua});var r,i,o,a,s,l,c,u,d,f=n(2341),p=n.n(f),h=n(5946);!function(e){e[e.V1=0]="V1",e[e.V2=1]="V2",e[e.V3=2]="V3",e[e.V4=3]="V4",e[e.V5=4]="V5"}(r||(r={})),function(e){e[e.Sparse=0]="Sparse",e[e.Dense=1]="Dense"}(i||(i={})),function(e){e[e.HALF=0]="HALF",e[e.SINGLE=1]="SINGLE",e[e.DOUBLE=2]="DOUBLE"}(o||(o={})),function(e){e[e.DAY=0]="DAY",e[e.MILLISECOND=1]="MILLISECOND"}(a||(a={})),function(e){e[e.SECOND=0]="SECOND",e[e.MILLISECOND=1]="MILLISECOND",e[e.MICROSECOND=2]="MICROSECOND",e[e.NANOSECOND=3]="NANOSECOND"}(s||(s={})),function(e){e[e.YEAR_MONTH=0]="YEAR_MONTH",e[e.DAY_TIME=1]="DAY_TIME",e[e.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"}(l||(l={})),function(e){e[e.NONE=0]="NONE",e[e.Schema=1]="Schema",e[e.DictionaryBatch=2]="DictionaryBatch",e[e.RecordBatch=3]="RecordBatch",e[e.Tensor=4]="Tensor",e[e.SparseTensor=5]="SparseTensor"}(c||(c={})),function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth"}(u||(u={})),function(e){e[e.OFFSET=0]="OFFSET",e[e.DATA=1]="DATA",e[e.VALIDITY=2]="VALIDITY",e[e.TYPE=3]="TYPE"}(d||(d={}));const[m,y]=(()=>{const e=()=>{throw new Error("BigInt is not available in this environment")};function t(){throw e()}return t.asIntN=()=>{throw e()},t.asUintN=()=>{throw e()},"undefined"!==typeof BigInt?[BigInt,!0]:[t,!1]})(),[b,v]=(()=>{const e=()=>{throw new Error("BigInt64Array is not available in this environment")};return"undefined"!==typeof BigInt64Array?[BigInt64Array,!0]:[class{static get BYTES_PER_ELEMENT(){return 8}static of(){throw e()}static from(){throw e()}constructor(){throw e()}},!1]})(),[g,w]=(()=>{const e=()=>{throw new Error("BigUint64Array is not available in this environment")};return"undefined"!==typeof BigUint64Array?[BigUint64Array,!0]:[class{static get BYTES_PER_ELEMENT(){return 8}static of(){throw e()}static from(){throw e()}constructor(){throw e()}},!1]})(),_=e=>"number"===typeof e,S=e=>"boolean"===typeof e,A=e=>"function"===typeof e,x=e=>null!=e&&Object(e)===e,k=e=>x(e)&&A(e.then),C=e=>x(e)&&A(e[Symbol.iterator]),T=e=>x(e)&&A(e[Symbol.asyncIterator]),I=e=>x(e)&&x(e.schema),E=e=>x(e)&&"done"in e&&"value"in e,R=e=>x(e)&&A(e.stat)&&_(e.fd),O=e=>x(e)&&M(e.body),P=e=>"_getDOMStream"in e&&"_getNodeStream"in e,M=e=>x(e)&&A(e.cancel)&&A(e.getReader)&&!P(e),D=e=>x(e)&&A(e.read)&&A(e.pipe)&&S(e.readable)&&!P(e),N=e=>x(e)&&A(e.clear)&&A(e.bytes)&&A(e.position)&&A(e.setPosition)&&A(e.capacity)&&A(e.getBufferIdentifier)&&A(e.createLong);function L(e){if(null===e)return"null";if(undefined===e)return"undefined";switch(typeof e){case"number":case"bigint":return`${e}`;case"string":return`"${e}"`}return"function"===typeof e[Symbol.toPrimitive]?e[Symbol.toPrimitive]("string"):ArrayBuffer.isView(e)?e instanceof b||e instanceof g?`[${[...e].map((e=>L(e)))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,((e,t)=>"bigint"===typeof t?`${t}`:t))}function F(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}Object.create;function B(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function j(e){return this instanceof j?(this.v=e,this):new j(e)}function z(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof j?Promise.resolve(n.value.v).then(l,c):u(o[0][2],n)}catch(r){u(o[0][3],r)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function U(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:j(e[r](t)),done:!1}:i?i(t):t}:i}}function V(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=B(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}Object.create;"function"===typeof SuppressedError&&SuppressedError;const $=new TextDecoder("utf-8"),W=e=>$.decode(e),H=new TextEncoder,Y=e=>H.encode(e),G="undefined"!==typeof SharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;function q(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.byteLength;const i=e.byteLength,o=new Uint8Array(e.buffer,e.byteOffset,i),a=new Uint8Array(t.buffer,t.byteOffset,Math.min(r,i));return o.set(a,n),e}function K(e,t){const n=function(e){const t=e[0]?[e[0]]:[];let n,r,i,o;for(let a,s,l=0,c=0,u=e.length;++l<u;)a=t[c],s=e[l],!a||!s||a.buffer!==s.buffer||s.byteOffset<a.byteOffset?s&&(t[++c]=s):(({byteOffset:n,byteLength:i}=a),({byteOffset:r,byteLength:o}=s),n+i<r||r+o<n?s&&(t[++c]=s):t[c]=new Uint8Array(a.buffer,n,r-n+o));return t}(e),r=n.reduce(((e,t)=>e+t.byteLength),0);let i,o,a,s=0,l=-1;const c=Math.min(t||Number.POSITIVE_INFINITY,r);for(const u=n.length;++l<u;){if(i=n[l],o=i.subarray(0,Math.min(i.length,c-s)),c<=s+o.length){o.length<i.length?n[l]=i.subarray(o.length):o.length===i.length&&l++,a?q(a,o,s):a=o;break}q(a||(a=new Uint8Array(c)),o,s),s+=o.length}return[a||new Uint8Array(0),n.slice(l),r-(a?a.byteLength:0)]}function Q(e,t){let n=E(t)?t.value:t;return n instanceof e?e===Uint8Array?new e(n.buffer,n.byteOffset,n.byteLength):n:n?("string"===typeof n&&(n=Y(n)),n instanceof ArrayBuffer||n instanceof G?new e(n):N(n)?Q(e,n.bytes()):ArrayBuffer.isView(n)?n.byteLength<=0?new e(0):new e(n.buffer,n.byteOffset,n.byteLength/e.BYTES_PER_ELEMENT):e.from(n)):new e(0)}const X=e=>Q(Int32Array,e),J=e=>Q(Uint8Array,e),Z=e=>(e.next(),e);function*ee(e,t){const n=function*(e){yield e},r="string"===typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof G?n(t):C(t)?t:n(t);return yield*Z(function*(t){let n=null;do{n=t.next(yield Q(e,n))}while(!n.done)}(r[Symbol.iterator]())),new e}function te(e,t){return z(this,arguments,(function*(){if(k(t))return yield j(yield j(yield*U(V(te(e,yield j(t))))));const n=function(e){return z(this,arguments,(function*(){yield yield j(yield j(e))}))},r="string"===typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof G?n(t):C(t)?function(e){return z(this,arguments,(function*(){yield j(yield*U(V(Z(function*(e){let t=null;do{t=e.next(yield null===t||void 0===t?void 0:t.value)}while(!t.done)}(e[Symbol.iterator]())))))}))}(t):T(t)?t:n(t);return yield j(yield*U(V(Z(function(t){return z(this,arguments,(function*(){let n=null;do{n=yield j(t.next(yield yield j(Q(e,n))))}while(!n.done)}))}(r[Symbol.asyncIterator]()))))),yield j(new e)}))}function ne(e,t,n){if(0!==e){n=n.slice(0,t+1);for(let r=-1;++r<=t;)n[r]+=e}return n}const re=Symbol.for("isArrowBigNum");function ie(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return 0===n.length?Object.setPrototypeOf(Q(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...n),this.constructor.prototype)}function oe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ie.apply(this,t)}function ae(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ie.apply(this,t)}function se(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ie.apply(this,t)}function le(e){const{buffer:t,byteOffset:n,length:r,signed:i}=e,o=new g(t,n,r),a=i&&o[o.length-1]&BigInt(1)<<BigInt(63);let s=a?BigInt(1):BigInt(0),l=BigInt(0);if(a){for(const e of o)s+=~e*(BigInt(1)<<BigInt(32)*l++);s*=BigInt(-1)}else for(const c of o)s+=c*(BigInt(1)<<BigInt(32)*l++);return s}let ce,ue;function de(e){let t="";const n=new Uint32Array(2);let r=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2);const i=new Uint32Array((r=new Uint16Array(r).reverse()).buffer);let o=-1;const a=r.length-1;do{for(n[0]=r[o=0];o<a;)r[o++]=n[1]=n[0]/10,n[0]=(n[0]-10*n[1]<<16)+r[o];r[o]=n[1]=n[0]/10,n[0]=n[0]-10*n[1],t=`${n[0]}${t}`}while(i[0]||i[1]||i[2]||i[3]);return null!==t&&void 0!==t?t:"0"}ie.prototype[re]=!0,ie.prototype.toJSON=function(){return`"${ce(this)}"`},ie.prototype.valueOf=function(){return le(this)},ie.prototype.toString=function(){return ce(this)},ie.prototype[Symbol.toPrimitive]=function(){switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default"){case"number":return le(this);case"string":return ce(this);case"default":return ue(this)}return ce(this)},Object.setPrototypeOf(oe.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(ae.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(se.prototype,Object.create(Uint32Array.prototype)),Object.assign(oe.prototype,ie.prototype,{constructor:oe,signed:!0,TypedArray:Int32Array,BigIntArray:b}),Object.assign(ae.prototype,ie.prototype,{constructor:ae,signed:!1,TypedArray:Uint32Array,BigIntArray:g}),Object.assign(se.prototype,ie.prototype,{constructor:se,signed:!0,TypedArray:Uint32Array,BigIntArray:g}),y?(ue=e=>8===e.byteLength?new e.BigIntArray(e.buffer,e.byteOffset,1)[0]:de(e),ce=e=>8===e.byteLength?`${new e.BigIntArray(e.buffer,e.byteOffset,1)[0]}`:de(e)):(ce=de,ue=ce);class fe{static new(e,t){switch(t){case!0:return new oe(e);case!1:return new ae(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case b:return new oe(e)}return 16===e.byteLength?new se(e):new ae(e)}static signed(e){return new oe(e)}static unsigned(e){return new ae(e)}static decimal(e){return new se(e)}constructor(e,t){return fe.new(e,t)}}var pe,he,me,ye,be,ve,ge,we,_e,Se,Ae,xe,ke,Ce,Te,Ie,Ee,Re,Oe,Pe;class Me{static isNull(e){return(null===e||void 0===e?void 0:e.typeId)===u.Null}static isInt(e){return(null===e||void 0===e?void 0:e.typeId)===u.Int}static isFloat(e){return(null===e||void 0===e?void 0:e.typeId)===u.Float}static isBinary(e){return(null===e||void 0===e?void 0:e.typeId)===u.Binary}static isUtf8(e){return(null===e||void 0===e?void 0:e.typeId)===u.Utf8}static isBool(e){return(null===e||void 0===e?void 0:e.typeId)===u.Bool}static isDecimal(e){return(null===e||void 0===e?void 0:e.typeId)===u.Decimal}static isDate(e){return(null===e||void 0===e?void 0:e.typeId)===u.Date}static isTime(e){return(null===e||void 0===e?void 0:e.typeId)===u.Time}static isTimestamp(e){return(null===e||void 0===e?void 0:e.typeId)===u.Timestamp}static isInterval(e){return(null===e||void 0===e?void 0:e.typeId)===u.Interval}static isList(e){return(null===e||void 0===e?void 0:e.typeId)===u.List}static isStruct(e){return(null===e||void 0===e?void 0:e.typeId)===u.Struct}static isUnion(e){return(null===e||void 0===e?void 0:e.typeId)===u.Union}static isFixedSizeBinary(e){return(null===e||void 0===e?void 0:e.typeId)===u.FixedSizeBinary}static isFixedSizeList(e){return(null===e||void 0===e?void 0:e.typeId)===u.FixedSizeList}static isMap(e){return(null===e||void 0===e?void 0:e.typeId)===u.Map}static isDictionary(e){return(null===e||void 0===e?void 0:e.typeId)===u.Dictionary}static isDenseUnion(e){return Me.isUnion(e)&&e.mode===i.Dense}static isSparseUnion(e){return Me.isUnion(e)&&e.mode===i.Sparse}get typeId(){return u.NONE}}pe=Symbol.toStringTag,Me[pe]=((Pe=Me.prototype).children=null,Pe.ArrayType=Array,Pe[Symbol.toStringTag]="DataType");class De extends Me{toString(){return"Null"}get typeId(){return u.Null}}he=Symbol.toStringTag,De[he]=(e=>e[Symbol.toStringTag]="Null")(De.prototype);class Ne extends Me{constructor(e,t){super(),this.isSigned=e,this.bitWidth=t}get typeId(){return u.Int}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?b:g}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}me=Symbol.toStringTag,Ne[me]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]="Int"))(Ne.prototype);class Le extends Ne{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}Object.defineProperty(class extends Ne{constructor(){super(!0,8)}get ArrayType(){return Int8Array}}.prototype,"ArrayType",{value:Int8Array}),Object.defineProperty(class extends Ne{constructor(){super(!0,16)}get ArrayType(){return Int16Array}}.prototype,"ArrayType",{value:Int16Array}),Object.defineProperty(Le.prototype,"ArrayType",{value:Int32Array}),Object.defineProperty(class extends Ne{constructor(){super(!0,64)}get ArrayType(){return b}}.prototype,"ArrayType",{value:b}),Object.defineProperty(class extends Ne{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}}.prototype,"ArrayType",{value:Uint8Array}),Object.defineProperty(class extends Ne{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}}.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(class extends Ne{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}}.prototype,"ArrayType",{value:Uint32Array}),Object.defineProperty(class extends Ne{constructor(){super(!1,64)}get ArrayType(){return g}}.prototype,"ArrayType",{value:g});class Fe extends Me{constructor(e){super(),this.precision=e}get typeId(){return u.Float}get ArrayType(){switch(this.precision){case o.HALF:return Uint16Array;case o.SINGLE:return Float32Array;case o.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}ye=Symbol.toStringTag,Fe[ye]=(e=>(e.precision=null,e[Symbol.toStringTag]="Float"))(Fe.prototype);Object.defineProperty(class extends Fe{constructor(){super(o.HALF)}}.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(class extends Fe{constructor(){super(o.SINGLE)}}.prototype,"ArrayType",{value:Float32Array}),Object.defineProperty(class extends Fe{constructor(){super(o.DOUBLE)}}.prototype,"ArrayType",{value:Float64Array});class Be extends Me{constructor(){super()}get typeId(){return u.Binary}toString(){return"Binary"}}be=Symbol.toStringTag,Be[be]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Binary"))(Be.prototype);class je extends Me{constructor(){super()}get typeId(){return u.Utf8}toString(){return"Utf8"}}ve=Symbol.toStringTag,je[ve]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Utf8"))(je.prototype);class ze extends Me{constructor(){super()}get typeId(){return u.Bool}toString(){return"Bool"}}ge=Symbol.toStringTag,ze[ge]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Bool"))(ze.prototype);class Ue extends Me{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:128;super(),this.scale=e,this.precision=t,this.bitWidth=n}get typeId(){return u.Decimal}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}we=Symbol.toStringTag,Ue[we]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]="Decimal"))(Ue.prototype);class Ve extends Me{constructor(e){super(),this.unit=e}get typeId(){return u.Date}toString(){return`Date${32*(this.unit+1)}<${a[this.unit]}>`}}_e=Symbol.toStringTag,Ve[_e]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Date"))(Ve.prototype);class $e extends Me{constructor(e,t){super(),this.unit=e,this.bitWidth=t}get typeId(){return u.Time}toString(){return`Time${this.bitWidth}<${s[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return b}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}Se=Symbol.toStringTag,$e[Se]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]="Time"))($e.prototype);class We extends Me{constructor(e,t){super(),this.unit=e,this.timezone=t}get typeId(){return u.Timestamp}toString(){return`Timestamp<${s[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}Ae=Symbol.toStringTag,We[Ae]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Timestamp"))(We.prototype);class He extends Me{constructor(e){super(),this.unit=e}get typeId(){return u.Interval}toString(){return`Interval<${l[this.unit]}>`}}xe=Symbol.toStringTag,He[xe]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Interval"))(He.prototype);class Ye extends Me{constructor(e){super(),this.children=[e]}get typeId(){return u.List}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}ke=Symbol.toStringTag,Ye[ke]=(e=>(e.children=null,e[Symbol.toStringTag]="List"))(Ye.prototype);class Ge extends Me{constructor(e){super(),this.children=e}get typeId(){return u.Struct}toString(){return`Struct<{${this.children.map((e=>`${e.name}:${e.type}`)).join(", ")}}>`}}Ce=Symbol.toStringTag,Ge[Ce]=(e=>(e.children=null,e[Symbol.toStringTag]="Struct"))(Ge.prototype);class qe extends Me{constructor(e,t,n){super(),this.mode=e,this.children=n,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce(((e,t,n)=>(e[t]=n)&&e||e),Object.create(null))}get typeId(){return u.Union}toString(){return`${this[Symbol.toStringTag]}<${this.children.map((e=>`${e.type}`)).join(" | ")}>`}}Te=Symbol.toStringTag,qe[Te]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]="Union"))(qe.prototype);class Ke extends Me{constructor(e){super(),this.byteWidth=e}get typeId(){return u.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}Ie=Symbol.toStringTag,Ke[Ie]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]="FixedSizeBinary"))(Ke.prototype);class Qe extends Me{constructor(e,t){super(),this.listSize=e,this.children=[t]}get typeId(){return u.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}Ee=Symbol.toStringTag,Qe[Ee]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]="FixedSizeList"))(Qe.prototype);class Xe extends Me{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super(),this.children=[e],this.keysSorted=t}get typeId(){return u.Map}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map((e=>`${e.name}:${e.type}`)).join(", ")}}>`}}Re=Symbol.toStringTag,Xe[Re]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]="Map_"))(Xe.prototype);const Je=(Ze=-1,()=>++Ze);var Ze;class et extends Me{constructor(e,t,n,r){super(),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=null==n?Je():"number"===typeof n?n:n.low}get typeId(){return u.Dictionary}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}function tt(e){const t=e;switch(e.typeId){case u.Decimal:return e.bitWidth/32;case u.Timestamp:return 2;case u.Date:case u.Interval:return 1+t.unit;case u.FixedSizeList:return t.listSize;case u.FixedSizeBinary:return t.byteWidth;default:return 1}}Oe=Symbol.toStringTag,et[Oe]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]="Dictionary"))(et.prototype);class nt{visitMany(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.map(((e,t)=>this.visit(e,...n.map((e=>e[t])))))}visit(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(e){return function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if("number"===typeof t)return rt(e,t,n);if("string"===typeof t&&t in u)return rt(e,u[t],n);if(t&&t instanceof Me)return rt(e,it(t),n);if((null===t||void 0===t?void 0:t.type)&&t.type instanceof Me)return rt(e,it(t.type),n);return rt(e,u.NONE,n)}(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1])}getVisitFnByTypeId(e){return rt(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1])}visitNull(e){return null}visitBool(e){return null}visitInt(e){return null}visitFloat(e){return null}visitUtf8(e){return null}visitBinary(e){return null}visitFixedSizeBinary(e){return null}visitDate(e){return null}visitTimestamp(e){return null}visitTime(e){return null}visitDecimal(e){return null}visitList(e){return null}visitStruct(e){return null}visitUnion(e){return null}visitDictionary(e){return null}visitInterval(e){return null}visitFixedSizeList(e){return null}visitMap(e){return null}}function rt(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=null;switch(t){case u.Null:r=e.visitNull;break;case u.Bool:r=e.visitBool;break;case u.Int:r=e.visitInt;break;case u.Int8:r=e.visitInt8||e.visitInt;break;case u.Int16:r=e.visitInt16||e.visitInt;break;case u.Int32:r=e.visitInt32||e.visitInt;break;case u.Int64:r=e.visitInt64||e.visitInt;break;case u.Uint8:r=e.visitUint8||e.visitInt;break;case u.Uint16:r=e.visitUint16||e.visitInt;break;case u.Uint32:r=e.visitUint32||e.visitInt;break;case u.Uint64:r=e.visitUint64||e.visitInt;break;case u.Float:r=e.visitFloat;break;case u.Float16:r=e.visitFloat16||e.visitFloat;break;case u.Float32:r=e.visitFloat32||e.visitFloat;break;case u.Float64:r=e.visitFloat64||e.visitFloat;break;case u.Utf8:r=e.visitUtf8;break;case u.Binary:r=e.visitBinary;break;case u.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case u.Date:r=e.visitDate;break;case u.DateDay:r=e.visitDateDay||e.visitDate;break;case u.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case u.Timestamp:r=e.visitTimestamp;break;case u.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case u.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case u.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case u.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case u.Time:r=e.visitTime;break;case u.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case u.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case u.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case u.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case u.Decimal:r=e.visitDecimal;break;case u.List:r=e.visitList;break;case u.Struct:r=e.visitStruct;break;case u.Union:r=e.visitUnion;break;case u.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case u.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case u.Dictionary:r=e.visitDictionary;break;case u.Interval:r=e.visitInterval;break;case u.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case u.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case u.FixedSizeList:r=e.visitFixedSizeList;break;case u.Map:r=e.visitMap}if("function"===typeof r)return r;if(!n)return()=>null;throw new Error(`Unrecognized type '${u[t]}'`)}function it(e){switch(e.typeId){case u.Null:return u.Null;case u.Int:{const{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?u.Int8:u.Uint8;case 16:return n?u.Int16:u.Uint16;case 32:return n?u.Int32:u.Uint32;case 64:return n?u.Int64:u.Uint64}return u.Int}case u.Float:switch(e.precision){case o.HALF:return u.Float16;case o.SINGLE:return u.Float32;case o.DOUBLE:return u.Float64}return u.Float;case u.Binary:return u.Binary;case u.Utf8:return u.Utf8;case u.Bool:return u.Bool;case u.Decimal:return u.Decimal;case u.Time:switch(e.unit){case s.SECOND:return u.TimeSecond;case s.MILLISECOND:return u.TimeMillisecond;case s.MICROSECOND:return u.TimeMicrosecond;case s.NANOSECOND:return u.TimeNanosecond}return u.Time;case u.Timestamp:switch(e.unit){case s.SECOND:return u.TimestampSecond;case s.MILLISECOND:return u.TimestampMillisecond;case s.MICROSECOND:return u.TimestampMicrosecond;case s.NANOSECOND:return u.TimestampNanosecond}return u.Timestamp;case u.Date:switch(e.unit){case a.DAY:return u.DateDay;case a.MILLISECOND:return u.DateMillisecond}return u.Date;case u.Interval:switch(e.unit){case l.DAY_TIME:return u.IntervalDayTime;case l.YEAR_MONTH:return u.IntervalYearMonth}return u.Interval;case u.Map:return u.Map;case u.List:return u.List;case u.Struct:return u.Struct;case u.Union:switch(e.mode){case i.Dense:return u.DenseUnion;case i.Sparse:return u.SparseUnion}return u.Union;case u.FixedSizeBinary:return u.FixedSizeBinary;case u.FixedSizeList:return u.FixedSizeList;case u.Dictionary:return u.Dictionary}throw new Error(`Unrecognized type '${u[e.typeId]}'`)}nt.prototype.visitInt8=null,nt.prototype.visitInt16=null,nt.prototype.visitInt32=null,nt.prototype.visitInt64=null,nt.prototype.visitUint8=null,nt.prototype.visitUint16=null,nt.prototype.visitUint32=null,nt.prototype.visitUint64=null,nt.prototype.visitFloat16=null,nt.prototype.visitFloat32=null,nt.prototype.visitFloat64=null,nt.prototype.visitDateDay=null,nt.prototype.visitDateMillisecond=null,nt.prototype.visitTimestampSecond=null,nt.prototype.visitTimestampMillisecond=null,nt.prototype.visitTimestampMicrosecond=null,nt.prototype.visitTimestampNanosecond=null,nt.prototype.visitTimeSecond=null,nt.prototype.visitTimeMillisecond=null,nt.prototype.visitTimeMicrosecond=null,nt.prototype.visitTimeNanosecond=null,nt.prototype.visitDenseUnion=null,nt.prototype.visitSparseUnion=null,nt.prototype.visitIntervalDayTime=null,nt.prototype.visitIntervalYearMonth=null;const ot=new Float64Array(1),at=new Uint32Array(ot.buffer);function st(e){const t=(31744&e)>>10,n=(1023&e)/1024,r=Math.pow(-1,(32768&e)>>15);switch(t){case 31:return r*(n?Number.NaN:1/0);case 0:return r*(n?6103515625e-14*n:0)}return r*Math.pow(2,t-15)*(1+n)}class lt extends nt{}function ct(e){return(t,n,r)=>{if(t.setValid(n,null!=r))return e(t,n,r)}}const ut=(e,t,n)=>{e[t]=Math.trunc(n%4294967296),e[t+1]=Math.trunc(n/4294967296)},dt=(e,t,n,r)=>{if(n+1<t.length){const{[n]:i,[n+1]:o}=t;e.set(r.subarray(0,o-i),i)}},ft=(e,t,n)=>{let{values:r}=e;r[t]=n},pt=(e,t,n)=>{let{values:r}=e;r[t]=n},ht=(e,t,n)=>{let{values:r}=e;r[t]=function(e){if(e!==e)return 32256;ot[0]=e;const t=(2147483648&at[1])>>16&65535;let n=2146435072&at[1],r=0;return n>=1089470464?at[0]>0?n=31744:(n=(2080374784&n)>>16,r=(1048575&at[1])>>10):n<=1056964608?(r=1048576+(1048575&at[1]),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=512+(1048575&at[1])>>10),t|n|65535&r}(n)},mt=(e,t,n)=>{let{values:r}=e;((e,t,n)=>{e[t]=Math.trunc(n/864e5)})(r,t,n.valueOf())},yt=(e,t,n)=>{let{values:r}=e;ut(r,2*t,n.valueOf())},bt=(e,t,n)=>{let{values:r}=e;return ut(r,2*t,n/1e3)},vt=(e,t,n)=>{let{values:r}=e;return ut(r,2*t,n)},gt=(e,t,n)=>{let{values:r}=e;return((e,t,n)=>{e[t]=Math.trunc(1e3*n%4294967296),e[t+1]=Math.trunc(1e3*n/4294967296)})(r,2*t,n)},wt=(e,t,n)=>{let{values:r}=e;return((e,t,n)=>{e[t]=Math.trunc(1e6*n%4294967296),e[t+1]=Math.trunc(1e6*n/4294967296)})(r,2*t,n)},_t=(e,t,n)=>{let{values:r}=e;r[t]=n},St=(e,t,n)=>{let{values:r}=e;r[t]=n},At=(e,t,n)=>{let{values:r}=e;r[t]=n},xt=(e,t,n)=>{let{values:r}=e;r[t]=n},kt=(e,t,n)=>{const r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];Et.visit(i,e.valueOffsets[t],n)},Ct=(e,t,n)=>{const r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];Et.visit(i,t,n)},Tt=(e,t,n)=>{let{values:r}=e;r.set(n.subarray(0,2),2*t)},It=(e,t,n)=>{let{values:r}=e;r[t]=12*n[0]+n[1]%12};lt.prototype.visitBool=ct(((e,t,n)=>{let{offset:r,values:i}=e;const o=r+t;n?i[o>>3]|=1<<o%8:i[o>>3]&=~(1<<o%8)})),lt.prototype.visitInt=ct(ft),lt.prototype.visitInt8=ct(ft),lt.prototype.visitInt16=ct(ft),lt.prototype.visitInt32=ct(ft),lt.prototype.visitInt64=ct(ft),lt.prototype.visitUint8=ct(ft),lt.prototype.visitUint16=ct(ft),lt.prototype.visitUint32=ct(ft),lt.prototype.visitUint64=ct(ft),lt.prototype.visitFloat=ct(((e,t,n)=>{switch(e.type.precision){case o.HALF:return ht(e,t,n);case o.SINGLE:case o.DOUBLE:return pt(e,t,n)}})),lt.prototype.visitFloat16=ct(ht),lt.prototype.visitFloat32=ct(pt),lt.prototype.visitFloat64=ct(pt),lt.prototype.visitUtf8=ct(((e,t,n)=>{let{values:r,valueOffsets:i}=e;dt(r,i,t,Y(n))})),lt.prototype.visitBinary=ct(((e,t,n)=>{let{values:r,valueOffsets:i}=e;return dt(r,i,t,n)})),lt.prototype.visitFixedSizeBinary=ct(((e,t,n)=>{let{stride:r,values:i}=e;i.set(n.subarray(0,r),r*t)})),lt.prototype.visitDate=ct(((e,t,n)=>{e.type.unit===a.DAY?mt(e,t,n):yt(e,t,n)})),lt.prototype.visitDateDay=ct(mt),lt.prototype.visitDateMillisecond=ct(yt),lt.prototype.visitTimestamp=ct(((e,t,n)=>{switch(e.type.unit){case s.SECOND:return bt(e,t,n);case s.MILLISECOND:return vt(e,t,n);case s.MICROSECOND:return gt(e,t,n);case s.NANOSECOND:return wt(e,t,n)}})),lt.prototype.visitTimestampSecond=ct(bt),lt.prototype.visitTimestampMillisecond=ct(vt),lt.prototype.visitTimestampMicrosecond=ct(gt),lt.prototype.visitTimestampNanosecond=ct(wt),lt.prototype.visitTime=ct(((e,t,n)=>{switch(e.type.unit){case s.SECOND:return _t(e,t,n);case s.MILLISECOND:return St(e,t,n);case s.MICROSECOND:return At(e,t,n);case s.NANOSECOND:return xt(e,t,n)}})),lt.prototype.visitTimeSecond=ct(_t),lt.prototype.visitTimeMillisecond=ct(St),lt.prototype.visitTimeMicrosecond=ct(At),lt.prototype.visitTimeNanosecond=ct(xt),lt.prototype.visitDecimal=ct(((e,t,n)=>{let{values:r,stride:i}=e;r.set(n.subarray(0,i),i*t)})),lt.prototype.visitList=ct(((e,t,n)=>{const r=e.children[0],i=e.valueOffsets,o=Et.getVisitFn(r);if(Array.isArray(n))for(let a=-1,s=i[t],l=i[t+1];s<l;)o(r,s++,n[++a]);else for(let a=-1,s=i[t],l=i[t+1];s<l;)o(r,s++,n.get(++a))})),lt.prototype.visitStruct=ct(((e,t,n)=>{const r=e.type.children.map((e=>Et.getVisitFn(e.type))),i=n instanceof Map?(o=t,a=n,(e,t,n,r)=>t&&e(t,o,a.get(n.name))):n instanceof Gn?((e,t)=>(n,r,i,o)=>r&&n(r,e,t.get(o)))(t,n):Array.isArray(n)?((e,t)=>(n,r,i,o)=>r&&n(r,e,t[o]))(t,n):((e,t)=>(n,r,i,o)=>r&&n(r,e,t[i.name]))(t,n);var o,a;e.type.children.forEach(((t,n)=>i(r[n],e.children[n],t,n)))})),lt.prototype.visitUnion=ct(((e,t,n)=>{e.type.mode===i.Dense?kt(e,t,n):Ct(e,t,n)})),lt.prototype.visitDenseUnion=ct(kt),lt.prototype.visitSparseUnion=ct(Ct),lt.prototype.visitDictionary=ct(((e,t,n)=>{var r;null===(r=e.dictionary)||void 0===r||r.set(e.values[t],n)})),lt.prototype.visitInterval=ct(((e,t,n)=>{e.type.unit===l.DAY_TIME?Tt(e,t,n):It(e,t,n)})),lt.prototype.visitIntervalDayTime=ct(Tt),lt.prototype.visitIntervalYearMonth=ct(It),lt.prototype.visitFixedSizeList=ct(((e,t,n)=>{const{stride:r}=e,i=e.children[0],o=Et.getVisitFn(i);if(Array.isArray(n))for(let a=-1,s=t*r;++a<r;)o(i,s+a,n[a]);else for(let a=-1,s=t*r;++a<r;)o(i,s+a,n.get(a))})),lt.prototype.visitMap=ct(((e,t,n)=>{const r=e.children[0],{valueOffsets:i}=e,o=Et.getVisitFn(r);let{[t]:a,[t+1]:s}=i;const l=n instanceof Map?n.entries():Object.entries(n);for(const c of l)if(o(r,a,c),++a>=s)break}));const Et=new lt,Rt=Symbol.for("parent"),Ot=Symbol.for("rowIndex");class Pt{constructor(e,t){return this[Rt]=e,this[Ot]=t,new Proxy(this,new Dt)}toArray(){return Object.values(this.toJSON())}toJSON(){const e=this[Ot],t=this[Rt],n=t.type.children,r={};for(let i=-1,o=n.length;++i<o;)r[n[i].name]=nn.visit(t.children[i],e);return r}toString(){return`{${[...this].map((e=>{let[t,n]=e;return`${L(t)}: ${L(n)}`})).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new Mt(this[Rt],this[Ot])}}class Mt{constructor(e,t){this.childIndex=0,this.children=e.children,this.rowIndex=t,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const e=this.childIndex;return e<this.numChildren?(this.childIndex=e+1,{done:!1,value:[this.childFields[e].name,nn.visit(this.children[e],this.rowIndex)]}):{done:!0,value:null}}}Object.defineProperties(Pt.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Rt]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Ot]:{writable:!0,enumerable:!1,configurable:!1,value:-1}});class Dt{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[Rt].type.children.map((e=>e.name))}has(e,t){return-1!==e[Rt].type.children.findIndex((e=>e.name===t))}getOwnPropertyDescriptor(e,t){if(-1!==e[Rt].type.children.findIndex((e=>e.name===t)))return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];const n=e[Rt].type.children.findIndex((e=>e.name===t));if(-1!==n){const r=nn.visit(e[Rt].children[n],e[Ot]);return Reflect.set(e,t,r),r}}set(e,t,n){const r=e[Rt].type.children.findIndex((e=>e.name===t));return-1!==r?(Et.visit(e[Rt].children[r],e[Ot],n),Reflect.set(e,t,n)):!(!Reflect.has(e,t)&&"symbol"!==typeof t)&&Reflect.set(e,t,n)}}class Nt extends nt{}function Lt(e){return(t,n)=>t.getValid(n)?e(t,n):null}const Ft=(e,t)=>4294967296*e[t+1]+(e[t]>>>0),Bt=e=>new Date(e),jt=(e,t,n)=>{if(n+1>=t.length)return null;const r=t[n],i=t[n+1];return e.subarray(r,i)},zt=(e,t)=>{let{values:n}=e;return((e,t)=>Bt(((e,t)=>864e5*e[t])(e,t)))(n,t)},Ut=(e,t)=>{let{values:n}=e;return((e,t)=>Bt(Ft(e,t)))(n,2*t)},Vt=(e,t)=>{let{stride:n,values:r}=e;return r[n*t]},$t=(e,t)=>{let{values:n}=e;return n[t]},Wt=(e,t)=>{let{values:n}=e;return 1e3*Ft(n,2*t)},Ht=(e,t)=>{let{values:n}=e;return Ft(n,2*t)},Yt=(e,t)=>{let{values:n}=e;return((e,t)=>e[t+1]/1e3*4294967296+(e[t]>>>0)/1e3)(n,2*t)},Gt=(e,t)=>{let{values:n}=e;return((e,t)=>e[t+1]/1e6*4294967296+(e[t]>>>0)/1e6)(n,2*t)},qt=(e,t)=>{let{values:n}=e;return n[t]},Kt=(e,t)=>{let{values:n}=e;return n[t]},Qt=(e,t)=>{let{values:n}=e;return n[t]},Xt=(e,t)=>{let{values:n}=e;return n[t]},Jt=(e,t)=>{const n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return nn.visit(r,e.valueOffsets[t])},Zt=(e,t)=>{const n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return nn.visit(r,t)},en=(e,t)=>{let{values:n}=e;return n.subarray(2*t,2*(t+1))},tn=(e,t)=>{let{values:n}=e;const r=n[t],i=new Int32Array(2);return i[0]=Math.trunc(r/12),i[1]=Math.trunc(r%12),i};Nt.prototype.visitNull=Lt(((e,t)=>null)),Nt.prototype.visitBool=Lt(((e,t)=>{let{offset:n,values:r}=e;const i=n+t;return 0!==(r[i>>3]&1<<i%8)})),Nt.prototype.visitInt=Lt(((e,t)=>{let{values:n}=e;return n[t]})),Nt.prototype.visitInt8=Lt(Vt),Nt.prototype.visitInt16=Lt(Vt),Nt.prototype.visitInt32=Lt(Vt),Nt.prototype.visitInt64=Lt($t),Nt.prototype.visitUint8=Lt(Vt),Nt.prototype.visitUint16=Lt(Vt),Nt.prototype.visitUint32=Lt(Vt),Nt.prototype.visitUint64=Lt($t),Nt.prototype.visitFloat=Lt(((e,t)=>{let{type:n,values:r}=e;return n.precision!==o.HALF?r[t]:st(r[t])})),Nt.prototype.visitFloat16=Lt(((e,t)=>{let{stride:n,values:r}=e;return st(r[n*t])})),Nt.prototype.visitFloat32=Lt(Vt),Nt.prototype.visitFloat64=Lt(Vt),Nt.prototype.visitUtf8=Lt(((e,t)=>{let{values:n,valueOffsets:r}=e;const i=jt(n,r,t);return null!==i?W(i):null})),Nt.prototype.visitBinary=Lt(((e,t)=>{let{values:n,valueOffsets:r}=e;return jt(n,r,t)})),Nt.prototype.visitFixedSizeBinary=Lt(((e,t)=>{let{stride:n,values:r}=e;return r.subarray(n*t,n*(t+1))})),Nt.prototype.visitDate=Lt(((e,t)=>e.type.unit===a.DAY?zt(e,t):Ut(e,t))),Nt.prototype.visitDateDay=Lt(zt),Nt.prototype.visitDateMillisecond=Lt(Ut),Nt.prototype.visitTimestamp=Lt(((e,t)=>{switch(e.type.unit){case s.SECOND:return Wt(e,t);case s.MILLISECOND:return Ht(e,t);case s.MICROSECOND:return Yt(e,t);case s.NANOSECOND:return Gt(e,t)}})),Nt.prototype.visitTimestampSecond=Lt(Wt),Nt.prototype.visitTimestampMillisecond=Lt(Ht),Nt.prototype.visitTimestampMicrosecond=Lt(Yt),Nt.prototype.visitTimestampNanosecond=Lt(Gt),Nt.prototype.visitTime=Lt(((e,t)=>{switch(e.type.unit){case s.SECOND:return qt(e,t);case s.MILLISECOND:return Kt(e,t);case s.MICROSECOND:return Qt(e,t);case s.NANOSECOND:return Xt(e,t)}})),Nt.prototype.visitTimeSecond=Lt(qt),Nt.prototype.visitTimeMillisecond=Lt(Kt),Nt.prototype.visitTimeMicrosecond=Lt(Qt),Nt.prototype.visitTimeNanosecond=Lt(Xt),Nt.prototype.visitDecimal=Lt(((e,t)=>{let{values:n,stride:r}=e;return fe.decimal(n.subarray(r*t,r*(t+1)))})),Nt.prototype.visitList=Lt(((e,t)=>{const{valueOffsets:n,stride:r,children:i}=e,{[t*r]:o,[t*r+1]:a}=n,s=i[0].slice(o,a-o);return new Gn([s])})),Nt.prototype.visitStruct=Lt(((e,t)=>new Pt(e,t))),Nt.prototype.visitUnion=Lt(((e,t)=>e.type.mode===i.Dense?Jt(e,t):Zt(e,t))),Nt.prototype.visitDenseUnion=Lt(Jt),Nt.prototype.visitSparseUnion=Lt(Zt),Nt.prototype.visitDictionary=Lt(((e,t)=>{var n;return null===(n=e.dictionary)||void 0===n?void 0:n.get(e.values[t])})),Nt.prototype.visitInterval=Lt(((e,t)=>e.type.unit===l.DAY_TIME?en(e,t):tn(e,t))),Nt.prototype.visitIntervalDayTime=Lt(en),Nt.prototype.visitIntervalYearMonth=Lt(tn),Nt.prototype.visitFixedSizeList=Lt(((e,t)=>{const{stride:n,children:r}=e,i=r[0].slice(t*n,n);return new Gn([i])})),Nt.prototype.visitMap=Lt(((e,t)=>{const{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:o}=n,a=r[0];return new an(a.slice(i,o-i))}));const nn=new Nt,rn=Symbol.for("keys"),on=Symbol.for("vals");class an{constructor(e){return this[rn]=new Gn([e.children[0]]).memoize(),this[on]=e.children[1],new Proxy(this,new ln)}[Symbol.iterator](){return new sn(this[rn],this[on])}get size(){return this[rn].length}toArray(){return Object.values(this.toJSON())}toJSON(){const e=this[rn],t=this[on],n={};for(let r=-1,i=e.length;++r<i;)n[e.get(r)]=nn.visit(t,r);return n}toString(){return`{${[...this].map((e=>{let[t,n]=e;return`${L(t)}: ${L(n)}`})).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class sn{constructor(e,t){this.keys=e,this.vals=t,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){const e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),nn.visit(this.vals,e)]})}}class ln{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[rn].toArray().map(String)}has(e,t){return e[rn].includes(t)}getOwnPropertyDescriptor(e,t){if(-1!==e[rn].indexOf(t))return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];const n=e[rn].indexOf(t);if(-1!==n){const r=nn.visit(Reflect.get(e,on),n);return Reflect.set(e,t,r),r}}set(e,t,n){const r=e[rn].indexOf(t);return-1!==r?(Et.visit(Reflect.get(e,on),r,n),Reflect.set(e,t,n)):!!Reflect.has(e,t)&&Reflect.set(e,t,n)}}let cn;function un(e,t,n,r){const{length:i=0}=e;let o="number"!==typeof t?0:t,a="number"!==typeof n?i:n;return o<0&&(o=(o%i+i)%i),a<0&&(a=(a%i+i)%i),a<o&&(cn=o,o=a,a=cn),a>i&&(a=i),r?r(e,o,a):[o,a]}Object.defineProperties(an.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[rn]:{writable:!0,enumerable:!1,configurable:!1,value:null},[on]:{writable:!0,enumerable:!1,configurable:!1,value:null}});const dn=e=>e!==e;function fn(e){if("object"!==typeof e||null===e)return dn(e)?dn:t=>t===e;if(e instanceof Date){const t=e.valueOf();return e=>e instanceof Date&&e.valueOf()===t}return ArrayBuffer.isView(e)?t=>!!t&&function(e,t){let n=0;const r=e.length;if(r!==t.length)return!1;if(r>0)do{if(e[n]!==t[n])return!1}while(++n<r);return!0}(e,t):e instanceof Map?function(e){let t=-1;const n=[];for(const r of e.values())n[++t]=fn(r);return pn(n)}(e):Array.isArray(e)?function(e){const t=[];for(let n=-1,r=e.length;++n<r;)t[n]=fn(e[n]);return pn(t)}(e):e instanceof Gn?function(e){const t=[];for(let n=-1,r=e.length;++n<r;)t[n]=fn(e.get(n));return pn(t)}(e):function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=Object.keys(e);if(!t&&0===n.length)return()=>!1;const r=[];for(let i=-1,o=n.length;++i<o;)r[i]=fn(e[n[i]]);return pn(r,n)}(e,!0)}function pn(e,t){return n=>{if(!n||"object"!==typeof n)return!1;switch(n.constructor){case Array:return function(e,t){const n=e.length;if(t.length!==n)return!1;for(let r=-1;++r<n;)if(!e[r](t[r]))return!1;return!0}(e,n);case Map:return hn(e,n,n.keys());case an:case Pt:case Object:case void 0:return hn(e,n,t||Object.keys(n))}return n instanceof Gn&&function(e,t){const n=e.length;if(t.length!==n)return!1;for(let r=-1;++r<n;)if(!e[r](t.get(r)))return!1;return!0}(e,n)}}function hn(e,t,n){const r=n[Symbol.iterator](),i=t instanceof Map?t.keys():Object.keys(t)[Symbol.iterator](),o=t instanceof Map?t.values():Object.values(t)[Symbol.iterator]();let a=0;const s=e.length;let l=o.next(),c=r.next(),u=i.next();for(;a<s&&!c.done&&!u.done&&!l.done&&(c.value===u.value&&e[a](l.value));++a,c=r.next(),u=i.next(),l=o.next());return!!(a===s&&c.done&&u.done&&l.done)||(r.return&&r.return(),i.return&&i.return(),o.return&&o.return(),!1)}class mn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;this.numChunks=e,this.getChunkIterator=t,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndex<this.numChunks;){const e=this.chunkIterator.next();if(!e.done)return e;++this.chunkIndex<this.numChunks&&(this.chunkIterator=this.getChunkIterator(this.chunkIndex))}return{done:!0,value:null}}[Symbol.iterator](){return this}}function yn(e){return e.reduce(((e,t)=>e+t.nullCount),0)}function bn(e){return e.reduce(((e,t,n)=>(e[n+1]=e[n]+t.length,e)),new Uint32Array(e.length+1))}function vn(e,t,n,r){const i=[];for(let o=-1,a=e.length;++o<a;){const a=e[o],s=t[o],{length:l}=a;if(s>=r)break;if(n>=s+l)continue;if(s>=n&&s+l<=r){i.push(a);continue}const c=Math.max(0,n-s),u=Math.min(r-s,l);i.push(a.slice(c,u-c))}return 0===i.length&&i.push(e[0].slice(0,0)),i}function gn(e,t,n,r){let i=0,o=0,a=t.length-1;do{if(i>=a-1)return n<t[a]?r(e,i,n-t[i]):null;o=i+Math.trunc(.5*(a-i)),n<t[o]?a=o:i=o}while(i<a)}function wn(e,t){return e.getValid(t)}function _n(e){function t(t,n,r){return e(t[n],r)}return function(e){return gn(this.data,this._offsets,e,t)}}function Sn(e){let t;function n(n,r,i){return e(n[r],i,t)}return function(e,r){const i=this.data;t=r;const o=gn(i,this._offsets,e,n);return t=void 0,o}}function An(e){let t;function n(n,r,i){let o=i,a=0,s=0;for(let l=r-1,c=n.length;++l<c;){const r=n[l];if(~(a=e(r,t,o)))return s+a;o=0,s+=r.length}return-1}return function(e,r){t=e;const i=this.data,o="number"!==typeof r?n(i,0,0):gn(i,this._offsets,r,n);return t=void 0,o}}function xn(e,t,n,r){return 0!==(n&1<<r)}function kn(e,t,n,r){return(n&1<<r)>>r}function Cn(e,t,n){const r=n.byteLength+7&-8;if(e>0||n.byteLength<r){const i=new Uint8Array(r);return i.set(e%8===0?n.subarray(e>>3):Tn(new In(n,e,t,null,xn)).subarray(0,r)),i}return n}function Tn(e){const t=[];let n=0,r=0,i=0;for(const a of e)a&&(i|=1<<r),8===++r&&(t[n++]=i,i=r=0);(0===n||r>0)&&(t[n++]=i);const o=new Uint8Array(t.length+7&-8);return o.set(t),o}class In{constructor(e,t,n,r,i){this.bytes=e,this.length=n,this.context=r,this.get=i,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index<this.length?(8===this.bit&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}}function En(e,t,n){if(n-t<=0)return 0;if(n-t<8){let r=0;for(const i of new In(e,t,n-t,e,kn))r+=i;return r}const r=n>>3<<3,i=t+(t%8===0?0:8-t%8);return En(e,t,i)+En(e,r,n)+function(e,t,n){let r=0,i=Math.trunc(t);const o=new DataView(e.buffer,e.byteOffset,e.byteLength),a=void 0===n?e.byteLength:i+n;for(;a-i>=4;)r+=Rn(o.getUint32(i)),i+=4;for(;a-i>=2;)r+=Rn(o.getUint16(i)),i+=2;for(;a-i>=1;)r+=Rn(o.getUint8(i)),i+=1;return r}(e,i>>3,r-i>>3)}function Rn(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(858993459&t)+(t>>>2&858993459),16843009*(t+(t>>>4)&252645135)>>>24}class On extends nt{}function Pn(e,t,n){if(void 0===t)return-1;if(null===t)return function(e,t){const{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(const i of new In(n,e.offset+(t||0),e.length,n,xn)){if(!i)return r;++r}return-1}(e,n);const r=nn.getVisitFn(e),i=fn(t);for(let o=(n||0)-1,a=e.length;++o<a;)if(i(r(e,o)))return o;return-1}function Mn(e,t,n){const r=nn.getVisitFn(e),i=fn(t);for(let o=(n||0)-1,a=e.length;++o<a;)if(i(r(e,o)))return o;return-1}On.prototype.visitNull=function(e,t){return null===t&&e.length>0?0:-1},On.prototype.visitBool=Pn,On.prototype.visitInt=Pn,On.prototype.visitInt8=Pn,On.prototype.visitInt16=Pn,On.prototype.visitInt32=Pn,On.prototype.visitInt64=Pn,On.prototype.visitUint8=Pn,On.prototype.visitUint16=Pn,On.prototype.visitUint32=Pn,On.prototype.visitUint64=Pn,On.prototype.visitFloat=Pn,On.prototype.visitFloat16=Pn,On.prototype.visitFloat32=Pn,On.prototype.visitFloat64=Pn,On.prototype.visitUtf8=Pn,On.prototype.visitBinary=Pn,On.prototype.visitFixedSizeBinary=Pn,On.prototype.visitDate=Pn,On.prototype.visitDateDay=Pn,On.prototype.visitDateMillisecond=Pn,On.prototype.visitTimestamp=Pn,On.prototype.visitTimestampSecond=Pn,On.prototype.visitTimestampMillisecond=Pn,On.prototype.visitTimestampMicrosecond=Pn,On.prototype.visitTimestampNanosecond=Pn,On.prototype.visitTime=Pn,On.prototype.visitTimeSecond=Pn,On.prototype.visitTimeMillisecond=Pn,On.prototype.visitTimeMicrosecond=Pn,On.prototype.visitTimeNanosecond=Pn,On.prototype.visitDecimal=Pn,On.prototype.visitList=Pn,On.prototype.visitStruct=Pn,On.prototype.visitUnion=Pn,On.prototype.visitDenseUnion=Mn,On.prototype.visitSparseUnion=Mn,On.prototype.visitDictionary=Pn,On.prototype.visitInterval=Pn,On.prototype.visitIntervalDayTime=Pn,On.prototype.visitIntervalYearMonth=Pn,On.prototype.visitFixedSizeList=Pn,On.prototype.visitMap=Pn;const Dn=new On;class Nn extends nt{}function Ln(e){const{type:t}=e;if(0===e.nullCount&&1===e.stride&&(t.typeId===u.Timestamp||t instanceof Ne&&64!==t.bitWidth||t instanceof $e&&64!==t.bitWidth||t instanceof Fe&&t.precision!==o.HALF))return new mn(e.data.length,(t=>{const n=e.data[t];return n.values.subarray(0,n.length)[Symbol.iterator]()}));let n=0;return new mn(e.data.length,(t=>{const r=e.data[t].length,i=e.slice(n,n+r);return n+=r,new Fn(i)}))}class Fn{constructor(e){this.vector=e,this.index=0}next(){return this.index<this.vector.length?{value:this.vector.get(this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}}Nn.prototype.visitNull=Ln,Nn.prototype.visitBool=Ln,Nn.prototype.visitInt=Ln,Nn.prototype.visitInt8=Ln,Nn.prototype.visitInt16=Ln,Nn.prototype.visitInt32=Ln,Nn.prototype.visitInt64=Ln,Nn.prototype.visitUint8=Ln,Nn.prototype.visitUint16=Ln,Nn.prototype.visitUint32=Ln,Nn.prototype.visitUint64=Ln,Nn.prototype.visitFloat=Ln,Nn.prototype.visitFloat16=Ln,Nn.prototype.visitFloat32=Ln,Nn.prototype.visitFloat64=Ln,Nn.prototype.visitUtf8=Ln,Nn.prototype.visitBinary=Ln,Nn.prototype.visitFixedSizeBinary=Ln,Nn.prototype.visitDate=Ln,Nn.prototype.visitDateDay=Ln,Nn.prototype.visitDateMillisecond=Ln,Nn.prototype.visitTimestamp=Ln,Nn.prototype.visitTimestampSecond=Ln,Nn.prototype.visitTimestampMillisecond=Ln,Nn.prototype.visitTimestampMicrosecond=Ln,Nn.prototype.visitTimestampNanosecond=Ln,Nn.prototype.visitTime=Ln,Nn.prototype.visitTimeSecond=Ln,Nn.prototype.visitTimeMillisecond=Ln,Nn.prototype.visitTimeMicrosecond=Ln,Nn.prototype.visitTimeNanosecond=Ln,Nn.prototype.visitDecimal=Ln,Nn.prototype.visitList=Ln,Nn.prototype.visitStruct=Ln,Nn.prototype.visitUnion=Ln,Nn.prototype.visitDenseUnion=Ln,Nn.prototype.visitSparseUnion=Ln,Nn.prototype.visitDictionary=Ln,Nn.prototype.visitInterval=Ln,Nn.prototype.visitIntervalDayTime=Ln,Nn.prototype.visitIntervalYearMonth=Ln,Nn.prototype.visitFixedSizeList=Ln,Nn.prototype.visitMap=Ln;const Bn=new Nn,jn=(e,t)=>e+t;class zn extends nt{visitNull(e,t){return 0}visitInt(e,t){return e.type.bitWidth/8}visitFloat(e,t){return e.type.ArrayType.BYTES_PER_ELEMENT}visitBool(e,t){return 1/8}visitDecimal(e,t){return e.type.bitWidth/8}visitDate(e,t){return 4*(e.type.unit+1)}visitTime(e,t){return e.type.bitWidth/8}visitTimestamp(e,t){return e.type.unit===s.SECOND?4:8}visitInterval(e,t){return 4*(e.type.unit+1)}visitStruct(e,t){return e.children.reduce(((e,n)=>e+$n.visit(n,t)),0)}visitFixedSizeBinary(e,t){return e.type.byteWidth}visitMap(e,t){return 8+e.children.reduce(((e,n)=>e+$n.visit(n,t)),0)}visitDictionary(e,t){var n;return e.type.indices.bitWidth/8+((null===(n=e.dictionary)||void 0===n?void 0:n.getByteLength(e.values[t]))||0)}}const Un=(e,t)=>{let{type:n,children:r,typeIds:i,valueOffsets:o}=e;const a=n.typeIdToChildIndex[i[t]];return 8+$n.visit(r[a],o[t])},Vn=(e,t)=>{let{children:n}=e;return 4+$n.visitMany(n,n.map((()=>t))).reduce(jn,0)};zn.prototype.visitUtf8=(e,t)=>{let{valueOffsets:n}=e;return n[t+1]-n[t]+8},zn.prototype.visitBinary=(e,t)=>{let{valueOffsets:n}=e;return n[t+1]-n[t]+8},zn.prototype.visitList=(e,t)=>{let{valueOffsets:n,stride:r,children:i}=e;const o=i[0],{[t*r]:a}=n,{[t*r+1]:s}=n,l=$n.getVisitFn(o.type),c=o.slice(a,s-a);let u=8;for(let d=-1,f=s-a;++d<f;)u+=l(c,d);return u},zn.prototype.visitFixedSizeList=(e,t)=>{let{stride:n,children:r}=e;const i=r[0],o=i.slice(t*n,n),a=$n.getVisitFn(i.type);let s=0;for(let l=-1,c=o.length;++l<c;)s+=a(o,l);return s},zn.prototype.visitUnion=(e,t)=>e.type.mode===i.Dense?Un(e,t):Vn(e,t),zn.prototype.visitDenseUnion=Un,zn.prototype.visitSparseUnion=Vn;const $n=new zn;var Wn;const Hn={},Yn={};class Gn{constructor(e){var t,n,r;const i=e[0]instanceof Gn?e.flatMap((e=>e.data)):e;if(0===i.length||i.some((e=>!(e instanceof Kn))))throw new TypeError("Vector constructor expects an Array of Data instances.");const o=null===(t=i[0])||void 0===t?void 0:t.type;switch(i.length){case 0:this._offsets=[0];break;case 1:{const{get:e,set:t,indexOf:n,byteLength:r}=Hn[o.typeId],a=i[0];this.isValid=e=>wn(a,e),this.get=t=>e(a,t),this.set=(e,n)=>t(a,e,n),this.indexOf=e=>n(a,e),this.getByteLength=e=>r(a,e),this._offsets=[0,a.length];break}default:Object.setPrototypeOf(this,Yn[o.typeId]),this._offsets=bn(i)}this.data=i,this.type=o,this.stride=tt(o),this.numChildren=null!==(r=null===(n=o.children)||void 0===n?void 0:n.length)&&void 0!==r?r:0,this.length=this._offsets[this._offsets.length-1]}get byteLength(){return-1===this._byteLength&&(this._byteLength=this.data.reduce(((e,t)=>e+t.byteLength),0)),this._byteLength}get nullCount(){return-1===this._nullCount&&(this._nullCount=yn(this.data)),this._nullCount}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${u[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>0}getByteLength(e){return 0}[Symbol.iterator](){return Bn.visit(this)}concat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Gn(this.data.concat(t.flatMap((e=>e.data)).flat(Number.POSITIVE_INFINITY)))}slice(e,t){return new Gn(un(this,e,t,((e,t,n)=>{let{data:r,_offsets:i}=e;return vn(r,i,t,n)})))}toJSON(){return[...this]}toArray(){const{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case u.Int:case u.Float:case u.Decimal:case u.Time:case u.Timestamp:switch(t.length){case 0:return new i;case 1:return t[0].values.subarray(0,n*r);default:return t.reduce(((e,t)=>{let{values:n,length:i}=t;return e.array.set(n.subarray(0,i*r),e.offset),e.offset+=i*r,e}),{array:new i(n*r),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(e){var t;return this.getChildAt(null===(t=this.type.children)||void 0===t?void 0:t.findIndex((t=>t.name===e)))}getChildAt(e){return e>-1&&e<this.numChildren?new Gn(this.data.map((t=>{let{children:n}=t;return n[e]}))):null}get isMemoized(){return!!Me.isDictionary(this.type)&&this.data[0].dictionary.isMemoized}memoize(){if(Me.isDictionary(this.type)){const e=new qn(this.data[0].dictionary),t=this.data.map((t=>{const n=t.clone();return n.dictionary=e,n}));return new Gn(t)}return new qn(this)}unmemoize(){if(Me.isDictionary(this.type)&&this.isMemoized){const e=this.data[0].dictionary.unmemoize(),t=this.data.map((t=>{const n=t.clone();return n.dictionary=e,n}));return new Gn(t)}return this}}Wn=Symbol.toStringTag,Gn[Wn]=(e=>{e.type=Me.prototype,e.data=[],e.length=0,e.stride=1,e.numChildren=0,e._nullCount=-1,e._byteLength=-1,e._offsets=new Uint32Array([0]),e[Symbol.isConcatSpreadable]=!0;const t=Object.keys(u).map((e=>u[e])).filter((e=>"number"===typeof e&&e!==u.NONE));for(const n of t){const t=nn.getVisitFnByTypeId(n),r=Et.getVisitFnByTypeId(n),i=Dn.getVisitFnByTypeId(n),o=$n.getVisitFnByTypeId(n);Hn[n]={get:t,set:r,indexOf:i,byteLength:o},Yn[n]=Object.create(e,{isValid:{value:_n(wn)},get:{value:_n(nn.getVisitFnByTypeId(n))},set:{value:Sn(Et.getVisitFnByTypeId(n))},indexOf:{value:An(Dn.getVisitFnByTypeId(n))},getByteLength:{value:_n($n.getVisitFnByTypeId(n))}})}return"Vector"})(Gn.prototype);class qn extends Gn{constructor(e){super(e.data);const t=this.get,n=this.set,r=this.slice,i=new Array(this.length);Object.defineProperty(this,"get",{value(e){const n=i[e];if(void 0!==n)return n;const r=t.call(this,e);return i[e]=r,r}}),Object.defineProperty(this,"set",{value(e,t){n.call(this,e,t),i[e]=t}}),Object.defineProperty(this,"slice",{value:(e,t)=>new qn(r.call(this,e,t))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new Gn(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}class Kn{constructor(e,t,n,r,i){let o,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],s=arguments.length>6?arguments[6]:void 0;this.type=e,this.children=a,this.dictionary=s,this.offset=Math.floor(Math.max(t||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(r||0,-1)),i instanceof Kn?(this.stride=i.stride,this.values=i.values,this.typeIds=i.typeIds,this.nullBitmap=i.nullBitmap,this.valueOffsets=i.valueOffsets):(this.stride=tt(e),i&&((o=i[0])&&(this.valueOffsets=o),(o=i[1])&&(this.values=o),(o=i[2])&&(this.nullBitmap=o),(o=i[3])&&(this.typeIds=o))),this.nullable=0!==this._nullCount&&this.nullBitmap&&this.nullBitmap.byteLength>0}get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get byteLength(){let e=0;const{valueOffsets:t,values:n,nullBitmap:r,typeIds:i}=this;return t&&(e+=t.byteLength),n&&(e+=n.byteLength),r&&(e+=r.byteLength),i&&(e+=i.byteLength),this.children.reduce(((e,t)=>e+t.byteLength),e)}get nullCount(){let e,t=this._nullCount;return t<=-1&&(e=this.nullBitmap)&&(this._nullCount=t=this.length-En(e,this.offset,this.offset+this.length)),t}getValid(e){if(this.nullable&&this.nullCount>0){const t=this.offset+e;return 0!==(this.nullBitmap[t>>3]&1<<t%8)}return!0}setValid(e,t){if(!this.nullable)return t;if(!this.nullBitmap||this.nullBitmap.byteLength<=e>>3){const{nullBitmap:e}=this._changeLengthAndBackfillNullBitmap(this.length);Object.assign(this,{nullBitmap:e,_nullCount:0})}const{nullBitmap:n,offset:r}=this,i=r+e>>3,o=(r+e)%8,a=n[i]>>o&1;return t?0===a&&(n[i]|=1<<o,this._nullCount=this.nullCount+1):1===a&&(n[i]&=~(1<<o),this._nullCount=this.nullCount-1),t}clone(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.type,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.offset,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.length,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this._nullCount,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:this.children;return new Kn(e,t,n,r,i,o,this.dictionary)}slice(e,t){const{stride:n,typeId:r,children:i}=this,o=+(0===this._nullCount)-1,a=16===r?n:1,s=this._sliceBuffers(e,t,n,r);return this.clone(this.type,this.offset+e,t,o,s,0===i.length||this.valueOffsets?i:this._sliceChildren(i,a*e,a*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===u.Null)return this.clone(this.type,0,e,0);const{length:t,nullCount:n}=this,r=new Uint8Array((e+63&-64)>>3).fill(255,0,t>>3);r[t>>3]=(1<<t-(-8&t))-1,n>0&&r.set(Cn(this.offset,t,this.nullBitmap),0);const i=this.buffers;return i[d.VALIDITY]=r,this.clone(this.type,0,e,n+(e-t),i)}_sliceBuffers(e,t,n,r){let i;const{buffers:o}=this;return(i=o[d.TYPE])&&(o[d.TYPE]=i.subarray(e,e+t)),(i=o[d.OFFSET])&&(o[d.OFFSET]=i.subarray(e,e+t+1))||(i=o[d.DATA])&&(o[d.DATA]=6===r?i:i.subarray(n*e,n*(e+t))),o}_sliceChildren(e,t,n){return e.map((e=>e.slice(t,n)))}}Kn.prototype.children=Object.freeze([]);class Qn extends nt{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){const{type:t,offset:n=0,length:r=0}=e;return new Kn(t,n,r,0)}visitBool(e){const{type:t,offset:n=0}=e,r=J(e.nullBitmap),i=Q(t.ArrayType,e.data),{length:o=i.length>>3,nullCount:a=(e.nullBitmap?-1:0)}=e;return new Kn(t,n,o,a,[void 0,i,r])}visitInt(e){const{type:t,offset:n=0}=e,r=J(e.nullBitmap),i=Q(t.ArrayType,e.data),{length:o=i.length,nullCount:a=(e.nullBitmap?-1:0)}=e;return new Kn(t,n,o,a,[void 0,i,r])}visitFloat(e){const{type:t,offset:n=0}=e,r=J(e.nullBitmap),i=Q(t.ArrayType,e.data),{length:o=i.length,nullCount:a=(e.nullBitmap?-1:0)}=e;return new Kn(t,n,o,a,[void 0,i,r])}visitUtf8(e){const{type:t,offset:n=0}=e,r=J(e.data),i=J(e.nullBitmap),o=X(e.valueOffsets),{length:a=o.length-1,nullCount:s=(e.nullBitmap?-1:0)}=e;return new Kn(t,n,a,s,[o,r,i])}visitBinary(e){const{type:t,offset:n=0}=e,r=J(e.data),i=J(e.nullBitmap),o=X(e.valueOffsets),{length:a=o.length-1,nullCount:s=(e.nullBitmap?-1:0)}=e;return new Kn(t,n,a,s,[o,r,i])}visitFixedSizeBinary(e){const{type:t,offset:n=0}=e,r=J(e.nullBitmap),i=Q(t.ArrayType,e.data),{length:o=i.length/tt(t),nullCount:a=(e.nullBitmap?-1:0)}=e;return new Kn(t,n,o,a,[void 0,i,r])}visitDate(e){const{type:t,offset:n=0}=e,r=J(e.nullBitmap),i=Q(t.ArrayType,e.data),{length:o=i.length/tt(t),nullCount:a=(e.nullBitmap?-1:0)}=e;return new Kn(t,n,o,a,[void 0,i,r])}visitTimestamp(e){const{type:t,offset:n=0}=e,r=J(e.nullBitmap),i=Q(t.ArrayType,e.data),{length:o=i.length/tt(t),nullCount:a=(e.nullBitmap?-1:0)}=e;return new Kn(t,n,o,a,[void 0,i,r])}visitTime(e){const{type:t,offset:n=0}=e,r=J(e.nullBitmap),i=Q(t.ArrayType,e.data),{length:o=i.length/tt(t),nullCount:a=(e.nullBitmap?-1:0)}=e;return new Kn(t,n,o,a,[void 0,i,r])}visitDecimal(e){const{type:t,offset:n=0}=e,r=J(e.nullBitmap),i=Q(t.ArrayType,e.data),{length:o=i.length/tt(t),nullCount:a=(e.nullBitmap?-1:0)}=e;return new Kn(t,n,o,a,[void 0,i,r])}visitList(e){const{type:t,offset:n=0,child:r}=e,i=J(e.nullBitmap),o=X(e.valueOffsets),{length:a=o.length-1,nullCount:s=(e.nullBitmap?-1:0)}=e;return new Kn(t,n,a,s,[o,void 0,i],[r])}visitStruct(e){const{type:t,offset:n=0,children:r=[]}=e,i=J(e.nullBitmap),{length:o=r.reduce(((e,t)=>{let{length:n}=t;return Math.max(e,n)}),0),nullCount:a=(e.nullBitmap?-1:0)}=e;return new Kn(t,n,o,a,[void 0,void 0,i],r)}visitUnion(e){const{type:t,offset:n=0,children:r=[]}=e,i=J(e.nullBitmap),o=Q(t.ArrayType,e.typeIds),{length:a=o.length,nullCount:s=(e.nullBitmap?-1:0)}=e;if(Me.isSparseUnion(t))return new Kn(t,n,a,s,[void 0,void 0,i,o],r);const l=X(e.valueOffsets);return new Kn(t,n,a,s,[l,void 0,i,o],r)}visitDictionary(e){const{type:t,offset:n=0}=e,r=J(e.nullBitmap),i=Q(t.indices.ArrayType,e.data),{dictionary:o=new Gn([(new Qn).visit({type:t.dictionary})])}=e,{length:a=i.length,nullCount:s=(e.nullBitmap?-1:0)}=e;return new Kn(t,n,a,s,[void 0,i,r],[],o)}visitInterval(e){const{type:t,offset:n=0}=e,r=J(e.nullBitmap),i=Q(t.ArrayType,e.data),{length:o=i.length/tt(t),nullCount:a=(e.nullBitmap?-1:0)}=e;return new Kn(t,n,o,a,[void 0,i,r])}visitFixedSizeList(e){const{type:t,offset:n=0,child:r=(new Qn).visit({type:t.valueType})}=e,i=J(e.nullBitmap),{length:o=r.length/tt(t),nullCount:a=(e.nullBitmap?-1:0)}=e;return new Kn(t,n,o,a,[void 0,void 0,i],[r])}visitMap(e){const{type:t,offset:n=0,child:r=(new Qn).visit({type:t.childType})}=e,i=J(e.nullBitmap),o=X(e.valueOffsets),{length:a=o.length-1,nullCount:s=(e.nullBitmap?-1:0)}=e;return new Kn(t,n,a,s,[o,void 0,i],[r])}}function Xn(e){return(new Qn).visit(e)}class Jn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;this.fields=e||[],this.metadata=t||new Map,n||(n=tr(e)),this.dictionaries=n}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map((e=>e.name))}toString(){return`Schema<{ ${this.fields.map(((e,t)=>`${t}: ${e}`)).join(", ")} }>`}select(e){const t=new Set(e),n=this.fields.filter((e=>t.has(e.name)));return new Jn(n,this.metadata)}selectAt(e){const t=e.map((e=>this.fields[e])).filter(Boolean);return new Jn(t,this.metadata)}assign(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0]instanceof Jn?t[0]:Array.isArray(t[0])?new Jn(t[0]):new Jn(t),i=[...this.fields],o=er(er(new Map,this.metadata),r.metadata),a=r.fields.filter((e=>{const t=i.findIndex((t=>t.name===e.name));return!~t||(i[t]=e.clone({metadata:er(er(new Map,i[t].metadata),e.metadata)}))&&!1})),s=tr(a,new Map);return new Jn([...i,...a],o,new Map([...this.dictionaries,...s]))}}Jn.prototype.fields=null,Jn.prototype.metadata=null,Jn.prototype.dictionaries=null;class Zn{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;this.name=e,this.type=t,this.nullable=n,this.metadata=r||new Map}static new(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let[r,i,o,a]=t;return t[0]&&"object"===typeof t[0]&&(({name:r}=t[0]),void 0===i&&(i=t[0].type),void 0===o&&(o=t[0].nullable),void 0===a&&(a=t[0].metadata)),new Zn(`${r}`,i,o,a)}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let[r,i,o,a]=t;return t[0]&&"object"===typeof t[0]?({name:r=this.name,type:i=this.type,nullable:o=this.nullable,metadata:a=this.metadata}=t[0]):[r=this.name,i=this.type,o=this.nullable,a=this.metadata]=t,Zn.new(r,i,o,a)}}function er(e,t){return new Map([...e||new Map,...t||new Map])}function tr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map;for(let n=-1,r=e.length;++n<r;){const r=e[n].type;if(Me.isDictionary(r))if(t.has(r.id)){if(t.get(r.id)!==r.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}else t.set(r.id,r.dictionary);r.children&&r.children.length>0&&tr(r.children,t)}return t}Zn.prototype.type=null,Zn.prototype.name=null,Zn.prototype.nullable=null,Zn.prototype.metadata=null;class nr extends nt{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every(((e,n)=>this.compareFields(e,t[n])))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}}function rr(e,t){return t instanceof e.constructor}function ir(e,t){return e===t||rr(e,t)}function or(e,t){return e===t||rr(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function ar(e,t){return e===t||rr(e,t)&&e.precision===t.precision}function sr(e,t){return e===t||rr(e,t)&&e.unit===t.unit}function lr(e,t){return e===t||rr(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function cr(e,t){return e===t||rr(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function ur(e,t){return e===t||rr(e,t)&&e.mode===t.mode&&e.typeIds.every(((e,n)=>e===t.typeIds[n]))&&fr.compareManyFields(e.children,t.children)}function dr(e,t){return e===t||rr(e,t)&&e.unit===t.unit}nr.prototype.visitNull=ir,nr.prototype.visitBool=ir,nr.prototype.visitInt=or,nr.prototype.visitInt8=or,nr.prototype.visitInt16=or,nr.prototype.visitInt32=or,nr.prototype.visitInt64=or,nr.prototype.visitUint8=or,nr.prototype.visitUint16=or,nr.prototype.visitUint32=or,nr.prototype.visitUint64=or,nr.prototype.visitFloat=ar,nr.prototype.visitFloat16=ar,nr.prototype.visitFloat32=ar,nr.prototype.visitFloat64=ar,nr.prototype.visitUtf8=ir,nr.prototype.visitBinary=ir,nr.prototype.visitFixedSizeBinary=function(e,t){return e===t||rr(e,t)&&e.byteWidth===t.byteWidth},nr.prototype.visitDate=sr,nr.prototype.visitDateDay=sr,nr.prototype.visitDateMillisecond=sr,nr.prototype.visitTimestamp=lr,nr.prototype.visitTimestampSecond=lr,nr.prototype.visitTimestampMillisecond=lr,nr.prototype.visitTimestampMicrosecond=lr,nr.prototype.visitTimestampNanosecond=lr,nr.prototype.visitTime=cr,nr.prototype.visitTimeSecond=cr,nr.prototype.visitTimeMillisecond=cr,nr.prototype.visitTimeMicrosecond=cr,nr.prototype.visitTimeNanosecond=cr,nr.prototype.visitDecimal=ir,nr.prototype.visitList=function(e,t){return e===t||rr(e,t)&&e.children.length===t.children.length&&fr.compareManyFields(e.children,t.children)},nr.prototype.visitStruct=function(e,t){return e===t||rr(e,t)&&e.children.length===t.children.length&&fr.compareManyFields(e.children,t.children)},nr.prototype.visitUnion=ur,nr.prototype.visitDenseUnion=ur,nr.prototype.visitSparseUnion=ur,nr.prototype.visitDictionary=function(e,t){return e===t||rr(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&fr.visit(e.indices,t.indices)&&fr.visit(e.dictionary,t.dictionary)},nr.prototype.visitInterval=dr,nr.prototype.visitIntervalDayTime=dr,nr.prototype.visitIntervalYearMonth=dr,nr.prototype.visitFixedSizeList=function(e,t){return e===t||rr(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&fr.compareManyFields(e.children,t.children)},nr.prototype.visitMap=function(e,t){return e===t||rr(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&fr.compareManyFields(e.children,t.children)};const fr=new nr;function pr(e,t){return fr.compareSchemas(e,t)}var hr,mr;class yr{constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];switch(t.length){case 2:if([this.schema]=t,!(this.schema instanceof Jn))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=Xn({nullCount:0,type:new Ge(this.schema.fields),children:this.schema.fields.map((e=>Xn({type:e.type,nullCount:0})))})]=t,!(this.data instanceof Kn))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=br(this.schema,this.data.children);break;case 1:{const[e]=t,{fields:n,children:r,length:i}=Object.keys(e).reduce(((t,n,r)=>(t.children[r]=e[n],t.length=Math.max(t.length,e[n].length),t.fields[r]=Zn.new({name:n,type:e[n].type,nullable:!0}),t)),{length:0,fields:new Array,children:new Array}),o=new Jn(n),a=Xn({type:new Ge(n),length:i,children:r,nullCount:0});[this.schema,this.data]=br(o,a.children,i);break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=vr(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(e){return this.data.getValid(e)}get(e){return nn.visit(this.data,e)}set(e,t){return Et.visit(this.data,e,t)}indexOf(e,t){return Dn.visit(this.data,e,t)}getByteLength(e){return $n.visit(this.data,e)}[Symbol.iterator](){return Bn.visit(new Gn([this.data]))}toArray(){return[...this]}concat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Sr(this.schema,[this,...t])}slice(e,t){const[n]=new Gn([this.data]).slice(e,t).data;return new yr(this.schema,n)}getChild(e){var t;return this.getChildAt(null===(t=this.schema.fields)||void 0===t?void 0:t.findIndex((t=>t.name===e)))}getChildAt(e){return e>-1&&e<this.schema.fields.length?new Gn([this.data.children[e]]):null}setChild(e,t){var n;return this.setChildAt(null===(n=this.schema.fields)||void 0===n?void 0:n.findIndex((t=>t.name===e)),t)}setChildAt(e,t){let n=this.schema,r=this.data;if(e>-1&&e<this.numCols){t||(t=new Gn([Xn({type:new De,length:this.numRows})]));const i=n.fields.slice(),o=r.children.slice(),a=i[e].clone({type:t.type});[i[e],o[e]]=[a,t.data[0]],n=new Jn(i,new Map(this.schema.metadata)),r=Xn({type:new Ge(i),children:o})}return new yr(n,r)}select(e){const t=this.schema.select(e),n=new Ge(t.fields),r=[];for(const i of e){const e=this.schema.fields.findIndex((e=>e.name===i));~e&&(r[e]=this.data.children[e])}return new yr(t,Xn({type:n,length:this.numRows,children:r}))}selectAt(e){const t=this.schema.selectAt(e),n=e.map((e=>this.data.children[e])).filter(Boolean),r=Xn({type:new Ge(t.fields),length:this.numRows,children:n});return new yr(t,r)}}function br(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.reduce(((e,t)=>Math.max(e,t.length)),0);var r;const i=[...e.fields],o=[...t],a=(n+63&-64)>>3;for(const[s,l]of e.fields.entries()){const e=t[s];e&&e.length===n||(i[s]=l.clone({nullable:!0}),o[s]=null!==(r=null===e||void 0===e?void 0:e._changeLengthAndBackfillNullBitmap(n))&&void 0!==r?r:Xn({type:l.type,length:n,nullCount:n,nullBitmap:new Uint8Array(a)}))}return[e.assign(i),Xn({type:new Ge(i),length:n,children:o})]}function vr(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map;for(let r=-1,i=e.length;++r<i;){const i=e[r].type,o=t[r];if(Me.isDictionary(i))if(n.has(i.id)){if(n.get(i.id)!==o.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}else o.dictionary&&n.set(i.id,o.dictionary);i.children&&i.children.length>0&&vr(i.children,o.children,n)}return n}hr=Symbol.toStringTag,yr[hr]=(e=>(e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(yr.prototype);class gr extends yr{constructor(e){const t=e.fields.map((e=>Xn({type:e.type})));super(e,Xn({type:new Ge(e.fields),nullCount:0,children:t}))}}function wr(e,t){return function(e,t){const n=[...e.fields],r=[],i={numBatches:t.reduce(((e,t)=>Math.max(e,t.length)),0)};let o=0,a=0,s=-1;const l=t.length;let c,u=[];for(;i.numBatches-- >0;){for(a=Number.POSITIVE_INFINITY,s=-1;++s<l;)u[s]=c=t[s].shift(),a=Math.min(a,c?c.length:a);Number.isFinite(a)&&(u=_r(n,a,u,t,i),a>0&&(r[o++]=Xn({type:new Ge(n),length:a,nullCount:0,children:u.slice()})))}return[e=e.assign(n),r.map((t=>new yr(e,t)))]}(e,t.map((e=>e.data.concat())))}function _r(e,t,n,r,i){var o;const a=(t+63&-64)>>3;for(let s=-1,l=r.length;++s<l;){const l=n[s],c=null===l||void 0===l?void 0:l.length;if(c>=t)c===t?n[s]=l:(n[s]=l.slice(0,t),i.numBatches=Math.max(i.numBatches,r[s].unshift(l.slice(t,c-t))));else{const r=e[s];e[s]=r.clone({nullable:!0}),n[s]=null!==(o=null===l||void 0===l?void 0:l._changeLengthAndBackfillNullBitmap(t))&&void 0!==o?o:Xn({type:r.type,length:t,nullCount:t,nullBitmap:new Uint8Array(a)})}}return n}class Sr{constructor(){for(var e,t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];if(0===r.length)return this.batches=[],this.schema=new Jn([]),this._offsets=[0],this;let o,a;r[0]instanceof Jn&&(o=r.shift()),r[r.length-1]instanceof Uint32Array&&(a=r.pop());const s=e=>{if(e){if(e instanceof yr)return[e];if(e instanceof Sr)return e.batches;if(e instanceof Kn){if(e.type instanceof Ge)return[new yr(new Jn(e.type.children),e)]}else{if(Array.isArray(e))return e.flatMap((e=>s(e)));if("function"===typeof e[Symbol.iterator])return[...e].flatMap((e=>s(e)));if("object"===typeof e){const t=Object.keys(e),n=t.map((t=>new Gn([e[t]]))),r=new Jn(t.map(((e,t)=>new Zn(String(e),n[t].type)))),[,i]=wr(r,n);return 0===i.length?[new yr(e)]:i}}}return[]},l=r.flatMap((e=>s(e)));if(o=null!==(t=null!==o&&void 0!==o?o:null===(e=l[0])||void 0===e?void 0:e.schema)&&void 0!==t?t:new Jn([]),!(o instanceof Jn))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");for(const c of l){if(!(c instanceof yr))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!pr(o,c.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=o,this.batches=l,this._offsets=null!==a&&void 0!==a?a:bn(this.data)}get data(){return this.batches.map((e=>{let{data:t}=e;return t}))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce(((e,t)=>e+t.length),0)}get nullCount(){return-1===this._nullCount&&(this._nullCount=yn(this.data)),this._nullCount}isValid(e){return!1}get(e){return null}set(e,t){}indexOf(e,t){return-1}getByteLength(e){return 0}[Symbol.iterator](){return this.batches.length>0?Bn.visit(new Gn(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[\n ${this.toArray().join(",\n ")}\n]`}concat(){const e=this.schema;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i=this.data.concat(n.flatMap((e=>{let{data:t}=e;return t})));return new Sr(e,i.map((t=>new yr(e,t))))}slice(e,t){const n=this.schema;[e,t]=un({length:this.numRows},e,t);const r=vn(this.data,this._offsets,e,t);return new Sr(n,r.map((e=>new yr(n,e))))}getChild(e){return this.getChildAt(this.schema.fields.findIndex((t=>t.name===e)))}getChildAt(e){if(e>-1&&e<this.schema.fields.length){const t=this.data.map((t=>t.children[e]));if(0===t.length){const{type:n}=this.schema.fields[e],r=Xn({type:n,length:0,nullCount:0});t.push(r._changeLengthAndBackfillNullBitmap(this.numRows))}return new Gn(t)}return null}setChild(e,t){var n;return this.setChildAt(null===(n=this.schema.fields)||void 0===n?void 0:n.findIndex((t=>t.name===e)),t)}setChildAt(e,t){let n=this.schema,r=[...this.batches];if(e>-1&&e<this.numCols){t||(t=new Gn([Xn({type:new De,length:this.numRows})]));const i=n.fields.slice(),o=i[e].clone({type:t.type}),a=this.schema.fields.map(((e,t)=>this.getChildAt(t)));[i[e],a[e]]=[o,t],[n,r]=wr(n,a)}return new Sr(n,r)}select(e){const t=this.schema.fields.reduce(((e,t,n)=>e.set(t.name,n)),new Map);return this.selectAt(e.map((e=>t.get(e))).filter((e=>e>-1)))}selectAt(e){const t=this.schema.selectAt(e),n=this.batches.map((t=>t.selectAt(e)));return new Sr(t,n)}assign(e){const t=this.schema.fields,[n,r]=e.schema.fields.reduce(((e,n,r)=>{const[i,o]=e,a=t.findIndex((e=>e.name===n.name));return~a?o[a]=r:i.push(r),e}),[[],[]]),i=this.schema.assign(e.schema),o=[...t.map(((e,t)=>[t,r[t]])).map((t=>{let[n,r]=t;return void 0===r?this.getChildAt(n):e.getChildAt(r)})),...n.map((t=>e.getChildAt(t)))].filter(Boolean);return new Sr(...wr(i,o))}}mr=Symbol.toStringTag,Sr[mr]=(e=>(e.schema=null,e.batches=[],e._offsets=new Uint32Array([0]),e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,e.isValid=_n(wn),e.get=_n(nn.getVisitFn(u.Struct)),e.set=Sn(Et.getVisitFn(u.Struct)),e.indexOf=An(Dn.getVisitFn(u.Struct)),e.getByteLength=_n($n.getVisitFn(u.Struct)),"Table"))(Sr.prototype);class Ar{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(e,t,n,r){return e.prep(8,24),e.writeInt64(r),e.pad(4),e.writeInt32(n),e.writeInt64(t),e.offset()}}const xr=new Int32Array(2),kr=new Float32Array(xr.buffer),Cr=new Float64Array(xr.buffer),Tr=1===new Uint16Array(new Uint8Array([1,0]).buffer)[0];class Ir{constructor(e,t){this.low=0|e,this.high=0|t}static create(e,t){return 0==e&&0==t?Ir.ZERO:new Ir(e,t)}toFloat64(){return(this.low>>>0)+4294967296*this.high}equals(e){return this.low==e.low&&this.high==e.high}}var Er,Rr,Or,Pr,Mr;Ir.ZERO=new Ir(0,0),function(e){e[e.UTF8_BYTES=1]="UTF8_BYTES",e[e.UTF16_STRING=2]="UTF16_STRING"}(Er||(Er={}));class Dr{constructor(e){this.bytes_=e,this.position_=0}static allocate(e){return new Dr(new Uint8Array(e))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(e){this.position_=e}capacity(){return this.bytes_.length}readInt8(e){return this.readUint8(e)<<24>>24}readUint8(e){return this.bytes_[e]}readInt16(e){return this.readUint16(e)<<16>>16}readUint16(e){return this.bytes_[e]|this.bytes_[e+1]<<8}readInt32(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24}readUint32(e){return this.readInt32(e)>>>0}readInt64(e){return new Ir(this.readInt32(e),this.readInt32(e+4))}readUint64(e){return new Ir(this.readUint32(e),this.readUint32(e+4))}readFloat32(e){return xr[0]=this.readInt32(e),kr[0]}readFloat64(e){return xr[Tr?0:1]=this.readInt32(e),xr[Tr?1:0]=this.readInt32(e+4),Cr[0]}writeInt8(e,t){this.bytes_[e]=t}writeUint8(e,t){this.bytes_[e]=t}writeInt16(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8}writeUint16(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8}writeInt32(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}writeUint32(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}writeInt64(e,t){this.writeInt32(e,t.low),this.writeInt32(e+4,t.high)}writeUint64(e,t){this.writeUint32(e,t.low),this.writeUint32(e+4,t.high)}writeFloat32(e,t){kr[0]=t,this.writeInt32(e,xr[0])}writeFloat64(e,t){Cr[0]=t,this.writeInt32(e,xr[Tr?0:1]),this.writeInt32(e+4,xr[Tr?1:0])}getBufferIdentifier(){if(this.bytes_.length<this.position_+4+4)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");let e="";for(let t=0;t<4;t++)e+=String.fromCharCode(this.readInt8(this.position_+4+t));return e}__offset(e,t){const n=e-this.readInt32(e);return t<this.readInt16(n)?this.readInt16(n+t):0}__union(e,t){return e.bb_pos=t+this.readInt32(t),e.bb=this,e}__string(e,t){e+=this.readInt32(e);const n=this.readInt32(e);let r="",i=0;if(e+=4,t===Er.UTF8_BYTES)return this.bytes_.subarray(e,e+n);for(;i<n;){let t;const n=this.readUint8(e+i++);if(n<192)t=n;else{const r=this.readUint8(e+i++);if(n<224)t=(31&n)<<6|63&r;else{const o=this.readUint8(e+i++);if(n<240)t=(15&n)<<12|(63&r)<<6|63&o;else{t=(7&n)<<18|(63&r)<<12|(63&o)<<6|63&this.readUint8(e+i++)}}}t<65536?r+=String.fromCharCode(t):(t-=65536,r+=String.fromCharCode(55296+(t>>10),56320+(1023&t)))}return r}__union_with_string(e,t){return"string"===typeof e?this.__string(t):this.__union(e,t)}__indirect(e){return e+this.readInt32(e)}__vector(e){return e+this.readInt32(e)+4}__vector_len(e){return this.readInt32(e+this.readInt32(e))}__has_identifier(e){if(4!=e.length)throw new Error("FlatBuffers: file identifier must be length 4");for(let t=0;t<4;t++)if(e.charCodeAt(t)!=this.readInt8(this.position()+4+t))return!1;return!0}createLong(e,t){return Ir.create(e,t)}createScalarList(e,t){const n=[];for(let r=0;r<t;++r)null!==e(r)&&n.push(e(r));return n}createObjList(e,t){const n=[];for(let r=0;r<t;++r){const t=e(r);null!==t&&n.push(t.unpack())}return n}}class Nr{constructor(e){let t;this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null,t=e||1024,this.bb=Dr.allocate(t),this.space=t}clear(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null}forceDefaults(e){this.force_defaults=e}dataBuffer(){return this.bb}asUint8Array(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())}prep(e,t){e>this.minalign&&(this.minalign=e);const n=1+~(this.bb.capacity()-this.space+t)&e-1;for(;this.space<n+e+t;){const e=this.bb.capacity();this.bb=Nr.growByteBuffer(this.bb),this.space+=this.bb.capacity()-e}this.pad(n)}pad(e){for(let t=0;t<e;t++)this.bb.writeInt8(--this.space,0)}writeInt8(e){this.bb.writeInt8(this.space-=1,e)}writeInt16(e){this.bb.writeInt16(this.space-=2,e)}writeInt32(e){this.bb.writeInt32(this.space-=4,e)}writeInt64(e){this.bb.writeInt64(this.space-=8,e)}writeFloat32(e){this.bb.writeFloat32(this.space-=4,e)}writeFloat64(e){this.bb.writeFloat64(this.space-=8,e)}addInt8(e){this.prep(1,0),this.writeInt8(e)}addInt16(e){this.prep(2,0),this.writeInt16(e)}addInt32(e){this.prep(4,0),this.writeInt32(e)}addInt64(e){this.prep(8,0),this.writeInt64(e)}addFloat32(e){this.prep(4,0),this.writeFloat32(e)}addFloat64(e){this.prep(8,0),this.writeFloat64(e)}addFieldInt8(e,t,n){(this.force_defaults||t!=n)&&(this.addInt8(t),this.slot(e))}addFieldInt16(e,t,n){(this.force_defaults||t!=n)&&(this.addInt16(t),this.slot(e))}addFieldInt32(e,t,n){(this.force_defaults||t!=n)&&(this.addInt32(t),this.slot(e))}addFieldInt64(e,t,n){!this.force_defaults&&t.equals(n)||(this.addInt64(t),this.slot(e))}addFieldFloat32(e,t,n){(this.force_defaults||t!=n)&&(this.addFloat32(t),this.slot(e))}addFieldFloat64(e,t,n){(this.force_defaults||t!=n)&&(this.addFloat64(t),this.slot(e))}addFieldOffset(e,t,n){(this.force_defaults||t!=n)&&(this.addOffset(t),this.slot(e))}addFieldStruct(e,t,n){t!=n&&(this.nested(t),this.slot(e))}nested(e){if(e!=this.offset())throw new Error("FlatBuffers: struct must be serialized inline.")}notNested(){if(this.isNested)throw new Error("FlatBuffers: object serialization must not be nested.")}slot(e){null!==this.vtable&&(this.vtable[e]=this.offset())}offset(){return this.bb.capacity()-this.space}static growByteBuffer(e){const t=e.capacity();if(3221225472&t)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");const n=t<<1,r=Dr.allocate(n);return r.setPosition(n-t),r.bytes().set(e.bytes(),n-t),r}addOffset(e){this.prep(4,0),this.writeInt32(this.offset()-e+4)}startObject(e){this.notNested(),null==this.vtable&&(this.vtable=[]),this.vtable_in_use=e;for(let t=0;t<e;t++)this.vtable[t]=0;this.isNested=!0,this.object_start=this.offset()}endObject(){if(null==this.vtable||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);const e=this.offset();let t=this.vtable_in_use-1;for(;t>=0&&0==this.vtable[t];t--);const n=t+1;for(;t>=0;t--)this.addInt16(0!=this.vtable[t]?e-this.vtable[t]:0);this.addInt16(e-this.object_start);const r=2*(n+2);this.addInt16(r);let i=0;const o=this.space;e:for(t=0;t<this.vtables.length;t++){const e=this.bb.capacity()-this.vtables[t];if(r==this.bb.readInt16(e)){for(let t=2;t<r;t+=2)if(this.bb.readInt16(o+t)!=this.bb.readInt16(e+t))continue e;i=this.vtables[t];break}}return i?(this.space=this.bb.capacity()-e,this.bb.writeInt32(this.space,i-e)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-e,this.offset()-e)),this.isNested=!1,e}finish(e,t,n){const r=n?4:0;if(t){const e=t;if(this.prep(this.minalign,8+r),4!=e.length)throw new Error("FlatBuffers: file identifier must be length 4");for(let t=3;t>=0;t--)this.writeInt8(e.charCodeAt(t))}this.prep(this.minalign,4+r),this.addOffset(e),r&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(e,t){this.finish(e,t,!0)}requiredField(e,t){const n=this.bb.capacity()-e,r=n-this.bb.readInt32(n);if(!(0!=this.bb.readInt16(r+t)))throw new Error("FlatBuffers: field "+t+" must be set")}startVector(e,t,n){this.notNested(),this.vector_num_elems=t,this.prep(4,e*t),this.prep(n,e*t)}endVector(){return this.writeInt32(this.vector_num_elems),this.offset()}createSharedString(e){if(!e)return 0;if(this.string_maps||(this.string_maps=new Map),this.string_maps.has(e))return this.string_maps.get(e);const t=this.createString(e);return this.string_maps.set(e,t),t}createString(e){if(!e)return 0;let t;if(e instanceof Uint8Array)t=e;else{t=[];let n=0;for(;n<e.length;){let r;const i=e.charCodeAt(n++);if(i<55296||i>=56320)r=i;else{r=(i<<10)+e.charCodeAt(n++)+-56613888}r<128?t.push(r):(r<2048?t.push(r>>6&31|192):(r<65536?t.push(r>>12&15|224):t.push(r>>18&7|240,r>>12&63|128),t.push(r>>6&63|128)),t.push(63&r|128))}}this.addInt8(0),this.startVector(1,t.length,1),this.bb.setPosition(this.space-=t.length);for(let n=0,r=this.space,i=this.bb.bytes();n<t.length;n++)i[r++]=t[n];return this.endVector()}createLong(e,t){return Ir.create(e,t)}createObjectOffset(e){return null===e?0:"string"===typeof e?this.createString(e):e.pack(this)}createObjectOffsetList(e){const t=[];for(let n=0;n<e.length;++n){const r=e[n];if(null===r)throw new Error("FlatBuffers: Argument for createObjectOffsetList cannot contain null.");t.push(this.createObjectOffset(r))}return t}createStructOffsetList(e,t){return t(this,e.length),this.createObjectOffsetList(e),this.endVector()}}class Lr{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsKeyValue(e,t){return(t||new Lr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,t){return e.setPosition(e.position()+4),(t||new Lr).__init(e.readInt32(e.position())+e.position(),e)}key(e){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}value(e){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startKeyValue(e){e.startObject(2)}static addKey(e,t){e.addFieldOffset(0,t,0)}static addValue(e,t){e.addFieldOffset(1,t,0)}static endKeyValue(e){return e.endObject()}static createKeyValue(e,t,n){return Lr.startKeyValue(e),Lr.addKey(e,t),Lr.addValue(e,n),Lr.endKeyValue(e)}}!function(e){e[e.V1=0]="V1",e[e.V2=1]="V2",e[e.V3=2]="V3",e[e.V4=3]="V4",e[e.V5=4]="V5"}(Rr||(Rr={})),function(e){e[e.Little=0]="Little",e[e.Big=1]="Big"}(Or||(Or={})),function(e){e[e.DenseArray=0]="DenseArray"}(Pr||(Pr={}));class Fr{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInt(e,t){return(t||new Fr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,t){return e.setPosition(e.position()+4),(t||new Fr).__init(e.readInt32(e.position())+e.position(),e)}bitWidth(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){const e=this.bb.__offset(this.bb_pos,6);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}static startInt(e){e.startObject(2)}static addBitWidth(e,t){e.addFieldInt32(0,t,0)}static addIsSigned(e,t){e.addFieldInt8(1,+t,0)}static endInt(e){return e.endObject()}static createInt(e,t,n){return Fr.startInt(e),Fr.addBitWidth(e,t),Fr.addIsSigned(e,n),Fr.endInt(e)}}class Br{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryEncoding(e,t){return(t||new Br).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryEncoding(e,t){return e.setPosition(e.position()+4),(t||new Br).__init(e.readInt32(e.position())+e.position(),e)}id(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}indexType(e){const t=this.bb.__offset(this.bb_pos,6);return t?(e||new Fr).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isOrdered(){const e=this.bb.__offset(this.bb_pos,8);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}dictionaryKind(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt16(this.bb_pos+e):Pr.DenseArray}static startDictionaryEncoding(e){e.startObject(4)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addIndexType(e,t){e.addFieldOffset(1,t,0)}static addIsOrdered(e,t){e.addFieldInt8(2,+t,0)}static addDictionaryKind(e,t){e.addFieldInt16(3,t,Pr.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}}!function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.FloatingPoint=3]="FloatingPoint",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct_=13]="Struct_",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Duration=18]="Duration",e[e.LargeBinary=19]="LargeBinary",e[e.LargeUtf8=20]="LargeUtf8",e[e.LargeList=21]="LargeList"}(Mr||(Mr={}));class jr{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsField(e,t){return(t||new jr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,t){return e.setPosition(e.position()+4),(t||new jr).__init(e.readInt32(e.position())+e.position(),e)}name(e){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}nullable(){const e=this.bb.__offset(this.bb_pos,6);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}typeType(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):Mr.NONE}type(e){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__union(e,this.bb_pos+t):null}dictionary(e){const t=this.bb.__offset(this.bb_pos,12);return t?(e||new Br).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(e,t){const n=this.bb.__offset(this.bb_pos,14);return n?(t||new jr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}childrenLength(){const e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,16);return n?(t||new Lr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,t){e.addFieldOffset(0,t,0)}static addNullable(e,t){e.addFieldInt8(1,+t,0)}static addTypeType(e,t){e.addFieldInt8(2,t,Mr.NONE)}static addType(e,t){e.addFieldOffset(3,t,0)}static addDictionary(e,t){e.addFieldOffset(4,t,0)}static addChildren(e,t){e.addFieldOffset(5,t,0)}static createChildrenVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startChildrenVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(6,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){return e.endObject()}}class zr{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsSchema(e,t){return(t||new zr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,t){return e.setPosition(e.position()+4),(t||new zr).__init(e.readInt32(e.position())+e.position(),e)}endianness(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Or.Little}fields(e,t){const n=this.bb.__offset(this.bb_pos,6);return n?(t||new jr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}fieldsLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,8);return n?(t||new Lr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+8*e):this.bb.createLong(0,0)}featuresLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,t){e.addFieldInt16(0,t,Or.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startFieldsVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(2,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static addFeatures(e,t){e.addFieldOffset(3,t,0)}static createFeaturesVector(e,t){e.startVector(8,t.length,8);for(let n=t.length-1;n>=0;n--)e.addInt64(t[n]);return e.endVector()}static startFeaturesVector(e,t){e.startVector(8,t,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,t){e.finish(t)}static finishSizePrefixedSchemaBuffer(e,t){e.finish(t,void 0,!0)}static createSchema(e,t,n,r,i){return zr.startSchema(e),zr.addEndianness(e,t),zr.addFields(e,n),zr.addCustomMetadata(e,r),zr.addFeatures(e,i),zr.endSchema(e)}}class Ur{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFooter(e,t){return(t||new Ur).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,t){return e.setPosition(e.position()+4),(t||new Ur).__init(e.readInt32(e.position())+e.position(),e)}version(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Rr.V1}schema(e){const t=this.bb.__offset(this.bb_pos,6);return t?(e||new zr).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){const n=this.bb.__offset(this.bb_pos,8);return n?(t||new Ar).__init(this.bb.__vector(this.bb_pos+n)+24*e,this.bb):null}dictionariesLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,t){const n=this.bb.__offset(this.bb_pos,10);return n?(t||new Ar).__init(this.bb.__vector(this.bb_pos+n)+24*e,this.bb):null}recordBatchesLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,12);return n?(t||new Lr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,Rr.V1)}static addSchema(e,t){e.addFieldOffset(1,t,0)}static addDictionaries(e,t){e.addFieldOffset(2,t,0)}static startDictionariesVector(e,t){e.startVector(24,t,8)}static addRecordBatches(e,t){e.addFieldOffset(3,t,0)}static startRecordBatchesVector(e,t){e.startVector(24,t,8)}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endFooter(e){return e.endObject()}static finishFooterBuffer(e,t){e.finish(t)}static finishSizePrefixedFooterBuffer(e,t){e.finish(t,void 0,!0)}}var Vr=Ir,$r=Nr,Wr=Dr;class Hr{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.V4,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;this.schema=e,this.version=t,n&&(this._recordBatches=n),i&&(this._dictionaryBatches=i)}static decode(e){e=new Wr(J(e));const t=Ur.getRootAsFooter(e),n=Jn.decode(t.schema());return new Yr(n,t)}static encode(e){const t=new $r,n=Jn.encode(t,e.schema);Ur.startRecordBatchesVector(t,e.numRecordBatches);for(const r of[...e.recordBatches()].slice().reverse())Gr.encode(t,r);const i=t.endVector();Ur.startDictionariesVector(t,e.numDictionaries);for(const r of[...e.dictionaryBatches()].slice().reverse())Gr.encode(t,r);const o=t.endVector();return Ur.startFooter(t),Ur.addSchema(t,n),Ur.addVersion(t,r.V4),Ur.addRecordBatches(t,i),Ur.addDictionaries(t,o),Ur.finishFooterBuffer(t,Ur.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}*recordBatches(){for(let e,t=-1,n=this.numRecordBatches;++t<n;)(e=this.getRecordBatch(t))&&(yield e)}*dictionaryBatches(){for(let e,t=-1,n=this.numDictionaries;++t<n;)(e=this.getDictionaryBatch(t))&&(yield e)}getRecordBatch(e){return e>=0&&e<this.numRecordBatches&&this._recordBatches[e]||null}getDictionaryBatch(e){return e>=0&&e<this.numDictionaries&&this._dictionaryBatches[e]||null}}class Yr extends Hr{constructor(e,t){super(e,t.version()),this._footer=t}get numRecordBatches(){return this._footer.recordBatchesLength()}get numDictionaries(){return this._footer.dictionariesLength()}getRecordBatch(e){if(e>=0&&e<this.numRecordBatches){const t=this._footer.recordBatches(e);if(t)return Gr.decode(t)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){const t=this._footer.dictionaries(e);if(t)return Gr.decode(t)}return null}}class Gr{constructor(e,t,n){this.metaDataLength=e,this.offset="number"===typeof n?n:n.low,this.bodyLength="number"===typeof t?t:t.low}static decode(e){return new Gr(e.metaDataLength(),e.bodyLength(),e.offset())}static encode(e,t){const{metaDataLength:n}=t,r=new Vr(t.offset,0),i=new Vr(t.bodyLength,0);return Ar.createBlock(e,r,n,i)}}const qr={fromIterable:e=>Kr(function*(e){let t,n,r,i,o=!1,a=[],s=0;function l(){return"peek"===r?K(a,i)[0]:([n,a,s]=K(a,i),n)}({cmd:r,size:i}=yield null);const c=(u=e,ee(Uint8Array,u))[Symbol.iterator]();var u;try{do{if(({done:t,value:n}=Number.isNaN(i-s)?c.next():c.next(i-s)),!t&&n.byteLength>0&&(a.push(n),s+=n.byteLength),t||i<=s)do{({cmd:r,size:i}=yield l())}while(i<s)}while(!t)}catch(d){(o=!0)&&"function"===typeof c.throw&&c.throw(d)}finally{!1===o&&"function"===typeof c.return&&c.return(null)}return null}(e)),fromAsyncIterable:e=>Kr(function(e){return z(this,arguments,(function*(){let t,n,r,i,o=!1,a=[],s=0;function l(){return"peek"===r?K(a,i)[0]:([n,a,s]=K(a,i),n)}({cmd:r,size:i}=yield yield j(null));const c=(u=e,te(Uint8Array,u))[Symbol.asyncIterator]();var u;try{do{if(({done:t,value:n}=Number.isNaN(i-s)?yield j(c.next()):yield j(c.next(i-s))),!t&&n.byteLength>0&&(a.push(n),s+=n.byteLength),t||i<=s)do{({cmd:r,size:i}=yield yield j(l()))}while(i<s)}while(!t)}catch(d){(o=!0)&&"function"===typeof c.throw&&(yield j(c.throw(d)))}finally{!1===o&&"function"===typeof c.return&&(yield j(c.return(new Uint8Array(0))))}return yield j(null)}))}(e)),fromDOMStream:e=>Kr(function(e){return z(this,arguments,(function*(){let t,n,r,i=!1,o=!1,a=[],s=0;function l(){return"peek"===n?K(a,r)[0]:([t,a,s]=K(a,r),t)}({cmd:n,size:r}=yield yield j(null));const c=new Qr(e);try{do{if(({done:i,value:t}=Number.isNaN(r-s)?yield j(c.read()):yield j(c.read(r-s))),!i&&t.byteLength>0&&(a.push(J(t)),s+=t.byteLength),i||r<=s)do{({cmd:n,size:r}=yield yield j(l()))}while(r<s)}while(!i)}catch(u){(o=!0)&&(yield j(c.cancel(u)))}finally{!1===o?yield j(c.cancel()):e.locked&&c.releaseLock()}return yield j(null)}))}(e)),fromNodeStream:e=>Kr(function(e){return z(this,arguments,(function*(){const t=[];let n,r,i,o="error",a=!1,s=null,l=0,c=[];function u(){return"peek"===n?K(c,r)[0]:([i,c,l]=K(c,r),i)}if(({cmd:n,size:r}=yield yield j(null)),e.isTTY)return yield yield j(new Uint8Array(0)),yield j(null);try{t[0]=Xr(e,"end"),t[1]=Xr(e,"error");do{if(t[2]=Xr(e,"readable"),[o,s]=yield j(Promise.race(t.map((e=>e[2])))),"error"===o)break;if((a="end"===o)||(Number.isFinite(r-l)?(i=J(e.read(r-l)),i.byteLength<r-l&&(i=J(e.read()))):i=J(e.read()),i.byteLength>0&&(c.push(i),l+=i.byteLength)),a||r<=l)do{({cmd:n,size:r}=yield yield j(u()))}while(r<l)}while(!a)}finally{yield j(d(t,"error"===o?s:null))}return yield j(null);function d(t,n){return i=c=null,new Promise(((r,i)=>{for(const[n,a]of t)e.off(n,a);try{const t=e.destroy;t&&t.call(e,n),n=void 0}catch(o){n=o||n}finally{null!=n?i(n):r()}}))}}))}(e)),toDOMStream(e,t){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(e,t){throw new Error('"toNodeStream" not available in this environment')}},Kr=e=>(e.next(),e);class Qr{constructor(e){this.source=e,this.reader=null,this.reader=this.source.getReader(),this.reader.closed.catch((()=>{}))}get closed(){return this.reader?this.reader.closed.catch((()=>{})):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(e){return F(this,void 0,void 0,(function*(){const{reader:t,source:n}=this;t&&(yield t.cancel(e).catch((()=>{}))),n&&n.locked&&this.releaseLock()}))}read(e){return F(this,void 0,void 0,(function*(){if(0===e)return{done:null==this.reader,value:new Uint8Array(0)};const t=yield this.reader.read();return!t.done&&(t.value=J(t)),t}))}}const Xr=(e,t)=>{const n=e=>r([t,e]);let r;return[t,n,new Promise((i=>(r=i)&&e.once(t,n)))]};const Jr=Object.freeze({done:!0,value:void 0});class Zr{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}}class ei{tee(){return this._getDOMStream().tee()}pipe(e,t){return this._getNodeStream().pipe(e,t)}pipeTo(e,t){return this._getDOMStream().pipeTo(e,t)}pipeThrough(e,t){return this._getDOMStream().pipeThrough(e,t)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}}class ti extends ei{constructor(){super(),this._values=[],this.resolvers=[],this._closedPromise=new Promise((e=>this._closedPromiseResolve=e))}get closed(){return this._closedPromise}cancel(e){return F(this,void 0,void 0,(function*(){yield this.return(e)}))}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){const{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(Jr);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return qr.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return qr.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return F(this,void 0,void 0,(function*(){return yield this.abort(e),Jr}))}return(e){return F(this,void 0,void 0,(function*(){return yield this.close(),Jr}))}read(e){return F(this,void 0,void 0,(function*(){return(yield this.next(e,"read")).value}))}peek(e){return F(this,void 0,void 0,(function*(){return(yield this.next(e,"peek")).value}))}next(){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise(((e,t)=>{this.resolvers.push({resolve:e,reject:t})})):Promise.resolve(Jr)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}}class ni extends ti{write(e){if((e=J(e)).byteLength>0)return super.write(e)}toString(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?W(this.toUint8Array(!0)):this.toUint8Array(!1).then(W)}toUint8Array(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?K(this._values)[0]:(()=>F(this,void 0,void 0,(function*(){var e,t;const n=[];let r=0;try{for(var i,o=V(this);!(i=yield o.next()).done;){const e=i.value;n.push(e),r+=e.byteLength}}catch(a){e={error:a}}finally{try{i&&!i.done&&(t=o.return)&&(yield t.call(o))}finally{if(e)throw e.error}}return K(n,r)[0]})))()}}class ri{constructor(e){e&&(this.source=new oi(qr.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}}class ii{constructor(e){e instanceof ii?this.source=e.source:e instanceof ni?this.source=new ai(qr.fromAsyncIterable(e)):D(e)?this.source=new ai(qr.fromNodeStream(e)):M(e)?this.source=new ai(qr.fromDOMStream(e)):O(e)?this.source=new ai(qr.fromDOMStream(e.body)):C(e)?this.source=new ai(qr.fromIterable(e)):(k(e)||T(e))&&(this.source=new ai(qr.fromAsyncIterable(e)))}[Symbol.asyncIterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}get closed(){return this.source.closed}cancel(e){return this.source.cancel(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}}class oi{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,"peek").value}read(e){return this.next(e,"read").value}next(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"read";return this.source.next({cmd:t,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||Jr)}return(e){return Object.create(this.source.return&&this.source.return(e)||Jr)}}class ai{constructor(e){this.source=e,this._closedPromise=new Promise((e=>this._closedPromiseResolve=e))}cancel(e){return F(this,void 0,void 0,(function*(){yield this.return(e)}))}get closed(){return this._closedPromise}read(e){return F(this,void 0,void 0,(function*(){return(yield this.next(e,"read")).value}))}peek(e){return F(this,void 0,void 0,(function*(){return(yield this.next(e,"peek")).value}))}next(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"read";return F(this,void 0,void 0,(function*(){return yield this.source.next({cmd:t,size:e})}))}throw(e){return F(this,void 0,void 0,(function*(){const t=this.source.throw&&(yield this.source.throw(e))||Jr;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}))}return(e){return F(this,void 0,void 0,(function*(){const t=this.source.return&&(yield this.source.return(e))||Jr;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}))}}class si extends ri{constructor(e,t){super(),this.position=0,this.buffer=J(e),this.size="undefined"===typeof t?this.buffer.byteLength:t}readInt32(e){const{buffer:t,byteOffset:n}=this.readAt(e,4);return new DataView(t,n).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e<this.size}read(e){const{buffer:t,size:n,position:r}=this;return t&&r<n?("number"!==typeof e&&(e=Number.POSITIVE_INFINITY),this.position=Math.min(n,r+Math.min(n-r,e)),t.subarray(r,this.position)):null}readAt(e,t){const n=this.buffer,r=Math.min(this.size,e+t);return n?n.subarray(e,r):new Uint8Array(t)}close(){this.buffer&&(this.buffer=null)}throw(e){return this.close(),{done:!0,value:e}}return(e){return this.close(),{done:!0,value:e}}}class li extends ii{constructor(e,t){super(),this.position=0,this._handle=e,"number"===typeof t?this.size=t:this._pending=(()=>F(this,void 0,void 0,(function*(){this.size=(yield e.stat()).size,delete this._pending})))()}readInt32(e){return F(this,void 0,void 0,(function*(){const{buffer:t,byteOffset:n}=yield this.readAt(e,4);return new DataView(t,n).getInt32(0,!0)}))}seek(e){return F(this,void 0,void 0,(function*(){return this._pending&&(yield this._pending),this.position=Math.min(e,this.size),e<this.size}))}read(e){return F(this,void 0,void 0,(function*(){this._pending&&(yield this._pending);const{_handle:t,size:n,position:r}=this;if(t&&r<n){"number"!==typeof e&&(e=Number.POSITIVE_INFINITY);let i=r,o=0,a=0;const s=Math.min(n,i+Math.min(n-i,e)),l=new Uint8Array(Math.max(0,(this.position=s)-i));for(;(i+=a)<s&&(o+=a)<l.byteLength;)({bytesRead:a}=yield t.read(l,o,l.byteLength-o,i));return l}return null}))}readAt(e,t){return F(this,void 0,void 0,(function*(){this._pending&&(yield this._pending);const{_handle:n,size:r}=this;if(n&&e+t<r){const i=Math.min(r,e+t),o=new Uint8Array(i-e);return(yield n.read(o,0,t,e)).buffer}return new Uint8Array(t)}))}close(){return F(this,void 0,void 0,(function*(){const e=this._handle;this._handle=null,e&&(yield e.close())}))}throw(e){return F(this,void 0,void 0,(function*(){return yield this.close(),{done:!0,value:e}}))}return(e){return F(this,void 0,void 0,(function*(){return yield this.close(),{done:!0,value:e}}))}}function ci(e){return e<0&&(e=4294967295+e+1),`0x${e.toString(16)}`}const ui=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];class di{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){const t=new Uint32Array([this.buffer[1]>>>16,65535&this.buffer[1],this.buffer[0]>>>16,65535&this.buffer[0]]),n=new Uint32Array([e.buffer[1]>>>16,65535&e.buffer[1],e.buffer[0]>>>16,65535&e.buffer[0]]);let r=t[3]*n[3];this.buffer[0]=65535&r;let i=r>>>16;return r=t[2]*n[3],i+=r,r=t[3]*n[2]>>>0,i+=r,this.buffer[0]+=i<<16,this.buffer[1]=i>>>0<r?65536:0,this.buffer[1]+=i>>>16,this.buffer[1]+=t[1]*n[3]+t[2]*n[2]+t[3]*n[1],this.buffer[1]+=t[0]*n[3]+t[1]*n[2]+t[2]*n[1]+t[3]*n[0]<<16,this}_plus(e){const t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]<e.buffer[1]||this.buffer[1]===e.buffer[1]&&this.buffer[0]<e.buffer[0]}equals(e){return this.buffer[1]===e.buffer[1]&&this.buffer[0]==e.buffer[0]}greaterThan(e){return e.lessThan(this)}hex(){return`${ci(this.buffer[1])} ${ci(this.buffer[0])}`}}class fi extends di{times(e){return this._times(e),this}plus(e){return this._plus(e),this}static from(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);return fi.fromString("string"===typeof e?e:e.toString(),t)}static fromNumber(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);return fi.fromString(e.toString(),t)}static fromString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);const n=e.length,r=new fi(t);for(let i=0;i<n;){const t=8<n-i?8:n-i,o=new fi(new Uint32Array([Number.parseInt(e.slice(i,i+t),10),0])),a=new fi(new Uint32Array([ui[t],0]));r.times(a),r.plus(o),i+=t}return r}static convertArray(e){const t=new Uint32Array(2*e.length);for(let n=-1,r=e.length;++n<r;)fi.from(e[n],new Uint32Array(t.buffer,t.byteOffset+2*n*4,2));return t}static multiply(e,t){return new fi(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new fi(new Uint32Array(e.buffer)).plus(t)}}class pi extends di{negate(){return this.buffer[0]=1+~this.buffer[0],this.buffer[1]=~this.buffer[1],0==this.buffer[0]&&++this.buffer[1],this}times(e){return this._times(e),this}plus(e){return this._plus(e),this}lessThan(e){const t=this.buffer[1]|0,n=e.buffer[1]|0;return t<n||t===n&&this.buffer[0]<e.buffer[0]}static from(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);return pi.fromString("string"===typeof e?e:e.toString(),t)}static fromNumber(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);return pi.fromString(e.toString(),t)}static fromString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(2);const n=e.startsWith("-"),r=e.length,i=new pi(t);for(let o=n?1:0;o<r;){const t=8<r-o?8:r-o,n=new pi(new Uint32Array([Number.parseInt(e.slice(o,o+t),10),0])),a=new pi(new Uint32Array([ui[t],0]));i.times(a),i.plus(n),o+=t}return n?i.negate():i}static convertArray(e){const t=new Uint32Array(2*e.length);for(let n=-1,r=e.length;++n<r;)pi.from(e[n],new Uint32Array(t.buffer,t.byteOffset+2*n*4,2));return t}static multiply(e,t){return new pi(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new pi(new Uint32Array(e.buffer)).plus(t)}}class hi{constructor(e){this.buffer=e}high(){return new pi(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new pi(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset,2))}negate(){return this.buffer[0]=1+~this.buffer[0],this.buffer[1]=~this.buffer[1],this.buffer[2]=~this.buffer[2],this.buffer[3]=~this.buffer[3],0==this.buffer[0]&&++this.buffer[1],0==this.buffer[1]&&++this.buffer[2],0==this.buffer[2]&&++this.buffer[3],this}times(e){const t=new fi(new Uint32Array([this.buffer[3],0])),n=new fi(new Uint32Array([this.buffer[2],0])),r=new fi(new Uint32Array([this.buffer[1],0])),i=new fi(new Uint32Array([this.buffer[0],0])),o=new fi(new Uint32Array([e.buffer[3],0])),a=new fi(new Uint32Array([e.buffer[2],0])),s=new fi(new Uint32Array([e.buffer[1],0])),l=new fi(new Uint32Array([e.buffer[0],0]));let c=fi.multiply(i,l);this.buffer[0]=c.low();const u=new fi(new Uint32Array([c.high(),0]));c=fi.multiply(r,l),u.plus(c),c=fi.multiply(i,s),u.plus(c),this.buffer[1]=u.low(),this.buffer[3]=u.lessThan(c)?1:0,this.buffer[2]=u.high();return new fi(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(fi.multiply(n,l)).plus(fi.multiply(r,s)).plus(fi.multiply(i,a)),this.buffer[3]+=fi.multiply(t,l).plus(fi.multiply(n,s)).plus(fi.multiply(r,a)).plus(fi.multiply(i,o)).low(),this}plus(e){const t=new Uint32Array(4);return t[3]=this.buffer[3]+e.buffer[3]>>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]<this.buffer[0]>>>0&&++t[1],t[1]<this.buffer[1]>>>0&&++t[2],t[2]<this.buffer[2]>>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${ci(this.buffer[3])} ${ci(this.buffer[2])} ${ci(this.buffer[1])} ${ci(this.buffer[0])}`}static multiply(e,t){return new hi(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new hi(new Uint32Array(e.buffer)).plus(t)}static from(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(4);return hi.fromString("string"===typeof e?e:e.toString(),t)}static fromNumber(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(4);return hi.fromString(e.toString(),t)}static fromString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Uint32Array(4);const n=e.startsWith("-"),r=e.length,i=new hi(t);for(let o=n?1:0;o<r;){const t=8<r-o?8:r-o,n=new hi(new Uint32Array([Number.parseInt(e.slice(o,o+t),10),0,0,0])),a=new hi(new Uint32Array([ui[t],0,0,0]));i.times(a),i.plus(n),o+=t}return n?i.negate():i}static convertArray(e){const t=new Uint32Array(4*e.length);for(let n=-1,r=e.length;++n<r;)hi.from(e[n],new Uint32Array(t.buffer,t.byteOffset+16*n,4));return t}}class mi extends nt{constructor(e,t,n,r){super(),this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=t,this.buffers=n,this.dictionaries=r}visit(e){return super.visit(e instanceof Zn?e.type:e)}visitNull(e){let{length:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t})}visitBool(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitInt(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitFloat(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitUtf8(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitBinary(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitFixedSizeBinary(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitDate(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitTimestamp(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitTime(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitDecimal(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitList(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),valueOffsets:this.readOffsets(e),child:this.visit(e.children[0])})}visitStruct(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),children:this.visitMany(e.children)})}visitUnion(e){return e.mode===i.Sparse?this.visitSparseUnion(e):this.visitDenseUnion(e)}visitDenseUnion(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),typeIds:this.readTypeIds(e),valueOffsets:this.readOffsets(e),children:this.visitMany(e.children)})}visitSparseUnion(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),typeIds:this.readTypeIds(e),children:this.visitMany(e.children)})}visitDictionary(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e.indices),dictionary:this.readDictionary(e)})}visitInterval(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitFixedSizeList(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),child:this.visit(e.children[0])})}visitMap(e){let{length:t,nullCount:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextFieldNode();return Xn({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),valueOffsets:this.readOffsets(e),child:this.visit(e.children[0])})}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.nextBufferRange();return t>0&&this.readData(e,n)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e){let{length:t,offset:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextBufferRange();return this.bytes.subarray(n,n+t)}readDictionary(e){return this.dictionaries.get(e.id)}}class yi extends mi{constructor(e,t,n,r){super(new Uint8Array(0),t,n,r),this.sources=e}readNullBitmap(e,t){let{offset:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.nextBufferRange();return t<=0?new Uint8Array(0):Tn(this.sources[n])}readOffsets(e){let{offset:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextBufferRange();return Q(Uint8Array,Q(Int32Array,this.sources[t]))}readTypeIds(e){let{offset:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextBufferRange();return Q(Uint8Array,Q(e.ArrayType,this.sources[t]))}readData(e){let{offset:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.nextBufferRange();const{sources:n}=this;return Me.isTimestamp(e)||(Me.isInt(e)||Me.isTime(e))&&64===e.bitWidth||Me.isDate(e)&&e.unit===a.MILLISECOND?Q(Uint8Array,pi.convertArray(n[t])):Me.isDecimal(e)?Q(Uint8Array,hi.convertArray(n[t])):Me.isBinary(e)||Me.isFixedSizeBinary(e)?function(e){const t=e.join(""),n=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)n[r>>1]=Number.parseInt(t.slice(r,r+2),16);return n}(n[t]):Me.isBool(e)?Tn(n[t]):Me.isUtf8(e)?Y(n[t].join("")):Q(Uint8Array,Q(e.ArrayType,n[t].map((e=>+e))))}}var bi,vi,gi,wi,_i,Si,Ai,xi;!function(e){e[e.BUFFER=0]="BUFFER"}(bi||(bi={})),function(e){e[e.LZ4_FRAME=0]="LZ4_FRAME",e[e.ZSTD=1]="ZSTD"}(vi||(vi={}));class ki{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBodyCompression(e,t){return(t||new ki).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,t){return e.setPosition(e.position()+4),(t||new ki).__init(e.readInt32(e.position())+e.position(),e)}codec(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt8(this.bb_pos+e):vi.LZ4_FRAME}method(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):bi.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,vi.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,bi.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,t,n){return ki.startBodyCompression(e),ki.addCodec(e,t),ki.addMethod(e,n),ki.endBodyCompression(e)}}class Ci{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createBuffer(e,t,n){return e.prep(8,16),e.writeInt64(n),e.writeInt64(t),e.offset()}}class Ti{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createFieldNode(e,t,n){return e.prep(8,16),e.writeInt64(n),e.writeInt64(t),e.offset()}}class Ii{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsRecordBatch(e,t){return(t||new Ii).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,t){return e.setPosition(e.position()+4),(t||new Ii).__init(e.readInt32(e.position())+e.position(),e)}length(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}nodes(e,t){const n=this.bb.__offset(this.bb_pos,6);return n?(t||new Ti).__init(this.bb.__vector(this.bb_pos+n)+16*e,this.bb):null}nodesLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,t){const n=this.bb.__offset(this.bb_pos,8);return n?(t||new Ci).__init(this.bb.__vector(this.bb_pos+n)+16*e,this.bb):null}buffersLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){const t=this.bb.__offset(this.bb_pos,10);return t?(e||new ki).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}static startRecordBatch(e){e.startObject(4)}static addLength(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addNodes(e,t){e.addFieldOffset(1,t,0)}static startNodesVector(e,t){e.startVector(16,t,8)}static addBuffers(e,t){e.addFieldOffset(2,t,0)}static startBuffersVector(e,t){e.startVector(16,t,8)}static addCompression(e,t){e.addFieldOffset(3,t,0)}static endRecordBatch(e){return e.endObject()}}class Ei{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryBatch(e,t){return(t||new Ei).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,t){return e.setPosition(e.position()+4),(t||new Ei).__init(e.readInt32(e.position())+e.position(),e)}id(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}data(e){const t=this.bb.__offset(this.bb_pos,6);return t?(e||new Ii).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isDelta(){const e=this.bb.__offset(this.bb_pos,8);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}static startDictionaryBatch(e){e.startObject(3)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addData(e,t){e.addFieldOffset(1,t,0)}static addIsDelta(e,t){e.addFieldInt8(2,+t,0)}static endDictionaryBatch(e){return e.endObject()}}!function(e){e[e.HALF=0]="HALF",e[e.SINGLE=1]="SINGLE",e[e.DOUBLE=2]="DOUBLE"}(gi||(gi={}));class Ri{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFloatingPoint(e,t){return(t||new Ri).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,t){return e.setPosition(e.position()+4),(t||new Ri).__init(e.readInt32(e.position())+e.position(),e)}precision(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):gi.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,t){e.addFieldInt16(0,t,gi.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,t){return Ri.startFloatingPoint(e),Ri.addPrecision(e,t),Ri.endFloatingPoint(e)}}class Oi{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDecimal(e,t){return(t||new Oi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,t){return e.setPosition(e.position()+4),(t||new Oi).__init(e.readInt32(e.position())+e.position(),e)}precision(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readInt32(this.bb_pos+e):128}static startDecimal(e){e.startObject(3)}static addPrecision(e,t){e.addFieldInt32(0,t,0)}static addScale(e,t){e.addFieldInt32(1,t,0)}static addBitWidth(e,t){e.addFieldInt32(2,t,128)}static endDecimal(e){return e.endObject()}static createDecimal(e,t,n,r){return Oi.startDecimal(e),Oi.addPrecision(e,t),Oi.addScale(e,n),Oi.addBitWidth(e,r),Oi.endDecimal(e)}}!function(e){e[e.DAY=0]="DAY",e[e.MILLISECOND=1]="MILLISECOND"}(wi||(wi={}));class Pi{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDate(e,t){return(t||new Pi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,t){return e.setPosition(e.position()+4),(t||new Pi).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):wi.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,wi.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,t){return Pi.startDate(e),Pi.addUnit(e,t),Pi.endDate(e)}}!function(e){e[e.SECOND=0]="SECOND",e[e.MILLISECOND=1]="MILLISECOND",e[e.MICROSECOND=2]="MICROSECOND",e[e.NANOSECOND=3]="NANOSECOND"}(_i||(_i={}));class Mi{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTime(e,t){return(t||new Mi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,t){return e.setPosition(e.position()+4),(t||new Mi).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):_i.MILLISECOND}bitWidth(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):32}static startTime(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,_i.MILLISECOND)}static addBitWidth(e,t){e.addFieldInt32(1,t,32)}static endTime(e){return e.endObject()}static createTime(e,t,n){return Mi.startTime(e),Mi.addUnit(e,t),Mi.addBitWidth(e,n),Mi.endTime(e)}}class Di{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTimestamp(e,t){return(t||new Di).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,t){return e.setPosition(e.position()+4),(t||new Di).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):_i.SECOND}timezone(e){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startTimestamp(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,_i.SECOND)}static addTimezone(e,t){e.addFieldOffset(1,t,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,t,n){return Di.startTimestamp(e),Di.addUnit(e,t),Di.addTimezone(e,n),Di.endTimestamp(e)}}!function(e){e[e.YEAR_MONTH=0]="YEAR_MONTH",e[e.DAY_TIME=1]="DAY_TIME",e[e.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"}(Si||(Si={}));class Ni{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInterval(e,t){return(t||new Ni).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,t){return e.setPosition(e.position()+4),(t||new Ni).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Si.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Si.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,t){return Ni.startInterval(e),Ni.addUnit(e,t),Ni.endInterval(e)}}!function(e){e[e.Sparse=0]="Sparse",e[e.Dense=1]="Dense"}(Ai||(Ai={}));class Li{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUnion(e,t){return(t||new Li).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,t){return e.setPosition(e.position()+4),(t||new Li).__init(e.readInt32(e.position())+e.position(),e)}mode(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Ai.Sparse}typeIds(e){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt32(this.bb.__vector(this.bb_pos+t)+4*e):0}typeIdsLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}typeIdsArray(){const e=this.bb.__offset(this.bb_pos,6);return e?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}static startUnion(e){e.startObject(2)}static addMode(e,t){e.addFieldInt16(0,t,Ai.Sparse)}static addTypeIds(e,t){e.addFieldOffset(1,t,0)}static createTypeIdsVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addInt32(t[n]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){return e.endObject()}static createUnion(e,t,n){return Li.startUnion(e),Li.addMode(e,t),Li.addTypeIds(e,n),Li.endUnion(e)}}class Fi{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeBinary(e,t){return(t||new Fi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,t){return e.setPosition(e.position()+4),(t||new Fi).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeBinary(e){e.startObject(1)}static addByteWidth(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeBinary(e){return e.endObject()}static createFixedSizeBinary(e,t){return Fi.startFixedSizeBinary(e),Fi.addByteWidth(e,t),Fi.endFixedSizeBinary(e)}}class Bi{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeList(e,t){return(t||new Bi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,t){return e.setPosition(e.position()+4),(t||new Bi).__init(e.readInt32(e.position())+e.position(),e)}listSize(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeList(e){e.startObject(1)}static addListSize(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeList(e){return e.endObject()}static createFixedSizeList(e,t){return Bi.startFixedSizeList(e),Bi.addListSize(e,t),Bi.endFixedSizeList(e)}}class ji{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMap(e,t){return(t||new ji).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,t){return e.setPosition(e.position()+4),(t||new ji).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){const e=this.bb.__offset(this.bb_pos,4);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}static startMap(e){e.startObject(1)}static addKeysSorted(e,t){e.addFieldInt8(0,+t,0)}static endMap(e){return e.endObject()}static createMap(e,t){return ji.startMap(e),ji.addKeysSorted(e,t),ji.endMap(e)}}!function(e){e[e.NONE=0]="NONE",e[e.Schema=1]="Schema",e[e.DictionaryBatch=2]="DictionaryBatch",e[e.RecordBatch=3]="RecordBatch",e[e.Tensor=4]="Tensor",e[e.SparseTensor=5]="SparseTensor"}(xi||(xi={}));class zi{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(e,t){return(t||new zi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,t){return e.setPosition(e.position()+4),(t||new zi).__init(e.readInt32(e.position())+e.position(),e)}version(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Rr.V1}headerType(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):xi.NONE}header(e){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,12);return n?(t||new Lr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,Rr.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,xi.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,e.createLong(0,0))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(e,t,n,r,i,o){return zi.startMessage(e),zi.addVersion(e,t),zi.addHeaderType(e,n),zi.addHeader(e,r),zi.addBodyLength(e,i),zi.addCustomMetadata(e,o),zi.endMessage(e)}}class Ui{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsNull(e,t){return(t||new Ui).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,t){return e.setPosition(e.position()+4),(t||new Ui).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return Ui.startNull(e),Ui.endNull(e)}}class Vi{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBinary(e,t){return(t||new Vi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,t){return e.setPosition(e.position()+4),(t||new Vi).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return Vi.startBinary(e),Vi.endBinary(e)}}class $i{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBool(e,t){return(t||new $i).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,t){return e.setPosition(e.position()+4),(t||new $i).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return $i.startBool(e),$i.endBool(e)}}class Wi{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUtf8(e,t){return(t||new Wi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,t){return e.setPosition(e.position()+4),(t||new Wi).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return Wi.startUtf8(e),Wi.endUtf8(e)}}class Hi{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsList(e,t){return(t||new Hi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,t){return e.setPosition(e.position()+4),(t||new Hi).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return Hi.startList(e),Hi.endList(e)}}class Yi{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsStruct_(e,t){return(t||new Yi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,t){return e.setPosition(e.position()+4),(t||new Yi).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return Yi.startStruct_(e),Yi.endStruct_(e)}}var Gi=Ir;const qi=new class extends nt{visit(e,t){return null==e||null==t?void 0:super.visit(e,t)}visitNull(e,t){return Ui.startNull(t),Ui.endNull(t)}visitInt(e,t){return Fr.startInt(t),Fr.addBitWidth(t,e.bitWidth),Fr.addIsSigned(t,e.isSigned),Fr.endInt(t)}visitFloat(e,t){return Ri.startFloatingPoint(t),Ri.addPrecision(t,e.precision),Ri.endFloatingPoint(t)}visitBinary(e,t){return Vi.startBinary(t),Vi.endBinary(t)}visitBool(e,t){return $i.startBool(t),$i.endBool(t)}visitUtf8(e,t){return Wi.startUtf8(t),Wi.endUtf8(t)}visitDecimal(e,t){return Oi.startDecimal(t),Oi.addScale(t,e.scale),Oi.addPrecision(t,e.precision),Oi.addBitWidth(t,e.bitWidth),Oi.endDecimal(t)}visitDate(e,t){return Pi.startDate(t),Pi.addUnit(t,e.unit),Pi.endDate(t)}visitTime(e,t){return Mi.startTime(t),Mi.addUnit(t,e.unit),Mi.addBitWidth(t,e.bitWidth),Mi.endTime(t)}visitTimestamp(e,t){const n=e.timezone&&t.createString(e.timezone)||void 0;return Di.startTimestamp(t),Di.addUnit(t,e.unit),void 0!==n&&Di.addTimezone(t,n),Di.endTimestamp(t)}visitInterval(e,t){return Ni.startInterval(t),Ni.addUnit(t,e.unit),Ni.endInterval(t)}visitList(e,t){return Hi.startList(t),Hi.endList(t)}visitStruct(e,t){return Yi.startStruct_(t),Yi.endStruct_(t)}visitUnion(e,t){Li.startTypeIdsVector(t,e.typeIds.length);const n=Li.createTypeIdsVector(t,e.typeIds);return Li.startUnion(t),Li.addMode(t,e.mode),Li.addTypeIds(t,n),Li.endUnion(t)}visitDictionary(e,t){const n=this.visit(e.indices,t);return Br.startDictionaryEncoding(t),Br.addId(t,new Gi(e.id,0)),Br.addIsOrdered(t,e.isOrdered),void 0!==n&&Br.addIndexType(t,n),Br.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return Fi.startFixedSizeBinary(t),Fi.addByteWidth(t,e.byteWidth),Fi.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return Bi.startFixedSizeList(t),Bi.addListSize(t,e.listSize),Bi.endFixedSizeList(t)}visitMap(e,t){return ji.startMap(t),ji.addKeysSorted(t,e.keysSorted),ji.endMap(t)}};function Ki(e){return new ao(e.count,Xi(e.columns),Ji(e.columns))}function Qi(e,t){return(e.children||[]).filter(Boolean).map((e=>Zn.fromJSON(e,t)))}function Xi(e){return(e||[]).reduce(((e,t)=>{return[...e,new co(t.count,(n=t.VALIDITY,(n||[]).reduce(((e,t)=>e+ +(0===t)),0))),...Xi(t.children)];var n}),[])}function Ji(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];for(let n=-1,r=(e||[]).length;++n<r;){const r=e[n];r.VALIDITY&&t.push(new lo(t.length,r.VALIDITY.length)),r.TYPE&&t.push(new lo(t.length,r.TYPE.length)),r.OFFSET&&t.push(new lo(t.length,r.OFFSET.length)),r.DATA&&t.push(new lo(t.length,r.DATA.length)),t=Ji(r.children,t)}return t}function Zi(e){return new Map(Object.entries(e||{}))}function eo(e){return new Ne(e.isSigned,e.bitWidth)}function to(e,t){const n=e.type.name;switch(n){case"NONE":case"null":return new De;case"binary":return new Be;case"utf8":return new je;case"bool":return new ze;case"list":return new Ye((t||[])[0]);case"struct":case"struct_":return new Ge(t||[])}switch(n){case"int":{const t=e.type;return new Ne(t.isSigned,t.bitWidth)}case"floatingpoint":{const t=e.type;return new Fe(o[t.precision])}case"decimal":{const t=e.type;return new Ue(t.scale,t.precision,t.bitWidth)}case"date":{const t=e.type;return new Ve(a[t.unit])}case"time":{const t=e.type;return new $e(s[t.unit],t.bitWidth)}case"timestamp":{const t=e.type;return new We(s[t.unit],t.timezone)}case"interval":{const t=e.type;return new He(l[t.unit])}case"union":{const n=e.type;return new qe(i[n.mode],n.typeIds||[],t||[])}case"fixedsizebinary":{const t=e.type;return new Ke(t.byteWidth)}case"fixedsizelist":{const n=e.type;return new Qe(n.listSize,(t||[])[0])}case"map":{const n=e.type;return new Xe((t||[])[0],n.keysSorted)}}throw new Error(`Unrecognized type: "${n}"`)}var no=Ir,ro=Nr,io=Dr;class oo{constructor(e,t,n,r){this._version=t,this._headerType=n,this.body=new Uint8Array(0),r&&(this._createHeader=()=>r),this._bodyLength="number"===typeof e?e:e.low}static fromJSON(e,t){const n=new oo(0,r.V4,t);return n._createHeader=function(e,t){return()=>{switch(t){case c.Schema:return Jn.fromJSON(e);case c.RecordBatch:return ao.fromJSON(e);case c.DictionaryBatch:return so.fromJSON(e)}throw new Error(`Unrecognized Message type: { name: ${c[t]}, type: ${t} }`)}}(e,t),n}static decode(e){e=new io(J(e));const t=zi.getRootAsMessage(e),n=t.bodyLength(),r=t.version(),i=t.headerType(),o=new oo(n,r,i);return o._createHeader=function(e,t){return()=>{switch(t){case c.Schema:return Jn.decode(e.header(new zr));case c.RecordBatch:return ao.decode(e.header(new Ii),e.version());case c.DictionaryBatch:return so.decode(e.header(new Ei),e.version())}throw new Error(`Unrecognized Message type: { name: ${c[t]}, type: ${t} }`)}}(t,i),o}static encode(e){const t=new ro;let n=-1;return e.isSchema()?n=Jn.encode(t,e.header()):e.isRecordBatch()?n=ao.encode(t,e.header()):e.isDictionaryBatch()&&(n=so.encode(t,e.header())),zi.startMessage(t),zi.addVersion(t,r.V4),zi.addHeader(t,n),zi.addHeaderType(t,e.headerType),zi.addBodyLength(t,new no(e.bodyLength,0)),zi.finishMessageBuffer(t,zi.endMessage(t)),t.asUint8Array()}static from(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(e instanceof Jn)return new oo(0,r.V4,c.Schema,e);if(e instanceof ao)return new oo(t,r.V4,c.RecordBatch,e);if(e instanceof so)return new oo(t,r.V4,c.DictionaryBatch,e);throw new Error(`Unrecognized Message header: ${e}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===c.Schema}isRecordBatch(){return this.headerType===c.RecordBatch}isDictionaryBatch(){return this.headerType===c.DictionaryBatch}}class ao{constructor(e,t,n){this._nodes=t,this._buffers=n,this._length="number"===typeof e?e:e.low}get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}}class so{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._data=e,this._isDelta=n,this._id="number"===typeof t?t:t.low}get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}}class lo{constructor(e,t){this.offset="number"===typeof e?e:e.low,this.length="number"===typeof t?t:t.low}}class co{constructor(e,t){this.length="number"===typeof e?e:e.low,this.nullCount="number"===typeof t?t:t.low}}function uo(e,t){const n=[];for(let r,i=-1,o=-1,a=e.childrenLength();++i<a;)(r=e.children(i))&&(n[++o]=Zn.decode(r,t));return n}function fo(e){const t=new Map;if(e)for(let n,r,i=-1,o=Math.trunc(e.customMetadataLength());++i<o;)(n=e.customMetadata(i))&&null!=(r=n.key())&&t.set(r,n.value());return t}function po(e){return new Ne(e.isSigned(),e.bitWidth())}function ho(e,t){const n=e.typeType();switch(n){case Mr.NONE:case Mr.Null:return new De;case Mr.Binary:return new Be;case Mr.Utf8:return new je;case Mr.Bool:return new ze;case Mr.List:return new Ye((t||[])[0]);case Mr.Struct_:return new Ge(t||[])}switch(n){case Mr.Int:{const t=e.type(new Fr);return new Ne(t.isSigned(),t.bitWidth())}case Mr.FloatingPoint:{const t=e.type(new Ri);return new Fe(t.precision())}case Mr.Decimal:{const t=e.type(new Oi);return new Ue(t.scale(),t.precision(),t.bitWidth())}case Mr.Date:{const t=e.type(new Pi);return new Ve(t.unit())}case Mr.Time:{const t=e.type(new Mi);return new $e(t.unit(),t.bitWidth())}case Mr.Timestamp:{const t=e.type(new Di);return new We(t.unit(),t.timezone())}case Mr.Interval:{const t=e.type(new Ni);return new He(t.unit())}case Mr.Union:{const n=e.type(new Li);return new qe(n.mode(),n.typeIdsArray()||[],t||[])}case Mr.FixedSizeBinary:{const t=e.type(new Fi);return new Ke(t.byteWidth())}case Mr.FixedSizeList:{const n=e.type(new Bi);return new Qe(n.listSize(),(t||[])[0])}case Mr.Map:{const n=e.type(new ji);return new Xe((t||[])[0],n.keysSorted())}}throw new Error(`Unrecognized type: "${Mr[n]}" (${n})`)}Zn.encode=function(e,t){let n=-1,r=-1,i=-1;const o=t.type;let a=t.typeId;Me.isDictionary(o)?(a=o.dictionary.typeId,i=qi.visit(o,e),r=qi.visit(o.dictionary,e)):r=qi.visit(o,e);const s=(o.children||[]).map((t=>Zn.encode(e,t))),l=jr.createChildrenVector(e,s),c=t.metadata&&t.metadata.size>0?jr.createCustomMetadataVector(e,[...t.metadata].map((t=>{let[n,r]=t;const i=e.createString(`${n}`),o=e.createString(`${r}`);return Lr.startKeyValue(e),Lr.addKey(e,i),Lr.addValue(e,o),Lr.endKeyValue(e)}))):-1;t.name&&(n=e.createString(t.name));jr.startField(e),jr.addType(e,r),jr.addTypeType(e,a),jr.addChildren(e,l),jr.addNullable(e,!!t.nullable),-1!==n&&jr.addName(e,n);-1!==i&&jr.addDictionary(e,i);-1!==c&&jr.addCustomMetadata(e,c);return jr.endField(e)},Zn.decode=function(e,t){let n,r,i,o,a,s;t&&(s=e.dictionary())?t.has(n=s.id().low)?(o=(o=s.indexType())?po(o):new Le,a=new et(t.get(n),o,n,s.isOrdered()),r=new Zn(e.name(),a,e.nullable(),fo(e))):(o=(o=s.indexType())?po(o):new Le,t.set(n,i=ho(e,uo(e,t))),a=new et(i,o,n,s.isOrdered()),r=new Zn(e.name(),a,e.nullable(),fo(e))):(i=ho(e,uo(e,t)),r=new Zn(e.name(),i,e.nullable(),fo(e)));return r||null},Zn.fromJSON=function(e,t){let n,r,i,o,a,s;return t&&(o=e.dictionary)?t.has(n=o.id)?(r=(r=o.indexType)?eo(r):new Le,s=new et(t.get(n),r,n,o.isOrdered),i=new Zn(e.name,s,e.nullable,Zi(e.customMetadata))):(r=(r=o.indexType)?eo(r):new Le,t.set(n,a=to(e,Qi(e,t))),s=new et(a,r,n,o.isOrdered),i=new Zn(e.name,s,e.nullable,Zi(e.customMetadata))):(a=to(e,Qi(e,t)),i=new Zn(e.name,a,e.nullable,Zi(e.customMetadata))),i||null},Jn.encode=function(e,t){const n=t.fields.map((t=>Zn.encode(e,t)));zr.startFieldsVector(e,n.length);const r=zr.createFieldsVector(e,n),i=t.metadata&&t.metadata.size>0?zr.createCustomMetadataVector(e,[...t.metadata].map((t=>{let[n,r]=t;const i=e.createString(`${n}`),o=e.createString(`${r}`);return Lr.startKeyValue(e),Lr.addKey(e,i),Lr.addValue(e,o),Lr.endKeyValue(e)}))):-1;zr.startSchema(e),zr.addFields(e,r),zr.addEndianness(e,mo?Or.Little:Or.Big),-1!==i&&zr.addCustomMetadata(e,i);return zr.endSchema(e)},Jn.decode=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map;const n=function(e,t){const n=[];for(let r,i=-1,o=-1,a=e.fieldsLength();++i<a;)(r=e.fields(i))&&(n[++o]=Zn.decode(r,t));return n}(e,t);return new Jn(n,fo(e),t)},Jn.fromJSON=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map;return new Jn(function(e,t){return(e.fields||[]).filter(Boolean).map((e=>Zn.fromJSON(e,t)))}(e,t),Zi(e.customMetadata),t)},ao.encode=function(e,t){const n=t.nodes||[],r=t.buffers||[];Ii.startNodesVector(e,n.length);for(const a of n.slice().reverse())co.encode(e,a);const i=e.endVector();Ii.startBuffersVector(e,r.length);for(const a of r.slice().reverse())lo.encode(e,a);const o=e.endVector();return Ii.startRecordBatch(e),Ii.addLength(e,new no(t.length,0)),Ii.addNodes(e,i),Ii.addBuffers(e,o),Ii.endRecordBatch(e)},ao.decode=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.V4;if(null!==e.compression())throw new Error("Record batch compression not implemented");return new ao(e.length(),function(e){const t=[];for(let n,r=-1,i=-1,o=e.nodesLength();++r<o;)(n=e.nodes(r))&&(t[++i]=co.decode(n));return t}(e),function(e,t){const n=[];for(let i,o=-1,a=-1,s=e.buffersLength();++o<s;)(i=e.buffers(o))&&(t<r.V4&&(i.bb_pos+=8*(o+1)),n[++a]=lo.decode(i));return n}(e,t))},ao.fromJSON=Ki,so.encode=function(e,t){const n=ao.encode(e,t.data);return Ei.startDictionaryBatch(e),Ei.addId(e,new no(t.id,0)),Ei.addIsDelta(e,t.isDelta),Ei.addData(e,n),Ei.endDictionaryBatch(e)},so.decode=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.V4;return new so(ao.decode(e.data(),t),e.id(),e.isDelta())},so.fromJSON=function(e){return new so(Ki(e.data),e.id,e.isDelta)},co.encode=function(e,t){return Ti.createFieldNode(e,new no(t.length,0),new no(t.nullCount,0))},co.decode=function(e){return new co(e.length(),e.nullCount())},lo.encode=function(e,t){return Ci.createBuffer(e,new no(t.offset,0),new no(t.length,0))},lo.decode=function(e){return new lo(e.offset(),e.length())};const mo=(()=>{const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]})(),yo=e=>`Expected ${c[e]} Message in stream, but was null or length 0.`,bo=e=>`Header pointer of flatbuffer-encoded ${c[e]} Message is null or length 0.`,vo=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,go=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`;class wo{constructor(e){this.source=e instanceof ri?e:new ri(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||-1===e.value&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?Jr:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(null!=e&&t.value.headerType!==e)throw new Error(yo(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);const t=J(this.source.read(e));if(t.byteLength<e)throw new Error(go(e,t.byteLength));return t.byteOffset%8===0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=c.Schema,n=this.readMessage(t),r=null===n||void 0===n?void 0:n.header();if(e&&!r)throw new Error(bo(t));return r}readMetadataLength(){const e=this.source.read(Ao),t=e&&new Dr(e),n=(null===t||void 0===t?void 0:t.readInt32(0))||0;return{done:0===n,value:n}}readMetadata(e){const t=this.source.read(e);if(!t)return Jr;if(t.byteLength<e)throw new Error(vo(e,t.byteLength));return{done:!1,value:oo.decode(t)}}}class _o{constructor(e,t){this.source=e instanceof ii?e:R(e)?new li(e,t):new ii(e)}[Symbol.asyncIterator](){return this}next(){return F(this,void 0,void 0,(function*(){let e;return(e=yield this.readMetadataLength()).done||-1===e.value&&(e=yield this.readMetadataLength()).done||(e=yield this.readMetadata(e.value)).done?Jr:e}))}throw(e){return F(this,void 0,void 0,(function*(){return yield this.source.throw(e)}))}return(e){return F(this,void 0,void 0,(function*(){return yield this.source.return(e)}))}readMessage(e){return F(this,void 0,void 0,(function*(){let t;if((t=yield this.next()).done)return null;if(null!=e&&t.value.headerType!==e)throw new Error(yo(e));return t.value}))}readMessageBody(e){return F(this,void 0,void 0,(function*(){if(e<=0)return new Uint8Array(0);const t=J(yield this.source.read(e));if(t.byteLength<e)throw new Error(go(e,t.byteLength));return t.byteOffset%8===0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}))}readSchema(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return F(this,void 0,void 0,(function*(){const t=c.Schema,n=yield this.readMessage(t),r=null===n||void 0===n?void 0:n.header();if(e&&!r)throw new Error(bo(t));return r}))}readMetadataLength(){return F(this,void 0,void 0,(function*(){const e=yield this.source.read(Ao),t=e&&new Dr(e),n=(null===t||void 0===t?void 0:t.readInt32(0))||0;return{done:0===n,value:n}}))}readMetadata(e){return F(this,void 0,void 0,(function*(){const t=yield this.source.read(e);if(!t)return Jr;if(t.byteLength<e)throw new Error(vo(e,t.byteLength));return{done:!1,value:oo.decode(t)}}))}}class So extends wo{constructor(e){super(new Uint8Array(0)),this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof Zr?e:new Zr(e)}next(){const{_json:e}=this;if(!this._schema){this._schema=!0;return{done:!1,value:oo.fromJSON(e.schema,c.Schema)}}if(this._dictionaryIndex<e.dictionaries.length){const t=e.dictionaries[this._dictionaryIndex++];this._body=t.data.columns;return{done:!1,value:oo.fromJSON(t,c.DictionaryBatch)}}if(this._batchIndex<e.batches.length){const t=e.batches[this._batchIndex++];this._body=t.columns;return{done:!1,value:oo.fromJSON(t,c.RecordBatch)}}return this._body=[],Jr}readMessageBody(e){return function e(t){return(t||[]).reduce(((t,n)=>[...t,...n.VALIDITY&&[n.VALIDITY]||[],...n.TYPE&&[n.TYPE]||[],...n.OFFSET&&[n.OFFSET]||[],...n.DATA&&[n.DATA]||[],...e(n.children)]),[])}(this._body)}readMessage(e){let t;if((t=this.next()).done)return null;if(null!=e&&t.value.headerType!==e)throw new Error(yo(e));return t.value}readSchema(){const e=c.Schema,t=this.readMessage(e),n=null===t||void 0===t?void 0:t.header();if(!t||!n)throw new Error(bo(e));return n}}const Ao=4,xo="ARROW1",ko=new Uint8Array(6);for(let da=0;da<6;da+=1)ko[da]=xo.codePointAt(da);function Co(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(let n=-1,r=ko.length;++n<r;)if(ko[n]!==e[t+n])return!1;return!0}const To=ko.length,Io=To+Ao,Eo=2*To+Ao;class Ro extends ei{constructor(e){super(),this._impl=e}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(e){return this._impl.throw(e)}return(e){return this._impl.return(e)}cancel(){return this._impl.cancel()}reset(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}open(e){const t=this._impl.open(e);return k(t)?t.then((()=>this)):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return qr.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return qr.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}static from(e){return e instanceof Ro?e:I(e)?function(e){return new Oo(new zo(e))}(e):R(e)?function(e){return F(this,void 0,void 0,(function*(){const{size:t}=yield e.stat(),n=new li(e,t);return t>=Eo&&Co(yield n.readAt(0,To+7&-8))?new Do(new jo(n)):new Po(new Fo(n))}))}(e):k(e)?(()=>F(this,void 0,void 0,(function*(){return yield Ro.from(yield e)})))():O(e)||M(e)||D(e)||T(e)?function(e){return F(this,void 0,void 0,(function*(){const t=yield e.peek(To+7&-8);return t&&t.byteLength>=4?Co(t)?new Mo(new Bo(yield e.read())):new Po(new Fo(e)):new Po(new Fo(function(){return z(this,arguments,(function*(){}))}()))}))}(new ii(e)):function(e){const t=e.peek(To+7&-8);return t&&t.byteLength>=4?Co(t)?new Mo(new Bo(e.read())):new Oo(new Lo(e)):new Oo(new Lo(function*(){}()))}(new ri(e))}static readAll(e){return e instanceof Ro?e.isSync()?Vo(e):$o(e):I(e)||ArrayBuffer.isView(e)||C(e)||E(e)?Vo(e):$o(e)}}class Oo extends Ro{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return z(this,arguments,(function*(){yield j(yield*U(V(this[Symbol.iterator]())))}))}}class Po extends Ro{constructor(e){super(e),this._impl=e}readAll(){var e,t;return F(this,void 0,void 0,(function*(){const n=new Array;try{for(var r,i=V(this);!(r=yield i.next()).done;){const e=r.value;n.push(e)}}catch(o){e={error:o}}finally{try{r&&!r.done&&(t=i.return)&&(yield t.call(i))}finally{if(e)throw e.error}}return n}))}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class Mo extends Oo{constructor(e){super(e),this._impl=e}}class Do extends Po{constructor(e){super(e),this._impl=e}}class No{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map;this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){const n=this._loadVectors(e,t,this.schema.fields),r=Xn({type:new Ge(this.schema.fields),length:e.length,children:n});return new yr(this.schema,r)}_loadDictionaryBatch(e,t){const{id:n,isDelta:r}=e,{dictionaries:i,schema:o}=this,a=i.get(n);if(r||!a){const i=o.dictionaries.get(n),s=this._loadVectors(e.data,t,[i]);return(a&&r?a.concat(new Gn(s)):new Gn(s)).memoize()}return a.memoize()}_loadVectors(e,t,n){return new mi(t,e.nodes,e.buffers,this.dictionaries).visitMany(n)}}class Lo extends No{constructor(e,t){super(t),this._reader=I(e)?new So(this._handle=e):new wo(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=Uo(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):Jr}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):Jr}next(){if(this.closed)return Jr;let e;const{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else{if(e.isRecordBatch()){this._recordBatchIndex++;const n=e.header(),r=t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(n,r)}}if(e.isDictionaryBatch()){this._dictionaryIndex++;const n=e.header(),r=t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new gr(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}}class Fo extends No{constructor(e,t){super(t),this._reader=new _o(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return F(this,void 0,void 0,(function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}))}open(e){return F(this,void 0,void 0,(function*(){return this.closed||(this.autoDestroy=Uo(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this}))}throw(e){return F(this,void 0,void 0,(function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):Jr}))}return(e){return F(this,void 0,void 0,(function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):Jr}))}next(){return F(this,void 0,void 0,(function*(){if(this.closed)return Jr;let e;const{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else{if(e.isRecordBatch()){this._recordBatchIndex++;const n=e.header(),r=yield t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(n,r)}}if(e.isDictionaryBatch()){this._dictionaryIndex++;const n=e.header(),r=yield t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new gr(this.schema)}):yield this.return()}))}_readNextMessageAndValidate(e){return F(this,void 0,void 0,(function*(){return yield this._reader.readMessage(e)}))}}class Bo extends Lo{constructor(e,t){super(e instanceof si?e:new si(e),t)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(const e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){var t;if(this.closed)return null;this._footer||this.open();const n=null===(t=this._footer)||void 0===t?void 0:t.getRecordBatch(e);if(n&&this._handle.seek(n.offset)){const e=this._reader.readMessage(c.RecordBatch);if(null===e||void 0===e?void 0:e.isRecordBatch()){const t=e.header(),n=this._reader.readMessageBody(e.bodyLength);return this._loadRecordBatch(t,n)}}return null}_readDictionaryBatch(e){var t;const n=null===(t=this._footer)||void 0===t?void 0:t.getDictionaryBatch(e);if(n&&this._handle.seek(n.offset)){const e=this._reader.readMessage(c.DictionaryBatch);if(null===e||void 0===e?void 0:e.isDictionaryBatch()){const t=e.header(),n=this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}}_readFooter(){const{_handle:e}=this,t=e.size-Io,n=e.readInt32(t),r=e.readAt(t-n,n);return Hr.decode(r)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){const n=null===(t=this._footer)||void 0===t?void 0:t.getRecordBatch(this._recordBatchIndex);if(n&&this._handle.seek(n.offset))return this._reader.readMessage(e)}return null}}class jo extends Fo{constructor(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const i="number"!==typeof n[0]?n.shift():void 0,o=n[0]instanceof Map?n.shift():void 0;super(e instanceof li?e:new li(e,i),o)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isFile(){return!0}isAsync(){return!0}open(e){const t=Object.create(null,{open:{get:()=>super.open}});return F(this,void 0,void 0,(function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(const e of this._footer.dictionaryBatches())e&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)}))}readRecordBatch(e){var t;return F(this,void 0,void 0,(function*(){if(this.closed)return null;this._footer||(yield this.open());const n=null===(t=this._footer)||void 0===t?void 0:t.getRecordBatch(e);if(n&&(yield this._handle.seek(n.offset))){const e=yield this._reader.readMessage(c.RecordBatch);if(null===e||void 0===e?void 0:e.isRecordBatch()){const t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength);return this._loadRecordBatch(t,n)}}return null}))}_readDictionaryBatch(e){var t;return F(this,void 0,void 0,(function*(){const n=null===(t=this._footer)||void 0===t?void 0:t.getDictionaryBatch(e);if(n&&(yield this._handle.seek(n.offset))){const e=yield this._reader.readMessage(c.DictionaryBatch);if(null===e||void 0===e?void 0:e.isDictionaryBatch()){const t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}}))}_readFooter(){return F(this,void 0,void 0,(function*(){const{_handle:e}=this;e._pending&&(yield e._pending);const t=e.size-Io,n=yield e.readInt32(t),r=yield e.readAt(t-n,n);return Hr.decode(r)}))}_readNextMessageAndValidate(e){return F(this,void 0,void 0,(function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){const t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&(yield this._handle.seek(t.offset)))return yield this._reader.readMessage(e)}return null}))}}class zo extends Lo{constructor(e,t){super(e,t)}_loadVectors(e,t,n){return new yi(t,e.nodes,e.buffers,this.dictionaries).visitMany(n)}}function Uo(e,t){return t&&"boolean"===typeof t.autoDestroy?t.autoDestroy:e.autoDestroy}function*Vo(e){const t=Ro.from(e);try{if(!t.open({autoDestroy:!1}).closed)do{yield t}while(!t.reset().open().closed)}finally{t.cancel()}}function $o(e){return z(this,arguments,(function*(){const t=yield j(Ro.from(e));try{if(!(yield j(t.open({autoDestroy:!1}))).closed)do{yield yield j(t)}while(!(yield j(t.reset().open())).closed)}finally{yield j(t.cancel())}}))}class Wo extends nt{constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}static assemble(){const e=t=>t.flatMap((t=>Array.isArray(t)?e(t):t instanceof yr?t.data.children:t.data)),t=new Wo;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.visitMany(e(r)),t}visit(e){if(e instanceof Gn)return this.visitMany(e.data),this;const{type:t}=e;if(!Me.isDictionary(t)){const{length:n,nullCount:r}=e;if(n>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");Me.isNull(t)||Ho.call(this,r<=0?new Uint8Array(0):Cn(e.offset,n,e.nullBitmap)),this.nodes.push(new co(n,r))}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.clone(e.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}}function Ho(e){const t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new lo(this._byteLength,t)),this._byteLength+=t,this}function Yo(e){return Ho.call(this,e.values.subarray(0,e.length*e.stride))}function Go(e){const{length:t,values:n,valueOffsets:r}=e,i=r[0],o=r[t],a=Math.min(o-i,n.byteLength-i);return Ho.call(this,ne(-r[0],t,r)),Ho.call(this,n.subarray(i,i+a)),this}function qo(e){const{length:t,valueOffsets:n}=e;return n&&Ho.call(this,ne(n[0],t,n)),this.visit(e.children[0])}function Ko(e){return this.visitMany(e.type.children.map(((t,n)=>e.children[n])).filter(Boolean))[0]}Wo.prototype.visitBool=function(e){let t;return e.nullCount>=e.length?Ho.call(this,new Uint8Array(0)):(t=e.values)instanceof Uint8Array?Ho.call(this,Cn(e.offset,e.length,t)):Ho.call(this,Tn(e.values))},Wo.prototype.visitInt=Yo,Wo.prototype.visitFloat=Yo,Wo.prototype.visitUtf8=Go,Wo.prototype.visitBinary=Go,Wo.prototype.visitFixedSizeBinary=Yo,Wo.prototype.visitDate=Yo,Wo.prototype.visitTimestamp=Yo,Wo.prototype.visitTime=Yo,Wo.prototype.visitDecimal=Yo,Wo.prototype.visitList=qo,Wo.prototype.visitStruct=Ko,Wo.prototype.visitUnion=function(e){const{type:t,length:n,typeIds:r,valueOffsets:o}=e;if(Ho.call(this,r),t.mode===i.Sparse)return Ko.call(this,e);if(t.mode===i.Dense){if(e.offset<=0)return Ho.call(this,o),Ko.call(this,e);{const i=r.reduce(((e,t)=>Math.max(e,t)),r[0]),a=new Int32Array(i+1),s=new Int32Array(i+1).fill(-1),l=new Int32Array(n),c=ne(-o[0],n,o);for(let e,t,o=-1;++o<n;)-1===(t=s[e=r[o]])&&(t=s[e]=c[e]),l[o]=c[o]-t,++a[e];Ho.call(this,l);for(let r,o=-1,u=t.children.length;++o<u;)if(r=e.children[o]){const e=t.typeIds[o],i=Math.min(n,a[e]);this.visit(r.slice(s[e],i))}}}return this},Wo.prototype.visitInterval=Yo,Wo.prototype.visitFixedSizeList=qo,Wo.prototype.visitMap=qo;class Qo extends ei{constructor(e){super(),this._position=0,this._started=!1,this._sink=new ni,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,x(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy="boolean"!==typeof e.autoDestroy||e.autoDestroy,this._writeLegacyIpcFormat="boolean"===typeof e.writeLegacyIpcFormat&&e.writeLegacyIpcFormat}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}toString(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._sink.toString(e)}toUint8Array(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._sink.toUint8Array(e)}writeAll(e){return k(e)?e.then((e=>this.writeAll(e))):T(e)?ea(this,e):Zo(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._sink,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;var n;return e===this._sink||e instanceof ni?this._sink=e:(this._sink=new ni,e&&(x(n=e)&&A(n.abort)&&A(n.getWriter)&&!P(n))?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&(e=>x(e)&&A(e.end)&&A(e.write)&&S(e.writable)&&!P(e))(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,t&&pr(t,this._schema)||(null==t?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}write(e){let t=null;if(!this._sink)throw new Error("RecordBatchWriter is closed");if(null==e)return this.finish()&&void 0;if(e instanceof Sr&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof yr&&!(t=e.schema))return this.finish()&&void 0;if(t&&!pr(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof yr?e instanceof gr||this._writeRecordBatch(e):e instanceof Sr?this.writeAll(e.batches):C(e)&&this.writeAll(e)}_writeMessage(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:8)-1,n=oo.encode(e),r=n.byteLength,i=this._writeLegacyIpcFormat?4:8,o=r+i+t&~t,a=o-r-i;return e.headerType===c.RecordBatch?this._recordBatchBlocks.push(new Gr(o,e.bodyLength,this._position)):e.headerType===c.DictionaryBatch&&this._dictionaryBlocks.push(new Gr(o,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(o-i)),r>0&&this._write(n),this._writePadding(a)}_write(e){if(this._started){const t=J(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(oo.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(ko)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){const{byteLength:t,nodes:n,bufferRegions:r,buffers:i}=Wo.assemble(e),o=new ao(e.numRows,n,r),a=oo.from(o,t);return this._writeDictionaries(e)._writeMessage(a)._writeBodyBuffers(i)}_writeDictionaryBatch(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));const{byteLength:r,nodes:i,bufferRegions:o,buffers:a}=Wo.assemble(new Gn([e])),s=new ao(e.length,i,o),l=new so(s,t,n),c=oo.from(l,r);return this._writeMessage(c)._writeBodyBuffers(a)}_writeBodyBuffers(e){let t,n,r;for(let i=-1,o=e.length;++i<o;)(t=e[i])&&(n=t.byteLength)>0&&(this._write(t),(r=(n+7&-8)-n)>0&&this._writePadding(r));return this}_writeDictionaries(e){for(let[t,n]of e.dictionaries){let e=this._dictionaryDeltaOffsets.get(t)||0;if(0===e||(n=null===n||void 0===n?void 0:n.slice(e)).length>0)for(const r of n.data)this._writeDictionaryBatch(r,t,e>0),e+=r.length}return this}}class Xo extends Qo{static writeAll(e,t){const n=new Xo(t);return k(e)?e.then((e=>n.writeAll(e))):T(e)?ea(n,e):Zo(n,e)}}class Jo extends Qo{static writeAll(e){const t=new Jo;return k(e)?e.then((e=>t.writeAll(e))):T(e)?ea(t,e):Zo(t,e)}constructor(){super(),this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){const t=Hr.encode(new Hr(e,r.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}}function Zo(e,t){let n=t;t instanceof Sr&&(n=t.batches,e.reset(void 0,t.schema));for(const r of n)e.write(r);return e.finish()}function ea(e,t){var n,r,i,o;return F(this,void 0,void 0,(function*(){try{for(n=V(t);!(r=yield n.next()).done;){const t=r.value;e.write(t)}}catch(a){i={error:a}}finally{try{r&&!r.done&&(o=n.return)&&(yield o.call(n))}finally{if(i)throw i.error}}return e.finish()}))}function ta(e){const t=Ro.from(e);return k(t)?t.then((e=>ta(e))):t.isAsync()?t.readAll().then((e=>new Sr(e))):new Sr(t.readAll())}function na(e){return("stream"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"stream")?Xo:Jo).writeAll(e).toUint8Array(!0)}var ra,ia=function(){function e(e,t,n,r){var i=this;this.getCell=function(e,t){var n=e<i.headerRows&&t<i.headerColumns,r=e>=i.headerRows&&t<i.headerColumns,o=e<i.headerRows&&t>=i.headerColumns;if(n){var a=["blank"];return t>0&&a.push("level"+e),{type:"blank",classNames:a.join(" "),content:""}}if(o)return{type:"columns",classNames:(a=["col_heading","level"+e,"col"+(l=t-i.headerColumns)]).join(" "),content:i.getContent(i.columnsTable,l,e)};if(r){a=["row_heading","level"+t,"row"+(s=e-i.headerRows)];return{type:"index",id:"T_".concat(i.uuid,"level").concat(t,"_row").concat(s),classNames:a.join(" "),content:i.getContent(i.indexTable,s,t)}}a=["data","row"+(s=e-i.headerRows),"col"+(l=t-i.headerColumns)];var s,l,c=i.styler?i.getContent(i.styler.displayValuesTable,s,l):i.getContent(i.dataTable,s,l);return{type:"data",id:"T_".concat(i.uuid,"row").concat(s,"_col").concat(l),classNames:a.join(" "),content:c}},this.getContent=function(e,t,n){var r=e.getChildAt(n);return null===r?"":i.getColumnTypeId(e,n)===u.Timestamp?i.nanosToDate(r.get(t)):r.get(t)},this.dataTable=ta(e),this.indexTable=ta(t),this.columnsTable=ta(n),this.styler=r?{caption:r.caption,displayValuesTable:ta(r.displayValues),styles:r.styles,uuid:r.uuid}:void 0}return Object.defineProperty(e.prototype,"rows",{get:function(){return this.indexTable.numRows+this.columnsTable.numCols},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return this.indexTable.numCols+this.columnsTable.numRows},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headerRows",{get:function(){return this.rows-this.dataRows},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headerColumns",{get:function(){return this.columns-this.dataColumns},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataRows",{get:function(){return this.dataTable.numRows},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataColumns",{get:function(){return this.dataTable.numCols},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uuid",{get:function(){return this.styler&&this.styler.uuid},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"caption",{get:function(){return this.styler&&this.styler.caption},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"styles",{get:function(){return this.styler&&this.styler.styles},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"table",{get:function(){return this.dataTable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"index",{get:function(){return this.indexTable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnTable",{get:function(){return this.columnsTable},enumerable:!1,configurable:!0}),e.prototype.serialize=function(){return{data:na(this.dataTable),index:na(this.indexTable),columns:na(this.columnsTable)}},e.prototype.getColumnTypeId=function(e,t){return e.schema.fields[t].type.typeId},e.prototype.nanosToDate=function(e){return new Date(e/1e6)},e}(),oa=function(){return oa=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},oa.apply(this,arguments)};!function(e){e.COMPONENT_READY="streamlit:componentReady",e.SET_COMPONENT_VALUE="streamlit:setComponentValue",e.SET_FRAME_HEIGHT="streamlit:setFrameHeight"}(ra||(ra={}));var aa=function(){function e(){}return e.API_VERSION=1,e.RENDER_EVENT="streamlit:render",e.events=new EventTarget,e.registeredMessageListener=!1,e.setComponentReady=function(){e.registeredMessageListener||(window.addEventListener("message",e.onMessageEvent),e.registeredMessageListener=!0),e.sendBackMsg(ra.COMPONENT_READY,{apiVersion:e.API_VERSION})},e.setFrameHeight=function(t){void 0===t&&(t=document.body.scrollHeight),t!==e.lastFrameHeight&&(e.lastFrameHeight=t,e.sendBackMsg(ra.SET_FRAME_HEIGHT,{height:t}))},e.setComponentValue=function(t){var n;t instanceof ia?(n="dataframe",t=t.serialize()):!function(e){var t=!1;try{t=e instanceof BigInt64Array||e instanceof BigUint64Array}catch(n){}return e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array||t}(t)?t instanceof ArrayBuffer?(n="bytes",t=new Uint8Array(t)):n="json":(n="bytes",t=new Uint8Array(t.buffer)),e.sendBackMsg(ra.SET_COMPONENT_VALUE,{value:t,dataType:n})},e.onMessageEvent=function(t){if(t.data.type===e.RENDER_EVENT)e.onRenderMessage(t.data)},e.onRenderMessage=function(t){var n=t.args;null==n&&(console.error("Got null args in onRenderMessage. This should never happen"),n={});var r=t.dfs&&t.dfs.length>0?e.argsDataframeToObject(t.dfs):{};n=oa(oa({},n),r);var i=Boolean(t.disabled),o=t.theme;o&&sa(o);var a={disabled:i,args:n,theme:o},s=new CustomEvent(e.RENDER_EVENT,{detail:a});e.events.dispatchEvent(s)},e.argsDataframeToObject=function(t){var n=t.map((function(t){var n=t.key,r=t.value;return[n,e.toArrowTable(r)]}));return Object.fromEntries(n)},e.toArrowTable=function(e){var t,n=(t=e.data).data,r=t.index,i=t.columns,o=t.styler;return new ia(n,r,i,o)},e.sendBackMsg=function(e,t){window.parent.postMessage(oa({isStreamlitMessage:!0,type:e},t),"*")},e}(),sa=function(e){var t=document.createElement("style");document.head.appendChild(t),t.innerHTML="\n :root {\n --primary-color: ".concat(e.primaryColor,";\n --background-color: ").concat(e.backgroundColor,";\n --secondary-background-color: ").concat(e.secondaryBackgroundColor,";\n --text-color: ").concat(e.textColor,";\n --font: ").concat(e.font,";\n }\n\n body {\n background-color: var(--background-color);\n color: var(--text-color);\n }\n ")};var la=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ca=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return la(t,e),t.prototype.componentDidMount=function(){aa.setFrameHeight()},t.prototype.componentDidUpdate=function(){aa.setFrameHeight()},t}(h.PureComponent);function ua(e){var t=function(t){function n(e){var n=t.call(this,e)||this;return n.componentDidMount=function(){aa.events.addEventListener(aa.RENDER_EVENT,n.onRenderEvent),aa.setComponentReady()},n.componentDidUpdate=function(){null!=n.state.componentError&&aa.setFrameHeight()},n.componentWillUnmount=function(){aa.events.removeEventListener(aa.RENDER_EVENT,n.onRenderEvent)},n.onRenderEvent=function(e){n.setState({renderData:e.detail})},n.state={renderData:void 0,componentError:void 0},n}return la(n,t),n.prototype.render=function(){return null!=this.state.componentError?h.createElement("div",null,h.createElement("h1",null,"Component Error"),h.createElement("span",null,this.state.componentError.message)):null==this.state.renderData?null:h.createElement(e,{width:window.innerWidth,disabled:this.state.renderData.disabled,args:this.state.renderData.args,theme:this.state.renderData.theme})},n.getDerivedStateFromError=function(e){return{componentError:e}},n}(h.PureComponent);return p()(t,e)}},709:(e,t,n)=>{"use strict";var r=n(5181),i="function"===typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,u=i?Symbol.for("react.provider"):60109,d=i?Symbol.for("react.context"):60110,f=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,h=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,y="function"===typeof Symbol&&Symbol.iterator;function b(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g={};function w(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||v}function _(){}function S(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||v}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(b(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},_.prototype=w.prototype;var A=S.prototype=new _;A.constructor=S,r(A,w.prototype),A.isPureReactComponent=!0;var x={current:null},k=Object.prototype.hasOwnProperty,C={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)k.call(t,r)&&!C.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:x.current}}function I(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var E=/\/+/g,R=[];function O(e,t,n,r){if(R.length){var i=R.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function P(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>R.length&&R.push(e)}function M(e,t,n,r){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var s=!1;if(null===e)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case o:case a:s=!0}}if(s)return n(r,e,""===t?"."+N(e,0):t),1;if(s=0,t=""===t?".":t+":",Array.isArray(e))for(var l=0;l<e.length;l++){var c=t+N(i=e[l],l);s+=M(i,c,n,r)}else if(null===e||"object"!==typeof e?c=null:c="function"===typeof(c=y&&e[y]||e["@@iterator"])?c:null,"function"===typeof c)for(e=c.call(e),l=0;!(i=e.next()).done;)s+=M(i=i.value,c=t+N(i,l++),n,r);else if("object"===i)throw n=""+e,Error(b(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return s}function D(e,t,n){return null==e?0:M(e,"",t,n)}function N(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function L(e,t){e.func.call(e.context,t,e.count++)}function F(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?B(e,r,n,(function(e){return e})):null!=e&&(I(e)&&(e=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(E,"$&/")+"/")+n)),r.push(e))}function B(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(E,"$&/")+"/"),D(e,F,t=O(t,o,r,i)),P(t)}var j={current:null};function z(){var e=j.current;if(null===e)throw Error(b(321));return e}var U={ReactCurrentDispatcher:j,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:x,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return B(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;D(e,L,t=O(null,null,t,n)),P(t)},count:function(e){return D(e,(function(){return null}),null)},toArray:function(e){var t=[];return B(e,t,null,(function(e){return e})),t},only:function(e){if(!I(e))throw Error(b(143));return e}},t.Component=w,t.Fragment=s,t.Profiler=c,t.PureComponent=S,t.StrictMode=l,t.Suspense=p,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(b(267,e));var i=r({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=x.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)k.call(t,u)&&!C.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){c=Array(u);for(var d=0;d<u;d++)c[d]=arguments[d+2];i.children=c}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:u,_context:e},e.Consumer=e},t.createElement=T,t.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:f,render:e}},t.isValidElement=I,t.lazy=function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return z().useCallback(e,t)},t.useContext=function(e,t){return z().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return z().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return z().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return z().useLayoutEffect(e,t)},t.useMemo=function(e,t){return z().useMemo(e,t)},t.useReducer=function(e,t,n){return z().useReducer(e,t,n)},t.useRef=function(e){return z().useRef(e)},t.useState=function(e){return z().useState(e)},t.version="16.14.0"},5946:(e,t,n)=>{"use strict";e.exports=n(709)},4994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},9461:function(e){e.exports=function(){"use strict";for(var e=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e<t?t:e>n?n:e},t=e,n=function(e){e._clipped=!1,e._unclipped=e.slice(0);for(var n=0;n<=3;n++)n<3?((e[n]<0||e[n]>255)&&(e._clipped=!0),e[n]=t(e[n],0,255)):3===n&&(e[n]=t(e[n],0,1));return e},r={},i=0,o=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];i<o.length;i+=1){var a=o[i];r["[object "+a+"]"]=a.toLowerCase()}var s=function(e){return r[Object.prototype.toString.call(e)]||"object"},l=s,c=function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==l(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},u=s,d=function(e){if(e.length<2)return null;var t=e.length-1;return"string"==u(e[t])?e[t].toLowerCase():null},f=Math.PI,p={clip_rgb:n,limit:e,type:s,unpack:c,last:d,PI:f,TWOPI:2*f,PITHIRD:f/3,DEG2RAD:f/180,RAD2DEG:180/f},h={format:{},autodetect:[]},m=p.last,y=p.clip_rgb,b=p.type,v=h,g=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=this;if("object"===b(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var r=m(e),i=!1;if(!r){i=!0,v.sorted||(v.autodetect=v.autodetect.sort((function(e,t){return t.p-e.p})),v.sorted=!0);for(var o=0,a=v.autodetect;o<a.length;o+=1){var s=a[o];if(r=s.test.apply(s,e))break}}if(!v.format[r])throw new Error("unknown format: "+e);var l=v.format[r].apply(null,i?e:e.slice(0,-1));n._rgb=y(l),3===n._rgb.length&&n._rgb.push(1)};g.prototype.toString=function(){return"function"==b(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var w=g,_=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(_.Color,[null].concat(e)))};_.Color=w,_.version="2.4.2";var S=_,A=p.unpack,x=Math.max,k=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=A(e,"rgb"),r=n[0],i=n[1],o=n[2],a=1-x(r/=255,x(i/=255,o/=255)),s=a<1?1/(1-a):0;return[(1-r-a)*s,(1-i-a)*s,(1-o-a)*s,a]},C=k,T=p.unpack,I=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=T(e,"cmyk"))[0],r=e[1],i=e[2],o=e[3],a=e.length>4?e[4]:1;return 1===o?[0,0,0,a]:[n>=1?0:255*(1-n)*(1-o),r>=1?0:255*(1-r)*(1-o),i>=1?0:255*(1-i)*(1-o),a]},E=I,R=S,O=w,P=h,M=p.unpack,D=p.type,N=C;O.prototype.cmyk=function(){return N(this._rgb)},R.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(O,[null].concat(e,["cmyk"])))},P.format.cmyk=E,P.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=M(e,"cmyk"),"array"===D(e)&&4===e.length)return"cmyk"}});var L=p.unpack,F=p.last,B=function(e){return Math.round(100*e)/100},j=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=L(e,"hsla"),r=F(e)||"lsa";return n[0]=B(n[0]||0),n[1]=B(100*n[1])+"%",n[2]=B(100*n[2])+"%","hsla"===r||n.length>3&&n[3]<1?(n[3]=n.length>3?n[3]:1,r="hsla"):n.length=3,r+"("+n.join(",")+")"},z=j,U=p.unpack,V=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=U(e,"rgba"))[0],r=e[1],i=e[2];n/=255,r/=255,i/=255;var o,a,s=Math.min(n,r,i),l=Math.max(n,r,i),c=(l+s)/2;return l===s?(o=0,a=Number.NaN):o=c<.5?(l-s)/(l+s):(l-s)/(2-l-s),n==l?a=(r-i)/(l-s):r==l?a=2+(i-n)/(l-s):i==l&&(a=4+(n-r)/(l-s)),(a*=60)<0&&(a+=360),e.length>3&&void 0!==e[3]?[a,o,c,e[3]]:[a,o,c]},$=V,W=p.unpack,H=p.last,Y=z,G=$,q=Math.round,K=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=W(e,"rgba"),r=H(e)||"rgb";return"hsl"==r.substr(0,3)?Y(G(n),r):(n[0]=q(n[0]),n[1]=q(n[1]),n[2]=q(n[2]),("rgba"===r||n.length>3&&n[3]<1)&&(n[3]=n.length>3?n[3]:1,r="rgba"),r+"("+n.slice(0,"rgb"===r?3:4).join(",")+")")},Q=K,X=p.unpack,J=Math.round,Z=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];var r,i,o,a=(t=X(t,"hsl"))[0],s=t[1],l=t[2];if(0===s)r=i=o=255*l;else{var c=[0,0,0],u=[0,0,0],d=l<.5?l*(1+s):l+s-l*s,f=2*l-d,p=a/360;c[0]=p+1/3,c[1]=p,c[2]=p-1/3;for(var h=0;h<3;h++)c[h]<0&&(c[h]+=1),c[h]>1&&(c[h]-=1),6*c[h]<1?u[h]=f+6*(d-f)*c[h]:2*c[h]<1?u[h]=d:3*c[h]<2?u[h]=f+(d-f)*(2/3-c[h])*6:u[h]=f;r=(e=[J(255*u[0]),J(255*u[1]),J(255*u[2])])[0],i=e[1],o=e[2]}return t.length>3?[r,i,o,t[3]]:[r,i,o,1]},ee=Z,te=ee,ne=h,re=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,ie=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,oe=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,ae=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,se=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,le=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ce=Math.round,ue=function(e){var t;if(e=e.toLowerCase().trim(),ne.format.named)try{return ne.format.named(e)}catch(h){}if(t=e.match(re)){for(var n=t.slice(1,4),r=0;r<3;r++)n[r]=+n[r];return n[3]=1,n}if(t=e.match(ie)){for(var i=t.slice(1,5),o=0;o<4;o++)i[o]=+i[o];return i}if(t=e.match(oe)){for(var a=t.slice(1,4),s=0;s<3;s++)a[s]=ce(2.55*a[s]);return a[3]=1,a}if(t=e.match(ae)){for(var l=t.slice(1,5),c=0;c<3;c++)l[c]=ce(2.55*l[c]);return l[3]=+l[3],l}if(t=e.match(se)){var u=t.slice(1,4);u[1]*=.01,u[2]*=.01;var d=te(u);return d[3]=1,d}if(t=e.match(le)){var f=t.slice(1,4);f[1]*=.01,f[2]*=.01;var p=te(f);return p[3]=+t[4],p}};ue.test=function(e){return re.test(e)||ie.test(e)||oe.test(e)||ae.test(e)||se.test(e)||le.test(e)};var de=ue,fe=S,pe=w,he=h,me=p.type,ye=Q,be=de;pe.prototype.css=function(e){return ye(this._rgb,e)},fe.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(pe,[null].concat(e,["css"])))},he.format.css=be,he.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===me(e)&&be.test(e))return"css"}});var ve=w,ge=S,we=h,_e=p.unpack;we.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=_e(e,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},ge.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ve,[null].concat(e,["gl"])))},ve.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var Se=p.unpack,Ae=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=Se(e,"rgb"),i=r[0],o=r[1],a=r[2],s=Math.min(i,o,a),l=Math.max(i,o,a),c=l-s,u=100*c/255,d=s/(255-c)*100;return 0===c?n=Number.NaN:(i===l&&(n=(o-a)/c),o===l&&(n=2+(a-i)/c),a===l&&(n=4+(i-o)/c),(n*=60)<0&&(n+=360)),[n,u,d]},xe=Ae,ke=p.unpack,Ce=Math.floor,Te=function(){for(var e,t,n,r,i,o,a=[],s=arguments.length;s--;)a[s]=arguments[s];var l,c,u,d=(a=ke(a,"hcg"))[0],f=a[1],p=a[2];p*=255;var h=255*f;if(0===f)l=c=u=p;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var m=Ce(d/=60),y=d-m,b=p*(1-f),v=b+h*(1-y),g=b+h*y,w=b+h;switch(m){case 0:l=(e=[w,g,b])[0],c=e[1],u=e[2];break;case 1:l=(t=[v,w,b])[0],c=t[1],u=t[2];break;case 2:l=(n=[b,w,g])[0],c=n[1],u=n[2];break;case 3:l=(r=[b,v,w])[0],c=r[1],u=r[2];break;case 4:l=(i=[g,b,w])[0],c=i[1],u=i[2];break;case 5:l=(o=[w,b,v])[0],c=o[1],u=o[2]}}return[l,c,u,a.length>3?a[3]:1]},Ie=Te,Ee=p.unpack,Re=p.type,Oe=S,Pe=w,Me=h,De=xe;Pe.prototype.hcg=function(){return De(this._rgb)},Oe.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Pe,[null].concat(e,["hcg"])))},Me.format.hcg=Ie,Me.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ee(e,"hcg"),"array"===Re(e)&&3===e.length)return"hcg"}});var Ne=p.unpack,Le=p.last,Fe=Math.round,Be=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Ne(e,"rgba"),r=n[0],i=n[1],o=n[2],a=n[3],s=Le(e)||"auto";void 0===a&&(a=1),"auto"===s&&(s=a<1?"rgba":"rgb");var l="000000"+((r=Fe(r))<<16|(i=Fe(i))<<8|(o=Fe(o))).toString(16);l=l.substr(l.length-6);var c="0"+Fe(255*a).toString(16);switch(c=c.substr(c.length-2),s.toLowerCase()){case"rgba":return"#"+l+c;case"argb":return"#"+c+l;default:return"#"+l}},je=Be,ze=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Ue=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Ve=function(e){if(e.match(ze)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(Ue)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var n=parseInt(e,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: "+e)},$e=S,We=w,He=p.type,Ye=h,Ge=je;We.prototype.hex=function(e){return Ge(this._rgb,e)},$e.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(We,[null].concat(e,["hex"])))},Ye.format.hex=Ve,Ye.autodetect.push({p:4,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===He(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});var qe=p.unpack,Ke=p.TWOPI,Qe=Math.min,Xe=Math.sqrt,Je=Math.acos,Ze=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=qe(e,"rgb"),i=r[0],o=r[1],a=r[2],s=Qe(i/=255,o/=255,a/=255),l=(i+o+a)/3,c=l>0?1-s/l:0;return 0===c?n=NaN:(n=(i-o+(i-a))/2,n/=Xe((i-o)*(i-o)+(i-a)*(o-a)),n=Je(n),a>o&&(n=Ke-n),n/=Ke),[360*n,c,l]},et=Ze,tt=p.unpack,nt=p.limit,rt=p.TWOPI,it=p.PITHIRD,ot=Math.cos,at=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,o=(e=tt(e,"hsi"))[0],a=e[1],s=e[2];return isNaN(o)&&(o=0),isNaN(a)&&(a=0),o>360&&(o-=360),o<0&&(o+=360),(o/=360)<1/3?r=1-((i=(1-a)/3)+(n=(1+a*ot(rt*o)/ot(it-rt*o))/3)):o<2/3?i=1-((n=(1-a)/3)+(r=(1+a*ot(rt*(o-=1/3))/ot(it-rt*o))/3)):n=1-((r=(1-a)/3)+(i=(1+a*ot(rt*(o-=2/3))/ot(it-rt*o))/3)),[255*(n=nt(s*n*3)),255*(r=nt(s*r*3)),255*(i=nt(s*i*3)),e.length>3?e[3]:1]},st=at,lt=p.unpack,ct=p.type,ut=S,dt=w,ft=h,pt=et;dt.prototype.hsi=function(){return pt(this._rgb)},ut.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(dt,[null].concat(e,["hsi"])))},ft.format.hsi=st,ft.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=lt(e,"hsi"),"array"===ct(e)&&3===e.length)return"hsi"}});var ht=p.unpack,mt=p.type,yt=S,bt=w,vt=h,gt=$;bt.prototype.hsl=function(){return gt(this._rgb)},yt.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(bt,[null].concat(e,["hsl"])))},vt.format.hsl=ee,vt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=ht(e,"hsl"),"array"===mt(e)&&3===e.length)return"hsl"}});var wt=p.unpack,_t=Math.min,St=Math.max,At=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,o=(e=wt(e,"rgb"))[0],a=e[1],s=e[2],l=_t(o,a,s),c=St(o,a,s),u=c-l;return i=c/255,0===c?(n=Number.NaN,r=0):(r=u/c,o===c&&(n=(a-s)/u),a===c&&(n=2+(s-o)/u),s===c&&(n=4+(o-a)/u),(n*=60)<0&&(n+=360)),[n,r,i]},xt=At,kt=p.unpack,Ct=Math.floor,Tt=function(){for(var e,t,n,r,i,o,a=[],s=arguments.length;s--;)a[s]=arguments[s];var l,c,u,d=(a=kt(a,"hsv"))[0],f=a[1],p=a[2];if(p*=255,0===f)l=c=u=p;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var h=Ct(d/=60),m=d-h,y=p*(1-f),b=p*(1-f*m),v=p*(1-f*(1-m));switch(h){case 0:l=(e=[p,v,y])[0],c=e[1],u=e[2];break;case 1:l=(t=[b,p,y])[0],c=t[1],u=t[2];break;case 2:l=(n=[y,p,v])[0],c=n[1],u=n[2];break;case 3:l=(r=[y,b,p])[0],c=r[1],u=r[2];break;case 4:l=(i=[v,y,p])[0],c=i[1],u=i[2];break;case 5:l=(o=[p,y,b])[0],c=o[1],u=o[2]}}return[l,c,u,a.length>3?a[3]:1]},It=Tt,Et=p.unpack,Rt=p.type,Ot=S,Pt=w,Mt=h,Dt=xt;Pt.prototype.hsv=function(){return Dt(this._rgb)},Ot.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Pt,[null].concat(e,["hsv"])))},Mt.format.hsv=It,Mt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Et(e,"hsv"),"array"===Rt(e)&&3===e.length)return"hsv"}});var Nt={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Lt=Nt,Ft=p.unpack,Bt=Math.pow,jt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Ft(e,"rgb"),r=n[0],i=n[1],o=n[2],a=Vt(r,i,o),s=a[0],l=a[1],c=116*l-16;return[c<0?0:c,500*(s-l),200*(l-a[2])]},zt=function(e){return(e/=255)<=.04045?e/12.92:Bt((e+.055)/1.055,2.4)},Ut=function(e){return e>Lt.t3?Bt(e,1/3):e/Lt.t2+Lt.t0},Vt=function(e,t,n){return e=zt(e),t=zt(t),n=zt(n),[Ut((.4124564*e+.3575761*t+.1804375*n)/Lt.Xn),Ut((.2126729*e+.7151522*t+.072175*n)/Lt.Yn),Ut((.0193339*e+.119192*t+.9503041*n)/Lt.Zn)]},$t=jt,Wt=Nt,Ht=p.unpack,Yt=Math.pow,Gt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,o=(e=Ht(e,"lab"))[0],a=e[1],s=e[2];return r=(o+16)/116,n=isNaN(a)?r:r+a/500,i=isNaN(s)?r:r-s/200,r=Wt.Yn*Kt(r),n=Wt.Xn*Kt(n),i=Wt.Zn*Kt(i),[qt(3.2404542*n-1.5371385*r-.4985314*i),qt(-.969266*n+1.8760108*r+.041556*i),qt(.0556434*n-.2040259*r+1.0572252*i),e.length>3?e[3]:1]},qt=function(e){return 255*(e<=.00304?12.92*e:1.055*Yt(e,1/2.4)-.055)},Kt=function(e){return e>Wt.t1?e*e*e:Wt.t2*(e-Wt.t0)},Qt=Gt,Xt=p.unpack,Jt=p.type,Zt=S,en=w,tn=h,nn=$t;en.prototype.lab=function(){return nn(this._rgb)},Zt.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(en,[null].concat(e,["lab"])))},tn.format.lab=Qt,tn.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Xt(e,"lab"),"array"===Jt(e)&&3===e.length)return"lab"}});var rn=p.unpack,on=p.RAD2DEG,an=Math.sqrt,sn=Math.atan2,ln=Math.round,cn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=rn(e,"lab"),r=n[0],i=n[1],o=n[2],a=an(i*i+o*o),s=(sn(o,i)*on+360)%360;return 0===ln(1e4*a)&&(s=Number.NaN),[r,a,s]},un=cn,dn=p.unpack,fn=$t,pn=un,hn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=dn(e,"rgb"),r=n[0],i=n[1],o=n[2],a=fn(r,i,o),s=a[0],l=a[1],c=a[2];return pn(s,l,c)},mn=hn,yn=p.unpack,bn=p.DEG2RAD,vn=Math.sin,gn=Math.cos,wn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=yn(e,"lch"),r=n[0],i=n[1],o=n[2];return isNaN(o)&&(o=0),[r,gn(o*=bn)*i,vn(o)*i]},_n=wn,Sn=p.unpack,An=_n,xn=Qt,kn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=Sn(e,"lch"))[0],r=e[1],i=e[2],o=An(n,r,i),a=o[0],s=o[1],l=o[2],c=xn(a,s,l);return[c[0],c[1],c[2],e.length>3?e[3]:1]},Cn=kn,Tn=p.unpack,In=Cn,En=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Tn(e,"hcl").reverse();return In.apply(void 0,n)},Rn=En,On=p.unpack,Pn=p.type,Mn=S,Dn=w,Nn=h,Ln=mn;Dn.prototype.lch=function(){return Ln(this._rgb)},Dn.prototype.hcl=function(){return Ln(this._rgb).reverse()},Mn.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Dn,[null].concat(e,["lch"])))},Mn.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Dn,[null].concat(e,["hcl"])))},Nn.format.lch=Cn,Nn.format.hcl=Rn,["lch","hcl"].forEach((function(e){return Nn.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=On(t,e),"array"===Pn(t)&&3===t.length)return e}})}));var Fn={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",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:"#ff00ff",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",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",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",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",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:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Bn=w,jn=h,zn=p.type,Un=Fn,Vn=Ve,$n=je;Bn.prototype.name=function(){for(var e=$n(this._rgb,"rgb"),t=0,n=Object.keys(Un);t<n.length;t+=1){var r=n[t];if(Un[r]===e)return r.toLowerCase()}return e},jn.format.named=function(e){if(e=e.toLowerCase(),Un[e])return Vn(Un[e]);throw new Error("unknown color name: "+e)},jn.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===zn(e)&&Un[e.toLowerCase()])return"named"}});var Wn=p.unpack,Hn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Wn(e,"rgb");return(n[0]<<16)+(n[1]<<8)+n[2]},Yn=Hn,Gn=p.type,qn=function(e){if("number"==Gn(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},Kn=S,Qn=w,Xn=h,Jn=p.type,Zn=Yn;Qn.prototype.num=function(){return Zn(this._rgb)},Kn.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Qn,[null].concat(e,["num"])))},Xn.format.num=qn,Xn.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===Jn(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var er=S,tr=w,nr=h,rr=p.unpack,ir=p.type,or=Math.round;tr.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(or)},tr.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map((function(t,n){return n<3?!1===e?t:or(t):t}))},er.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(tr,[null].concat(e,["rgb"])))},nr.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=rr(e,"rgba");return void 0===n[3]&&(n[3]=1),n},nr.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=rr(e,"rgba"),"array"===ir(e)&&(3===e.length||4===e.length&&"number"==ir(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var ar=Math.log,sr=function(e){var t,n,r,i=e/100;return i<66?(t=255,n=i<6?0:-155.25485562709179-.44596950469579133*(n=i-2)+104.49216199393888*ar(n),r=i<20?0:.8274096064007395*(r=i-10)-254.76935184120902+115.67994401066147*ar(r)):(t=351.97690566805693+.114206453784165*(t=i-55)-40.25366309332127*ar(t),n=325.4494125711974+.07943456536662342*(n=i-50)-28.0852963507957*ar(n),r=255),[t,n,r,1]},lr=sr,cr=p.unpack,ur=Math.round,dr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n,r=cr(e,"rgb"),i=r[0],o=r[2],a=1e3,s=4e4,l=.4;s-a>l;){var c=lr(n=.5*(s+a));c[2]/c[0]>=o/i?s=n:a=n}return ur(n)},fr=S,pr=w,hr=h,mr=dr;pr.prototype.temp=pr.prototype.kelvin=pr.prototype.temperature=function(){return mr(this._rgb)},fr.temp=fr.kelvin=fr.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(pr,[null].concat(e,["temp"])))},hr.format.temp=hr.format.kelvin=hr.format.temperature=sr;var yr=p.unpack,br=Math.cbrt,vr=Math.pow,gr=Math.sign,wr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=yr(e,"rgb"),r=n[0],i=n[1],o=n[2],a=[Sr(r/255),Sr(i/255),Sr(o/255)],s=a[0],l=a[1],c=a[2],u=br(.4122214708*s+.5363325363*l+.0514459929*c),d=br(.2119034982*s+.6806995451*l+.1073969566*c),f=br(.0883024619*s+.2817188376*l+.6299787005*c);return[.2104542553*u+.793617785*d-.0040720468*f,1.9779984951*u-2.428592205*d+.4505937099*f,.0259040371*u+.7827717662*d-.808675766*f]},_r=wr;function Sr(e){var t=Math.abs(e);return t<.04045?e/12.92:(gr(e)||1)*vr((t+.055)/1.055,2.4)}var Ar=p.unpack,xr=Math.pow,kr=Math.sign,Cr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=Ar(e,"lab"))[0],r=e[1],i=e[2],o=xr(n+.3963377774*r+.2158037573*i,3),a=xr(n-.1055613458*r-.0638541728*i,3),s=xr(n-.0894841775*r-1.291485548*i,3);return[255*Ir(4.0767416621*o-3.3077115913*a+.2309699292*s),255*Ir(-1.2684380046*o+2.6097574011*a-.3413193965*s),255*Ir(-.0041960863*o-.7034186147*a+1.707614701*s),e.length>3?e[3]:1]},Tr=Cr;function Ir(e){var t=Math.abs(e);return t>.0031308?(kr(e)||1)*(1.055*xr(t,1/2.4)-.055):12.92*e}var Er=p.unpack,Rr=p.type,Or=S,Pr=w,Mr=h,Dr=_r;Pr.prototype.oklab=function(){return Dr(this._rgb)},Or.oklab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Pr,[null].concat(e,["oklab"])))},Mr.format.oklab=Tr,Mr.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Er(e,"oklab"),"array"===Rr(e)&&3===e.length)return"oklab"}});var Nr=p.unpack,Lr=_r,Fr=un,Br=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Nr(e,"rgb"),r=n[0],i=n[1],o=n[2],a=Lr(r,i,o),s=a[0],l=a[1],c=a[2];return Fr(s,l,c)},jr=Br,zr=p.unpack,Ur=_n,Vr=Tr,$r=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=zr(e,"lch"))[0],r=e[1],i=e[2],o=Ur(n,r,i),a=o[0],s=o[1],l=o[2],c=Vr(a,s,l);return[c[0],c[1],c[2],e.length>3?e[3]:1]},Wr=$r,Hr=p.unpack,Yr=p.type,Gr=S,qr=w,Kr=h,Qr=jr;qr.prototype.oklch=function(){return Qr(this._rgb)},Gr.oklch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(qr,[null].concat(e,["oklch"])))},Kr.format.oklch=Wr,Kr.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Hr(e,"oklch"),"array"===Yr(e)&&3===e.length)return"oklch"}});var Xr=w,Jr=p.type;Xr.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===Jr(e)?t?(this._rgb[3]=e,this):new Xr([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},w.prototype.clipped=function(){return this._rgb._clipped||!1};var Zr=w,ei=Nt;Zr.prototype.darken=function(e){void 0===e&&(e=1);var t=this,n=t.lab();return n[0]-=ei.Kn*e,new Zr(n,"lab").alpha(t.alpha(),!0)},Zr.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},Zr.prototype.darker=Zr.prototype.darken,Zr.prototype.brighter=Zr.prototype.brighten,w.prototype.get=function(e){var t=e.split("."),n=t[0],r=t[1],i=this[n]();if(r){var o=n.indexOf(r)-("ok"===n.substr(0,2)?2:0);if(o>-1)return i[o];throw new Error("unknown channel "+r+" in mode "+n)}return i};var ti=w,ni=p.type,ri=Math.pow,ii=1e-7,oi=20;ti.prototype.luminance=function(e){if(void 0!==e&&"number"===ni(e)){if(0===e)return new ti([0,0,0,this._rgb[3]],"rgb");if(1===e)return new ti([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),n="rgb",r=oi,i=function(t,o){var a=t.interpolate(o,.5,n),s=a.luminance();return Math.abs(e-s)<ii||!r--?a:s>e?i(t,a):i(a,o)},o=(t>e?i(new ti([0,0,0]),this):i(this,new ti([255,255,255]))).rgb();return new ti(o.concat([this._rgb[3]]))}return ai.apply(void 0,this._rgb.slice(0,3))};var ai=function(e,t,n){return.2126*(e=si(e))+.7152*(t=si(t))+.0722*(n=si(n))},si=function(e){return(e/=255)<=.03928?e/12.92:ri((e+.055)/1.055,2.4)},li={},ci=w,ui=p.type,di=li,fi=function(e,t,n){void 0===n&&(n=.5);for(var r=[],i=arguments.length-3;i-- >0;)r[i]=arguments[i+3];var o=r[0]||"lrgb";if(di[o]||r.length||(o=Object.keys(di)[0]),!di[o])throw new Error("interpolation mode "+o+" is not defined");return"object"!==ui(e)&&(e=new ci(e)),"object"!==ui(t)&&(t=new ci(t)),di[o](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))},pi=w,hi=fi;pi.prototype.mix=pi.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return hi.apply(void 0,[this,e,t].concat(n))};var mi=w;mi.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new mi([t[0]*n,t[1]*n,t[2]*n,n],"rgb")};var yi=w,bi=Nt;yi.prototype.saturate=function(e){void 0===e&&(e=1);var t=this,n=t.lch();return n[1]+=bi.Kn*e,n[1]<0&&(n[1]=0),new yi(n,"lch").alpha(t.alpha(),!0)},yi.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var vi=w,gi=p.type;vi.prototype.set=function(e,t,n){void 0===n&&(n=!1);var r=e.split("."),i=r[0],o=r[1],a=this[i]();if(o){var s=i.indexOf(o)-("ok"===i.substr(0,2)?2:0);if(s>-1){if("string"==gi(t))switch(t.charAt(0)){case"+":case"-":a[s]+=+t;break;case"*":a[s]*=+t.substr(1);break;case"/":a[s]/=+t.substr(1);break;default:a[s]=+t}else{if("number"!==gi(t))throw new Error("unsupported value for Color.set");a[s]=t}var l=new vi(a,i);return n?(this._rgb=l._rgb,this):l}throw new Error("unknown channel "+o+" in mode "+i)}return a};var wi=w,_i=function(e,t,n){var r=e._rgb,i=t._rgb;return new wi(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"rgb")};li.rgb=_i;var Si=w,Ai=Math.sqrt,xi=Math.pow,ki=function(e,t,n){var r=e._rgb,i=r[0],o=r[1],a=r[2],s=t._rgb,l=s[0],c=s[1],u=s[2];return new Si(Ai(xi(i,2)*(1-n)+xi(l,2)*n),Ai(xi(o,2)*(1-n)+xi(c,2)*n),Ai(xi(a,2)*(1-n)+xi(u,2)*n),"rgb")};li.lrgb=ki;var Ci=w,Ti=function(e,t,n){var r=e.lab(),i=t.lab();return new Ci(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"lab")};li.lab=Ti;var Ii=w,Ei=function(e,t,n,r){var i,o,a,s,l,c,u,d,f,p,h,m,y;return"hsl"===r?(a=e.hsl(),s=t.hsl()):"hsv"===r?(a=e.hsv(),s=t.hsv()):"hcg"===r?(a=e.hcg(),s=t.hcg()):"hsi"===r?(a=e.hsi(),s=t.hsi()):"lch"===r||"hcl"===r?(r="hcl",a=e.hcl(),s=t.hcl()):"oklch"===r&&(a=e.oklch().reverse(),s=t.oklch().reverse()),"h"!==r.substr(0,1)&&"oklch"!==r||(l=(i=a)[0],u=i[1],f=i[2],c=(o=s)[0],d=o[1],p=o[2]),isNaN(l)||isNaN(c)?isNaN(l)?isNaN(c)?m=Number.NaN:(m=c,1!=f&&0!=f||"hsv"==r||(h=d)):(m=l,1!=p&&0!=p||"hsv"==r||(h=u)):m=l+n*(c>l&&c-l>180?c-(l+360):c<l&&l-c>180?c+360-l:c-l),void 0===h&&(h=u+n*(d-u)),y=f+n*(p-f),new Ii("oklch"===r?[y,h,m]:[m,h,y],r)},Ri=Ei,Oi=function(e,t,n){return Ri(e,t,n,"lch")};li.lch=Oi,li.hcl=Oi;var Pi=w,Mi=function(e,t,n){var r=e.num(),i=t.num();return new Pi(r+n*(i-r),"num")};li.num=Mi;var Di=Ei,Ni=function(e,t,n){return Di(e,t,n,"hcg")};li.hcg=Ni;var Li=Ei,Fi=function(e,t,n){return Li(e,t,n,"hsi")};li.hsi=Fi;var Bi=Ei,ji=function(e,t,n){return Bi(e,t,n,"hsl")};li.hsl=ji;var zi=Ei,Ui=function(e,t,n){return zi(e,t,n,"hsv")};li.hsv=Ui;var Vi=w,$i=function(e,t,n){var r=e.oklab(),i=t.oklab();return new Vi(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"oklab")};li.oklab=$i;var Wi=Ei,Hi=function(e,t,n){return Wi(e,t,n,"oklch")};li.oklch=Hi;var Yi=w,Gi=p.clip_rgb,qi=Math.pow,Ki=Math.sqrt,Qi=Math.PI,Xi=Math.cos,Ji=Math.sin,Zi=Math.atan2,eo=function(e,t,n){void 0===t&&(t="lrgb"),void 0===n&&(n=null);var r=e.length;n||(n=Array.from(new Array(r)).map((function(){return 1})));var i=r/n.reduce((function(e,t){return e+t}));if(n.forEach((function(e,t){n[t]*=i})),e=e.map((function(e){return new Yi(e)})),"lrgb"===t)return to(e,n);for(var o=e.shift(),a=o.get(t),s=[],l=0,c=0,u=0;u<a.length;u++)if(a[u]=(a[u]||0)*n[0],s.push(isNaN(a[u])?0:n[0]),"h"===t.charAt(u)&&!isNaN(a[u])){var d=a[u]/180*Qi;l+=Xi(d)*n[0],c+=Ji(d)*n[0]}var f=o.alpha()*n[0];e.forEach((function(e,r){var i=e.get(t);f+=e.alpha()*n[r+1];for(var o=0;o<a.length;o++)if(!isNaN(i[o]))if(s[o]+=n[r+1],"h"===t.charAt(o)){var u=i[o]/180*Qi;l+=Xi(u)*n[r+1],c+=Ji(u)*n[r+1]}else a[o]+=i[o]*n[r+1]}));for(var p=0;p<a.length;p++)if("h"===t.charAt(p)){for(var h=Zi(c/s[p],l/s[p])/Qi*180;h<0;)h+=360;for(;h>=360;)h-=360;a[p]=h}else a[p]=a[p]/s[p];return f/=r,new Yi(a,t).alpha(f>.99999?1:f,!0)},to=function(e,t){for(var n=e.length,r=[0,0,0,0],i=0;i<e.length;i++){var o=e[i],a=t[i]/n,s=o._rgb;r[0]+=qi(s[0],2)*a,r[1]+=qi(s[1],2)*a,r[2]+=qi(s[2],2)*a,r[3]+=s[3]*a}return r[0]=Ki(r[0]),r[1]=Ki(r[1]),r[2]=Ki(r[2]),r[3]>.9999999&&(r[3]=1),new Yi(Gi(r))},no=S,ro=p.type,io=Math.pow,oo=function(e){var t="rgb",n=no("#ccc"),r=0,i=[0,1],o=[],a=[0,0],s=!1,l=[],c=!1,u=0,d=1,f=!1,p={},h=!0,m=1,y=function(e){if((e=e||["#fff","#000"])&&"string"===ro(e)&&no.brewer&&no.brewer[e.toLowerCase()]&&(e=no.brewer[e.toLowerCase()]),"array"===ro(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t<e.length;t++)e[t]=no(e[t]);o.length=0;for(var n=0;n<e.length;n++)o.push(n/(e.length-1))}return _(),l=e},b=function(e){if(null!=s){for(var t=s.length-1,n=0;n<t&&e>=s[n];)n++;return n-1}return 0},v=function(e){return e},g=function(e){return e},w=function(e,r){var i,c;if(null==r&&(r=!1),isNaN(e)||null===e)return n;c=r?e:s&&s.length>2?b(e)/(s.length-2):d!==u?(e-u)/(d-u):1,c=g(c),r||(c=v(c)),1!==m&&(c=io(c,m)),c=a[0]+c*(1-a[0]-a[1]),c=Math.min(1,Math.max(0,c));var f=Math.floor(1e4*c);if(h&&p[f])i=p[f];else{if("array"===ro(l))for(var y=0;y<o.length;y++){var w=o[y];if(c<=w){i=l[y];break}if(c>=w&&y===o.length-1){i=l[y];break}if(c>w&&c<o[y+1]){c=(c-w)/(o[y+1]-w),i=no.interpolate(l[y],l[y+1],c,t);break}}else"function"===ro(l)&&(i=l(c));h&&(p[f]=i)}return i},_=function(){return p={}};y(e);var S=function(e){var t=no(w(e));return c&&t[c]?t[c]():t};return S.classes=function(e){if(null!=e){if("array"===ro(e))s=e,i=[e[0],e[e.length-1]];else{var t=no.analyze(i);s=0===e?[t.min,t.max]:no.limits(t,"e",e)}return S}return s},S.domain=function(e){if(!arguments.length)return i;u=e[0],d=e[e.length-1],o=[];var t=l.length;if(e.length===t&&u!==d)for(var n=0,r=Array.from(e);n<r.length;n+=1){var a=r[n];o.push((a-u)/(d-u))}else{for(var s=0;s<t;s++)o.push(s/(t-1));if(e.length>2){var c=e.map((function(t,n){return n/(e.length-1)})),f=e.map((function(e){return(e-u)/(d-u)}));f.every((function(e,t){return c[t]===e}))||(g=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=f[t+1];)t++;var n=(e-f[t])/(f[t+1]-f[t]);return c[t]+n*(c[t+1]-c[t])})}}return i=[u,d],S},S.mode=function(e){return arguments.length?(t=e,_(),S):t},S.range=function(e,t){return y(e),S},S.out=function(e){return c=e,S},S.spread=function(e){return arguments.length?(r=e,S):r},S.correctLightness=function(e){return null==e&&(e=!0),f=e,_(),v=f?function(e){for(var t=w(0,!0).lab()[0],n=w(1,!0).lab()[0],r=t>n,i=w(e,!0).lab()[0],o=t+(n-t)*e,a=i-o,s=0,l=1,c=20;Math.abs(a)>.01&&c-- >0;)r&&(a*=-1),a<0?(s=e,e+=.5*(l-e)):(l=e,e+=.5*(s-e)),i=w(e,!0).lab()[0],a=i-o;return e}:function(e){return e},S},S.padding=function(e){return null!=e?("number"===ro(e)&&(e=[e,e]),a=e,S):a},S.colors=function(t,n){arguments.length<2&&(n="hex");var r=[];if(0===arguments.length)r=l.slice(0);else if(1===t)r=[S(.5)];else if(t>1){var o=i[0],a=i[1]-o;r=ao(0,t,!1).map((function(e){return S(o+e/(t-1)*a)}))}else{e=[];var c=[];if(s&&s.length>2)for(var u=1,d=s.length,f=1<=d;f?u<d:u>d;f?u++:u--)c.push(.5*(s[u-1]+s[u]));else c=i;r=c.map((function(e){return S(e)}))}return no[n]&&(r=r.map((function(e){return e[n]()}))),r},S.cache=function(e){return null!=e?(h=e,S):h},S.gamma=function(e){return null!=e?(m=e,S):m},S.nodata=function(e){return null!=e?(n=no(e),S):n},S};function ao(e,t,n){for(var r=[],i=e<t,o=n?i?t+1:t-1:t,a=e;i?a<o:a>o;i?a++:a--)r.push(a);return r}var so=w,lo=oo,co=function(e){for(var t=[1,1],n=1;n<e;n++){for(var r=[1],i=1;i<=t.length;i++)r[i]=(t[i]||0)+t[i-1];t=r}return t},uo=function(e){var t,n,r,i,o,a,s;if(2===(e=e.map((function(e){return new so(e)}))).length)t=e.map((function(e){return e.lab()})),o=t[0],a=t[1],i=function(e){var t=[0,1,2].map((function(t){return o[t]+e*(a[t]-o[t])}));return new so(t,"lab")};else if(3===e.length)n=e.map((function(e){return e.lab()})),o=n[0],a=n[1],s=n[2],i=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*o[t]+2*(1-e)*e*a[t]+e*e*s[t]}));return new so(t,"lab")};else if(4===e.length){var l;r=e.map((function(e){return e.lab()})),o=r[0],a=r[1],s=r[2],l=r[3],i=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*(1-e)*o[t]+3*(1-e)*(1-e)*e*a[t]+3*(1-e)*e*e*s[t]+e*e*e*l[t]}));return new so(t,"lab")}}else{if(!(e.length>=5))throw new RangeError("No point in running bezier with only one color.");var c,u,d;c=e.map((function(e){return e.lab()})),d=e.length-1,u=co(d),i=function(e){var t=1-e,n=[0,1,2].map((function(n){return c.reduce((function(r,i,o){return r+u[o]*Math.pow(t,d-o)*Math.pow(e,o)*i[n]}),0)}));return new so(n,"lab")}}return i},fo=function(e){var t=uo(e);return t.scale=function(){return lo(t)},t},po=S,ho=function(e,t,n){if(!ho[n])throw new Error("unknown blend mode "+n);return ho[n](e,t)},mo=function(e){return function(t,n){var r=po(n).rgb(),i=po(t).rgb();return po.rgb(e(r,i))}},yo=function(e){return function(t,n){var r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r}},bo=function(e){return e},vo=function(e,t){return e*t/255},go=function(e,t){return e>t?t:e},wo=function(e,t){return e>t?e:t},_o=function(e,t){return 255*(1-(1-e/255)*(1-t/255))},So=function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))},Ao=function(e,t){return 255*(1-(1-t/255)/(e/255))},xo=function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e};ho.normal=mo(yo(bo)),ho.multiply=mo(yo(vo)),ho.screen=mo(yo(_o)),ho.overlay=mo(yo(So)),ho.darken=mo(yo(go)),ho.lighten=mo(yo(wo)),ho.dodge=mo(yo(xo)),ho.burn=mo(yo(Ao));for(var ko=ho,Co=p.type,To=p.clip_rgb,Io=p.TWOPI,Eo=Math.pow,Ro=Math.sin,Oo=Math.cos,Po=S,Mo=function(e,t,n,r,i){void 0===e&&(e=300),void 0===t&&(t=-1.5),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=[0,1]);var o,a=0;"array"===Co(i)?o=i[1]-i[0]:(o=0,i=[i,i]);var s=function(s){var l=Io*((e+120)/360+t*s),c=Eo(i[0]+o*s,r),u=(0!==a?n[0]+s*a:n)*c*(1-c)/2,d=Oo(l),f=Ro(l);return Po(To([255*(c+u*(-.14861*d+1.78277*f)),255*(c+u*(-.29227*d-.90649*f)),255*(c+u*(1.97294*d)),1]))};return s.start=function(t){return null==t?e:(e=t,s)},s.rotations=function(e){return null==e?t:(t=e,s)},s.gamma=function(e){return null==e?r:(r=e,s)},s.hue=function(e){return null==e?n:("array"===Co(n=e)?0===(a=n[1]-n[0])&&(n=n[1]):a=0,s)},s.lightness=function(e){return null==e?i:("array"===Co(e)?(i=e,o=e[1]-e[0]):(i=[e,e],o=0),s)},s.scale=function(){return Po.scale(s)},s.hue(n),s},Do=w,No="0123456789abcdef",Lo=Math.floor,Fo=Math.random,Bo=function(){for(var e="#",t=0;t<6;t++)e+=No.charAt(Lo(16*Fo()));return new Do(e,"hex")},jo=s,zo=Math.log,Uo=Math.pow,Vo=Math.floor,$o=Math.abs,Wo=function(e,t){void 0===t&&(t=null);var n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===jo(e)&&(e=Object.values(e)),e.forEach((function(e){t&&"object"===jo(e)&&(e=e[t]),void 0===e||null===e||isNaN(e)||(n.values.push(e),n.sum+=e,e<n.min&&(n.min=e),e>n.max&&(n.max=e),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(e,t){return Ho(n,e,t)},n},Ho=function(e,t,n){void 0===t&&(t="equal"),void 0===n&&(n=7),"array"==jo(e)&&(e=Wo(e));var r=e.min,i=e.max,o=e.values.sort((function(e,t){return e-t}));if(1===n)return[r,i];var a=[];if("c"===t.substr(0,1)&&(a.push(r),a.push(i)),"e"===t.substr(0,1)){a.push(r);for(var s=1;s<n;s++)a.push(r+s/n*(i-r));a.push(i)}else if("l"===t.substr(0,1)){if(r<=0)throw new Error("Logarithmic scales are only possible for values > 0");var l=Math.LOG10E*zo(r),c=Math.LOG10E*zo(i);a.push(r);for(var u=1;u<n;u++)a.push(Uo(10,l+u/n*(c-l)));a.push(i)}else if("q"===t.substr(0,1)){a.push(r);for(var d=1;d<n;d++){var f=(o.length-1)*d/n,p=Vo(f);if(p===f)a.push(o[p]);else{var h=f-p;a.push(o[p]*(1-h)+o[p+1]*h)}}a.push(i)}else if("k"===t.substr(0,1)){var m,y=o.length,b=new Array(y),v=new Array(n),g=!0,w=0,_=null;(_=[]).push(r);for(var S=1;S<n;S++)_.push(r+S/n*(i-r));for(_.push(i);g;){for(var A=0;A<n;A++)v[A]=0;for(var x=0;x<y;x++)for(var k=o[x],C=Number.MAX_VALUE,T=void 0,I=0;I<n;I++){var E=$o(_[I]-k);E<C&&(C=E,T=I),v[T]++,b[x]=T}for(var R=new Array(n),O=0;O<n;O++)R[O]=null;for(var P=0;P<y;P++)null===R[m=b[P]]?R[m]=o[P]:R[m]+=o[P];for(var M=0;M<n;M++)R[M]*=1/v[M];g=!1;for(var D=0;D<n;D++)if(R[D]!==_[D]){g=!0;break}_=R,++w>200&&(g=!1)}for(var N={},L=0;L<n;L++)N[L]=[];for(var F=0;F<y;F++)N[m=b[F]].push(o[F]);for(var B=[],j=0;j<n;j++)B.push(N[j][0]),B.push(N[j][N[j].length-1]);B=B.sort((function(e,t){return e-t})),a.push(B[0]);for(var z=1;z<B.length;z+=2){var U=B[z];isNaN(U)||-1!==a.indexOf(U)||a.push(U)}}return a},Yo={analyze:Wo,limits:Ho},Go=w,qo=function(e,t){e=new Go(e),t=new Go(t);var n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},Ko=w,Qo=Math.sqrt,Xo=Math.pow,Jo=Math.min,Zo=Math.max,ea=Math.atan2,ta=Math.abs,na=Math.cos,ra=Math.sin,ia=Math.exp,oa=Math.PI,aa=function(e,t,n,r,i){void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=1);var o=function(e){return 360*e/(2*oa)},a=function(e){return 2*oa*e/360};e=new Ko(e),t=new Ko(t);var s=Array.from(e.lab()),l=s[0],c=s[1],u=s[2],d=Array.from(t.lab()),f=d[0],p=d[1],h=d[2],m=(l+f)/2,y=(Qo(Xo(c,2)+Xo(u,2))+Qo(Xo(p,2)+Xo(h,2)))/2,b=.5*(1-Qo(Xo(y,7)/(Xo(y,7)+Xo(25,7)))),v=c*(1+b),g=p*(1+b),w=Qo(Xo(v,2)+Xo(u,2)),_=Qo(Xo(g,2)+Xo(h,2)),S=(w+_)/2,A=o(ea(u,v)),x=o(ea(h,g)),k=A>=0?A:A+360,C=x>=0?x:x+360,T=ta(k-C)>180?(k+C+360)/2:(k+C)/2,I=1-.17*na(a(T-30))+.24*na(a(2*T))+.32*na(a(3*T+6))-.2*na(a(4*T-63)),E=C-k;E=ta(E)<=180?E:C<=k?E+360:E-360,E=2*Qo(w*_)*ra(a(E)/2);var R=f-l,O=_-w,P=1+.015*Xo(m-50,2)/Qo(20+Xo(m-50,2)),M=1+.045*S,D=1+.015*S*I,N=30*ia(-Xo((T-275)/25,2)),L=-2*Qo(Xo(S,7)/(Xo(S,7)+Xo(25,7)))*ra(2*a(N)),F=Qo(Xo(R/(n*P),2)+Xo(O/(r*M),2)+Xo(E/(i*D),2)+L*(O/(r*M))*(E/(i*D)));return Zo(0,Jo(100,F))},sa=w,la=function(e,t,n){void 0===n&&(n="lab"),e=new sa(e),t=new sa(t);var r=e.get(n),i=t.get(n),o=0;for(var a in r){var s=(r[a]||0)-(i[a]||0);o+=s*s}return Math.sqrt(o)},ca=w,ua=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(ca,[null].concat(e))),!0}catch(n){return!1}},da=S,fa=oo,pa={cool:function(){return fa([da.hsl(180,1,.9),da.hsl(250,.7,.4)])},hot:function(){return fa(["#000","#f00","#ff0","#fff"]).mode("rgb")}},ha={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},ma=0,ya=Object.keys(ha);ma<ya.length;ma+=1){var ba=ya[ma];ha[ba.toLowerCase()]=ha[ba]}var va=ha,ga=S;return ga.average=eo,ga.bezier=fo,ga.blend=ko,ga.cubehelix=Mo,ga.mix=ga.interpolate=fi,ga.random=Bo,ga.scale=oo,ga.analyze=Yo.analyze,ga.contrast=qo,ga.deltaE=aa,ga.distance=la,ga.limits=Yo.limits,ga.valid=ua,ga.scales=pa,ga.colors=Fn,ga.brewer=va,ga}()},8168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},8587:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,{A:()=>r})}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}var o=Object.create(null);n.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&i&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(o,a),o}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};n.r(e),n.d(e,{fixNegotiationNeeded:()=>ei,shimAddTrackRemoveTrack:()=>Jr,shimAddTrackRemoveTrackWithNative:()=>Xr,shimGetSendersWithDtmf:()=>Kr,shimGetUserMedia:()=>Yr,shimMediaStream:()=>Gr,shimOnTrack:()=>qr,shimPeerConnection:()=>Zr,shimSenderReceiverGetStats:()=>Qr});var t={};n.r(t),n.d(t,{shimAddTransceiver:()=>ci,shimCreateAnswer:()=>fi,shimCreateOffer:()=>di,shimGetDisplayMedia:()=>ni,shimGetParameters:()=>ui,shimGetUserMedia:()=>ti,shimOnTrack:()=>ri,shimPeerConnection:()=>ii,shimRTCDataChannel:()=>li,shimReceiverGetStats:()=>ai,shimRemoveStream:()=>si,shimSenderGetStats:()=>oi});var r={};n.r(r),n.d(r,{shimAudioContext:()=>_i,shimCallbacksAPI:()=>mi,shimConstraints:()=>bi,shimCreateOfferLegacy:()=>wi,shimGetUserMedia:()=>yi,shimLocalStreamsAPI:()=>pi,shimRTCIceServerUrls:()=>vi,shimRemoteStreamsAPI:()=>hi,shimTrackEventTransceiver:()=>gi});var i={};n.r(i),n.d(i,{removeExtmapAllowMixed:()=>Ei,shimAddIceCandidateNullOrEmpty:()=>Ri,shimConnectionState:()=>Ii,shimMaxMessageSize:()=>Ci,shimParameterlessSetLocalDescription:()=>Oi,shimRTCIceCandidate:()=>xi,shimRTCIceCandidateRelayProtocol:()=>ki,shimSendThrowTypeError:()=>Ti});var o=n(7565),a=n.t(o,2),s=n(6396),l=n(6641),c=n(402),u=n(8168),d=n(7953),f=n(9289);const p="function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";var h=n(7929);const m=function(e){const{children:t,theme:n}=e,r=(0,f.A)(),i=o.useMemo((()=>{const e=null===r?n:function(e,t){if("function"===typeof t)return t(e);return(0,u.A)({},e,t)}(r,n);return null!=e&&(e[p]=null!==r),e}),[n,r]);return(0,h.jsx)(d.A.Provider,{value:i,children:t})};var y=n(10),b=n(5841);function v(e){const t=(0,b.A)();return(0,h.jsx)(y.T.Provider,{value:"object"===typeof t?t:{},children:e.children})}const g=function(e){const{children:t,theme:n}=e;return(0,h.jsx)(m,{theme:n,children:(0,h.jsx)(v,{children:t})})};var w=n(9461),_=n.n(w);const S=e=>{const{theme:t}=(0,l.useRenderData)(),n=JSON.stringify(t),r=o.useMemo((()=>{const e=JSON.parse(n);if(null==e)return;const t=_().scale([e.textColor,e.backgroundColor]).mode("lab");return(0,c.A)({palette:{primary:{main:e.primaryColor},background:{default:e.backgroundColor,paper:e.secondaryBackgroundColor},text:{primary:e.textColor,secondary:t(.1).hex(),disabled:t(.5).hex()}},typography:{fontFamily:e.font}})}),[n]);return null==r?(0,h.jsx)(h.Fragment,{children:e.children}):(0,h.jsx)(g,{theme:r,children:e.children})};var A=n(8167),x=n(8592),k=n(6714),C=n(4013),T=(n(5243),n(2341),(0,y.w)((function(e,t){var n=e.styles,r=(0,C.J)([n],void 0,o.useContext(y.T));if(!y.i){for(var i,a=r.name,s=r.styles,l=r.next;void 0!==l;)a+=" "+l.name,s+=l.styles,l=l.next;var c=!0===t.compat,u=t.insert("",{name:a,styles:s},t.sheet,c);return c?null:o.createElement("style",((i={})["data-emotion"]=t.key+"-global "+a,i.dangerouslySetInnerHTML={__html:u},i.nonce=t.sheet.nonce,i))}var d=o.useRef();return(0,k.i)((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,o=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==o&&(i=!0,o.setAttribute("data-emotion",e),n.hydrate([o])),d.current=[n,i],function(){n.flush()}}),[t]),(0,k.i)((function(){var e=d.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==r.next&&(0,x.sk)(t,r.next,!0),n.tags.length){var i=n.tags[n.tags.length-1].nextElementSibling;n.before=i,n.flush()}t.insert("",r,n,!1)}}),[t,r.name]),null})));function I(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,C.J)(t)}var E=function(){var e=I.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function R(e){const{styles:t,defaultTheme:n={}}=e,r="function"===typeof t?e=>{return t(void 0===(r=e)||null===r||0===Object.keys(r).length?n:e);var r}:t;return(0,h.jsx)(T,{styles:r})}var O=n(7996);const P=function(e){return(0,h.jsx)(R,(0,u.A)({},e,{defaultTheme:O.A}))},M=(e,t)=>(0,u.A)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),D=e=>(0,u.A)({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}});const N=function(e){const t=(0,A.A)({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return(0,h.jsxs)(o.Fragment,{children:[(0,h.jsx)(P,{styles:e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var n,r;const i={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach((t=>{let[n,r]=t;var o;i[e.getColorSchemeSelector(n).replace(/\s*&/,"")]={colorScheme:null==(o=r.palette)?void 0:o.mode}}));let o=(0,u.A)({html:M(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,u.A)({margin:0},D(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},i);const a=null==(n=e.components)||null==(r=n.MuiCssBaseline)?void 0:r.styleOverrides;return a&&(o=[o,a]),o}(e,r)}),n]})},L=o.createContext(void 0),F=e=>{const t=(0,o.useContext)(L);return null==t?null:t[e]},B=e=>{const t=(0,l.useRenderData)(),{start:n,stop:r,select_device:i,device_ask_permission:a,device_not_available:s,device_access_denied:c,media_api_not_available:u}=t.args.translations||{},d=(0,o.useMemo)((()=>({start:n,stop:r,select_device:i,device_ask_permission:a,device_not_available:s,device_access_denied:c,media_api_not_available:u})),[n,r,i,a,s,c,u]);return(0,h.jsx)(L.Provider,{value:d,children:e.children})},j=o.memo(B);var z=n(8587),U=n(8854),V=n(4843),$=n(5514),W=n(2147),H=n(8694);const Y=["sx"],G=e=>{const t={systemProps:{},otherProps:{}};return Object.keys(e).forEach((n=>{H.en[n]?t.systemProps[n]=e[n]:t.otherProps[n]=e[n]})),t};function q(e){const{sx:t}=e,n=(0,z.A)(e,Y),{systemProps:r,otherProps:i}=G(n);let o;return o=Array.isArray(t)?[r,...t]:"function"===typeof t?function(){const e=t(...arguments);return(0,W.Q)(e)?(0,u.A)({},r,e):r}:(0,u.A)({},r,t),(0,u.A)({},i,{sx:o})}const K=["className","component"];var Q=n(896);const X=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{defaultTheme:t,defaultClassName:n="MuiBox-root",generateClassName:r,styleFunctionSx:i=$.A}=e,a=(0,V.Ay)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(i);return o.forwardRef((function(e,i){const o=(0,b.A)(t),s=q(e),{className:l,component:c="div"}=s,d=(0,z.A)(s,K);return(0,h.jsx)(a,(0,u.A)({as:c,ref:i,className:(0,U.A)(l,r?r(n):n),theme:o},d))}))}({defaultTheme:(0,c.A)(),defaultClassName:"MuiBox-root",generateClassName:Q.A.generate}),J=X;var Z=n(9360),ee=n(8176),te=n(8099),ne=n(3777),re=n(8210),ie=n(2458);function oe(e){return(0,re.A)("MuiPaper",e)}(0,ie.A)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const ae=["className","component","elevation","square","variant"],se=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)},le=(0,te.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})((e=>{let{theme:t,ownerState:n}=e;var r;return(0,u.A)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:`1px solid ${(t.vars||t).palette.divider}`},"elevation"===n.variant&&(0,u.A)({boxShadow:(t.vars||t).shadows[n.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:`linear-gradient(${(0,ee.X4)("#fff",se(n.elevation))}, ${(0,ee.X4)("#fff",se(n.elevation))})`},t.vars&&{backgroundImage:null==(r=t.vars.overlays)?void 0:r[n.elevation]}))})),ce=o.forwardRef((function(e,t){const n=(0,A.A)({props:e,name:"MuiPaper"}),{className:r,component:i="div",elevation:o=1,square:a=!1,variant:s="elevation"}=n,l=(0,z.A)(n,ae),c=(0,u.A)({},n,{component:i,elevation:o,square:a,variant:s}),d=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]};return(0,Z.A)(o,oe,i)})(c);return(0,h.jsx)(le,(0,u.A)({as:i,ownerState:c,className:(0,U.A)(d.root,r),ref:t},l))}));function ue(e){return(0,re.A)("MuiAlert",e)}const de=(0,ie.A)("MuiAlert",["root","action","icon","message","filled","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);var fe=n(5523),pe=n(1419),he=n(5789);function me(e,t){return me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},me(e,t)}const ye=o.createContext(null);function be(e,t){var n=Object.create(null);return e&&o.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,o.isValidElement)(e)?t(e):e}(e)})),n}function ve(e,t,n){return null!=n[t]?n[t]:e.props[t]}function ge(e,t,n){var r=be(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var c=i[l][r];s[i[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach((function(a){var s=i[a];if((0,o.isValidElement)(s)){var l=a in t,c=a in r,u=t[a],d=(0,o.isValidElement)(u)&&!u.props.in;!c||l&&!d?c||!l||d?c&&l&&(0,o.isValidElement)(u)&&(i[a]=(0,o.cloneElement)(s,{onExited:n.bind(null,s),in:u.props.in,exit:ve(s,"exit",e),enter:ve(s,"enter",e)})):i[a]=(0,o.cloneElement)(s,{in:!1}):i[a]=(0,o.cloneElement)(s,{onExited:n.bind(null,s),in:!0,exit:ve(s,"exit",e),enter:ve(s,"enter",e)})}})),i}var we=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},_e=function(e){var t,n;function r(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,me(t,n);var i=r.prototype;return i.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},i.componentWillUnmount=function(){this.mounted=!1},r.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,a=t.handleExited;return{children:t.firstRender?(n=e,r=a,be(n.children,(function(e){return(0,o.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:ve(e,"appear",n),enter:ve(e,"enter",n),exit:ve(e,"exit",n)})}))):ge(e,i,a),firstRender:!1}},i.handleExited=function(e,t){var n=be(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=(0,u.A)({},t.children);return delete n[e.key],{children:n}})))},i.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=(0,z.A)(e,["component","childFactory"]),i=this.state.contextValue,a=we(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?o.createElement(ye.Provider,{value:i},a):o.createElement(ye.Provider,{value:i},o.createElement(t,r,a))},r}(o.Component);_e.propTypes={},_e.defaultProps={component:"div",childFactory:function(e){return e}};const Se=_e;const Ae=function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:s,in:l,onExited:c,timeout:u}=e,[d,f]=o.useState(!1),p=(0,U.A)(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),m={width:s,height:s,top:-s/2+a,left:-s/2+i},y=(0,U.A)(n.child,d&&n.childLeaving,r&&n.childPulsate);return l||d||f(!0),o.useEffect((()=>{if(!l&&null!=c){const e=setTimeout(c,u);return()=>{clearTimeout(e)}}}),[c,l,u]),(0,h.jsx)("span",{className:p,style:m,children:(0,h.jsx)("span",{className:y})})};const xe=(0,ie.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),ke=["center","classes","className"];let Ce,Te,Ie,Ee,Re=e=>e;const Oe=E(Ce||(Ce=Re`
|
3
|
-
0% {
|
4
|
-
transform: scale(0);
|
5
|
-
opacity: 0.1;
|
6
|
-
}
|
7
|
-
|
8
|
-
100% {
|
9
|
-
transform: scale(1);
|
10
|
-
opacity: 0.3;
|
11
|
-
}
|
12
|
-
`)),Pe=E(Te||(Te=Re`
|
13
|
-
0% {
|
14
|
-
opacity: 1;
|
15
|
-
}
|
16
|
-
|
17
|
-
100% {
|
18
|
-
opacity: 0;
|
19
|
-
}
|
20
|
-
`)),Me=E(Ie||(Ie=Re`
|
21
|
-
0% {
|
22
|
-
transform: scale(1);
|
23
|
-
}
|
24
|
-
|
25
|
-
50% {
|
26
|
-
transform: scale(0.92);
|
27
|
-
}
|
28
|
-
|
29
|
-
100% {
|
30
|
-
transform: scale(1);
|
31
|
-
}
|
32
|
-
`)),De=(0,te.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Ne=(0,te.Ay)(Ae,{name:"MuiTouchRipple",slot:"Ripple"})(Ee||(Ee=Re`
|
33
|
-
opacity: 0;
|
34
|
-
position: absolute;
|
35
|
-
|
36
|
-
&.${0} {
|
37
|
-
opacity: 0.3;
|
38
|
-
transform: scale(1);
|
39
|
-
animation-name: ${0};
|
40
|
-
animation-duration: ${0}ms;
|
41
|
-
animation-timing-function: ${0};
|
42
|
-
}
|
43
|
-
|
44
|
-
&.${0} {
|
45
|
-
animation-duration: ${0}ms;
|
46
|
-
}
|
47
|
-
|
48
|
-
& .${0} {
|
49
|
-
opacity: 1;
|
50
|
-
display: block;
|
51
|
-
width: 100%;
|
52
|
-
height: 100%;
|
53
|
-
border-radius: 50%;
|
54
|
-
background-color: currentColor;
|
55
|
-
}
|
56
|
-
|
57
|
-
& .${0} {
|
58
|
-
opacity: 0;
|
59
|
-
animation-name: ${0};
|
60
|
-
animation-duration: ${0}ms;
|
61
|
-
animation-timing-function: ${0};
|
62
|
-
}
|
63
|
-
|
64
|
-
& .${0} {
|
65
|
-
position: absolute;
|
66
|
-
/* @noflip */
|
67
|
-
left: 0px;
|
68
|
-
top: 0;
|
69
|
-
animation-name: ${0};
|
70
|
-
animation-duration: 2500ms;
|
71
|
-
animation-timing-function: ${0};
|
72
|
-
animation-iteration-count: infinite;
|
73
|
-
animation-delay: 200ms;
|
74
|
-
}
|
75
|
-
`),xe.rippleVisible,Oe,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),xe.ripplePulsate,(e=>{let{theme:t}=e;return t.transitions.duration.shorter}),xe.child,xe.childLeaving,Pe,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),xe.childPulsate,Me,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut})),Le=o.forwardRef((function(e,t){const n=(0,A.A)({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:a}=n,s=(0,z.A)(n,ke),[l,c]=o.useState([]),d=o.useRef(0),f=o.useRef(null);o.useEffect((()=>{f.current&&(f.current(),f.current=null)}),[l]);const p=o.useRef(!1),m=o.useRef(null),y=o.useRef(null),b=o.useRef(null);o.useEffect((()=>()=>{clearTimeout(m.current)}),[]);const v=o.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;c((e=>[...e,(0,h.jsx)(Ne,{classes:{ripple:(0,U.A)(i.ripple,xe.ripple),rippleVisible:(0,U.A)(i.rippleVisible,xe.rippleVisible),ripplePulsate:(0,U.A)(i.ripplePulsate,xe.ripplePulsate),child:(0,U.A)(i.child,xe.child),childLeaving:(0,U.A)(i.childLeaving,xe.childLeaving),childPulsate:(0,U.A)(i.childPulsate,xe.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},d.current)])),d.current+=1,f.current=a}),[i]),g=o.useCallback((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const{pulsate:i=!1,center:o=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&p.current)return void(p.current=!1);"touchstart"===(null==e?void 0:e.type)&&(p.current=!0);const s=a?null:b.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(o)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2===0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===y.current&&(y.current=()=>{v({pulsate:i,rippleX:c,rippleY:u,rippleSize:d,cb:n})},m.current=setTimeout((()=>{y.current&&(y.current(),y.current=null)}),80)):v({pulsate:i,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[r,v]),w=o.useCallback((()=>{g({},{pulsate:!0})}),[g]),_=o.useCallback(((e,t)=>{if(clearTimeout(m.current),"touchend"===(null==e?void 0:e.type)&&y.current)return y.current(),y.current=null,void(m.current=setTimeout((()=>{_(e,t)})));y.current=null,c((e=>e.length>0?e.slice(1):e)),f.current=t}),[]);return o.useImperativeHandle(t,(()=>({pulsate:w,start:g,stop:_})),[w,g,_]),(0,h.jsx)(De,(0,u.A)({className:(0,U.A)(xe.root,i.root,a),ref:b},s,{children:(0,h.jsx)(Se,{component:null,exit:!0,children:l})}))}));function Fe(e){return(0,re.A)("MuiButtonBase",e)}const Be=(0,ie.A)("MuiButtonBase",["root","disabled","focusVisible"]),je=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],ze=(0,te.Ay)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Be.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ue=o.forwardRef((function(e,t){const n=(0,A.A)({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:d=!1,disableTouchRipple:f=!1,focusRipple:p=!1,LinkComponent:m="a",onBlur:y,onClick:b,onContextMenu:v,onDragLeave:g,onFocus:w,onFocusVisible:_,onKeyDown:S,onKeyUp:x,onMouseDown:k,onMouseLeave:C,onMouseUp:T,onTouchEnd:I,onTouchMove:E,onTouchStart:R,tabIndex:O=0,TouchRippleProps:P,touchRippleRef:M,type:D}=n,N=(0,z.A)(n,je),L=o.useRef(null),F=o.useRef(null),B=(0,fe.A)(F,M),{isFocusVisibleRef:j,onFocus:V,onBlur:$,ref:W}=(0,he.A)(),[H,Y]=o.useState(!1);c&&H&&Y(!1),o.useImperativeHandle(r,(()=>({focusVisible:()=>{Y(!0),L.current.focus()}})),[]);const[G,q]=o.useState(!1);o.useEffect((()=>{q(!0)}),[]);const K=G&&!d&&!c;function Q(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f;return(0,pe.A)((r=>{t&&t(r);return!n&&F.current&&F.current[e](r),!0}))}o.useEffect((()=>{H&&p&&!d&&G&&F.current.pulsate()}),[d,p,H,G]);const X=Q("start",k),J=Q("stop",v),ee=Q("stop",g),te=Q("stop",T),ne=Q("stop",(e=>{H&&e.preventDefault(),C&&C(e)})),re=Q("start",R),ie=Q("stop",I),oe=Q("stop",E),ae=Q("stop",(e=>{$(e),!1===j.current&&Y(!1),y&&y(e)}),!1),se=(0,pe.A)((e=>{L.current||(L.current=e.currentTarget),V(e),!0===j.current&&(Y(!0),_&&_(e)),w&&w(e)})),le=()=>{const e=L.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},ce=o.useRef(!1),ue=(0,pe.A)((e=>{p&&!ce.current&&H&&F.current&&" "===e.key&&(ce.current=!0,F.current.stop(e,(()=>{F.current.start(e)}))),e.target===e.currentTarget&&le()&&" "===e.key&&e.preventDefault(),S&&S(e),e.target===e.currentTarget&&le()&&"Enter"===e.key&&!c&&(e.preventDefault(),b&&b(e))})),de=(0,pe.A)((e=>{p&&" "===e.key&&F.current&&H&&!e.defaultPrevented&&(ce.current=!1,F.current.stop(e,(()=>{F.current.pulsate(e)}))),x&&x(e),b&&e.target===e.currentTarget&&le()&&" "===e.key&&!e.defaultPrevented&&b(e)}));let me=l;"button"===me&&(N.href||N.to)&&(me=m);const ye={};"button"===me?(ye.type=void 0===D?"button":D,ye.disabled=c):(N.href||N.to||(ye.role="button"),c&&(ye["aria-disabled"]=c));const be=(0,fe.A)(t,W,L);const ve=(0,u.A)({},n,{centerRipple:i,component:l,disabled:c,disableRipple:d,disableTouchRipple:f,focusRipple:p,tabIndex:O,focusVisible:H}),ge=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o={root:["root",t&&"disabled",n&&"focusVisible"]},a=(0,Z.A)(o,Fe,i);return n&&r&&(a.root+=` ${r}`),a})(ve);return(0,h.jsxs)(ze,(0,u.A)({as:me,className:(0,U.A)(ge.root,s),ownerState:ve,onBlur:ae,onClick:b,onContextMenu:J,onFocus:se,onKeyDown:ue,onKeyUp:de,onMouseDown:X,onMouseLeave:ne,onMouseUp:te,onDragLeave:ee,onTouchEnd:ie,onTouchMove:oe,onTouchStart:re,ref:be,tabIndex:c?-1:O,type:D},ye,N,{children:[a,K?(0,h.jsx)(Le,(0,u.A)({ref:B,center:i},P)):null]}))}));function Ve(e){return(0,re.A)("MuiIconButton",e)}const $e=(0,ie.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),We=["edge","children","className","color","disabled","disableFocusRipple","size"],He=(0,te.Ay)(Ue,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${(0,ne.A)(n.color)}`],n.edge&&t[`edge${(0,ne.A)(n.edge)}`],t[`size${(0,ne.A)(n.size)}`]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,u.A)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,ee.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})}),(e=>{let{theme:t,ownerState:n}=e;return(0,u.A)({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&(0,u.A)({color:(t.vars||t).palette[n.color].main},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,ee.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}}),"small"===n.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${$e.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})})),Ye=o.forwardRef((function(e,t){const n=(0,A.A)({props:e,name:"MuiIconButton"}),{edge:r=!1,children:i,className:o,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium"}=n,d=(0,z.A)(n,We),f=(0,u.A)({},n,{edge:r,color:a,disabled:s,disableFocusRipple:l,size:c}),p=(e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,a={root:["root",n&&"disabled","default"!==r&&`color${(0,ne.A)(r)}`,i&&`edge${(0,ne.A)(i)}`,`size${(0,ne.A)(o)}`]};return(0,Z.A)(a,Ve,t)})(f);return(0,h.jsx)(He,(0,u.A)({className:(0,U.A)(p.root,o),centerRipple:!0,focusRipple:!l,disabled:s,ref:t,ownerState:f},d,{children:i}))}));var Ge=n(8063);const qe=(0,Ge.A)((0,h.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),Ke=(0,Ge.A)((0,h.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),Qe=(0,Ge.A)((0,h.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),Xe=(0,Ge.A)((0,h.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),Je=(0,Ge.A)((0,h.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");var Ze;const et=["action","children","className","closeText","color","icon","iconMapping","onClose","role","severity","variant"],tt=(0,te.Ay)(ce,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,ne.A)(n.color||n.severity)}`]]}})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?ee.e$:ee.a,i="light"===t.palette.mode?ee.a:ee.e$,o=n.color||n.severity;return(0,u.A)({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px"},o&&"standard"===n.variant&&{color:t.vars?t.vars.palette.Alert[`${o}Color`]:r(t.palette[o].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${o}StandardBg`]:i(t.palette[o].light,.9),[`& .${de.icon}`]:t.vars?{color:t.vars.palette.Alert[`${o}IconColor`]}:{color:"dark"===t.palette.mode?t.palette[o].main:t.palette[o].light}},o&&"outlined"===n.variant&&{color:t.vars?t.vars.palette.Alert[`${o}Color`]:r(t.palette[o].light,.6),border:`1px solid ${(t.vars||t).palette[o].light}`,[`& .${de.icon}`]:t.vars?{color:t.vars.palette.Alert[`${o}IconColor`]}:{color:"dark"===t.palette.mode?t.palette[o].main:t.palette[o].light}},o&&"filled"===n.variant&&(0,u.A)({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert[`${o}FilledColor`],backgroundColor:t.vars.palette.Alert[`${o}FilledBg`]}:{backgroundColor:"dark"===t.palette.mode?t.palette[o].dark:t.palette[o].main,color:t.palette.getContrastText("dark"===t.palette.mode?t.palette[o].dark:t.palette[o].main)}))})),nt=(0,te.Ay)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),rt=(0,te.Ay)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),it=(0,te.Ay)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),ot={success:(0,h.jsx)(qe,{fontSize:"inherit"}),warning:(0,h.jsx)(Ke,{fontSize:"inherit"}),error:(0,h.jsx)(Qe,{fontSize:"inherit"}),info:(0,h.jsx)(Xe,{fontSize:"inherit"})},at=o.forwardRef((function(e,t){const n=(0,A.A)({props:e,name:"MuiAlert"}),{action:r,children:i,className:o,closeText:a="Close",color:s,icon:l,iconMapping:c=ot,onClose:d,role:f="alert",severity:p="success",variant:m="standard"}=n,y=(0,z.A)(n,et),b=(0,u.A)({},n,{color:s,severity:p,variant:m}),v=(e=>{const{variant:t,color:n,severity:r,classes:i}=e,o={root:["root",`${t}${(0,ne.A)(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return(0,Z.A)(o,ue,i)})(b);return(0,h.jsxs)(tt,(0,u.A)({role:f,elevation:0,ownerState:b,className:(0,U.A)(v.root,o),ref:t},y,{children:[!1!==l?(0,h.jsx)(nt,{ownerState:b,className:v.icon,children:l||c[p]||ot[p]}):null,(0,h.jsx)(rt,{ownerState:b,className:v.message,children:i}),null!=r?(0,h.jsx)(it,{ownerState:b,className:v.action,children:r}):null,null==r&&d?(0,h.jsx)(it,{ownerState:b,className:v.action,children:(0,h.jsx)(Ye,{size:"small","aria-label":a,title:a,color:"inherit",onClick:d,children:Ze||(Ze=(0,h.jsx)(Je,{fontSize:"small"}))})}):null]}))}));var st=n(4263);function lt(e){return(0,re.A)("MuiButton",e)}const ct=(0,ie.A)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);const ut=o.createContext({}),dt=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],ft=e=>(0,u.A)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),pt=(0,te.Ay)(Ue,{shouldForwardProp:e=>(0,te.ep)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,ne.A)(n.color)}`],t[`size${(0,ne.A)(n.size)}`],t[`${n.variant}Size${(0,ne.A)(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((e=>{let{theme:t,ownerState:n}=e;var r,i;return(0,u.A)({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":(0,u.A)({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,ee.X4)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===n.variant&&"inherit"!==n.color&&{backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,ee.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===n.variant&&"inherit"!==n.color&&{border:`1px solid ${(t.vars||t).palette[n.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[n.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:(0,ee.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===n.variant&&{backgroundColor:(t.vars||t).palette.grey.A100,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},"contained"===n.variant&&"inherit"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}}),"&:active":(0,u.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${ct.focusVisible}`]:(0,u.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${ct.disabled}`]:(0,u.A)({color:(t.vars||t).palette.action.disabled},"outlined"===n.variant&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"outlined"===n.variant&&"secondary"===n.color&&{border:`1px solid ${(t.vars||t).palette.action.disabled}`},"contained"===n.variant&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},"text"===n.variant&&{padding:"6px 8px"},"text"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main},"outlined"===n.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[n.color].mainChannel} / 0.5)`:`1px solid ${(0,ee.X4)(t.palette[n.color].main,.5)}`},"contained"===n.variant&&{color:t.vars?t.vars.palette.text.primary:null==(r=(i=t.palette).getContrastText)?void 0:r.call(i,t.palette.grey[300]),backgroundColor:(t.vars||t).palette.grey[300],boxShadow:(t.vars||t).shadows[2]},"contained"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main},"inherit"===n.color&&{color:"inherit",borderColor:"currentColor"},"small"===n.size&&"text"===n.variant&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"text"===n.variant&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"outlined"===n.variant&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"outlined"===n.variant&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"contained"===n.variant&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"contained"===n.variant&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},n.fullWidth&&{width:"100%"})}),(e=>{let{ownerState:t}=e;return t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${ct.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${ct.disabled}`]:{boxShadow:"none"}}})),ht=(0,te.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${(0,ne.A)(n.size)}`]]}})((e=>{let{ownerState:t}=e;return(0,u.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},ft(t))})),mt=(0,te.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${(0,ne.A)(n.size)}`]]}})((e=>{let{ownerState:t}=e;return(0,u.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},ft(t))})),yt=o.forwardRef((function(e,t){const n=o.useContext(ut),r=(0,st.A)(n,e),i=(0,A.A)({props:r,name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:c,disabled:d=!1,disableElevation:f=!1,disableFocusRipple:p=!1,endIcon:m,focusVisibleClassName:y,fullWidth:b=!1,size:v="medium",startIcon:g,type:w,variant:_="text"}=i,S=(0,z.A)(i,dt),x=(0,u.A)({},i,{color:s,component:l,disabled:d,disableElevation:f,disableFocusRipple:p,fullWidth:b,size:v,type:w,variant:_}),k=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:a}=e,s={root:["root",o,`${o}${(0,ne.A)(t)}`,`size${(0,ne.A)(i)}`,`${o}Size${(0,ne.A)(i)}`,"inherit"===t&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${(0,ne.A)(i)}`],endIcon:["endIcon",`iconSize${(0,ne.A)(i)}`]},l=(0,Z.A)(s,lt,a);return(0,u.A)({},a,l)})(x),C=g&&(0,h.jsx)(ht,{className:k.startIcon,ownerState:x,children:g}),T=m&&(0,h.jsx)(mt,{className:k.endIcon,ownerState:x,children:m});return(0,h.jsxs)(pt,(0,u.A)({ownerState:x,className:(0,U.A)(n.className,k.root,c),component:l,disabled:d,focusRipple:!p,focusVisibleClassName:(0,U.A)(k.focusVisible,y),ref:t,type:w},S,{classes:k,children:[C,a,T]}))}));var bt=n(129),vt=n(3742);const gt=["component","direction","spacing","divider","children"];function wt(e,t){const n=o.Children.toArray(e).filter(Boolean);return n.reduce(((e,r,i)=>(e.push(r),i<n.length-1&&e.push(o.cloneElement(t,{key:`separator-${i}`})),e)),[])}const _t=(0,te.Ay)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>[t.root]})((e=>{let{ownerState:t,theme:n}=e,r=(0,u.A)({display:"flex",flexDirection:"column"},(0,bt.NI)({theme:n},(0,bt.kW)({values:t.direction,breakpoints:n.breakpoints.values}),(e=>({flexDirection:e}))));if(t.spacing){const e=(0,vt.LX)(n),i=Object.keys(n.breakpoints.values).reduce(((e,n)=>(("object"===typeof t.spacing&&null!=t.spacing[n]||"object"===typeof t.direction&&null!=t.direction[n])&&(e[n]=!0),e)),{}),o=(0,bt.kW)({values:t.direction,base:i}),a=(0,bt.kW)({values:t.spacing,base:i});"object"===typeof o&&Object.keys(o).forEach(((e,t,n)=>{if(!o[e]){const r=t>0?o[n[t-1]]:"column";o[e]=r}}));const s=(n,r)=>{return{"& > :not(style) + :not(style)":{margin:0,[`margin${i=r?o[r]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[i]}`]:(0,vt._W)(e,n)}};var i};r=(0,W.A)(r,(0,bt.NI)({theme:n},a,s))}return r=(0,bt.iZ)(n.breakpoints,r),r})),St=o.forwardRef((function(e,t){const n=q((0,A.A)({props:e,name:"MuiStack"})),{component:r="div",direction:i="column",spacing:o=0,divider:a,children:s}=n,l=(0,z.A)(n,gt),c={direction:i,spacing:o};return(0,h.jsx)(_t,(0,u.A)({as:r,ownerState:c,ref:t},l,{children:a?wt(s,a):s}))})),At=St;var xt=n(8415);function kt(e){return(0,re.A)("MuiNativeSelect",e)}const Ct=(0,ie.A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]),Tt=["className","disabled","IconComponent","inputRef","variant"],It=(0,te.Ay)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:te.ep,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],{[`&.${Ct.multiple}`]:t.multiple}]}})((e=>{let{ownerState:t,theme:n}=e;return(0,u.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{backgroundColor:"light"===n.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},[`&.${Ct.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:n.palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===t.variant&&{"&&&":{paddingRight:32}},"outlined"===t.variant&&{borderRadius:n.shape.borderRadius,"&:focus":{borderRadius:n.shape.borderRadius},"&&&":{paddingRight:32}})})),Et=(0,te.Ay)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${(0,ne.A)(n.variant)}`],n.open&&t.iconOpen]}})((e=>{let{ownerState:t,theme:n}=e;return(0,u.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:n.palette.action.active,[`&.${Ct.disabled}`]:{color:n.palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})})),Rt=o.forwardRef((function(e,t){const{className:n,disabled:r,IconComponent:i,inputRef:a,variant:s="standard"}=e,l=(0,z.A)(e,Tt),c=(0,u.A)({},e,{disabled:r,variant:s}),d=(e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o}=e,a={select:["select",n,r&&"disabled",i&&"multiple"],icon:["icon",`icon${(0,ne.A)(n)}`,o&&"iconOpen",r&&"disabled"]};return(0,Z.A)(a,kt,t)})(c);return(0,h.jsxs)(o.Fragment,{children:[(0,h.jsx)(It,(0,u.A)({ownerState:c,className:(0,U.A)(d.select,n),disabled:r,ref:a||t},l)),e.multiple?null:(0,h.jsx)(Et,{as:i,ownerState:c,className:d.icon})]})}));function Ot(e){let{props:t,states:n,muiFormControl:r}=e;return n.reduce(((e,n)=>(e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e)),{})}const Pt=o.createContext();function Mt(){return o.useContext(Pt)}const Dt=(0,Ge.A)((0,h.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");var Nt=n(9476),Lt=n(5713),Ft=n(5350),Bt=n(2958),jt=n(8829);const zt=["onChange","maxRows","minRows","style","value"];function Ut(e,t){return parseInt(e[t],10)||0}const Vt={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function $t(e){return void 0===e||null===e||0===Object.keys(e).length}const Wt=o.forwardRef((function(e,t){const{onChange:n,maxRows:r,minRows:i=1,style:a,value:l}=e,c=(0,z.A)(e,zt),{current:d}=o.useRef(null!=l),f=o.useRef(null),p=(0,Lt.A)(t,f),m=o.useRef(null),y=o.useRef(0),[b,v]=o.useState({}),g=o.useCallback((()=>{const t=f.current,n=(0,Ft.A)(t).getComputedStyle(t);if("0px"===n.width)return{};const o=m.current;o.style.width=n.width,o.value=t.value||e.placeholder||"x","\n"===o.value.slice(-1)&&(o.value+=" ");const a=n["box-sizing"],s=Ut(n,"padding-bottom")+Ut(n,"padding-top"),l=Ut(n,"border-bottom-width")+Ut(n,"border-top-width"),c=o.scrollHeight;o.value="x";const u=o.scrollHeight;let d=c;i&&(d=Math.max(Number(i)*u,d)),r&&(d=Math.min(Number(r)*u,d)),d=Math.max(d,u);return{outerHeightStyle:d+("border-box"===a?s+l:0),overflow:Math.abs(d-c)<=1}}),[r,i,e.placeholder]),w=(e,t)=>{const{outerHeightStyle:n,overflow:r}=t;return y.current<20&&(n>0&&Math.abs((e.outerHeightStyle||0)-n)>1||e.overflow!==r)?(y.current+=1,{overflow:r,outerHeightStyle:n}):e},_=o.useCallback((()=>{const e=g();$t(e)||v((t=>w(t,e)))}),[g]);o.useEffect((()=>{const e=(0,Bt.A)((()=>{y.current=0,f.current&&(()=>{const e=g();$t(e)||(0,s.flushSync)((()=>{v((t=>w(t,e)))}))})()})),t=(0,Ft.A)(f.current);let n;return t.addEventListener("resize",e),"undefined"!==typeof ResizeObserver&&(n=new ResizeObserver(e),n.observe(f.current)),()=>{e.clear(),t.removeEventListener("resize",e),n&&n.disconnect()}})),(0,jt.A)((()=>{_()})),o.useEffect((()=>{y.current=0}),[l]);return(0,h.jsxs)(o.Fragment,{children:[(0,h.jsx)("textarea",(0,u.A)({value:l,onChange:e=>{y.current=0,d||_(),n&&n(e)},ref:p,rows:i,style:(0,u.A)({height:b.outerHeightStyle,overflow:b.overflow?"hidden":null},a)},c)),(0,h.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:m,tabIndex:-1,style:(0,u.A)({},Vt,a,{padding:0})})]})})),Ht=Wt;const Yt=function(e){return"string"===typeof e};var Gt=n(5267);function qt(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function Kt(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(qt(e.value)&&""!==e.value||t&&qt(e.defaultValue)&&""!==e.defaultValue)}function Qt(e){return(0,re.A)("MuiInputBase",e)}const Xt=(0,ie.A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Jt=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","startAdornment","type","value"],Zt=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${(0,ne.A)(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},en=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},tn=(0,te.Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Zt})((e=>{let{theme:t,ownerState:n}=e;return(0,u.A)({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Xt.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},n.multiline&&(0,u.A)({padding:"4px 0 5px"},"small"===n.size&&{paddingTop:1}),n.fullWidth&&{width:"100%"})})),nn=(0,te.Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:en})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode,i=(0,u.A)({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),o={opacity:"0 !important"},a=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return(0,u.A)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Xt.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus:-ms-input-placeholder":a,"&:focus::-ms-input-placeholder":a},[`&.${Xt.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===n.size&&{paddingTop:1},n.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===n.type&&{MozAppearance:"textfield"})})),rn=(0,h.jsx)(P,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),on=o.forwardRef((function(e,t){const n=(0,A.A)({props:e,name:"MuiInputBase"}),{"aria-describedby":r,autoComplete:i,autoFocus:a,className:s,components:l={},componentsProps:c={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:p,endAdornment:m,fullWidth:y=!1,id:b,inputComponent:v="input",inputProps:g={},inputRef:w,maxRows:_,minRows:S,multiline:x=!1,name:k,onBlur:C,onChange:T,onClick:I,onFocus:E,onKeyDown:R,onKeyUp:O,placeholder:P,readOnly:M,renderSuffix:D,rows:N,startAdornment:L,type:F="text",value:B}=n,j=(0,z.A)(n,Jt),V=null!=g.value?g.value:B,{current:$}=o.useRef(null!=V),W=o.useRef(),H=o.useCallback((e=>{0}),[]),Y=(0,fe.A)(W,w,g.ref,H),[G,q]=o.useState(!1),K=Mt();const Q=Ot({props:n,muiFormControl:K,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Q.focused=K?K.focused:G,o.useEffect((()=>{!K&&f&&G&&(q(!1),C&&C())}),[K,f,G,C]);const X=K&&K.onFilled,J=K&&K.onEmpty,ee=o.useCallback((e=>{Kt(e)?X&&X():J&&J()}),[X,J]);(0,Gt.A)((()=>{$&&ee({value:V})}),[V,ee,$]);o.useEffect((()=>{ee(W.current)}),[]);let te=v,re=g;x&&"input"===te&&(re=N?(0,u.A)({type:void 0,minRows:N,maxRows:N},re):(0,u.A)({type:void 0,maxRows:_,minRows:S},re),te=Ht);o.useEffect((()=>{K&&K.setAdornedStart(Boolean(L))}),[K,L]);const ie=(0,u.A)({},n,{color:Q.color||"primary",disabled:Q.disabled,endAdornment:m,error:Q.error,focused:Q.focused,formControl:K,fullWidth:y,hiddenLabel:Q.hiddenLabel,multiline:x,size:Q.size,startAdornment:L,type:F}),oe=(e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:f,startAdornment:p,type:h}=e,m={root:["root",`color${(0,ne.A)(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",a&&"focused",s&&"formControl","small"===f&&"sizeSmall",u&&"multiline",p&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",u&&"inputMultiline","small"===f&&"inputSizeSmall",c&&"inputHiddenLabel",p&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]};return(0,Z.A)(m,Qt,t)})(ie),ae=l.Root||tn,se=c.root||{},le=l.Input||nn;return re=(0,u.A)({},re,c.input),(0,h.jsxs)(o.Fragment,{children:[!p&&rn,(0,h.jsxs)(ae,(0,u.A)({},se,!Yt(ae)&&{ownerState:(0,u.A)({},ie,se.ownerState)},{ref:t,onClick:e=>{W.current&&e.currentTarget===e.target&&W.current.focus(),I&&I(e)}},j,{className:(0,U.A)(oe.root,se.className,s),children:[L,(0,h.jsx)(Pt.Provider,{value:null,children:(0,h.jsx)(le,(0,u.A)({ownerState:ie,"aria-invalid":Q.error,"aria-describedby":r,autoComplete:i,autoFocus:a,defaultValue:d,disabled:Q.disabled,id:b,onAnimationStart:e=>{ee("mui-auto-fill-cancel"===e.animationName?W.current:{value:"x"})},name:k,placeholder:P,readOnly:M,required:Q.required,rows:N,value:V,onKeyDown:R,onKeyUp:O,type:F},re,!Yt(le)&&{as:te,ownerState:(0,u.A)({},ie,re.ownerState)},{ref:Y,className:(0,U.A)(oe.input,re.className),onBlur:e=>{C&&C(e),g.onBlur&&g.onBlur(e),K&&K.onBlur?K.onBlur(e):q(!1)},onChange:function(e){if(!$){const t=e.target||W.current;if(null==t)throw new Error((0,Nt.A)(1));ee({value:t.value})}for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];g.onChange&&g.onChange(e,...n),T&&T(e,...n)},onFocus:e=>{Q.disabled?e.stopPropagation():(E&&E(e),g.onFocus&&g.onFocus(e),K&&K.onFocus?K.onFocus(e):q(!0))}}))}),m,D?D((0,u.A)({},Q,{startAdornment:L})):null]}))]})})),an=on;function sn(e){return(0,re.A)("MuiInput",e)}const ln=(0,u.A)({},Xt,(0,ie.A)("MuiInput",["root","underline","input"])),cn=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","type"],un=(0,te.Ay)(tn,{shouldForwardProp:e=>(0,te.ep)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Zt(e,t),!n.disableUnderline&&t.underline]}})((e=>{let{theme:t,ownerState:n}=e;let r="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),(0,u.A)({position:"relative"},n.formControl&&{"label + &":{marginTop:16}},!n.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(t.vars||t).palette[n.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ln.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ln.error}:after`]:{borderBottomColor:(t.vars||t).palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ln.disabled}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${ln.disabled}:before`]:{borderBottomStyle:"dotted"}})})),dn=(0,te.Ay)(nn,{name:"MuiInput",slot:"Input",overridesResolver:en})({}),fn=o.forwardRef((function(e,t){const n=(0,A.A)({props:e,name:"MuiInput"}),{disableUnderline:r,components:i={},componentsProps:o,fullWidth:a=!1,inputComponent:s="input",multiline:l=!1,type:c="text"}=n,d=(0,z.A)(n,cn),f=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},i=(0,Z.A)(r,sn,t);return(0,u.A)({},t,i)})(n),p={root:{ownerState:{disableUnderline:r}}},m=o?(0,W.A)(o,p):p;return(0,h.jsx)(an,(0,u.A)({components:(0,u.A)({Root:un,Input:dn},i),componentsProps:m,fullWidth:a,inputComponent:s,multiline:l,ref:t,type:c},d,{classes:f}))}));fn.muiName="Input";const pn=fn,hn=["className","children","classes","IconComponent","input","inputProps","variant"],mn=["root"],yn=(0,h.jsx)(pn,{}),bn=o.forwardRef((function(e,t){const n=(0,A.A)({name:"MuiNativeSelect",props:e}),{className:r,children:i,classes:a={},IconComponent:s=Dt,input:l=yn,inputProps:c}=n,d=(0,z.A)(n,hn),f=Ot({props:n,muiFormControl:Mt(),states:["variant"]}),p=(e=>{const{classes:t}=e;return(0,Z.A)({root:["root"]},kt,t)})((0,u.A)({},n,{classes:a})),m=(0,z.A)(a,mn);return(0,h.jsx)(o.Fragment,{children:o.cloneElement(l,(0,u.A)({inputComponent:Rt,inputProps:(0,u.A)({children:i,classes:m,IconComponent:s,variant:f.variant,type:void 0},c,l?l.props.inputProps:{}),ref:t},d,{className:(0,U.A)(p.root,l.props.className,r)}))})}));bn.muiName="Select";const vn=bn;function gn(e){return(0,re.A)("MuiFormLabel",e)}const wn=(0,ie.A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),_n=["children","className","color","component","disabled","error","filled","focused","required"],Sn=(0,te.Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,u.A)({},t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled)}})((e=>{let{theme:t,ownerState:n}=e;return(0,u.A)({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${wn.focused}`]:{color:(t.vars||t).palette[n.color].main},[`&.${wn.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${wn.error}`]:{color:(t.vars||t).palette.error.main}})})),An=(0,te.Ay)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((e=>{let{theme:t}=e;return{[`&.${wn.error}`]:{color:(t.vars||t).palette.error.main}}})),xn=o.forwardRef((function(e,t){const n=(0,A.A)({props:e,name:"MuiFormLabel"}),{children:r,className:i,component:o="label"}=n,a=(0,z.A)(n,_n),s=Ot({props:n,muiFormControl:Mt(),states:["color","required","focused","disabled","error","filled"]}),l=(0,u.A)({},n,{color:s.color||"primary",component:o,disabled:s.disabled,error:s.error,filled:s.filled,focused:s.focused,required:s.required}),c=(e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:a,required:s}=e,l={root:["root",`color${(0,ne.A)(n)}`,i&&"disabled",o&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",o&&"error"]};return(0,Z.A)(l,gn,t)})(l);return(0,h.jsxs)(Sn,(0,u.A)({as:o,ownerState:l,className:(0,U.A)(c.root,i),ref:t},a,{children:[r,s.required&&(0,h.jsxs)(An,{ownerState:l,"aria-hidden":!0,className:c.asterisk,children:["\u2009","*"]})]}))}));function kn(e){return(0,re.A)("MuiInputLabel",e)}(0,ie.A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Cn=["disableAnimation","margin","shrink","variant","className"],Tn=(0,te.Ay)(xn,{shouldForwardProp:e=>(0,te.ep)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${wn.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,u.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},n.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===n.size&&{transform:"translate(0, 17px) scale(1)"},n.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!n.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},"filled"===n.variant&&(0,u.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(12px, 13px) scale(1)"},n.shrink&&(0,u.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===n.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===n.variant&&(0,u.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(14px, 9px) scale(1)"},n.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 24px)",transform:"translate(14px, -9px) scale(0.75)"}))})),In=o.forwardRef((function(e,t){const n=(0,A.A)({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,shrink:i,className:o}=n,a=(0,z.A)(n,Cn),s=Mt();let l=i;"undefined"===typeof l&&s&&(l=s.filled||s.focused||s.adornedStart);const c=Ot({props:n,muiFormControl:s,states:["size","variant","required"]}),d=(0,u.A)({},n,{disableAnimation:r,formControl:s,shrink:l,size:c.size,variant:c.variant,required:c.required}),f=(e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:a,required:s}=e,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink","small"===r&&"sizeSmall",a],asterisk:[s&&"asterisk"]},c=(0,Z.A)(l,kn,t);return(0,u.A)({},t,c)})(d);return(0,h.jsx)(Tn,(0,u.A)({"data-shrink":l,ownerState:d,ref:t,className:(0,U.A)(f.root,o)},a,{classes:f}))}));var En=n(6701);function Rn(e){return(0,re.A)("MuiFormControl",e)}(0,ie.A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const On=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Pn=(0,te.Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,u.A)({},t.root,t[`margin${(0,ne.A)(n.margin)}`],n.fullWidth&&t.fullWidth)}})((e=>{let{ownerState:t}=e;return(0,u.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})})),Mn=o.forwardRef((function(e,t){const n=(0,A.A)({props:e,name:"MuiFormControl"}),{children:r,className:i,color:a="primary",component:s="div",disabled:l=!1,error:c=!1,focused:d,fullWidth:f=!1,hiddenLabel:p=!1,margin:m="none",required:y=!1,size:b="medium",variant:v="outlined"}=n,g=(0,z.A)(n,On),w=(0,u.A)({},n,{color:a,component:s,disabled:l,error:c,fullWidth:f,hiddenLabel:p,margin:m,required:y,size:b,variant:v}),_=(e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root","none"!==n&&`margin${(0,ne.A)(n)}`,r&&"fullWidth"]};return(0,Z.A)(i,Rn,t)})(w),[S,x]=o.useState((()=>{let e=!1;return r&&o.Children.forEach(r,(t=>{if(!(0,En.A)(t,["Input","Select"]))return;const n=(0,En.A)(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)})),e})),[k,C]=o.useState((()=>{let e=!1;return r&&o.Children.forEach(r,(t=>{(0,En.A)(t,["Input","Select"])&&Kt(t.props,!0)&&(e=!0)})),e})),[T,I]=o.useState(!1);l&&T&&I(!1);const E=void 0===d||l?T:d;const R=o.useCallback((()=>{C(!0)}),[]),O={adornedStart:S,setAdornedStart:x,color:a,disabled:l,error:c,filled:k,focused:E,fullWidth:f,hiddenLabel:p,size:b,onBlur:()=>{I(!1)},onEmpty:o.useCallback((()=>{C(!1)}),[]),onFilled:R,onFocus:()=>{I(!0)},registerEffect:undefined,required:y,variant:v};return(0,h.jsx)(Pt.Provider,{value:O,children:(0,h.jsx)(Pn,(0,u.A)({as:s,ownerState:w,className:(0,U.A)(_.root,i),ref:t},g,{children:r}))})}));var Dn=n(4648),Nn=n(965);function Ln(e,t,n,r,i){const a="undefined"!==typeof window&&"undefined"!==typeof window.matchMedia,[s,l]=o.useState((()=>i&&a?n(e).matches:r?r(e).matches:t));return(0,Gt.A)((()=>{let t=!0;if(!a)return;const r=n(e),i=()=>{t&&l(r.matches)};return i(),r.addListener(i),()=>{t=!1,r.removeListener(i)}}),[e,n,a]),s}const Fn=a.useSyncExternalStore;function Bn(e,t,n,r){const i=o.useCallback((()=>t),[t]),a=o.useMemo((()=>{if(null!==r){const{matches:t}=r(e);return()=>t}return i}),[i,e,r]),[s,l]=o.useMemo((()=>{if(null===n)return[i,()=>()=>{}];const t=n(e);return[()=>t.matches,e=>(t.addListener(e),()=>{t.removeListener(e)})]}),[i,n,e]);return Fn(l,s,a)}const jn=e=>{const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,Dn.A)(),r="undefined"!==typeof window&&"undefined"!==typeof window.matchMedia,{defaultMatches:i=!1,matchMedia:o=(r?window.matchMedia:null),ssrMatchMedia:a=null,noSsr:s}=(0,Nn.A)({name:"MuiUseMediaQuery",props:t,theme:n});let l="function"===typeof e?e(n):e;return l=l.replace(/^@media( ?)/m,""),(void 0!==Fn?Bn:Ln)(l,i,o,a,s)}((0,b.A)(O.A).breakpoints.down("sm"));return(0,o.useEffect)((()=>{xt.Streamlit.setFrameHeight()}),[t]),(0,h.jsx)(At,{direction:t?"column":"row",spacing:2,children:e.children})},zn=(0,te.Ay)(J)((e=>{let{theme:t}=e;return{position:"relative",[t.breakpoints.down("sm")]:{width:"100%"},width:t.spacing(24),height:t.spacing(16),maxHeight:t.spacing(16),display:"flex",justifyContent:"center",alignItems:"center"}})),Un=(0,te.Ay)(ce)((e=>{let{theme:t}=e;return{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",padding:t.spacing(2),boxSizing:"border-box"}})),Vn=()=>(0,h.jsx)(Un,{children:F("media_api_not_available")||"Media API not available"}),$n=()=>(0,h.jsx)(Un,{children:F("device_ask_permission")||"Please allow the app to use your media devices"}),Wn=e=>(0,h.jsxs)(Un,{children:[F("device_access_denied")||"Access denied"," (",e.error.message,")"]}),Hn=e=>(0,h.jsxs)(Un,{children:[F("device_not_available")||"Device not available"," (",e.error.message,")"]});var Yn=n(4787);const Gn=(0,te.Ay)(ce)({display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"}),qn=()=>(0,h.jsx)(Gn,{children:(0,h.jsx)(Yn.A,{fontSize:"large"})}),Kn=o.memo(qn),Qn=(0,te.Ay)(J,{shouldForwardProp:e=>"$transparent"!==e})((e=>{let{theme:t,$transparent:n}=e;return{margin:0,padding:0,position:"relative","&:before":{position:"absolute",content:'""',width:"100%",height:"100%",opacity:n?0:1,backgroundColor:t.palette.background.default,transition:"opacity 0.3s"}}})),Xn=e=>{const[t,n]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{const t=setTimeout((()=>{n(!0)}),e.time);return()=>clearTimeout(t)}),[e.time]),(0,h.jsx)(Qn,{$transparent:t,children:e.children})},Jn=(0,te.Ay)("video")({maxWidth:"100%",maxHeight:"100%"});function Zn(e){e.getVideoTracks().forEach((e=>e.stop())),e.getAudioTracks().forEach((e=>e.stop()))}const er=e=>{const t=(0,o.useRef)(null);return(0,o.useEffect)((()=>{if(null==e.deviceId)return;let n=null,r=!1;return navigator.mediaDevices.getUserMedia({video:{deviceId:e.deviceId},audio:!1}).then((e=>{n=e,r?Zn(n):t.current&&(t.current.srcObject=n)})),()=>{r=!0,n&&Zn(n)}}),[e.deviceId]),(0,h.jsx)(Jn,{ref:t,autoPlay:!0,muted:!0})},tr=o.memo(er);function nr(e,t){const n=e.map((e=>e.deviceId));return t&&n.includes(t)?t:n.length>0?n[0]:void 0}const rr=(e,t)=>{switch(t.type){case"SET_UNAVAILABLE":return{unavailable:!0,videoInputs:[],audioInputs:[],audioOutputs:[],selectedVideoInputDeviceId:void 0,selectedAudioInputDeviceId:void 0};case"UPDATE_DEVICES":{const n=t.devices,r=n.filter((e=>"videoinput"===e.kind)),i=n.filter((e=>"audioinput"===e.kind)),o=n.filter((e=>"audiooutput"===e.kind)),a=nr(r,e.selectedVideoInputDeviceId),s=nr(i,e.selectedAudioInputDeviceId);return{...e,videoInputs:r,audioInputs:i,audioOutputs:o,selectedVideoInputDeviceId:a,selectedAudioInputDeviceId:s}}case"UPDATE_SELECTED_DEVICE_ID":return{...e,...t.payload}}},ir=e=>{const{video:t,audio:n,defaultVideoDeviceId:r,defaultAudioDeviceId:i,onSelect:a}=e,[s,l]=(0,o.useState)("WAITING"),[{unavailable:c,videoInputs:u,selectedVideoInputDeviceId:d,audioInputs:f,selectedAudioInputDeviceId:p},m]=(0,o.useReducer)(rr,{unavailable:!1,videoInputs:[],audioInputs:[],audioOutputs:[],selectedVideoInputDeviceId:r,selectedAudioInputDeviceId:i}),y=(0,o.useCallback)((()=>{var e,t;if("function"===typeof(null===(e=navigator)||void 0===e||null===(t=e.mediaDevices)||void 0===t?void 0:t.enumerateDevices))return navigator.mediaDevices.enumerateDevices().then((e=>{m({type:"UPDATE_DEVICES",devices:e})}));m({type:"SET_UNAVAILABLE"})}),[]),b=(0,o.useRef)({video:r,audio:i});b.current={video:r,audio:i},(0,o.useEffect)((()=>{var e,r;if("function"!==typeof(null===(e=navigator)||void 0===e||null===(r=e.mediaDevices)||void 0===r?void 0:r.getUserMedia))return void m({type:"SET_UNAVAILABLE"});l("WAITING");const{video:i,audio:o}=b.current;navigator.mediaDevices.getUserMedia({video:t&&i?{deviceId:i}:t,audio:n&&o?{deviceId:o}:n}).then((async e=>{Zn(e),await y(),l("ALLOWED")})).catch((e=>{l(e)}))}),[t,n,y]),(0,o.useEffect)((()=>{const e=()=>y();return navigator.mediaDevices.ondevicechange=e,()=>{navigator.mediaDevices.ondevicechange===e&&(navigator.mediaDevices.ondevicechange=null)}}),[y]);const v=(0,o.useCallback)((e=>{m({type:"UPDATE_SELECTED_DEVICE_ID",payload:{selectedVideoInputDeviceId:e.target.value}})}),[]),g=(0,o.useCallback)((e=>{m({type:"UPDATE_SELECTED_DEVICE_ID",payload:{selectedAudioInputDeviceId:e.target.value}})}),[]);if((0,o.useEffect)((()=>{const e=t?u.find((e=>e.deviceId===d)):null,r=n?f.find((e=>e.deviceId===p)):null;a({video:null===e||void 0===e?void 0:e.deviceId,audio:null===r||void 0===r?void 0:r.deviceId})}),[t,n,a,u,f,d,p]),(0,o.useEffect)((()=>{setTimeout((()=>xt.Streamlit.setFrameHeight()))})),c)return(0,h.jsx)(Vn,{});if("WAITING"===s)return(0,h.jsx)(Xn,{time:1e3,children:(0,h.jsx)($n,{})});if(s instanceof Error){const e=s;return e instanceof DOMException&&("NotReadableError"===e.name||"NotFoundError"===e.name)?(0,h.jsx)(Hn,{error:e}):e instanceof DOMException&&"NotAllowedError"===e.name?(0,h.jsx)(Wn,{error:e}):(0,h.jsx)(Un,{children:(0,h.jsxs)(at,{severity:"error",children:[e.name,": ",e.message]})})}return(0,h.jsxs)(jn,{children:[(0,h.jsx)(zn,{children:t&&d?(0,h.jsx)(tr,{deviceId:d}):(0,h.jsx)(Kn,{})}),(0,h.jsxs)(At,{spacing:2,justifyContent:"center",children:[t&&d&&(0,h.jsxs)(Mn,{fullWidth:!0,children:[(0,h.jsx)(In,{htmlFor:"device-select-video-input",children:"Video Input"}),(0,h.jsx)(vn,{inputProps:{name:"video-input",id:"device-select-video-input"},value:d,onChange:v,children:u.map((e=>(0,h.jsx)("option",{value:e.deviceId,children:e.label},e.deviceId)))})]}),n&&p&&(0,h.jsxs)(Mn,{fullWidth:!0,children:[(0,h.jsx)(In,{htmlFor:"device-select-audio-input",children:"Audio Input"}),(0,h.jsx)(vn,{inputProps:{name:"audio-input",id:"device-select-audio-input"},value:p,onChange:g,children:f.map((e=>(0,h.jsx)("option",{value:e.deviceId,children:e.label},e.deviceId)))})]})]})]})},or=e=>{let{onClose:t,...n}=e;return(0,h.jsxs)(At,{spacing:2,children:[(0,h.jsx)(ir,{...n}),(0,h.jsx)(J,{children:(0,h.jsx)(yt,{variant:"contained",color:"primary",onClick:t,children:"Done"})})]})},ar=e=>{(0,o.useEffect)((()=>{xt.Streamlit.setFrameHeight()}));const t=e.stream.getVideoTracks().length>0,n=(0,o.useCallback)((t=>{t&&(t.srcObject=e.stream)}),[e.stream]),r=(0,o.useCallback)((()=>xt.Streamlit.setFrameHeight()),[]);if(t){var i,a,s,l,c,u,d,f,p,m,y,b,v,g,w,_;const t={hidden:null===(i=e.userDefinedVideoAttrs)||void 0===i?void 0:i.hidden,style:null===(a=e.userDefinedVideoAttrs)||void 0===a?void 0:a.style,autoPlay:null===(s=e.userDefinedVideoAttrs)||void 0===s?void 0:s.autoPlay,controls:null===(l=e.userDefinedVideoAttrs)||void 0===l?void 0:l.controls,controlsList:null===(c=e.userDefinedVideoAttrs)||void 0===c?void 0:c.controlsList,crossOrigin:null===(u=e.userDefinedVideoAttrs)||void 0===u?void 0:u.crossOrigin,loop:null===(d=e.userDefinedVideoAttrs)||void 0===d?void 0:d.loop,mediaGroup:null===(f=e.userDefinedVideoAttrs)||void 0===f?void 0:f.mediaGroup,muted:null===(p=e.userDefinedVideoAttrs)||void 0===p?void 0:p.muted,playsInline:null===(m=e.userDefinedVideoAttrs)||void 0===m?void 0:m.playsInline,preload:null===(y=e.userDefinedVideoAttrs)||void 0===y?void 0:y.preload,height:null===(b=e.userDefinedVideoAttrs)||void 0===b?void 0:b.height,poster:null===(v=e.userDefinedVideoAttrs)||void 0===v?void 0:v.poster,width:null===(g=e.userDefinedVideoAttrs)||void 0===g?void 0:g.width,disablePictureInPicture:null===(w=e.userDefinedVideoAttrs)||void 0===w?void 0:w.disablePictureInPicture,disableRemotePlayback:null===(_=e.userDefinedVideoAttrs)||void 0===_?void 0:_.disableRemotePlayback};return(0,h.jsx)("video",{...t,ref:n,onCanPlay:r})}{var S,A,x,k,C,T,I,E,R,O,P;const t={hidden:null===(S=e.userDefinedAudioAttrs)||void 0===S?void 0:S.hidden,style:null===(A=e.userDefinedAudioAttrs)||void 0===A?void 0:A.style,autoPlay:null===(x=e.userDefinedAudioAttrs)||void 0===x?void 0:x.autoPlay,controls:null===(k=e.userDefinedAudioAttrs)||void 0===k?void 0:k.controls,controlsList:null===(C=e.userDefinedAudioAttrs)||void 0===C?void 0:C.controlsList,crossOrigin:null===(T=e.userDefinedAudioAttrs)||void 0===T?void 0:T.crossOrigin,loop:null===(I=e.userDefinedAudioAttrs)||void 0===I?void 0:I.loop,mediaGroup:null===(E=e.userDefinedAudioAttrs)||void 0===E?void 0:E.mediaGroup,muted:null===(R=e.userDefinedAudioAttrs)||void 0===R?void 0:R.muted,playsInline:null===(O=e.userDefinedAudioAttrs)||void 0===O?void 0:O.playsInline,preload:null===(P=e.userDefinedAudioAttrs)||void 0===P?void 0:P.preload};return(0,h.jsx)("audio",{ref:n,...t})}},sr=o.memo(ar);function lr(e){return(0,re.A)("MuiCircularProgress",e)}(0,ie.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const cr=["className","color","disableShrink","size","style","thickness","value","variant"];let ur,dr,fr,pr,hr=e=>e;const mr=44,yr=E(ur||(ur=hr`
|
76
|
-
0% {
|
77
|
-
transform: rotate(0deg);
|
78
|
-
}
|
79
|
-
|
80
|
-
100% {
|
81
|
-
transform: rotate(360deg);
|
82
|
-
}
|
83
|
-
`)),br=E(dr||(dr=hr`
|
84
|
-
0% {
|
85
|
-
stroke-dasharray: 1px, 200px;
|
86
|
-
stroke-dashoffset: 0;
|
87
|
-
}
|
88
|
-
|
89
|
-
50% {
|
90
|
-
stroke-dasharray: 100px, 200px;
|
91
|
-
stroke-dashoffset: -15px;
|
92
|
-
}
|
93
|
-
|
94
|
-
100% {
|
95
|
-
stroke-dasharray: 100px, 200px;
|
96
|
-
stroke-dashoffset: -125px;
|
97
|
-
}
|
98
|
-
`)),vr=(0,te.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${(0,ne.A)(n.color)}`]]}})((e=>{let{ownerState:t,theme:n}=e;return(0,u.A)({display:"inline-block"},"determinate"===t.variant&&{transition:n.transitions.create("transform")},"inherit"!==t.color&&{color:(n.vars||n).palette[t.color].main})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&I(fr||(fr=hr`
|
99
|
-
animation: ${0} 1.4s linear infinite;
|
100
|
-
`),yr)})),gr=(0,te.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),wr=(0,te.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${(0,ne.A)(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:n}=e;return(0,u.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:n.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&I(pr||(pr=hr`
|
101
|
-
animation: ${0} 1.4s ease-in-out infinite;
|
102
|
-
`),br)})),_r=o.forwardRef((function(e,t){const n=(0,A.A)({props:e,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:o=!1,size:a=40,style:s,thickness:l=3.6,value:c=0,variant:d="indeterminate"}=n,f=(0,z.A)(n,cr),p=(0,u.A)({},n,{color:i,disableShrink:o,size:a,thickness:l,value:c,variant:d}),m=(e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${(0,ne.A)(r)}`],svg:["svg"],circle:["circle",`circle${(0,ne.A)(n)}`,i&&"circleDisableShrink"]};return(0,Z.A)(o,lr,t)})(p),y={},b={},v={};if("determinate"===d){const e=2*Math.PI*((mr-l)/2);y.strokeDasharray=e.toFixed(3),v["aria-valuenow"]=Math.round(c),y.strokeDashoffset=`${((100-c)/100*e).toFixed(3)}px`,b.transform="rotate(-90deg)"}return(0,h.jsx)(vr,(0,u.A)({className:(0,U.A)(m.root,r),style:(0,u.A)({width:a,height:a},b,s),ownerState:p,ref:t,role:"progressbar"},v,f,{children:(0,h.jsx)(gr,{className:m.svg,ownerState:p,viewBox:"22 22 44 44",children:(0,h.jsx)(wr,{className:m.circle,style:y,ownerState:p,cx:mr,cy:mr,r:(mr-l)/2,fill:"none",strokeWidth:l})})}))})),Sr=_r;var Ar=n(1993);const xr=(0,te.Ay)(ce)((e=>{let{theme:t}=e;return{padding:t.spacing(4),display:"flex",justifyContent:"center",alignItems:"center",width:"100%"}})),kr=e=>((0,o.useEffect)((()=>{xt.Streamlit.setFrameHeight()})),(0,h.jsx)(xr,{elevation:0,children:e.loading?(0,h.jsx)(Sr,{}):(0,h.jsx)(Ar.A,{fontSize:"large"})})),Cr=o.memo(kr);const Tr={webRtcState:"STOPPED",sdpOffer:null,signallingTimedOut:!1,stream:null,error:null},Ir=e=>(t,n)=>{const r=((e,t)=>{switch(t.type){case"SIGNALLING_START":return{...e,webRtcState:"SIGNALLING",stream:null,error:null,signallingTimedOut:!1};case"SIGNALLING_TIMEOUT":return{...e,signallingTimedOut:!0};case"SET_STREAM":return{...e,stream:t.stream};case"SET_OFFER":return{...e,sdpOffer:t.offer};case"STOPPING":return{...e,webRtcState:"STOPPING",sdpOffer:null};case"STOPPED":return{...e,webRtcState:"STOPPED",sdpOffer:null,stream:null};case"START_PLAYING":return{...e,webRtcState:"PLAYING",sdpOffer:null};case"PROCESS_ANSWER_ERROR":return{...e,error:t.error};case"ERROR":return{...e,webRtcState:"STOPPED",sdpOffer:null,error:t.error}}})(t,n),i="PLAYING"===r.webRtcState,o=i!==("PLAYING"===t.webRtcState),a=r.sdpOffer,s=t.sdpOffer;return(o||a!==s)&&(s&&console.log("Send SDP offer",s),e({playing:i,sdpOffer:a?a.toJSON():""})),r},Er=e=>"RECVONLY"===e||"SENDONLY"===e||"SENDRECV"===e,Rr=(e,t,n,r,i)=>{(0,o.useEffect)((()=>r({playing:!1,sdpOffer:""})),[]);const a=(0,o.useRef)(),s=(0,o.useRef)(),l=(0,o.useMemo)((()=>Ir(r)),[r]),[c,u]=(0,o.useReducer)(l,Tr),d=(0,o.useCallback)((()=>{(async()=>{if("STOPPING"===c.webRtcState)return;const e=s.current;return s.current=void 0,u({type:"STOPPING"}),null!=e?(e.getTransceivers&&e.getTransceivers().forEach((function(e){e.stop&&e.stop()})),e.getSenders().forEach((function(e){var t;null===(t=e.track)||void 0===t||t.stop()})),new Promise((t=>{setTimeout((()=>{e.close(),t()}),500)}))):void 0})().catch((e=>u({type:"ERROR",error:e}))).finally((()=>{u({type:"STOPPED"})}))}),[c.webRtcState]),f=(0,o.useRef)(d);f.current=d;const p=(0,o.useCallback)((()=>{if("STOPPED"!==c.webRtcState)return;(async()=>{u({type:"SIGNALLING_START"}),a.current=setTimeout((()=>{u({type:"SIGNALLING_TIMEOUT"})}),3e3);const r=e.mode,o=e.rtcConfiguration||{};console.log("RTCConfiguration:",o);const l=new RTCPeerConnection(o);if("SENDRECV"!==r&&"RECVONLY"!==r||l.addEventListener("track",(e=>{const t=e.streams[0];u({type:"SET_STREAM",stream:t})})),"SENDRECV"===r||"SENDONLY"===r){const o=function(e,t,n){const r=e||{};return t&&(!0===r.video?r.video={deviceId:t}:"object"!==typeof r.video&&null!=r.video||(r.video={...r.video,deviceId:t})),n&&(!0===r.audio?r.audio={deviceId:n}:"object"!==typeof r.audio&&null!=r.audio||(r.audio={...r.audio,deviceId:n})),r}(e.mediaStreamConstraints,t,n);if(console.log("MediaStreamConstraints:",o),o.audio||o.video){if(null==navigator.mediaDevices)throw new Error("navigator.mediaDevices is undefined. It seems the current document is not loaded securely.");if(null==navigator.mediaDevices.getUserMedia)throw new Error("getUserMedia is not implemented in this browser");const e={},t=await navigator.mediaDevices.getUserMedia(o);t.getTracks().forEach((n=>{l.addTrack(n,t);const r=n.kind;if("video"!==r&&"audio"!==r)return;const i=n.getSettings().deviceId;null!=i&&(e[r]=i)})),Object.keys(e).length>0&&i(e)}if("SENDONLY"===r)for(const e of l.getTransceivers())e.direction="sendonly"}else"RECVONLY"===r&&(l.addTransceiver("video",{direction:"recvonly"}),l.addTransceiver("audio",{direction:"recvonly"}));console.log("transceivers",l.getTransceivers()),l.addEventListener("iceconnectionstatechange",(()=>{console.log("iceconnectionstatechange",l.iceConnectionState),"disconnected"!==l.iceConnectionState&&"failed"!==l.iceConnectionState&&"closed"!==l.iceConnectionState||f.current()})),s.current=l,await(e=>e.createOffer().then((t=>(console.log("Created offer:",t),e.setLocalDescription(t)))).then((()=>(console.log("Wait for ICE gethering..."),new Promise((t=>{if("complete"===e.iceGatheringState)t();else{const n=()=>{"complete"===e.iceGatheringState&&(e.removeEventListener("icegatheringstatechange",n),t())};e.addEventListener("icegatheringstatechange",n)}}))))).then((()=>e.localDescription)).catch((e=>{throw console.error(e),e})))(l).then((e=>{if(null==e)throw new Error("Failed to create an offer SDP");u({type:"SET_OFFER",offer:e})}))})().catch((e=>u({type:"ERROR",error:e})))}),[n,t,e.mediaStreamConstraints,e.mode,e.rtcConfiguration,c.webRtcState,i]);return(0,o.useEffect)((()=>{const t=s.current;if(null==t)return;const n=e.sdpAnswerJson;if(null==t.remoteDescription&&n&&"SIGNALLING"===c.webRtcState){const e=JSON.parse(n);console.log("Receive answer sdpOffer",e),t.setRemoteDescription(e).then((()=>{console.log("Remote description is set"),a.current&&clearTimeout(a.current),u({type:"START_PLAYING"})})).catch((e=>{u({type:"PROCESS_ANSWER_ERROR",error:e}),d()}))}}),[e.sdpAnswerJson,c.webRtcState,d]),(0,o.useEffect)((()=>{const t=e.desiredPlayingState;null!=t&&(!0===t&&"STOPPED"===c.webRtcState?p():!1!==t||"SIGNALLING"!==c.webRtcState&&"PLAYING"!==c.webRtcState||d())}),[e.desiredPlayingState,p,c.webRtcState,d]),{start:p,stop:d,state:c}};function Or(e){return xt.Streamlit.setComponentValue(e)}const Pr=e=>{let{translationKey:t,defaultText:n,...r}=e;return(0,h.jsx)(yt,{...r,children:F(t)||n})};let Mr=!0,Dr=!0;function Nr(e,t,n){const r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function Lr(e,t,n){if(!e.RTCPeerConnection)return;const r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return i.apply(this,arguments);const o=e=>{const t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,o),i.apply(this,[e,o])};const o=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return o.apply(this,arguments);if(!this._eventMap[t].has(n))return o.apply(this,arguments);const r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,o.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function Fr(e){return"boolean"!==typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(Mr=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function Br(e){return"boolean"!==typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(Dr=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function jr(){if("object"===typeof window){if(Mr)return;"undefined"!==typeof console&&"function"===typeof console.log&&console.log.apply(console,arguments)}}function zr(e,t){Dr&&console.warn(e+" is deprecated, please use "+t+" instead.")}function Ur(e){return"[object Object]"===Object.prototype.toString.call(e)}function Vr(e){return Ur(e)?Object.keys(e).reduce((function(t,n){const r=Ur(e[n]),i=r?Vr(e[n]):e[n],o=r&&!Object.keys(i).length;return void 0===i||o?t:Object.assign(t,{[n]:i})}),{}):e}function $r(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach((r=>{r.endsWith("Id")?$r(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach((t=>{$r(e,e.get(t),n)}))})))}function Wr(e,t,n){const r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(null===t)return i;const o=[];return e.forEach((e=>{"track"===e.type&&e.trackIdentifier===t.id&&o.push(e)})),o.forEach((t=>{e.forEach((n=>{n.type===r&&n.trackId===t.id&&$r(e,n,i)}))})),i}const Hr=jr;function Yr(e,t){const n=e&&e.navigator;if(!n.mediaDevices)return;const r=function(e){if("object"!==typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach((n=>{if("require"===n||"advanced"===n||"mediaSource"===n)return;const r="object"===typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"===typeof r.exact&&(r.min=r.max=r.exact);const i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];let e={};"number"===typeof r.ideal?(e[i("min",n)]=r.ideal,t.optional.push(e),e={},e[i("max",n)]=r.ideal,t.optional.push(e)):(e[i("",n)]=r.ideal,t.optional.push(e))}void 0!==r.exact&&"number"!==typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[i("",n)]=r.exact):["min","max"].forEach((e=>{void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,n)]=r[e])}))})),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},i=function(e,i){if(t.version>=61)return i(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"===typeof e.audio){const t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"===typeof e.video){let o=e.video.facingMode;o=o&&("object"===typeof o?o:{ideal:o});const a=t.version<66;if(o&&("user"===o.exact||"environment"===o.exact||"user"===o.ideal||"environment"===o.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||a)){let t;if(delete e.video.facingMode,"environment"===o.exact||"environment"===o.ideal?t=["back","rear"]:"user"!==o.exact&&"user"!==o.ideal||(t=["front"]),t)return n.mediaDevices.enumerateDevices().then((n=>{let a=(n=n.filter((e=>"videoinput"===e.kind))).find((e=>t.some((t=>e.label.toLowerCase().includes(t)))));return!a&&n.length&&t.includes("back")&&(a=n[n.length-1]),a&&(e.video.deviceId=o.exact?{exact:a.deviceId}:{ideal:a.deviceId}),e.video=r(e.video),Hr("chrome: "+JSON.stringify(e)),i(e)}))}e.video=r(e.video)}return Hr("chrome: "+JSON.stringify(e)),i(e)},o=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(n.getUserMedia=function(e,t,r){i(e,(e=>{n.webkitGetUserMedia(e,t,(e=>{r&&r(o(e))}))}))}.bind(n),n.mediaDevices.getUserMedia){const e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return i(t,(t=>e(t).then((e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach((e=>{e.stop()})),new DOMException("","NotFoundError");return e}),(e=>Promise.reject(o(e))))))}}}function Gr(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function qr(e){if("object"===typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find((e=>e.track&&e.track.id===n.track.id)):{track:n.track};const i=new Event("track");i.track=n.track,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)})),t.stream.getTracks().forEach((n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find((e=>e.track&&e.track.id===n.id)):{track:n};const i=new Event("track");i.track=n,i.receiver=r,i.transceiver={receiver:r},i.streams=[t.stream],this.dispatchEvent(i)}))},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else Lr(e,"track",(e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e)))}function Kr(e){if("object"===typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let i=n.apply(this,arguments);return i||(i=t(this,e),this._senders.push(i)),i};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach((e=>{this._senders.push(t(this,e))}))};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach((e=>{const t=this._senders.find((t=>t.track===e));t&&this._senders.splice(this._senders.indexOf(t),1)}))}}else if("object"===typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function Qr(e){if(!("object"===typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then((t=>Wr(t,e.track,!0)))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e}),Lr(e,"track",(e=>(e.receiver._pc=e.srcElement,e))),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then((t=>Wr(t,e.track,!1)))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,n,r;return this.getSenders().forEach((n=>{n.track===e&&(t?r=!0:t=n)})),this.getReceivers().forEach((t=>(t.track===e&&(n?r=!0:n=t),t.track===e))),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function Xr(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map((e=>this._shimmedLocalStreams[e][0]))};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach((e=>{if(this.getSenders().find((t=>t.track===e)))throw new DOMException("Track already exists.","InvalidAccessError")}));const t=this.getSenders();n.apply(this,arguments);const r=this.getSenders().filter((e=>-1===t.indexOf(e)));this._shimmedLocalStreams[e.id]=[e].concat(r)};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};const i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach((t=>{const n=this._shimmedLocalStreams[t].indexOf(e);-1!==n&&this._shimmedLocalStreams[t].splice(n,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]})),i.apply(this,arguments)}}function Jr(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return Xr(e);const n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map((e=>this._reverseStreams[e.id]))};const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach((e=>{if(this.getSenders().find((t=>t.track===e)))throw new DOMException("Track already exists.","InvalidAccessError")})),!this._reverseStreams[t.id]){const n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};const i=e.RTCPeerConnection.prototype.removeStream;function o(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(i.id,"g"),r.id)})),new RTCSessionDescription({type:t.type,sdp:n})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},i.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find((e=>e===t)))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find((e=>e.track===t)))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then((()=>{this.dispatchEvent(new Event("negotiationneeded"))}));else{const r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find((e=>e.track===t))},["createOffer","createAnswer"].forEach((function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){const e=arguments;return arguments.length&&"function"===typeof arguments[0]?n.apply(this,[t=>{const n=o(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then((e=>o(this,e)))}};e.RTCPeerConnection.prototype[t]=r[t]}));const a=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((t=>{const r=e._reverseStreams[t],i=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),i.id)})),new RTCSessionDescription({type:t.type,sdp:n})}(this,arguments[0]),a.apply(this,arguments)):a.apply(this,arguments)};const s=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=s.get.apply(this);return""===e.type?e:o(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach((n=>{this._streams[n].getTracks().find((t=>e.track===t))&&(t=this._streams[n])})),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function Zr(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]}))}function ei(e,t){Lr(e,"negotiationneeded",(e=>{const n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e}))}function ti(e,t){const n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){zr("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return"object"===typeof n&&"object"===typeof n.audio&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,"autoGainControl","mozAutoGainControl"),e(n.audio,"noiseSuppression","mozNoiseSuppression")),t(n)},r&&r.prototype.getSettings){const t=r.prototype.getSettings;r.prototype.getSettings=function(){const n=t.apply(this,arguments);return e(n,"mozAutoGainControl","autoGainControl"),e(n,"mozNoiseSuppression","noiseSuppression"),n}}if(r&&r.prototype.applyConstraints){const t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return"audio"===this.kind&&"object"===typeof n&&(n=JSON.parse(JSON.stringify(n)),e(n,"autoGainControl","mozAutoGainControl"),e(n,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[n])}}}}function ni(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})}function ri(e){"object"===typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function ii(e,t){if("object"!==typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]}));const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,i,o]=arguments;return r.apply(this,[e||null]).then((e=>{if(t.version<53&&!i)try{e.forEach((e=>{e.type=n[e.type]||e.type}))}catch(r){if("TypeError"!==r.name)throw r;e.forEach(((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))}))}return e})).then(i,o)}}function oi(e){if("object"!==typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function ai(e){if("object"!==typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e}),Lr(e,"track",(e=>(e.receiver._pc=e.srcElement,e))),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function si(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){zr("removeStream","removeTrack"),this.getSenders().forEach((t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)}))})}function li(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function ci(e){if("object"!==typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]),e=[...e];const n=e.length>0;n&&e.forEach((e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")}));const r=t.apply(this,arguments);if(n){const{sender:t}=r,n=t.getParameters();(!("encodings"in n)||1===n.encodings.length&&0===Object.keys(n.encodings[0]).length)&&(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then((()=>{delete t.sendEncodings})).catch((()=>{delete t.sendEncodings}))))}return r})}function ui(e){if("object"!==typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function di(e){if("object"!==typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((()=>t.apply(this,arguments))).finally((()=>{this.setParametersPromises=[]})):t.apply(this,arguments)}}function fi(e){if("object"!==typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((()=>t.apply(this,arguments))).finally((()=>{this.setParametersPromises=[]})):t.apply(this,arguments)}}function pi(e){if("object"===typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach((n=>t.call(this,n,e))),e.getVideoTracks().forEach((n=>t.call(this,n,e)))},e.RTCPeerConnection.prototype.addTrack=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r&&r.forEach((e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]})),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const n=e.getTracks();this.getSenders().forEach((e=>{n.includes(e.track)&&this.removeTrack(e)}))})}}function hi(e){if("object"===typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach((e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)}))})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach((t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const n=new Event("addstream");n.stream=t,e.dispatchEvent(n)}))}),t.apply(e,arguments)}}}function mi(e){if("object"!==typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,o=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(e,t){const r=arguments.length>=2?arguments[2]:arguments[0],i=n.apply(this,[r]);return t?(i.then(e,t),Promise.resolve()):i},t.createAnswer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],i=r.apply(this,[n]);return t?(i.then(e,t),Promise.resolve()):i};let s=function(e,t,n){const r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=s,s=function(e,t,n){const r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=s,s=function(e,t,n){const r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=s}function yi(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n(bi(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function bi(e){return e&&void 0!==e.video?Object.assign({},e,{video:Vr(e.video)}):e}function vi(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){const t=[];for(let n=0;n<e.iceServers.length;n++){let r=e.iceServers[n];void 0===r.urls&&r.url?(zr("RTCIceServer.url","RTCIceServer.urls"),r=JSON.parse(JSON.stringify(r)),r.urls=r.url,delete r.url,t.push(r)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function gi(e){"object"===typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function wi(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){"undefined"!==typeof e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find((e=>"audio"===e.receiver.track.kind));!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio",{direction:"recvonly"}),"undefined"!==typeof e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const n=this.getTransceivers().find((e=>"video"===e.receiver.track.kind));!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function _i(e){"object"!==typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var Si=n(2558),Ai=n.n(Si);function xi(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"===typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){const n=new t(e),r=Ai().parseCandidate(e.candidate);for(const e in r)e in n||Object.defineProperty(n,e,{value:r[e]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,Lr(e,"icecandidate",(t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t)))}function ki(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||Lr(e,"icecandidate",(e=>{if(e.candidate){const t=Ai().parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return e}))}function Ci(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return"undefined"===typeof this._sctp?null:this._sctp}});const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return"undefined"===typeof this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(function(e){if(!e||!e.sdp)return!1;const t=Ai().splitSections(e.sdp);return t.shift(),t.some((e=>{const t=Ai().parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")}))}(arguments[0])){const e=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const n=parseInt(t[1],10);return n!==n?-1:n}(arguments[0]),n=function(e){let n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n}(e),r=function(e,n){let r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);const i=Ai().matchPrefix(e.sdp,"a=max-message-size:");return i.length>0?r=parseInt(i[0].substring(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r}(arguments[0],e);let i;i=0===n&&0===r?Number.POSITIVE_INFINITY:0===n||0===r?Math.max(n,r):Math.min(n,r);const o={};Object.defineProperty(o,"maxMessageSize",{get:()=>i}),this._sctp=o}return n.apply(this,arguments)}}function Ti(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const n=e.send;e.send=function(){const r=arguments[0],i=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&i>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}const n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=n.apply(this,arguments);return t(e,this),e},Lr(e,"datachannel",(e=>(t(e.channel,e.target),e)))}function Ii(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach((e=>{const n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}}))}function Ei(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t.version>=605)return;const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){const n=t.sdp.split("\n").filter((e=>"a=extmap-allow-mixed"!==e.trim())).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function Ri(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function Oi(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.setLocalDescription;n&&0!==n.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!==typeof e||e.type&&e.sdp)return n.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}if(e.sdp||"offer"!==e.type&&"answer"!==e.type)return n.apply(this,[e]);return("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then((e=>n.apply(this,[e])))})}!function(){let{window:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimSafari:!0};const a=jr,s=function(e){const t={browser:null,version:null};if("undefined"===typeof e||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;const{navigator:n}=e;if(n.userAgentData&&n.userAgentData.brands){const e=n.userAgentData.brands.find((e=>"Chromium"===e.brand));if(e)return{browser:"chrome",version:parseInt(e.version,10)}}if(n.mozGetUserMedia)t.browser="firefox",t.version=Nr(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=Nr(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=Nr(n.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype}return t}(n),l={browserDetails:s,commonShim:i,extractVersion:Nr,disableLog:Fr,disableWarnings:Br,sdp:Si};switch(s.browser){case"chrome":if(!e||!Zr||!o.shimChrome)return a("Chrome shim is not included in this adapter release."),l;if(null===s.version)return a("Chrome shim can not determine version, not shimming."),l;a("adapter.js shimming chrome."),l.browserShim=e,Ri(n,s),Oi(n),Yr(n,s),Gr(n),Zr(n,s),qr(n),Jr(n,s),Kr(n),Qr(n),ei(n,s),xi(n),ki(n),Ii(n),Ci(n,s),Ti(n),Ei(n,s);break;case"firefox":if(!t||!ii||!o.shimFirefox)return a("Firefox shim is not included in this adapter release."),l;a("adapter.js shimming firefox."),l.browserShim=t,Ri(n,s),Oi(n),ti(n,s),ii(n,s),ri(n),si(n),oi(n),ai(n),li(n),ci(n),ui(n),di(n),fi(n),xi(n),Ii(n),Ci(n,s),Ti(n);break;case"safari":if(!r||!o.shimSafari)return a("Safari shim is not included in this adapter release."),l;a("adapter.js shimming safari."),l.browserShim=r,Ri(n,s),Oi(n),vi(n),wi(n),mi(n),pi(n),hi(n),gi(n),yi(n),_i(n),xi(n),ki(n),Ci(n,s),Ti(n),Ei(n,s);break;default:a("Unsupported browser!")}}({window:"undefined"===typeof window?void 0:window});const Pi=e=>{const[t,n]=(0,o.useState)({video:void 0,audio:void 0}),{state:r,start:i,stop:a}=Rr(e,t.video,t.audio,e.onComponentValueChange,n),s=e.mode,l=e.disabled||"SIGNALLING"===r.webRtcState&&!r.signallingTimedOut||"STOPPING"===r.webRtcState||null!=e.desiredPlayingState,c=Er(s)&&(e=>"SENDRECV"===e||"RECVONLY"===e)(s),u=Er(s)&&(e=>"SENDRECV"===e||"SENDONLY"===e)(s),{videoEnabled:d,audioEnabled:f}={videoEnabled:!(p=e.mediaStreamConstraints)||!!p.video,audioEnabled:!p||!!p.audio};var p;const[m,y]=(0,o.useState)(!1),b=(0,o.useCallback)((()=>{y(!0)}),[]),v=(0,o.useCallback)((()=>{y(!1)}),[]);return m?(0,h.jsx)(or,{video:d,audio:f,defaultVideoDeviceId:t.video,defaultAudioDeviceId:t.audio,onSelect:n,onClose:v}):(0,h.jsxs)(J,{children:[r.error&&(0,h.jsxs)(at,{severity:"error",children:[r.error.name,": ",r.error.message]}),(0,h.jsx)(J,{py:1,display:"flex",children:r.stream?(0,h.jsx)(sr,{stream:r.stream,userDefinedVideoAttrs:e.videoHtmlAttrs,userDefinedAudioAttrs:e.audioHtmlAttrs}):c&&(0,h.jsx)(Cr,{loading:"SIGNALLING"===r.webRtcState})}),(0,h.jsxs)(J,{display:"flex",justifyContent:"space-between",children:["PLAYING"===r.webRtcState||"SIGNALLING"===r.webRtcState?(0,h.jsx)(Pr,{variant:"contained",onClick:a,disabled:l,translationKey:"stop",defaultText:"Stop"}):(0,h.jsx)(Pr,{variant:"contained",color:"primary",onClick:i,disabled:l,translationKey:"start",defaultText:"Start"}),u&&"STOPPED"===r.webRtcState&&(0,h.jsx)(Pr,{color:"inherit",onClick:b,translationKey:"select_device",defaultText:"Select Device"})]})]})},Mi=()=>{const e=(0,l.useRenderData)(),t=e.args.mode,n=e.args.desired_playing_state,r=e.args.sdp_answer_json,i=e.args.rtc_configuration,o=e.args.media_stream_constraints,a=e.args.video_html_attrs,s=e.args.audio_html_attrs;if(!Er(t))throw new Error(`Invalid mode ${t}`);return(0,h.jsx)(Pi,{disabled:e.disabled,mode:t,desiredPlayingState:n,sdpAnswerJson:r,rtcConfiguration:i,mediaStreamConstraints:o,videoHtmlAttrs:a,audioHtmlAttrs:s,onComponentValueChange:Or})};s.render((0,h.jsx)(o.StrictMode,{children:(0,h.jsx)(l.StreamlitProvider,{children:(0,h.jsx)(j,{children:(0,h.jsxs)(S,{children:[(0,h.jsx)(N,{}),(0,h.jsx)(Mi,{})]})})})}),document.getElementById("root"))})()})();
|
103
|
-
//# sourceMappingURL=main.ff279b83.js.map
|