1var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function E(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+A(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(k,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=E(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+A(s,l);c+=j(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+A(s,l++),c+=j(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function N(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P={current:null},F={transition:null},ee={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:F,ReactCurrentOwner:C};function te(){throw Error(`act(...) is not supported in production builds of React.`)}
vendor: 7,860 bytes, line 1
1e.Children={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,e.act=te,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=T,e.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:N}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=F.transition;F.transition={};try{e()}finally{F.transition=t}},e.unstable_act=te,e.useCallback=function(e,t){return P.current.useCallback(e,t)},e.useContext=function(e){return P.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return P.current.useDeferredValue(e)},e.useEffect=function(e,t){return P.current.useEffect(e,t)},e.useId=function(){return P.current.useId()},e.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return P.current.useMemo(e,t)},e.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},e.useRef=function(e){return P.current.useRef(e)},e.useState=function(e){return P.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return P.current.useTransition()},e.version=`18.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,M(x);else{var t=n(l);t!==null&&N(b,t.startTime-e)}}function x(t,i){m=!1,h&&(h=!1,_(w),w=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!D());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&N(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,T=5,E=-1;function D(){return!(e.unstable_now()-E<T)}function O(){if(C!==null){var t=e.unstable_now();E=t;var n=!0;try{n=C(!0,t)}finally{n?k():(S=!1,C=null)}}else S=!1}var k;if(typeof v==`function`)k=function(){v(O)};else if(typeof MessageChannel<`u`){var A=new MessageChannel,j=A.port2;A.port1.onmessage=O,k=function(){j.postMessage(null)}}else k=function(){g(O,0)};function M(e){C=e,S||(S=!0,k())}function N(t,n){w=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,M(x))},e.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`):T=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(w),w=-1):h=!0,N(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,M(x))),r},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d(),n=p();function r(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 i=new Set,a={};function o(e,t){s(e,t),s(e+`Capture`,t)}function s(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),l=Object.prototype.hasOwnProperty,u=/^[: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]*$/,f={},m={};function h(e){return l.call(m,e)?!0:l.call(f,e)?!1:u.test(e)?m[e]=!0:(f[e]=!0,!1)}function g(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function _(e,t,n,r){if(t==null||g(e,t,n,r))return!0;
vendor: 11,810 bytes, lines 1-5
1if(r)return!1;if(n!==null)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}function v(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var y={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){y[e]=new v(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){y[e]=new v(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){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){y[e]=new v(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){y[e]=new v(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){y[e]=new v(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function x(e){return e[1].toUpperCase()}`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(b,x);y[t]=new v(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(b,x);y[t]=new v(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(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),y.xlinkHref=new v(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function S(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(_(t,n,i,r)&&(n=null),r||i===null?h(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var C=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for(`react.element`),T=Symbol.for(`react.portal`),E=Symbol.for(`react.fragment`),D=Symbol.for(`react.strict_mode`),O=Symbol.for(`react.profiler`),k=Symbol.for(`react.provider`),A=Symbol.for(`react.context`),j=Symbol.for(`react.forward_ref`),M=Symbol.for(`react.suspense`),N=Symbol.for(`react.suspense_list`),P=Symbol.for(`react.memo`),F=Symbol.for(`react.lazy`),ee=Symbol.for(`react.offscreen`),te=Symbol.iterator;function ne(e){return typeof e!=`object`||!e?null:(e=te&&e[te]||e[`@@iterator`],typeof e==`function`?e:null)}var I=Object.assign,re;function ie(e){if(re===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);re=t&&t[1]||``}return` 2`+re+e}var ae=!1;function oe(e,t){if(!e||ae)return``;ae=!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()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(` 3`),a=r.stack.split(` 4`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=` 5`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{ae=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?ie(e):``}function se(e){switch(e.tag){case 5:return ie(e.type);case 16:return ie(`Lazy`);case 13:return ie(`Suspense`);case 19:return ie(`SuspenseList`);case 0:case 2:case 15:return e=oe(e.type,!1),e;case 11:return e=oe(e.type.render,!1),e;case 1:return e=oe(e.type,!0),e;default:return``}}function ce(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case E:return`Fragment`;case T:return`Portal`;case O:return`Profiler`;case D:return`StrictMode`;case M:return`Suspense`;case N:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case A:return(e.displayName||`Context`)+`.Consumer`;case k:return(e._context.displayName||`Context`)+`.Provider`;case j:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case P:return t=e.displayName||null,t===null?ce(e.type)||`Memo`:t;case F:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}function le(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return ce(t);case 8:return t===D?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function ue(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function de(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function fe(e){var t=de(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.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]}}}}function pe(e){e._valueTracker||=fe(e)}function me(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=de(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function he(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function ge(e,t){var n=t.checked;return I({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function _e(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=ue(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function L(e,t){t=t.checked,t!=null&&S(e,`checked`,t,!1)}function ve(e,t){L(e,t);var n=ue(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?be(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&be(e,t.type,ue(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ye(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function be(e,t,n){(t!==`number`||he(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var R=Array.isArray;function xe(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=``+ue(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Se(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return I({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function Ce(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(R(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:ue(n)}}function we(e,t){var n=ue(t.value),r=ue(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function Te(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function Ee(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 De(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?Ee(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Oe,ke=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(Oe||=document.createElement(`div`),Oe.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Oe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ae(e,t){if(t){var n=e.firstChild;
vendor: 4,873 bytes, line 5
5if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var je={animationIterationCount:!0,aspectRatio:!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},Me=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(je).forEach(function(e){Me.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),je[t]=je[e]})});function Ne(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||je.hasOwnProperty(e)&&je[e]?(``+t).trim():t+`px`}function Pe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Ne(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Fe=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 Ie(e,t){if(t){if(Fe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function Le(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;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}}var Re=null;function ze(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Be=null,Ve=null,He=null;function Ue(e){if(e=Ui(e)){if(typeof Be!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Gi(t),Be(e.stateNode,e.type,t))}}function We(e){Ve?He?He.push(e):He=[e]:Ve=e}function Ge(){if(Ve){var e=Ve,t=He;if(He=Ve=null,Ue(e),t)for(e=0;e<t.length;e++)Ue(t[e])}}function Ke(e,t){return e(t)}function qe(){}var Je=!1;function Ye(e,t,n){if(Je)return e(t,n);Je=!0;try{return Ke(e,t,n)}finally{Je=!1,(Ve!==null||He!==null)&&(qe(),Ge())}}function Xe(e,t){var n=e.stateNode;if(n===null)return null;var i=Gi(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var Ze=!1;if(c)try{var Qe={};Object.defineProperty(Qe,"passive",{get:function(){Ze=!0}}),window.addEventListener(`test`,Qe,Qe),window.removeEventListener(`test`,Qe,Qe)}catch{Ze=!1}function $e(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var et=!1,tt=null,nt=!1,rt=null,at={onError:function(e){et=!0,tt=e}};function ot(e,t,n,r,i,a,o,s,c){et=!1,tt=null,$e.apply(at,arguments)}function st(e,t,n,i,a,o,s,c,l){if(ot.apply(this,arguments),et){if(et){var u=tt;et=!1,tt=null}else throw Error(r(198));nt||(nt=!0,rt=u)}}function ct(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function lt(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ut(e){if(ct(e)!==e)throw Error(r(188))}function dt(e){var t=e.alternate;if(!t){if(t=ct(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return ut(a),e;if(o===i)return ut(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function ft(e){return e=dt(e),e===null?null:pt(e)}function pt(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=pt(e);
vendor: 6,892 bytes, line 5
5if(t!==null)return t;e=e.sibling}return null}var mt=n.unstable_scheduleCallback,ht=n.unstable_cancelCallback,gt=n.unstable_shouldYield,_t=n.unstable_requestPaint,vt=n.unstable_now,yt=n.unstable_getCurrentPriorityLevel,bt=n.unstable_ImmediatePriority,xt=n.unstable_UserBlockingPriority,St=n.unstable_NormalPriority,Ct=n.unstable_LowPriority,wt=n.unstable_IdlePriority,Tt=null,Et=null;function Dt(e){if(Et&&typeof Et.onCommitFiberRoot==`function`)try{Et.onCommitFiberRoot(Tt,e,void 0,(e.current.flags&128)==128)}catch{}}var Ot=Math.clz32?Math.clz32:jt,kt=Math.log,At=Math.LN2;function jt(e){return e>>>=0,e===0?32:31-(kt(e)/At|0)|0}var Mt=64,Nt=4194304;function Pt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ft(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=Pt(a))):r=Pt(s)}else o=n&~i,o===0?a!==0&&(r=Pt(a)):r=Pt(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ot(t),i=1<<n,r|=e[n],t&=~i;return r}function It(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Lt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Ot(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=It(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Rt(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function zt(){var e=Mt;return Mt<<=1,!(Mt&4194240)&&(Mt=64),e}function Bt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Vt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ot(t),e[t]=n}function Ht(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Ot(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function Ut(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Wt=0;function Gt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Kt,qt,Jt,Yt,Xt,Zt=!1,Qt=[],$t=null,en=null,tn=null,nn=new Map,rn=new Map,an=[],on=`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 sn(e,t){switch(e){case`focusin`:case`focusout`:$t=null;break;case`dragenter`:case`dragleave`:en=null;break;case`mouseover`:case`mouseout`:tn=null;break;case`pointerover`:case`pointerout`:nn.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:rn.delete(t.pointerId)}}function cn(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ui(t),t!==null&&qt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function ln(e,t,n,r,i){switch(t){case`focusin`:return $t=cn($t,e,t,n,r,i),!0;case`dragenter`:return en=cn(en,e,t,n,r,i),!0;case`mouseover`:return tn=cn(tn,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return nn.set(a,cn(nn.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,rn.set(a,cn(rn.get(a)||null,e,t,n,r,i)),!0}return!1}function un(e){var t=Hi(e.target);if(t!==null){var n=ct(t);if(n!==null){if(t=n.tag,t===13){if(t=lt(n),t!==null){e.blockedOn=t,Xt(e.priority,function(){Jt(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function dn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=xn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Re=r,n.target.dispatchEvent(r),Re=null}else return t=Ui(n),t!==null&&qt(t),e.blockedOn=n,!1;t.shift()}return!0}function fn(e,t,n){dn(e)&&n.delete(t)}function pn(){Zt=!1,$t!==null&&dn($t)&&($t=null),en!==null&&dn(en)&&(en=null),tn!==null&&dn(tn)&&(tn=null),nn.forEach(fn),rn.forEach(fn)}function mn(e,t){e.blockedOn===t&&(e.blockedOn=null,Zt||(Zt=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,pn)))}function z(e){function t(t){return mn(t,e)}if(0<Qt.length){mn(Qt[0],e);for(var n=1;n<Qt.length;n++){var r=Qt[n];r.blockedOn===e&&(r.blockedOn=null)}}for($t!==null&&mn($t,e),en!==null&&mn(en,e),tn!==null&&mn(tn,e),nn.forEach(t),rn.forEach(t),n=0;n<an.length;n++)r=an[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<an.length&&(n=an[0],n.blockedOn===null);)un(n),n.blockedOn===null&&an.shift()}var hn=C.ReactCurrentBatchConfig,gn=!0;function _n(e,t,n,r){var i=Wt,a=hn.transition;hn.transition=null;try{Wt=1,yn(e,t,n,r)}finally{Wt=i,hn.transition=a}}function vn(e,t,n,r){var i=Wt,a=hn.transition;hn.transition=null;try{Wt=4,yn(e,t,n,r)}finally{Wt=i,hn.transition=a}}function yn(e,t,n,r){if(gn){var i=xn(e,t,n,r);if(i===null)mi(e,t,r,bn,n),sn(e,r);else if(ln(i,e,t,n,r))r.stopPropagation();else if(sn(e,r),t&4&&-1<on.indexOf(e)){for(;i!==null;){var a=Ui(i);if(a!==null&&Kt(a),a=xn(e,t,n,r),a===null&&mi(e,t,r,bn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else mi(e,t,r,null,n)}}var bn=null;function xn(e,t,n,r){if(bn=null,e=ze(r),e=Hi(e),e!==null)if(t=ct(e),t===null)e=null;else if(n=t.tag,n===13){if(e=lt(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return bn=e,null}function Sn(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`
vendor: 8,694 bytes, line 5
5:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 1;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(yt()){case bt:return 1;case xt:return 4;case St:case Ct:return 16;case wt:return 536870912;default:return 16}default:return 16}}var Cn=null,wn=null,Tn=null;function En(){if(Tn)return Tn;var e,t=wn,n=t.length,r,i=`value`in Cn?Cn.value:Cn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Tn=i.slice(e,1<r?1-r:void 0)}function Dn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function On(){return!0}function kn(){return!1}function An(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?On:kn,this.isPropagationStopped=kn,this}return I(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=On)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=On)},persist:function(){},isPersistent:On}),t}var jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mn=An(jn),Nn=I({},jn,{view:0,detail:0}),Pn=An(Nn),Fn,In,Ln,Rn=I({},Nn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Ln&&(Ln&&e.type===`mousemove`?(Fn=e.screenX-Ln.screenX,In=e.screenY-Ln.screenY):In=Fn=0,Ln=e),Fn)},movementY:function(e){return`movementY`in e?e.movementY:In}}),zn=An(Rn),Bn=An(I({},Rn,{dataTransfer:0})),Vn=An(I({},Nn,{relatedTarget:0})),Hn=An(I({},jn,{animationName:0,elapsedTime:0,pseudoElement:0})),Un=An(I({},jn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Wn=An(I({},jn,{data:0})),Gn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Kn={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`},qn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Jn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=qn[e])?!!t[e]:!1}function Yn(){return Jn}var Xn=An(I({},Nn,{key:function(e){if(e.key){var t=Gn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Dn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Kn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yn,charCode:function(e){return e.type===`keypress`?Dn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Dn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Zn=An(I({},Rn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Qn=An(I({},Nn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yn})),$n=An(I({},jn,{propertyName:0,elapsedTime:0,pseudoElement:0})),er=An(I({},Rn,{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})),tr=[9,13,27,32],nr=c&&`CompositionEvent`in window,rr=null;c&&`documentMode`in document&&(rr=document.documentMode);var ir=c&&`TextEvent`in window&&!rr,ar=c&&(!nr||rr&&8<rr&&11>=rr),or=` `,sr=!1;function cr(e,t){switch(e){case`keyup`:return tr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function lr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ur=!1;function dr(e,t){switch(e){case`compositionend`:return lr(t);case`keypress`:return t.which===32?(sr=!0,or):null;case`textInput`:return e=t.data,e===or&&sr?null:e;default:return null}}function fr(e,t){if(ur)return e===`compositionend`||!nr&&cr(e,t)?(e=En(),Tn=wn=Cn=null,ur=!1,e):null;switch(e){case`paste`: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 ar&&t.locale!==`ko`?null:t.data;default:return null}}var pr={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 mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!pr[e.type]:t===`textarea`}function hr(e,t,n,r){We(r),t=gi(t,`onChange`),0<t.length&&(n=new Mn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var gr=null,_r=null;function vr(e){ci(e,0)}function yr(e){if(me(Wi(e)))return e}function br(e,t){if(e===`change`)return t}var xr=!1;if(c){var Sr;if(c){var Cr=`oninput`in document;if(!Cr){var wr=document.createElement(`div`);wr.setAttribute(`oninput`,`return;`),Cr=typeof wr.oninput==`function`}Sr=Cr}else Sr=!1;xr=Sr&&(!document.documentMode||9<document.documentMode)}function Tr(){gr&&(gr.detachEvent(`onpropertychange`,Er),_r=gr=null)}function Er(e){if(e.propertyName===`value`&&yr(_r)){var t=[];hr(t,_r,e,ze(e)),Ye(vr,t)}}function Dr(e,t,n){e===`focusin`?(Tr(),gr=t,_r=n,gr.attachEvent(`onpropertychange`,Er)):e===`focusout`&&Tr()}function Or(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return yr(_r)}function kr(e,t){if(e===`click`)return yr(t)}function Ar(e,t){if(e===`input`||e===`change`)return yr(t)}function jr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Mr=typeof Object.is==`function`?Object.is:jr;function Nr(e,t){if(Mr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!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++){var i=n[r];if(!l.call(t,i)||!Mr(e[i],t[i]))return!1}return!0}function Pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fr(e,t){var n=Pr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Pr(n)}}function Ir(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ir(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lr(){for(var e=window,t=he();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=he(e.document)}return t}function Rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}function zr(e){var t=Lr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ir(n.ownerDocument.documentElement,n)){if(r!==null&&Rr(n)){if
vendor: 92,540 bytes, lines 5-8
5(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Fr(n,a);var o=Fr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Br=c&&`documentMode`in document&&11>=document.documentMode,Vr=null,Hr=null,Ur=null,Wr=!1;function Gr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wr||Vr==null||Vr!==he(r)||(r=Vr,`selectionStart`in r&&Rr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ur&&Nr(Ur,r)||(Ur=r,r=gi(Hr,`onSelect`),0<r.length&&(t=new Mn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Vr)))}function Kr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var qr={animationend:Kr(`Animation`,`AnimationEnd`),animationiteration:Kr(`Animation`,`AnimationIteration`),animationstart:Kr(`Animation`,`AnimationStart`),transitionend:Kr(`Transition`,`TransitionEnd`)},Jr={},Yr={};c&&(Yr=document.createElement(`div`).style,`AnimationEvent`in window||(delete qr.animationend.animation,delete qr.animationiteration.animation,delete qr.animationstart.animation),`TransitionEvent`in window||delete qr.transitionend.transition);function Xr(e){if(Jr[e])return Jr[e];if(!qr[e])return e;var t=qr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Yr)return Jr[e]=t[n];return e}var Zr=Xr(`animationend`),Qr=Xr(`animationiteration`),$r=Xr(`animationstart`),ei=Xr(`transitionend`),ti=new Map,ni=`abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);function ri(e,t){ti.set(e,t),o(t,[e])}for(var ii=0;ii<ni.length;ii++){var ai=ni[ii];ri(ai.toLowerCase(),`on`+(ai[0].toUpperCase()+ai.slice(1)))}ri(Zr,`onAnimationEnd`),ri(Qr,`onAnimationIteration`),ri($r,`onAnimationStart`),ri(`dblclick`,`onDoubleClick`),ri(`focusin`,`onFocus`),ri(`focusout`,`onBlur`),ri(ei,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var oi=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),eee=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(oi));function si(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,st(r,t,void 0,e),e.currentTarget=null}function ci(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;si(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;si(i,s,l),a=c}}}if(nt)throw e=rt,nt=!1,rt=null,e}function li(e,t){var n=t[zi];n===void 0&&(n=t[zi]=new Set);var r=e+`__bubble`;n.has(r)||(pi(t,e,2,!1),n.add(r))}function ui(e,t,n){var r=0;t&&(r|=4),pi(n,e,r,t)}var di=`_reactListening`+Math.random().toString(36).slice(2);function fi(e){if(!e[di]){e[di]=!0,i.forEach(function(t){t!==`selectionchange`&&(eee.has(t)||ui(t,!1,e),ui(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[di]||(t[di]=!0,ui(`selectionchange`,!1,t))}}function pi(e,t,n,r){switch(Sn(t)){case 1:var i=_n;break;case 4:i=vn;break;default:i=yn}n=i.bind(null,t,n,e),i=void 0,!Ze||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function mi(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Hi(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}Ye(function(){var r=a,i=ze(n),o=[];a:{var s=ti.get(e);if(s!==void 0){var c=Mn,l=e;switch(e){case`keypress`:if(Dn(n)===0)break a;case`keydown`:case`keyup`:c=Xn;break;case`focusin`:l=`focus`,c=Vn;break;case`focusout`:l=`blur`,c=Vn;break;case`beforeblur`:case`afterblur`:c=Vn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=zn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Bn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=Qn;break;case Zr:case Qr:case $r:c=Hn;break;case ei:c=$n;break;case`scroll`:c=Pn;break;case`wheel`:c=er;break;case`copy`:case`cut`:case`paste`:c=Un;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=Zn}var u=(t&4)!=0,d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=Xe(p,f),h!=null&&u.push(hi(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Re&&(l=n.relatedTarget||n.fromElement)&&(Hi(l)||l[Ri]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Hi(l):null,l!==null&&(d=ct(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=zn,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=Zn,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Wi(c),m=l==null?s:Wi(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Hi(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=_i(m))p++;for(m=0,h=f;h;h=_i(h))m++;for(;0<p-m;)u=_i(u),p--;for(;0<m-p;)f=_i(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=_i(u),f=_i(f)}u=null}else u=null;c!==null&&vi(o,s,c,u,!1),l!==null&&d!==null&&vi(o,d,l,u,!0)}}a:{if(s=r?Wi(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=br;else if(mr(s))if(xr)g=Ar;else{g=Or;var _=Dr}else (c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=kr);if(g&&=g(e,r)){hr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&be(s,`number`,s.value)}switch(_=r?Wi(r):window,e){case`focusin`:(mr(_)||_.contentEditable===`true`)&&(Vr=_,Hr=r,Ur=null);break;case`focusout`:Ur=Hr=Vr=null;break;case`mousedown`:Wr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Wr=!1,Gr(o,n,i);break;case`selectionchange`:if(Br)break;case`keydown`:case`keyup`:Gr(o,n,i)}var v;if(nr)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else ur?cr(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(ar&&n.locale!==`ko`&&(ur||y!==`onCompositionStart`?y===`onCompositionEnd`&&ur&&(v=En()):(Cn=i,wn=`value`in Cn?Cn.value:Cn.textContent,ur=!0)),_=gi(r,y),0<_.length&&(y=new Wn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=lr(n),v!==null&&(y.data=v)))),(v=ir?dr(e,n):fr(e,n))&&(r=gi(r,`onBeforeInput`),0<r.length&&(i=new Wn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}ci(o,t)})}function hi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function gi(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=Xe(e,n),a!=null&&r.unshift(hi(e,a,i)),a=Xe(e,t),a!=null&&r.push(hi(e,a,i))),e=e.return}return r}function _i(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function vi(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=Xe(n,a),c!=null&&o.unshift(hi(n,c,s))):i||(c=Xe(n,a),c!=null&&o.push(hi(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var yi=/\r\n?/g,bi=/\u0000|\uFFFD/g;function xi(e){return(typeof e==`string`?e:``+e).replace(yi,` 6`).replace(bi,``)}function Si(e,t,n){if(t=xi(t),xi(e)!==t&&n)throw Error(r(425))}function Ci(){}var wi=null,Ti=null;function Ei(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Di=typeof setTimeout==`function`?setTimeout:void 0,Oi=typeof clearTimeout==`function`?clearTimeout:void 0,ki=typeof Promise==`function`?Promise:void 0,Ai=typeof queueMicrotask==`function`?queueMicrotask:ki===void 0?Di:function(e){return ki.resolve(null).then(e).catch(ji)};function ji(e){setTimeout(function(){throw e})}function Mi(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),z(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);z(t)}function Ni(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function Pi(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var Fi=Math.random().toString(36).slice(2),Ii=`__reactFiber$`+Fi,Li=`__reactProps$`+Fi,Ri=`__reactContainer$`+Fi,zi=`__reactEvents$`+Fi,Bi=`__reactListeners$`+Fi,Vi=`__reactHandles$`+Fi;function Hi(e){var t=e[Ii];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ri]||n[Ii]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Pi(e);e!==null;){if(n=e[Ii])return n;e=Pi(e)}return t}e=n,n=e.parentNode}return null}function Ui(e){return e=e[Ii]||e[Ri],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Wi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Gi(e){return e[Li]||null}var Ki=[],qi=-1;function Ji(e){return{current:e}}function Yi(e){0>qi||(e.current=Ki[qi],Ki[qi]=null,qi--)}function Xi(e,t){qi++,Ki[qi]=e.current,e.current=t}var Zi={},Qi=Ji(Zi),$i=Ji(!1),ea=Zi;function ta(e,t){var n=e.type.contextTypes;if(!n)return Zi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function na(e){return e=e.childContextTypes,e!=null}function ra(){Yi($i),Yi(Qi)}function ia(e,t,n){if(Qi.current!==Zi)throw Error(r(168));Xi(Qi,t),Xi($i,n)}function aa(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,le(e)||`Unknown`,a));return I({},n,i)}function B(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zi,ea=Qi.current,Xi(Qi,e),Xi($i,$i.current),!0}function oa(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=aa(e,t,ea),i.__reactInternalMemoizedMergedChildContext=e,Yi($i),Yi(Qi),Xi(Qi,e)):Yi($i),Xi($i,n)}var sa=null,ca=!1,la=!1;function ua(e){sa===null?sa=[e]:sa.push(e)}function tee(e){ca=!0,ua(e)}function da(){if(!la&&sa!==null){la=!0;var e=0,t=Wt;try{var n=sa;for(Wt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}sa=null,ca=!1}catch(t){throw sa!==null&&(sa=sa.slice(e+1)),mt(bt,da),t}finally{Wt=t,la=!1}}return null}var fa=[],pa=0,ma=null,ha=0,ga=[],_a=0,va=null,ya=1,ba=``;function xa(e,t){fa[pa++]=ha,fa[pa++]=ma,ma=e,ha=t}function Sa(e,t,n){ga[_a++]=ya,ga[_a++]=ba,ga[_a++]=va,va=e;var r=ya;e=ba;var i=32-Ot(r)-1;r&=~(1<<i),n+=1;var a=32-Ot(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ya=1<<32-Ot(t)+i|n<<i|r,ba=a+e}else ya=1<<a|n<<i|r,ba=e}function Ca(e){e.return!==null&&(xa(e,1),Sa(e,1,0))}function wa(e){for(;e===ma;)ma=fa[--pa],fa[pa]=null,ha=fa[--pa],fa[pa]=null;for(;e===va;)va=ga[--_a],ga[_a]=null,ba=ga[--_a],ga[_a]=null,ya=ga[--_a],ga[_a]=null}var V=null,Ta=null,Ea=!1,Da=null;function Oa(e,t){var n=$l(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ka(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t===null?!1:(e.stateNode=t,V=e,Ta=Ni(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t===null?!1:(e.stateNode=t,V=e,Ta=null,!0);case 13:return t=t.nodeType===8?t:null,t===null?!1:(n=va===null?null:{id:ya,overflow:ba},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=$l(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,V=e,Ta=null,!0);default:return!1}}function Aa(e){return(e.mode&1)!=0&&(e.flags&128)==0}function ja(e){if(Ea){var t=Ta;if(t){var n=t;if(!ka(e,t)){if(Aa(e))throw Error(r(418));t=Ni(n.nextSibling);var i=V;t&&ka(e,t)?Oa(i,n):(e.flags=e.flags&-4097|2,Ea=!1,V=e)}}else{if(Aa(e))throw Error(r(418));e.flags=e.flags&-4097|2,Ea=!1,V=e}}}function Ma(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;V=e}function Na(e){if(e!==V)return!1;if(!Ea)return Ma(e),Ea=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Ei(e.type,e.memoizedProps)),t&&=Ta){if(Aa(e))throw Pa(),Error(r(418));for(;t;)Oa(e,t),t=Ni(t.nextSibling)}if(Ma(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Ta=Ni(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Ta=null}}else Ta=V?Ni(e.stateNode.nextSibling):null;return!0}function Pa(){for(var e=Ta;e;)e=Ni(e.nextSibling)}function Fa(){Ta=V=null,Ea=!1}function Ia(e){Da===null?Da=[e]:Da.push(e)}var La=C.ReactCurrentBatchConfig;function Ra(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function za(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function Ba(e){var t=e._init;return t(e._payload)}function Va(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=nu(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ou(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===E?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===F&&Ba(i)===t.type)?(r=a(t,n.props),r.ref=Ra(e,t,n),r.return=e,r):(r=ru(n.type,n.key,n.props,null,e.mode,r),r.ref=Ra(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=U(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=iu(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=ou(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case w:return n=ru(t.type,t.key,t.props,null,e.mode,n),n.ref=Ra(e,null,t),n.return=e,n;case T:return t=U(t,e.mode,n),t.return=e,t;case F:var r=t._init;return f(e,r(t._payload),n)}if(R(t)||ne(t))return t=iu(t,e.mode,n,null),t.return=e,t;za(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case w:return n.key===i?l(e,t,n,r):null;case T:return n.key===i?u(e,t,n,r):null;case F:return i=n._init,p(e,t,i(n._payload),r)}if(R(n)||ne(n))return i===null?d(e,t,n,r,null):null;za(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case w:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case T:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case F:var a=r._init;return m(e,t,n,a(r._payload),i)}if(R(r)||ne(r))return e=e.get(n)||null,d(t,e,r,i,null);za(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),Ea&&xa(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ea&&xa(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),Ea&&xa(r,h),l}function g(a,s,c,l){var u=ne(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ea&&xa(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ea&&xa(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ea&&xa(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===E&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case w:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===E){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===F&&Ba(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Ra(e,l,i),r.return=e,e=r;break a}n(e,l);break}else t(e,l);l=l.sibling}i.type===E?(r=iu(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=ru(i.type,i.key,i.props,null,e.mode,o),o.ref=Ra(e,r,i),o.return=e,e=o)}return s(e);case T:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}else t(e,r);r=r.sibling}r=U(i,e.mode,o),r.return=e,e=r}return s(e);case F:return l=i._init,_(e,r,l(i._payload),o)}if(R(i))return h(e,r,i,o);if(ne(i))return g(e,r,i,o);za(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=ou(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Ha=Va(!0),Ua=Va(!1),Wa=Ji(null),Ga=null,Ka=null,qa=null;function Ja(){qa=Ka=Ga=null}function Ya(e){var t=Wa.current;Yi(Wa),e._currentValue=t}function Xa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Za(e,t){Ga=e,qa=Ka=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(zs=!0),e.firstContext=null)}function Qa(e){var t=e._currentValue;if(qa!==e)if(e={context:e,memoizedValue:t,next:null},Ka===null){if(Ga===null)throw Error(r(308));Ka=e,Ga.dependencies={lanes:0,firstContext:e}}else Ka=Ka.next=e;return t}var $a=null;function eo(e){$a===null?$a=[e]:$a.push(e)}function to(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,eo(t)):(n.next=i.next,i.next=n),t.interleaved=n,no(e,r)}function no(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ro=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ao(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 oo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function so(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,qc&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,no(e,n)}return i=r.interleaved,i===null?(t.next=t,eo(r)):(t.next=i.next,i.next=t),r.interleaved=t,no(e,n)}function co(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ut(e,n)}}function lo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function uo(e,t,n,r){var i=e.updateQueue;ro=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=I({},d,f);break a;case 2:ro=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);tl|=o,e.lanes=o,e.memoizedState=d}}function fo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var po={},mo=Ji(po),ho=Ji(po),go=Ji(po);function _o(e){if(e===po)throw Error(r(174));return e}function vo(e,t){switch(Xi(go,t),Xi(ho,e),Xi(mo,po),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:De(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=De(t,e)}Yi(mo),Xi(mo,t)}function yo(){Yi(mo),Yi(ho),Yi(go)}function bo(e){_o(go.current);var t=_o(mo.current),n=De(t,e.type);t!==n&&(Xi(ho,e),Xi(mo,n))}function xo(e){ho.current===e&&(Yi(mo),Yi(ho))}var So=Ji(0);function Co(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var wo=[];function To(){for(var e=0;e<wo.length;e++)wo[e]._workInProgressVersionPrimary=null;wo.length=0}var Eo=C.ReactCurrentDispatcher,Do=C.ReactCurrentBatchConfig,Oo=0,ko=null,Ao=null,jo=null,Mo=!1,No=!1,Po=0,Fo=0;function Io(){throw Error(r(321))}function Lo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Mr(e[n],t[n]))return!1;return!0}function Ro(e,t,n,i,a,o){if(Oo=o,ko=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Eo.current=e===null||e.memoizedState===null?nee:xs,e=n(i,a),No){o=0;do{if(No=!1,Po=0,25<=o)throw Error(r(301));o+=1,jo=Ao=null,t.updateQueue=null,Eo.current=Ss,e=n(i,a)}while(No)}if(Eo.current=bs,t=Ao!==null&&Ao.next!==null,Oo=0,jo=Ao=ko=null,Mo=!1,t)throw Error(r(300));return e}function zo(){var e=Po!==0;return Po=0,e}function Bo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jo===null?ko.memoizedState=jo=e:jo=jo.next=e,jo}function Vo(){if(Ao===null){var e=ko.alternate;e=e===null?null:e.memoizedState}else e=Ao.next;var t=jo===null?ko.memoizedState:jo.next;if(t!==null)jo=t,Ao=e;else{if(e===null)throw Error(r(310));Ao=e,e={memoizedState:Ao.memoizedState,baseState:Ao.baseState,baseQueue:Ao.baseQueue,queue:Ao.queue,next:null},jo===null?ko.memoizedState=jo=e:jo=jo.next=e}return jo}function Ho(e,t){return typeof t==`function`?t(e):t}function Uo(e){var t=Vo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=Ao,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((Oo&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,ko.lanes|=d,tl|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Mr(i,t.memoizedState)||(zs=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,ko.lanes|=o,tl|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Wo(e){var t=Vo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Mr(o,t.memoizedState)||(zs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Go(){}function Ko(e,t){var n=ko,i=Vo(),a=t(),o=!Mr(i.memoizedState,a);if(o&&(i.memoizedState=a,zs=!0),i=i.queue,is(Yo.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||jo!==null&&jo.memoizedState.tag&1){if(n.flags|=2048,$o(9,Jo.bind(null,n,i,a,t),void 0,null),Jc===null)throw Error(r(349));Oo&30||qo(n,t,a)}return a}function qo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ko.updateQueue,t===null?(t={lastEffect:null,stores:null},ko.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Jo(e,t,n,r){t.value=n,t.getSnapshot=r,Xo(t)&&Zo(e)}function Yo(e,t,n){return n(function(){Xo(t)&&Zo(e)})}function Xo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Mr(e,n)}catch{return!0}}function Zo(e){var t=no(e,1);t!==null&&xl(t,e,1,-1)}function Qo(e){var t=Bo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:e},t.queue=e,e=e.dispatch=gs.bind(null,ko,e),[t.memoizedState,e]}function $o(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ko.updateQueue,t===null?(t={lastEffect:null,stores:null},ko.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function es(){return Vo().memoizedState}function ts(e,t,n,r){var i=Bo();ko.flags|=e,i.memoizedState=$o(1|t,n,void 0,r===void 0?null:r)}function ns(e,t,n,r){var i=Vo();r=r===void 0?null:r;var a=void 0;if(Ao!==null){var o=Ao.memoizedState;if(a=o.destroy,r!==null&&Lo(r,o.deps)){i.memoizedState=$o(t,n,a,r);return}}ko.flags|=e,i.memoizedState=$o(1|t,n,a,r)}function rs(e,t){return ts(8390656,8,e,t)}function is(e,t){return ns(2048,8,e,t)}function as(e,t){return ns(4,2,e,t)}function os(e,t){return ns(4,4,e,t)}function ss(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function cs(e,t,n){return n=n==null?null:n.concat([e]),ns(4,4,ss.bind(null,t,e),n)}function ls(){}function us(e,t){var n=Vo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Lo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ds(e,t){var n=Vo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Lo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function fs(e,t,n){return Oo&21?(Mr(n,t)||(n=zt(),ko.lanes|=n,tl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,zs=!0),e.memoizedState=n)}function ps(e,t){var n=Wt;Wt=n!==0&&4>n?n:4,e(!0);var r=Do.transition;Do.transition={};try{e(!1),t()}finally{Wt=n,Do.transition=r}}function ms(){return Vo().memoizedState}function hs(e,t,n){var r=bl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},_s(e))vs(t,n);else if(n=to(e,t,n,r),n!==null){var i=yl();xl(n,e,r,i),ys(n,t,r)}}function gs(e,t,n){var r=bl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(_s(e))vs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Mr(s,o)){var c=t.interleaved;c===null?(i.next=i,eo(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=to(e,t,i,r),n!==null&&(i=yl(),xl(n,e,r,i),ys(n,t,r))}}function _s(e){var t=e.alternate;return e===ko||t!==null&&t===ko}function vs(e,t){No=Mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ys(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ut(e,n)}}var bs={readContext:Qa,useCallback:Io,useContext:Io,useEffect:Io,useImperativeHandle:Io,useInsertionEffect:Io,useLayoutEffect:Io,useMemo:Io,useReducer:Io,useRef:Io,useState:Io,useDebugValue:Io,useDeferredValue:Io,useTransition:Io,useMutableSource:Io,useSyncExternalStore:Io,useId:Io,unstable_isNewReconciler:!1},nee={readContext:Qa,useCallback:function(e,t){return Bo().memoizedState=[e,t===void 0?null:t],e},useContext:Qa,useEffect:rs,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),ts(4194308,4,ss.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){return ts(4,2,e,t)},useMemo:function(e,t){var n=Bo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Bo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=hs.bind(null,ko,e),[r.memoizedState,e]},useRef:function(e){var t=Bo();return e={current:e},t.memoizedState=e},useState:Qo,useDebugValue:ls,useDeferredValue:function(e){return Bo().memoizedState=e},useTransition:function(){var e=Qo(!1),t=e[0];return e=ps.bind(null,e[1]),Bo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=ko,a=Bo();if(Ea){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Jc===null)throw Error(r(349));Oo&30||qo(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,rs(Yo.bind(null,i,o,e),[e]),i.flags|=2048,$o(9,Jo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Bo(),t=Jc.identifierPrefix;if(Ea){var n=ba,r=ya;n=(r&~(1<<32-Ot(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Po++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=Fo++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},xs={readContext:Qa,useCallback:us,useContext:Qa,useEffect:is,useImperativeHandle:cs,useInsertionEffect:as,useLayoutEffect:os,useMemo:ds,useReducer:Uo,useRef:es,useState:function(){return Uo(Ho)},useDebugValue:ls,useDeferredValue:function(e){return fs(Vo(),Ao.memoizedState,e)},useTransition:function(){return[Uo(Ho)[0],Vo().memoizedState]},useMutableSource:Go,useSyncExternalStore:Ko,useId:ms,unstable_isNewReconciler:!1},Ss={readContext:Qa,useCallback:us,useContext:Qa,useEffect:is,useImperativeHandle:cs,useInsertionEffect:as,useLayoutEffect:os,useMemo:ds,useReducer:Wo,useRef:es,useState:function(){return Wo(Ho)},useDebugValue:ls,useDeferredValue:function(e){var t=Vo();return Ao===null?t.memoizedState=e:fs(t,Ao.memoizedState,e)},useTransition:function(){return[Wo(Ho)[0],Vo().memoizedState]},useMutableSource:Go,useSyncExternalStore:Ko,useId:ms,unstable_isNewReconciler:!1};function Cs(e,t){if(e&&e.defaultProps){for(var n in t=I({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ws(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:I({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ts={isMounted:function(e){return(e=e._reactInternals)?ct(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=yl(),i=bl(e),a=oo(r,i);a.payload=t,n!=null&&(a.callback=n),t=so(e,a,i),t!==null&&(xl(t,e,i,r),co(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=yl(),i=bl(e),a=oo(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=so(e,a,i),t!==null&&(xl(t,e,i,r),co(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yl(),r=bl(e),i=oo(n,r);i.tag=2,t!=null&&(i.callback=t),t=so(e,i,r),t!==null&&(xl(t,e,r,n),co(t,e,r))}};function Es(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Nr(n,r)||!Nr(i,a):!0}function Ds(e,t,n){var r=!1,i=Zi,a=t.contextType;return typeof a==`object`&&a?a=Qa(a):(i=na(t)?ea:Qi.current,r=t.contextTypes,a=(r=r!=null)?ta(e,i):Zi),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ts,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Os(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ts.enqueueReplaceState(t,t.state,null)}function ks(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},io(e);var a=t.contextType;typeof a==`object`&&a?i.context=Qa(a):(a=na(t)?ea:Qi.current,i.context=ta(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(ws(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&Ts.enqueueReplaceState(i,i.state,null),uo(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function As(e,t){try{var n=``,r=t;do n+=se(r),r=r.return;while(r);var i=n}catch(e){i=` 7Error generating stack: `+e.message+` 8`+e.stack}return{value:e,source:t,stack:i,digest:null}}function js(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ms(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Ns=typeof WeakMap==`function`?WeakMap:Map;function Ps(e,t,n){n=oo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ll||(ll=!0,ul=r),Ms(e,t)},n}function Fs(e,t,n){n=oo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ms(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Ms(e,t),typeof r!=`function`&&(dl===null?dl=new Set([this]):dl.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Is(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ns;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Kl.bind(null,e,t,n),t.then(e,e))}function Ls(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null?!0:t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Rs(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=oo(-1,1),t.tag=2,so(n,t,1))),n.lanes|=1),e)}var ree=C.ReactCurrentOwner,zs=!1;function Bs(e,t,n,r){t.child=e===null?Ua(t,null,n,r):Ha(t,e.child,n,r)}function Vs(e,t,n,r,i){n=n.render;var a=t.ref;return Za(t,i),r=Ro(e,t,n,r,a,i),n=zo(),e!==null&&!zs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,sc(e,t,i)):(Ea&&n&&Ca(t),t.flags|=1,Bs(e,t,r,i),t.child)}function Hs(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!eu(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Us(e,t,a,r,i)):(e=ru(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Nr:n,n(o,r)&&e.ref===t.ref)return sc(e,t,i)}return t.flags|=1,e=nu(a,r),e.ref=t.ref,e.return=t,t.child=e}function Us(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Nr(a,r)&&e.ref===t.ref)if(zs=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(zs=!0);else return t.lanes=e.lanes,sc(e,t,i)}return Ks(e,t,n,r,i)}function Ws(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Xi(Qc,Zc),Zc|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Xi(Qc,Zc),Zc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,Xi(Qc,Zc),Zc|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),Xi(Qc,Zc),Zc|=r;return Bs(e,t,i,n),t.child}function Gs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ks(e,t,n,r,i){var a=na(n)?ea:Qi.current;return a=ta(t,a),Za(t,i),n=Ro(e,t,n,r,a,i),r=zo(),e!==null&&!zs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,sc(e,t,i)):(Ea&&r&&Ca(t),t.flags|=1,Bs(e,t,n,i),t.child)}function qs(e,t,n,r,i){if(na(n)){var a=!0;B(t)}else a=!1;if(Za(t,i),t.stateNode===null)oc(e,t),Ds(t,n,r),ks(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=Qa(l):(l=na(n)?ea:Qi.current,l=ta(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Os(t,o,r,l),ro=!1;var f=t.memoizedState;o.state=f,uo(t,r,o,i),c=t.memoizedState,s!==r||f!==c||$i.current||ro?(typeof u==`function`&&(ws(t,n,u,r),c=t.memoizedState),(s=ro||Es(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,ao(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Cs(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=Qa(c):(c=na(n)?ea:Qi.current,c=ta(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Os(t,o,r,c),ro=!1,f=t.memoizedState,o.state=f,uo(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||$i.current||ro?(typeof p==`function`&&(ws(t,n,p,r),m=t.memoizedState),(l=ro||Es(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Js(e,t,n,r,a,i)}function Js(e,t,n,r,i,a){Gs(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&oa(t,n,!1),sc(e,t,a);r=t.stateNode,ree.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ha(t,e.child,null,a),t.child=Ha(t,null,s,a)):Bs(e,t,s,a),t.memoizedState=r.state,i&&oa(t,n,!0),t.child}function Ys(e){var t=e.stateNode;t.pendingContext?ia(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ia(e,t.context,!1),vo(e,t.containerInfo)}function Xs(e,t,n,r,i){return Fa(),Ia(i),t.flags|=256,Bs(e,t,n,r),t.child}var Zs={dehydrated:null,treeContext:null,retryLane:0};function Qs(e){return{baseLanes:e,cachePool:null,transitions:null}}function $s(e,t,n){var r=t.pendingProps,i=So.current,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!=0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Xi(So,i&1),e===null)return ja(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data===`$!`?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=au(o,r,0,null),e=iu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Qs(n),t.memoizedState=Zs,e):ec(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return nc(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=nu(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=iu(a,o,n,null),a.flags|=2):a=nu(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?Qs(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Zs,r}return a=e.child,e=a.sibling,r=nu(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ec(e,t){return t=au({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function tc(e,t,n,r){return r!==null&&Ia(r),Ha(t,e.child,null,n),e=ec(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nc(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=js(Error(r(422))),tc(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=au({mode:`visible`,children:i.children},a,0,null),o=iu(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Ha(t,e.child,null,s),t.child.memoizedState=Qs(s),t.memoizedState=Zs,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return tc(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=js(o,i,void 0),tc(e,t,s,i)}if(c=(s&e.childLanes)!==0,zs||c){if(i=Jc,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,no(e,a),xl(i,e,a,-1))}return Fl(),i=js(Error(r(421))),tc(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=Jl.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Ta=Ni(a.nextSibling),V=t,Ea=!0,Da=null,e!==null&&(ga[_a++]=ya,ga[_a++]=ba,ga[_a++]=va,ya=e.id,ba=e.overflow,va=t),t=ec(t,i.children),t.flags|=4096,t)}function rc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xa(e.return,t,n)}function ic(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function ac(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Bs(e,t,r.children,n),r=So.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rc(e,n,t);else if(e.tag===19)rc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Xi(So,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Co(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ic(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Co(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ic(t,!0,n,null,a);break;case`together`:ic(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function oc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function sc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),tl|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=nu(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=nu(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function cc(e,t,n){switch(t.tag){case 3:Ys(t),Fa();break;case 5:bo(t);break;case 1:na(t.type)&&B(t);break;case 4:vo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Xi(Wa,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Xi(So,So.current&1),e=sc(e,t,n),e===null?null:e.sibling):$s(e,t,n):(Xi(So,So.current&1),t.flags|=128,null);Xi(So,So.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ac(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Xi(So,So.current),r)break;return null;case 22:case 23:return t.lanes=0,Ws(e,t,n)}return sc(e,t,n)}var lc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},uc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,_o(mo.current);var o=null;switch(n){case`input`:i=ge(e,i),r=ge(e,r),o=[];break;case`select`:i=I({},i,{value:void 0}),r=I({},r,{value:void 0}),o=[];break;case`textarea`:i=Se(e,i),r=Se(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=Ci)}Ie(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&li(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},dc=function(e,t,n,r){n!==r&&(t.flags|=4)};function fc(e,t){if(!Ea)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function pc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function mc(e,t,n){var i=t.pendingProps;switch(wa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pc(t),null;case 1:return na(t.type)&&ra(),pc(t),null;case 3:return i=t.stateNode,yo(),Yi($i),Yi(Qi),To(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Na(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Da!==null&&(Tl(Da),Da=null))),pc(t),null;case 5:xo(t);var o=_o(go.current);if(n=t.type,e!==null&&t.stateNode!=null)uc(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return pc(t),null}if(e=_o(mo.current),Na(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Ii]=t,i[Li]=s,e=(t.mode&1)!=0,n){case`dialog`:li(`cancel`,i),li(`close`,i);break;case`iframe`:case`object`:case`embed`:li(`load`,i);break;case`video`:case`audio`:for(o=0;o<oi.length;o++)li(oi[o],i);break;case`source`:li(`error`,i);break;case`img`:case`image`:case`link`:li(`error`,i),li(`load`,i);break;case`details`:li(`toggle`,i);break;case`input`:_e(i,s),li(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},li(`invalid`,i);break;case`textarea`:Ce(i,s),li(`invalid`,i)}for(var c in Ie(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Si(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Si(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&li(`scroll`,i)}switch(n){case`input`:pe(i),ye(i,s,!0);break;case`textarea`:pe(i),Te(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=Ci)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=Ee(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Ii]=t,e[Li]=i,lc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Le(n,i),n){case`dialog`:li(`cancel`,e),li(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:li(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<oi.length;o++)li(oi[o],e);o=i;break;case`source`:li(`error`,e),o=i;break;case`img`:case`image`:case`link`:li(`error`,e),li(`load`,e),o=i;break;case`details`:li(`toggle`,e),o=i;break;case`input`:_e(e,i),o=ge(e,i),li(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=I({},i,{value:void 0}),li(`invalid`,e);break;case`textarea`:Ce(e,i),o=Se(e,i),li(`invalid`,e);break;default:o=i}for(s in Ie(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?Pe(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&ke(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Ae(e,u):typeof u==`number`&&Ae(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&li(`scroll`,e):u!=null&&S(e,s,u,c))}switch(n){case`input`:pe(e),ye(e,i,!1);break;case`textarea`:pe(e),Te(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+ue(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&xe(e,!!i.multiple,i.defaultValue,!0):xe(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=Ci)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return pc(t),null;case 6:if(e&&t.stateNode!=null)dc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=_o(go.current),_o(mo.current),Na(t)){if(i=t.stateNode,n=t.memoizedProps,i[Ii]=t,(s=i.nodeValue!==n)&&(e=V,e!==null))switch(e.tag){case 3:Si(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Si(i.nodeValue,n,(e.mode&1)!=0)}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Ii]=t,t.stateNode=i}return pc(t),null;case 13:if(Yi(So),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ea&&Ta!==null&&t.mode&1&&!(t.flags&128))Pa(),Fa(),t.flags|=98560,s=!1;else if(s=Na(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Ii]=t}else Fa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;pc(t),s=!1}else Da!==null&&(Tl(Da),Da=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||So.current&1?$c===0&&($c=3):Fl())),t.updateQueue!==null&&(t.flags|=4),pc(t),null);case 4:return yo(),e===null&&fi(t.stateNode.containerInfo),pc(t),null;case 10:return Ya(t.type._context),pc(t),null;case 17:return na(t.type)&&ra(),pc(t),null;case 19:if(Yi(So),s=t.memoizedState,s===null)return pc(t),null;if(i=(t.flags&128)!=0,c=s.rendering,c===null)if(i)fc(s,!1);else{if($c!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=Co(e),c!==null){for(t.flags|=128,fc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,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.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Xi(So,So.current&1|2),t.child}e=e.sibling}s.tail!==null&&vt()>sl&&(t.flags|=128,i=!0,fc(s,!1),t.lanes=4194304)}else{if(!i)if(e=Co(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),fc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!Ea)return pc(t),null}else 2*vt()-s.renderingStartTime>sl&&n!==1073741824&&(t.flags|=128,i=!0,fc(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(pc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=vt(),t.sibling=null,n=So.current,Xi(So,i?n&1|2:n&1),t);case 22:case 23:return jl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Zc&1073741824&&(pc(t),t.subtreeFlags&6&&(t.flags|=8192)):pc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function hc(e,t){switch(wa(t),t.tag){case 1:return na(t.type)&&ra(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return yo(),Yi($i),Yi(Qi),To(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return xo(t),null;case 13:if(Yi(So),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Fa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Yi(So),null;case 4:return yo(),null;case 10:return Ya(t.type._context),null;case 22:case 23:return jl(),null;case 24:return null;default:return null}}var gc=!1,_c=!1,vc=typeof WeakSet==`function`?WeakSet:Set,H=null;function yc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){Gl(e,t,n)}else n.current=null}function bc(e,t,n){try{n()}catch(n){Gl(e,t,n)}}var xc=!1;function Sc(e,t){if(wi=gn,e=Lr(),Rr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Ti={focusedElem:e,selectionRange:n},gn=!1,H=t;H!==null;)if(t=H,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,H=e;else for(;H!==null;){t=H;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Cs(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){Gl(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}return h=xc,xc=!1,h}function Cc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&bc(t,n,a)}i=i.next}while(i!==r)}}function wc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Tc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Ec(e){var t=e.alternate;t!==null&&(e.alternate=null,Ec(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ii],delete t[Li],delete t[zi],delete t[Bi],delete t[Vi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Dc(e){return e.tag===5||e.tag===3||e.tag===4}function Oc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Dc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ci));else if(r!==4&&(e=e.child,e!==null))for(kc(e,t,n),e=e.sibling;e!==null;)kc(e,t,n),e=e.sibling}function Ac(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ac(e,t,n),e=e.sibling;e!==null;)Ac(e,t,n),e=e.sibling}var jc=null,Mc=!1;function Nc(e,t,n){for(n=n.child;n!==null;)Pc(e,t,n),n=n.sibling}function Pc(e,t,n){if(Et&&typeof Et.onCommitFiberUnmount==`function`)try{Et.onCommitFiberUnmount(Tt,n)}catch{}switch(n.tag){case 5:_c||yc(n,t);case 6:var r=jc,i=Mc;jc=null,Nc(e,t,n),jc=r,Mc=i,jc!==null&&(Mc?(e=jc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):jc.removeChild(n.stateNode));break;case 18:jc!==null&&(Mc?(e=jc,n=n.stateNode,e.nodeType===8?Mi(e.parentNode,n):e.nodeType===1&&Mi(e,n),z(e)):Mi(jc,n.stateNode));break;case 4:r=jc,i=Mc,jc=n.stateNode.containerInfo,Mc=!0,Nc(e,t,n),jc=r,Mc=i;break;case 0:case 11:case 14:case 15:if(!_c&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&bc(n,t,o),i=i.next}while(i!==r)}Nc(e,t,n);break;case 1:if(!_c&&(yc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Gl(n,t,e)}Nc(e,t,n);break;case 21:Nc(e,t,n);break;case 22:n.mode&1?(_c=(r=_c)||n.memoizedState!==null,Nc(e,t,n),_c=r):Nc(e,t,n);break;default:Nc(e,t,n)}}function Fc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new vc),t.forEach(function(t){var r=Yl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Ic(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:jc=c.stateNode,Mc=!1;break a;case 3:jc=c.stateNode.containerInfo,Mc=!0;break a;case 4:jc=c.stateNode.containerInfo,Mc=!0;break a}c=c.return}if(jc===null)throw Error(r(160));Pc(o,s,a),jc=null,Mc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){Gl(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Lc(t,e),t=t.sibling}function Lc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ic(t,e),Rc(e),i&4){try{Cc(3,e,e.return),wc(3,e)}catch(t){Gl(e,e.return,t)}try{Cc(5,e,e.return)}catch(t){Gl(e,e.return,t)}}break;case 1:Ic(t,e),Rc(e),i&512&&n!==null&&yc(n,n.return);break;case 5:if(Ic(t,e),Rc(e),i&512&&n!==null&&yc(n,n.return),e.flags&32){var a=e.stateNode;try{Ae(a,``)}catch(t){Gl(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&L(a,o),Le(c,s);var u=Le(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?Pe(a,f):d===`dangerouslySetInnerHTML`?ke(a,f):d===`children`?Ae(a,f):S(a,d,f,u)}switch(c){case`input`:ve(a,o);break;case`textarea`:we(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?xe(a,!!o.multiple,o.multiple?[]:``,!1):xe(a,!!o.multiple,o.defaultValue,!0)):xe(a,!!o.multiple,m,!1)}a[Li]=o}catch(t){Gl(e,e.return,t)}}break;case 6:if(Ic(t,e),Rc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){Gl(e,e.return,t)}}break;case 3:if(Ic(t,e),Rc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{z(t.containerInfo)}catch(t){Gl(e,e.return,t)}break;case 4:Ic(t,e),Rc(e);break;case 13:Ic(t,e),Rc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(ol=vt())),i&4&&Fc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(_c=(u=_c)||d,Ic(t,e),_c=u):Ic(t,e),Rc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(H=e,d=e.child;d!==null;){for(f=H=d;H!==null;){switch(p=H,m=p.child,p.tag){case 0:case 11:case 14:case 15:Cc(4,p,p.return);break;case 1:yc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){Gl(i,n,e)}}break;case 5:yc(p,p.return);break;case 22:if(p.memoizedState!==null){Vc(f);continue}}m===null?Vc(f):(m.return=p,H=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Ne(`display`,s))}catch(t){Gl(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){Gl(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ic(t,e),Rc(e),i&4&&Fc(e);break;case 21:break;default:Ic(t,e),Rc(e)}}function Rc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Dc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Ae(a,``),i.flags&=-33),Ac(e,Oc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;kc(e,Oc(e),o);break;default:throw Error(r(161))}}catch(t){Gl(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function iee(e,t,n){H=e,zc(e,t,n)}function zc(e,t,n){for(var r=(e.mode&1)!=0;H!==null;){var i=H,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||gc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||_c;s=gc;var l=_c;if(gc=o,(_c=c)&&!l)for(H=i;H!==null;)o=H,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Hc(i):(c.return=o,H=c);for(;a!==null;)H=a,zc(a,t,n),a=a.sibling;H=i,gc=s,_c=l}Bc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,H=a):Bc(e,t,n)}}function Bc(e){for(;H!==null;){var t=H;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:_c||wc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!_c)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Cs(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&fo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}fo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&z(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}_c||t.flags&512&&Tc(t)}catch(e){Gl(t,t.return,e)}}if(t===e){H=null;break}if(n=t.sibling,n!==null){n.return=t.return,H=n;break}H=t.return}}function Vc(e){for(;H!==null;){var t=H;if(t===e){H=null;break}var n=t.sibling;if(n!==null){n.return=t.return,H=n;break}H=t.return}}function Hc(e){for(;H!==null;){var t=H;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{wc(4,t)}catch(e){Gl(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){Gl(t,i,e)}}var a=t.return;try{Tc(t)}catch(e){Gl(t,a,e)}break;case 5:var o=t.return;try{Tc(t)}catch(e){Gl(t,o,e)}}}catch(e){Gl(t,t.return,e)}if(t===e){H=null;break}var s=t.sibling;if(s!==null){s.return=t.return,H=s;break}H=t.return}}var Uc=Math.ceil,Wc=C.ReactCurrentDispatcher,Gc=C.ReactCurrentOwner,Kc=C.ReactCurrentBatchConfig,qc=0,Jc=null,Yc=null,Xc=0,Zc=0,Qc=Ji(0),$c=0,el=null,tl=0,nl=0,rl=0,il=null,al=null,ol=0,sl=1/0,cl=null,ll=!1,ul=null,dl=null,fl=!1,pl=null,ml=0,hl=0,gl=null,_l=-1,vl=0;function yl(){return qc&6?vt():_l===-1?_l=vt():_l}function bl(e){return e.mode&1?qc&2&&Xc!==0?Xc&-Xc:La.transition===null?(e=Wt,e===0?(e=window.event,e=e===void 0?16:Sn(e.type),e):e):(vl===0&&(vl=zt()),vl):1}function xl(e,t,n,i){if(50<hl)throw hl=0,gl=null,Error(r(185));Vt(e,n,i),(!(qc&2)||e!==Jc)&&(e===Jc&&(!(qc&2)&&(nl|=n),$c===4&&Dl(e,Xc)),Sl(e,i),n===1&&qc===0&&!(t.mode&1)&&(sl=vt()+500,ca&&da()))}function Sl(e,t){var n=e.callbackNode;Lt(e,t);var r=Ft(e,e===Jc?Xc:0);if(r===0)n!==null&&ht(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ht(n),t===1)e.tag===0?tee(Ol.bind(null,e)):ua(Ol.bind(null,e)),Ai(function(){!(qc&6)&&da()}),n=null;else{switch(Gt(r)){case 1:n=bt;break;case 4:n=xt;break;case 16:n=St;break;case 536870912:n=wt;break;default:n=St}n=Zl(n,Cl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Cl(e,t){if(_l=-1,vl=0,qc&6)throw Error(r(327));var n=e.callbackNode;if(Ul()&&e.callbackNode!==n)return null;var i=Ft(e,e===Jc?Xc:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Il(e,i);else{t=i;var a=qc;qc|=2;var o=Pl();(Jc!==e||Xc!==t)&&(cl=null,sl=vt()+500,Ml(e,t));do try{Rl();break}catch(t){Nl(e,t)}while(1);Ja(),Wc.current=o,qc=a,Yc===null?(Jc=null,Xc=0,t=$c):t=0}if(t!==0){if(t===2&&(a=Rt(e),a!==0&&(i=a,t=wl(e,a))),t===1)throw n=el,Ml(e,0),Dl(e,i),Sl(e,vt()),n;if(t===6)Dl(e,i);else{if(a=e.current.alternate,!(i&30)&&!El(a)&&(t=Il(e,i),t===2&&(o=Rt(e),o!==0&&(i=o,t=wl(e,o))),t===1))throw n=el,Ml(e,0),Dl(e,i),Sl(e,vt()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Vl(e,al,cl);break;case 3:if(Dl(e,i),(i&130023424)===i&&(t=ol+500-vt(),10<t)){if(Ft(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){yl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Di(Vl.bind(null,e,al,cl),t);break}Vl(e,al,cl);break;case 4:if(Dl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-Ot(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=vt()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Uc(i/1960))-i,10<i){e.timeoutHandle=Di(Vl.bind(null,e,al,cl),i);break}Vl(e,al,cl);break;case 5:Vl(e,al,cl);break;default:throw Error(r(329))}}}return Sl(e,vt()),e.callbackNode===n?Cl.bind(null,e):null}function wl(e,t){var n=il;return e.current.memoizedState.isDehydrated&&(Ml(e,t).flags|=256),e=Il(e,t),e!==2&&(t=al,al=n,t!==null&&Tl(t)),e}function Tl(e){al===null?al=e:al.push.apply(al,e)}function El(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Mr(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Dl(e,t){for(t&=~rl,t&=~nl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ot(t),r=1<<n;e[n]=-1,t&=~r}}function Ol(e){if(qc&6)throw Error(r(327));Ul();var t=Ft(e,0);if(!(t&1))return Sl(e,vt()),null;var n=Il(e,t);if(e.tag!==0&&n===2){var i=Rt(e);i!==0&&(t=i,n=wl(e,i))}if(n===1)throw n=el,Ml(e,0),Dl(e,t),Sl(e,vt()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Vl(e,al,cl),Sl(e,vt()),null}function kl(e,t){var n=qc;qc|=1;try{return e(t)}finally{qc=n,qc===0&&(sl=vt()+500,ca&&da())}}function Al(e){pl!==null&&pl.tag===0&&!(qc&6)&&Ul();var t=qc;qc|=1;var n=Kc.transition,r=Wt;try{if(Kc.transition=null,Wt=1,e)return e()}finally{Wt=r,Kc.transition=n,qc=t,!(qc&6)&&da()}}function jl(){Zc=Qc.current,Yi(Qc)}function Ml(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Oi(n)),Yc!==null)for(n=Yc.return;n!==null;){var r=n;switch(wa(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ra();break;case 3:yo(),Yi($i),Yi(Qi),To();break;case 5:xo(r);break;case 4:yo();break;case 13:Yi(So);break;case 19:Yi(So);break;case 10:Ya(r.type._context);break;case 22:case 23:jl()}n=n.return}if(Jc=e,Yc=e=nu(e.current,null),Xc=Zc=t,$c=0,el=null,rl=nl=tl=0,al=il=null,$a!==null){for(t=0;t<$a.length;t++)if(n=$a[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}$a=null}return e}function Nl(e,t){do{var n=Yc;try{if(Ja(),Eo.current=bs,Mo){for(var i=ko.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Mo=!1}if(Oo=0,jo=Ao=ko=null,No=!1,Po=0,Gc.current=null,n===null||n.return===null){$c=1,el=t,Yc=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=Xc,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Ls(s);if(m!==null){m.flags&=-257,Rs(m,s,c,o,t),m.mode&1&&Is(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}else{if(!(t&1)){Is(o,u,t),Fl();break a}l=Error(r(426))}}else if(Ea&&c.mode&1){var _=Ls(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Rs(_,s,c,o,t),Ia(As(l,c));break a}}o=l=As(l,c),$c!==4&&($c=2),il===null?il=[o]:il.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Ps(o,l,t);lo(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(dl===null||!dl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Fs(o,c,t);lo(o,x);break a}}o=o.return}while(o!==null)}Bl(n)}catch(e){t=e,Yc===n&&n!==null&&(Yc=n=n.return);continue}break}while(1)}function Pl(){var e=Wc.current;return Wc.current=bs,e===null?bs:e}function Fl(){($c===0||$c===3||$c===2)&&($c=4),Jc===null||!(tl&268435455)&&!(nl&268435455)||Dl(Jc,Xc)}function Il(e,t){var n=qc;qc|=2;var i=Pl();(Jc!==e||Xc!==t)&&(cl=null,Ml(e,t));do try{Ll();break}catch(t){Nl(e,t)}while(1);if(Ja(),qc=n,Wc.current=i,Yc!==null)throw Error(r(261));return Jc=null,Xc=0,$c}function Ll(){for(;Yc!==null;)zl(Yc)}function Rl(){for(;Yc!==null&&!gt();)zl(Yc)}function zl(e){var t=Xl(e.alternate,e,Zc);e.memoizedProps=e.pendingProps,t===null?Bl(e):Yc=t,Gc.current=null}function Bl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=hc(n,t),n!==null){n.flags&=32767,Yc=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{$c=6,Yc=null;return}}else if(n=mc(n,t,Zc),n!==null){Yc=n;return}if(t=t.sibling,t!==null){Yc=t;return}Yc=t=e}while(t!==null);$c===0&&($c=5)}function Vl(e,t,n){var r=Wt,i=Kc.transition;try{Kc.transition=null,Wt=1,Hl(e,t,n,r)}finally{Kc.transition=i,Wt=r}return null}function Hl(e,t,n,i){do Ul();while(pl!==null);if(qc&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Ht(e,o),e===Jc&&(Yc=Jc=null,Xc=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||fl||(fl=!0,Zl(St,function(){return Ul(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=Kc.transition,Kc.transition=null;var s=Wt;Wt=1;var c=qc;qc|=4,Gc.current=null,Sc(e,n),Lc(n,e),zr(Ti),gn=!!wi,Ti=wi=null,e.current=n,iee(n,e,a),_t(),qc=c,Wt=s,Kc.transition=o}else e.current=n;if(fl&&(fl=!1,pl=e,ml=a),o=e.pendingLanes,o===0&&(dl=null),Dt(n.stateNode,i),Sl(e,vt()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(ll)throw ll=!1,e=ul,ul=null,e;return ml&1&&e.tag!==0&&Ul(),o=e.pendingLanes,o&1?e===gl?hl++:(hl=0,gl=e):hl=0,da(),null}function Ul(){if(pl!==null){var e=Gt(ml),t=Kc.transition,n=Wt;try{if(Kc.transition=null,Wt=16>e?16:e,pl===null)var i=!1;else{if(e=pl,pl=null,ml=0,qc&6)throw Error(r(331));var a=qc;for(qc|=4,H=e.current;H!==null;){var o=H,s=o.child;if(H.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(H=u;H!==null;){var d=H;switch(d.tag){case 0:case 11:case 15:Cc(8,d,o)}var f=d.child;if(f!==null)f.return=d,H=f;else for(;H!==null;){d=H;var p=d.sibling,m=d.return;if(Ec(d),d===u){H=null;break}if(p!==null){p.return=m,H=p;break}H=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}H=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,H=s;else b:for(;H!==null;){if(o=H,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Cc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,H=v;break b}H=o.return}}var y=e.current;for(H=y;H!==null;){s=H;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,H=b;else b:for(s=y;H!==null;){if(c=H,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:wc(9,c)}}catch(e){Gl(c,c.return,e)}if(c===s){H=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,H=x;break b}H=c.return}}if(qc=a,da(),Et&&typeof Et.onPostCommitFiberRoot==`function`)try{Et.onPostCommitFiberRoot(Tt,e)}catch{}i=!0}return i}finally{Wt=n,Kc.transition=t}}return!1}function Wl(e,t,n){t=As(n,t),t=Ps(e,t,1),e=so(e,t,1),t=yl(),e!==null&&(Vt(e,1,t),Sl(e,t))}function Gl(e,t,n){if(e.tag===3)Wl(e,e,n);else for(;t!==null;){if(t.tag===3){Wl(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(dl===null||!dl.has(r))){e=As(n,e),e=Fs(t,e,1),t=so(t,e,1),e=yl(),t!==null&&(Vt(t,1,e),Sl(t,e));break}}t=t.return}}function Kl(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=yl(),e.pingedLanes|=e.suspendedLanes&n,Jc===e&&(Xc&n)===n&&($c===4||$c===3&&(Xc&130023424)===Xc&&500>vt()-ol?Ml(e,0):rl|=n),Sl(e,t)}function ql(e,t){t===0&&(e.mode&1?(t=Nt,Nt<<=1,!(Nt&130023424)&&(Nt=4194304)):t=1);var n=yl();e=no(e,t),e!==null&&(Vt(e,t,n),Sl(e,n))}function Jl(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ql(e,n)}function Yl(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),ql(e,n)}var Xl=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||$i.current)zs=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return zs=!1,cc(e,t,n);zs=!!(e.flags&131072)}else zs=!1,Ea&&t.flags&1048576&&Sa(t,ha,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;oc(e,t),e=t.pendingProps;var a=ta(t,Qi.current);Za(t,n),a=Ro(null,t,i,e,a,n);var o=zo();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,na(i)?(o=!0,B(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,io(t),a.updater=Ts,t.stateNode=a,a._reactInternals=t,ks(t,i,e,n),t=Js(null,t,i,!0,o,n)):(t.tag=0,Ea&&o&&Ca(t),Bs(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(oc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=tu(i),e=Cs(i,e),a){case 0:t=Ks(null,t,i,e,n);break a;case 1:t=qs(null,t,i,e,n);break a;case 11:t=Vs(null,t,i,e,n);break a;case 14:t=Hs(null,t,i,Cs(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),Ks(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),qs(e,t,i,a,n);case 3:a:{if(Ys(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,ao(e,t),uo(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=As(Error(r(423)),t),t=Xs(e,t,i,n,a);break a}else if(i!==a){a=As(Error(r(424)),t),t=Xs(e,t,i,n,a);break a}else for(Ta=Ni(t.stateNode.containerInfo.firstChild),V=t,Ea=!0,Da=null,n=Ua(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fa(),i===a){t=sc(e,t,n);break a}Bs(e,t,i,n)}t=t.child}return t;case 5:return bo(t),e===null&&ja(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Ei(i,a)?s=null:o!==null&&Ei(i,o)&&(t.flags|=32),Gs(e,t),Bs(e,t,s,n),t.child;case 6:return e===null&&ja(t),null;case 13:return $s(e,t,n);case 4:return vo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ha(t,null,i,n):Bs(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),Vs(e,t,i,a,n);case 7:return Bs(e,t,t.pendingProps,n),t.child;case 8:return Bs(e,t,t.pendingProps.children,n),t.child;case 12:return Bs(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,Xi(Wa,i._currentValue),i._currentValue=s,o!==null)if(Mr(o.value,s)){if(o.children===a.children&&!$i.current){t=sc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=oo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Xa(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),Xa(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Bs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,Za(t,n),a=Qa(a),i=i(a),t.flags|=1,Bs(e,t,i,n),t.child;case 14:return i=t.type,a=Cs(i,t.pendingProps),a=Cs(i.type,a),Hs(e,t,i,a,n);case 15:return Us(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),oc(e,t),t.tag=1,na(i)?(e=!0,B(t)):e=!1,Za(t,n),Ds(t,i,a),ks(t,i,a,n),Js(null,t,i,!0,e,n);case 19:return ac(e,t,n);case 22:return Ws(e,t,n)}throw Error(r(156,t.tag))};function Zl(e,t){return mt(e,t)}function Ql(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.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $l(e,t,n,r){return new Ql(e,t,n,r)}function eu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tu(e){if(typeof e==`function`)return+!!eu(e);if(e!=null){if(e=e.$$typeof,e===j)return 11;if(e===P)return 14}return 2}function nu(e,t){var n=e.alternate;return n===null?(n=$l(e.tag,t,e.key,e.mode),n.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.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,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=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ru(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)eu(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case E:return iu(n.children,a,o,t);case D:s=8,a|=8;break;case O:return e=$l(12,n,t,a|2),e.elementType=O,e.lanes=o,e;case M:return e=$l(13,n,t,a),e.elementType=M,e.lanes=o,e;case N:return e=$l(19,n,t,a),e.elementType=N,e.lanes=o,e;case ee:return au(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case k:s=10;break a;case A:s=9;break a;case j:s=11;break a;case P:s=14;break a;case F:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=$l(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function iu(e,t,n,r){return e=$l(7,e,r,t),e.lanes=n,e}function au(e,t,n,r){return e=$l(22,e,r,t),e.elementType=ee,e.lanes=n,e.stateNode={isHidden:!1},e}function ou(e,t,n){return e=$l(6,e,null,t),e.lanes=n,e}function U(e,t,n){return t=$l(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function W(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bt(0),this.expirationTimes=Bt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function su(e,t,n,r,i,a,o,s,c){return e=new W(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=$l(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},io(a),e}function cu(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function lu(e){if(!e)return Zi;e=e._reactInternals;a:{if(ct(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(na(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(na(n))return aa(e,n,t)}return t}function uu(e,t,n,r,i,a,o,s,c){return e=su(n,r,!0,e,i,a,o,s,c),e.context=lu(null),n=e.current,r=yl(),i=bl(n),a=oo(r,i),a.callback=t??null,so(n,a,i),e.current.lanes=i,Vt(e,i,r),Sl(e,r),e}function du(e,t,n,r){var i=t.current,a=yl(),o=bl(i);return n=lu(n),t.context===null?t.context=n:t.pendingContext=n,t=oo(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=so(i,t,o),e!==null&&(xl(e,i,o,a),co(e,i,o)),o}function fu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function pu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function mu(e,t){pu(e,t),(e=e.alternate)&&pu(e,t)}function hu(){return null}var gu=typeof reportError==`function`?reportError:function(e){console.error(e)};function _u(e){this._internalRoot=e}vu.prototype.render=_u.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));du(e,t,null,null)},vu.prototype.unmount=_u.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Al(function(){du(null,e,null,null)}),t[Ri]=null}};function vu(e){this._internalRoot=e}vu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<an.length&&t!==0&&t<an[n].priority;n++);an.splice(n,0,e),n===0&&un(e)}};function yu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function bu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function xu(){}function aee(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=fu(o);a.call(e)}}var o=uu(t,r,e,0,null,!1,!1,``,xu);return e._reactRootContainer=o,e[Ri]=o.current,fi(e.nodeType===8?e.parentNode:e),Al(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=fu(c);s.call(e)}}var c=su(e,0,!1,null,null,!1,!1,``,xu);return e._reactRootContainer=c,e[Ri]=c.current,fi(e.nodeType===8?e.parentNode:e),Al(function(){du(t,c,n,r)}),c}function Su(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=fu(o);s.call(e)}}du(t,o,e,i)}else o=aee(n,t,e,i,r);return fu(o)}Kt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Pt(t.pendingLanes);n!==0&&(Ut(t,n|1),Sl(t,vt()),!(qc&6)&&(sl=vt()+500,da()))}break;case 13:Al(function(){var t=no(e,1);t!==null&&xl(t,e,1,yl())}),mu(e,1)}},qt=function(e){if(e.tag===13){var t=no(e,134217728);t!==null&&xl(t,e,134217728,yl()),mu(e,134217728)}},Jt=function(e){if(e.tag===13){var t=bl(e),n=no(e,t);n!==null&&xl(n,e,t,yl()),mu(e,t)}},Yt=function(){return Wt},Xt=function(e,t){var n=Wt;try{return Wt=e,t()}finally{Wt=n}},Be=function(e,t,n){switch(t){case`input`:if(ve(e,n),t=n.name,n.type===`radio`&&t!=null){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 i=n[t];if(i!==e&&i.form===e.form){var a=Gi(i);if(!a)throw Error(r(90));me(i),ve(i,a)}}}break;case`textarea`:we(e,n);break;case`select`:t=n.value,t!=null&&xe(e,!!n.multiple,t,!1)}},Ke=kl,qe=Al;var oee={usingClientEntryPoint:!1,Events:[Ui,Wi,Gi,We,Ge,kl]}
8,Cu={findFiberByHostInstance:Hi,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},wu={bundleType:Cu.bundleType,version:Cu.version,rendererPackageName:Cu.rendererPackageName,rendererConfig:Cu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ft(e),e===null?null:e.stateNode},findFiberByHostInstance:Cu.findFiberByHostInstance||hu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tu.isDisabled&&Tu.supportsFiber)try{Tt=Tu.inject(wu),Et=Tu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oee,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!yu(t))throw Error(r(200));return cu(e,t,null,n)},e.createRoot=function(e,t){if(!yu(e))throw Error(r(299));var n=!1,i=``,a=gu;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=su(e,1,!1,null,null,n,!1,i,a),e[Ri]=t.current,fi(e.nodeType===8?e.parentNode:e),new _u(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=ft(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Al(e)},e.hydrate=function(e,t,n){if(!bu(t))throw Error(r(200));return Su(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!yu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=gu;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=uu(t,null,e,1,n??null,a,!1,o,s),e[Ri]=t.current,fi(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new vu(t)},e.render=function(e,t,n){if(!bu(t))throw Error(r(200));return Su(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!bu(e))throw Error(r(40));return e._reactRootContainer?(Al(function(){Su(null,null,e,!1,function(){e._reactRootContainer=null,e[Ri]=null})}),!0):!1},e.unstable_batchedUpdates=kl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!bu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Su(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),h=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=h();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),_=l(d(),1),v=l(h(),1),y=g(),b=`modulepreload`,x=function(e){return`/`+e},S={},C=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=x(t,n),t in S)return;S[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:b,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},w=`popstate`;function T(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}
8function E(e={}){function t(e,t){let{pathname:n=`/`,search:r=``,hash:i=``}=N(e.location.hash.substring(1));return!n.startsWith(`/`)&&!n.startsWith(`.`)&&(n=`/`+n),j(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){let n=e.document.querySelector(`base`),r=``;if(n&&n.getAttribute(`href`)){let t=e.location.href,n=t.indexOf(`#`);r=n===-1?t:t.slice(0,n)}return r+`#`+(typeof t==`string`?t:M(t))}function r(e,t){O(e.pathname.charAt(0)===`/`,`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}return P(t,n,r,e)}function D(e,t){if(e===!1||e==null)throw Error(t)}function O(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function k(){return Math.random().toString(36).substring(2,10)}function A(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function j(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?N(t):t,state:n,key:t&&t.key||r||k(),mask:i}}function M({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function N(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function P(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=T(e)?e:j(h.location,e,t);n&&n(r,e),l=u()+1;let d=A(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=T(e)?e:j(h.location,e,t);n&&n(r,e),l=u();let i=A(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return F(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(w,d),c=e,()=>{i.removeEventListener(w,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function F(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),D(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:M(t);return i=i.replace(/ $/,`%20`),!n&&i.startsWith(`//`)&&(i=r+i),new URL(i,r)}function ee(e,t,n=`/`){return te(e,t,n,!1)}function te(e,t,n,r,i){let a=ve((typeof t==`string`?N(t):t).pathname||`/`,n);if(a==null)return null;let o=i??I(e),s=null,c=L(a);for(let e=0;s==null&&e<o.length;++e)s=he(o[e],c,r);return s}function ne(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function I(e){let t=re(e);return ae(t),t}function re(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;D(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Ee([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(D(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),re(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:pe(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);
8else for(let n of ie(e.path))a(e,t,!0,n)}),t}function ie(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ie(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ae(e){e.sort((e,t)=>e.score===t.score?me(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var oe=/^:[\w-]+$/,se=3,ce=2,le=1,ue=10,de=-2,fe=e=>e===`*`;function pe(e,t){let n=e.split(`/`),r=n.length;return n.some(fe)&&(r+=de),t&&(r+=ce),n.filter(e=>!fe(e)).reduce((e,t)=>e+(oe.test(t)?se:t===``?le:ue),r)}function me(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function he(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=ge({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=ge({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;
8Object.assign(i,u.params),o.push({params:i,pathname:Ee([a,u.pathname]),pathnameBase:Oe(Ee([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=Ee([a,u.pathnameBase]))}return o}function ge(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=_e(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function _e(e,t=!1,n=!0){O(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function L(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return O(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ve(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var ye=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function be(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?N(e):e,a;return n?(n=Te(n),a=n.startsWith(`/`)?R(n.substring(1),`/`):R(n,t)):a=t,{pathname:a,search:ke(r),hash:Ae(i)}}function R(e,t){let n=De(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function xe(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Se(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ce(e){let t=Se(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function we(e,t,n,r=!1){let i;typeof e==`string`?i=N(e):(i={...e},D(!i.pathname||!i.pathname.includes(`?`),xe(`?`,`pathname`,`search`,i)),D(!i.pathname||!i.pathname.includes(`#`),xe(`#`,`pathname`,`hash`,i)),D(!i.search||!i.search.includes(`#`),xe(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=be(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Te=e=>e.replace(/\/\/+/g,`/`),Ee=e=>Te(e.join(`/`)),De=e=>e.replace(/\/+$/,``),Oe=e=>De(e).replace(/^\/*/,`/`),ke=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ae=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,je=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Me(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ne(e){return Ee(e.map(e=>e.route.path).filter(Boolean))||`/`}var Pe=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Fe(e,t){let n=e;if(typeof n!=`string`||!ye.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Pe)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=ve(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{O(!1,`<Link to="${n}">
8 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ie=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Ie);var Le=[`GET`,...Ie];new Set(Le);var Re=_.createContext(null);Re.displayName=`DataRouter`;var ze=_.createContext(null);ze.displayName=`DataRouterState`;var Be=_.createContext(!1);function Ve(){return _.useContext(Be)}var He=_.createContext({isTransitioning:!1});He.displayName=`ViewTransition`;var Ue=_.createContext(new Map);Ue.displayName=`Fetchers`;var We=_.createContext(null);We.displayName=`Await`;var Ge=_.createContext(null);Ge.displayName=`Navigation`;var Ke=_.createContext(null);Ke.displayName=`Location`;var qe=_.createContext({outlet:null,matches:[],isDataRoute:!1});qe.displayName=`Route`;var Je=_.createContext(null);Je.displayName=`RouteError`;var Ye=`REACT_ROUTER_ERROR`,Xe=`REDIRECT`,Ze=`ROUTE_ERROR_RESPONSE`;function Qe(e){if(e.startsWith(`${Ye}:${Xe}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function $e(e){if(e.startsWith(`${Ye}:${Ze}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new je(t.status,t.statusText,t.data)}catch{}}function et(e,{relative:t}={}){D(tt(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=_.useContext(Ge),{hash:i,pathname:a,search:o}=lt(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Ee([n,a])),r.createHref({pathname:s,search:o,hash:i})}function tt(){return _.useContext(Ke)!=null}function nt(){return D(tt(),`useLocation() may be used only in the context of a <Router> component.`),_.useContext(Ke).location}var rt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function at(e){_.useContext(Ge).static||_.useLayoutEffect(e)}function ot(){let{isDataRoute:e}=_.useContext(qe);return e?Ot():st()}function st(){D(tt(),`useNavigate() may be used only in the context of a <Router> component.`);let e=_.useContext(Re),{basename:t,navigator:n}=_.useContext(Ge),{matches:r}=_.useContext(qe),{pathname:i}=nt(),a=JSON.stringify(Ce(r)),o=_.useRef(!1);return at(()=>{o.current=!0}),_.useCallback((r,s={})=>{if(O(o.current,rt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=we(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Ee([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}_.createContext(null);function ct(){let{matches:e}=_.useContext(qe);return e[e.length-1]?.params??{}}function lt(e,{relative:t}={}){let{matches:n}=_.useContext(qe),{pathname:r}=nt(),i=JSON.stringify(Ce(n));return _.useMemo(()=>we(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function ut(e,t){return dt(e,t)}function dt(e,t,n){D(tt(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=_.useContext(Ge),{matches:i}=_.useContext(qe),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;At(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 9 10Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=nt(),d;if(t){let e=typeof t==`string`?N(t):t;D(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):ee(e,{pathname:p});O(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),O(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=vt(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Ee([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Ee([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?_.createElement(Ke.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function ft(){let e=Dt(),t=Me(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=_.createElement(_.Fragment,null,_.createElement(`p`,null,`ð¿ Hey developer ð`),_.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,_.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,_.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),_.createElement(_.Fragment,null,_.createElement(`h2`,null,`Unexpected Application
10Error!`),_.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?_.createElement(`pre`,{style:i},n):null,o)}var pt=_.createElement(ft,null),mt=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=$e(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:_.createElement(qe.Provider,{value:this.props.routeContext},_.createElement(Je.Provider,{value:e,children:this.props.component}));return this.context?_.createElement(gt,{error:e},t):t}};mt.contextType=Be;var ht=new WeakMap;function gt({children:e,error:t}){let{basename:n}=_.useContext(Ge);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Qe(t.digest);if(e){let r=ht.get(t);if(r)throw r;let i=Fe(e.location,n);if(Pe&&!ht.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw ht.set(t,n),n}return _.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function _t({routeContext:e,match:t,children:n}){let r=_.useContext(Re);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(qe.Provider,{value:e},n)}function vt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);D(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Ne(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||pt,o&&(s<0&&c===0?(At(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?_.createElement(n.route.Component,null):n.route.element?n.route.element:e,_.createElement(_t,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?_.createElement(mt,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function yt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function bt(e){let t=_.useContext(Re);return D(t,yt(e)),t}function xt(e){let t=_.useContext(ze);return D(t,yt(e)),t}function St(e){let t=_.useContext(qe);return D(t,yt(e)),t}function Ct(e){let t=St(e),n=t.matches[t.matches.length-1];return D(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function wt(){return Ct(`useRouteId`)}function Tt(){let e=xt(`useNavigation`);return _.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function Et(){let{matches:e,loaderData:t}=xt(`useMatches`);return _.useMemo(()=>e.map(e=>ne(e,t)),[e,t])}function Dt(){let e=_.useContext(Je),t=xt(`useRouteError`),n=Ct(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Ot(){let{router:e}=bt(`useNavigate`),t=Ct(`useNavigate`),n=_.useRef(!1);return at(()=>{n.current=!0}),_.useCallback(async(r,i={})=>{O(n.current,rt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var kt={};function At(e,t,n){!t&&!kt[e]&&(kt[e]=!0,O(!1,n))}_.memo(jt);function jt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return dt(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Mt({to:e,replace:t,state:n,relative:r}){D(tt(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=_.useContext(Ge);O(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=_.useContext(qe),{pathname:o}=nt(),s=ot(),c=we(e,Ce(a),o,r===`path`),l=JSON.stringify(c);return _.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Nt(e){D(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Pt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){D(!tt(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=_.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=N(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=_.useMemo(()=>{let e=ve(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);
10return O(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:_.createElement(Ge.Provider,{value:c},_.createElement(Ke.Provider,{children:t,value:h}))}function Ft({children:e,location:t}){return ut(It(e),t)}_.Component;function It(e,t=[]){let n=[];return _.Children.forEach(e,(e,r)=>{if(!_.isValidElement(e))return;let i=[...t,r];if(e.type===_.Fragment){n.push.apply(n,It(e.props.children,i));return}D(e.type===Nt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),D(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=It(e.props.children,i)),n.push(a)}),n}var Lt=`get`,Rt=`application/x-www-form-urlencoded`;function zt(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Bt(e){return zt(e)&&e.tagName.toLowerCase()===`button`}function Vt(e){return zt(e)&&e.tagName.toLowerCase()===`form`}function Ht(e){return zt(e)&&e.tagName.toLowerCase()===`input`}function Ut(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Wt(e,t){return e.button===0&&(!t||t===`_self`)&&!Ut(e)}var Gt=null;function Kt(){if(Gt===null)try{new FormData(document.createElement(`form`),0),Gt=!1}catch{Gt=!0}return Gt}var qt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Jt(e){return e!=null&&!qt.has(e)?(O(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Rt}"`),null):e}function Yt(e,t){let n,r,i,a,o;if(Vt(e)){let o=e.getAttribute(`action`);r=o?ve(o,t):null,n=e.getAttribute(`method`)||Lt,i=Jt(e.getAttribute(`enctype`))||Rt,a=new FormData(e)}else if(Bt(e)||Ht(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?ve(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Lt,i=Jt(e.getAttribute(`formenctype`))||Jt(o.getAttribute(`enctype`))||Rt,a=new FormData(o,e),!Kt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(zt(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Lt,r=null,i=Rt,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Xt={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Zt=/[&><\u2028\u2029]/g;function Qt(e){return e.replace(Zt,e=>Xt[e])}function $t(e,t){if(e===!1||e==null)throw Error(t)}function en(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&ve(i.pathname,t)===`/`?i.pathname=`${De(t)}/_root.${r}`:i.pathname=`${De(i.pathname)}.${r}`,i}async function tn(e,t){if(e.id in t)return t[e.id];try{let n=await C(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.
10isSpaMode,window.location.reload(),new Promise(()=>{})}}function nn(e){return e!=null&&typeof e.page==`string`}function rn(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function an(e,t,n){return un((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await tn(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(rn).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function on(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function sn(e,t,{includeHydrateFallback:n}={}){return cn(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function cn(e){return[...new Set(e)]}function ln(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function un(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!nn(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(ln(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function dn(){let e=_.useContext(Re);return $t(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function fn(){let e=_.useContext(ze);return $t(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var pn=_.createContext(void 0);pn.displayName=`FrameworkContext`;function mn(){let e=_.useContext(pn);return $t(e,`You must render this element inside a <HydratedRouter> element`),e}function z(e,t){let n=_.useContext(pn),[r,i]=_.useState(!1),[a,o]=_.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=_.useRef(null);_.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),_.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:hn(s,p),onBlur:hn(c,m),onMouseEnter:hn(l,p),onMouseLeave:hn(u,m),onTouchStart:hn(d,p)}]:[a,f,{}]:[!1,f,{}]}function hn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function gn({page:e,...t}){let n=Ve(),{router:r}=dn(),i=_.useMemo(()=>ee(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?_.createElement(vn,{page:e,matches:i,...t}):_.createElement(yn,{page:e,matches:i,...t}):null}function _n(e){let{manifest:t,routeModules:n}=mn(),[r,i]=_.useState([]);return _.useEffect(()=>{let r=!1;return an(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function vn({page:e,matches:t,...n}){let r=nt(),{future:i}=mn(),{basename:a}=dn(),o=_.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=en(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return _.createElement(_.Fragment,null,o.map(e=>_.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function yn({page:e,matches:t,...n}){let r=nt(),{future:i,manifest:a,routeModules:o}=mn(),{basename:s}=dn(),{loaderData:c,matches:l}=fn(),u=_.useMemo(()=>on(e,t,l,a,r,`data`),[e,t,l,a,r]),d=_.useMemo(()=>on(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=_.useMemo(()=>
10{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=en(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=_.useMemo(()=>sn(d,a),[d,a]),m=_n(d);return _.createElement(_.Fragment,null,f.map(e=>_.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>_.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>_.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function bn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}_.Component;var xn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{xn&&(window.__reactRouterVersion=`7.17.0`)}catch{}function Sn({basename:e,children:t,useTransitions:n,window:r}){let i=_.useRef();i.current??=E({window:r,v5Compat:!0});let a=i.current,[o,s]=_.useState({action:a.action,location:a.location}),c=_.useCallback(e=>{n===!1?s(e):_.startTransition(()=>s(e))},[n]);return _.useLayoutEffect(()=>a.listen(c),[a,c]),_.createElement(Pt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function Cn({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=_.useState({action:n.action,location:n.location}),o=_.useCallback(e=>{r===!1?a(e):_.startTransition(()=>a(e))},[r]);return _.useLayoutEffect(()=>n.listen(o),[n,o]),_.createElement(Pt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}Cn.displayName=`unstable_HistoryRouter`;var wn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tn=_.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:v}=_.useContext(Ge),y=typeof l==`string`&&wn.test(l),b=Fe(l,h);l=b.to;let x=et(l,{relative:r}),S=nt(),C=null;if(o){let e=we(o,[],S.mask?S.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Ee([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=z(n,p),D=Mn(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=_.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:bn(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?_.createElement(_.Fragment,null,A,_.createElement(gn,{page:x})):A});Tn.displayName=`Link`;var En=_.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=lt(a,{relative:c.relative}),d=nt(),f=_.useContext(ze),{navigator:p,basename:m}=_.useContext(Ge),h=f!=null&&Hn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&m&&(y=ve(y,m)||y);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=v===g||!r&&v.startsWith(g)&&v.charAt(b)===`/`,S=y!=null&&(y===g||!r&&y.startsWith(g)&&y.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return _.createElement(Tn,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});En.displayName=`NavLink`;var Dn=_.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Lt,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=_.useContext(Ge),g=Fn(),v=In(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&wn.test(s);return _.createElement(`form`,{ref:m,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?_.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});Dn.displayName=`Form`;function On({getKey:e,storageKey:t,...n}){let r=_.useContext(pn),{basename:i}=_.useContext(Ge),a=nt(),o=Et();Bn({getKey:e,storageKey:t});let s=_.useMemo(()=>
10{if(!r||!e)return null;let t=zn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return _.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Qt(JSON.stringify(t||Ln))}, ${Qt(JSON.stringify(s))})`}})}On.displayName=`ScrollRestoration`;function kn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function An(e){let t=_.useContext(Re);return D(t,kn(e)),t}function jn(e){let t=_.useContext(ze);return D(t,kn(e)),t}function Mn(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=ot(),d=nt(),f=lt(e,{relative:o});return _.useCallback(p=>{if(Wt(p,t)){p.preventDefault();let t=n===void 0?M(d)===M(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?_.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var Nn=0,Pn=()=>`__${String(++Nn)}__`;function Fn(){let{router:e}=An(`useSubmit`),{basename:t}=_.useContext(Ge),n=wt(),r=e.fetch,i=e.navigate;return _.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Yt(e,t);a.navigate===!1?await r(a.fetcherKey||Pn(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function In(e,{relative:t}={}){let{basename:n}=_.useContext(Ge),r=_.useContext(qe);D(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...lt(e||`.`,{relative:t})},o=nt();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Ee([n,a.pathname])),M(a)}var Ln=`react-router-scroll-positions`,Rn={};function zn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:ve(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Bn({getKey:e,storageKey:t}={}){let{router:n}=An(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=jn(`useScrollRestoration`),{basename:a}=_.useContext(Ge),o=nt(),s=Et(),c=Tt();_.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Vn(_.useCallback(()=>{if(c.state===`idle`){let t=zn(o,s,a,e);Rn[t]=window.scrollY}try{sessionStorage.setItem(t||Ln,JSON.stringify(Rn))}catch(e){O(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(_.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Ln);e&&(Rn=JSON.parse(e))}catch{}},[t]),_.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Rn,()=>window.scrollY,e?(t,n)=>zn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),_.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{O(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Vn(e,t){let{capture:n}=t||{};_.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Hn(e,{relative:t}={}){let n=_.useContext(He);D(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=An(`useViewTransitionState`),i=lt(e,{relative:t});if(!n.isTransitioning)return!1;let a=ve(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=ve(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ge(i.pathname,o)!=null||ge(i.pathname,a)!=null}var Un=o((e=>{var t=d(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INT
10ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),Wn=o(((e,t)=>{t.exports=Un()}));function Gn(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Kn=/^((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|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|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|popover|popoverTarget|popoverTargetAction|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)-.*))$/,qn=Gn(function(e){return Kn.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Jn=!1;function Yn(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]}function Xn(e){var t=document.createElement(`style`);return t.setAttribute(`data-emotion`,e.key),e.nonce!==void 0&&t.setAttribute(`nonce`,e.nonce),t.appendChild(document.createTextNode(``)),t.setAttribute(`data-s`,``),t}var Zn=function(){function e(e){var t=this;this._insertTag=function(e){var n=t.tags.length===0?t.insertionPoint?t.insertionPoint.nextSibling:t.prepe
vendor: 8,545 bytes, line 10
10nd?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling;t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=e.speedy===void 0?!Jn: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(Xn(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=Yn(t);try{n.insertRule(e,n.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode?.removeChild(e)}),this.tags=[],this.ctr=0},e}(),Qn=`-ms-`,$n=`-moz-`,er=`-webkit-`,tr=`comm`,nr=`rule`,rr=`decl`,ir=`@import`,ar=`@keyframes`,or=`@layer`,sr=Math.abs,cr=String.fromCharCode,lr=Object.assign;function ur(e,t){return hr(e,0)^45?(((t<<2^hr(e,0))<<2^hr(e,1))<<2^hr(e,2))<<2^hr(e,3):0}function dr(e){return e.trim()}function fr(e,t){return(e=t.exec(e))?e[0]:e}function pr(e,t,n){return e.replace(t,n)}function mr(e,t){return e.indexOf(t)}function hr(e,t){return e.charCodeAt(t)|0}function gr(e,t,n){return e.slice(t,n)}function _r(e){return e.length}function vr(e){return e.length}function yr(e,t){return t.push(e),e}function br(e,t){return e.map(t).join(``)}var xr=1,Sr=1,Cr=0,wr=0,Tr=0,Er=``;function Dr(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:xr,column:Sr,length:o,return:``}}function Or(e,t){return lr(Dr(``,null,null,``,null,null,0),e,{length:-e.length},t)}function kr(){return Tr}function Ar(){return Tr=wr>0?hr(Er,--wr):0,Sr--,Tr===10&&(Sr=1,xr--),Tr}function jr(){return Tr=wr<Cr?hr(Er,wr++):0,Sr++,Tr===10&&(Sr=1,xr++),Tr}function Mr(){return hr(Er,wr)}function Nr(){return wr}function Pr(e,t){return gr(Er,e,t)}function Fr(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 Ir(e){return xr=Sr=1,Cr=_r(Er=e),wr=0,[]}function Lr(e){return Er=``,e}function Rr(e){return dr(Pr(wr-1,Vr(e===91?e+2:e===40?e+1:e)))}function zr(e){for(;(Tr=Mr())&&Tr<33;)jr();return Fr(e)>2||Fr(Tr)>3?``:` `}function Br(e,t){for(;--t&&jr()&&!(Tr<48||Tr>102||Tr>57&&Tr<65||Tr>70&&Tr<97););return Pr(e,Nr()+(t<6&&Mr()==32&&jr()==32))}function Vr(e){for(;jr();)switch(Tr){case e:return wr;case 34:case 39:e!==34&&e!==39&&Vr(Tr);break;case 40:e===41&&Vr(e);break;case 92:jr();break}return wr}function Hr(e,t){for(;jr()&&e+Tr!==57&&!(e+Tr===84&&Mr()===47););return`/*`+Pr(t,wr-1)+`*`+cr(e===47?e:jr())}function Ur(e){for(;!Fr(Mr());)jr();return Pr(e,wr)}function Wr(e){return Lr(Gr(``,null,null,null,[``],e=Ir(e),0,[0],e))}function Gr(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=jr()){case 40:if(m!=108&&hr(C,d-1)==58){mr(C+=pr(Rr(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=Rr(v);break;case 9:case 10:case 13:case 32:C+=zr(m);break;case 92:C+=Br(Nr()-1,7);continue;case 47:switch(Mr()){case 42:case 47:yr(qr(Hr(jr(),Nr()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=_r(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=pr(C,/\f/g,``)),p>0&&_r(C)-d&&yr(p>32?Jr(C+`;`,r,n,d-1):Jr(pr(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(yr(S=Kr(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123)if(u===0)Gr(C,t,S,S,b,a,d,s,x);else switch(f===99&&hr(C,3)===110?100:f){case 100:case 108:case 109:case 115:Gr(e,S,S,r&&yr(Kr(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:Gr(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+_r(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&Ar()==125)continue}switch(C+=cr(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(_r(C)-1)*_,_=1;break;case 64:Mr()===45&&(C+=Rr(jr())),f=Mr(),u=d=_r(y=C+=Ur(Nr())),v++;break;case 45:m===45&&_r(C)==2&&(h=0)}}return a}function Kr(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=vr(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=gr(e,d+1,d=sr(h=o[m])),y=e;_<p;++_)(y=dr(h>0?f[_]+` `+v:pr(v,/&\f/g,f[_])))&&(c[g++]=y);return Dr(e,t,n,i===0?nr:s,c,l,u)}function qr(e,t,n){return Dr(e,t,n,tr,cr(kr()),gr(e,2,-2),0)}function Jr(e,t,n,r){return Dr(e,t,n,rr,gr(e,0,r),gr(e,r+1,-1),r)}function Yr(e,t){for(var n=``,r=vr(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function Xr(e,t,n,r){switch(e.type){case or:if(e.children.length)break;case ir:case rr:return e.return=e.return||e.value;case tr:return``;case ar:return e.return=e.value+`{`+Yr(e.children,r)+`}`;case nr:e.value=e.props.join(`,`)}return _r(n=Yr(e.children,r))?e.return=e.value+`{`+n+`}`:``}function Zr(e){var t=vr(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}function Qr(e){return function(t){t.root||(t=t.return)&&e(t)}}var $r=function(e,t,n){for(var r=0,i=0;r=i,i=Mr(),r===38&&i===12&&(t[n]=1),!Fr(i);)jr();return Pr(e,wr)},ei=function(e,t){var n=-1,r=44;do switch(Fr(r)){case 0:r===38&&Mr()===12&&(t[n]=1),e[n]+=$r(wr-1,t,n);break;case 2:e[n]+=Rr(r);break;case 4:if(r===44){e[++n]=Mr()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=cr(r)}while(r=jr());return e},ti=function(e,t){return Lr(ei(Ir(e),t))},ni=new WeakMap,ri=function(e){if(!(e.type!==`rule`||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!==`rule`;)if(n=n.parent,!n)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!ni.get(n))&&!r){ni.set(e,!0);for(var i=[],a=ti(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var l=0;l<o.length;l++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+` `+a[s]}}},ii=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}};function ai(e,t){switch(ur(e,t)){case 5103:return er+`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 er+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return er+e+$n+e+Qn+e+e;case 6828:case 4268:return er+e+Qn+e+e;case 6165:return er+e+Qn+`flex-`+e+e;case 5187:return er+e+pr(e,/(\w+).+(:[^]+)/,er+`box-$1$2`+Qn+`flex-$1$2`)+e;case 5443:return er+e+Qn+`flex-item-`+pr(e,/flex-|-self/,``)+e;case 4675:return er+e+Qn+`flex-line-pack`+pr(e,/align-content|flex-|-self/,``)+e;case 5548:return er+e+Qn+pr(e,`shrink`,`negative`)+e;case 5292:return er+e+Qn+pr(e,`basis`,`preferred-size`)+e;case 6060:return er+`box-`+pr(e,`-grow`,``)+er+e+Qn+pr(e,`grow`,`positive`)+e;case 4554:return er+pr(e,/([^-])(transform)/g,`$1`+er+`$2`)+e;case 6187:return pr(pr(pr(e,/(zoom-|grab)/,er+`$1`),/(image-set)/,er+`$1`),e,``)+e;case 5495:case 3959:return pr(e,/(image-set\([^]*)/,er+"$1$`$1");case 4968:return pr(pr(e,/(.+:)(flex-)?(.*)/,er+`box-pack:$3`+Qn+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+er+e+e;case 4095:case 3583:case 4068:case 2532:return pr(e,/(.+)-inline(.+)/,er+`$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(_r(e)-1-t>6)switch(hr(e,t+1)){case 109:if(hr(e,t+4)!==45)break;case 102:return pr(e,/(.+:)(.+)-([^]+)/,`$1`+er+`$2-$3$1`+$n+(hr(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~mr(e,`stretch`)?ai(pr(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(hr(e,t+1)!==115)break;case 6444:switch(hr(e,_r(e)-3-(~mr(e,`!important`)&&10))){case 107:return pr(e,`:`,`:`+er)+e;case 101:return pr(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+er+(hr(e,14)===45?`inline-`:``)+`box$3$1`+er+`$2$3$1`+Qn+`$2box$3`)+e}break;case 5936:switch(hr(e,t+11)){case 114:return er+e+Qn+pr(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return er+e+Qn+pr(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return er+e+Qn+pr(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return er+e+Qn+e+e}return e}var oi=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case rr:e.return=ai(e.value,e.length);break;case ar:return Yr([Or(e,{value:pr(e.value,`@`,`@`+er)})],r);case nr:if(e.length)return br(e.props,function(t){switch(fr(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return Yr([Or(e,{props:[pr(t,/:(read-\w+)/,`:`+$n+`$1`)]})],r);case`::placeholder`:return Yr([Or(e,{props:[pr(t,/:(plac\w+)/,`:`+er+`input-$1`)]}),Or(e,{props:[pr(t,/:(plac\w+)/,`:`+$n+`$1`)]}
vendor: 9,823 bytes, line 10
10),Or(e,{props:[pr(t,/:(plac\w+)/,Qn+`input-$1`)]})],r)}return``})}}],eee=function(e){var t=e.key;if(t===`css`){var n=document.querySelectorAll(`style[data-emotion]:not([data-s])`);Array.prototype.forEach.call(n,function(e){e.getAttribute(`data-emotion`).indexOf(` `)!==-1&&(document.head.appendChild(e),e.setAttribute(`data-s`,``))})}var r=e.stylisPlugins||oi,i={},a,o=[];a=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++)i[t[n]]=!0;o.push(e)});var s,c=[ri,ii],l,u=[Xr,Qr(function(e){l.insert(e)})],d=Zr(c.concat(r,u)),f=function(e){return Yr(Wr(e),d)};s=function(e,t,n,r){l=n,f(e?e+`{`+t.styles+`}`:t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new Zn({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(o),p},si=o((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),ci=o(((e,t)=>{t.exports=si()})),li=o(((e,t)=>{var n=ci(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[n.ForwardRef]=a,s[n.Memo]=o;function c(e){return n.isMemo(e)?o:s[e.$$typeof]||r}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function h(e,t,n){if(typeof t!=`string`){if(m){var r=p(t);r&&r!==m&&h(e,r,n)}var a=u(t);d&&(a=a.concat(d(t)));for(var o=c(e),s=c(t),g=0;g<a.length;++g){var _=a[g];if(!i[_]&&!(n&&n[_])&&!(s&&s[_])&&!(o&&o[_])){var v=f(t,_);try{l(e,_,v)}catch{}}}}return e}t.exports=h})),ui=!0;function di(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var fi=function(e,t,n){var r=e.key+`-`+t.name;(n===!1||ui===!1)&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},pi=function(e,t,n){fi(e,t,n);var r=e.key+`-`+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?`.`+r:``,i,e.sheet,!0),i=i.next;while(i!==void 0)}};function mi(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var hi={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,scale: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},gi=!1,_i=/[A-Z]|^ms/g,vi=/_EMO_([^_]+?)_([^]*?)_EMO_/g,yi=function(e){return e.charCodeAt(1)===45},bi=function(e){return e!=null&&typeof e!=`boolean`},xi=Gn(function(e){return yi(e)?e:e.replace(_i,`-$&`).toLowerCase()}),Si=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(vi,function(e,t,n){return Di={name:t,styles:n,next:Di},t})}return hi[e]!==1&&!yi(e)&&typeof t==`number`&&t!==0?t+`px`:t},Ci=`Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.`;function wi(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return Di={name:i.name,styles:i.styles,next:Di},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)Di={name:o.name,styles:o.styles,next:Di},o=o.next;return a.styles+`;`}return Ti(e,t,n);case`function`:if(e!==void 0){var s=Di,c=n(e);return Di=s,wi(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function Ti(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=wi(e,t,n[i])+`;`;else for(var a in n){var o=n[a];if(typeof o!=`object`){var s=o;t!=null&&t[s]!==void 0?r+=a+`{`+t[s]+`}`:bi(s)&&(r+=xi(a)+`:`+Si(a,s)+`;`)}else{if(a===`NO_COMPONENT_SELECTOR`&&gi)throw Error(Ci);if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)bi(o[c])&&(r+=xi(a)+`:`+Si(a,o[c])+`;`);else{var l=wi(e,t,o);switch(a){case`animation`:case`animationName`:r+=xi(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}}return r}var Ei=/label:\s*([^\s;{]+)\s*(;|$)/g,Di;function Oi(e,t,n){if(e.length===1&&typeof e[0]==`object`&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i=``;Di=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=wi(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=wi(n,t,e[o]),r&&(i+=a[o]);Ei.lastIndex=0;for(var s=``,c;(c=Ei.exec(i))!==null;)s+=`-`+c[1];return{name:mi(i)+s,styles:i,next:Di}}var ki=function(e){return e()},Ai=_.useInsertionEffect?_.useInsertionEffect:!1,ji=Ai||ki,Mi=Ai||_.useLayoutEffect,Ni=_.createContext(typeof HTMLElement<`u`?eee({key:`css`}):null);Ni.Provider;var Pi=function(e){return(0,_.forwardRef)(function(t,n){return e(t,(0,_.useContext)(Ni),n)})},Fi=_.createContext({}),Ii={}.hasOwnProperty,Li=`__EMOTION_TYPE_PLEASE_DO_NOT_USE__`,Ri=function(e,t){var n={};for(var r in t)Ii.call(t,r)&&(n[r]=t[r]);return n[Li]=e,n},zi=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return fi(t,n,r),ji(function(){return pi(t,n,r)}),null},Bi=Pi(function(e,t,n){var r=e.css;typeof r==`string`&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Li],a=[r],o=``;typeof e.className==`string`?o=di(t.registered,a,e.className):e.className!=null&&(o=e.className+` `);var s=Oi(a,void 0,_.useContext(Fi));o+=t.key+`-`+s.name;var c={};for(var l in e)Ii.call(e,l)&&l!==`css`&&l!==Li&&(c[l]=e[l]);return c.className=o,n&&(c.ref=n),_.createElement(_.Fragment,null,_.createElement(zi,{cache:t,serialized:s,isStringTag:typeof i==`string`}),_.createElement(i,c))});li();var Vi=function(e,t){var n=arguments;if(t==null||!Ii.call(t,`css`))return _.createElement.apply(void 0,n);var r=n.length,i=Array(r);i[0]=Bi,i[1]=Ri(e,t);for(var a=2;a<r;a++)i[a]=n[a];return _.createElement.apply(null,i)};(function(e){var t;t||=e.JSX||={}})(Vi||={});var Hi=Pi(function(e,t){var n=e.styles,r=Oi([n],void 0,_.useContext(Fi)),i=_.useRef();return Mi(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}),a=!1,o=document.querySelector(`style[data-emotion="`+e+` `+r.name+`"]`);return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),o!==null&&(a=!0,o.setAttribute(`data-emotion`,e),n.hydrate([o])),i.current=[n,a],function(){n.flush()}},[t]),Mi(function(){var e=i.current,n=e[0];if(e[1]){e[1]=!1;return}r.next!==void 0&&pi(t,r.next,!0),n.tags.length&&(n.before=n.tags[n.tags.length-1].nextElementSibling,n.flush()),t.insert(``,r,n,!1)},[t,r.name]),null});
10function Ui(...e){return function(...t){e.forEach(e=>e?.(...t))}}var Wi=(...e)=>e.map(e=>e?.trim?.()).filter(Boolean).join(` `),Gi=/^on[A-Z]/;function Ki(...e){let t={};for(let n of e){for(let e in t){if(Gi.test(e)&&typeof t[e]==`function`&&typeof n[e]==`function`){t[e]=Ui(t[e],n[e]);continue}if(e===`className`||e===`class`){t[e]=Wi(t[e],n[e]);continue}if(e===`style`){t[e]=Object.assign({},t[e]??{},n[e]??{});continue}t[e]=n[e]===void 0?t[e]:n[e]}for(let e in n)t[e]===void 0&&(t[e]=n[e])}return t}var qi=parseInt(`18.3.1`.split(`.`)[0],10)>=19;function Ji(e,t){if(e!=null){if(typeof e==`function`)return e(t);try{e.current=t}catch{throw Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Yi(...e){let t=e.filter(e=>e!=null);if(qi){let e=new Map;return n=>(t.forEach(t=>{let r=Ji(t,n);r&&e.set(t,r)}),()=>{t.forEach(t=>{let n=e.get(t);n&&typeof n==`function`?n():Ji(t,null)}),e.clear()})}else return e=>{t.forEach(t=>{Ji(t,e)})}}function Xi(e){let t=Object.assign({},e);for(let e in t)t[e]===void 0&&delete t[e];return t}var Zi=e=>typeof e==`object`&&!!e&&!Array.isArray(e),Qi=e=>typeof e==`string`,$i=e=>typeof e==`function`,ea=(...e)=>{let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(!Qi(r))continue;let i=r.trim();i&&t.push(i)}return t.join(` `)};function ta(e){return e.default||e}function na(e){let t=`18.3.1`;return!Qi(t)||t.startsWith(`18.`)?e?.ref:e?.props?.ref}var ra=(...e)=>{let t=e.reduce((e,t)=>(t?.forEach(t=>e.add(t)),e),new Set([]));return Array.from(t)};function ia(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function aa(e={}){let{name:t,strict:n=!0,hookName:r=`useContext`,providerName:i=`Provider`,errorMessage:a,defaultValue:o}=e,s=(0,_.createContext)(o);s.displayName=t;function c(){let e=(0,_.useContext)(s);if(!e&&n){let e=Error(a??ia(r,i));throw e.name=`ContextError`,Error.captureStackTrace?.(e,c),e}return e}return[s.Provider,c,s]}var B=Wn(),[oa,sa]=aa({name:`ChakraContext`,strict:!0,providerName:`<ChakraProvider />`});function ca(e){let{value:t,children:n}=e;return(0,B.jsxs)(oa,{value:t,children:[!t._config.disableLayers&&(0,B.jsx)(Hi,{styles:t.layers.atRule}),(0,B.jsx)(Hi,{styles:t._global}),n]})}var la=(e,t)=>{let n={},r={},i=Object.keys(e);for(let a of i)t(a)?r[a]=e[a]:n[a]=e[a];return[r,n]},ua=(e,t)=>la(e,$i(t)?t:e=>t.includes(e)),tee=new Set([`htmlWidth`,`htmlHeight`,`htmlSize`,`htmlTranslate`]);function da(e){return typeof e==`string`&&tee.has(e)}function fa(e,t,n){let{css:r,isValidProperty:i}=sa(),{children:a,...o}=e,s=(0,_.useMemo)(()=>{let[e,r]=ua(o,e=>n(e,t.variantKeys)),[a,s]=ua(r,t.variantKeys),[c,l]=ua(s,i);return{forwardedProps:e,variantProps:a,styleProps:c,elementProps:l}},[t.variantKeys,n,o,i]),{css:c,...l}=s.styleProps,u=(0,_.useMemo)(()=>{let e={...s.variantProps},n=t.variantKeys.includes(`colorPalette`),r=t.variantKeys.includes(`orientation`);return n||(e.colorPalette=o.colorPalette),r||(e.orientation=o.orientation),t(e)},[t,s.variantProps,o.colorPalette,o.orientation]);return{styles:(0,_.useMemo)(()=>r(u,...pa(c),l),[r,u,c,l]),props:{...s.forwardedProps,...s.elementProps,children:a}}}var pa=e=>(Array.isArray(e)?e:[e]).filter(Boolean).flat(),ma=ta(qn),ha=e=>e!==`theme`,ga=(e,t,n)=>{let r;if(t){let n=t.shouldForwardProp;r=e.__emotion_forwardProp&&n?t=>e.__emotion_forwardProp(t)&&n(t):n}return typeof r!=`function`&&n&&(r=e.__emotion_forwardProp),r},_a=typeof document<`u`,va=({cache:e,serialized:t,isStringTag:n})=>{fi(e,t,n);let r=ji(()=>pi(e,t,n));if(!_a&&r!==void 0){let n=t.name,i=t.next;for(;i!==void 0;)n=ea(n,i.name),i=i.next;return(0,B.jsx)(`style`,{"data-emotion":ea(e.key,n),dangerouslySetInnerHTML:{__html:r},nonce:e.sheet.nonce})}return null},ya={path:[`d`],text:[`x`,`y`],circle:[`cx`,`cy`,`r`],rect:[`width`,`height`,`x`,`y`,`rx`,`ry`],ellipse:[`cx`,`cy`,`rx`,`ry`],g:[`transform`],stop:[`offset`,`stopOpacity`]},ba=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),xa=((e,t={},n={})=>{if(ba(ya,e)){n.forwardProps||=[];let t=ya[e];n.forwardProps=ra([...n.forwardProps,...t])}let r=e.__emotion_real===e,i=r&&e.__emotion_base||e,a,o;n!==void 0&&(a=n.label,o=n.target);let s=[],c=Pi((a,c,l)=>{let{cva:u,isValidProperty:d}=sa(),f=t.__cva__?t:u(t),p=wa(e.__emotion_cva,f);!n.shouldForwardProp&&n.forwardProps&&(n.shouldForwardProp=(e=>(t,n)=>e.includes(t)?!0:!n?.includes(t)&&!d(t))(n.forwardProps));let m=ga(e,n,r)||((t,n)=>{let r=typeof e==`string`&&e.charCodeAt(0)>96?ma:ha,i=!n?.includes(t)&&!d(t);return r(t)&&i}),{props:h,styles:g}=fa(_.useMemo(()=>Object.assign({},n.defaultProps,Xi(a)),[a]),p,m),v=``,y=[g],b=h;if(h.theme==null){b={};for(let e in h)b[e]=h[e];b.theme=_.useContext(Fi)}typeof h.className==`string`?v=di(c.registered,y,h.className):h.className!=null&&(v=ea(v,h.className));let x=Oi(s.concat(y),c.registered,b);x.styles&&(v=ea(v,`${c.key}-${x.name}`)),o!==void 0&&(v=ea(v,o));let S=!m(`as`),C=S&&h.as||i,w={};for(let e in h)if(!(S&&e===`as`)){if(da(e)){let t=e.replace(`html`,``).toLowerCase();w[t]=h[e];continue}m(e)&&(w[e]=h[e])}let T=v.trim();T?w.className=T:Reflect.deleteProperty(w,`className`),w.ref=l;let E=n.forwardAsChild||n.forwardProps?.includes(`asChild`);if(h.asChild&&!E){let e=_.isValidElement(h.children)?_.Children.only(h.children):_.Children.toArray(h.children).find(_.isValidElement);if(!e)throw Error(`[chakra-ui > factory] No valid child found`);C=e.type,w.children=null,Reflect.deleteProperty(w,`asChild`),w=Ki(w,e.props),w.ref=Yi(l,na(e))}return w.as&&E?(w.as=void 0,(0,B.jsxs)(_.Fragment,{children:[(0,B.jsx)(va,{cache:c,serialized:x,isStringTag:typeof C==`string`}),(0,B.jsx)(C,{asChild:!0,...w,children:(0,B.jsx)(h.as,{children:w.
10children})})]})):(0,B.jsxs)(_.Fragment,{children:[(0,B.jsx)(va,{cache:c,serialized:x,isStringTag:typeof C==`string`}),(0,B.jsx)(C,{...w})]})});return c.displayName=a===void 0?`chakra(${typeof i==`string`?i:i.displayName||i.name||`Component`})`:a,c.__emotion_real=c,c.__emotion_base=i,c.__emotion_forwardProp=n.shouldForwardProp,c.__emotion_cva=t,Object.defineProperty(c,"toString",{value(){return`.${o}`}}),c}).bind(),Sa=new Map,Ca=new Proxy(xa,{apply(e,t,n){return xa(...n)},get(e,t){return Sa.has(t)||Sa.set(t,xa(t)),Sa.get(t)}}),wa=(e,t)=>e&&!t?e:!e&&t?t:e.merge(t),V=Ca(`div`);V.displayName=`Box`;var Ta=(0,_.forwardRef)(function(e,t){let{size:n,...r}=e;return(0,B.jsx)(V,{...r,ref:t,boxSize:n,css:{display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,flexGrow:0,...e.css}})});Ta.displayName=`Square`;var Ea=(0,_.forwardRef)(function(e,t){let{size:n,...r}=e;return(0,B.jsx)(Ta,{size:n,ref:t,borderRadius:`9999px`,...r})});Ea.displayName=`Circle`;function Da(e){if(typeof e!=`string`)return e.displayName||e.name}function Oa(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function ka(e,t){return e+Oa(t)}function Aa(e,t){if(t)return e+Oa(t)}var ja=Object.freeze({}),Ma=Object.freeze({});function Na(e){let{key:t,recipe:n}=e,r=sa();return(0,_.useMemo)(()=>{let e=n||(t==null?{}:r.getRecipe(t));return r.cva(structuredClone(e))},[t,n,r])}function Pa(e){let{key:t,recipe:n}=e,r=Oa(t||n.className||`Component`),[i,a]=aa({strict:!1,name:`${r}PropsContext`,providerName:`${r}PropsContext`});function o(e){let{unstyled:r,...i}=e,a=Na({key:t,recipe:i.recipe||n}),[o,s]=(0,_.useMemo)(()=>a.splitVariantProps(i),[a,i]);return{styles:r?ja:a(o),className:a.className,props:s}}let s=(e,t)=>{let{displayName:n,...i}=t??{},s=Ca(e,{},i),c=(0,_.forwardRef)((e,t)=>{let n=a(),r=(0,_.useMemo)(()=>Ki(n,e),[e,n]),{styles:i,className:c,props:l}=o(r);return(0,B.jsx)(s,{...l,ref:t,css:[i,r.css],className:ea(c,r.className)})});return c.displayName=n??r??Da(e),c};function c(){return i}return{withContext:s,PropsProvider:i,withPropsProvider:c,usePropsContext:a,useRecipeResult:o}}var Fa=(0,_.forwardRef)(function(e,t){let{templateAreas:n,column:r,row:i,autoFlow:a,autoRows:o,templateRows:s,autoColumns:c,templateColumns:l,inline:u,...d}=e;return(0,B.jsx)(Ca.div,{...d,ref:t,css:[{display:u?`inline-grid`:`grid`,gridTemplateAreas:n,gridAutoColumns:c,gridColumn:r,gridRow:i,gridAutoFlow:a,gridAutoRows:o,gridTemplateRows:s,gridTemplateColumns:l},e.css]})});Fa.displayName=`Grid`;function Ia(e){return e==null?[]:Array.isArray(e)?e:[e]}var La=e=>e[0],Ra=e=>e[e.length-1],za=e=>e?.constructor.name===`Array`,Ba=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Va(e[n],t[n]))return!1;return!0},Va=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual==`function`&&typeof t?.isEqual==`function`)return e.isEqual(t);if(typeof e==`function`&&typeof t==`function`)return e.toString()===t.toString();if(za(e)&&za(t))return Ba(Array.from(e),Array.from(t));if(typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(t??Object.create(null)),r=n.length;for(let t=0;t<r;t++)if(!Reflect.has(e,n[t]))return!1;for(let i=0;i<r;i++){let r=n[i];if(!Va(e[r],t[r]))return!1}return!0},Ha=e=>typeof e==`object`&&!!e,Ua=e=>typeof e==`string`,Wa=e=>typeof e==`function`,Ga=e=>e==null,Ka=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),qa=e=>Object.prototype.toString.call(e),Ja=Function.prototype.toString,Ya=Ja.call(Object),Xa=e=>{if(!Ha(e)||qa(e)!=`[object Object]`||$a(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=Ka(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Ja.call(n)==Ya},Za=e=>typeof e==`object`&&!!e&&`$$typeof`in e&&`props`in e,Qa=e=>typeof e==`object`&&!!e&&`__v_isVNode`in e,$a=e=>Za(e)||Qa(e),eo=e=>e(),to=()=>{},no=(...e)=>(...t)=>{e.forEach(function(e){e?.(...t)})},{floor:ro,abs:io,round:ao,min:oo,max:so,pow:co,sign:lo}=Math,uo=e=>Number.isNaN(e),fo=e=>uo(e)?0:e,po=(e,t,n)=>e===0?n:t[e-1],mo=(e,t,n)=>e===t.length-1?n:t[e+1],ho=(e,t,n)=>{let r=fo(e);return(t==null||r>=t)&&(n==null||r<=n)},go=(e,t,n)=>ao((fo(e)-t)/n)*n+t,_o=(e,t,n)=>oo(so(fo(e),t),n),vo=e=>_o(e,0,1),yo=(e,t,n)=>(fo(e)-t)/(n-t),bo=(e,t,n,r)=>_o(go(e*(n-t)+t,t,r),t,n),xo=(e,t)=>{let n=e,r=t.toString(),i=r.indexOf(`.`),a=i>
10=0?r.length-i:0;if(a>0){let e=co(10,a);n=ao(n*e)/e}return n},So=(e,t,n,r)=>{let i=t==null?0:Number(t),a=Number(n),o=(e-i)%r,s=io(o)*2>=r?e+lo(o)*(r-io(o)):e-o;if(s=xo(s,r),!uo(i)&&s<i)s=i;else if(!uo(a)&&s>a){let e=ro((a-i)/r),t=i+e*r;s=e<=0||t<i?a:t}return xo(s,r)},Co=(e,t,n)=>e[t]===n?e:[...e.slice(0,t),n,...e.slice(t+1)];function wo(e,t){let n=po(e,t.values,t.min),r=mo(e,t.values,t.max),i=t.values.slice();return function(a){let o=So(a,n,r,t.step);return i=Co(i,e,a),i[e]=o,i}}function To(e,t){let n=t.values[e]+t.step;return wo(e,t)(n)}function Eo(e,t){let n=t.values[e]-t.step;return wo(e,t)(n)}var Do=(e,t,n,r)=>e.map((i,a)=>({min:a===0?t:e[a-1]+r,max:a===e.length-1?n:e[a+1]-r,value:i})),Oo=(e,t)=>{let[n,r]=e,[i,a]=t;return e=>n===r||i===a?i:i+(a-i)/(r-n)*(e-n)},ko=e=>typeof e==`number`?`${e}px`:e;function Ao(e){if(!Xa(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(e=>typeof e==`string`),n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=Ao(t))}return n}function jo(e,t){let n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=t)}return n}function Mo(e,t=Object.is){let n={...e},r=new Set,i=e=>(r.add(e),()=>r.delete(e)),a=()=>{r.forEach(e=>e())};return{subscribe:i,get:e=>n[e],set:(e,r)=>{t(n[e],r)||(n[e]=r,a())},update:e=>{let r=!1;for(let i in e){let a=e[i];a!==void 0&&!t(n[i],a)&&(n[i]=a,r=!0)}r&&a()},snapshot:()=>({...n})}}function No(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function Po(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function Fo(e,t){if(e==null)throw Error(t())}function Io(e,t,n){let r=[];for(let n of t)e[n]??r.push(n);if(r.length>0)throw Error(`[zag-js${n?` > ${n}`:``}] missing required props: ${r.join(`, `)}`)}function Lo(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ro(e={}){let{name:t,strict:n=!0,hookName:r=`useContext`,providerName:i=`Provider`,errorMessage:a,defaultValue:o}=e,s=(0,_.createContext)(o);s.displayName=t;function c(){let e=(0,_.useContext)(s);if(!e&&n){let e=Error(a??Lo(r,i));throw e.name=`ContextError`,Ka(Error,`captureStackTrace`)&&Wa(Error.captureStackTrace)&&Error.captureStackTrace(e,c),e}return e}return[s.Provider,c,s]}var[zo,Bo]=Ro({name:`EnvironmentContext`,hookName:`useEnvironmentContext`,providerName:`<EnvironmentProvider />`,strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}});function Vo(...e){return t=>{let n=[];for(let r of e)if(typeof r==`function`){let e=r(t);typeof e==`function`&&n.push(e)}else r&&(r.current=t);if(n.length)return()=>{for(let e of n)e()}}}var Ho=(...e)=>e.map(e=>e?.trim?.()).filter(Boolean).join(` `),Uo=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Wo=e=>{let t={},n;for(;n=Uo.exec(e);)t[n[1]]=n[2];return t},Go=(e,t)=>{if(Ua(e)){if(Ua(t))return`${e};${t}`;e=Wo(e)}else Ua(t)&&(t=Wo(t));return Object.assign({},e??{},t??{})};function Ko(...e){let t={};for(let n of e){if(!n)continue;for(let e in t){if(e.startsWith(`on`)&&typeof t[e]==`function`&&typeof n[e]==`function`){t[e]=no(n[e],t[e]);continue}if(e===`className`||e===`class`){t[e]=Ho(t[e],n[e]);continue}if(e===`style`){t[e]=Go(t[e],n[e]);continue}t[e]=n[e]===void 0?t[e]:n[e]}for(let e in n)t[e]===void 0&&(t[e]=n[e]);let e=Object.getOwnPropertySymbols(n);for(let r of e)t[r]=n[r]}return t}function qo(e,t,n){let r=[],i;return a=>{let o=e(a);return o.length!==r.length||o.some((e,t)=>!Va(r[t],e))?(r=o,i=t(o,a),n?.onChange?.(i),i):i}}var Jo=`.`,Yo=`#`,Xo=new WeakMap,Zo=new WeakMap;function Qo(e){return e.join(Jo)}function $o(e){return e.includes(Jo)}function es(e){return e.startsWith(Yo)}function ts(e){return e.startsWith(Jo)}function ns(e){return es(e)?e.slice(Yo.length):e}function rs(e,t){return e?`${e}${Jo}${t}`:t}function is(e){let t=new Map,n=new Map,r=(e,i)=>{t.set(e,i);let a=i.id;a&&(n.has(a)&&Po(`[zag-js] Duplicate state id: "${a}"`),n.set(a,e));let o=i.states;if(o){Fo(i.initial,()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`),i.initial in o||Po(`[zag-js] Compound state "${e}" has initial "${String(i.initial)}" which is not a child state`);for(let[t,n]of Object.entries(o))n&&r(rs(e,t),n)}};for(let[t,n]of Object.entries(e.states))n&&r(t,n);return{index:t,idIndex:n}}function as(e){let t=Xo.get(e);if(t)return t;let{index:n,idIndex:r}=is(e);return Xo.set(e,n),Zo.set(e,r),n}function os(e,t){return as(e),Zo.get(e)?.get(t)}
10function ss(e){return e?String(e).split(Jo).filter(Boolean):[]}function cs(e,t){if(!t)return[];let n=as(e),r=ss(t),i=[],a=[];for(let e of r){a.push(e);let t=Qo(a),r=n.get(t);if(!r)break;i.push({path:t,state:r})}return i}function ls(e,t){let n=as(e),r=ss(t);if(!r.length)return t;let i=[];for(let e of r){i.push(e);let r=Qo(i);if(!n.has(r))return t}let a=Qo(i),o=n.get(a);for(;o?.initial;){let e=`${a}${Jo}${o.initial}`,t=n.get(e);if(!t)break;a=e,o=t}return a}function us(e,t){return as(e).has(t)}function ds(e,t,n){let r=String(t);if(es(r)){let t=ns(r),n=os(e,t);return Fo(n,()=>`[zag-js] Unknown state id: "${t}"`),ls(e,n)}if(ts(r)&&n)return ls(e,rs(n,r.slice(1)));if(!$o(r)&&n){let t=ss(n);for(let n=t.length-1;n>=1;n--){let i=rs(t.slice(0,n).join(Jo),r);if(us(e,i))return ls(e,i)}if(us(e,r))return ls(e,r)}return ls(e,r)}function fs(e,t,n){let r=cs(e,t);for(let e=r.length-1;e>=0;e--){let t=r[e]?.state.on?.[n];if(t)return{transitions:t,source:r[e]?.path}}return{transitions:e.on?.[n],source:void 0}}function ps(e,t,n,r){let i=t?cs(e,t):[],a=cs(e,n),o=0;for(;o<i.length&&o<a.length&&i[o]?.path===a[o]?.path;)o+=1;let s=i.slice(o).reverse(),c=a.slice(o),l=i.at(-1)?.path===a.at(-1)?.path;return r&&l&&(s=i.slice().reverse(),c=a),{exiting:s,entering:c}}function ms(e,t){return e?e===t||e.startsWith(`${t}${Jo}`):!1}function hs(e,t,n){return cs(e,t).some(e=>e.state.tags?.includes(n))}function gs(){return{and:(...e)=>function(t){return e.every(e=>t.guard(e))},or:(...e)=>function(t){return e.some(e=>t.guard(e))},not:e=>function(t){return!t.guard(e)}}}function _s(e){return as(e),e}var vs=(e=>(e.NotStarted=`Not Started`,e.Started=`Started`,e.Stopped=`Stopped`,e))(vs||{}),ys=`__init__`,bs=Object.defineProperty,nee=(e,t,n)=>t in e?bs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xs=(e,t,n)=>nee(e,typeof t==`symbol`?t:t+``,n),Ss=()=>void 0,Cs=e=>typeof e==`object`&&!!e,ws=e=>e?``:void 0,Ts=e=>e?`true`:void 0,Es=1,Ds=9,Os=11,ks=e=>Cs(e)&&e.nodeType===Es&&typeof e.nodeName==`string`,As=e=>Cs(e)&&e.nodeType===Ds,js=e=>Cs(e)&&e===e.window,Ms=e=>ks(e)?e.localName||``:`#document`;function Ns(e){return[`html`,`body`,`#document`].includes(Ms(e))}var Ps=e=>Cs(e)&&e.nodeType!==void 0,Fs=e=>Ps(e)&&e.nodeType===Os&&`host`in e,Is=e=>ks(e)&&e.localName===`input`,Ls=e=>ks(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Rs(e){return e?Ws(e.getRootNode())===e:!1}var ree=/(textarea|select)/;function zs(e){if(e==null||!ks(e))return!1;try{return Is(e)&&e.selectionStart!=null||ree.test(e.localName)||e.isContentEditable||e.getAttribute(`contenteditable`)===`true`||e.getAttribute(`contenteditable`)===``}catch{return!1}}function Bs(e,t){if(!e||!t||!ks(e)||!Ps(t))return!1;if(ks(t)&&e===t||e.contains(t))return!0;let n=t.getRootNode?.();if(n&&Fs(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Vs(e){return As(e)?e:js(e)?e.document:e?.ownerDocument??document}function Hs(e){return Vs(e).documentElement}function Us(e){return Fs(e)?Us(e.host):As(e)?e.defaultView??window:ks(e)?e.ownerDocument?.defaultView??window:window}function Ws(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function Gs(e){if(Ms(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Fs(e)&&e.host||Hs(e);return Fs(t)?t.host:t}function Ks(e){let t;try{if(t=e.getRootNode({composed:!0}),As(t)||Fs(t))return t}catch{}return e.ownerDocument??document}var qs=new WeakMap;function Js(e){return qs.has(e)||qs.set(e,Us(e).getComputedStyle(e)),qs.get(e)}var Ys=new Set([`menu`,`listbox`,`dialog`,`grid`,`tree`,`region`]),Xs=e=>Ys.has(e),Zs=e=>e.getAttribute(`aria-controls`)?.split(` `)||[];function Qs(e,t){let n=new Set,r=Ks(e),i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=Zs(e);for(let e of a){if(!e||n.has(e))continue;n.add(e);let a=r.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;if(e&&Xs(e)&&!n&&(a===t||a.contains(t)||i(a)))return!0}}}return!1};return i(e)}function $s(e,t){let n=Ks(e),r=new Set,i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=Zs(e);for(let e of a){if(!e||r.has(e))continue;r.add(e);let a=n.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;e&&Ys.has(e)&&!n&&(t(a),i(a))}}}};i(e)}function ec(e){let t=new Set;return $s(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function tc(e){let t=e.getAttribute(`role`);return!!(t&&Ys.has(t))}function nc(e){return e.hasAttribute(`aria-controls`)&&e.getAttribute(`aria-expanded`)===`true`}function rc(e){return nc(e)?!0:!!e.querySelector?.(`[aria-controls][aria-expanded="true"]`)}function ic(e){if(!e.id)return!1;let t=Ks(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&tc(e))}var ac=()=>typeof document<`u`;function oc(){return navigator.userAgentData?.platform??navigator.platform}function sc(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}var cc=e=>ac()&&e.test(oc()),lc=e=>ac()&&e.test(sc()),uc=()=>ac()&&!!navigator.maxTouchPoints,dc=()=>cc(/^iPhone/i),fc=()=>cc(/^iPad/i)||mc()&&navigator.maxTouchPoints>1,pc=()=>dc()||fc(),mc=()=>cc(/^Mac/i),hc=()=>lc(/Android/i);function gc(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function _c(e){return gc(e)?.[0]??e.target}function vc(e){return Ec(e).isComposing||e.keyCode===229}
10function H(e){return e.pointerType===``&&e.isTrusted?!0:hc()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}var yc=e=>e.button===0,bc=e=>e.button===2||mc()&&e.ctrlKey&&e.button===0,xc=e=>e.ctrlKey||e.altKey||e.metaKey,Sc=e=>`touches`in e&&e.touches.length>0,Cc={Up:`ArrowUp`,Down:`ArrowDown`,Esc:`Escape`," ":`Space`,",":`Comma`,Left:`ArrowLeft`,Right:`ArrowRight`},wc={ArrowLeft:`ArrowRight`,ArrowRight:`ArrowLeft`};function Tc(e,t={}){let{dir:n=`ltr`,orientation:r=`horizontal`}=t,i=e.key;return i=Cc[i]??i,n===`rtl`&&r===`horizontal`&&i in wc&&(i=wc[i]),i}function Ec(e){return e.nativeEvent??e}var Dc=new Set([`PageUp`,`PageDown`]),Oc=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]);function kc(e){return e.ctrlKey||e.metaKey?.1:Dc.has(e.key)||e.shiftKey&&Oc.has(e.key)?10:1}function Ac(e,t=`client`){let n=Sc(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var jc=(e,t,n,r)=>{let i=typeof e==`function`?e():e;return i?.addEventListener(t,n,r),()=>{i?.removeEventListener(t,n,r)}};function Mc(e,t){let{type:n=`HTMLInputElement`,property:r=`value`}=t,i=Us(e)[n].prototype;return Object.getOwnPropertyDescriptor(i,r)??{}}function Nc(e){if(e.localName===`input`)return`HTMLInputElement`;if(e.localName===`textarea`)return`HTMLTextAreaElement`;if(e.localName===`select`)return`HTMLSelectElement`}function Pc(e,t,n=`value`){if(!e)return;let r=Nc(e);r&&Mc(e,{type:r,property:n}).set?.call(e,t),e.setAttribute(n,t)}function Fc(e,t){let{value:n,bubbles:r=!0}=t;if(!e)return;let i=Us(e);if(!(e instanceof i.HTMLInputElement))return;Pc(e,`${n}`);let a=new i.Event(`input`,{bubbles:r});e.dispatchEvent(Vc(a))}function Ic(e){return e.matches(`textarea, input, select, button`)}function Lc(e,t){if(!e)return;let n=Ic(e)?e.form:e.closest(`form`),r=e=>{e.defaultPrevented||t()};return n?.addEventListener(`reset`,r,{passive:!0}),()=>n?.removeEventListener(`reset`,r)}function Rc(e,t){let n=e?.closest(`fieldset`);if(!n)return;t(n.disabled);let r=new(Us(n)).MutationObserver(()=>t(n.disabled));return r.observe(n,{attributes:!0,attributeFilter:[`disabled`]}),()=>r.disconnect()}function iee(e,t){if(!e)return;let{onFieldsetDisabledChange:n,onFormReset:r}=t,i=[Lc(e,r),Rc(e,n)];return()=>i.forEach(e=>e?.())}var zc=Symbol.for(`zag.changeEvent`);function Bc(e){return Object.prototype.hasOwnProperty.call(e,zc)}function Vc(e){return Bc(e)||Object.defineProperty(e,zc,{value:!0}),e}var Hc=e=>ks(e)&&e.tagName===`IFRAME`,Uc=/^(audio|video|details)$/;function Wc(e){let t=e.getAttribute(`tabindex`);return t?parseInt(t,10):NaN}var Gc=e=>!Number.isNaN(Wc(e)),Kc=e=>Wc(e)<0;function qc(e){return Is(e)&&e.type===`radio`}function Jc(e){if(!qc(e)||!e.name||e.checked)return!0;let t=`input[type="radio"][name="${CSS.escape(e.name)}"]`,n=e.form??e.ownerDocument,r=Array.from(n.querySelectorAll(t)).filter(t=>t.form===e.form&&$c(t)),i=r.find(e=>e.checked);return i?i===e:r[0]===e}function Yc(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;let n=t(e);return(n===!0?e.shadowRoot:n)||null}function Xc(e,t,n){let r=[...e],i=[...e],a=new Set,o=new Map;e.forEach((e,t)=>o.set(e,t));let s=0;for(;s<i.length;){let e=i[s++];if(!e||a.has(e))continue;a.add(e);let c=Yc(e,t);if(c){let t=Array.from(c.querySelectorAll(Zc)).filter(n),a=o.get(e);if(a!==void 0){let e=a+1;r.splice(e,0,...t),t.forEach((t,n)=>{o.set(t,e+n)});for(let n=e+t.length;n<r.length;n++)o.set(r[n],n)}else{let e=r.length;r.push(...t),t.forEach((t,n)=>{o.set(t,e+n)})}i.push(...t)}}return r}var Zc=`input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type`,Qc=(e,t={})=>{if(!e)return[];let{includeContainer:n=!1,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(Zc));(n==1||n==`if-empty`&&i.length===0)&&ks(e)&&$c(e)&&i.unshift(e);let a=[];for(let e of i)if($c(e)){if(Hc(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...Qc(t,{getShadowRoot:r}));continue}a.push(e)}return r?Xc(a,r,$c):a};function $c(e){return!ks(e)||e.closest(`[inert]`)?!1:e.matches(Zc)&&Ls(e)}function el(e,t={}){if(!e)return[];let{includeContainer:n,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(Zc));n&&tl(e)&&i.unshift(e);let a=[];for(let e of i)if(tl(e)){if(Hc(e)&&e.contentDocument){let t=e.contentDocument.body;a.push(...el(t,{getShadowRoot:r}));continue}a.push(e)}if(r){let e=Xc(a,r,tl);return!e.length&&n?i:e}return!a.length&&n?i:a}function tl(e){return ks(e)&&e.tabIndex>0?!0:!$c(e)||Kc(e)?!1:Jc(e)}function nl(e){return e.tabIndex<0&&(Uc.test(e.localName)||zs(e))&&!Gc(e)?0:e.tabIndex}function rl(e){let{root:t,getInitialEl:n,filter:r,enabled:i=!0}=e;if(!i)return;let a=null;if(a||=typeof n==`function`?n():n,a||=t?.querySelector(`[data-autofocus],[autofocus]`),!a){let e=el(t);a=r?e.filter(r)[0]:e[0]}return a||t||void 0}var il=class e{constructor(){xs(this,`id`,null),xs(this,`fn_cleanup`),xs(this,`cleanup`,()=>{this.cancel()})}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=e?.()})}cancel(){this.id!==null&&(globalThis.cancelAnimationFrame(this.id
10),this.id=null),this.fn_cleanup?.(),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function al(e){let t=il.create();return t.request(e),t.cleanup}function ol(e){let t=new Set;function n(e){let n=globalThis.requestAnimationFrame(e);t.add(()=>globalThis.cancelAnimationFrame(n))}return n(()=>n(e)),function(){t.forEach(e=>e())}}function sl(e){let t=Gs(e);return Ns(t)?Vs(t).body:ks(t)&&dl(t)?t:sl(t)}function cl(e,t=[]){let n=sl(e),r=n===e.ownerDocument.body,i=Us(n);return r?t.concat(i,i.visualViewport||[],dl(n)?n:[]):t.concat(n,cl(n,[]))}var ll=/auto|scroll|overlay|hidden|clip/,ul=new Set([`inline`,`contents`]);function dl(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Us(e).getComputedStyle(e);return ll.test(t+r+n)&&!ul.has(i)}var fl=`default`,pl=``,ml=new WeakMap;function hl(e={}){let{target:t,doc:n}=e,r=n??document,i=r.documentElement;return pc()?(fl==="default"&&(pl=i.style.webkitUserSelect,i.style.webkitUserSelect=`none`),fl=`disabled`):t&&(ml.set(t,t.style.userSelect),t.style.userSelect=`none`),()=>gl({target:t,doc:r})}function gl(e={}){let{target:t,doc:n}=e,r=(n??document).documentElement;if(pc()){if(fl!==`disabled`)return;fl=`restoring`,setTimeout(()=>{ol(()=>{fl===`restoring`&&(r.style.webkitUserSelect===`none`&&(r.style.webkitUserSelect=pl||``),pl=``,fl=`default`)})},300)}else if(t&&ml.has(t)){let e=ml.get(t);t.style.userSelect===`none`&&(t.style.userSelect=e??``),t.getAttribute(`style`)===``&&t.removeAttribute(`style`),ml.delete(t)}}function _l(e={}){let{defer:t,target:n,...r}=e,i=t?al:e=>e(),a=[];return a.push(i(()=>{let e=typeof n==`function`?n():n;a.push(hl({...r,target:e}))})),()=>{a.forEach(e=>e?.())}}function vl(e,t){let{onPointerMove:n,onPointerUp:r}=t,i=e=>{let t=Ac(e);if(!(Math.sqrt(t.x**2+t.y**2)<(e.pointerType===`touch`?10:5))){if(e.pointerType===`mouse`&&e.buttons===0){a(e);return}n({point:t,event:e})}},a=e=>{r({point:Ac(e),event:e})},o=[jc(e,`pointermove`,i,!1),jc(e,`pointerup`,a,!1),jc(e,`pointercancel`,a,!1),jc(e,`contextmenu`,a,!1),_l({doc:e})];return()=>{o.forEach(e=>e())}}function yl(e,t){return Array.from(e?.querySelectorAll(t)??[])}function bl(e){let t=new WeakMap,n,r=new WeakMap,i=e=>n||(n=new e.ResizeObserver(e=>{for(let n of e){r.set(n.target,n);let e=t.get(n.target);if(e)for(let t of e)t(n)}}),n);return{observe:(n,r)=>{let a=t.get(n)||new Set;a.add(r),t.set(n,a);let o=Us(n);return i(o).observe(n,e),()=>{let e=t.get(n);e&&(e.delete(r),e.size===0&&(t.delete(n),i(o).unobserve(n)))}},unobserve:e=>{t.delete(e),n?.unobserve(e)}}}var xl=bl({box:`border-box`});function Sl(e,t){if(!e)return Ss;let n=Object.keys(t).reduce((t,n)=>(t[n]=e.style.getPropertyValue(n),t),{});return wl(n,t)?Ss:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute(`style`)})}function Cl(e,t,n){if(!e)return Ss;let r=e.style.getPropertyValue(t);return r===n?Ss:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute(`style`)})}function wl(e,t){return Object.keys(e).every(n=>e[n]===t[n])}function Tl(e,t,n){let{signal:r}=t;return[new Promise((t,i)=>{let a=setTimeout(()=>{i(Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener(`abort`,()=>{clearTimeout(a),i(new DOMException(`Promise aborted`,`AbortError`))}),e.then(e=>{r.aborted||(clearTimeout(a),t(e))}).catch(e=>{r.aborted||(clearTimeout(a),i(e))})}),()=>t.abort()]}function El(e,t){let{timeout:n,rootNode:r}=t,i=Us(r),a=Vs(r),o=new i.AbortController;return Tl(new Promise(t=>{let n=e();if(n){t(n);return}let r=new i.MutationObserver(()=>{let n=e();n&&n.isConnected&&(r.disconnect(),t(n))});r.observe(a.body,{childList:!0,subtree:!0})}),o,n)}function Dl(e){let t=()=>e.getRootNode?.()??document,n=()=>Vs(t()),r=()=>n().defaultView??window,i=()=>Ws(t()),a=e=>t().getElementById(e);return{...e,getRootNode:t,getDoc:n,getWin:r,getActiveElement:i,isActiveElement:Rs,getById:a}}function Ol(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var kl=e=>{let t=(0,_.memo)((0,_.forwardRef)((t,n)=>{let{asChild:r,children:i,...a}=t;if(!r)return(0,_.createElement)(e,{...a,ref:n},i);if(!(0,_.isValidElement)(i))return null;let o=_.Children.only(i),s=Ol(o);return(0,_.cloneElement)(o,{...Ko(a,o.props),ref:n?Vo(n,s):s})}));return t.displayName=e.displayName||e.name,t},Al=(()=>{let e=new Map;return new Proxy(kl,{apply(e,t,n){return kl(n[0])},get(t,n){let r=n;return e.has(r)||e.set(r,kl(r)),e.get(r)}})})(),[jl,Ml]=Ro({name:`LocaleContext`,hookName:`useLocaleContext`,providerName:`<LocaleProvider />`,strict:!1,defaultValue:{dir:`ltr`,locale:`en-US`}}),Nl=Object.defineProperty,Pl=(e,t)=>
10{let n={};for(var r in e)Nl(n,r,{get:e[r],enumerable:!0});return t||Nl(n,Symbol.toStringTag,{value:`Module`}),n},{withContext:Fl,PropsProvider:Il}=Pa({key:`heading`}),Ll=Fl(`h2`),Rl=()=>(e,t)=>t.reduce((e,t)=>{let[n,r]=e,i=t;return r[i]!==void 0&&(n[i]=r[i]),delete r[i],[n,r]},[{},{...e}]),zl=e=>Rl()(e,[`immediate`,`lazyMount`,`onExitComplete`,`present`,`skipAnimationOnMount`,`unmountOnExit`]);function Bl(e,t={}){let{sync:n=!1}=t,r=Vl(e);return(0,_.useCallback)((...e)=>n?queueMicrotask(()=>r.current?.(...e)):r.current?.(...e),[n,r])}function Vl(e){let t=(0,_.useRef)(e);return t.current=e,t}var Hl=globalThis.document===void 0?_.useEffect:_.useLayoutEffect;function Ul(e){let t=e().value??e().defaultValue,n=e().isEqual??Object.is,[r]=(0,_.useState)(t),[i,a]=(0,_.useState)(r),o=e().value!==void 0,s=(0,_.useRef)(i);s.current=o?e().value:i;let c=(0,_.useRef)(s.current);Hl(()=>{c.current=s.current},[i,e().value]);let l=t=>{let r=c.current,i=Wa(t)?t(r):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:i,prev:r}),o||a(i),n(i,r)||e().onChange?.(i,r)};function u(){return o?e().value:i}return{initial:r,ref:s,get:u,set(t){(e().sync?v.flushSync:eo)(()=>l(t))},invoke(t,n){e().onChange?.(t,n)},hash(t){return e().hash?.(t)??String(t)}}}Ul.cleanup=e=>{(0,_.useEffect)(()=>e,[])},Ul.ref=e=>{let t=(0,_.useRef)(e);return{get:()=>t.current,set:e=>{t.current=e}}};function Wl(e){let t=(0,_.useRef)(e);return{get(e){return t.current[e]},set(e,n){t.current[e]=n}}}var Gl=(e,t)=>{let n=(0,_.useRef)(!1),r=(0,_.useRef)(!1);(0,_.useEffect)(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e??[]).map(e=>typeof e==`function`?e():e)]),(0,_.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[])};function Kl(e,t={}){let n=(0,_.useMemo)(()=>{let{id:e,ids:n,getRootNode:r}=t;return Dl({id:e,ids:n,getRootNode:r})},[t]),r=(...t)=>{e.debug&&console.log(...t)},i=Jl(e.props?.({props:Ao(t),scope:n})??t),a=e.context?.({prop:i,bindable:Ul,scope:n,flush:Yl,getContext(){return s},getComputed(){return S},getRefs(){return m},getEvent(){return f()}}),o=ql(a),s={get(e){return o.current?.[e].ref.current},set(e,t){o.current?.[e].set(t)},initial(e){return o.current?.[e].initial},hash(e){let t=o.current?.[e].get();return o.current?.[e].hash(t)}},c=(0,_.useRef)(new Map),l=(0,_.useRef)(null),u=(0,_.useRef)(null),d=(0,_.useRef)({type:``}),f=()=>({...d.current,current(){return d.current},previous(){return u.current}}),p=()=>({...C,matches(...e){return e.some(e=>ms(C.ref.current,e))},hasTag(t){return hs(e,C.ref.current,t)}}),m=Wl(e.refs?.({prop:i,context:s})??{}),h=()=>({state:p(),context:s,event:f(),prop:i,send:D,action:g,guard:y,track:Gl,refs:m,computed:S,flush:Yl,scope:n,choose:x}),g=t=>{let n=Wa(t)?t(h()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.actions?.[t];return n||No(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),n});for(let e of r)e?.(h())},y=t=>Wa(t)?t(h()):e.implementations?.guards?.[t](h()),b=t=>{let n=Wa(t)?t(h()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.effects?.[t];return n||No(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),n}),i=[];for(let e of r){let t=e?.(h());t&&i.push(t)}return()=>i.forEach(e=>e?.())},x=e=>Ia(e).find(e=>{let t=!e.guard;return Ua(e.guard)?t=!!y(e.guard):Wa(e.guard)&&(t=e.guard(h())),t}),S=t=>{Fo(e.computed,()=>`[zag-js] No computed object found on machine`);let r=e.computed[t];return r({context:s,event:f(),prop:i,refs:m,scope:n,computed:S})},C=Ul(()=>({defaultValue:ds(e,e.initialState({prop:i})),onChange(t,n){let{exiting:r,entering:i}=ps(e,n,t,l.current?.reenter);if(r.forEach(e=>{c.current.get(e.path)?.(),c.current.delete(e.path)}),r.forEach(e=>{g(e.state?.exit)}),g(l.current?.actions),i.forEach(e=>{let t=b(e.state?.effects);t&&c.current.set(e.path,t)}),n===`__init__`){g(e.entry);let t=b(e.effects);t&&c.current.set(ys,t)}i.forEach(e=>{g(e.state?.entry)})}})),w=(0,_.useRef)(void 0),T=(0,_.useRef)(vs.NotStarted);Hl(()=>{queueMicrotask(()=>{let e=T.current===vs.Started;T.current=vs.Started,r(e?`rehydrating...`:`initializing...`);let t=w.current??C.initial;C.invoke(t,e?C.get():ys)});let t=c.current;return()=>{let n=E();
10r(`unmounting...`),w.current=n,T.current=vs.Stopped,t.forEach(e=>e?.()),c.current=new Map,l.current=null,queueMicrotask(()=>{g(e.exit),T.current=vs.Stopped})}},[]);let E=()=>`ref`in C?C.ref.current:C.get(),D=t=>{queueMicrotask(()=>{if(T.current!==vs.Started)return;u.current=d.current,d.current=t;let n=E(),{transitions:i,source:a}=fs(e,n,t.type),o=x(i);if(!o)return;l.current=o;let s=ds(e,o.target??n,a);r(`transition`,t.type,o.target||n,`(${o.actions})`),s===n?o.reenter?C.invoke(n,n):g(o.actions??[]):(0,v.flushSync)(()=>C.set(s))})};return e.watch?.(h()),{state:p(),send:D,context:s,prop:i,scope:n,refs:m,computed:S,event:f(),getStatus:()=>T.current}}function ql(e){let t=(0,_.useRef)(e);return t.current=e,t}function Jl(e){let t=ql(e);return function(e){return t.current[e]}}function Yl(e){queueMicrotask(()=>{(0,v.flushSync)(()=>e())})}function Xl(e){return new Proxy({},{get(t,n){return n===`style`?t=>e({style:t}).style:e}})}var Zl=Xl(e=>e);function Ql(e,t){let{state:n,send:r,context:i}=e,a=n.matches(`mounted`,`unmountSuspended`);return{skip:!i.get(`initial`),present:a,setNode(e){e&&r({type:`NODE.SET`,node:e})},unmount(){r({type:`UNMOUNT`})}}}var $l=_s({props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e(`present`)?`mounted`:`unmounted`},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:[`cleanupNode`],watch({track:e,prop:t,send:n}){e([()=>t(`present`)],()=>{n({type:`PRESENCE.CHANGED`})})},on:{"NODE.SET":{actions:[`setupNode`]},"PRESENCE.CHANGED":{actions:[`setInitial`,`syncPresence`]}},states:{mounted:{on:{UNMOUNT:{target:`unmounted`,actions:[`clearPrevAnimationName`,`invokeOnExitComplete`]},"UNMOUNT.SUSPEND":{target:`unmountSuspended`}}},unmountSuspended:{effects:[`trackAnimationEvents`],on:{MOUNT:{target:`mounted`,actions:[`setPrevAnimationName`]},UNMOUNT:{target:`unmounted`,actions:[`clearPrevAnimationName`,`invokeOnExitComplete`]}}},unmounted:{on:{MOUNT:{target:`mounted`,actions:[`setPrevAnimationName`]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get(`initial`)||queueMicrotask(()=>{e.set(`initial`,!0)})},invokeOnExitComplete:({prop:e,refs:t})=>{e(`onExitComplete`)?.();let n=t.get(`node`);if(!n)return;let r=new(Us(n)).CustomEvent(`exitcomplete`,{bubbles:!1});n.dispatchEvent(r)},setupNode:({refs:e,event:t})=>{e.get(`node`)!==t.node&&(e.set(`node`,t.node),e.set(`styles`,Js(t.node)))},cleanupNode:({refs:e})=>{e.set(`node`,null),e.set(`styles`,null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{let i=r(`present`);if(i)return n({type:`MOUNT`,src:`presence.changed`});let a=t.get(`node`);if(!i&&a?.ownerDocument.visibilityState===`hidden`)return n({type:`UNMOUNT`,src:`visibilitychange`});al(()=>{if(r(`present`))return;let i=eu(t.get(`styles`));e.set(`unmountAnimationName`,i),i===`none`||i===e.get(`prevAnimationName`)||t.get(`styles`)?.display===`none`||t.get(`styles`)?.animationDuration===`0s`?n({type:`UNMOUNT`,src:`presence.changed`}):n({type:`UNMOUNT.SUSPEND`})})},setPrevAnimationName:({context:e,refs:t})=>{al(()=>{e.set(`prevAnimationName`,eu(t.get(`styles`)))})},clearPrevAnimationName:({context:e})=>{e.set(`prevAnimationName`,null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{let i=t.get(`node`);if(!i)return;let a=n=>{(n.composedPath?.()?.[0]??n.target)===i&&e.set(`prevAnimationName`,eu(t.get(`styles`)))},o=a=>{let o=eu(t.get(`styles`));_c(a)===i&&o===e.get(`unmountAnimationName`)&&!r(`present`)&&n({type:`UNMOUNT`,src:`animationend`})},s=e=>{_c(e)===i&&!r(`present`)&&n({type:`UNMOUNT`,src:`animationcancel`})};i.addEventListener(`animationstart`,a),i.addEventListener(`animationcancel`,s),i.addEventListener(`animationend`,o);let c=Sl(i,{animationFillMode:`forwards`});return()=>{i.removeEventListener(`animationstart`,a),i.removeEventListener(`animationcancel`,s),i.removeEventListener(`animationend`,o),ol(()=>c())}}}}});function eu(e){return e?.animationName||`none`}var tu=(e={})=>{let{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:i=!1,...a}=e,o=(0,_.useRef)(!1),s=Ql(Kl($l,{...a,present:r,onExitComplete:Bl(e.onExitComplete)}),Zl);s.present&&(o.current=!0);let c=!s.present&&!o.current&&t||n&&!s.present&&o.current;return{ref:s.setNode,getPresenceProps:()=>({"data-state":s.skip&&i?void 0:r?`open`:`closed`,hidden:!s.present}),present:s.present,unmounted:c}},[nu,ru]=Ro({name:`PresenceContext`,hookName:`usePresenceContext`,providerName:`<PresenceProvider />`}),iu=Ca(`span`);iu.displayName=`Span`;var{withContext:au,PropsProvider:ou}=Pa({key:`text`}),U=au(`p`),W=(e,t=[])=>({parts:(...n)=>{if(cu(t))return W(e,n);throw Error(`createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?`)},extendWith:(...n)=>W(e,[...t,...n]),omit:(...n)=>W(e,t.filter(e=>!n.includes(e))),rename:e=>W(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${su(e)}"][data-part="${su(n)}"]`,`& [data-scope="${su(e)}"][data-part="${su(n)}"]`].join(`, `),attrs:{"data-scope":su(e),"data-part":su(n)}}}),{})}),su=e=>e.replace(/([A-Z])([A-Z])/g,`$1-$2`).replace(/([a-z])([A-Z])/g,`$1-$2`).replace(/[\s_]+/g,`-`).toLowerCase(),cu=e=>e.length===0,lu=W(`accordion`).parts(`root`,`item`,`itemTrigger`,`itemContent`,`itemIndicator`);lu.build();var uu=W(`avatar`).parts(`root`,`image`,`fallback`);uu.build();var du=new WeakMap,fu=new WeakMap,pu={},mu=0,hu=e=>e&&(e.host||hu(e.parentNode)),gu=(e,t)=>
vendor: 4,709 bytes, line 10
10t.map(t=>{if(e.contains(t))return t;let n=hu(t);return n&&e.contains(n)?n:(console.error(`[zag-js > ariaHidden] target`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(e=>!!e),_u=new Set([`script`,`output`,`status`,`next-route-announcer`]),vu=e=>_u.has(e.localName)||e.role===`status`||e.hasAttribute(`aria-live`)?!0:e.matches(`[data-live-announcer]`),yu=(e,t)=>{let{parentNode:n,markerName:r,controlAttribute:i,explicitBooleanValue:a,followControlledElements:o=!0}=t,s=gu(n,Array.isArray(e)?e:[e]);pu[r]||(pu[r]=new WeakMap);let c=pu[r],l=[],u=new Set,d=new Set(s),f=e=>{!e||u.has(e)||(u.add(e),f(e.parentNode))};s.forEach(e=>{f(e),o&&ks(e)&&$s(e,e=>{f(e)})});let p=e=>{!e||d.has(e)||Array.prototype.forEach.call(e.children,e=>{if(u.has(e))p(e);else try{if(vu(e))return;let t=e.getAttribute(i),n=a?t===`true`:t!==null&&t!==`false`,o=(du.get(e)||0)+1,s=(c.get(e)||0)+1;du.set(e,o),c.set(e,s),l.push(e),o===1&&n&&fu.set(e,!0),s===1&&e.setAttribute(r,``),n||e.setAttribute(i,a?`true`:``)}catch(t){console.error(`[zag-js > ariaHidden] cannot operate on `,e,t)}})};return p(n),u.clear(),mu++,()=>{l.forEach(e=>{let t=du.get(e)-1,n=c.get(e)-1;du.set(e,t),c.set(e,n),t||(fu.has(e)||e.removeAttribute(i),fu.delete(e)),n||e.removeAttribute(r)}),mu--,mu||(du=new WeakMap,du=new WeakMap,fu=new WeakMap,pu={})}},bu=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,xu=(e,t=bu(e),n=`data-aria-hidden`,r=!0)=>{if(t)return yu(e,{parentNode:t,markerName:n,controlAttribute:`aria-hidden`,explicitBooleanValue:!0,followControlledElements:r})},aee=e=>{let t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function Su(e,t={}){let{defer:n=!0}=t,r=n?aee:e=>e(),i=[];return i.push(r(()=>{let t=(typeof e==`function`?e():e).filter(Boolean);t.length!==0&&i.push(xu(t))})),()=>{i.forEach(e=>e?.())}}function oee(e){let t={each(t){for(let n=0;n<e.frames?.length;n+=1){let r=e.frames[n];r&&t(r)}},addEventListener(e,n,r){return t.each(t=>{try{t.document.addEventListener(e,n,r)}catch{}}),()=>{try{t.removeEventListener(e,n,r)}catch{}}},removeEventListener(e,n,r){t.each(t=>{try{t.document.removeEventListener(e,n,r)}catch{}})}};return t}function Cu(e){let t=e.frameElement==null?null:e.parent;return{addEventListener:(e,n,r)=>{try{t?.addEventListener(e,n,r)}catch{}return()=>{try{t?.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{t?.removeEventListener(e,n,r)}catch{}}}}var wu=`pointerdown.outside`,Tu=`focus.outside`;function see(e){for(let t of e)if(ks(t)&&$c(t))return!0;return!1}var cee=e=>`clientY`in e;function lee(e,t){if(!cee(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function uee(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function dee(e,t){if(!t||!cee(e))return!1;let n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,a=i&&e.clientY>t.offsetTop+t.clientHeight;return uee({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},{x:e.clientX,y:e.clientY})?r||a:!1}function fee(e,t){let{exclude:n,onFocusOutside:r,onPointerDownOutside:i,onInteractOutside:a,defer:o,followControlledElements:s=!0}=t;if(!e)return;let c=Vs(e),l=Us(e),u=oee(l),d=Cu(l);function f(t,r){if(!ks(r)||!r.isConnected||Bs(e,r)||lee(e,t)||s&&Qs(e,r))return!1;let i=c.querySelector(`[aria-controls="${e.id}"]`);return i&&dee(t,sl(i))||dee(t,sl(e))?!1:!n?.(r)}let p=new Set,m=Fs(e?.getRootNode()),h=!1;function g(t){h=!0;let n=()=>{h=!1};c.addEventListener(`pointerup`,n,{once:!0}),l.addEventListener(`pointerup`,n,{once:!0});function r(n){let r=o&&!uc()?al:e=>e(),s=n??t,c=s?.composedPath?.()??[s?.target];r(()=>{let n=m?c[0]:_c(t);if(!(!e||!f(t,n))){if(i||a){let t=no(i,a);e.addEventListener(wu,t,{once:!0})}mee(e,wu,{bubbles:!1,cancelable:!0,detail:{originalEvent:s,contextmenu:bc(s),focusable:see(c),target:n}})}})}t.pointerType===`touch`?(p.forEach(e=>e()),p.add(jc(c,`click`,r,{once:!0})),p.add(d.addEventListener(`click`,r,{once:!0})),p.add(u.addEventListener(`click`,r,{once:!0}))):r()}let _=new Set,v=setTimeout(()=>{_.add(jc(c,`pointerdown`,g,!0)),_.add(d.addEventListener(`pointerdown`,g,!0)),_.add(u.addEventListener(`pointerdown`,g,!0))},0);function y(t){h||(o?al:e=>e())(()=>{let n=t?.composedPath?.()??[t?.target],i=m?n[0]:_c(t);if(!(!e||!f(t,i))){if(r||a){let t=no(r,a);e.addEventListener(Tu,t,{once:!0})}mee(e,Tu,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:$c(i),target:i}})}})}return uc()||(_.add(jc(c,`focusin`,y,!0)),_.add(d.addEventListener(`focusin`,y,!0)),_.add(u.addEventListener(`focusin`,y,!0))),()=>
vendor: 17,563 bytes, line 10
10{clearTimeout(v),p.forEach(e=>e()),_.forEach(e=>e())}}function pee(e,t){let{defer:n}=t,r=n?al:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(fee(n,t))})),()=>{i.forEach(e=>e?.())}}function mee(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function hee(e,t){return jc(Vs(e),`keydown`,e=>{e.key===`Escape`&&(e.isComposing||t?.(e))},{capture:!0})}var gee=`layer:request-dismiss`,Eu={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1)},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){let n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(e=>e.type===t)},getParentLayerOfType(e,t){let n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(e=>e.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(e=>Bs(e.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>Bs(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(this.recentlyRemoved.add(e),ol(()=>this.recentlyRemoved.delete(e)),t<this.count()-1&&this.getNestedLayers(e).forEach(t=>Eu.dismiss(t.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty(`--layer-index`,`${t}`),e.node.removeAttribute(`data-nested`),e.node.removeAttribute(`data-has-nested`),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute(`data-nested`,e.type);let n=this.countNestedLayersOfType(e.node,e.type);n>0&&e.node.setAttribute(`data-has-nested`,e.type),e.node.style.setProperty(`--nested-layer-count`,`${n}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let r=this.layers[n];vee(e,gee,e=>{r.requestDismiss?.(e),e.defaultPrevented||r?.dismiss()}),_ee(e,gee,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function _ee(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function vee(e,t,n){e.addEventListener(t,n,{once:!0})}var yee;function bee(){Eu.layers.forEach(({node:e})=>{e.style.pointerEvents=Eu.isBelowPointerBlockingLayer(e)?`none`:`auto`})}function xee(e){e.style.pointerEvents=``}function See(e,t){let n=Vs(e),r=[];return Eu.hasPointerBlockingLayer()&&!n.body.hasAttribute(`data-inert`)&&(yee=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents=`none`,n.body.setAttribute(`data-inert`,``)})),t?.forEach(e=>{let[t,n]=El(()=>{let t=e();return ks(t)?t:null},{timeout:1e3});t.then(e=>r.push(Sl(e,{pointerEvents:`auto`}))),r.push(n)}),()=>{Eu.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=yee,n.body.removeAttribute(`data-inert`),n.body.style.length===0&&n.body.removeAttribute(`style`)}),r.forEach(e=>e()))}}function Cee(e,t){let{warnOnMissingNode:n=!0}=t;if(n&&!e){No("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;let{onDismiss:r,onRequestDismiss:i,pointerBlocking:a,exclude:o,debug:s,type:c=`dialog`}=t,l={dismiss:r,node:e,type:c,pointerBlocking:a,requestDismiss:i};Eu.add(l),bee();function u(n){let i=_c(n.detail.originalEvent);Eu.isBelowPointerBlockingLayer(e)||Eu.isInBranch(i)||(t.onPointerDownOutside?.(n),t.onInteractOutside?.(n),!n.defaultPrevented&&(s&&console.log(`onPointerDownOutside:`,n.detail.originalEvent),r?.()))}function d(e){let n=_c(e.detail.originalEvent);Eu.isInBranch(n)||(t.onFocusOutside?.(e),t.onInteractOutside?.(e),!e.defaultPrevented&&(s&&console.log(`onFocusOutside:`,e.detail.originalEvent),r?.()))}function f(n){Eu.isTopMost(e)&&(t.onEscapeKeyDown?.(n),!n.defaultPrevented&&r&&(n.preventDefault(),r()))}function p(n){if(!e)return!1;let r=typeof o==`function`?o():o,i=Array.isArray(r)?r:[r],a=t.persistentElements?.map(e=>e()).filter(ks);return a&&i.push(...a),i.some(e=>Bs(e,n))||Eu.isInNestedLayer(e,n)}let m=[a?See(e,t.persistentElements):void 0,hee(e,f),pee(e,{exclude:p,onFocusOutside:d,onPointerDownOutside:u,defer:t.defer})];return()=>{Eu.remove(e),bee(),xee(e),m.forEach(e=>e?.())}}function wee(e,t){let{defer:n}=t,r=n?al:e=>e(),i=[];return i.push(r(()=>{let n=Wa(e)?e():e;i.push(Cee(n,t))})),()=>{i.forEach(e=>e?.())}}var Tee=Object.defineProperty,Eee=(e,t,n)=>t in e?Tee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Du=(e,t,n)=>Eee(e,typeof t==`symbol`?t:t+``,n),Dee={activateTrap(e,t){if(e.length>0){let n=e[e.length-1];n!==t&&n.pause()}let n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},Oee=[],kee=class{constructor(e,t){Du(this,`trapStack`),Du(this,`config`),Du(this,`doc`),Du(this,`state`,{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Du(this,`portalContainers`,new Set),Du(this,`listenerCleanups`,[]),Du(this,`handleFocus`,e=>{let t=_c(e),n=this.findContainerIndex(t,e)>=0;if(n||As(t))n&&(this.state.mostRecentlyFocusedNode=t);else{e.stopImmediatePropagation();let t,n=!0;if(this.state.mostRecentlyFocusedNode)if(nl(this.state.mostRecentlyFocusedNode)>0){let e=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:r}=this.state.containerGroups[e];if(r.length>0){let e=r.findIndex(e=>e===this.state.mostRecentlyFocusedNode);e>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?e+1<r.length&&(t=r[e+1],n=!1):e-1>=0&&(t=r[e-1],n=!1))}}else this.state.containerGroups.some(e=>e.tabbableNodes.some(e=>nl(e)>0))||(n=!1);else n=!1;n&&(t=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),t?this.tryFocus(t):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Du(this,`handlePointerDown`,e=>{let t=_c(e);if(!(this.findContainerIndex(t,e)>=0)){if(Au(this.config.clickOutsideDeactivates,e)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Au(this.config.allowOutsideClick,e)||e.preventDefault()}}),Du(this,`handleClick`,e=>{let t=_c(e);this.findContainerIndex(t,e)>=0||Au(this.config.clickOutsideDeactivates,e)||Au(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())}),Du(this,`handleTabKey`,e=>{if(this.config.isKeyForward(e)||this.config.isKeyBackward(e)){this.state.recentNavEvent=e;let t=this.config.isKeyBackward(e),n=this.findNextNavNode({event:e,isBackward:t});if(!n)return;ku(e)&&e.preventDefault(),this.tryFocus(n)}}),Du(this,`handleEscapeKey`,e=>{Mee(e)&&Au(this.config.escapeDeactivates,e)!==!1&&(e.preventDefault(),this.deactivate())}),Du(this,`_mutationObserver`),Du(this,`setupMutationObserver`,()=>{let e=this.doc.defaultView||window;this._mutationObserver=new e.MutationObserver(e=>{e.some(e=>Array.from(e.removedNodes).some(e=>e===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),e.some(e=>e.type===`attributes`&&(e.attributeName===`aria-controls`||e.attributeName===`aria-expanded`)?!0:e.type===`childList`&&e.addedNodes.length>0?Array.from(e.addedNodes).some(e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;let t=e;return rc(t)?!0:t.id&&!this.state.containers.some(e=>e.contains(t))?ic(t):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Du(this,`updateObservedNodes`,()=>{this._mutationObserver?.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(e=>{this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-controls`,`aria-expanded`]})}),this.portalContainers.forEach(e=>{this.observePortalContainer(e)}))}),Du(this,`getInitialFocusNode`,()=>{let e=this.getNodeForOption(`initialFocus`,{hasFallback:!0});if(e===!1)return!1;if(e===void 0||e&&!$c(e)){let t=Ws(this.doc);if(t&&this.findContainerIndex(t)>=0)e=t;else{let t=this.state.tabbableGroups[0];e=t&&t.firstTabbableNode||this.getNodeForOption(`fallbackFocus`)}}else e===null&&(e=this.getNodeForOption(`fallbackFocus`));if(!e||(e.isConnected||(e=this.getNodeForOption(`fallbackFocus`)),!e||!e.isConnected))throw Error(`Your focus-trap needs to have at least one focusable element`);return e}),Du(this,`tryFocus`,e=>{if(e!==!1&&e!==Ws(this.doc)){if(!e||!e.focus){this.tryFocus(this.getInitialFocusNode());return}e.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=e,Nee(e)&&e.select()}}),Du(this,`deactivate`,e=>{if(!this.state.active)return this;let t={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...e};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),Dee.deactivateTrap(this.trapStack,this),this.portalContainers.clear();let n=this.getOption(t,`onDeactivate`),r=this.getOption(t,`onPostDeactivate`),i=this.getOption(t,`checkCanReturnFocus`),a=this.getOption(t,`returnFocus`,`returnFocusOnDeactivate`);n?.();let o=()=>{ju(()=>{if(a){let e=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(e)}r?.()})};return a&&i?(i(this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation)).then(o,o),this):(o(),this)}),Du(this,`pause`,e=>{if(this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onPause`),n=this.getOption(e,`onPostPause`);return this.state.paused=!0,t?.(),this.removeListeners(),this.updateObservedNodes(),n?.(),this}),Du(this,`unpause`,e=>{if(!this.state.paused||!this.state.active)return this;let t=this.getOption(e,`onUnpause`),n=this.getOption(e,`onPostUnpause`);return this.state.paused=!1,t?.(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n?.(),this}),Du(this,`updateContainerElements`,e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Du(this,`getReturnFocusNode`,e=>{let t=this.getNodeForOption(`setReturnFocus`,{params:[e]});return t||(t===!1?!1:e)}),Du(this,`getOption`,(e,t,n)=>e&&e[t]!==void 0?e[t]:this.config[n||t]),Du(this,`getNodeForOption`,(e,{hasFallback:t=!1,params:n=[]}={})=>{let r=this.config[e];if(typeof r==`function`&&(r=r(...n)),r===!0&&(r=void 0),!r){if(r===void 0||r===!1)return r;throw Error(`\`${e}\` was specified but was not a node, or did not return a node`)}let i=r;if(typeof r==`string`){try{i=this.doc.querySelector(r)}catch(t){throw Error(`\`${e}\` appears to be an invalid selector; error="${t.message}"`)}if(!i&&!t)throw Error(`\`${e}\` as selector refers to no known node`)}return i}),Du(this,`findNextNavNode`,e=>{let{event:t,isBackward:n=!1}=e,r=e.target||_c(t);this.updateTabbableNodes();let i=null;if(this.state.tabbableGroups.length>0){let e=this.findContainerIndex(r,t),a=e>=0?this.state.containerGroups[e]:void 0;if(e<0)i=n?this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:this.state.tabbableGroups[0].firstTabbableNode;else if(n){let n=this.state.tabbableGroups.findIndex(({firstTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||$c(r)&&!tl(r)&&!a?.nextTabbableNode(r,!1))&&(n=e),n>=0){let e=n===0?this.state.tabbableGroups.length-1:n-1,t=this.state.tabbableGroups[e];i=nl(r)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else ku(t)||(i=a?.nextTabbableNode(r,!1))}else{let n=this.state.tabbableGroups.findIndex(({lastTabbableNode:e})=>r===e);if(n<0&&(a?.container===r||$c(r)&&!tl(r)&&!a?.nextTabbableNode(r))&&(n=e),n>=0){let e=n===this.state.tabbableGroups.length-1?0:n+1,t=this.state.tabbableGroups[e];i=nl(r)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else ku(t)||(i=a?.nextTabbableNode(r))}}else i=this.getNodeForOption(`fallbackFocus`);return i}),this.trapStack=t.trapStack||Oee;let n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:Aee,isKeyBackward:jee,...t};this.doc=n.document||Vs(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){let t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){this._mutationObserver?.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-controls`,`aria-expanded`]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{ec(e).forEach(e=>{this.addPortalContainer(e)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){let n=typeof t?.composedPath==`function`?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:t,tabbableNodes:r})=>t.contains(e)||n?.includes(t)||r.find(t=>t===e)||this.isControlledElement(t,e))}isControlledElement(e,t){return this.config.followControlledElements?Qs(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{let t=el(e,{getShadowRoot:this.config.getShadowRoot}),n=Qc(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],i=t[t.length-1],a=r,o=i,s=!1;for(let e=0;e<t.length;e++)if(nl(t[e])>0){s=!0;break}function c(e,r=!0){let i=t.indexOf(e);if(i>=0)return t[i+(r?1:-1)];let a=n.indexOf(e);if(!(a<0)){if(r){for(let e=a+1;e<n.length;e++)if(tl(n[e]))return n[e]}else for(let e=a-1;e>=0;e--)if(tl(n[e]))return n[e]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:s,firstTabbableNode:r,lastTabbableNode:i,firstDomTabbableNode:a,lastDomTabbableNode:o,nextTabbableNode:c}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption(`fallbackFocus`))throw Error(`Your focus-trap must have at least one container with at least one tabbable node in it at all times`);if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw Error(`At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.`)}addListeners(){if(this.state.active)return Dee.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?ju(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(jc(this.doc,`focusin`,this.handleFocus,!0),jc(this.doc,`mousedown`,this.handlePointerDown,{capture:!0,passive:!1}),jc(this.doc,`touchstart`,this.handlePointerDown,{capture:!0,passive:!1}),jc(this.doc,`click`,this.handleClick,{capture:!0,passive:!1}),jc(this.doc,`keydown`,this.handleTabKey,{capture:!0,passive:!1}),jc(this.doc,`keydown`,this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;let t=this.getOption(e,`onActivate`),n=this.getOption(e,`onPostActivate`),r=this.getOption(e,`checkCanFocusTrap`);r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=Ws(this.doc),t?.();let i=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n?.()};return r?(r(this.state.containers.concat()).then(i,i),this):(i(),this)}},Ou=e=>e?.type===`keydown`,ku=e=>Ou(e)&&e?.key===`Tab`,Aee=e=>Ou(e)&&e.key===`Tab`&&!e?.shiftKey,jee=e=>Ou(e)&&e.key===`Tab`&&e?.shiftKey,Au=(e,...t)=>typeof e==`function`?e(...t):e,Mee=e=>!e.isComposing&&e.key===`Escape`,ju=e=>setTimeout(e,0),Nee=e=>e.localName===`input`&&`select`in e&&typeof e.select==`function`;function Pee(e,t={}){let n,r=al(()=>{let r=(Array.isArray(e)?e:[e]).map(e=>typeof e==`function`?e():e).filter(e=>e!=null);if(r.length===0)return;let i=r[0];n=new kee(r,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i,...t,document:Vs(i)});try{n.activate()}catch{}});return function(){n?.deactivate(),r()}}var Mu=`data-scroll-lock`;function Fee(e){let t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?`paddingLeft`:`paddingRight`}function Nu(e){let t=Js(e)?.scrollbarGutter;return t===`stable`||t?.startsWith(`stable `)===!0}function Iee(e){let t=e??document,n=t.defaultView??window,{documentElement:r,body:i}=t;if(i.hasAttribute(Mu))return;let a=Nu(r)||Nu(i),o=n.innerWidth-r.clientWidth;i.setAttribute(Mu,``);let s=()=>Cl(r,`--scrollbar-width`,`${o}px`),c=Fee(r),l=[s(),pc()?(()=>
10{let{scrollX:e,scrollY:t,visualViewport:r}=n,s=r?.offsetLeft??0,l=r?.offsetTop??0,u={position:`fixed`,overflow:`hidden`,top:`${-(t-Math.floor(l))}px`,left:`${-(e-Math.floor(s))}px`,right:`0`};!a&&o>0&&(u[c]=`${o}px`);let d=Sl(i,u);return()=>{d?.(),n.scrollTo({left:e,top:t,behavior:`instant`})}})():(()=>{let e={overflow:`hidden`};return!a&&o>0&&(e[c]=`${o}px`),Sl(i,e)})()];return()=>{l.forEach(e=>e?.()),i.removeAttribute(Mu)}}var Pu=W(`carousel`).parts(`root`,`itemGroup`,`item`,`control`,`nextTrigger`,`prevTrigger`,`indicatorGroup`,`indicator`,`autoplayTrigger`,`progressText`);Pu.build();var Lee=Pu.extendWith(`progressText`,`autoplayIndicator`),Fu=W(`checkbox`).parts(`root`,`label`,`control`,`indicator`);Fu.build();function Ree(e){return!(e.metaKey||!mc()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}var zee=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function Bee(e,t,n){let r=n?_c(n):null,i=Vs(r),a=Us(r),o=Ws(i);return e=e||o instanceof a.HTMLInputElement&&!zee.has(o?.type)||o instanceof a.HTMLTextAreaElement||o instanceof a.HTMLElement&&o.isContentEditable,!(e&&t===`keyboard`&&n instanceof a.KeyboardEvent&&!Reflect.has(Vee,n.key))}var Iu=null,Lu=new Set,Ru=new Map,zu=!1,Bu=!1,Vee={Tab:!0,Escape:!0};function Vu(e,t){for(let n of Lu)n(e,t)}function Hu(e){zu=!0,Ree(e)&&(Iu=`keyboard`,Vu(`keyboard`,e))}function Uu(e){Iu=`pointer`,(e.type===`mousedown`||e.type===`pointerdown`)&&(zu=!0,Vu(`pointer`,e))}function Wu(e){H(e)&&(zu=!0,Iu=`virtual`)}function Gu(e){let t=_c(e);t===Us(t)||t===Vs(t)||!e.isTrusted||(!zu&&!Bu&&(Iu=`virtual`,Vu(`virtual`,e)),zu=!1,Bu=!1)}function Ku(){zu=!1,Bu=!0}function Hee(e){if(typeof window>`u`||Ru.get(Us(e)))return;let t=Us(e),n=Vs(e),r=t.HTMLElement.prototype.focus;function i(){zu=!0,r.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:i})}catch{}n.addEventListener(`keydown`,Hu,!0),n.addEventListener(`keyup`,Hu,!0),n.addEventListener(`click`,Wu,!0),t.addEventListener(`focus`,Gu,!0),t.addEventListener(`blur`,Ku,!1),t.PointerEvent===void 0?(n.addEventListener(`mousedown`,Uu,!0),n.addEventListener(`mousemove`,Uu,!0),n.addEventListener(`mouseup`,Uu,!0)):(n.addEventListener(`pointerdown`,Uu,!0),n.addEventListener(`pointermove`,Uu,!0),n.addEventListener(`pointerup`,Uu,!0)),t.addEventListener(`beforeunload`,()=>{Uee(e)},{once:!0}),Ru.set(t,{focus:r})}var Uee=(e,t)=>{let n=Us(e),r=Vs(e);t&&r.removeEventListener(`DOMContentLoaded`,t);let i=Ru.get(n);if(i){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:i.focus})}catch{}r.removeEventListener(`keydown`,Hu,!0),r.removeEventListener(`keyup`,Hu,!0),r.removeEventListener(`click`,Wu,!0),n.removeEventListener(`focus`,Gu,!0),n.removeEventListener(`blur`,Ku,!1),n.PointerEvent===void 0?(r.removeEventListener(`mousedown`,Uu,!0),r.removeEventListener(`mousemove`,Uu,!0),r.removeEventListener(`mouseup`,Uu,!0)):(r.removeEventListener(`pointerdown`,Uu,!0),r.removeEventListener(`pointermove`,Uu,!0),r.removeEventListener(`pointerup`,Uu,!0)),Ru.delete(n)}};function qu(){return Iu===`keyboard`||Iu===`virtual`}function Wee(e={}){let{isTextInput:t,autoFocus:n,onChange:r,root:i}=e;Hee(i),r?.({isFocusVisible:n||qu(),modality:Iu});let a=(e,n)=>{Bee(!!t,e,n)&&r?.({isFocusVisible:qu(),modality:e})};return Lu.add(a),()=>{Lu.delete(a)}}var Gee=Fu.extendWith(`group`),Ju=W(`clipboard`).parts(`root`,`control`,`trigger`,`indicator`,`input`,`label`);Ju.build();var Yu=W(`collapsible`).parts(`root`,`trigger`,`content`,`indicator`);Yu.build();var Xu=W(`color-picker`,[`root`,`label`,`control`,`trigger`,`positioner`,`content`,`area`,`areaThumb`,`valueText`,`areaBackground`,`channelSlider`,`channelSliderLabel`,`channelSliderTrack`,`channelSliderThumb`,`channelSliderValueText`,`channelInput`,`transparencyGrid`,`swatchGroup`,`swatchTrigger`,`swatchIndicator`,`swatch`,`eyeDropperTrigger`,`formatTrigger`,`formatSelect`]);Xu.build();var Kee=[`top`,`right`,`bottom`,`left`],Zu=Math.min,Qu=Math.max,$u=Math.round,ed=Math.floor,td=e=>({x:e,y:e}),qee={left:`right`,right:`left`,bottom:`top`,top:`bottom`};
vendor: 5,447 bytes, line 10
10function nd(e,t,n){return Qu(e,Zu(t,n))}function rd(e,t){return typeof e==`function`?e(t):e}function id(e){return e.split(`-`)[0]}function ad(e){return e.split(`-`)[1]}function od(e){return e===`x`?`y`:`x`}function sd(e){return e===`y`?`height`:`width`}function cd(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ld(e){return od(cd(e))}function Jee(e,t,n){n===void 0&&(n=!1);let r=ad(e),i=ld(e),a=sd(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=dd(o)),[o,dd(o)]}function Yee(e){let t=dd(e);return[ud(e),t,ud(t)]}function ud(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Xee=[`left`,`right`],Zee=[`right`,`left`],Qee=[`top`,`bottom`],$ee=[`bottom`,`top`];function ete(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Zee:Xee:t?Xee:Zee;case`left`:case`right`:return t?Qee:$ee;default:return[]}}function tte(e,t,n,r){let i=ad(e),a=ete(id(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ud)))),a}function dd(e){let t=id(e);return qee[t]+e.slice(t.length)}function nte(e){return{top:0,right:0,bottom:0,left:0,...e}}function rte(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:nte(e)}function fd(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function pd(e,t,n){let{reference:r,floating:i}=e,a=cd(t),o=ld(t),s=sd(o),c=id(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(ad(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function ite(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=rd(t,e),p=rte(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=fd(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=fd(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ate=50,ote=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ite},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=pd(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ate&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=pd(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ste=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=rd(e,t)||{};if(l==null)return{};let d=rte(u),f={x:n,y:r},p=ld(i),m=sd(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Zu(d[_],T),D=Zu(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=nd(O,A,k),M=!c.arrow&&ad(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),cte=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=rd(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=id(r),_=cd(o),v=id(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[dd(o)]:Yee(o)),x=p!==`none`;!d&&x&&b.push(...tte(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Jee(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==cd(t))||T.every(e=>cd(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>
vendor: 5,403 bytes, line 10
10e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=cd(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function md(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function hd(e){return Kee.some(t=>e[t]>=0)}var lte=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=rd(e,t);switch(i){case`referenceHidden`:{let e=md(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:hd(e)}}}case`escaped`:{let e=md(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:hd(e)}}}default:return{}}}}},gd=new Set([`left`,`top`]);async function ute(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=id(n),s=ad(n),c=cd(n)===`y`,l=gd.has(o)?-1:1,u=a&&c?-1:1,d=rd(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var dte=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ute(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},fte=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=rd(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=cd(id(i)),p=od(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=nd(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=nd(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},pte=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=rd(e,t),u={x:n,y:r},d=cd(i),f=od(d),p=u[f],m=u[d],h=rd(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=gd.has(id(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},mte=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=rd(e,t),u=await o.detectOverflow(t,l),d=id(i),f=ad(i),p=cd(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Zu(h-u[g],v),x=Zu(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Qu(u.left,0),t=Qu(u.right,0),n=Qu(u.top,0),r=Qu(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Qu(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Qu(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function _d(){return typeof window<`u`}function vd(e){return xd(e)?(e.nodeName||``).toLowerCase():`#document`}function yd(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bd(e){return((xd(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function xd(e){return _d()?e instanceof Node||e instanceof yd(e).Node:!1}function Sd(e){return _d()?e instanceof Element||e instanceof yd(e).Element:!1}function Cd(e){return _d()?e instanceof HTMLElement||e instanceof yd(e).HTMLElement:!1}function wd(e){return!_d()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof yd(e).ShadowRoot}function Td(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Md(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function hte(e){return/^(table|td|th)$/.test(vd(e))}function Ed(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var gte=/transform|translate|scale|rotate|perspective|filter/,_te=/paint|layout|strict|content/,Dd=e=>!!e&&e!==`none`,Od;function kd(e){let t=Sd(e)?Md(e):e;return Dd(t.transform)||Dd(t.translate)||Dd(t.scale)||Dd(t.rotate)||Dd(t.perspective)||!Ad()&&(Dd(t.backdropFilter)||Dd(t.filter))||gte.test(t.willChange||``)||_te.test(t.contain||``)}function vte(e){let t=Pd(e);for(;Cd(t)&&!jd(t);){if(kd(t))return t;if(Ed(t))return null;t=Pd(t)}return null}function Ad(){return Od??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Od}
vendor: 4,577 bytes, line 10
10function jd(e){return/^(html|body|#document)$/.test(vd(e))}function Md(e){return yd(e).getComputedStyle(e)}function Nd(e){return Sd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pd(e){if(vd(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||wd(e)&&e.host||bd(e);return wd(t)?t.host:t}function Fd(e){let t=Pd(e);return jd(t)?e.ownerDocument?e.ownerDocument.body:e.body:Cd(t)&&Td(t)?t:Fd(t)}function Id(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Fd(e),i=r===e.ownerDocument?.body,a=yd(r);if(i){let e=Ld(a);return t.concat(a,a.visualViewport||[],Td(r)?r:[],e&&n?Id(e):[])}else return t.concat(r,Id(r,[],n))}function Ld(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Rd(e){let t=Md(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Cd(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=$u(n)!==a||$u(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function zd(e){return Sd(e)?e:e.contextElement}function Bd(e){let t=zd(e);if(!Cd(t))return td(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Rd(t),o=(a?$u(n.width):n.width)/r,s=(a?$u(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var yte=td(0);function Vd(e){let t=yd(e);return!Ad()||!t.visualViewport?yte:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bte(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yd(e)?!1:t}function Hd(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=zd(e),o=td(1);t&&(r?Sd(r)&&(o=Bd(r)):o=Bd(e));let s=bte(a,n,r)?Vd(a):td(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=yd(a),t=r&&Sd(r)?yd(r):r,n=e,i=Ld(n);for(;i&&r&&t!==n;){let e=Bd(i),t=i.getBoundingClientRect(),r=Md(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=yd(i),i=Ld(n)}}return fd({width:u,height:d,x:c,y:l})}function Ud(e,t){let n=Nd(e).scrollLeft;return t?t.left+n:Hd(bd(e)).left+n}function Wd(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ud(e,n),y:n.top+t.scrollTop}}function xte(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=bd(r),s=t?Ed(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=td(1),u=td(0),d=Cd(r);if((d||!d&&!a)&&((vd(r)!==`body`||Td(o))&&(c=Nd(r)),d)){let e=Hd(r);l=Bd(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Wd(o,c):td(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Ste(e){return Array.from(e.getClientRects())}function Cte(e){let t=bd(e),n=Nd(e),r=e.ownerDocument.body,i=Qu(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Qu(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Ud(e),s=-n.scrollTop;return Md(r).direction===`rtl`&&(o+=Qu(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Gd=25;function wte(e,t){let n=yd(e),r=bd(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ad();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Ud(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Gd&&(a-=o)}else l<=Gd&&(a+=l);return{width:a,height:o,x:s,y:c}}function Tte(e,t){let n=Hd(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Cd(e)?Bd(e):td(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Kd(e,t,n){let r;if(t===`viewport`)r=wte(e,n);else if(t===`document`)r=Cte(bd(e));else if(Sd(t))r=Tte(t,n);else{let n=Vd(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return fd(r)}function qd(e,t){let n=Pd(e);return n===t||!Sd(n)||jd(n)?!1:Md(n).position===`fixed`||qd(n,t)}function Ete(e,t){let n=t.get(e);if(n)return n;let r=Id(e,[],!1).filter(e=>Sd(e)&&vd(e)!==`body`),i=null,a=Md(e).position===`fixed`,o=a?Pd(e):e;for(;Sd(o)&&!jd(o);){let t=Md(o),n=kd(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Td(o)&&!n&&qd(e,o))?r=r.filter(e=>e!==o):i=t,o=Pd(o)}return t.set(e,r),r}function Dte(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ed(t)?[]:Ete(t,this._c):[].concat(n),r],o=Kd(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Kd(t,a[e],i);
vendor: 4,221 bytes, line 10
10s=Qu(n.top,s),c=Zu(n.right,c),l=Zu(n.bottom,l),u=Qu(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ote(e){let{width:t,height:n}=Rd(e);return{width:t,height:n}}function kte(e,t,n){let r=Cd(t),i=bd(t),a=n===`fixed`,o=Hd(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=td(0);function l(){c.x=Ud(i)}if(r||!r&&!a)if((vd(t)!==`body`||Td(i))&&(s=Nd(t)),r){let e=Hd(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Wd(i,s):td(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Jd(e){return Md(e).position===`static`}function Yd(e,t){if(!Cd(e)||Md(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return bd(e)===n&&(n=n.ownerDocument.body),n}function Xd(e,t){let n=yd(e);if(Ed(e))return n;if(!Cd(e)){let t=Pd(e);for(;t&&!jd(t);){if(Sd(t)&&!Jd(t))return t;t=Pd(t)}return n}let r=Yd(e,t);for(;r&&hte(r)&&Jd(r);)r=Yd(r,t);return r&&jd(r)&&Jd(r)&&!kd(r)?n:r||vte(e)||n}var Ate=async function(e){let t=this.getOffsetParent||Xd,n=this.getDimensions,r=await n(e.floating);return{reference:kte(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function jte(e){return Md(e).direction===`rtl`}var Mte={convertOffsetParentRelativeRectToViewportRelativeRect:xte,getDocumentElement:bd,getClippingRect:Dte,getOffsetParent:Xd,getElementRects:Ate,getClientRects:Ste,getDimensions:Ote,getScale:Bd,isElement:Sd,isRTL:jte};function Zd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Nte(e,t){let n=null,r,i=bd(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=ed(d),h=ed(i.clientWidth-(u+f)),g=ed(i.clientHeight-(d+p)),_=ed(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Qu(0,Zu(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Zd(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Pte(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=zd(e),u=i||a?[...l?Id(l):[],...t?Id(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Nte(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Hd(e):null;c&&g();function g(){let t=Hd(e);h&&!Zd(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Fte=dte,Ite=fte,Lte=cte,Rte=mte,zte=lte,Bte=ste,Vte=pte,Hte=(e,t,n)=>{let r=new Map,i={platform:Mte,...n},a={...i.platform,_c:r};return ote(e,t,{...i,platform:a})};function Qd(e=0,t=0,n=0,r=0){if(typeof DOMRect==`function`)return new DOMRect(e,t,n,r);let i={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...i,toJSON:()=>i}}function Ute(e){if(!e)return Qd();let{x:t,y:n,width:r,height:i}=e;return Qd(t,n,r,i)}function Wte(e,t){return{contextElement:ks(e)?e:e?.contextElement,getBoundingClientRect:()=>{let n=e,r=t?.(n);return r||!n?Ute(r):n.getBoundingClientRect()}}}var $d=e=>({variable:e,reference:`var(${e})`}),ef={arrowSize:$d(`--arrow-size`),arrowSizeHalf:$d(`--arrow-size-half`),arrowBg:$d(`--arrow-background`),transformOrigin:$d(`--transform-origin`),arrowOffset:$d(`--arrow-offset`)},Gte=e=>e===`top`||e===`bottom`?`y`:`x`;function Kte(e,t){return{name:`transformOrigin`,fn(n){let{elements:r,middlewareData:i,placement:a,rects:o,y:s}=n,c=a.split(`-`)[0],l=Gte(c),u=i.arrow?.x||0,d=i.arrow?.y||0,f=t?.clientWidth||0,p=t?.clientHeight||0,m=u+f/2,h=d+p
10/2,g=Math.abs(i.shift?.y||0),_=o.reference.height/2,v=p/2,y=e.offset?.mainAxis??e.gutter,b=typeof y==`number`?y+v:y??v,x=g>b,S={top:`${m}px calc(100% + ${b}px)`,bottom:`${m}px ${-b}px`,left:`calc(100% + ${b}px) ${h}px`,right:`${-b}px ${h}px`}[c],C=`${m}px ${o.reference.y+_-s}px`,w=!!e.overlap&&l===`y`&&x;return r.floating.style.setProperty(ef.transformOrigin.variable,w?C:S),{data:{transformOrigin:w?C:S}}}}}var qte={name:`rects`,fn({rects:e}){return{data:e}}},Jte=e=>{if(e)return{name:`shiftArrow`,fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:r,y:i}=n.arrow,a=t.split(`-`)[0];return Object.assign(e.style,{left:r==null?``:`${r}px`,top:i==null?``:`${i}px`,[a]:`calc(100% + ${ef.arrowOffset.reference})`}),{}}}};function Yte(e){let[t,n]=e.split(`-`);return{side:t,align:n,hasAlign:n!=null}}var Xte={strategy:`absolute`,placement:`bottom`,listeners:!0,restoreStyles:!1,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function tf(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function nf(e,t){return e!=null&&Math.abs(e-t)<.5}function rf(e){return typeof e==`function`?e():e===`clipping-ancestors`?`clippingAncestors`:e}function Zte(e,t,n){return Bte({element:e||t.createElement(`div`),padding:n.arrowPadding})}function Qte(e,t){if(!Ga(t.offset??t.gutter))return Fte(({placement:n})=>{let r=(e?.clientHeight||0)/2,i=t.offset?.mainAxis??t.gutter,a=typeof i==`number`?i+r:i??r,{hasAlign:o}=Yte(n),s=o?void 0:t.shift;return Ao({crossAxis:t.offset?.crossAxis??s,mainAxis:a,alignmentAxis:t.shift})})}function $te(e){if(!e.flip)return;let t=rf(e.boundary);return Lte({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip})}function ene(e){if(!e.slide&&!e.overlap)return;let t=rf(e.boundary);return Ite({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:Vte()})}function tne(e){if(e.sizeMiddleware===!1&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,i;return Rte({padding:e.overflowPadding,apply({elements:e,rects:a,availableHeight:o,availableWidth:s}){let c=e.floating,l=Math.round(a.reference.width),u=Math.round(a.reference.height);s=Math.floor(s),o=Math.floor(o),nf(t,l)||(c.style.setProperty(`--reference-width`,`${l}px`),t=l),nf(n,u)||(c.style.setProperty(`--reference-height`,`${u}px`),n=u),nf(r,s)||(c.style.setProperty(`--available-width`,`${s}px`),r=s),nf(i,o)||(c.style.setProperty(`--available-height`,`${o}px`),i=o)}})}function nne(e){if(e.hideWhenDetached)return zte({strategy:`referenceHidden`,boundary:rf(e.boundary)??`clippingAncestors`})}function rne(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}var ine=[`transform`,`visibility`,`pointer-events`,`--x`,`--y`,`--z-index`,`--reference-width`,`--reference-height`,`--available-width`,`--available-height`,`--transform-origin`],ane=[`top`,`right`,`bottom`,`left`];function af(e,t){if(!e)return to;let n=new Map(t.map(t=>[t,e.style.getPropertyValue(t)]));return()=>{n.forEach((t,n)=>{t?e.style.setProperty(n,t):e.style.removeProperty(n)}),e.style.length===0&&e.removeAttribute(`style`)}}function of(e){return e==null?null:ks(e)?e:typeof e==`object`&&e&&`contextElement`in e&&e.contextElement?e.contextElement:e}function one(e,t,n={}){let r=()=>(typeof t==`function`?t():t)??null,i=()=>{let t=typeof e==`function`?e():e;return n.getAnchorElement?.()??t},a=()=>{let e=i();return!e&&!n.getAnchorRect?null:Wte(e,n.getAnchorRect)},o=Object.assign({},Xte,n),s=[],c=null,l,u;function d(e){l?.(),u?.(),c=e,l=o.restoreStyles?af(e,ine):void 0;
10let t=e.querySelector(`[data-part=arrow]`);u=o.restoreStyles?af(t,ane):void 0,s=[Qte(t,o),$te(o),ene(o),Zte(t,e.ownerDocument,o),Jte(t),Kte({gutter:o.gutter,offset:o.offset,overlap:o.overlap},t),tne(o),nne(o),qte]}let{placement:f,strategy:p,onComplete:m,onPositioned:h}=o,g,_,v=!1,y,b,x=to,S=rne(o.listeners);function C(){if(!o.listeners)return;let e=i(),t=a(),n=r();!t||!n||(of(e)!==of(y)||n!==b)&&(x(),y=e,b=n,x=Pte(t,n,T,S))}async function w(){C();let e=r();if(!e)return;e!==c&&(d(e),v=!1);let t=a();if(!t)return;let n=await Hte(t,e,{placement:f,middleware:s,strategy:p});m?.(n);let i=Us(e),l=tf(i,n.x),u=tf(i,n.y);if(nf(g,l)||(e.style.setProperty(`--x`,`${l}px`),g=l),nf(_,u)||(e.style.setProperty(`--y`,`${u}px`),_=u),o.hideWhenDetached&&(n.middlewareData.hide?.referenceHidden?(e.style.setProperty(`visibility`,`hidden`),e.style.setProperty(`pointer-events`,`none`)):(e.style.removeProperty(`visibility`),e.style.removeProperty(`pointer-events`))),!v){let t=e.firstElementChild;t&&(e.style.setProperty(`--z-index`,Js(t).zIndex),v=!0)}}async function T(){n.updatePosition?(await n.updatePosition({updatePosition:w,floatingElement:r()}),h?.({placed:!0})):await w()}return T(),()=>{x(),u?.(),l?.(),h?.({placed:!1})}}function sf(e,t,n={}){let{defer:r,...i}=n,a=r?al:e=>e(),o=[];return o.push(a(()=>{o.push(one(e,t,i))})),()=>{o.forEach(e=>e?.())}}var sne={bottom:`rotate(45deg)`,left:`rotate(135deg)`,top:`rotate(225deg)`,right:`rotate(315deg)`};function cne(e={}){let{placement:t,sameWidth:n,fitViewport:r,strategy:i=`absolute`}=e;return{arrow:{position:`absolute`,width:ef.arrowSize.reference,height:ef.arrowSize.reference,[ef.arrowSizeHalf.variable]:`calc(${ef.arrowSize.reference} / 2)`,[ef.arrowOffset.variable]:`calc(${ef.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?sne[t.split(`-`)[0]]:void 0,background:ef.arrowBg.reference,top:`0`,left:`0`,width:`100%`,height:`100%`,position:`absolute`,zIndex:`inherit`},floating:{position:i,isolation:`isolate`,minWidth:n?void 0:`max-content`,width:n?`var(--reference-width)`:void 0,maxWidth:r?`var(--available-width)`:void 0,maxHeight:r?`var(--available-height)`:void 0,pointerEvents:t?void 0:`none`,top:`0px`,left:`0px`,transform:t?`translate3d(var(--x), var(--y), 0)`:`translate3d(0, -100vh, 0)`,zIndex:`var(--z-index)`}}}var lne=Xu.extendWith(`view`),cf=W(`combobox`).parts(`root`,`clearTrigger`,`content`,`control`,`input`,`item`,`itemGroup`,`itemGroupLabel`,`itemIndicator`,`itemText`,`label`,`list`,`positioner`,`trigger`);cf.build();var une=cf.extendWith(`empty`),lf=W(`date-picker`).parts(`clearTrigger`,`content`,`control`,`input`,`label`,`monthSelect`,`nextTrigger`,`positioner`,`presetTrigger`,`prevTrigger`,`rangeText`,`root`,`table`,`tableBody`,`tableCell`,`tableCellTrigger`,`tableHead`,`tableHeader`,`tableRow`,`trigger`,`view`,`viewControl`,`viewTrigger`,`yearSelect`);lf.build();var dne=lf.extendWith(`view`,`valueText`),uf=W(`dialog`).parts(`trigger`,`backdrop`,`positioner`,`content`,`title`,`description`,`closeTrigger`),df=uf.build(),ff=e=>e.ids?.positioner??`dialog:${e.id}:positioner`,pf=e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,mf=e=>e.ids?.content??`dialog:${e.id}:content`,hf=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`dialog:${e.id}:trigger:${t}`:`dialog:${e.id}:trigger`:Wa(n)?n(t):n},gf=e=>e.ids?.title??`dialog:${e.id}:title`,_f=e=>e.ids?.description??`dialog:${e.id}:description`,fne=e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,vf=e=>e.getById(mf(e)),pne=e=>e.getById(ff(e)),mne=e=>e.getById(pf(e)),hne=e=>e.getById(gf(e)),gne=e=>e.getById(_f(e)),_ne=e=>e.getById(fne(e)),yf=e=>yl(e.getDoc(),`[data-scope="dialog"][data-part="trigger"][data-ownedby="${e.id}"]`),vne=(e,t)=>t==null?yf(e)[0]:e.getById(hf(e,t));function yne(e,t){let{state:n,send:r,context:i,prop:a,scope:o}=e,s=a(`aria-label`),c=n.matches(`open`),l=i.get(`triggerValue`);return{open:c,setOpen(e){n.matches(`open`)!==e&&r({type:e?`OPEN`:`CLOSE`})},triggerValue:l,setTriggerValue(e){r({type:`TRIGGER_VALUE.SET`,value:e})},getTriggerProps(e={}){let{value:n}=e,i=n==null?!1:l===n;return t.button({...df.trigger.attrs,dir:a(`dir`),id:hf(o,n),"data-ownedby":o.id,"data-value":n,"aria-haspopup":`dialog`,type:`button`,"aria-expanded":n==null?c:c&&i,"data-state":c?`open`:`closed`,"aria-controls":mf(o),"data-current":ws(i),onClick(e){e.defaultPrevented||r({type:c&&n!=null&&!i?`TRIGGER_VALUE.SET`:`TOGGLE`,value:n})}})},getBackdropProps(){return t.element({...df.backdrop.attrs,dir:a(`dir`),hidden:!c,id:pf(o),"data-state":c?`open`:`closed`})},getPositionerProps(){return t.element({...df.positioner.attrs,dir:a(`dir`),id:ff(o),style:Ao({pointerEvents:!c||!a(`modal`)?`none`:void 0})})},getContentProps(){let e=i.get(`rendered`);return t.element({...df.content.attrs,dir:a(`dir`),role:a(`role`),hidden:!c,id:mf(o),tabIndex:-1,"data-state":c?`open`:`closed`,"aria-modal":a(`modal`),"aria-label":s||void 0,"aria-labelledby":s||!e.title?void 0:gf(o),"aria-describedby":e.description?_f(o):void 0,style:Ao({pointerEvents:a(`modal`)?void 0:`auto`})})},getTitleProps(){return t.element({...df.title.attrs,dir:a(`dir`),id:gf(o)})},getDescriptionProps(){return t.element({...df.description.attrs,dir:a(`dir`),id:_f(o)})},getCloseTriggerProps(){return t.button({...df.closeTrigger.attrs,dir:a(`dir`),id:fne(o),type:`button`,onClick(e){e.defaultPrevented||(e.stopPropagation(),r({type:`CLOSE`}))}})}}}var bne=_s({props({props:e,scope:t}){let n=e.role===`alertdialog`,r=n?()=>_ne(t):void 0,i=typeof e.modal==`boolean`?e.modal:!0;return{role:`dialog`,modal:i,trapFocus:i,preventScroll:i,closeOnInteractOutside:i&&!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r,...e}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open`:`closed`},context({bindable:e,prop:t,scope:n}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}
10})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:vne(n,e)})}}))}},watch({track:e,action:t,prop:n}){e([()=>n(`open`)],()=>{t([`toggleVisibility`])})},states:{open:{entry:[`checkRenderedElements`,`syncZIndex`,`setInitialFocus`],effects:[`trackDismissableElement`,`trapFocus`,`preventScroll`,`hideContentBelow`],on:{"CONTROLLED.CLOSE":{target:`closed`},CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`]}}},closed:{on:{"CONTROLLED.OPEN":{target:`open`},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`]}],TOGGLE:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`,`setTriggerValue`]},{target:`open`,actions:[`invokeOnOpen`,`setTriggerValue`]}],"TRIGGER_VALUE.SET":{actions:[`setTriggerValue`]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e(`open`)!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return wee(()=>vf(e),{type:`dialog`,defer:!0,pointerBlocking:n(`modal`),exclude:yf(e),onInteractOutside(e){n(`onInteractOutside`)?.(e),n(`closeOnInteractOutside`)||e.preventDefault()},persistentElements:n(`persistentElements`),onFocusOutside:n(`onFocusOutside`),onPointerDownOutside:n(`onPointerDownOutside`),onRequestDismiss:n(`onRequestDismiss`),onEscapeKeyDown(e){n(`onEscapeKeyDown`)?.(e),n(`closeOnEscape`)||e.preventDefault()},onDismiss(){t({type:`CLOSE`,src:`interact-outside`})}})},preventScroll({scope:e,prop:t}){if(t(`preventScroll`))return Iee(e.getDoc())},trapFocus({scope:e,prop:t,context:n}){return t(`trapFocus`)?Pee(()=>vf(e),{preventScroll:!0,returnFocusOnDeactivate:!!t(`restoreFocus`),initialFocus:t(`initialFocusEl`),setReturnFocus:r=>{let i=t(`finalFocusEl`)?.();if(i)return i;let a=n.get(`triggerValue`);if(a){let t=vne(e,a);if(t)return t}return yf(e)[0]||r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t(`modal`)?Su(()=>[vf(e)],{defer:!0}):void 0}},actions:{setInitialFocus({prop:e,scope:t}){e(`trapFocus`)||al(()=>{rl({root:vf(t),getInitialEl:e(`initialFocusEl`)})?.focus({preventScroll:!0})})},checkRenderedElements({context:e,scope:t}){al(()=>{e.set(`rendered`,{title:!!hne(t),description:!!gne(t)})})},syncZIndex({scope:e}){al(()=>{let t=vf(e);if(!t)return;let n=Js(t);[pne(e),mne(e)].forEach(e=>{e?.style.setProperty(`--z-index`,n.zIndex),e?.style.setProperty(`--layer-index`,n.getPropertyValue(`--layer-index`))})})},invokeOnClose({prop:e}){e(`onOpenChange`)?.({open:!1})},invokeOnOpen({prop:e}){e(`onOpenChange`)?.({open:!0})},setTriggerValue({context:e,event:t}){t.value!==void 0&&e.set(`triggerValue`,t.value)},toggleVisibility({prop:e,send:t,event:n}){t({type:e(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:n})}}}}),xne=W(`editable`).parts(`root`,`area`,`label`,`preview`,`input`,`editTrigger`,`submitTrigger`,`cancelTrigger`,`control`);xne.build();var Sne=W(`field`).parts(`root`,`errorText`,`helperText`,`input`,`label`,`select`,`textarea`,`requiredIndicator`),bf=Sne.build(),Cne=W(`fieldset`).parts(`root`,`errorText`,`helperText`,`legend`);Cne.build();var wne=W(`file-upload`).parts(`root`,`dropzone`,`item`,`itemDeleteTrigger`,`itemGroup`,`itemName`,`itemPreview`,`itemPreviewImage`,`itemSizeText`,`label`,`trigger`,`clearTrigger`);wne.build();var Tne=W(`hoverCard`).parts(`arrow`,`arrowTip`,`trigger`,`positioner`,`content`);Tne.build();var Ene=W(`listbox`).parts(`label`,`input`,`item`,`itemText`,`itemIndicator`,`itemGroup`,`itemGroupLabel`,`content`,`root`,`valueText`);Ene.build();var Dne=Ene.extendWith(`empty`),One=W(`marquee`).parts(`root`,`viewport`,`content`,`edge`,`item`);One.build();var kne=W(`menu`).parts(`arrow`,`arrowTip`,`content`,`contextTrigger`,`indicator`,`item`,`itemGroup`,`itemGroupLabel`,`itemIndicator`,`itemText`,`positioner`,`separator`,`trigger`,`triggerItem`);kne.build();var Ane=W(`numberInput`).parts(`root`,`label`,`input`,`control`,`valueText`,`incrementTrigger`,`decrementTrigger`,`scrubber`);Ane.build();var jne=W(`pinInput`).parts(`root`,`label`,`input`,`control`);jne.build();var Mne=W(`popover`).parts(`arrow`,`arrowTip`,`anchor`,`trigger`,`indicator`,`positioner`,`content`,`title`,`description`,`closeTrigger`);Mne.build();var xf=W(`progress`).parts(`root`,`label`,`track`,`range`,`valueText`,`view`,`circle`,`circleTrack`,`circleRange`);xf.build();var Nne=W(`qr-code`).parts(`root`,`frame`,`pattern`,`overlay`,`downloadTrigger`);Nne.build();var Sf=W(`radio-group`).parts(`root`,`label`,`item`,`itemText`,`itemControl`,`indicator`);Sf.build();var Pne=W(`rating-group`).parts(`root`,`label`,`item`,`control`);Pne.build();var Fne=W(`scroll-area`).parts(`root`,`viewport`,`content`,`scrollbar`,`thumb`,`corner`);Fne.build();var Ine=Sf.rename(`segment-group`);Ine.build();var Lne=W(`select`).parts(`label`,`positioner`,`trigger`,`indicator`,`clearTrigger`,`item`,`itemText`,`itemIndicator`,`itemGroup`,`itemGroupLabel`,`list`,`content`,`root`,`control`,`valueText`);Lne.build();var Rne=W(`slider`).parts(`root`,`label`,`thumb`,`valueText`,`track`,`range`,`control`,`markerGroup`,`marker`,`draggingIndicator`),Cf=Rne.build(),zne=e=>e.ids?.root??`slider:${e.id}`,Bne=(e,t)=>e.ids?.thumb?.(t)??`slider:${e.id}:thumb:${t}`,wf=(e,t)=>
10e.ids?.hiddenInput?.(t)??`slider:${e.id}:input:${t}`,Vne=e=>e.ids?.control??`slider:${e.id}:control`,Hne=e=>e.ids?.track??`slider:${e.id}:track`,Une=e=>e.ids?.range??`slider:${e.id}:range`,Wne=e=>e.ids?.label??`slider:${e.id}:label`,Gne=e=>e.ids?.valueText??`slider:${e.id}:value-text`,Kne=(e,t)=>e.ids?.marker?.(t)??`slider:${e.id}:marker:${t}`,qne=e=>e.getById(zne(e)),Jne=(e,t)=>e.getById(Bne(e,t)),Yne=e=>yl(Qne(e),`[role=slider]`),Xne=e=>Yne(e)[0],Zne=(e,t)=>e.getById(wf(e,t)),Qne=e=>e.getById(Vne(e)),$ne=(e,t,n)=>t===`contain`?(n===`vertical`?e?.height??0:e?.width??0)/2:0,ere=(e,t)=>{let{context:n,prop:r,scope:i,refs:a}=e,o=Qne(i);if(!o)return;let s=a.get(`thumbDragOffset`);return bo(tre({x:t.x-(s?.x??0),y:t.y-(s?.y??0)},o,$ne(n.get(`thumbSize`),r(`thumbAlignment`),r(`orientation`))).getPercentValue({orientation:r(`orientation`),dir:r(`dir`),inverted:{y:!0}}),r(`min`),r(`max`),r(`step`))};function tre(e,t,n){let{left:r,top:i,width:a,height:o}=t.getBoundingClientRect(),s=a-n*2,c=o-n*2,l=r+n,u=i+n,d={x:e.x-l,y:e.y-u},f={x:s>0?vo(d.x/s):0,y:c>0?vo(d.y/c):0};function p(e={}){let{dir:t=`ltr`,orientation:n=`horizontal`,inverted:r}=e,i=typeof r==`object`?r.x:r,a=typeof r==`object`?r.y:r;return n===`horizontal`?t===`rtl`||i?1-f.x:f.x:a?1-f.y:f.y}return{offset:d,percent:f,getPercentValue:p}}var nre=(e,t)=>{t.forEach((t,n)=>{let r=Zne(e,n);r&&Fc(r,{value:t})})},rre=e=>({left:e?.offsetLeft??0,top:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0});function ire(e){return[e[0],e[e.length-1]]}function are(e){let{prop:t,computed:n}=e,r=n(`valuePercent`),[i,a]=ire(r);if(r.length===1){if(t(`origin`)===`center`){let e=r[0]<50;return{start:e?`${r[0]}%`:`50%`,end:e?`50%`:`${100-r[0]}%`}}return t(`origin`)===`end`?{start:`${a}%`,end:`0%`}:{start:`0%`,end:`${100-a}%`}}return{start:`${i}%`,end:`${100-a}%`}}function ore(e){let{computed:t}=e,n=t(`isVertical`),r=t(`isRtl`);return n?{position:`absolute`,bottom:`var(--slider-range-start)`,top:`var(--slider-range-end)`}:{position:`absolute`,[r?`right`:`left`]:`var(--slider-range-start)`,[r?`left`:`right`]:`var(--slider-range-end)`}}function sre(e,t){let{context:n,prop:r}=e,{height:i=0}=n.get(`thumbSize`)??{},a=Oo([r(`min`),r(`max`)],[-i/2,i/2]);return parseFloat(a(t).toFixed(2))}function cre(e,t){let{computed:n,context:r,prop:i}=e,{width:a=0}=r.get(`thumbSize`)??{};if(n(`isRtl`)){let e=Oo([i(`max`),i(`min`)],[-a/2,a/2]);return-1*parseFloat(e(t).toFixed(2))}let o=Oo([i(`min`),i(`max`)],[-a/2,a/2]);return parseFloat(o(t).toFixed(2))}function lre(e,t,n){let{computed:r,prop:i}=e;return i(`thumbAlignment`)===`center`?`${t}%`:`calc(${t}% - ${r(`isVertical`)?sre(e,n):cre(e,n)}px)`}function ure(e,t){let{prop:n}=e;return lre(e,yo(t,n(`min`),n(`max`))*100,t)}function dre(e){let{computed:t,prop:n}=e,r=`visible`;return n(`thumbAlignment`)===`contain`&&!t(`hasMeasuredThumbSize`)&&(r=`hidden`),r}function fre(e,t){let{computed:n,context:r}=e,i=n(`isVertical`)?`bottom`:`insetInlineStart`,a=r.get(`focusedIndex`);return{visibility:dre(e),position:`absolute`,transform:`var(--slider-thumb-transform)`,[i]:`var(--slider-thumb-offset-${t})`,zIndex:a===t?1:void 0}}function pre(){return{touchAction:`none`,userSelect:`none`,WebkitUserSelect:`none`,position:`relative`}}function mre(e){let{context:t,computed:n}=e,r=n(`isVertical`),i=n(`isRtl`),a=are(e),o=t.get(`thumbSize`);return{...t.get(`value`).reduce((t,n,r)=>{let i=ure(e,n);return{...t,[`--slider-thumb-offset-${r}`]:i}},{}),"--slider-thumb-width":ko(o?.width),"--slider-thumb-height":ko(o?.height),"--slider-thumb-transform":r?`translateY(50%)`:i?`translateX(50%)`:`translateX(-50%)`,"--slider-range-start":a.start,"--slider-range-end":a.end}}function hre(e,t){let{computed:n}=e,r=n(`isHorizontal`),i=n(`isRtl`);return{visibility:dre(e),position:`absolute`,pointerEvents:`none`,[r?`insetInlineStart`:`bottom`]:ure(e,t),translate:`var(--translate-x) var(--translate-y)`,"--translate-x":r?i?`50%`:`-50%`:`0%`,"--translate-y":r?`0%`:`50%`}}function gre(){return{userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`,position:`relative`}}function _re(e){let{index:t,values:n,min:r,max:i,gap:a}=e,o=n[t-1],s=n[t+1];return{min:o==null?r:o+a,max:s==null?i:s-a}}function Tf(e){return Math.round(e*1e10)/1e10}function Ef(e){let{index:t,value:n,values:r}=e,i=_re(e),a=r.slice();return a[t]=Tf(_o(n,i.min,i.max)),{values:a,index:t,swapped:!1}}function vre(e){let{index:t,value:n,values:r,min:i,max:a,gap:o}=e,s=r.slice();s[t]=Tf(_o(n,i+t*o,a-(r.length-1-t)*o));for(let e=t+1;e<r.length;e++){let t=s[e-1]+o;s[e]<t&&(s[e]=Tf(t))}for(let e=t-1;e>=0;e--){let t=s[e+1]-o;s[e]>t&&(s[e]=Tf(t))}return{values:s,index:t,swapped:!1}}function yre(e,t){let{index:n,value:r,values:i,gap:a}=e,o=i[n-1],s=i[n+1],c=s!=null&&r>=s&&r>t,l=o!=null&&r<=o&&r<t;if(!c&&!l)return Ef(e);let u=c?n+1:n-1,d=i.slice(),f=_re({...e,index:u});return d[u]=Tf(_o(r,f.min,f.max)),d[n]=i[u],c&&d[n]>d[u]-a?d[n]=Tf(d[u]-a):l&&d[n]<d[u]+a&&(d[n]=Tf(d[u]+a)),{values:d,index:u,swapped:!0}}function bre(e,t,n,r,i,a,o,s,c){if(r.length===1)return{values:[Tf(_o(n,i,a))],index:0,swapped:!1};let l={behavior:e,index:t,value:n,values:r,min:i,max:a,gap:o*s};switch(e){case`push`:return vre(l);case`swap`:return yre(l,c??r[t]);default:return Ef(l)}}function xre(e,t){return t.map((t,n)=>Of(e,t,n))}
10function Df(e,t){let{context:n,prop:r}=e,i=r(`step`)*r(`minStepsBetweenThumbs`);return Do(n.get(`value`),r(`min`),r(`max`),i)[t]}function Of(e,t,n){let{prop:r}=e,i=Df(e,n);return _o(So(t,r(`min`),r(`max`),r(`step`)),i.min,i.max)}function Sre(e,t,n){let{context:r,prop:i}=e,a=t??r.get(`focusedIndex`),o=Df(e,a),s=Eo(a,{...o,step:n??i(`step`),values:r.get(`value`)});return s[a]=_o(s[a],o.min,o.max),s}function Cre(e,t,n){let{context:r,prop:i}=e,a=t??r.get(`focusedIndex`),o=Df(e,a),s=To(a,{...o,step:n??i(`step`),values:r.get(`value`)});return s[a]=_o(s[a],o.min,o.max),s}function wre(e,t){let{context:n}=e,r=n.get(`value`),i=0,a=Math.abs(r[0]-t);for(let e=1;e<r.length;e++){let n=Math.abs(r[e]-t);n<=a&&(i=e,a=n)}return kf(e,i)}function kf(e,t){let{context:n,prop:r}=e,i=n.get(`value`),a=r(`max`);if(i[t]===a){let e=t;for(;e>0&&i[e-1]===a;)--e;return e}return t}function Tre(e,t){let{state:n,send:r,context:i,prop:a,computed:o,scope:s}=e,c=a(`aria-label`),l=a(`aria-labelledby`),u=i.get(`value`),d=i.get(`focusedIndex`),f=n.matches(`focus`),p=n.matches(`dragging`),m=o(`isDisabled`),h=a(`invalid`),g=o(`isInteractive`),_=a(`orientation`)===`horizontal`,v=a(`orientation`)===`vertical`;function y(e){return yo(e,a(`min`),a(`max`))}function b(e){return bo(e,a(`min`),a(`max`),a(`step`))}return{value:u,dragging:p,focused:f,setValue(e){r({type:`SET_VALUE`,value:e})},getThumbValue(e){return u[e]},setThumbValue(e,t){r({type:`SET_VALUE`,index:e,value:t})},getValuePercent:y,getPercentValue:b,getThumbPercent(e){return y(u[e])},setThumbPercent(e,t){r({type:`SET_VALUE`,index:e,value:b(t)})},getThumbMin(t){return Df(e,t).min},getThumbMax(t){return Df(e,t).max},increment(e){r({type:`INCREMENT`,index:e})},decrement(e){r({type:`DECREMENT`,index:e})},focus(){g&&r({type:`FOCUS`,index:0})},getLabelProps(){return t.label({...Cf.label.attrs,dir:a(`dir`),"data-disabled":ws(m),"data-orientation":a(`orientation`),"data-invalid":ws(h),"data-dragging":ws(p),"data-focus":ws(f),id:Wne(s),htmlFor:wf(s,0),onClick(e){g&&(e.preventDefault(),Xne(s)?.focus())},style:{userSelect:`none`,WebkitUserSelect:`none`}})},getRootProps(){return t.element({...Cf.root.attrs,"data-disabled":ws(m),"data-orientation":a(`orientation`),"data-dragging":ws(p),"data-invalid":ws(h),"data-focus":ws(f),id:zne(s),dir:a(`dir`),style:mre(e)})},getValueTextProps(){return t.element({...Cf.valueText.attrs,dir:a(`dir`),"data-disabled":ws(m),"data-orientation":a(`orientation`),"data-invalid":ws(h),"data-focus":ws(f),id:Gne(s)})},getTrackProps(){return t.element({...Cf.track.attrs,dir:a(`dir`),id:Hne(s),"data-disabled":ws(m),"data-invalid":ws(h),"data-dragging":ws(p),"data-orientation":a(`orientation`),"data-focus":ws(f),style:{position:`relative`}})},getThumbProps(n){let{index:i=0,name:o}=n,h=u[i],y=Df(e,i),b=a(`getAriaValueText`)?.({value:h,index:i}),x=Array.isArray(c)?c[i]:c,S=Array.isArray(l)?l[i]:l;return t.element({...Cf.thumb.attrs,dir:a(`dir`),"data-index":i,"data-name":o,id:Bne(s,i),"data-disabled":ws(m),"data-orientation":a(`orientation`),"data-focus":ws(f&&d===i),"data-dragging":ws(p&&d===i),draggable:!1,"aria-disabled":Ts(m),"aria-label":x,"aria-labelledby":S??Wne(s),"aria-orientation":a(`orientation`),"aria-valuemax":y.max,"aria-valuemin":y.min,"aria-valuenow":u[i],"aria-valuetext":b,role:`slider`,tabIndex:m?void 0:0,style:fre(e,i),onPointerDown(e){if(!g||!yc(e))return;let t=e.currentTarget.getBoundingClientRect(),n={x:t.left+t.width/2,y:t.top+t.height/2};r({type:`THUMB_POINTER_DOWN`,index:i,offset:{x:e.clientX-n.x,y:e.clientY-n.y}}),e.stopPropagation()},onBlur(){g&&r({type:`BLUR`})},onFocus(){g&&r({type:`FOCUS`,index:i})},onKeyDown(e){if(e.defaultPrevented||!g)return;let t=kc(e)*a(`step`),n={ArrowUp(){_||r({type:`ARROW_INC`,step:t,src:`ArrowUp`})},ArrowDown(){_||r({type:`ARROW_DEC`,step:t,src:`ArrowDown`})},ArrowLeft(){v||r({type:`ARROW_DEC`,step:t,src:`ArrowLeft`})},ArrowRight(){v||r({type:`ARROW_INC`,step:t,src:`ArrowRight`})},PageUp(){r({type:`ARROW_INC`,step:t,src:`PageUp`})},PageDown(){r({type:`ARROW_DEC`,step:t,src:`PageDown`})},Home(){r({type:`HOME`})},End(){r({type:`END`})}}[Tc(e,{dir:a(`dir`),orientation:a(`orientation`)})];n&&(n(e),e.preventDefault(),e.stopPropagation())}})},getHiddenInputProps(e){let{index:n=0,name:r}=e;return t.input({name:r??(a(`name`)?a(`name`)+(u.length>1?`[]`:``):void 0),form:a(`form`),type:`text`,hidden:!0,defaultValue:u[n],id:wf(s,n)})},getRangeProps(){return t.element({id:Une(s),...Cf.range.attrs,dir:a(`dir`),"data-dragging":ws(p),"data-focus":ws(f),"data-invalid":ws(h),"data-disabled":ws(m),"data-orientation":a(`orientation`),style:ore(e)}
10)},getControlProps(){return t.element({...Cf.control.attrs,dir:a(`dir`),id:Vne(s),"data-dragging":ws(p),"data-disabled":ws(m),"data-orientation":a(`orientation`),"data-invalid":ws(h),"data-focus":ws(f),style:pre(),onPointerDown(e){g&&yc(e)&&(xc(e)||(r({type:`POINTER_DOWN`,point:Ac(e)}),e.preventDefault(),e.stopPropagation()))}})},getMarkerGroupProps(){return t.element({...Cf.markerGroup.attrs,role:`presentation`,dir:a(`dir`),"aria-hidden":!0,"data-orientation":a(`orientation`),style:gre()})},getMarkerProps(n){let r=hre(e,n.value),i;return i=n.value<La(u)?`under-value`:n.value>Ra(u)?`over-value`:`at-value`,t.element({...Cf.marker.attrs,id:Kne(s,n.value),role:`presentation`,dir:a(`dir`),"data-orientation":a(`orientation`),"data-value":n.value,"data-disabled":ws(m),"data-state":i,style:r})},getDraggingIndicatorProps(n){let{index:r=0}=n,i=r===d&&p;return t.element({...Cf.draggingIndicator.attrs,role:`presentation`,dir:a(`dir`),hidden:!i,"data-orientation":a(`orientation`),"data-state":i?`open`:`closed`,style:fre(e,r)})}}}var Ere=(e,t)=>e?.width===t?.width&&e?.height===t?.height,Af=(e,t,n,r,i)=>Do(e,t,n,i*r).map(e=>{let i=_o(So(e.value,e.min,e.max,r),e.min,e.max);if(!ho(i,t,n))throw Error("[zag-js/slider] The configured `min`, `max`, `step` or `minStepsBetweenThumbs` values are invalid");return i}),Dre=_s({props({props:e}){let t=e.min??0,n=e.max??100,r=e.step??1,i=e.defaultValue??[t],a=e.minStepsBetweenThumbs??0;return{dir:`ltr`,thumbAlignment:`contain`,origin:`start`,orientation:`horizontal`,thumbCollisionBehavior:`none`,minStepsBetweenThumbs:a,...e,defaultValue:Af(i,t,n,r,a),value:e.value?Af(e.value,t,n,r,a):void 0,max:n,step:r,min:t}},initialState(){return`idle`},context({prop:e,bindable:t,getContext:n}
10){return{thumbSize:t(()=>({defaultValue:e(`thumbSize`)||null})),value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),isEqual:Va,hash(e){return e.join(`,`)},onChange(t){e(`onValueChange`)?.({value:t})}})),focusedIndex:t(()=>({defaultValue:-1,onChange(t){let r=n();e(`onFocusChange`)?.({focusedIndex:t,value:r.get(`value`)})}})),fieldsetDisabled:t(()=>({defaultValue:!1}))}},refs(){return{thumbDragOffset:null,thumbDragStartValue:null}},computed:{isHorizontal:({prop:e})=>e(`orientation`)===`horizontal`,isVertical:({prop:e})=>e(`orientation`)===`vertical`,isRtl:({prop:e})=>e(`orientation`)===`horizontal`&&e(`dir`)===`rtl`,isDisabled:({context:e,prop:t})=>!!t(`disabled`)||e.get(`fieldsetDisabled`),isInteractive:({prop:e,computed:t})=>!(e(`readOnly`)||t(`isDisabled`)),hasMeasuredThumbSize:({context:e})=>e.get(`thumbSize`)!=null,valuePercent:qo(({context:e,prop:t})=>[e.get(`value`),t(`min`),t(`max`)],([e,t,n])=>e.map(e=>100*yo(e,t,n)))},watch({track:e,action:t,context:n,computed:r,send:i}){e([()=>n.hash(`value`)],()=>{t([`syncInputElements`,`dispatchChangeEvent`])}),e([()=>r(`isDisabled`)],()=>{r(`isDisabled`)&&i({type:`POINTER_CANCEL`})})},effects:[`trackFormControlState`,`trackThumbSize`],on:{SET_VALUE:[{guard:`hasIndex`,actions:[`setValueAtIndex`,`invokeOnChangeEnd`]},{actions:[`setValue`,`invokeOnChangeEnd`]}],INCREMENT:{actions:[`incrementThumbAtIndex`,`invokeOnChangeEnd`]},DECREMENT:{actions:[`decrementThumbAtIndex`,`invokeOnChangeEnd`]}},states:{idle:{on:{POINTER_DOWN:{target:`dragging`,actions:[`setClosestThumbIndex`,`setThumbDragStartValue`,`setPointerValue`,`focusActiveThumb`]},FOCUS:{target:`focus`,actions:[`setFocusedIndex`]},THUMB_POINTER_DOWN:{target:`dragging`,actions:[`setFocusedIndex`,`setThumbDragOffset`,`setThumbDragStartValue`,`focusActiveThumb`]}}},focus:{entry:[`focusActiveThumb`],on:{POINTER_DOWN:{target:`dragging`,actions:[`setClosestThumbIndex`,`setThumbDragStartValue`,`setPointerValue`,`focusActiveThumb`]},THUMB_POINTER_DOWN:{target:`dragging`,actions:[`setFocusedIndex`,`setThumbDragOffset`,`setThumbDragStartValue`,`focusActiveThumb`]},ARROW_DEC:{actions:[`decrementThumbAtIndex`,`invokeOnChangeEnd`]},ARROW_INC:{actions:[`incrementThumbAtIndex`,`invokeOnChangeEnd`]},HOME:{actions:[`setFocusedThumbToMin`,`invokeOnChangeEnd`]},END:{actions:[`setFocusedThumbToMax`,`invokeOnChangeEnd`]},BLUR:{target:`idle`,actions:[`clearFocusedIndex`]}}},dragging:{entry:[`focusActiveThumb`],effects:[`trackPointerMove`],on:{POINTER_UP:{target:`focus`,actions:[`invokeOnChangeEnd`,`clearThumbDragOffset`,`clearThumbDragStartValue`]},POINTER_MOVE:{actions:[`setPointerValue`]},POINTER_CANCEL:{target:`idle`,actions:[`clearFocusedIndex`,`clearThumbDragOffset`,`clearThumbDragStartValue`]}}}},implementations:{guards:{hasIndex:({event:e})=>e.index!=null},effects:{trackFormControlState({context:e,scope:t}){return iee(qne(t),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){e.set(`value`,e.initial(`value`))}})},trackPointerMove({scope:e,send:t}){return vl(e.getDoc(),{onPointerMove(e){t({type:`POINTER_MOVE`,point:e.point})},onPointerUp(){t({type:`POINTER_UP`})}})},trackThumbSize({context:e,scope:t,prop:n}){if(n(`thumbAlignment`)!==`contain`||n(`thumbSize`))return;let r=t=>{let n=jo(rre(t),[`width`,`height`]);Ere(e.get(`thumbSize`),n)||e.set(`thumbSize`,n)},i=Yne(t);return i.forEach(r),no(...i.map(e=>xl.observe(e,()=>r(e))))}},actions:{dispatchChangeEvent({context:e,scope:t}){nre(t,e.get(`value`))},syncInputElements({context:e,scope:t}){e.get(`value`).forEach((e,n)=>{Pc(Zne(t,n),e.toString())})},invokeOnChangeEnd({prop:e,context:t}){queueMicrotask(()=>{e(`onValueChangeEnd`)?.({value:t.get(`value`)})})},setClosestThumbIndex(e){let{context:t,event:n}=e,r=ere(e,n.point);if(r==null)return;let i=wre(e,r);t.set(`focusedIndex`,i)},setFocusedIndex(e){let{context:t,event:n}=e,r=kf(e,n.index);t.set(`focusedIndex`,r)},clearFocusedIndex({context:e}){e.set(`focusedIndex`,-1)},setThumbDragOffset(e){let{refs:t,event:n}=e;t.set(`thumbDragOffset`,n.offset??null)},clearThumbDragOffset({refs:e}){e.set(`thumbDragOffset`,null)},setThumbDragStartValue({refs:e,context:t}){e.set(`thumbDragStartValue`,t.get(`value`).slice())},clearThumbDragStartValue({refs:e}){e.set(`thumbDragStartValue`,null)},setPointerValue(e){queueMicrotask(()=>{let{context:t,event:n,prop:r,refs:i}=e,a=ere(e,n.point);if(a==null)return;let o=t.get(`focusedIndex`),s=i.get(`thumbDragStartValue`),c=bre(r(`thumbCollisionBehavior`),o,a,t.get(`value`),r(`min`),r(`max`),r(`step`),r(`minStepsBetweenThumbs`),s?.[o]);c.swapped&&t.set(`focusedIndex`,c.index),t.set(`value`,c.values)})},focusActiveThumb({scope:e,context:t}){al(()=>
10{Jne(e,t.get(`focusedIndex`))?.focus({preventScroll:!0})})},decrementThumbAtIndex(e){let{context:t,event:n}=e,r=Sre(e,n.index,n.step);t.set(`value`,r)},incrementThumbAtIndex(e){let{context:t,event:n}=e,r=Cre(e,n.index,n.step);t.set(`value`,r)},setFocusedThumbToMin(e){let{context:t}=e,n=t.get(`focusedIndex`),{min:r}=Df(e,n);t.set(`value`,e=>Co(e,n,r))},setFocusedThumbToMax(e){let{context:t}=e,n=t.get(`focusedIndex`),{max:r}=Df(e,n);t.set(`value`,e=>Co(e,n,r))},setValueAtIndex(e){let{context:t,event:n}=e,r=Of(e,n.value,n.index);t.set(`value`,e=>Co(e,n.index,r))},setValue(e){let{context:t,event:n}=e,r=xre(e,n.value);t.set(`value`,r)}}}}),jf=W(`splitter`).parts(`root`,`panel`,`resizeTrigger`,`resizeTriggerIndicator`);jf.build();var Mf=W(`switch`).parts(`root`,`label`,`control`,`thumb`);Mf.build();var Nf=W(`tagsInput`).parts(`root`,`label`,`control`,`input`,`clearTrigger`,`item`,`itemPreview`,`itemInput`,`itemText`,`itemDeleteTrigger`);Nf.build();var Ore=e=>{if(!e)return;let t=Js(e),n=Us(e),r=Vs(e),i=()=>{requestAnimationFrame(()=>{e.style.height=`auto`;let n;n=t.boxSizing===`content-box`?e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!==`none`&&n>parseFloat(t.maxHeight)?(t.overflowY===`hidden`&&(e.style.overflowY=`scroll`),n=parseFloat(t.maxHeight)):t.overflowY!==`hidden`&&(e.style.overflowY=`hidden`),e.style.height=`${n}px`})};e.addEventListener(`input`,i),e.form?.addEventListener(`reset`,i);let a=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),`value`);a&&Object.defineProperty(e,"value",{...a,set(t){let r=a.get?.call(this);a.set?.call(this,t),i(),r!==t&&queueMicrotask(()=>{e.dispatchEvent(new n.InputEvent(`input`,{bubbles:!0}))})}});let o=new n.ResizeObserver(()=>{requestAnimationFrame(()=>i())});o.observe(e);let s=new n.MutationObserver(()=>i());return s.observe(e,{attributes:!0,attributeFilter:[`rows`,`placeholder`]}),r.fonts?.addEventListener(`loadingdone`,i),()=>{e.removeEventListener(`input`,i),e.form?.removeEventListener(`reset`,i),r.fonts?.removeEventListener(`loadingdone`,i),o.disconnect(),s.disconnect()}},Pf=W(`tooltip`).parts(`trigger`,`arrow`,`arrowTip`,`positioner`,`content`),Ff=Pf.build(),If=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`tooltip:${e.id}:trigger:${t}`:`tooltip:${e.id}:trigger`:Wa(n)?n(t):n},kre=e=>e.ids?.content??`tooltip:${e.id}:content`,Are=e=>e.ids?.arrow??`tooltip:${e.id}:arrow`,Lf=e=>e.ids?.positioner??`tooltip:${e.id}:popper`,Rf=e=>e.getById(Lf(e)),jre=e=>yl(e.getDoc(),`[data-scope="tooltip"][data-part="trigger"][data-ownedby="${e.id}"]`),zf=(e,t)=>t==null?jre(e)[0]:e.getById(If(e,t)),Bf=Mo({id:null,prevId:null,instant:!1});function Mre(e,t){let{state:n,context:r,send:i,scope:a,prop:o,event:s}=e,c=o(`id`),l=!!o(`aria-label`),u=n.matches(`open`,`closing`),d=r.get(`triggerValue`),f=kre(a),p=o(`disabled`),m=cne({...o(`positioning`),placement:r.get(`currentPlacement`)});return{open:u,setOpen(e){n.matches(`open`,`closing`)!==e&&i({type:e?`open`:`close`})},triggerValue:d,setTriggerValue(e){i({type:`triggerValue.set`,value:e??void 0})},reposition(e={}){i({type:`positioning.set`,options:e})},getTriggerProps(e={}){let{value:n}=e,r=n==null?!1:d===n,s=If(a,n);return t.button({...Ff.trigger.attrs,id:s,"data-ownedby":a.id,"data-value":n,"data-current":ws(r),dir:o(`dir`),"data-expanded":ws(u),"data-state":u?`open`:`closed`,"aria-describedby":u?f:void 0,onClick(e){e.defaultPrevented||p||o(`closeOnClick`)&&i({type:u&&n!=null&&!r?`triggerValue.set`:`close`,src:`trigger.click`,value:n,triggerId:s})},onFocus(e){e.defaultPrevented||p||qu()&&i({type:u&&n!=null&&!r?`triggerValue.set`:`open`,src:`trigger.focus`,value:n,triggerId:s})},onBlur(e){e.defaultPrevented||p||c===Bf.get(`id`)&&((e.relatedTarget??a.getDoc().activeElement)?.closest(`[data-ownedby="${a.id}"]`)??i({type:`close`,src:`trigger.blur`,value:n,triggerId:s}))},onPointerDown(e){e.defaultPrevented||p||yc(e)&&o(`closeOnPointerDown`)&&c===Bf.get(`id`)&&i({type:`close`,src:`trigger.pointerdown`,value:n,triggerId:s})},onPointerMove(e){e.defaultPrevented||p||e.pointerType!==`touch`&&i({type:u&&n!=null&&!r?`triggerValue.set`:`pointer.move`,value:n,triggerId:s})},onPointerOver(e){e.defaultPrevented||p||e.pointerType!==`touch`&&i({type:`pointer.move`,value:n,triggerId:s})},onPointerLeave(){p||i({type:`pointer.leave`})},onPointerCancel(){p||i({type:`pointer.leave`})}})},getArrowProps(){return t.element({id:Are(a),...Ff.arrow.attrs,dir:o(`dir`),style:m.arrow})},getArrowTipProps(){return t.element({...Ff.arrowTip.attrs,dir:o(`dir`),style:m.arrowTip})},getPositionerProps(){return t.element({id:Lf(a),...Ff.positioner.attrs,dir:o(`dir`),style:m.floating})},getContentProps(){let e=Bf.get(`id`)===c,n=Bf.get(`prevId`)===c,a=Bf.get(`instant`)&&(u&&e||n);return t.element({...Ff.content.attrs,dir:o(`dir`),hidden:!u,"data-state":u?`open`:`closed`,"data-instant":ws(a),role:l?void 0:`tooltip`,id:l?void 0:f,"data-
10placement":r.get(`currentPlacement`),onPointerEnter(){i({type:`content.pointer.move`})},onPointerLeave(){i({type:`content.pointer.leave`})},style:{pointerEvents:o(`interactive`)?`auto`:`none`}})}}}var{and:Nre,not:Vf}=gs(),Pre=_s({initialState:({prop:e})=>e(`open`)||e(`defaultOpen`)?`open`:`closed`,props({props:e}){Io(e,[`id`]);let t=e.closeOnClick??!0,n=e.closeOnPointerDown??t;return{openDelay:400,closeDelay:150,closeOnEscape:!0,interactive:!1,closeOnScroll:!0,disabled:!1,...e,closeOnPointerDown:n,closeOnClick:t,positioning:{placement:`bottom`,...e.positioning}}},effects:[`trackFocusVisible`,`trackStore`],context:({bindable:e,prop:t,scope:n})=>({currentPlacement:e(()=>({defaultValue:void 0})),hasPointerMoveOpened:e(()=>({defaultValue:null})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:zf(n,e)})}}))}),watch({track:e,action:t,prop:n}){e([()=>n(`disabled`)],()=>{t([`closeIfDisabled`])}),e([()=>n(`open`)],()=>{t([`toggleVisibility`])}),e([()=>n(`triggerValue`)],()=>{t([`repositionImmediate`])})},on:{"triggerValue.set":{actions:[`setTriggerValue`,`repositionImmediate`]}},states:{closed:{entry:[`clearGlobalId`],on:{"controlled.open":{target:`open`},open:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`invokeOnOpen`]}],"pointer.leave":{actions:[`clearPointerMoveOpened`]},"pointer.move":[{guard:Nre(`noVisibleTooltip`,Vf(`hasPointerMoveOpened`)),target:`opening`,actions:[`setTriggerValue`]},{guard:Vf(`hasPointerMoveOpened`),target:`open`,actions:[`setPointerMoveOpened`,`invokeOnOpen`,`setTriggerValue`]}]}},opening:{effects:[`trackScroll`,`trackPointerlockChange`,`waitForOpenDelay`],on:{"after.openDelay":[{guard:`isOpenControlled`,actions:[`setPointerMoveOpened`,`invokeOnOpen`]},{target:`open`,actions:[`setPointerMoveOpened`,`invokeOnOpen`]}],"controlled.open":{target:`open`},"controlled.close":{target:`closed`},open:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`invokeOnOpen`]}],"pointer.leave":[{guard:`isOpenControlled`,actions:[`clearPointerMoveOpened`,`invokeOnClose`,`toggleVisibility`]},{target:`closed`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]}],close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`,`toggleVisibility`]},{target:`closed`,actions:[`invokeOnClose`]}]}},open:{effects:[`trackEscapeKey`,`trackScroll`,`trackPointerlockChange`,`trackPositioning`],entry:[`setGlobalId`],on:{"controlled.close":{target:`closed`},close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"pointer.leave":[{guard:`isVisible`,target:`closing`,actions:[`clearPointerMoveOpened`]},{guard:`isOpenControlled`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]},{target:`closed`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]}],"content.pointer.leave":{guard:`isInteractive`,target:`closing`},"positioning.set":{actions:[`reposition`]},"triggerValue.set":{target:`closing`,actions:[`setTriggerValue`,`immediateReopen`]}}},closing:{effects:[`trackPositioning`,`waitForCloseDelay`],on:{"after.closeDelay":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"controlled.close":{target:`closed`},"controlled.open":{target:`open`},close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"pointer.move":[{guard:`isOpenControlled`,actions:[`setPointerMoveOpened`,`setTriggerValue`,`invokeOnOpen`,`toggleVisibility`]},{target:`open`,actions:[`setPointerMoveOpened`,`setTriggerValue`,`invokeOnOpen`]}],"triggerValue.set":{target:`open`,actions:[`setTriggerValue`,`repositionImmediate`]},reopen:{target:`open`},"content.pointer.move":{guard:`isInteractive`,target:`open`},"positioning.set":{actions:[`reposition`]}}}},implementations:{guards:{noVisibleTooltip:()=>Bf.get(`id`)===null,isVisible:({prop:e})=>e(`id`)===Bf.get(`id`),isInteractive:({prop:e})=>!!e(`interactive`),hasPointerMoveOpened:({context:e})=>!!e.get(`hasPointerMoveOpened`),isOpenControlled:({prop:e})=>e(`open`)!==void 0},actions:{setGlobalId:({prop:e})=>{let t=Bf.get(`id`),n=t!==null&&t!==e(`id`);Bf.update({id:e(`id`),prevId:n?t:null,instant:n})},clearGlobalId:({prop:e})=>{e(`id`)===Bf.get(`id`)&&Bf.update({id:null,prevId:null,instant:!1})},invokeOnOpen:({prop:e})=>{e(`onOpenChange`)?.({open:!0})},invokeOnClose:({prop:e})=>{e(`onOpenChange`)?.({open:!1})},closeIfDisabled:({prop:e,send:t})=>{e(`disabled`)&&t({type:`close`,src:`disabled.change`})},reposition:({context:e,event:t,prop:n,scope:r})=>{t.type===`positioning.set`&&sf(()=>zf(r,e.get(`triggerValue`)),()=>Rf(r),{...n(`positioning`),...t.options,listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},repositionImmediate:({context:e,event:t,prop:n,scope:r})=>{let i=t.value??e.get(`triggerValue`);return sf(()=>zf(r,i),()=>Rf(r),{...n(`positioning`),onComplete(t){e.set(`currentPlacement`,t.placement)}})},toggleVisibility:({prop:e,event:t,send:n})=>{queueMicrotask(()=>{n({type:e(`open`)?`controlled.open`:`controlled.close`,previousEvent:t})})},setPointerMoveOpened:({context:e,event:t})=>{let n=t.triggerId??t.previousEvent?.triggerId;e.set(`hasPointerMoveOpened`,n??null)},clearPointerMoveOpened:({context:e})=>{e.set(`hasPointerMoveOpened`,null)},setTriggerValue:({context:e,event:t})=>{t.value!==void 0&&e.set(`triggerValue`,t.value)},immediateReopen:({send:e})=>{queueMicrotask(()=>{e({type:`reopen`})})}},effects:{trackFocusVisible:({scope:e})=>Wee({root:e.getRootNode?.()}),trackPositioning:({context:e,prop:t,scope:n})=>(e.get(`currentPlacement`)||e.set(`currentPlacement`,t(`positioning`).placement),sf(()=>zf(n,e.get(`triggerValue`)),()=>Rf(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})),trackPointerlockChange:({send:e,scope:t})=>jc(t.getDoc(),`pointerlockchange`,()=>e({type:`close`,src:`pointerlock:change`}),!1),trackScroll:({send:e,prop:t,scope:n,context:r})=>{if(!t(`closeOnScroll`))return;let i=zf(n,r.get(`triggerValue`));if(!i)return;let a=cl(i).map(t=>jc(t,`scroll`,()=>{e({type:`close`,src:`scroll`})},{passive:!0,capture:!0}));return()=>
10{a.forEach(e=>e?.())}},trackStore:({prop:e,send:t})=>{let n;return queueMicrotask(()=>{n=Bf.subscribe(()=>{Bf.get(`id`)!==e(`id`)&&t({type:`close`,src:`id.change`})})}),()=>n?.()},trackEscapeKey:({send:e,prop:t})=>t(`closeOnEscape`)?jc(document,`keydown`,t=>{vc(t)||t.key===`Escape`&&(t.stopPropagation(),e({type:`close`,src:`keydown.escape`}))},!0):void 0,waitForOpenDelay:({send:e,prop:t,event:n})=>{let r=setTimeout(()=>{e({type:`after.openDelay`,previousEvent:n})},t(`openDelay`));return()=>clearTimeout(r)},waitForCloseDelay:({send:e,prop:t,event:n})=>{let r=setTimeout(()=>{e({type:`after.closeDelay`,previousEvent:n})},t(`closeDelay`));return()=>clearTimeout(r)}}}}),Hf=W(`tree-view`).parts(`branch`,`branchContent`,`branchControl`,`branchIndentGuide`,`branchIndicator`,`branchText`,`branchTrigger`,`item`,`itemIndicator`,`itemText`,`label`,`nodeCheckbox`,`nodeRenameInput`,`root`,`tree`);Hf.build();var[Uf,Fre]=Ro({name:`RenderStrategyContext`,hookName:`useRenderStrategyContext`,providerName:`<RenderStrategyPropsProvider />`}),Wf=e=>Rl()(e,[`lazyMount`,`unmountOnExit`]),[Ire,Lre]=Ro({name:`FieldsetContext`,hookName:`useFieldsetContext`,providerName:`<FieldsetProvider />`,strict:!1}),Rre=typeof window<`u`?_.useLayoutEffect:_.useEffect,[Gf,Kf]=Ro({name:`FieldContext`,hookName:`useFieldContext`,providerName:`<FieldProvider />`,strict:!1}),zre=e=>e.children(Kf()),qf=(0,_.forwardRef)((e,t)=>{let n=Kf(),r=Ko(n.getErrorTextProps(),e);return n?.invalid?(0,B.jsx)(Al.span,{...r,ref:t}):null});qf.displayName=`FieldErrorText`;var Jf=(0,_.forwardRef)((e,t)=>{let n=Ko(Kf()?.getHelperTextProps(),e);return(0,B.jsx)(Al.span,{...n,ref:t})});Jf.displayName=`FieldHelperText`;var Yf=(0,_.forwardRef)((e,t)=>{let n=Ko(Kf()?.getInputProps(),e);return(0,B.jsx)(Al.input,{...n,ref:t})});Yf.displayName=`FieldInput`;var Xf=e=>{let{value:t,children:n}=e,r=Kf();return(0,B.jsx)(Gf,{value:(0,_.useMemo)(()=>{if(!r)throw Error(`Field.Item must be used within Field.Root`);let e=`field::${r.ids.control}::item::${t}`,n=`${e}::label`,i=()=>({...r.getInputProps(),id:e});return{...r,ids:{...r.ids,control:e,label:n},getLabelProps:()=>({...r.getLabelProps(),id:n,htmlFor:e}),getInputProps:()=>({...i(),...bf.input.attrs}),getSelectProps:()=>({...i(),...bf.select.attrs}),getTextareaProps:()=>({...i(),...bf.textarea.attrs})}},[r,t]),children:n})};Xf.displayName=`FieldItem`;var Zf=(0,_.forwardRef)((e,t)=>{let n=Ko(Kf()?.getLabelProps(),e);return(0,B.jsx)(Al.label,{...n,ref:t})});Zf.displayName=`FieldLabel`;var Qf=(0,_.forwardRef)(({fallback:e,...t},n)=>{let r=Kf();if(!r.required)return e;let i=Ko(r.getRequiredIndicatorProps(),t);return(0,B.jsx)(Al.span,{...i,ref:n,children:t.children??`*`})});Qf.displayName=`FieldRequiredIndicator`;var Bre=(e={})=>{let t=Lre(),n=Bo(),{ids:r,target:i,disabled:a=!!t?.disabled,invalid:o=!1,readOnly:s=!1,required:c=!1}=e,[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(!1),p=(0,_.useId)(),m=e.id??p,h=(0,_.useRef)(null),g=r?.control??`field::${m}`,v=r?.errorText??`field::${m}::error-text`,y=r?.helperText??`field::${m}::helper-text`,b=r?.label??`field::${m}::label`;Rre(()=>{let e=h.current;if(!e)return;let t=()=>{let e=n.getRootNode();u(!!e.getElementById(v)),f(!!e.getElementById(y))};t();let r=new(n.getWindow()).MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0}),()=>r.disconnect()},[n,v,y]);let x=(0,_.useMemo)(()=>{let e=[];return l&&o&&e.push(v),d&&e.push(y),e.join(` `)||void 0},[o,v,y,l,d]),S=(0,_.useMemo)(()=>()=>({...bf.root.attrs,id:g,ref:h,role:`group`,"data-disabled":ws(a),"data-invalid":ws(o),"data-readonly":ws(s)}),[a,o,s,g]),C=i?`field::${m}::item::${i}`:void 0,w=(0,_.useMemo)(()=>()=>({...bf.label.attrs,id:b,"data-disabled":ws(a),"data-invalid":ws(o),"data-readonly":ws(s),"data-required":ws(c),htmlFor:C??m}),[a,o,s,c,m,b,C]),T=(0,_.useMemo)(()=>()=>({"aria-describedby":x,"aria-invalid":Ts(o),"data-invalid":ws(o),"data-required":ws(c),"data-readonly":ws(s),id:m,required:c,disabled:a,readOnly:s}),[x,o,c,s,m,a]),E=(0,_.useMemo)(()=>()=>({...T(),...bf.input.attrs}),[T]),D=(0,_.useMemo)(()=>()=>({...T(),...bf.textarea.attrs}),[T]),O=(0,_.useMemo)(()=>()=>({...T(),...bf.select.attrs}),[T]),k=(0,_.useMemo)(()=>()=>({id:y,...bf.helperText.attrs,"data-disabled":ws(a)}),[a,y]),A=(0,_.useMemo)(()=>()=>({id:v,...bf.errorText.attrs,"aria-live":`polite`}),[v]),j=(0,_.useMemo)(()=>()=>({"aria-hidden":!0,...bf.requiredIndicator.attrs}),[]);return{ariaDescribedby:x,ids:{root:g,control:m,label:b,errorText:v,helperText:y},refs:{rootRef:h},disabled:a,invalid:o,readOnly:s,required:c,getLabelProps:w,getRootProps:S,getInputProps:E,getTextareaProps:D,getSelectProps:O,getHelperTextProps:k,getErrorTextProps:A,getRequiredIndicatorProps:j}},Vre=Rl(),$f=(0,_.forwardRef)((e,t)=>
10{let[n,r]=Vre(e,[`id`,`ids`,`disabled`,`invalid`,`readOnly`,`required`,`target`]),i=Bre(n),a=Ko(i.getRootProps(),r);return(0,B.jsx)(Gf,{value:i,children:(0,B.jsx)(Al.div,{...a,ref:Vo(t,i.refs.rootRef)})})});$f.displayName=`FieldRoot`;var Hre=Rl(),ep=(0,_.forwardRef)((e,t)=>{let[{value:n},r]=Hre(e,[`value`]),i=Ko(n.getRootProps(),r);return(0,B.jsx)(Gf,{value:n,children:(0,B.jsx)(Al.div,{...i,ref:t})})});ep.displayName=`FieldRootProvider`;var tp=(0,_.forwardRef)((e,t)=>{let n=Ko(Kf()?.getSelectProps(),e);return(0,B.jsx)(Al.select,{...n,ref:t})});tp.displayName=`FieldSelect`;var np=(0,_.forwardRef)((e,t)=>{let{autoresize:n,...r}=e,i=(0,_.useRef)(null),a=Ko(Kf()?.getTextareaProps(),{style:{resize:n?`none`:void 0}},r);return(0,_.useEffect)(()=>{if(n)return Ore(i.current)},[n]),(0,B.jsx)(Al.textarea,{...a,ref:Vo(t,i)})});np.displayName=`FieldTextarea`;var rp=Pl({Context:()=>zre,ErrorText:()=>qf,HelperText:()=>Jf,Input:()=>Yf,Item:()=>Xf,Label:()=>Zf,RequiredIndicator:()=>Qf,Root:()=>$f,RootProvider:()=>ep,Select:()=>tp,Textarea:()=>np}),[ip,ap]=Ro({name:`DialogContext`,hookName:`useDialogContext`,providerName:`<DialogProvider />`}),op=(0,_.forwardRef)((e,t)=>{let n=ap(),r=tu({...Fre(),present:n.open}),i=Ko(n.getBackdropProps(),r.getPresenceProps(),e);return r.unmounted?null:(0,B.jsx)(Al.div,{...i,ref:Vo(r.ref,t)})});op.displayName=`DialogBackdrop`;var sp=(0,_.forwardRef)((e,t)=>{let n=Ko(ap().getCloseTriggerProps(),e);return(0,B.jsx)(Al.button,{...n,ref:t})});sp.displayName=`DialogCloseTrigger`;var cp=(0,_.forwardRef)((e,t)=>{let n=ap(),r=ru(),i=Ko(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:(0,B.jsx)(Al.div,{...i,ref:Vo(r.ref,t)})});cp.displayName=`DialogContent`;var Ure=e=>e.children(ap()),lp=(0,_.forwardRef)((e,t)=>{let n=Ko(ap().getDescriptionProps(),e);return(0,B.jsx)(Al.div,{...n,ref:t})});lp.displayName=`DialogDescription`;var up=(0,_.forwardRef)((e,t)=>{let n=Ko(ap().getPositionerProps(),e);return ru().unmounted?null:(0,B.jsx)(Al.div,{...n,ref:t})});up.displayName=`DialogPositioner`;var Wre=e=>{let t=(0,_.useId)(),{getRootNode:n}=Bo(),{dir:r}=Ml();return yne(Kl(bne,{id:t,getRootNode:n,dir:r,...e}),Zl)},Gre=e=>{let[t,{children:n,...r}]=zl(e),[i]=Wf(t),a=Wre(r);return(0,B.jsx)(ip,{value:a,children:(0,B.jsx)(Uf,{value:i,children:(0,B.jsx)(nu,{value:tu(Ko({present:a.open},t)),children:n})})})},Kre=e=>{let[t,{value:n,children:r}]=zl(e),[i]=Wf(t);return(0,B.jsx)(ip,{value:n,children:(0,B.jsx)(Uf,{value:i,children:(0,B.jsx)(nu,{value:tu(Ko({present:n.open},t)),children:r})})})},dp=(0,_.forwardRef)((e,t)=>{let n=Ko(ap().getTitleProps(),e);return(0,B.jsx)(Al.h2,{...n,ref:t})});dp.displayName=`DialogTitle`;var qre=Rl(),fp=(0,_.forwardRef)((e,t)=>{let[n,r]=qre(e,[`value`]),i=ap(),a=ru(),o=i.getTriggerProps(n),s=Ko({...o,"aria-controls":a.unmounted?void 0:o[`aria-controls`]},r);return(0,B.jsx)(Al.button,{...s,ref:t})});fp.displayName=`DialogTrigger`;var pp=Pl({Backdrop:()=>op,CloseTrigger:()=>sp,Content:()=>cp,Context:()=>Ure,Description:()=>lp,Positioner:()=>up,Root:()=>Gre,RootProvider:()=>Kre,Title:()=>dp,Trigger:()=>fp}),mp=e=>{let{children:t,disabled:n}=e,[r,i]=(0,_.useState)(e.container?.current),a=(0,_.useSyncExternalStore)(Yre,()=>!1,()=>!0),{getRootNode:o}=Bo();if((0,_.useEffect)(()=>{i(()=>e.container?.current)},[e.container]),a||n)return(0,B.jsx)(B.Fragment,{children:t});
10let s=r??Jre(o);return(0,B.jsx)(B.Fragment,{children:_.Children.map(t,e=>(0,v.createPortal)(e,s))})},Jre=e=>{let t=e?.(),n=t.getRootNode();return Fs(n)?n:Vs(t).body},Yre=()=>()=>{},[hp,gp]=Ro({name:`SliderContext`,hookName:`useSliderContext`,providerName:`<SliderProvider />`}),Xre=e=>e.children(gp()),_p=(0,_.forwardRef)((e,t)=>{let n=Ko(gp().getControlProps(),e);return(0,B.jsx)(Al.div,{...n,ref:t})});_p.displayName=`SliderControl`;var[Zre,vp]=Ro({name:`SliderThumbPropsContext`,hookName:`useSliderThumbPropsContext`,providerName:`<SliderThumbPropsProvider />`}),yp=(0,_.forwardRef)((e,t)=>{let n=gp(),{index:r}=vp(),i=Ko(n.getDraggingIndicatorProps({index:r}),e);return(0,B.jsx)(Al.span,{...i,ref:t,children:e.children||n.getThumbValue(r)})});yp.displayName=`SliderDraggingIndicator`;var bp=(0,_.forwardRef)((e,t)=>{let n=gp(),r=vp(),i=Ko(n.getHiddenInputProps(r),e);return(0,B.jsx)(Al.input,{...i,ref:t})});bp.displayName=`SliderHiddenInput`;var xp=(0,_.forwardRef)((e,t)=>{let n=Ko(gp().getLabelProps(),e);return(0,B.jsx)(Al.label,{...n,ref:t})});xp.displayName=`SliderLabel`;var Qre=Rl(),Sp=(0,_.forwardRef)((e,t)=>{let[n,r]=Qre(e,[`value`]),i=Ko(gp().getMarkerProps(n),r);return(0,B.jsx)(Al.span,{...i,ref:t})});Sp.displayName=`SliderMarker`;var Cp=(0,_.forwardRef)((e,t)=>{let n=Ko(gp().getMarkerGroupProps(),e);return(0,B.jsx)(Al.div,{...n,ref:t})});Cp.displayName=`SliderMarkerGroup`;var wp=(0,_.forwardRef)((e,t)=>{let n=Ko(gp().getRangeProps(),e);return(0,B.jsx)(Al.div,{...n,ref:t})});wp.displayName=`SliderRange`;var $re=e=>{let t=(0,_.useId)(),{getRootNode:n}=Bo(),{dir:r}=Ml();return Tre(Kl(Dre,{id:t,dir:r,getRootNode:n,...e}),Zl)},eie=Rl(),Tp=(0,_.forwardRef)((e,t)=>{let[n,r]=eie(e,[`aria-label`,`aria-labelledby`,`defaultValue`,`disabled`,`form`,`getAriaValueText`,`id`,`ids`,`invalid`,`max`,`min`,`minStepsBetweenThumbs`,`name`,`onFocusChange`,`onValueChange`,`onValueChangeEnd`,`orientation`,`origin`,`readOnly`,`step`,`thumbAlignment`,`thumbCollisionBehavior`,`thumbSize`,`value`]),i=$re(n),a=Ko(i.getRootProps(),r);return(0,B.jsx)(hp,{value:i,children:(0,B.jsx)(Al.div,{...a,ref:t})})});Tp.displayName=`SliderRoot`;var tie=Rl(),Ep=(0,_.forwardRef)((e,t)=>{let[{value:n},r]=tie(e,[`value`]),i=Ko(n.getRootProps(),r);return(0,B.jsx)(hp,{value:n,children:(0,B.jsx)(Al.div,{...i,ref:t})})});Ep.displayName=`SliderRootProvider`;var nie=Rl(),Dp=(0,_.forwardRef)((e,t)=>{let[n,r]=nie(e,[`index`,`name`]),i=Ko(gp().getThumbProps(n),r);return(0,B.jsx)(Zre,{value:n,children:(0,B.jsx)(Al.div,{...i,ref:t})})});Dp.displayName=`SliderThumb`;var Op=(0,_.forwardRef)((e,t)=>{let n=Ko(gp().getTrackProps(),e);return(0,B.jsx)(Al.div,{...n,ref:t})});Op.displayName=`SliderTrack`;var kp=(0,_.forwardRef)((e,t)=>{let{children:n,...r}=e,i=gp(),a=Ko(i.getValueTextProps(),r);return(0,B.jsx)(Al.span,{...a,ref:t,children:n||i.value.join(`, `)})});kp.displayName=`SliderValueText`;var Ap=Pl({Context:()=>Xre,Control:()=>_p,DraggingIndicator:()=>yp,HiddenInput:()=>bp,Label:()=>xp,Marker:()=>Sp,MarkerGroup:()=>Cp,Range:()=>wp,Root:()=>Tp,RootProvider:()=>Ep,Thumb:()=>Dp,Track:()=>Op,ValueText:()=>kp}),[jp,Mp]=Ro({name:`TooltipContext`,hookName:`useTooltipContext`,providerName:`<TooltipProvider />`}),Np=(0,_.forwardRef)((e,t)=>{let n=Ko(Mp().getArrowProps(),e);return(0,B.jsx)(Al.div,{...n,ref:t})});Np.displayName=`TooltipArrow`;var Pp=(0,_.forwardRef)((e,t)=>{let n=Ko(Mp().getArrowTipProps(),e);return(0,B.jsx)(Al.div,{...n,ref:t})});Pp.displayName=`TooltipArrowTip`;var Fp=(0,_.forwardRef)((e,t)=>{let n=Mp(),r=ru(),i=Ko(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:(0,B.jsx)(Al.div,{...i,ref:Vo(r.ref,t)})});Fp.displayName=`TooltipContent`;var rie=e=>e.children(Mp()),Ip=(0,_.forwardRef)((e,t)=>{let n=Ko(Mp().getPositionerProps(),e);return ru().unmounted?null:(0,B.jsx)(Al.div,{...n,ref:t})});Ip.displayName=`TooltipPositioner`;var iie=e=>{let t=(0,_.useId)(),{getRootNode:n}=Bo(),{dir:r}=Ml();return Mre(Kl(Pre,{id:t,dir:r,getRootNode:n,...e}),Zl)},aie=e=>{let[t,{children:n,...r}]=zl(e),i=iie(r);return(0,B.jsx)(jp,{value:i,children:(0,B.jsx)(nu,{value:tu(Ko({present:i.open},t)),children:n})})},oie=e=>{let[t,{value:n,children:r}]=zl(e);return(0,B.jsx)(jp,{value:n,children:(0,B.jsx)(nu,{value:tu(Ko({present:n.open},t)),children:r})})},sie=Rl(),Lp=(0,_.forwardRef)((e,t)=>
10{let[n,r]=sie(e,[`value`]),i=Ko(Mp().getTriggerProps(n),r);return(0,B.jsx)(Al.button,{...i,ref:t})});Lp.displayName=`TooltipTrigger`;var Rp=Pl({Arrow:()=>Np,ArrowTip:()=>Pp,Content:()=>Fp,Context:()=>rie,Positioner:()=>Ip,Root:()=>aie,RootProvider:()=>oie,Trigger:()=>Lp});function zp(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}var cie=(e,t)=>{if(!e||typeof e!=`string`)return{invalid:!0,value:e};let[n,r]=e.split(`/`);if(!n||!r||n===`currentBg`)return{invalid:!0,value:n};let i=t(`colors.${n}`),a=t.raw(`opacity.${r}`)?.value;if(!a&&isNaN(Number(r)))return{invalid:!0,value:n};let o=a?Number(a)*100+`%`:`${r}%`,s=i??n;return{invalid:!1,color:s,value:`color-mix(in srgb, ${s} ${o}, transparent)`}},Bp=e=>(t,n)=>{let r=n.utils.colorMix(t);if(r.invalid)return{[e]:t};let i=`--mix-`+e;return{[i]:r.value,[e]:`var(${i}, ${r.color})`}};function Vp(e){if(typeof e!=`object`||!e)return e;if(Array.isArray(e))return e.map(e=>Vp(e));let t=Object.create(Object.getPrototypeOf(e));for(let n of Object.keys(e))t[n]=Vp(e[n]);return t}function Hp(e,t){if(t==null)return e;for(let n of Object.keys(t))if(!(t[n]===void 0||n===`__proto__`))if(!Zi(e[n])&&Zi(t[n]))Object.assign(e,{[n]:t[n]});else if(e[n]&&Zi(t[n]))Hp(e[n],t[n]);else if(Array.isArray(t[n])&&Array.isArray(e[n])){let r=0;for(;r<t[n].length;r++)Zi(e[n][r])&&Zi(t[n][r])?Hp(e[n][r],t[n][r]):e[n][r]=t[n][r]}else Object.assign(e,{[n]:t[n]});return e}function Up(e,...t){for(let n of t)Hp(e,n);return e}var Wp=e=>e!=null;function Gp(e,t,n={}){let{stop:r,getKey:i}=n;function a(e,n=[]){if(Zi(e)||Array.isArray(e)){let o={};for(let[s,c]of Object.entries(e)){let l=i?.(s,c)??s,u=[...n,l];if(r?.(e,u))return t(e,n);let d=a(c,u);Wp(d)&&(o[l]=d)}return o}return t(e,n)}return a(e)}function Kp(e,t){return Array.isArray(e)?e.map(e=>Wp(e)?t(e):e):Zi(e)?Gp(e,e=>t(e)):Wp(e)?t(e):e}var qp=[`value`,`type`,`description`],lie=e=>e&&typeof e==`object`&&!Array.isArray(e),Jp=(...e)=>{let t=Up({},...e.map(Vp));return t.theme?.tokens&&Gp(t.theme.tokens,e=>{let t=Object.keys(e).filter(e=>!qp.includes(e)).length>0,n=qp.some(t=>e[t]!=null);return t&&n&&(e.DEFAULT||={},qp.forEach(t=>{var n;e[t]!=null&&((n=e.DEFAULT)[t]||(n[t]=e[t]),delete e[t])})),e},{stop(e){return lie(e)&&Object.keys(e).some(e=>qp.includes(e)||e!==e.toLowerCase()&&e!==e.toUpperCase())}}),t},uie=e=>e,Yp=e=>e,Xp=e=>e,die=e=>e,fie=e=>e,Zp=e=>e,Qp=e=>e,pie=e=>e,mie=e=>e;function $p(){let e=e=>e;return new Proxy(e,{get(){return e}})}var em=$p(),tm=$p(),nm=e=>e,hie=/[^a-zA-Z0-9_\u0081-\uffff-]/g;function gie(e){return`${e}`.replace(hie,e=>`\\${e}`)}var _ie=/[A-Z]/g;function vie(e){return e.replace(_ie,e=>`-${e.toLowerCase()}`)}
10function rm(e,t={}){let{fallback:n=``,prefix:r=``}=t,i=vie([`-`,r,gie(e)].filter(Boolean).join(`-`));return{var:i,ref:`var(${i}${n?`, ${n}`:``})`}}var yie=e=>/^var\(--.+\)$/.test(e),im=(e,t)=>t==null?t:`${e}(${t})`,am=e=>{if(yie(e)||e==null)return e;let t=typeof e==`string`&&!e.endsWith(`deg`);return typeof e==`number`||t?`${e}deg`:e},om=e=>({values:[`outside`,`inside`,`mixed`,`none`],transform(t,{token:n}){let r=n(`colors.colorPalette.focusRing`);return{inside:{"--focus-ring-color":r,[e]:{outlineOffset:`0px`,outlineWidth:`var(--focus-ring-width, 1px)`,outlineColor:`var(--focus-ring-color)`,outlineStyle:`var(--focus-ring-style, solid)`,borderColor:`var(--focus-ring-color)`}},outside:{"--focus-ring-color":r,[e]:{outlineWidth:`var(--focus-ring-width, 2px)`,outlineOffset:`var(--focus-ring-offset, 2px)`,outlineStyle:`var(--focus-ring-style, solid)`,outlineColor:`var(--focus-ring-color)`}},mixed:{"--focus-ring-color":r,[e]:{outlineWidth:`var(--focus-ring-width, 3px)`,outlineStyle:`var(--focus-ring-style, solid)`,outlineColor:`color-mix(in srgb, var(--focus-ring-color), transparent 60%)`,borderColor:`var(--focus-ring-color)`}},none:{"--focus-ring-color":r,[e]:{outline:`none`}}}[t]??{}}}),bie=Bp(`borderColor`),sm=e=>({transition:e,transitionTimingFunction:`cubic-bezier(0.4, 0, 0.2, 1)`,transitionDuration:`150ms`}),xie=uie({hover:[`@media (hover: hover)`,`&:is(:hover, [data-hover]):not(:disabled, [data-disabled])`],active:`&:is(:active, [data-active]):not(:disabled, [data-disabled], [data-state=open])`,focus:`&:is(:focus, [data-focus])`,focusWithin:`&:is(:focus-within, [data-focus-within])`,focusVisible:`&:is(:focus-visible, [data-focus-visible])`,disabled:`&:is(:disabled, [disabled], [data-disabled], [aria-disabled=true])`,visited:`&:visited`,target:`&:target`,readOnly:`&:is([data-readonly], [aria-readonly=true], [readonly])`,readWrite:`&:read-write`,empty:`&:is(:empty, [data-empty])`,checked:`&:is(:checked, [data-checked], [aria-checked=true], [data-state=checked])`,enabled:`&:enabled`,expanded:`&:is([aria-expanded=true], [data-expanded], [data-state=expanded])`,highlighted:`&[data-highlighted]`,complete:`&[data-complete]`,incomplete:`&[data-incomplete]`,dragging:`&[data-dragging]`,before:`&::before`,after:`&::after`,firstLetter:`&::first-letter`,firstLine:`&::first-line`,marker:`&::marker`,selection:`&::selection`,file:`&::file-selector-button`,backdrop:`&::backdrop`,first:`&:first-of-type`,last:`&:last-of-type`,notFirst:`&:not(:first-of-type)`,notLast:`&:not(:last-of-type)`,only:`&:only-child`,even:`&:nth-of-type(even)`,odd:`&:nth-of-type(odd)`,peerFocus:`.peer:is(:focus, [data-focus]) ~ &`,peerHover:`.peer:is(:hover, [data-hover]):not(:disabled, [data-disabled]) ~ &`,peerActive:`.peer:is(:active, [data-active]):not(:disabled, [data-disabled]) ~ &`,peerFocusWithin:`.peer:focus-within ~ &`,peerFocusVisible:`.peer:is(:focus-visible, [data-focus-visible]) ~ &`,peerDisabled:`.peer:is(:disabled, [disabled], [data-disabled]) ~ &`,peerChecked:`.peer:is(:checked, [data-checked], [aria-checked=true], [data-state=checked]) ~ &`,peerInvalid:`.peer:is(:invalid, [data-invalid], [aria-invalid=true]) ~ &`,peerExpanded:`.peer:is([aria-expanded=true], [data-expanded], [data-state=expanded]) ~ &`,peerPlaceholderShown:`.peer:placeholder-shown ~ &`,groupFocus:`.group:is(:focus, [data-focus]) &`,groupHover:`.group:is(:hover, [data-hover]):not(:disabled, [data-disabled]) &`,groupActive:`.group:is(:active, [data-active]):not(:disabled, [data-disabled]) &`,groupFocusWithin:`.group:focus-within &`,groupFocusVisible:`.group:is(:focus-visible, [data-focus-visible]) &`,groupDisabled:`.group:is(:disabled, [disabled], [data-disabled]) &`,groupChecked:`.group:is(:checked, [data-checked], [aria-checked=true], [data-state=checked]) &`,groupExpanded:`.group:is([aria-expanded=true], [data-expanded], [data-state=expanded]) &`,groupInvalid:`.group:invalid &`,indeterminate:`&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed], [data-state=indeterminate])`,required:`&:is([data-required], [aria-required=true])`,valid:`&:is([data-valid], [data-state=valid])`,invalid:`&:is([data-invalid], [aria-invalid=true], [data-state=invalid])`,autofill:`&:autofill`,inRange:`&:is(:in-range, [data-in-range])`,outOfRange:`&:is(:out-of-range, [data-outside-range])`,placeholder:`&::placeholder, &[data-placeholder]`,placeholderShown:`&:is(:placeholder-shown, [data-placeholder-shown])`,pressed:`&:is([aria-pressed=true], [data-pressed])`,selected:`&:is([aria-selected=true], [data-selected])`,grabbed:`&:is([aria-grabbed=true], [data-grabbed])`,underValue:`&[data-state=under-value]`,overValue:`&[data-state=over-value]`,atV
10alue:`&[data-state=at-value]`,default:`&:default`,optional:`&:optional`,open:`&:is([open], [data-open], [data-state=open])`,closed:`&:is([closed], [data-closed], [data-state=closed])`,fullscreen:`&:is(:fullscreen, [data-fullscreen])`,loading:`&:is([data-loading], [aria-busy=true])`,hidden:`&:is([hidden], [data-hidden])`,current:`&[data-current]`,currentPage:`&[aria-current=page]`,currentStep:`&[aria-current=step]`,today:`&[data-today]`,unavailable:`&[data-unavailable]`,rangeStart:`&[data-range-start]`,rangeEnd:`&[data-range-end]`,now:`&[data-now]`,topmost:`&[data-topmost]`,motionReduce:`@media (prefers-reduced-motion: reduce)`,motionSafe:`@media (prefers-reduced-motion: no-preference)`,print:`@media print`,landscape:`@media (orientation: landscape)`,portrait:`@media (orientation: portrait)`,dark:`.dark &, .dark .chakra-theme:not(.light) &`,light:`:root &, .light &`,osDark:`@media (prefers-color-scheme: dark)`,osLight:`@media (prefers-color-scheme: light)`,highContrast:`@media (forced-colors: active)`,lessContrast:`@media (prefers-contrast: less)`,moreContrast:`@media (prefers-contrast: more)`,ltr:`[dir=ltr] &`,rtl:`[dir=rtl] &`,scrollbar:`&::-webkit-scrollbar`,scrollbarThumb:`&::-webkit-scrollbar-thumb`,scrollbarTrack:`&::-webkit-scrollbar-track`,horizontal:`&[data-orientation=horizontal]`,vertical:`&[data-orientation=vertical]`,icon:`& :where(svg)`,starting:`@starting-style`}),cm=rm(`bg-currentcolor`),lm=e=>e===cm.ref||e===`currentBg`,um=e=>({...e(`colors`),currentBg:cm}),Sie=nm({conditions:xie,utilities:{background:{values:um,shorthand:[`bg`],transform(e,t){if(lm(t.raw))return{background:cm.ref};let n=Bp(`background`)(e,t);return{...n,[cm.var]:n?.background}}},backgroundColor:{values:um,shorthand:[`bgColor`],transform(e,t){if(lm(t.raw))return{backgroundColor:cm.ref};let n=Bp(`backgroundColor`)(e,t);return{...n,[cm.var]:n?.backgroundColor}}},backgroundSize:{shorthand:[`bgSize`]},backgroundPosition:{shorthand:[`bgPos`]},backgroundRepeat:{shorthand:[`bgRepeat`]},backgroundAttachment:{shorthand:[`bgAttachment`]},backgroundClip:{shorthand:[`bgClip`],values:[`text`],transform(e){return e===`text`?{color:`transparent`,backgroundClip:`text`}:{backgroundClip:e}}},backgroundGradient:{shorthand:[`bgGradient`],values(e){return{...e(`gradients`),"to-t":`linear-gradient(to top, var(--gradient))`,"to-tr":`linear-gradient(to top right, var(--gradient))`,"to-r":`linear-gradient(to right, var(--gradient))`,"to-br":`linear-gradient(to bottom right, var(--gradient))`,"to-b":`linear-gradient(to bottom, var(--gradient))`,"to-bl":`linear-gradient(to bottom left, var(--gradient))`,"to-l":`linear-gradient(to left, var(--gradient))`,"to-tl":`linear-gradient(to top left, var(--gradient))`}},transform(e){return{"--gradient-stops":`var(--gradient-from), var(--gradient-to)`,"--gradient":`var(--gradient-via-stops, var(--gradient-stops))`,backgroundImage:e}}},gradientFrom:{values:um,transform:Bp(`--gradient-from`)},gradientTo:{values:um,transform:Bp(`--gradient-to`)},gradientVia:{values:um,transform(e,t){return{...Bp(`--gradient-via`)(e,t),"--gradient-via-stops":`var(--gradient-from), var(--gradient-via), var(--gradient-to)`}}},backgroundImage:{values(e){return{...e(`gradients`),...e(`assets`)}},shorthand:[`bgImg`,`bgImage`]},border:{values:`borders`},borderTop:{values:`borders`},borderLeft:{values:`borders`},borderBlockStart:{values:`borders`},borderRight:{values:`borders`},borderBottom:{values:`borders`},borderBlockEnd:{values:`borders`},borderInlineStart:{values:`borders`,shorthand:[`borderStart`]},borderInlineEnd:{values:`borders`,shorthand:[`borderEnd`]},borderInline:{values:`borders`,shorthand:[`borderX`]},borderBlock:{values:`borders`,shorthand:[`borderY`]},borderColor:{values:um,transform:Bp(`borderColor`)},borderTopColor:{values:um,transform:Bp(`borderTopColor`)},borderBlockStartColor:{values:um,transform:Bp(`borderBlockStartColor`)},borderBottomColor:{values:um,transform:Bp(`borderBottomColor`)},borderBlockEndColor:{values:um,transform:Bp(`borderBlockEndColor`)},borderLeftColor:{values:um,transform:Bp(`borderLeftColor`)},borderInlineStartColor:{values:um,shorthand:[`borderStartColor`],transform:Bp(`borderInlineStartColor`)},borderRightColor:{values:um,transform:Bp(`borderRightColor`)},borderInlineEndColor:{values:um,shorthand:[`borderEndColor`],transform:Bp(`borderInlineEndColor`)},borderStyle:{values:`borderStyles`},borderTopStyle:{values:`borderStyles`},borderBlockStartStyle:{values:`borderStyles`},borderBottomStyle:{values:`borderStyles`},borderBlockEndStyle:{values:`borderStyles`},borderInlineStartStyle:{values:`borderStyles`,shorthand:[`borderStartStyle`]},borderInlineEndStyle:{values:`borderStyles`,shorthand:[`borderEndStyle`]},borderLeftStyle:{values:`borderStyles`},borderRightStyle:{values:`borderStyles`},borderRadius:{values:`radii`,shorthand:[`rounded`]},borderTopLeftRadius:{values:`radii`,shorthand:[`roundedTopLeft`]},borderStartStartRadius:{values:`radii`,shorthand:[`roundedStartStart`,`borderTopStartRadius`]},borderEndStartRadius:{values:`radii`,shorthand:[`roundedEndStart`,`borderBottomStartRadius`]},borderTopRightRadius:{values:`radii`,shorthand:[`roundedTopRight`]},borderStartEndRadius:{values:`radii`,shorthand:[`roundedStartEnd`,`borderTopEndRadius`]},borderEndEndRadius:{values:`radii`,shorthand:[`roundedEndEnd`,`borderBottomEndRadius`]},borderBottomLeftRadius:{values:`radii`,shorthand:[`roundedBottomLeft`]},borderBottomRightRadius:{values:`radii`,shorthand:[`roundedBottomRight`]},borderInlineStartRadius:{values:`radii`,property:`borderRadius`,shorthand:[`roundedStart`,`borderStartRadius`],transform:e=>({borderStartStartRadius:e,borderEndStartRadius:e})},borderInlineEndRadius:{values:`radii`,property:`borderRadius`,shorthand:[`roundedEnd`,`borderEndRadius`],transform:e=>({borderStartEndRadius:e,borderEndEndRadius:e})},borderTopRadius:{values:`radii`,property:`borderRadius`,shorthand:[`roundedTop`],transform:e=>({borderTopLeftRadius:e,borderTopRightRadius:e})},borderBottomRadius:{values:`radii`,property:`borderRadius`,shorthand:[`roundedBottom`],transform:e=>({borderBottomLeftRadius:e,borderBottomRightRadius:e})},borderLeftRadius:{values:`radii`,property:`borderRadius`,shorthand:[`roundedLeft`],transform:e=>({borderTopLeftRadius:e,borderBottomLeftRadius:e})},borderRightRadius:{values:`radii`,property:`borderRadius`,shorthand:[`roundedRight`],transform:e=>({borderTopRightRadius:e,borderBottomRightRadius:e})},borderWidth:{values:`borderWidths`},borderBlockStartWidth:{values:`borderWidths`},borderTopWidth:{values:`borderWidths`},borderBottomWidth:{values:`borderWidths`},borderBlockEndWidth:{values:`borderWidths`},borderRightWidth:{values:`borderWidths`},borderInlineWidth:{values:`borderWidths`,shorthand:[`borderXWidth`]},borderInlineStartWidth:{values:`borderWidths`,shorthand:[`borderStartWidth`]},borderInlineEndWidth:{values:`borderWidths`,shorthand:[`borderEndWidth`]},borderLeftWidth:{values:`borderWidths`},borderBlockWidth:{values:`borderWidths`,shorthand:[`borderYWidth`]},color:{values:um,transform:Bp(`color`)},fill:{values:um,transform:Bp(`fill`)},stroke:{values:um,transform:Bp(`stroke`)},accentColor:{values:um,transform:Bp(`accentColor`)},divideX:{values:{type:`string`},transform(e){return{"& > :not(style, [hidden]) ~ :not(style, [hidden])":{borderInlineStartWidth:e,borderInlineEndWidth:`0px`}}}},divideY:{values:{type:`string`},transform(e){return{"& > :not(style, [hidden]) ~ :not(style, [hidden])":{borderTopWidth:e,borderBottomWidth:`0px`}}}},divideColor:{values:um,transform(e,t){return{"& > :not(style, [hidden]) ~ :not(style, [hidden])":bie(e,t)}}},divideStyle:{property:`borderStyle`,transform(e){return{"& > :not(style, [hidden]) ~ :not(style, [hidden])":{borderStyle:e}}}},boxShadow:{values:`shadows`,shorthand:[`shadow`]}
10,boxShadowColor:{values:um,transform:Bp(`--shadow-color`),shorthand:[`shadowColor`]},mixBlendMode:{shorthand:[`blendMode`]},backgroundBlendMode:{shorthand:[`bgBlendMode`]},opacity:{values:`opacity`},filter:{transform(e){return e===`auto`?{filter:`var(--blur) var(--brightness) var(--contrast) var(--grayscale) var(--hue-rotate) var(--invert) var(--saturate) var(--sepia) var(--drop-shadow)`}:{filter:e}}},blur:{values:`blurs`,transform:e=>({"--blur":im(`blur`,e)})},brightness:{transform:e=>({"--brightness":im(`brightness`,e)})},contrast:{transform:e=>({"--contrast":im(`contrast`,e)})},grayscale:{transform:e=>({"--grayscale":im(`grayscale`,e)})},hueRotate:{transform:e=>({"--hue-rotate":im(`hue-rotate`,am(e))})},invert:{transform:e=>({"--invert":im(`invert`,e)})},saturate:{transform:e=>({"--saturate":im(`saturate`,e)})},sepia:{transform:e=>({"--sepia":im(`sepia`,e)})},dropShadow:{transform:e=>({"--drop-shadow":im(`drop-shadow`,e)})},backdropFilter:{transform(e){return e===`auto`?{backdropFilter:`var(--backdrop-blur) var(--backdrop-brightness) var(--backdrop-contrast) var(--backdrop-grayscale) var(--backdrop-hue-rotate) var(--backdrop-invert) var(--backdrop-opacity) var(--backdrop-saturate) var(--backdrop-sepia)`}:{backdropFilter:e}}},backdropBlur:{values:`blurs`,transform:e=>({"--backdrop-blur":im(`blur`,e)})},backdropBrightness:{transform:e=>({"--backdrop-brightness":im(`brightness`,e)})},backdropContrast:{transform:e=>({"--backdrop-contrast":im(`contrast`,e)})},backdropGrayscale:{transform:e=>({"--backdrop-grayscale":im(`grayscale`,e)})},backdropHueRotate:{transform:e=>({"--backdrop-hue-rotate":im(`hue-rotate`,am(e))})},backdropInvert:{transform:e=>({"--backdrop-invert":im(`invert`,e)})},backdropOpacity:{transform:e=>({"--backdrop-opacity":im(`opacity`,e)})},backdropSaturate:{transform:e=>({"--backdrop-saturate":im(`saturate`,e)})},backdropSepia:{transform:e=>({"--backdrop-sepia":im(`sepia`,e)})},flexBasis:{values:`sizes`},gap:{values:`spacing`},rowGap:{values:`spacing`,shorthand:[`gapY`]},columnGap:{values:`spacing`,shorthand:[`gapX`]},flexDirection:{shorthand:[`flexDir`]},gridGap:{values:`spacing`},gridColumnGap:{values:`spacing`},gridRowGap:{values:`spacing`},outlineColor:{values:um,transform:Bp(`outlineColor`)},focusRing:om(`&:is(:focus, [data-focus])`),focusVisibleRing:om(`&:is(:focus-visible, [data-focus-visible])`),focusRingColor:{values:um,transform:Bp(`--focus-ring-color`)},focusRingOffset:{values:`spacing`,transform:e=>({"--focus-ring-offset":e})},focusRingWidth:{values:`borderWidths`,property:`outlineWidth`,transform:e=>({"--focus-ring-width":e})},focusRingStyle:{values:`borderStyles`,property:`outlineStyle`,transform:e=>({"--focus-ring-style":e})},aspectRatio:{values:`aspectRatios`},width:{values:`sizes`,shorthand:[`w`]},inlineSize:{values:`sizes`},height:{values:`sizes`,shorthand:[`h`]},blockSize:{values:`sizes`},boxSize:{values:`sizes`,property:`width`,transform:e=>({width:e,height:e})},minWidth:{values:`sizes`,shorthand:[`minW`]},minInlineSize:{values:`sizes`},minHeight:{values:`sizes`,shorthand:[`minH`]},minBlockSize:{values:`sizes`},maxWidth:{values:`sizes`,shorthand:[`maxW`]},maxInlineSize:{values:`sizes`},maxHeight:{values:`sizes`,shorthand:[`maxH`]},maxBlockSize:{values:`sizes`},hideFrom:{values:`breakpoints`,transform:(e,{raw:t,token:n})=>({[n.raw(`breakpoints.${t}`)?`@breakpoint ${t}`:`@media screen and (min-width: ${e})`]:{display:`none`}})},hideBelow:{values:`breakpoints`,transform(e,{raw:t,token:n}){return{[n.raw(`breakpoints.${t}`)?`@breakpoint ${t}Down`:`@media screen and (max-width: ${e})`]:{display:`none`}}}},overscrollBehavior:{shorthand:[`overscroll`]},overscrollBehaviorX:{shorthand:[`overscrollX`]},overscrollBehaviorY:{shorthand:[`overscrollY`]},scrollbar:{values:[`visible`,`hidden`],transform(e){switch(e){case`visible`:return{msOverflowStyle:`auto`,scrollbarWidth:`auto`,"&::-webkit-scrollbar":{display:`block`}};case`hidden`:return{msOverflowStyle:`none`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}};default:return{}}}},scrollbarColor:{values:um,transform:Bp(`scrollbarColor`)},scrollbarGutter:{values:`spacing`},scrollbarWidth:{values:`sizes`},scrollMargin:{values:`spacing`},scrollMarginTop:{values:`spacing`},scrollMarginBottom:{values:`spacing`},scrollMarginLeft:{values:`spacing`},scrollMarginRight:{values:`spacing`},scrollMarginX:{values:`spacing`,transform:e=>({scrollMarginLeft:e,scrollMarginRight:e})},scrollMarginY:{values:`spacing`,transform:e=>({scrollMarginTop:e,scrollMarginBottom:e})},scrollPadding:{values:`spacing`},scrollPaddingTop:{values:`spacing`},scrollPaddingBottom:{values:`spacing`},scrollPaddingLeft:{values:`spacing`},scrollPaddingRight:{values:`spacing`},scrollPaddingInline:{values:`spacing`,shorthand:[`scrollPaddingX`]},scrollPaddingBlock:{values:`spacing`,shorthand:[`scrollPaddingY`]},scrollSnapType:{values:{none:`none`,x:`x var(--scroll-snap-strictness)`,y:`y var(--scroll-snap-strictness)`,both:`both var(--scroll-snap-strictness)`}},scrollSnapStrictness:{values:[`mandatory`,`proximity`],transform:e=>({"--scroll-snap-strictness":e})},scrollSnapMargin:{values:`spacing`},scrollSnapMarginTop:{values:`spacing`},scrollSnapMarginBottom:{values:`spacing`},scrollSnapMarginLeft:{values:`spacing`},scrollSnapMarginRight:{values:`spacing`},listStylePosition:{shorthand:[`listStylePos`]},listStyleImage:{values:`assets`,shorthand:[`listStyleImg`]},position:{shorthand:[`pos`]},zIndex:{values:`zIndex`},inset:{values:`spacing`},insetInline:{values:`spacing`,shorthand:[`insetX`]},insetBlock:{values:`spacing`,shorthand:[`insetY`]},top:{values:`spacing`},insetBlockStart:{values:`spacing`},bottom:{values:`spacing`},insetBlockEnd:{values:`spacing`},left:{values:`spacing`},right:{values:`spacing`},insetInlineStart:{values:`spacing`,shorthand:[`insetStart`]},insetInlineEnd:{values:`spacing`,shorthand:[`insetEnd`]},ring:{transform(e){return{"--ring-offset-shadow":`var(--ring-inset) 0 0 0 var(--ring-offset-width) var(--ring-offset-color)`,"--ring-shadow":`var(--ring-inset) 0 0 0 calc(var(--ring-width) + var(--ring-offset-width)) var(--ring-color)`,"--ring-width":e,boxShadow:`var(--ring-offset-shadow), var(--ring-shadow), var(--shadow, 0 0 #0000)`}}},ringColor:{values:um,transform:Bp(`--ring-color`)},ringOffset:{transform:e=>({"--ring-offset-width":e})},ringOffsetColor:{values:um,transform:Bp(`--ring-offset-color`)},ringInset:{transform:e=>({"--ring-inset":e})},margin:{values:`spacing`,shorthand:[`m`]},marginTop:{values:`spacing`,shorthand:[`mt`]},marginBlockStart:{values:`spacing`},marginRight:{values:`spacing`,shorthand:[`mr`]},marginBottom:{values:`spacing`,shorthand:[`mb`]},marginBlockEnd:{values:`spacing`},marginLeft:{values:`spacing`,shorthand:[`ml`]},marginInlineStart:{values:`spacing`,shorthand:[`ms`,`marginStart`]},marginInlineEnd:{values:`spacing`,shorthand:[`me`,`marginEnd`]},marginInline:{values:`spacing`,shorthand:[`mx`,`marginX`]},marginBlock:{values:`spacing`,shorthand:[`my`,`marginY`]},padding:{values:`spacing`,shorthand:[`p`]},paddingTop:{values:`spacing`,shorthand:[`pt`]},paddingRight:{values:`spacing`,shorthand:[`pr`]},paddingBottom:{values:`spacing`,shorthand:[`pb`]},paddingBlockStart:{values:`spacing`},paddingBlockEnd:{values:`spacing`},paddingLeft:{values:`spacing`,shorthand:[`pl`]},paddingInlineStart:{values:`spacing`,shorthand:[`ps`,`paddingStart`]},paddingInlineEnd:{values:`spacing`,shorthand:[`pe`,`paddingEnd`]},paddingInline:{values:`spacing`,shorthand:[`px`,`paddingX`]},paddingBlock:{values:`spacing`,shorthand:[`py`,`paddingY`]},textDecoration:{shorthand:[`textDecor`]},textDecorationColor:{values:um,transform:Bp(`textDecorationColor`)},textShadow:{values:`shadows`},transform:{transform:e=>{let t=e;return e===`auto`&&(t=`translateX(var(--translate-x, 0)) translateY(var(--translate-y, 0)) rotate(var(--rotate, 0)) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1)) skewX(var(--skew-x, 0)) skewY(var(--skew-y, 0))`),e===`auto-gpu`&&(t=`translate3d(var(--translate-x, 0), var(--translate-y, 0), 0) rotate(var(--rotate, 0)) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1)) skewX(var(--skew-x, 0)) skewY(var(--skew-y, 0))`),{transform:t}}},skewX:{transform:e=>({"--skew-x":am(e)})},skewY:{transform:e=>({"--skew-y":am(e)})},scaleX:{transform:e=>({"--scale-x":e})},scaleY:{transform:e=>({"--scale-y":e})},scale:{transform(e){return e===`auto`?{scale:`var(--scale-x, 1) var(--scale-y, 1)`}:{scale:e}}},spaceXReverse:{values:{type:`boolean`},transform(e){return{"& > :not(style, [hidden]) ~ :not(style, [hidden])":{"--space-x-reverse":e?`1`:void 0}}}},spaceX:{property:`marginInlineStart`,values:`spacing`,transform:e=>({"& > :not(style, [hidden]) ~ :not(style, [hidden])":{"--space-x-reverse":`0`,marginInlineStart:`calc(${e} * calc(1 - var(--space-x-reverse)))`,marginInlineEnd:`calc(${e} * var(--space-x-reverse))`}})}
10,spaceYReverse:{values:{type:`boolean`},transform(e){return{"& > :not(style, [hidden]) ~ :not(style, [hidden])":{"--space-y-reverse":e?`1`:void 0}}}},spaceY:{property:`marginTop`,values:`spacing`,transform:e=>({"& > :not(style, [hidden]) ~ :not(style, [hidden])":{"--space-y-reverse":`0`,marginTop:`calc(${e} * calc(1 - var(--space-y-reverse)))`,marginBottom:`calc(${e} * var(--space-y-reverse))`}})},rotate:{transform(e){return e===`auto`?{rotate:`var(--rotate-x, 0) var(--rotate-y, 0) var(--rotate-z, 0)`}:{rotate:am(e)}}},rotateX:{transform(e){return{"--rotate-x":am(e)}}},rotateY:{transform(e){return{"--rotate-y":am(e)}}},translate:{transform(e){return e===`auto`?{translate:`var(--translate-x) var(--translate-y)`}:{translate:e}}},translateX:{values:`spacing`,transform:e=>({"--translate-x":e})},translateY:{values:`spacing`,transform:e=>({"--translate-y":e})},transition:{values:[`all`,`common`,`colors`,`opacity`,`position`,`backgrounds`,`size`,`shadow`,`transform`],transform(e){switch(e){case`all`:return sm(`all`);case`position`:return sm(`left, right, top, bottom, inset-inline, inset-block`);case`colors`:return sm(`color, background-color, border-color, text-decoration-color, fill, stroke`);case`opacity`:return sm(`opacity`);case`shadow`:return sm(`box-shadow`);case`transform`:return sm(`transform`);case`size`:return sm(`width, height`);case`backgrounds`:return sm(`background, background-color, background-image, background-position`);case`common`:return sm(`color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter`);default:return{transition:e}}}},transitionDuration:{values:`durations`},transitionProperty:{values:{common:`background-color, border-color, color, fill, stroke, opacity, box-shadow, translate, transform`,colors:`background-color, border-color, color, fill, stroke`,size:`width, height`,position:`left, right, top, bottom, inset-inline, inset-block`,background:`background, background-color, background-image, background-position`}},transitionTimingFunction:{values:`easings`},animation:{values:`animations`},animationDuration:{values:`durations`},animationDelay:{values:`durations`},animationTimingFunction:{values:`easings`},fontFamily:{values:`fonts`},fontSize:{values:`fontSizes`},fontWeight:{values:`fontWeights`},lineHeight:{values:`lineHeights`},letterSpacing:{values:`letterSpacings`},textIndent:{values:`spacing`},truncate:{values:{type:`boolean`},transform(e){return e===!0?{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}:{}}},lineClamp:{transform(e){return e===`none`?{WebkitLineClamp:`unset`}:{overflow:`hidden`,display:`-webkit-box`,WebkitLineClamp:e,WebkitBoxOrient:`vertical`,textWrap:`wrap`}}},borderSpacing:{values:e=>({...e(`spacing`),auto:`var(--border-spacing-x, 0) var(--border-spacing-y, 0)`})},borderSpacingX:{values:`spacing`,transform(e){return{"--border-spacing-x":e}}},borderSpacingY:{values:`spacing`,transform(e){return{"--border-spacing-y":e}}},srOnly:{values:{type:`boolean`},transform(e){return Cie[e]||{}}},debug:{values:{type:`boolean`},transform(e){return e?{outline:`1px solid blue !important`,"& > *":{outline:`1px solid red !important`}}:{}}},caretColor:{values:um,transform:Bp(`caretColor`)},cursor:{values:`cursor`}}}),Cie={true:{position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},false:{position:`static`,width:`auto`,height:`auto`,padding:`0`,margin:`0`,overflow:`visible`,clip:`auto`,whiteSpace:`normal`}},wie=``.split(`,`),Tie=`WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,WebkitUserSelect,accentColor,alignContent,alignItems,al
10ignSelf,alignTracks,all,anchorName,anchorScope,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationRange,animationRangeEnd,animationRangeStart,animationTimeline,animationTimingFunction,appearance,aspectRatio,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockSize,border,borderBlock,borderBlockColor,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBlockStyle,borderBlockWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineColor,borderInlineEnd,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderInlineStyle,borderInlineWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,clipRule,color,colorInterpolationFilters,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,cornerShape,counterIncrement,counterReset,counterSet,cursor,cx,cy,d,direction,display,dominantBaseline,emptyCells,fieldSizing,fill,fillOpacity,fillRule,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,floodColor,floodOpacity,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontSynthesisPosition,fontSynthesisSmallCaps,fontSynthesisStyle,fontSynthesisWeight,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontVariationSettings,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,interpolateSize,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lightingColor,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,marker,markerEnd,markerMid,markerStart,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overlay,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,positionAnchor,positionArea,positionTry,positionTryFallbacks,positionTryOrder,positionVisibility,printColorAdjust,quotes,r,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,rx,ry,scale,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginBottom,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockEnd,scrollPaddingBlockStart,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,
10scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,scrollbarColor,scrollbarGutter,scrollbarWidth,shapeImageThreshold,shapeMargin,shapeOutside,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,tabSize,tableLayout,textAlign,textAlignLast,textAnchor,textBox,textBoxEdge,textBoxTrim,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textSpacingTrim,textTransform,textUnderlineOffset,textUnderlinePosition,textWrap,textWrapMode,textWrapStyle,timelineScope,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionBehavior,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,vectorEffect,verticalAlign,viewTimeline,viewTimelineAxis,viewTimelineInset,viewTimelineName,viewTransitionName,visibility,whiteSpace,whiteSpaceCollapse,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,x,y,zIndex,zoom,alignmentBaseline,baselineShift,colorInterpolation,colorRendering,glyphOrientationVertical`.split(`,`).concat(wie),Eie=new Map(Tie.map(e=>[e,!0]));function Die(e){let t=Object.create(null);return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}var Oie=/&|@/,kie=Die(e=>Eie.has(e)||e.startsWith(`--`)||Oie.test(e));function dm(e,t){let n={};for(let r in e){let i=t(r,e[r]);n[i[0]]=i[1]}return n}function fm(e,t){let n={};return Gp(e,(e,t)=>{e&&(n[t.join(`.`)]=e.value)},{stop:t}),n}var Aie=Object.defineProperty,jie=(e,t,n)=>t in e?Aie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pm=(e,t,n)=>jie(e,typeof t==`symbol`?t:t+``,n);function mm(e){if(e===null)return`null`;if(e===void 0)return`undefined`;let t=typeof e;return t===`string`?`s:${e}`:t===`number`?`n:${e}`:t===`boolean`?`b:${e}`:t===`function`?`f:${e.name||`anonymous`}`:Array.isArray(e)?`a:[${e.map(mm).join(`,`)}]`:t===`object`?`o:{${Object.keys(e).sort().map(t=>`${t}:${mm(e[t])}`).join(`,`)}}`:String(e)}var Mie=class{constructor(e=500){pm(this,`cache`,new Map),pm(this,`maxSize`),this.maxSize=e}get(e){let t=this.cache.get(e);return t!==void 0&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){let e=this.cache.keys().next().value;e!==void 0&&this.cache.delete(e)}this.cache.set(e,t)}clear(){this.cache.clear()}},hm=e=>{let t=new Mie;function n(...n){let r=n.length===1?mm(n[0]):n.map(mm).join(`|`),i=t.get(r);return i===void 0&&(i=e.apply(this,n),t.set(r,i)),i}return n},gm=16,_m=`px`,vm=`em`,ym=`rem`;function bm(e=``){let t=new RegExp(String.raw`-?\d+(?:\.\d+|\d*)`),n=RegExp(`${_m}|${vm}|${ym}`);return e.match(RegExp(`${t.source}(${n.source})`))?.[1]}function xm(e=``){if(typeof e==`number`)return`${e}px`;let t=bm(e);if(!t||t===_m)return e;if(t===vm||t===ym)return`${parseFloat(e)*gm}${_m}`}function Sm(e=``){let t=bm(e);if(!t||t===ym)return e;if(t===vm)return`${parseFloat(e)}${ym}`;if(t===_m)return`${parseFloat(e)/gm}${ym}`}var Nie=e=>e.charAt(0).toUpperCase()+e.slice(1);function Pie(e){let t=Fie(e),n=Object.fromEntries(t);function r(e){return n[e]}function i(e){return wm(r(e))}function a(){let e=Object.keys(n),t=Iie(e),a=e.flatMap(e=>{let t=r(e),n=[`${e}Down`,wm({max:Cm(t.min)})];return[[e,wm({min:t.min})],[`${e}Only`,i(e)],n]}).filter(([,e])=>e!==``).concat(t.map(([e,t])=>{let n=r(e),i=r(t);return[`${e}To${Nie(t)}`,wm({min:n.min,max:Cm(i.min)})]}));return Object.fromEntries(a)}function o(){let e=a();return Object.fromEntries(Object.entries(e))}let s=o(),c=e=>s[e];function l(){return ra([`base`,...Object.keys(n)])}function u(e){return wm({min:r(e).min})}function d(e){return wm({max:Cm(r(e).min)})}return{values:Object.values(n),only:i,keys:l,conditions:s,getCondition:c,up:u,down:d}}function Cm(e){return Sm(`${parseFloat(xm(e)??``)-.04}px`)}function Fie(e){return Object.entries(e).sort(([,e],[,t])=>parseInt(e,10)<parseInt(t,10)?-1:1).map(([e,t],n,r)=>{let i=null;return n<=r.length-1&&(i=r[n+1]?.[1]),i!=null&&(i=Cm(i)),[e,{name:e,min:Sm(t),max:i}]})}function Iie(e){let t=[];return e.forEach((n,r)=>{let i=r;i++;let a=e[i];for(;a;)t.push([n,a]),i++,a=e[i]}),t}function wm({min:e,max:t}){return e==null&&t==null?``:[`@media screen`,e&&`(min-width: ${e})`,t&&`(max-width: ${t}
10)`].filter(Boolean).join(` and `)}var Lie=/^@|&|&$/,Rie=e=>{let{breakpoints:t,conditions:n={}}=e,r=dm(n,(e,t)=>[`_${e}`,t]),i=Object.assign({},r,t.conditions);function a(){return Object.keys(i)}function o(e){return a().includes(e)||Lie.test(e)||e.startsWith(`_`)}let s=hm(e=>e.filter(e=>e!==`base`).sort((e,t)=>{let n=o(e),r=o(t);return n&&!r?1:!n&&r?-1:0}));function c(e){return e.startsWith(`@breakpoint`)?t.getCondition(e.replace(`@breakpoint `,``)):e}function l(e){return Reflect.get(i,e)||e}return{keys:a,sort:s,has:o,resolve:l,breakpoints:t.keys(),expandAtRule:c}},Tm=Object.freeze(Object.create(null)),zie=Object.freeze([]);function Em(){return Object.create(null)}var Dm=e=>({minMax:RegExp(`(!?\\(\\s*min(-device-)?-${e})(.| 11)+\\(\\s*max(-device)?-${e}`,`i`),min:RegExp(`\\(\\s*min(-device)?-${e}`,`i`),maxMin:RegExp(`(!?\\(\\s*max(-device)?-${e})(.| 12)+\\(\\s*min(-device)?-${e}`,`i`),max:RegExp(`\\(\\s*max(-device)?-${e}`,`i`)}),Bie=Dm(`width`),Vie=Dm(`height`),Om=e=>({isMin:Lm(e.minMax,e.maxMin,e.min),isMax:Lm(e.maxMin,e.minMax,e.max)}),{isMin:km,isMax:Am}=Om(Bie),{isMin:jm,isMax:Mm}=Om(Vie),Nm=/print/i,Pm=/^print$/i,Hie=/(-?\d*\.?\d+)(ch|em|ex|px|rem)/,Uie=/(\d)/,Fm=Number.MAX_VALUE,Wie={ch:8.8984375,em:16,rem:16,ex:8.296875,px:1};function Im(e){let t=Hie.exec(e)||(km(e)||jm(e)?Uie.exec(e):null);return t?t[0]===`0`?0:parseFloat(t[1])*(Wie[t[2]]||1):Fm}function Lm(e,t,n){return r=>e.test(r)||!t.test(r)&&n.test(r)}function Gie(e,t){let n=Nm.test(e),r=Pm.test(e),i=Nm.test(t),a=Pm.test(t);return n&&i?!r&&a?1:r&&!a?-1:e.localeCompare(t):n?1:i?-1:null}var Kie=hm((e,t)=>{let n=Gie(e,t);if(n!==null)return n;let r=km(e)||jm(e),i=Am(e)||Mm(e),a=km(t)||jm(t),o=Am(t)||Mm(t);if(r&&o)return-1;if(i&&a)return 1;let s=Im(e),c=Im(t);return s===Fm&&c===Fm?e.localeCompare(t):s===Fm?1:c===Fm?-1:s===c?e.localeCompare(t):s>c?i?-1:1:i?1:-1});function Rm(e){return e.sort(([e],[t])=>Kie(e,t))}function zm(e){let t=[],n=[],r={};for(let[i,a]of Object.entries(e))i.startsWith(`@media`)?t.push([i,a]):i.startsWith(`@container`)?n.push([i,a]):Zi(a)?r[i]=zm(a):r[i]=a;let i=Rm(t),a=Rm(n);return{...r,...Object.fromEntries(i),...Object.fromEntries(a)}}var Bm=/\s*!(important)?/i,qie=hm(e=>Qi(e)?Bm.test(e):!1),Jie=hm(e=>Qi(e)?e.replace(Bm,``).trim():e);function Vm(e){let{transform:t,conditions:n,normalize:r}=e,i=Zie(e);return hm(function(...e){let a=r(i(...e)),o=Em();return Gp(a,(e,r)=>{if(e==null)return;let[i,...a]=n.sort(r).map(n.resolve),s=qie(e);s&&(e=Jie(e));let c=t(i,e)??Tm;c=Gp(c,e=>Qi(e)&&s?`${e} !important`:e,{getKey:e=>n.expandAtRule(e)}),Yie(o,a.flat(),c)}),zm(o)})}function Yie(e,t,n){let r=e;for(let e of t)e&&(r[e]||(r[e]=Em()),r=r[e]);Up(r,n)}function Xie(...e){return e.filter(e=>{if(!Zi(e))return!1;let t=Xi(e);return Object.keys(t).length>0})}function Zie(e){function t(t){let n=Xie(...t);return n.length===1?n:n.map(t=>e.normalize(t))}return hm(function(...e){return Up({},...t(e))})}var Hm=e=>({base:Tm,variants:Tm,defaultVariants:Tm,compoundVariants:[],...e});function Qie(e){let{css:t,conditions:n,normalize:r,layers:i}=e;function a(s={}){let c=Hm(s),{base:l,defaultVariants:u,compoundVariants:d}=c,f=dm(c.variants,(e,t)=>[e,dm(t,(e,t)=>[e,r(t)])]),p=Vm({conditions:n,normalize:r,transform(e,t){return f[e]?.[t]}}),m=(e={})=>{let n=r({...u,...Xi(e)}),a={...r(l)};Up(a,p(n));let s=o(d,n);return i.wrap(`recipes`,t(a,s))},h=Object.keys(f),g=e=>{let[t,n]=ua(zp(e,[`recipe`]),h),r=h.includes(`colorPalette`),i=h.includes(`orientation`);return r||(t.colorPalette=e.colorPalette||u.colorPalette),i&&(n.orientation=e.orientation),[t,n]},_=dm(f,(e,t)=>[e,Object.keys(t)]);return Object.assign(e=>t(m(e)),{className:s.className,__cva__:!0,variantMap:_,variantKeys:h,raw:m,config:s,splitVariantProps:g,merge(t){return a($ie(e)(this,t))}})}function o(e,n){let r=Tm;return e.forEach(e=>{Object.entries(e).every(([e,t])=>e===`css`?!0:(Array.isArray(t)?t:[t]).some(t=>n[e]===t))&&(r=t(r,e.css))}),r}return a}function $ie(e){let{css:t}=e;return function(e,n){let r=Hm(n.config),i=ra(e.variantKeys,Object.keys(n.variants)),a=t(e.base,r.base),o=Object.fromEntries(i.map(n=>[n,t(e.config.variants[n],r.variants[n])])),s=Up(e.config.defaultVariants,r.defaultVariants),c=[...e.compoundVariants,...r.compoundVariants];return{className:ea(e.className,n.className),base:a,variants:o,defaultVariants:s,compoundVariants:c}}}var eae={reset:`reset`,base:`base`,tokens:`tokens`,recipes:`recipes`},Um={reset:0,base:1,tokens:2,recipes:3};function tae(e){let t=e.layers??eae,n=Object.values(t).sort((e,t)=>
12Um[e]-Um[t]);return{names:n,atRule:`@layer ${n.join(`, `)};`,wrap(n,r){return e.disableLayers?r:{[`@layer ${t[n]}`]:r}}}}function nae(e){let{utility:t,normalize:n}=e,{hasShorthand:r,resolveShorthand:i}=t;return function(e){return Gp(e,n,{stop:e=>Array.isArray(e),getKey:r?i:void 0})}}function rae(e){let{preflight:t}=e;if(!t)return{};let{scope:n=``,level:r=`parent`}=Zi(t)?t:{},i=``;n&&r===`parent`?i=`${n} `:n&&r===`element`&&(i=`&${n}`);let a={"*":{margin:`0px`,padding:`0px`,font:`inherit`,wordWrap:`break-word`,WebkitTapHighlightColor:`transparent`},"*, *::before, *::after, *::backdrop":{boxSizing:`border-box`,borderWidth:`0px`,borderStyle:`solid`,borderColor:`var(--global-color-border, currentColor)`},hr:{height:`0px`,color:`inherit`,borderTopWidth:`1px`},body:{minHeight:`100dvh`,position:`relative`},img:{borderStyle:`none`},"img, svg, video, canvas, audio, iframe, embed, object":{display:`block`,verticalAlign:`middle`},iframe:{border:`none`},"img, video":{maxWidth:`100%`,height:`auto`},"p, h1, h2, h3, h4, h5, h6":{overflowWrap:`break-word`},"ol, ul":{listStyle:`none`},"code, kbd, pre, samp":{fontSize:`1em`},"button, [type='button'], [type='reset'], [type='submit']":{WebkitAppearance:`button`,backgroundColor:`transparent`,backgroundImage:`none`},"button, input, optgroup, select, textarea":{color:`inherit`},"button, select":{textTransform:`none`},table:{textIndent:`0px`,borderColor:`inherit`,borderCollapse:`collapse`},"*::placeholder":{opacity:`unset`,color:`#9ca3af`,userSelect:`none`},textarea:{resize:`vertical`},summary:{display:`list-item`},small:{fontSize:`80%`},"sub, sup":{fontSize:`75%`,lineHeight:0,position:`relative`,verticalAlign:`baseline`},sub:{bottom:`-0.25em`},sup:{top:`-0.5em`},dialog:{padding:`0px`},a:{color:`inherit`,textDecoration:`inherit`},"abbr:where([title])":{textDecoration:`underline dotted`},"b, strong":{fontWeight:`bolder`},"code, kbd, samp, pre":{fontSize:`1em`,"--font-mono-fallback":`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New'`,fontFamily:`var(--global-font-mono, var(--font-mono-fallback))`},'input[type="text"], input[type="email"], input[type="search"], input[type="password"]':{WebkitAppearance:`none`,MozAppearance:`none`},"input[type='search']":{WebkitAppearance:`textfield`,outlineOffset:`-2px`},"::-webkit-search-decoration, ::-webkit-search-cancel-button":{WebkitAppearance:`none`},"::-webkit-file-upload-button":{WebkitAppearance:`button`,font:`inherit`},'input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button':{height:`auto`},"input[type='number']":{MozAppearance:`textfield`},":-moz-ui-invalid":{boxShadow:`none`},":-moz-focusring":{outline:`auto`},"[hidden]:where(:not([hidden='until-found']))":{display:`none !important`}},o={[n||`html`]:{lineHeight:1.5,"--font-fallback":`ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'`,WebkitTextSizeAdjust:`100%`,WebkitFontSmoothing:`antialiased`,MozOsxFontSmoothing:`grayscale`,textRendering:`optimizeLegibility`,touchAction:`manipulation`,MozTabSize:`4`,tabSize:`4`,fontFamily:`var(--global-font-body, var(--font-fallback))`}};if(r===`element`){let e=Object.entries(a).reduce((e,[t,n])=>(e[t]={[i]:n},e),{});Object.assign(o,e)}else i?o[i]=a:Object.assign(o,a);return o}function iae(e){let{conditions:t,isValidProperty:n}=e,r=hm((e,r)=>n(e)?!r.split(`,`).every(e=>e===`base`||t.has(e)):!0);return function(e){return Gp(e,e=>e,{stop:e=>Array.isArray(e),getKey:(e,n)=>!Zi(n)||t.has(e)?e:r(e,Object.keys(n).join(`,`))?oae(e).map(e=>{let t=e.startsWith(`&`)?e.slice(1):e;return aae(t)?`${t} &`:`&${t}`}).join(`, `):e})}}function aae(e){let t=e.toLowerCase();return t.startsWith(`:host-context`)||t.startsWith(`:host`)||t.startsWith(`::slotted`)}function oae(e){let t=[],n=0,r=``,i=!1;for(let a=0;a<e.length;a++){let o=e[a];if(o===`\\`&&!i){i=!0,r+=o;continue}if(i){i=!1,r+=o;continue}o===`(`?n++:o===`)`&&n--,o===`,`&&n===0?(t.push(r.trim()),r=``):r+=o}return r&&t.push(r.trim()),t}var sae=(e=Tm)=>{let t=t=>({base:e.base?.[t]??Tm,variants:Em(),defaultVariants:e.defaultVariants??Tm,compoundVariants:e.compoundVariants?cae(e.compoundVariants,t):zie}),n=(e.slots??[]).map(e=>[e,t(e)]);for(let[t,r]of Object.entries(e.variants??{}))for(let[e,i]of Object.entries(r))n.forEach(([n,r])=>{var a;(a=r.variants)[t]??(a[t]={}),r.variants[t][e]=i[n]??Tm});return Object.fromEntries(n)},cae=(e,t)=>e.filter(e=>e.css[t]).map(e=>({...e,css:e.css[t]}));function lae(e){let{cva:t}=e;return function(e=Tm){let n=Object.entries(sae(e)).map(([e,n])=>[e,t(n)]);function r(e){let t=n.map(([t,n])=>[t,n(e)]);return Object.fromEntries(t)}let i=e.variants??Tm,a=Object.keys(i);function o(t){let[n,r]=ua(zp(t,[`recipe`]),a),i=a.includes(`colorPalette`),o=a.includes(`orientation`);
12return i||(n.colorPalette=t.colorPalette||e.defaultVariants?.colorPalette),o&&(r.orientation=t.orientation),[n,r]}let s=dm(i,(e,t)=>[e,Object.keys(t)]),c={};return e.className&&(c=Object.fromEntries(e.slots.map(t=>[t,`${e.className}__${t}`]))),Object.assign(r,{variantMap:s,variantKeys:a,splitVariantProps:o,classNameMap:c})}}var uae=()=>e=>Array.from(new Set(e)),dae=/([\0-\x1f\x7f]|^-?\d)|^-$|^-|[^\x80-\uFFFF\w-]/g,fae=function(e,t){return t?e===`\0`?`�`:e===`-`&&e.length===1?`\\-`:e.slice(0,-1)+`\\`+e.charCodeAt(e.length-1).toString(16):`\\`+e},Wm=e=>(e+``).replace(dae,fae),Gm=(e,t)=>{let n=``,r=0,i=`char`,a=``,o=``,s=[];for(;r<e.length;){let c=e[r];if(c===`{`){let i=e.indexOf(`}`,r);if(i===-1)break;let a=e.slice(r+1,i),o=t(a);n+=o??a,r=i+1;continue}if(i===`token`&&c===`,`){e[r]===``&&r++,i=`fallback`,s.push(i);let c=t(a);c?.endsWith(`)`)&&(n+=c.slice(0,-1)),a=``,o=``;continue}if(i===`fallback`&&o+c===`, var(`){let t=pae(e.slice(r+1))+r+1,a=e.slice(r+1,t);if(t===-1)break;n+=`, var(`+a+`)`,r=t+1,i=s.pop()??i,o=``;continue}if(i===`token`||i===`fallback`){if(r++,c===`)`){i=s.pop()??i??`char`,o+=c;let e=a&&(t(a)??Wm(a));if(o){if(o=o.slice(1).trim(),!o.startsWith(`token(`)&&o.endsWith(`)`)&&(o=o.slice(0,-1)),o.includes(`token(`)){let e=Gm(o,t);e&&(o=e.slice(0,-1))}else if(o){let e=t(o);e&&(o=e)}}let r=n.at(-1);o?r?.trim()?n+=e.slice(0,-1)+(`, `+o+`)`):n+=o:n+=e||`)`,a=``,o=``,i=`char`;continue}i===`token`&&(a+=c),i===`fallback`&&(o+=c);continue}let l=e.indexOf(`token(`,r);if(l!==-1){let t=l+6;n+=e.slice(r,l),r=t,i=`token`,s.push(i);continue}n+=c,r++}return n},pae=e=>{let t=0,n=[`(`];for(;t<e.length;){let r=e[t];if(r===`(`)n.push(r);else if(r===`)`&&(n.pop(),n.length===0))return t;t++}return t};function Km(e){let t={};return e.forEach((e,n)=>{e instanceof Map?t[n]=Object.fromEntries(e):t[n]=e}),t}var qm=/({([^}]*)})/g,mae=/[{}]/g,hae=/\w+\.\w+/,Jm=e=>{if(!Qi(e))return[];let t=e.match(qm);return t?t.map(e=>e.replace(mae,``).trim()):[]},gae=e=>qm.test(e);function Ym(e){if(!e.extensions?.references)return e.extensions?.cssVar?.ref??e.value;let t=e.extensions.references??{},n=e.value,r=Object.keys(t);for(let e=0;e<r.length;e++){let i=r[e],a=t[i];if(a.extensions.conditions)continue;let o=Ym(a);n=n.replace(`{${i}}`,o)}return e.value=n,delete e.extensions.references,e.value}function Xm(e,t){if(t==null||!Array.isArray(t))return t;switch(e){case`easings`:return`cubic-bezier(${t.join(`, `)})`;case`animations`:case`fonts`:case`gradients`:case`shadows`:return t.join(`, `);default:return t}}function _ae(e,t){let n={};for(let r in t)n[r]=Xm(e,t[r]);return n}var vae=/calc/g;function Zm(e){return Zi(e)&&e.reference?e.reference:String(e)}var Qm=(e,...t)=>t.map(Zm).join(` ${e} `).replace(vae,``),yae=(...e)=>`calc(${Qm(`+`,...e)})`,bae=(...e)=>`calc(${Qm(`-`,...e)})`,$m=(...e)=>`calc(${Qm(`*`,...e)})`,xae=(...e)=>`calc(${Qm(`/`,...e)})`,Sae=e=>{let t=Zm(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith(`-`)?String(t).slice(1):`-${t}`:$m(t,-1)},eh=Object.assign(e=>({add:(...t)=>eh(yae(e,...t)),subtract:(...t)=>eh(bae(e,...t)),multiply:(...t)=>eh($m(e,...t)),divide:(...t)=>eh(xae(e,...t)),negate:()=>eh(Sae(e)),toString:()=>e.toString()}),{add:yae,subtract:bae,multiply:$m,divide:xae,negate:Sae}),Cae={enforce:`pre`,transform(e){let{prefix:t,allTokens:n,formatCssVar:r,formatTokenName:i,registerToken:a}=e;n.filter(({extensions:e})=>e.category===`spacing`).forEach(e=>{let n=e.path.slice(),o=r(n,t);if(Qi(e.value)&&e.value===`0rem`)return;let s=[...e.path],c=s[s.length-1];c!=null&&(s[s.length-1]=`-${c}`),a({...e,value:eh.negate(o.ref),name:i(s),path:s,extensions:{...e.extensions,negative:!0,prop:`-${e.extensions.prop}`,originalPath:n}})})}},wae=new Set([`spacing`,`sizes`,`borderWidths`,`fontSizes`,`radii`]),Tae=[Cae,{enforce:`post`,transform(e){let{allTokens:t,registerToken:n,formatTokenName:r}=e,i=t.filter(({extensions:e})=>e.category===`colors`),a=new Map,o=new Map;i.forEach(e=>{let{colorPalette:t}=e.extensions;t&&(t.keys.forEach(e=>{a.set(r(e),e)}),t.roots.forEach(n=>{let i=r(n),s=o.get(i)||[];if(s.push(e),o.set(i,s),e.extensions.default&&n.length===1){let e=t.keys[0]?.filter(Boolean);if(!e.length)return;let i=n.concat(e);a.set(r(i),[])}}))}
12),a.forEach(e=>{let t=[`colors`,`colorPalette`,...e].filter(Boolean),i=r(t);n({name:i,value:i,originalValue:i,path:t,extensions:{condition:`base`,originalPath:t,category:`colors`,prop:r(t.slice(1)),virtual:!0}},`pre`)})}},{enforce:`post`,transform(e){e.allTokens.filter(e=>wae.has(e.extensions.category)&&!e.extensions.negative).forEach(e=>{Object.assign(e.extensions,{pixelValue:xm(e.value)})})}},{enforce:`post`,transform(e){e.allTokens=e.allTokens.filter(e=>e.value!==``)}}],Eae=[{type:`extensions`,enforce:`pre`,name:`tokens/css-var`,transform(e,t){let{prefix:n,formatCssVar:r}=t,{negative:i,originalPath:a}=e.extensions;return{cssVar:r((i?a:e.path).filter(Boolean),n)}}},{enforce:`post`,type:`value`,name:`tokens/conditionals`,transform(e,t){let{prefix:n,formatCssVar:r,getByName:i}=t,a=Jm(e.value);return a.length&&a.forEach(t=>{if(!i(t))return;let a=r(t.split(`.`),n);e.value=e.value.replaceAll(`{${t}}`,a.ref)}),e.value}},{type:`extensions`,enforce:`pre`,name:`tokens/colors/colorPalette`,match(e){return e.extensions.category===`colors`&&!e.extensions.virtual},transform(e,t){let n=e.path.slice();if(n.pop(),n.shift(),n.length===0){let t=[...e.path];t.shift(),n=t}if(n.length===0)return{};let r=n.reduce((e,t,n,r)=>{let i=r.slice(0,n+1);return e.push(i),e},[]),i=n[0],a=t.formatTokenName(n),o=e.path.slice(e.path.indexOf(i)+1).reduce((e,t,n,r)=>(e.push(r.slice(n)),e),[]);return o.length===0&&o.push([``]),{colorPalette:{value:a,roots:r,keys:o}}}}],Dae=e=>Zi(e)&&Object.prototype.hasOwnProperty.call(e,`value`);function Oae(e){return e?{breakpoints:Kp(e,e=>({value:e})),sizes:dm(e,(e,t)=>[`breakpoint-${e}`,{value:t}])}:{breakpoints:{},sizes:{}}}function kae(e){let{prefix:t=``,tokens:n={},semanticTokens:r={},breakpoints:i={}}=e,a=e=>e.join(`.`),o=(e,t)=>rm(e.join(`-`),{prefix:t}),s=[],c=new Map,l=new Map,u=new Map,d=new Map,f=new Map,p=new Map,m=new Map,h=new Map,g=[];function _(e,t){s.push(e),c.set(e.name,e),t&&h.forEach(n=>{n.enforce===t&&P(n,e)})}let v=Oae(i),y=Xi({...n,breakpoints:v.breakpoints,sizes:{...n.sizes,...v.sizes}});function b(){Gp(y,(e,t)=>{let n=t.includes(`DEFAULT`);t=Aae(t);let r=t[0],i=a(t),o=Xm(r,(Qi(e)?{value:e}:e).value),s={value:o,originalValue:o,name:i,path:t,extensions:{condition:`base`,originalPath:t,category:r,prop:a(t.slice(1))}};n&&(s.extensions.default=!0),_(s)},{stop:Dae}),Gp(r,(e,t)=>{let n=t.includes(`DEFAULT`);t=jae(Aae(t));let r=t[0],i=a(t),o=_ae(r,(Qi(e.value)||Array.isArray(e.value)?{value:{base:e.value}}:e).value),s={value:o.base??``,originalValue:o.base??``,name:i,path:t,extensions:{originalPath:t,category:r,conditions:o,condition:`base`,prop:a(t.slice(1))}};n&&(s.extensions.default=!0),_(s)},{stop:Dae})}function x(e){return c.get(e)}function S(e){let{condition:t}=e.extensions;t&&(l.has(t)||l.set(t,new Set),l.get(t).add(e))}function C(e){let{category:t,prop:n,condition:r}=e.extensions;t&&(r!=null&&r!==`base`||(m.has(t)||m.set(t,new Map),m.get(t).set(n,e)))}function w(e){let{condition:t,negative:n,virtual:r,cssVar:i}=e.extensions;n||r||!t||!i||(u.has(t)||u.set(t,new Map),u.get(t).set(i.var,e.value))}function T(e){let{category:t,prop:n,cssVar:r,negative:i}=e.extensions;if(!t)return;p.has(t)||p.set(t,new Map);let a=i?e.extensions.conditions?e.originalValue:e.value:r.ref;p.get(t).set(n,a),f.set([t,n].join(`.`),a)}function E(e){let{colorPalette:t,virtual:n,default:r}=e.extensions;!t||n||t.roots.forEach(n=>{let i=a(n);d.has(i)||d.set(i,new Map);let o=x(a(Nae([...e.path],[...n])));if(!o||!o.extensions.cssVar)return;let{var:s}=o.extensions.cssVar;if(d.get(i).set(s,e.extensions.cssVar.ref),r&&n.length===1){let r=x(a([`colors`,`colorPalette`]));if(!r)return;let i=x(a(e.path));if(!i)return;let o=t.keys[0]?.filter(Boolean);if(!o.length)return;let s=a(n.concat(o));d.has(s)||d.set(s,new Map),d.get(s).set(r.extensions.cssVar.var,i.extensions.cssVar.ref)}})}let D={};function O(){s.forEach(e=>{S(e),C(e),w(e),T(e),E(e)}),D=Km(p)}let k=(e,t)=>{if(!e||typeof e!=`string`)return{invalid:!0,value:e};let[n,r]=e.split(`/`);if(!n||!r)return{invalid:!0,value:n};let i=t(n),a=x(`opacity.${r}`)?.value;
12if(!a&&isNaN(Number(r)))return{invalid:!0,value:n};let o=a?Number(a)*100+`%`:`${r}%`,s=i??n;return{invalid:!1,color:s,value:`color-mix(in srgb, ${s} ${o}, transparent)`}},A=hm((e,t)=>f.get(e)??t),j={prefix:t,allTokens:s,tokenMap:c,registerToken:_,getByName:x,formatTokenName:a,formatCssVar:o,flatMap:f,cssVarMap:u,categoryMap:m,colorPaletteMap:d,getVar:A,getCategoryValues:hm(e=>D[e]||null),expandReferenceInValue:hm(e=>Gm(e,e=>{if(e){if(e.includes(`/`)){let t=k(e,e=>A(e));if(t.invalid)throw Error(`Invalid color mix at `+e+`: `+t.value);return t.value}return A(e)||(hae.test(e)?Wm(e):e)}}))};function M(...e){e.forEach(e=>{h.set(e.name,e)})}function N(...e){g.push(...e)}function P(e,t){if(t.extensions.references||$i(e.match)&&!e.match(t))return;let n=(t=>e.transform(t,j))(t);switch(!0){case e.type===`extensions`:Object.assign(t.extensions,n);break;case e.type===`value`:t.value=n;break;default:t[e.type]=n;break}}function F(e){g.forEach(t=>{t.enforce===e&&t.transform(j)})}function ee(e){h.forEach(t=>{t.enforce===e&&s.forEach(e=>{P(t,e)})})}function te(){s.slice().forEach(e=>{let t=Mae(e);!t||t.length===0||t.forEach(e=>{_(e)})})}function ne(e){let t=Jm(e),n=[];for(let e=0;e<t.length;e++){let r=x(t[e]);r&&n.push(r)}return n}function I(){s.forEach(e=>{if(!gae(e.value))return;let t=ne(e.value);e.extensions.references=t.reduce((e,t)=>(e[t.name]=t,e),{})})}function re(){s.forEach(e=>{Ym(e)})}function ie(){F(`pre`),ee(`pre`),te(),I(),re(),F(`post`),ee(`post`),O()}return b(),M(...Eae),N(...Tae),ie(),j}function Aae(e){return e[0]===`DEFAULT`?e:e.filter(e=>e!==`DEFAULT`)}function jae(e){return e.filter(e=>e!==`base`)}function Mae(e){if(!e.extensions.conditions)return;let{conditions:t}=e.extensions,n=[];return Gp(t,(t,r)=>{let i=jae(r);if(!i.length)return;let a={...e,value:t,extensions:{...zp(e.extensions,[`conditions`]),condition:i.join(`:`)}};n.push(a)}),n}function Nae(e,t){let n=e.findIndex((n,r)=>t.every((t,n)=>e[r+n]===t));return n===-1?e:(e.splice(n,t.length),e.splice(n,0,`colorPalette`),e)}uae()([`aspectRatios`,`zIndex`,`opacity`,`colors`,`fonts`,`fontSizes`,`fontWeights`,`lineHeights`,`letterSpacings`,`sizes`,`shadows`,`spacing`,`radii`,`cursor`,`borders`,`borderWidths`,`borderStyles`,`durations`,`easings`,`animations`,`blurs`,`gradients`,`breakpoints`,`assets`]);function Pae(e){return e}function Fae(e){return dm(e,(e,t)=>[e,Pae(t)])}function Iae(e){let t=Fae(e.config),n=e.tokens,r=new Map,i=new Map;function a(e,n){t[e]=Pae(n),o(e,n)}let o=(e,t)=>{let n=h(t);n&&(i.set(e,n),d(e,t))},s=()=>{for(let[e,n]of Object.entries(t))n&&o(e,n)},c=()=>{for(let[e,n]of Object.entries(t)){let{shorthand:t}=n??{};t&&(Array.isArray(t)?t:[t]).forEach(t=>r.set(t,e))}},l=()=>{let e=Km(n.colorPaletteMap);a(`colorPalette`,{values:Object.keys(e),transform:hm(t=>e[t])})},u=new Map,d=(e,t)=>{if(!t)return;let n=h(t,e=>`type:Tokens["${e}"]`);if(typeof n==`object`&&n.type){u.set(e,new Set([`type:${n.type}`]));return}if(n){let t=new Set(Object.keys(n));u.set(e,t)}let r=u.get(e)??new Set;t.property&&u.set(e,r.add(`CssProperties["${t.property}"]`))},f=()=>{for(let[e,n]of Object.entries(t))n&&d(e,n)},p=(e,t)=>{let n=u.get(e)??new Set;u.set(e,new Set([...n,...t]))},m=()=>{let e=new Map;for(let[t,n]of u.entries()){if(n.size===0){e.set(t,[`string`]);continue}let r=Array.from(n).map(e=>e.startsWith(`CssProperties`)?e:e.startsWith(`type:`)?e.replace(`type:`,``):JSON.stringify(e));e.set(t,r)}return e},h=(e,t)=>{let{values:r}=e,i=e=>{let n=t?.(e);return n?{[n]:n}:void 0};if(Qi(r))return i?.(r)??n.getCategoryValues(r)??Tm;if(Array.isArray(r)){let e={};for(let t=0;t<r.length;t++)e[r[t]]=r[t];return e}return $i(r)?r(t?i:n.getCategoryValues):r},g=hm((e,t)=>({[e]:e.startsWith(`--`)?n.getVar(t,t):t})),_=Object.assign(n.getVar,{raw:e=>n.getByName(e)}),v=hm((e,r)=>{let a=x(e);Qi(r)&&!r.includes(`_EMO_`)&&(r=n.expandReferenceInValue(r));let o=t[a];if(!o)return g(a,r);let s=i.get(a)?.[r];return o.transform?o.transform(s??r,{raw:r,token:_,utils:{colorMix:e=>cie(e,_)}}):g(e,s??r)});function y(){c(),l(),s(),f()}y();let b=r.size>0,x=hm(e=>r.get(e)??e);return{keys:()=>[...Array.from(r.keys()),...Object.keys(t)],hasShorthand:b,transform:v,shorthands:r,resolveShorthand:x,register:a,getTypes:m,addPropertyType:p}}function Lae(...e){let t=Jp(...e),{theme:n={},utilities:r={},globalCss:i={},cssVarsRoot:a=`:where(:root, :host)`,cssVarsPrefix:o=`chakra`,preflight:s}=t,c=tae(t),l=kae({breakpoints:n.breakpoints,tokens:n.tokens,semanticTokens:n.semanticTokens,prefix:o}),u=Pie(n.breakpoints??Tm),d=Rie({conditions:t.conditions??Tm,breakpoints:u}),f=Iae({config:r,tokens:l});function p(){let{textStyles:e,layerStyles:t,animationStyles:r}=n,i=Xi({textStyle:e,layerStyle:t,animationStyle:r});for(let[e,t]of Object.entries(i)){let n=fm(t??Tm,zae);f.register(e,{values:Object.keys(n),transform(e){return y(n[e])}})}}p(),f.addPropertyType(`animationName`,Object.keys(n.keyframes??Tm));let m=new Set([`css`,...f.keys(),...d.keys()]),h=hm(e=>m.has(e)||kie(e)),g=e=>{if(Array.isArray(e)){let t=Em();for(let n=0;n<e.length;n++){let r=e[n];if(r!=null){let e=d.breakpoints[n];t[e]=r}}return t}return e},_=nae({utility:f,normalize:g}),v=iae({conditions:d,isValidProperty:h}),y=Vm({transform:f.transform,conditions:d,normalize:_}),b=Qie({css:y,conditions:d,normalize:_,layers:c}),x=lae({cva:b});function S(){let e={};for(let[t,n]of l.cssVarMap.entries()){let r=Object.fromEntries(n);if(Object.keys(r).length===0)continue;let i=t===`base`?a:d.resolve(t),o=i.startsWith(`@`);Up(e,y(v({[i]:o?{[a]:r}:r})))}return c.wrap(`tokens`,e)}function C(){let e=dm(n.keyframes??Tm,(e,t)=>[`@keyframes ${e}`,t]),t=Object.assign({},e,y(v(i)));return c.wrap(`base`,t)}function w(e){return ua(e,h)}function T(){let e=rae({preflight:s});return c.wrap(`reset`,e)}let E=Rae(l),D=(e,t)=>E.get(e)?.value||t;D.var=(e,t)=>
12E.get(e)?.variable||t;function O(e,t){return n.recipes?.[e]??t}function k(e,t){return n.slotRecipes?.[e]??t}function A(e){return Object.hasOwnProperty.call(n.recipes??Tm,e)}function j(e){return Object.hasOwnProperty.call(n.slotRecipes??Tm,e)}function M(e){return A(e)||j(e)}return{$$chakra:!0,_config:t,_global:[T(),C(),S()],breakpoints:u,tokens:l,conditions:d,utility:f,token:D,properties:m,layers:c,isValidProperty:h,splitCssProps:w,normalizeValue:g,getTokenCss:S,getGlobalCss:C,getPreflightCss:T,css:y,cva:b,sva:x,getRecipe:O,getSlotRecipe:k,hasRecipe:M,isRecipe:A,isSlotRecipe:j,query:{layerStyles:th(n.layerStyles??Tm),textStyles:th(n.textStyles??Tm),animationStyles:th(n.animationStyles??Tm),tokens:Bae(l,Object.keys(n.tokens??Tm),(e,t)=>!e.extensions.conditions&&!t.includes(`colorPalette`)),semanticTokens:Bae(l,Object.keys(n.semanticTokens??Tm),e=>!!e.extensions.conditions),keyframes:Vae(n.keyframes??Tm),breakpoints:Vae(n.breakpoints??Tm)}}}function Rae(e){let t=new Map;return e.allTokens.forEach(e=>{let{cssVar:n,virtual:r,conditions:i}=e.extensions,a=i||r?n.ref:e.value;t.set(e.name,{value:a,variable:n.ref})}),t}var zae=e=>Zi(e)&&`value`in e,th=e=>({list(){return Object.keys(fm(e,zae))},search(e){return this.list().filter(t=>t.includes(e))}}),Bae=(e,t,n)=>({categoryKeys:t,list(t){let r=e.categoryMap.get(t),i=r?[...r.entries()]:[],a=[];for(let e=0;e<i.length;e++){let[t,r]=i[e];n(r,t)&&a.push(t)}return a},search(e,t){return this.list(e).filter(e=>e.includes(t))}}),Vae=e=>({list(){return Object.keys(e)},search(e){return this.list().filter(t=>t.includes(e))}}),Hae={sm:`480px`,md:`768px`,lg:`1024px`,xl:`1280px`,"2xl":`1536px`},nh=`var(--chakra-empty, )`,Uae=fie({"*":{fontFeatureSettings:`"cv11"`,"--ring-inset":nh,"--ring-offset-width":`0px`,"--ring-offset-color":`#fff`,"--ring-color":`rgba(66, 153, 225, 0.6)`,"--ring-offset-shadow":`0 0 #0000`,"--ring-shadow":`0 0 #0000`,...Object.fromEntries([`brightness`,`contrast`,`grayscale`,`hue-rotate`,`invert`,`saturate`,`sepia`,`drop-shadow`].map(e=>[`--${e}`,nh])),...Object.fromEntries([`blur`,`brightness`,`contrast`,`grayscale`,`hue-rotate`,`invert`,`opacity`,`saturate`,`sepia`].map(e=>[`--backdrop-${e}`,nh])),"--global-font-mono":`fonts.mono`,"--global-font-body":`fonts.body`,"--global-color-border":`colors.border`},html:{color:`fg`,bg:`bg`,lineHeight:`1.5`,colorPalette:`gray`},"*::placeholder, *[data-placeholder]":{color:`fg.muted/80`},"*::selection":{bg:`colorPalette.emphasized/80`}}),Wae=mie({"fill.muted":{value:{background:`colorPalette.muted`,color:`colorPalette.fg`}},"fill.subtle":{value:{background:`colorPalette.subtle`,color:`colorPalette.fg`}},"fill.surface":{value:{background:`colorPalette.subtle`,color:`colorPalette.fg`,boxShadow:`0 0 0px 1px var(--shadow-color)`,boxShadowColor:`colorPalette.muted`}},"fill.solid":{value:{background:`colorPalette.solid`,color:`colorPalette.contrast`}},"outline.subtle":{value:{color:`colorPalette.fg`,boxShadow:`inset 0 0 0px 1px var(--shadow-color)`,boxShadowColor:`colorPalette.subtle`}},"outline.solid":{value:{borderWidth:`1px`,borderColor:`colorPalette.solid`,color:`colorPalette.fg`}},"indicator.bottom":{value:{position:`relative`,"--indicator-color-fallback":`colors.colorPalette.solid`,_before:{content:`""`,position:`absolute`,bottom:`var(--indicator-offset-y, 0)`,insetInline:`var(--indicator-offset-x, 0)`,height:`var(--indicator-thickness, 2px)`,background:`var(--indicator-color, var(--indicator-color-fallback))`}}},"indicator.top":{value:{position:`relative`,"--indicator-color-fallback":`colors.colorPalette.solid`,_before:{content:`""`,position:`absolute`,top:`var(--indicator-offset-y, 0)`,insetInline:`var(--indicator-offset-x, 0)`,height:`var(--indicator-thickness, 2px)`,background:`var(--indicator-color, var(--indicator-color-fallback))`}}},"indicator.start":{value:{position:`relative`,"--indicator-color-fallback":`colors.colorPalette.solid`,_before:{content:`""`,position:`absolute`,insetInlineStart:`var(--indicator-offset-x, 0)`,insetBlock:`var(--indicator-offset-y, 0)`,width:`var(--indicator-thickness, 2px)`,background:`var(--indicator-color, var(--indicator-color-fallback))`}}},"indicator.end":{value:{position:`relative`,"--indicator-color-fallback":`colors.colorPalette.solid`,_before:{content:`""`,position:`absolute`,insetInlineEnd:`var(--indicator-offset-x, 0)`,insetBlock:`var(--indicator-offset-y, 0)`,width:`var(--indicator-thickness, 2px)`,background:`var(--indicator-color, var(--indicator-color-fallback))`}}},disabled:{value:{opacity:`0.5`,cursor:`not-allowed`}},none:{value:{}}}),Gae=pie({"slide-fade-in":{value:{transformOrigin:`var(--transform-origin)`,"&[data-placement^=top]":{animationName:`slide-from-bottom, fade-in`},"&[data-placement^=bottom]":{animationName:`slide-from-top, fade-in`},"&[data-placement^=left]":{animationName:`slide-from-right, fade-in`},"&[data-placement^=right]":{animationName:`slide-from-left, fade-in`}}}
12,"slide-fade-out":{value:{transformOrigin:`var(--transform-origin)`,"&[data-placement^=top]":{animationName:`slide-to-bottom, fade-out`},"&[data-placement^=bottom]":{animationName:`slide-to-top, fade-out`},"&[data-placement^=left]":{animationName:`slide-to-right, fade-out`},"&[data-placement^=right]":{animationName:`slide-to-left, fade-out`}}},"scale-fade-in":{value:{transformOrigin:`var(--transform-origin)`,animationName:`scale-in, fade-in`}},"scale-fade-out":{value:{transformOrigin:`var(--transform-origin)`,animationName:`scale-out, fade-out`}}}),rh=Yp({className:`chakra-badge`,base:{display:`inline-flex`,alignItems:`center`,borderRadius:`l2`,gap:`1`,fontWeight:`medium`,fontVariantNumeric:`tabular-nums`,whiteSpace:`nowrap`,userSelect:`none`},variants:{variant:{solid:{bg:`colorPalette.solid`,color:`colorPalette.contrast`},subtle:{bg:`colorPalette.subtle`,color:`colorPalette.fg`},outline:{color:`colorPalette.fg`,"--outline-shadow-legacy":`colors.colorPalette.muted`,"--outline-shadow":`colors.colorPalette.border`,shadow:`inset 0 0 0px 1px var(--shadow-color)`,shadowColor:`var(--outline-shadow, var(--outline-shadow-legacy))`},surface:{bg:`colorPalette.subtle`,color:`colorPalette.fg`,shadow:`inset 0 0 0px 1px var(--shadow-color)`,shadowColor:`colorPalette.muted`},plain:{color:`colorPalette.fg`}},size:{xs:{textStyle:`2xs`,px:`1`,minH:`4`},sm:{textStyle:`xs`,px:`1.5`,minH:`5`},md:{textStyle:`sm`,px:`2`,minH:`6`},lg:{textStyle:`sm`,px:`2.5`,minH:`7`}}},defaultVariants:{variant:`subtle`,size:`sm`}}),Kae=Yp({className:`chakra-button`,base:{display:`inline-flex`,appearance:`none`,alignItems:`center`,justifyContent:`center`,userSelect:`none`,position:`relative`,borderRadius:`l2`,whiteSpace:`nowrap`,verticalAlign:`middle`,borderWidth:`1px`,borderColor:`transparent`,cursor:`button`,flexShrink:`0`,outline:`0`,lineHeight:`1.2`,isolation:`isolate`,fontWeight:`medium`,transitionProperty:`common`,transitionDuration:`moderate`,focusVisibleRing:`outside`,_disabled:{layerStyle:`disabled`},_icon:{flexShrink:`0`}},variants:{size:{"2xs":{h:`6`,minW:`6`,textStyle:`xs`,px:`2`,gap:`1`,_icon:{width:`3.5`,height:`3.5`}},xs:{h:`8`,minW:`8`,textStyle:`xs`,px:`2.5`,gap:`1`,_icon:{width:`4`,height:`4`}},sm:{h:`9`,minW:`9`,px:`3.5`,textStyle:`sm`,gap:`2`,_icon:{width:`4`,height:`4`}},md:{h:`10`,minW:`10`,textStyle:`sm`,px:`4`,gap:`2`,_icon:{width:`5`,height:`5`}},lg:{h:`11`,minW:`11`,textStyle:`md`,px:`5`,gap:`3`,_icon:{width:`5`,height:`5`}},xl:{h:`12`,minW:`12`,textStyle:`md`,px:`5`,gap:`2.5`,_icon:{width:`5`,height:`5`}},"2xl":{h:`16`,minW:`16`,textStyle:`lg`,px:`7`,gap:`3`,_icon:{width:`6`,height:`6`}}},variant:{solid:{bg:`colorPalette.solid`,color:`colorPalette.contrast`,borderColor:`transparent`,_hover:{bg:`colorPalette.solid/90`},_expanded:{bg:`colorPalette.solid/90`}},subtle:{bg:`colorPalette.subtle`,color:`colorPalette.fg`,borderColor:`transparent`,_hover:{bg:`colorPalette.muted`},_expanded:{bg:`colorPalette.muted`}},surface:{bg:`colorPalette.subtle`,color:`colorPalette.fg`,shadow:`0 0 0px 1px var(--shadow-color)`,shadowColor:`colorPalette.muted`,_hover:{bg:`colorPalette.muted`},_expanded:{bg:`colorPalette.muted`}},outline:{borderWidth:`1px`,"--outline-color-legacy":`colors.colorPalette.muted`,"--outline-color":`colors.colorPalette.border`,borderColor:`var(--outline-color, var(--outline-color-legacy))`,color:`colorPalette.fg`,_hover:{bg:`colorPalette.subtle`},_expanded:{bg:`colorPalette.subtle`}},ghost:{bg:`transparent`,color:`colorPalette.fg`,_hover:{bg:`colorPalette.subtle`},_expanded:{bg:`colorPalette.subtle`}},plain:{color:`colorPalette.fg`}}},defaultVariants:{size:`md`,variant:`solid`}}),ih=Yp({className:`chakra-checkmark`,base:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,flexShrink:`0`,color:`white`,borderWidth:`1px`,borderColor:`transparent`,borderRadius:`l1`,cursor:`checkbox`,focusVisibleRing:`outside`,_icon:{boxSize:`full`},_invalid:{colorPalette:`red`,borderColor:`border.error`},_disabled:{opacity:`0.5`,cursor:`disabled`}},variants:{size:{xs:{boxSize:`3`},sm:{boxSize:`4`},md:{boxSize:`5`,p:`0.5`},lg:{boxSize:`6`,p:`0.5`}},variant:{solid:{borderColor:`border.emphasized`,"&:is([data-state=checked], [data-state=indeterminate])":{bg:`colorPalette.solid`,color:`colorPalette.contrast`,borderColor:`colorPalette.solid`}},outline:{borderColor:`border`,"&:is([data-state=checked], [data-state=indeterminate])":{color:`colorPalette.fg`,borderColor:`colorPalette.solid`}},subtle:{bg:`colorPalette.muted`,borderColor:`colorPalette.muted`,"&:is([data-state=checked], [data-state=indeterminate])":{color:`colorPalette.fg`}},plain:{"&:is([data-state=checked], [data-state=indeterminate])":{color:`colorPalette.fg`}},inverted:{borderColor:`border`,color:`colorPalette.fg`,"&:is([data-state=checked], [data-state=indeterminate])":{borderColor:`colorPalette.solid`}}},filled:{true:{bg:`bg`}}},defaultVariants:{variant:`solid`,size:`md`}}),{variants:qae,defaultVariants:Jae}
12=rh,Yae=Yp({className:`chakra-code`,base:{fontFamily:`mono`,alignItems:`center`,display:`inline-flex`,borderRadius:`l2`},variants:qae,defaultVariants:Jae}),Xae=Yp({className:`color-swatch`,base:{boxSize:`var(--swatch-size)`,shadow:`inset 0 0 0 1px rgba(0, 0, 0, 0.1)`,"--checker-size":`8px`,"--checker-bg":`colors.bg`,"--checker-fg":`colors.bg.emphasized`,background:`linear-gradient(var(--color), var(--color)), repeating-conic-gradient(var(--checker-fg) 0%, var(--checker-fg) 25%, var(--checker-bg) 0%, var(--checker-bg) 50%) 0% 50% / var(--checker-size) var(--checker-size) !important`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,flexShrink:`0`},variants:{size:{"2xs":{"--swatch-size":`sizes.3.5`},xs:{"--swatch-size":`sizes.4`},sm:{"--swatch-size":`sizes.4.5`},md:{"--swatch-size":`sizes.5`},lg:{"--swatch-size":`sizes.6`},xl:{"--swatch-size":`sizes.7`},"2xl":{"--swatch-size":`sizes.8`},inherit:{"--swatch-size":`inherit`},full:{"--swatch-size":`100%`}},shape:{square:{borderRadius:`none`},circle:{borderRadius:`full`},rounded:{borderRadius:`l1`}}},defaultVariants:{size:`md`,shape:`rounded`}}
12),Zae=Yp({className:`chakra-container`,base:{position:`relative`,maxWidth:`8xl`,w:`100%`,mx:`auto`,px:{base:`4`,md:`6`,lg:`8`}},variants:{centerContent:{true:{display:`flex`,flexDirection:`column`,alignItems:`center`}},fluid:{true:{maxWidth:`full`}}}}),Qae=Yp({className:`chakra-heading`,base:{fontFamily:`heading`,fontWeight:`semibold`},variants:{size:{xs:{textStyle:`xs`},sm:{textStyle:`sm`},md:{textStyle:`md`},lg:{textStyle:`lg`},xl:{textStyle:`xl`},"2xl":{textStyle:`2xl`},"3xl":{textStyle:`3xl`},"4xl":{textStyle:`4xl`},"5xl":{textStyle:`5xl`},"6xl":{textStyle:`6xl`},"7xl":{textStyle:`7xl`}}},defaultVariants:{size:`xl`}}),$ae=Yp({className:`chakra-icon`,base:{display:`inline-block`,lineHeight:`1em`,flexShrink:`0`,color:`currentcolor`,verticalAlign:`middle`},variants:{size:{inherit:{},xs:{boxSize:`3`},sm:{boxSize:`4`},md:{boxSize:`5`},lg:{boxSize:`6`},xl:{boxSize:`7`},"2xl":{boxSize:`8`}}},defaultVariants:{size:`inherit`}}),ah=Yp({className:`chakra-input`,base:{width:`100%`,minWidth:`0`,outline:`0`,position:`relative`,appearance:`none`,textAlign:`start`,borderRadius:`l2`,_disabled:{layerStyle:`disabled`},height:`var(--input-height)`,minW:`var(--input-height)`,"--focus-color":`colors.colorPalette.focusRing`,"--error-color":`colors.border.error`,_invalid:{focusRingColor:`var(--error-color)`,borderColor:`var(--error-color)`}},variants:{size:{"2xs":{textStyle:`xs`,px:`2`,"--input-height":`sizes.7`},xs:{textStyle:`xs`,px:`2`,"--input-height":`sizes.8`},sm:{textStyle:`sm`,px:`2.5`,"--input-height":`sizes.9`},md:{textStyle:`sm`,px:`3`,"--input-height":`sizes.10`},lg:{textStyle:`md`,px:`4`,"--input-height":`sizes.11`},xl:{textStyle:`md`,px:`4.5`,"--input-height":`sizes.12`},"2xl":{textStyle:`lg`,px:`5`,"--input-height":`sizes.16`}},variant:{outline:{bg:`transparent`,borderWidth:`1px`,borderColor:`border`,focusVisibleRing:`inside`,focusRingColor:`var(--focus-color)`},subtle:{borderWidth:`1px`,borderColor:`transparent`,bg:`bg.muted`,focusVisibleRing:`inside`,focusRingColor:`var(--focus-color)`},flushed:{bg:`transparent`,borderBottomWidth:`1px`,borderBottomColor:`border`,borderRadius:`0`,px:`0`,_focusVisible:{borderColor:`var(--focus-color)`,boxShadow:`0px 1px 0px 0px var(--focus-color)`,_invalid:{borderColor:`var(--error-color)`,boxShadow:`0px 1px 0px 0px var(--error-color)`}}}}},defaultVariants:{size:`md`,variant:`outline`}}),eoe=Yp({className:`chakra-input-addon`,base:{flex:`0 0 auto`,width:`auto`,display:`flex`,alignItems:`center`,whiteSpace:`nowrap`,alignSelf:`stretch`,borderRadius:`l2`},variants:{size:ah.variants.size,variant:{outline:{borderWidth:`1px`,borderColor:`border`,bg:`bg.muted`},subtle:{borderWidth:`1px`,borderColor:`transparent`,bg:`bg.emphasized`},flushed:{borderBottom:`1px solid`,borderColor:`inherit`,borderRadius:`0`,px:`0`,bg:`transparent`}}},defaultVariants:{size:`md`,variant:`outline`}}),toe=Yp({className:`chakra-kbd`,base:{display:`inline-flex`,alignItems:`center`,fontWeight:`medium`,fontFamily:`mono`,flexShrink:`0`,whiteSpace:`nowrap`,wordSpacing:`-0.5em`,userSelect:`none`,px:`1`,borderRadius:`l2`},variants:{variant:{raised:{bg:`colorPalette.subtle`,color:`colorPalette.fg`,borderWidth:`1px`,borderBottomWidth:`2px`,borderColor:`colorPalette.muted`},outline:{borderWidth:`1px`,color:`colorPalette.fg`},subtle:{bg:`colorPalette.muted`,color:`colorPalette.fg`},plain:{color:`colorPalette.fg`}},size:{sm:{textStyle:`xs`,height:`4.5`},md:{textStyle:`sm`,height:`5`},lg:{textStyle:`md`,height:`6`}}},defaultVariants:{size:`md`,variant:`raised`}}),noe=Yp({className:`chakra-link`,base:{display:`inline-flex`,alignItems:`center`,outline:`none`,gap:`1.5`,cursor:`pointer`,borderRadius:`l1`,focusRing:`outside`},variants:{variant:{underline:{color:`colorPalette.fg`,textDecoration:`underline`,textUnderlineOffset:`3px`,textDecorationColor:`currentColor/20`},plain:{color:`colorPalette.fg`,_hover:{textDecoration:`underline`,textUnderlineOffset:`3px`,textDecorationColor:`currentColor/20`}}}},defaultVariants:{variant:`plain`}}),roe=Yp({className:`chakra-mark`,base:{bg:`transparent`,color:`inherit`,whiteSpace:`nowrap`},variants:{variant:{subtle:{bg:`colorPalette.subtle`,color:`inherit`},solid:{bg:`colorPalette.solid`,color:`colorPalette.contrast`},text:{fontWeight:`medium`},plain:{}}}}),oh=Yp({className:`chakra-radiomark`,base:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,verticalAlign:`to
12p`,color:`white`,borderWidth:`1px`,borderColor:`transparent`,borderRadius:`full`,cursor:`radio`,_focusVisible:{outline:`2px solid`,outlineColor:`colorPalette.focusRing`,outlineOffset:`2px`},_invalid:{colorPalette:`red`,borderColor:`red.500`},_disabled:{opacity:`0.5`,cursor:`disabled`},"& .dot":{height:`100%`,width:`100%`,borderRadius:`full`,bg:`currentColor`,scale:`0.4`}},variants:{variant:{solid:{borderWidth:`1px`,borderColor:`border.emphasized`,_checked:{bg:`colorPalette.solid`,color:`colorPalette.contrast`,borderColor:`colorPalette.solid`}},subtle:{borderWidth:`1px`,bg:`colorPalette.muted`,borderColor:`colorPalette.muted`,color:`transparent`,_checked:{color:`colorPalette.fg`}},outline:{borderWidth:`1px`,borderColor:`inherit`,_checked:{color:`colorPalette.fg`,borderColor:`colorPalette.solid`},"& .dot":{scale:`0.6`}},inverted:{bg:`bg`,borderWidth:`1px`,borderColor:`inherit`,_checked:{color:`colorPalette.solid`,borderColor:`currentcolor`}}},size:{xs:{boxSize:`3`},sm:{boxSize:`4`},md:{boxSize:`5`},lg:{boxSize:`6`}},filled:{true:{bg:`bg`}}},defaultVariants:{variant:`solid`,size:`md`}}),ioe={badge:rh,button:Kae,code:Yae,container:Zae,heading:Qae,input:ah,inputAddon:eoe,kbd:toe,link:noe,mark:roe,separator:Yp({className:`chakra-separator`,base:{display:`block`,borderColor:`border`},variants:{variant:{solid:{borderStyle:`solid`},dashed:{borderStyle:`dashed`},dotted:{borderStyle:`dotted`}},orientation:{vertical:{borderInlineStartWidth:`var(--separator-thickness)`},horizontal:{borderTopWidth:`var(--separator-thickness)`}},size:{xs:{"--separator-thickness":`0.5px`},sm:{"--separator-thickness":`1px`},md:{"--separator-thickness":`2px`},lg:{"--separator-thickness":`3px`}}},defaultVariants:{size:`sm`,variant:`solid`,orientation:`horizontal`}}),skeleton:Yp({className:`chakra-skeleton`,base:{},variants:{loading:{true:{borderRadius:`l2`,boxShadow:`none`,backgroundClip:`padding-box`,cursor:`default`,color:`transparent`,pointerEvents:`none`,userSelect:`none`,flexShrink:`0`,"&::before, &::after, *":{visibility:`hidden`}},false:{background:`unset`,animation:`fade-in var(--fade-duration, 0.1s) ease-out !important`}},variant:{pulse:{background:`bg.emphasized`,animation:`pulse`,animationDuration:`var(--duration, 1.2s)`},shine:{"--animate-from":`200%`,"--animate-to":`-200%`,"--start-color":`colors.bg.muted`,"--end-color":`colors.bg.emphasized`,backgroundImage:`linear-gradient(270deg,var(--start-color),var(--end-color),var(--end-color),var(--start-color))`,backgroundSize:`400% 100%`,animation:`bg-position var(--duration, 5s) ease-in-out infinite`},none:{animation:`none`}}},defaultVariants:{variant:`pulse`,loading:!0}}),skipNavLink:Yp({className:`chakra-skip-nav`,base:{display:`inline-flex`,bg:`bg.panel`,padding:`2.5`,borderRadius:`l2`,fontWeight:`semibold`,focusVisibleRing:`outside`,textStyle:`sm`,userSelect:`none`,border:`0`,height:`1px`,width:`1px`,margin:`-1px`,outline:`0`,overflow:`hidden`,position:`absolute`,clip:`rect(0 0 0 0)`,_focusVisible:{clip:`auto`,width:`auto`,height:`auto`,position:`fixed`,top:`6`,insetStart:`6`}}}
12),spinner:Yp({className:`chakra-spinner`,base:{display:`inline-block`,borderColor:`currentColor`,borderStyle:`solid`,borderWidth:`2px`,borderRadius:`full`,width:`var(--spinner-size)`,height:`var(--spinner-size)`,animation:`spin`,animationDuration:`slowest`,"--spinner-track-color":`transparent`,borderBottomColor:`var(--spinner-track-color)`,borderInlineStartColor:`var(--spinner-track-color)`},variants:{size:{inherit:{"--spinner-size":`1em`},xs:{"--spinner-size":`sizes.3`},sm:{"--spinner-size":`sizes.4`},md:{"--spinner-size":`sizes.5`},lg:{"--spinner-size":`sizes.8`},xl:{"--spinner-size":`sizes.10`}}},defaultVariants:{size:`md`}}),textarea:Yp({className:`chakra-textarea`,base:{width:`100%`,minWidth:`0`,outline:`0`,position:`relative`,appearance:`none`,textAlign:`start`,borderRadius:`l2`,_disabled:{layerStyle:`disabled`},"--focus-color":`colors.colorPalette.focusRing`,"--error-color":`colors.border.error`,_invalid:{focusRingColor:`var(--error-color)`,borderColor:`var(--error-color)`}},variants:{size:{xs:{textStyle:`xs`,px:`2`,py:`1.5`,scrollPaddingBottom:`1.5`},sm:{textStyle:`sm`,px:`2.5`,py:`2`,scrollPaddingBottom:`2`},md:{textStyle:`sm`,px:`3`,py:`2`,scrollPaddingBottom:`2`},lg:{textStyle:`md`,px:`4`,py:`3`,scrollPaddingBottom:`3`},xl:{textStyle:`md`,px:`4.5`,py:`3.5`,scrollPaddingBottom:`3.5`}},variant:{outline:{bg:`transparent`,borderWidth:`1px`,borderColor:`border`,focusVisibleRing:`inside`},subtle:{borderWidth:`1px`,borderColor:`transparent`,bg:`bg.muted`,focusVisibleRing:`inside`},flushed:{bg:`transparent`,borderBottomWidth:`1px`,borderBottomColor:`border`,borderRadius:`0`,px:`0`,_focusVisible:{borderColor:`var(--focus-color)`,boxShadow:`0px 1px 0px 0px var(--focus-color)`}}}},defaultVariants:{size:`md`,variant:`outline`}}),icon:$ae,checkmark:ih,radiomark:oh,colorSwatch:Xae},aoe=tm.colors({bg:{DEFAULT:{value:{_light:`{colors.white}`,_dark:`{colors.black}`}},subtle:{value:{_light:`{colors.gray.50}`,_dark:`{colors.gray.950}`}},muted:{value:{_light:`{colors.gray.100}
12`,_dark:`{colors.gray.900}`}},emphasized:{value:{_light:`{colors.gray.200}`,_dark:`{colors.gray.800}`}},inverted:{value:{_light:`{colors.black}`,_dark:`{colors.white}`}},panel:{value:{_light:`{colors.white}`,_dark:`{colors.gray.950}`}},error:{value:{_light:`{colors.red.50}`,_dark:`{colors.red.950}`}},warning:{value:{_light:`{colors.orange.50}`,_dark:`{colors.orange.950}`}},success:{value:{_light:`{colors.green.50}`,_dark:`{colors.green.950}`}},info:{value:{_light:`{colors.blue.50}`,_dark:`{colors.blue.950}`}}},fg:{DEFAULT:{value:{_light:`{colors.black}`,_dark:`{colors.gray.50}`}},muted:{value:{_light:`{colors.gray.600}`,_dark:`{colors.gray.400}`}},subtle:{value:{_light:`{colors.gray.400}`,_dark:`{colors.gray.500}`}},inverted:{value:{_light:`{colors.gray.50}`,_dark:`{colors.black}`}},error:{value:{_light:`{colors.red.500}`,_dark:`{colors.red.400}`}},warning:{value:{_light:`{colors.orange.600}`,_dark:`{colors.orange.300}`}},success:{value:{_light:`{colors.green.600}`,_dark:`{colors.green.300}`}},info:{value:{_light:`{colors.blue.600}`,_dark:`{colors.blue.300}`}}},border:{DEFAULT:{value:{_light:`{colors.gray.200}`,_dark:`{colors.gray.800}`}},muted:{value:{_light:`{colors.gray.100}
12`,_dark:`{colors.gray.900}`}},subtle:{value:{_light:`{colors.gray.50}`,_dark:`{colors.gray.950}`}},emphasized:{value:{_light:`{colors.gray.300}`,_dark:`{colors.gray.700}`}},inverted:{value:{_light:`{colors.gray.800}`,_dark:`{colors.gray.200}`}},error:{value:{_light:`{colors.red.500}`,_dark:`{colors.red.400}`}},warning:{value:{_light:`{colors.orange.500}`,_dark:`{colors.orange.400}`}},success:{value:{_light:`{colors.green.500}`,_dark:`{colors.green.400}`}},info:{value:{_light:`{colors.blue.500}`,_dark:`{colors.blue.400}`}}},gray:{contrast:{value:{_light:`{colors.white}`,_dark:`{colors.black}`}},fg:{value:{_light:`{colors.gray.800}`,_dark:`{colors.gray.200}`}},subtle:{value:{_light:`{colors.gray.100}`,_dark:`{colors.gray.900}`}},muted:{value:{_light:`{colors.gray.200}`,_dark:`{colors.gray.800}`}},emphasized:{value:{_light:`{colors.gray.300}`,_dark:`{colors.gray.700}`}},solid:{value:{_light:`{colors.gray.900}`,_dark:`{colors.white}`}},focusRing:{value:{_light:`{colors.gray.400}`,_dark:`{colors.gray.400}`}},border:{value:{_light:`{colors.gray.200}`,_dark:`{colors.gray.800}`}}},red:{contrast:{value:{_light:`white`,_dark:`white`}},fg:{value:{_light:`{colors.red.700}`,_dark:`{colors.red.300}`}},subtle:{value:{_light:`{colors.red.100}`,_dark:`{colors.red.900}`}},muted:{value:{_light:`{colors.red.200}`,_dark:`{colors.red.800}`}},emphasized:{value:{_light:`{colors.red.300}`,_dark:`{colors.red.700}`}},solid:{value:{_light:`{colors.red.600}`,_dark:`{colors.red.600}`}},focusRing:{value:{_light:`{colors.red.500}`,_dark:`{colors.red.500}`}},border:{value:{_light:`{colors.red.500}`,_dark:`{colors.red.400}`}}},orange:{contrast:{value:{_light:`white`,_dark:`black`}},fg:{value:{_light:`{colors.orange.700}`,_dark:`{colors.orange.300}`}},subtle:{value:{_light:`{colors.orange.100}`,_dark:`{colors.orange.900}`}},muted:{value:{_light:`{colors.orange.200}`,_dark:`{colors.orange.800}`}},emphasized:{value:{_light:`{colors.orange.300}`,_dark:`{colors.orange.700}`}},solid:{value:{_light:`{colors.orange.600}`,_dark:`{colors.orange.500}`}},focusRing:{value:{_light:`{colors.orange.500}`,_dark:`{colors.orange.500}`}},border:{value:{_light:`{colors.orange.500}`,_dark:`{colors.orange.400}`}}},green:{contrast:{value:{_light:`white`,_dark:`white`}},fg:{value:{_light:`{colors.green.700}`,_dark:`{colors.green.300}`}},subtle:{value:{_light:`{colors.green.100}`,_dark:`{colors.green.900}`}},muted:{value:{_light:`{colors.green.200}`,_dark:`{colors.green.800}`}},emphasized:{value:{_light:`{colors.green.300}`,_dark:`{colors.green.700}`}},solid:{value:{_light:`{colors.green.600}`,_dark:`{colors.green.600}`}},focusRing:{value:{_light:`{colors.green.500}`,_dark:`{colors.green.500}`}},border:{value:{_light:`{colors.green.500}`,_dark:`{colors.green.400}`}}},blue:{contrast:{value:{_light:`white`,_dark:`white`}},fg:{value:{_light:`{colors.blue.700}`,_dark:`{colors.blue.300}`}},subtle:{value:{_light:`{colors.blue.100}`,_dark:`{colors.blue.900}`}},muted:{value:{_light:`{colors.blue.200}`,_dark:`{colors.blue.800}`}},emphasized:{value:{_light:`{colors.blue.300}`,_dark:`{colors.blue.700}`}},solid:{value:{_light:`{colors.blue.600}`,_dark:`{colors.blue.600}`}},focusRing:{value:{_light:`{colors.blue.500}`,_dark:`{colors.blue.500}`}},border:{value:{_light:`{colors.blue.500}`,_dark:`{colors.blue.400}`}}},yellow:{contrast:{value:{_light:`black`,_dark:`black`}},fg:{value:{_light:`{colors.yellow.800}`,_dark:`{colors.yellow.300}`}},subtle:{value:{_light:`{colors.yellow.100}`,_dark:`{colors.yellow.900}`}},muted:{value:{_light:`{colors.yellow.200}`,_dark:`{colors.yellow.800}`}},emphasized:{value:{_light:`{colors.yellow.300}`,_dark:`{colors.yellow.700}`}},solid:{value:{_light:`{colors.yellow.300}`,_dark:`{colors.yellow.300}`}},focusRing:{value:{_light:`{colors.yellow.500}`,_dark:`{colors.yellow.500}`}},border:{value:{_light:`{colors.yellow.500}`,_dark:`{colors.yellow.500}`}}},teal:{contrast:{value:{_light:`white`,_dark:`white`}},fg:{value:{_light:`{colors.teal.700}`,_dark:`{colors.teal.300}`}},subtle:{value:{_light:`{colors.teal.100}`,_dark:`{colors.teal.900}`}},muted:{value:{_light:`{colors.teal.200}`,_dark:`{colors.teal.800}`}},emphasized:{value:{_light:`{colors.teal.300}`,_dark:`{colors.teal.700}`}},solid:{value:{_light:`{colors.teal.600}`,_dark:`{colors.teal.600}`}},focusRing:{value:{_light:`{colors.teal.500}`,_dark:`{colors.teal.500}`}},border:{value:{_light:`{colors.teal.500}`,_dark:`{colors.teal.400}`}}},purple:{contrast:{value:{_light:`white`,_dark:`white`}},fg:{value:{_light:`{colors.purple.700}`,_dark:`{colors.purple.300}`}},subtle:{value:{_light:`{colors.purple.100}`,_dark:`{colors.purple.900}`}},muted:{value:{_light:`{colors.purple.200}`,_dark:`{colors.purple.800}`}},emphasized:{value:{_light:`{colors.purple.300}`,_dark:`{colors.purple.700}`}},solid:{value:{_light:`{colors.purple.600}`,_dark:`{colors.purple.600}`}},focusRing:{value:{_light:`{colors.purple.500}`,_dark:`{colors.purple.500}`}},border:{value:{_light:`{colors.purple.500}`,_dark:`{colors.purple.400}`}}},pink:{contrast:{value:{_light:`white`,_dark:`white`}},fg:{value:{_light:`{colors.pink.700}`,_dark:`{colors.pink.300}`}},subtle:{value:{_light:`{colors.pink.100}`,_dark:`{colors.pink.900}`}},muted:{value:{_light:`{colors.pink.200}`,_dark:`{colors.pink.800}`}},emphasized:{value:{_light:`{colors.pink.300}`,_dark:`{colors.pink.700}`}},solid:{value:{_light:`{colors.pink.600}`,_dark:`{colors.pink.600}`}},focusRing:{value:{_light:`{colors.pink.500}`,_dark:`{colors.pink.500}`}}
12,border:{value:{_light:`{colors.pink.500}`,_dark:`{colors.pink.400}`}}},cyan:{contrast:{value:{_light:`white`,_dark:`white`}},fg:{value:{_light:`{colors.cyan.700}`,_dark:`{colors.cyan.300}`}},subtle:{value:{_light:`{colors.cyan.100}`,_dark:`{colors.cyan.900}`}},muted:{value:{_light:`{colors.cyan.200}`,_dark:`{colors.cyan.800}`}},emphasized:{value:{_light:`{colors.cyan.300}`,_dark:`{colors.cyan.700}`}},solid:{value:{_light:`{colors.cyan.600}`,_dark:`{colors.cyan.600}`}},focusRing:{value:{_light:`{colors.cyan.500}`,_dark:`{colors.cyan.500}`}},border:{value:{_light:`{colors.cyan.500}`,_dark:`{colors.cyan.400}`}}}}),ooe=tm.radii({l1:{value:`{radii.xs}`},l2:{value:`{radii.sm}`},l3:{value:`{radii.md}`}}),soe=tm.shadows({xs:{value:{_light:`0px 1px 2px {colors.gray.900/10}, 0px 0px 1px {colors.gray.900/20}`,_dark:`0px 1px 1px {black/64}, 0px 0px 1px inset {colors.gray.300/20}`}},sm:{value:{_light:`0px 2px 4px {colors.gray.900/10}, 0px 0px 1px {colors.gray.900/30}`,_dark:`0px 2px 4px {black/64}, 0px 0px 1px inset {colors.gray.300/30}`}}
12,md:{value:{_light:`0px 4px 8px {colors.gray.900/10}, 0px 0px 1px {colors.gray.900/30}`,_dark:`0px 4px 8px {black/64}, 0px 0px 1px inset {colors.gray.300/30}`}},lg:{value:{_light:`0px 8px 16px {colors.gray.900/10}, 0px 0px 1px {colors.gray.900/30}`,_dark:`0px 8px 16px {black/64}, 0px 0px 1px inset {colors.gray.300/30}`}},xl:{value:{_light:`0px 16px 24px {colors.gray.900/10}, 0px 0px 1px {colors.gray.900/30}`,_dark:`0px 16px 24px {black/64}, 0px 0px 1px inset {colors.gray.300/30}`}},"2xl":{value:{_light:`0px 24px 40px {colors.gray.900/16}, 0px 0px 1px {colors.gray.900/30}`,_dark:`0px 24px 40px {black/64}, 0px 0px 1px inset {colors.gray.300/30}`}},inner:{value:{_light:`inset 0 2px 4px 0 {black/5}`,_dark:`inset 0 2px 4px 0 black`}},inset:{value:{_light:`inset 0 0 0 1px {black/5}`,_dark:`inset 0 0 0 1px {colors.gray.300/5}`}}}),coe=lu.extendWith(`itemBody`),loe=W(`action-bar`).parts(`positioner`,`content`,`separator`,`selectionTrigger`,`closeTrigger`),uoe=W(`alert`).parts(`title`,`description`,`root`,`indicator`,`content`),doe=W(`breadcrumb`).parts(`link`,`currentLink`,`item`,`list`,`root`,`ellipsis`,`separator`),foe=W(`blockquote`).parts(`root`,`icon`,`content`,`caption`),poe=W(`card`).parts(`root`,`header`,`body`,`footer`,`title`,`description`),moe=W(`checkbox-card`,[`root`,`control`,`label`,`description`,`addon`,`indicator`,`content`]),hoe=W(`data-list`).parts(`root`,`item`,`itemLabel`,`itemValue`),goe=dne.extendWith(`indicatorGroup`),_oe=uf.extendWith(`header`,`body`,`footer`,`backdrop`),voe=uf.extendWith(`header`,`body`,`footer`,`backdrop`),yoe=xne.extendWith(`textarea`),boe=W(`empty-state`,[`root`,`content`,`indicator`,`title`,`description`]),xoe=Sne.extendWith(`requiredIndicator`),Soe=Cne.extendWith(`content`),Coe=wne.extendWith(`itemContent`,`dropzoneContent`,`fileText`),woe=W(`list`).parts(`root`,`item`,`indicator`),Toe=kne.extendWith(`itemCommand`),Eoe=W(`select`).parts(`root`,`field`,`indicator`),Doe=Mne.extendWith(`header`,`body`,`footer`),Ooe=Sf.extendWith(`itemAddon`,`itemIndicator`),koe=Ooe.extendWith(`itemContent`,`itemDescription`),Aoe=Pne.extendWith(`itemIndicator`),joe=Lne.extendWith(`indicatorGroup`),Moe=une.extendWith(`indicatorGroup`,`empty`),Noe=Rne.extendWith(`markerIndicator`,`markerLabel`),Poe=W(`stat`).parts(`root`,`label`,`helpText`,`valueText`,`valueUnit`,`indicator`),Foe=W(`status`).parts(`root`,`indicator`),Ioe=W(`steps`,[`root`,`list`,`item`,`trigger`,`indicator`,`separator`,`content`,`title`,`description`,`nextTrigger`,`prevTrigger`,`progress`]),Loe=Mf.extendWith(`indicator`),Roe=W(`table`).parts(`root`,`header`,`body`,`row`,`columnHeader`,`cell`,`footer`,`caption`),zoe=W(`toast`).parts(`root`,`title`,`description`,`indicator`,`closeTrigger`,`actionTrigger`),Boe=W(`tabs`).parts(`root`,`trigger`,`list`,`content`,`contentGroup`,`indicator`),Voe=W(`tag`).parts(`root`,`label`,`closeTrigger`,`startElement`,`endElement`),Hoe=W(`timeline`).parts(`root`,`item`,`content`,`separator`,`indicator`,`connector`,`title`,`description`),Uoe=lne.extendWith(`channelText`),Woe=W(`code-block`,[`root`,`content`,`title`,`header`,`footer`,`control`,`overlay`,`code`,`codeText`,`copyTrigger`,`copyIndicator`,`collapseTrigger`,`collapseIndicator`,`collapseText`]),Goe=jf.extendWith(`resizeTriggerSeparator`,`resizeTriggerIndicator`);Ju.extendWith(`valueText`);var Koe=Dne,qoe=Xp({className:`chakra-accordion`,slots:coe.keys(),base:{root:{width:`full`,"--accordion-radius":`radii.l2`},item:{overflowAnchor:`none`},itemTrigger:{display:`flex`,alignItems:`center`,textAlign:`start`,width:`full`,outline:`0`,gap:`3`,fontWeight:`medium`,borderRadius:`var(--accordion-radius)`,_focusVisible:{outline:`2px solid`,outlineColor:`colorPalette.focusRing`},_disabled:{layerStyle:`disabled`}},itemBody:{pt:`var(--accordion-padding-y)`,pb:`calc(var(--accordion-padding-y) * 2)`},itemContent:{overflow:`hidden`,borderRadius:`var(--accordion-radius)`,_open:{animationName:`expand-height, fade-in`,animationDuration:`moderate`},_closed:{animationName:`collapse-height, fade-out`,animationDuration:`moderate`}},itemIndicator:{transition:`rotate 0.2s`,transformOrigin:`center`,color:`fg.subtle`,_open:{rotate:`180deg`},_icon:{width:`1.2em`,height:`1.2em`}}},variants:{variant:{outline:{item:{borderBottomWidth:`1px`}},subtle:{itemTrigger:{px:`var(--accordion-padding-x)`},itemContent:{px:`var(--accordion-padding-x)`},item:{borderRadius:`var(--accordion-radius)`,_open:{bg:`colorPalette.subtle`}}},enclosed:{root:{borderWidth:`1px`,borderRadius:`var(--accordion-radius)`,divi
vendor: 14,096 bytes, line 12
12deY:`1px`,overflow:`hidden`},itemTrigger:{px:`var(--accordion-padding-x)`},itemContent:{px:`var(--accordion-padding-x)`},item:{_open:{bg:`bg.subtle`}}},plain:{}},size:{sm:{root:{"--accordion-padding-x":`spacing.3`,"--accordion-padding-y":`spacing.2`},itemTrigger:{textStyle:`sm`,py:`var(--accordion-padding-y)`}},md:{root:{"--accordion-padding-x":`spacing.4`,"--accordion-padding-y":`spacing.2`},itemTrigger:{textStyle:`md`,py:`var(--accordion-padding-y)`}},lg:{root:{"--accordion-padding-x":`spacing.4.5`,"--accordion-padding-y":`spacing.2.5`},itemTrigger:{textStyle:`lg`,py:`var(--accordion-padding-y)`}}}},defaultVariants:{size:`md`,variant:`outline`}}),Joe=Xp({className:`chakra-action-bar`,slots:loe.keys(),base:{positioner:{position:`fixed`,display:`flex`,pointerEvents:`none`,insetInline:`0`,"--action-bar-offset":`spacing.4`},content:{bg:`bg.panel`,shadow:`md`,display:`flex`,alignItems:`center`,gap:`3`,borderRadius:`l3`,py:`2.5`,px:`3`,pointerEvents:`auto`,translate:`calc(-1 * var(--scrollbar-width) / 2) 0px`,_open:{animationName:`slide-from-bottom, fade-in`,animationDuration:`moderate`},_closed:{animationName:`slide-to-bottom, fade-out`,animationDuration:`faster`}},separator:{width:`1px`,height:`5`,bg:`border`},selectionTrigger:{display:`inline-flex`,alignItems:`center`,gap:`2`,alignSelf:`stretch`,textStyle:`sm`,px:`4`,py:`1`,borderRadius:`l2`,borderWidth:`1px`,borderStyle:`dashed`}},variants:{placement:{bottom:{positioner:{bottom:`calc(env(safe-area-inset-bottom) + var(--action-bar-offset))`,justifyContent:`center`}},"bottom-start":{positioner:{bottom:`calc(env(safe-area-inset-bottom) + var(--action-bar-offset))`,justifyContent:`flex-start`,ps:`var(--action-bar-offset)`}},"bottom-end":{positioner:{bottom:`calc(env(safe-area-inset-bottom) + var(--action-bar-offset))`,justifyContent:`flex-end`,pe:`var(--action-bar-offset)`}}}},defaultVariants:{placement:`bottom`}}),Yoe=Xp({slots:uoe.keys(),className:`chakra-alert`,base:{root:{width:`full`,display:`flex`,alignItems:`flex-start`,position:`relative`,borderRadius:`l3`},title:{fontWeight:`medium`},description:{display:`inline`},indicator:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,flexShrink:`0`,width:`1em`,height:`1em`,_icon:{boxSize:`full`}},content:{display:`flex`,flex:`1`,gap:`1`}},variants:{status:{info:{root:{colorPalette:`blue`}},warning:{root:{colorPalette:`orange`}},success:{root:{colorPalette:`green`}},error:{root:{colorPalette:`red`}},neutral:{root:{colorPalette:`gray`}}},inline:{true:{content:{display:`inline-flex`,flexDirection:`row`,alignItems:`center`}},false:{content:{display:`flex`,flexDirection:`column`}}},variant:{subtle:{root:{bg:`colorPalette.subtle`,color:`colorPalette.fg`}},surface:{root:{bg:`colorPalette.subtle`,color:`colorPalette.fg`,shadow:`inset 0 0 0px 1px var(--shadow-color)`,shadowColor:`colorPalette.muted`},indicator:{color:`colorPalette.fg`}},outline:{root:{color:`colorPalette.fg`,shadow:`inset 0 0 0px 1px var(--shadow-color)`,"--outline-shadow-legacy":`colors.colorPalette.muted`,"--outline-shadow":`colors.colorPalette.border`,shadowColor:`var(--outline-shadow, var(--outline-shadow-legacy))`},indicator:{color:`colorPalette.fg`}},solid:{root:{bg:`colorPalette.solid`,color:`colorPalette.contrast`},indicator:{color:`colorPalette.contrast`}}},size:{sm:{root:{gap:`2`,px:`3`,py:`3`,textStyle:`xs`},indicator:{textStyle:`lg`}},md:{root:{gap:`3`,px:`4`,py:`4`,textStyle:`sm`},indicator:{textStyle:`xl`}},lg:{root:{gap:`3`,px:`4`,py:`4`,textStyle:`md`},indicator:{textStyle:`2xl`}}}},defaultVariants:{status:`info`,variant:`subtle`,size:`md`,inline:!1}}),Xoe=Xp({slots:uu.keys(),className:`chakra-avatar`,base:{root:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,fontWeight:`medium`,position:`relative`,verticalAlign:`top`,flexShrink:`0`,userSelect:`none`,width:`var(--avatar-size)`,height:`var(--avatar-size)`,fontSize:`var(--avatar-font-size)`,borderRadius:`var(--avatar-radius)`,"&[data-group-item]":{borderWidth:`2px`,borderColor:`bg`}},image:{width:`100%`,height:`100%`,objectFit:`cover`,borderRadius:`var(--avatar-radius)`},fallback:{lineHeight:`1`,textTransform:`uppercase`,fontWeight:`medium`,fontSize:`var(--avatar-font-size)`,borderRadius:`var(--avatar-radius)`}},variants:{size:{full:{root:{"--avatar-size":`100%`,"--avatar-font-size":`100%`}},"2xs":{root:{"--avatar-font-size":`fontSizes.2xs`,"--avatar-size":`sizes.6`}},xs:{root:{"--avatar-font-size":`fontSizes.xs`,"--avatar-size":`sizes.8`}},sm:{root:{"--avatar-font-size":`fontSizes.sm`,"--avatar-size":`sizes.9`}},md:{root:{"--avatar-font-size":`fontSizes.md`,"--avatar-size":`sizes.10`}},lg:{root:{"--avatar-font-size":`fontSizes.md`,"--avatar-size":`sizes.11`}},xl:{root:{"--avatar-font-size":`fontSizes.lg`,"--avatar-size":`sizes.12`}},"2xl":{root:{"--avatar-font-size":`fontSizes.xl`,"--avatar-size":`sizes.16`}}},variant:{solid:{root:{bg:`colorPalette.solid`,color:`colorPalette.contrast`}},subtle:{root:{bg:`colorPalette.muted`,color:`colorPalette.fg`}},outline:{root:{color:`colorPalette.fg`,borderWidth:`1px`,"--outline-shadow-legacy":`colors.colorPalette.muted`,"--outline-shadow":`colors.colorPalette.border`,borderColor:`var(--outline-shadow, var(--outline-shadow-legacy))`}}},shape:{square:{},rounded:{root:{"--avatar-radius":`radii.l3`}},full:{root:{"--avatar-radius":`radii.full`}}},borderless:{true:{root:{"&[data-group-item]":{borderWidth:`0px`}}}}},defaultVariants:{size:`md`,shape:`full`,variant:`subtle`}}),Zoe=Xp({className:`chakra-blockquote`,slots:foe.keys(),base:{root:{position:`relative`,display:`flex`,flexDirection:`column`,gap:`2`},caption:{textStyle:`sm`,color:`fg.muted`},icon:{boxSize:`5`}},variants:{justify:{start:{root:{alignItems:`flex-start`,textAlign:`start`}},center:{root:{alignItems:`center`,textAlign:`center`}},end:{root:{alignItems:`flex-end`,textAlign:`end`}}},variant:{subtle:{root:{paddingX:`5`,borderStartWidth:`4px`,borderStartColor:`colorPalette.muted`},icon:{color:`colorPalette.fg`}},solid:{root:{paddingX:`5`,borderStartWidth:`4px`,borderStartColor:`colorPalette.solid`},icon:{color:`colorPalette.solid`}},plain:{root:{paddingX:`5`},icon:{color:`colorPalette.solid`}}}},defaultVariants:{variant:`subtle`,justify:`start`}}),Qoe=Xp({className:`chakra-breadcrumb`,slots:doe.keys(),base:{list:{display:`flex`,alignItems:`center`,wordBreak:`break-word`,color:`fg.muted`,listStyle:`none`},link:{outline:`0`,textDecoration:`none`,borderRadius:`l1`,focusRing:`outside`,display:`inline-flex`,alignItems:`center`,gap:`2`},item:{display:`inline-flex`,alignItems:`center`},separator:{color:`fg.muted`,opacity:`0.8`,_icon:{boxSize:`1em`},_rtl:{rotate:`180deg`}},ellipsis:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,_icon:{boxSize:`1em`}}},variants:{variant:{underline:{link:{color:`colorPalette.fg`,textDecoration:`underline`,textUnderlineOffset:`0.2em`,textDecorationColor:`colorPalette.muted`},currentLink:{color:`colorPalette.fg`}},plain:{link:{color:`fg.muted`,_hover:{color:`fg`}},currentLink:{color:`fg`}}},size:{sm:{list:{gap:`1`,textStyle:`xs`}},md:{list:{gap:`1.5`,textStyle:`sm`}},lg:{list:{gap:`2`,textStyle:`md`}}}},defaultVariants:{variant:`plain`,size:`md`}}),$oe=Xp({className:`chakra-card`,slots:poe.keys(),base:{root:{display:`flex`,flexDirection:`column`,position:`relative`,minWidth:`0`,wordWrap:`break-word`,borderRadius:`l3`,color:`fg`,textAlign:`start`},title:{fontWeight:`semibold`},description:{color:`fg.muted`,fontSize:`sm`},header:{paddingInline:`var(--card-padding)`,paddingTop:`var(--card-padding)`,display:`flex`,flexDirection:`column`,gap:`1.5`},body:{padding:`var(--card-padding)`,flex:`1`,display:`flex`,flexDirection:`column`},footer:{display:`flex`,alignItems:`center`,gap:`2`,paddingInline:`var(--card-padding)`,paddingBottom:`var(--card-padding)`}},variants:{size:{sm:{root:{"--card-padding":`spacing.4`},title:{textStyle:`md`}},md:{root:{"--card-padding":`spacing.6`},title:{textStyle:`lg`}},lg:{root:{"--card-padding":`spacing.7`},title:{textStyle:`xl`}}},variant:{elevated:{root:{bg:`bg.panel`,boxShadow:`md`}},outline:{root:{bg:`bg.panel`,borderWidth:`1px`,borderColor:`border`}},subtle:{root:{bg:`bg.muted`}}}},defaultVariants:{variant:`outline`,size:`md`}}),ese=Xp({className:`carousel`,slots:Lee.keys(),base:{root:{position:`relative`,display:`flex`,gap:`2`,_horizontal:{flexDirection:`column`},_vertical:{flexDirection:`row`}},item:{_horizontal:{width:`100%`},_vertical:{height:`100%`}},control:{display:`flex`,alignItems:`center`,_horizontal:{flexDirection:`row`,width:`100%`},_vertical:{flexDirection:`column`,height:`100%`}},indicatorGroup:{display:`flex`,justifyContent:`center`,gap:`3`,_horizontal:{flexDirection:`row`},_vertical:{flexDirection:`column`}},indicator:{width:`2.5`,height:`2.5`,borderRadius:`full`,bg:`colorPalette.subtle`,cursor:`button`,_current:{bg:`colorPalette.solid`}}},defaultVariants:{}}),tse=Xp({slots:Gee.keys(),className:`chakra-checkbox`,base:{root:{display:`inline-flex`,gap:`2`,alignItems:`center`,verticalAlign:`top`,position:`relative`},control:ih.base,label:{fontWeight:`medium`,userSelect:`none`,_disabled:{opacity:`0.5`}}},variants:{size:{xs:{root:{gap:`1.5`},label:{textStyle:`xs`},control:ih.variants?.size?.xs},sm:{root:{gap:`2`},label:{textStyle:`sm`},control:ih.variants?.size?.sm},md:{root:{gap:`2.5`},label:{textStyle:`sm`},control:ih.variants?.size?.md},lg:{root:{gap:`3`},label:{textStyle:`md`},control:ih.variants?.size?.lg}},variant:{outline:{control:ih.variants?.variant?.outline},solid:{control:ih.variants?.variant?.solid},subtle:{control:ih.variants?.variant?.subtle}}},defaultVariants:{variant:`solid`,size:`md`}}),nse=Xp({slots:moe.keys(),className:`chakra-checkbox-card`,base:{root:{display:`flex`,flexDirection:`column`,userSelect:`none`,position:`relative`,borderRadius:`l2`,flex:`1`,focusVisibleRing:`outside`,_disabled:{opacity:`0.8`},_invalid:{outline:`2px solid`,outlineColor:`border.error`}},control:{display:`inline-flex`,flex:`1`,position:`relative`,borderRadius:`inherit`,justifyContent:`var(--checkbox-card-justify)`,alignItems:`var(--checkbox-card-align)`},label:{fontWeight:`medium`,display:`flex`,alignItems:`center`,gap:`2`,flex:`1`,_disabled:{opacity:`0.5`}},description:{opacity:`0.64`,textStyle:`sm`,_disabled:{opacity:`0.5`}},addon:{_disabled:{opacity:`0.5`}},indicator:ih.base,content:{display:`flex`,flexDirection:`column`,flex:`1`,gap:`1`,justifyContent:`var(--checkbox-card-justify)`,alignItems:`var(--checkbox-card-align)`}},variants:{size:{sm:{root:{textStyle:`sm`},control:{padding:`3`,gap:`1.5`},addon:{px:`3`,py:`1.5`,borderTopWidth:`1px`},indicator:ih.variants?.size.sm},md:{root:{textStyle:`sm`},control:{padding:`4`,gap:`2.5`},addon:{px:`4`,py:`2`,borderTopWidth:`1px`},indicator:ih.variants?.size.md},lg:{root:{textStyle:`md`},control:{padding:`4`,gap:`3.5`},addon:{px:`4`,py:`2`,borderTopWidth:`1px`},indicator:ih.variants?.size.lg}},variant:{surface:{root:{borderWidth:`1px`,borderColor:`border`,_checked:{bg:`colorPalette.subtle`,color:`colorPalette.fg`,borderColor:`colorPalette.muted`},_disabled:{bg:`bg.muted`}},indicator:ih.variants?.variant.solid},subtle:{root:{bg:`bg.muted`},control:{_checked:{bg:`colorPalette.muted`,color:`colorPalette.fg`}},indicator:ih.variants?.variant.plain},outline:{root:{borderWidth:`1px`,borderColor:`border`,_checked:{boxShadow:`0 0 0 1px var(--shadow-color)`,boxShadowColor:`colorPalette.solid`,borderColor:`colorPalette.solid`}},indicator:ih.variants?.variant.solid},solid:{root:{borderWidth:`1px`,_checked:{bg:`colorPalette.solid`,color:`colorPalette.contrast`,borderColor:`colorPalette.solid`}},indicator:ih.variants?.variant.inverted}},justify:{start:{root:{"--checkbox-card-justify":`flex-start`}},end:{root:{"--checkbox-card-justify":`flex-end`}},center:{root:{"--checkbox-card-justify":`center`}}},align:{start:{root:{"--checkbox-card-align":`flex-start`},content:{textAlign:`start`}},end:{root:{"--checkbox-card-align":`flex-end`},content:{textAlign:`end`}},center:{root:{"--checkbox-card-align":`center`},content:{textAlign:`center`}}},orientation:{vertical:{control:{flexDirection:`column`}},horizontal:{control:{flexDirection:`row`}}}},defaultVariants:{size:`md`,variant:`outline`,align:`start`,orientation:`horizontal`}}),rse=Xp({slots:Woe.keys(),className:`code-block`,base:{root:{colorPalette:`gray`,rounded:`var(--code-block-radius)`,overflow:`hidden`,bg:`bg`,color:`fg`,borderWidth:`1px`,"--code-block-max-height":`320px`,"--code-block-bg":`colors.bg`,"--code-block-fg":`colors.fg`,"--code-block-obscured-opacity":`0.5`,"--code-block-obscured-blur":`1px`,"--code-block-line-number-width":`sizes.3`,"--code-block-line-number-margin":`spacing.4`,"--code-block-highlight-bg":`{colors.teal.focusRing/20}`,"--code-block-highlight-border":`colors.teal.focusRing`,"--code-block-highlight-added-bg":`{colors.green.focusRing/20}`,"--code-block-highlight-added-border":`colors.green.focusRing`,"--code-block-highlight-removed-bg":`{colors.red.focusRing/20}`,"--code-block-highlight-removed-border":`colors.red.focusRing`},header:{display:`flex`,alignItems:`center`,gap:`2`,position:`relative`,px:`var(--code-block-padding)`,minH:`var(--code-block-header-height)`,mb:`calc(var(--code-block-padding) / 2 * -1)`},title:{display:`inline-flex`,alignItems:`center`,gap:`1.5`,flex:`1`,color:`fg.muted`},control:{gap:`1.5`,display:`inline-flex`,alignItems:`center`},footer:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:`2`,px:`var(--code-block-padding)`,minH:`var(--code-block-header-height)`},content:{position:`relative`,colorScheme:`dark`,borderBottomRadius:`var(--code-block-radius)`,maxHeight:`var(--code-block-max-height)`,"& ::selection":{bg:`blue.500/40`},_expanded:{maxHeight:`unset`}},overlay:{"--bg":`{colors.black/50}`,display:`flex`,alignItems:`flex-end`,justifyContent:`center`,padding:`4`,bgImage:`linear-gradient(0deg,var(--bg) 25%,transparent 100%)`,color:`white`,minH:`5rem`,pos:`absolute`,bottom:`0`,insetInline:`0`,zIndex:`1`,fontWeight:`medium`,_expanded:{display:`none`}},code:{fontFamily:`mono`,lineHeight:`tall`,whiteSpace:`pre`,counterReset:`line 0`,overflowX:`auto`,overflowY:`hidden`}
12,codeText:{px:`var(--code-block-padding)`,py:`var(--code-block-padding)`,position:`relative`,display:`block`,width:`100%`,"&[data-has-focused]":{"& [data-line]:not([data-focused])":{transitionProperty:`opacity, filter`,transitionDuration:`moderate`,transitionTimingFunction:`ease-in-out`,opacity:`var(--code-block-obscured-opacity)`,filter:`blur(var(--code-block-obscured-blur))`},"&:hover":{"--code-block-obscured-opacity":`1`,"--code-block-obscured-blur":`0px`}},"&[data-has-line-numbers][data-plaintext]":{paddingInlineStart:`calc(var(--code-block-line-number-width) + var(--code-block-line-number-margin) + var(--code-block-padding))`},"& [data-line]":{position:`relative`,paddingInlineEnd:`var(--code-block-padding)`,"--highlight-bg":`var(--code-block-highlight-bg)`,"--highlight-border":`var(--code-block-highlight-border)`,"&[data-highlight], &[data-diff]":{display:`inline-block`,width:`full`,"&:after":{content:`''`,display:`block`,position:`absolute`,top:`0`,insetStart:`calc(var(--code-block-padding) * -1)`,insetEnd:`0px`,width:`calc(100% + var(--code-block-padding) * 2)`,height:`100%`,bg:`var(--highlight-bg)`,borderStartWidth:`2px`,borderStartColor:`var(--highlight-border)`}},"&[data-diff='added']":{"--highlight-bg":`var(--code-block-highlight-added-bg)`,"--highlight-border":`var(--code-block-highlight-added-border)`},"&[data-diff='removed']":{"--highlight-bg":`var(--code-block-highlight-removed-bg)`,"--highlight-border":`var(--code-block-highlight-removed-border)`}},"&[data-word-wrap]":{"&[data-plaintext], & [data-line]":{whiteSpace:`pre-wrap`,wordBreak:`break-all`}},"&[data-has-line-numbers]":{"--content":`counter(line)`,"& [data-line]:before":{content:`var(--content)`,counterIncrement:`line`,width:`var(--code-block-line-number-width)`,marginRight:`var(--code-block-line-number-margin)`,display:`inline-block`,textAlign:`end`,userSelect:`none`,whiteSpace:`nowrap`,opacity:.4},"& [data-diff='added']:before":{content:`'+'`},"& [data-diff='removed']:before":{content:`'-'`}}}},variants:{size:{sm:{root:{"--code-block-padding":`spacing.4`,"--code-block-radius":`radii.md`,"--code-block-header-height":`sizes.8`},title:{textStyle:`xs`},code:{fontSize:`xs`}},md:{root:{"--code-block-padding":`spacing.4`,"--code-block-radius":`radii.lg`,"--code-block-header-height":`sizes.10`},title:{textStyle:`xs`},code:{fontSize:`sm`}},lg:{root:{"--code-block-padding":`spacing.5`,"--code-block-radius":`radii.xl`,"--code-block-header-height":`sizes.12`},title:{textStyle:`sm`},code:{fontSize:`sm`}}}},defaultVariants:{size:`md`}}),ise=Xp({slots:Yu.keys(),className:`chakra-collapsible`,base:{content:{overflow:`hidden`,_open:{animationName:`expand-height, fade-in`,animationDuration:`moderate`,"&[data-has-collapsed-size]":{animationName:`expand-height`}},_closed:{animationName:`collapse-height, fade-out`,animationDuration:`moderate`,"&[data-has-collapsed-size]":{animationName:`collapse-height`}}}}}),ase=Xp({className:`colorPicker`,slots:Uoe.keys(),base:{root:{display:`flex`,flexDirection:`column`,gap:`1.5`},label:{color:`fg`,fontWeight:`medium`,textStyle:`sm`,_disabled:{opacity:`0.5`}},valueText:{textAlign:`start`},control:{display:`flex`,alignItems:`center`,flexDirection:`row`,gap:`2`,position:`relative`},swatchTrigger:{display:`flex`,alignItems:`center`,justifyContent:`center`},trigger:{display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`row`,flexShrink:`0`,gap:`2`,textStyle:`sm`,minH:`var(--input-height)`,minW:`var(--input-height)`,px:`1`,rounded:`l2`,_disabled:{opacity:`0.5`},"--focus-color":`colors.colorPalette.focusRing`,"&:focus-visible":{borderColor:`var(--focus-color)`,outline:`1px solid var(--focus-color)`},"&[data-fit-content]":{"--input-height":`unset`,px:`0`,border:`0`}},content:{display:`flex`,flexDirection:`column`,bg:`bg.panel`,borderRadius:`l3`,boxShadow:`lg`,width:`64`,p:`4`,gap:`3`,"--color-picker-z-index":`zIndex.popover`,zIndex:`calc(var(--color-picker-z-index) + var(--layer-index, 0))`,_open:{animationStyle:`slide-fade-in`,animationDuration:`fast`},_closed:{animationStyle:`slide-fade-out`,animationDuration:`faster`}}
vendor: 4,353 bytes, line 12
12,area:{height:`180px`,borderRadius:`l2`,overflow:`hidden`},areaThumb:{borderRadius:`full`,height:`var(--thumb-size)`,width:`var(--thumb-size)`,borderWidth:`2px`,borderColor:`white`,shadow:`sm`,focusVisibleRing:`mixed`,focusRingColor:`white`},areaBackground:{height:`full`},channelSlider:{borderRadius:`l2`,flex:`1`},channelSliderTrack:{height:`var(--slider-height)`,borderRadius:`inherit`,boxShadow:`inset 0 0 0 1px rgba(0,0,0,0.1)`},channelText:{textStyle:`xs`,color:`fg.muted`,fontWeight:`medium`,textTransform:`capitalize`},swatchGroup:{display:`flex`,flexDirection:`row`,flexWrap:`wrap`,gap:`2`},swatch:{...Xae.base,borderRadius:`l1`},swatchIndicator:{color:`white`,rounded:`full`},channelSliderThumb:{borderRadius:`full`,height:`var(--thumb-size)`,width:`var(--thumb-size)`,borderWidth:`2px`,borderColor:`white`,shadow:`sm`,transform:`translate(-50%, -50%)`,focusVisibleRing:`outside`,focusRingOffset:`1px`},channelInput:{...ah.base,"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:`none`,margin:0}},formatSelect:{textStyle:`xs`,textTransform:`uppercase`,borderWidth:`1px`,minH:`6`,focusRing:`inside`,rounded:`l2`},transparencyGrid:{borderRadius:`l2`},view:{display:`flex`,flexDirection:`column`,gap:`2`}},variants:{size:{"2xs":{channelInput:ah.variants?.size?.[`2xs`],swatch:{"--swatch-size":`sizes.4.5`},trigger:{"--input-height":`sizes.7`},area:{"--thumb-size":`sizes.3`},channelSlider:{"--slider-height":`sizes.3`,"--thumb-size":`sizes.3`}},xs:{channelInput:ah.variants?.size?.xs,swatch:{"--swatch-size":`sizes.5`},trigger:{"--input-height":`sizes.8`},area:{"--thumb-size":`sizes.3.5`},channelSlider:{"--slider-height":`sizes.3.5`,"--thumb-size":`sizes.3.5`}},sm:{channelInput:ah.variants?.size?.sm,swatch:{"--swatch-size":`sizes.6`},trigger:{"--input-height":`sizes.9`},area:{"--thumb-size":`sizes.3.5`},channelSlider:{"--slider-height":`sizes.3.5`,"--thumb-size":`sizes.3.5`}},md:{channelInput:ah.variants?.size?.md,swatch:{"--swatch-size":`sizes.7`},trigger:{"--input-height":`sizes.10`},area:{"--thumb-size":`sizes.3.5`},channelSlider:{"--slider-height":`sizes.3.5`,"--thumb-size":`sizes.3.5`}},lg:{channelInput:ah.variants?.size?.lg,swatch:{"--swatch-size":`sizes.7`},trigger:{"--input-height":`sizes.11`},area:{"--thumb-size":`sizes.3.5`},channelSlider:{"--slider-height":`sizes.3.5`,"--thumb-size":`sizes.3.5`}},xl:{channelInput:ah.variants?.size?.xl,swatch:{"--swatch-size":`sizes.8`},trigger:{"--input-height":`sizes.12`},area:{"--thumb-size":`sizes.3.5`},channelSlider:{"--slider-height":`sizes.3.5`,"--thumb-size":`sizes.3.5`}},"2xl":{channelInput:ah.variants?.size?.[`2xl`],swatch:{"--swatch-size":`sizes.10`},trigger:{"--input-height":`sizes.16`},area:{"--thumb-size":`sizes.3.5`},channelSlider:{"--slider-height":`sizes.3.5`,"--thumb-size":`sizes.3.5`}}},variant:{outline:{channelInput:ah.variants?.variant?.outline,trigger:{borderWidth:`1px`}},subtle:{channelInput:ah.variants?.variant?.subtle,trigger:{borderWidth:`1px`,borderColor:`transparent`,bg:`bg.muted`}}}},defaultVariants:{size:`md`,variant:`outline`}}),ose=Xp({className:`chakra-combobox`,slots:Moe.keys(),base:{root:{display:`flex`,flexDirection:`column`,gap:`1.5`,width:`full`},label:{fontWeight:`medium`,userSelect:`none`,textStyle:`sm`,_disabled:{layerStyle:`disabled`}},control:{pos:`relative`,"--padding-factor":`1`,"--combobox-input-padding-end":`var(--combobox-input-padding-x)`,"&:has([data-part=trigger]), &:has([data-part=clear-trigger])":{"--combobox-input-padding-end":`calc(var(--combobox-input-height) * var(--padding-factor))`},"&:has([data-part=trigger]):has([data-part=clear-trigger]:not([hidden]))":{"--padding-factor":`1.5`}},input:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`bg.panel`,width:`full`,minH:`var(--combobox-input-height)`,ps:`var(--combobox-input-padding-x)`,pe:`var(--combobox-input-padding-end)`,"--input-height":`var(--combobox-input-height)`,borderRadius:`l2`,outline:0,userSelect:`none`,textAlign:`start`,_placeholderShown:{color:`fg.muted`},_disabled:{layerStyle:`disabled`},"--focus-color":`colors.colorPalette.focusRing`,"--error-color":`colors.border.error`,_invalid:{focusRingColor:`var(--error-color)`,borderColor:`var(--error-color)`}},trigger:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,"--input-height":`var(--combobox-input-height)`}
12,clearTrigger:{color:`fg.muted`,pointerEvents:`auto`,focusVisibleRing:`inside`,focusRingWidth:`2px`,rounded:`l1`},indicatorGroup:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:`1`,pos:`absolute`,insetEnd:`0`,top:`0`,bottom:`0`,px:`var(--combobox-input-padding-x)`,_icon:{boxSize:`var(--combobox-indicator-size)`},"[data-disabled] &":{opacity:.5}},content:{background:`bg.panel`,display:`flex`,flexDirection:`column`,"--combobox-z-index":`zIndex.popover`,zIndex:`calc(var(--combobox-z-index) + var(--layer-index, 0))`,borderRadius:`l2`,outline:0,maxH:`96`,overflowY:`auto`,boxShadow:`md`,_open:{animationStyle:`slide-fade-in`,animationDuration:`fast`},_closed:{animationStyle:`slide-fade-out`,animationDuration:`0s`},"&[data-empty]:not(:has([data-scope=combobox][data-part=empty]))":{opacity:0}},item:{position:`relative`,userSelect:`none`,display:`flex`,alignItems:`center`,gap:`2`,py:`var(--combobox-item-padding-y)`,px:`var(--combobox-item-padding-x)`,cursor:`option`,justifyContent:`space-between`,flex:`1`,textAlign:`start`,borderRadius:`l1`,_highlighted:{bg:`bg.emphasized/60`},_disabled:{pointerEvents:`none`,opacity:`0.5`},_icon:{boxSize:`var(--combobox-indicator-size)`}},empty:{py:`var(--combobox-item-padding-y)`,px:`var(--combobox-item-padding-x)`},itemText:{flex:`1`},itemGroup:{pb:`var(--combobox-item-padding-y)`,_last:{pb:`0`}},itemGroupLabel:{fontWeight:`medium`,py:`var(--combobox-item-padding-y)`,px:`var(--combobox-item-padding-x)`}},variants:{variant:{outline:{input:{bg:`transparent`,borderWidth:`1px`,borderColor:`border`,focusVisibleRing:`inside`}},subtle:{input:{borderWidth:`1px`,borderColor:`transparent`,bg:`bg.muted`,focusVisibleRing:`inside`}},flushed:{input:{bg:`transparent`,borderBottomWidth:`1px`,borderBottomColor:`border`,borderRadius:`0`,px:`0`,_focusVisible:{borderColor:`var(--focus-color)`,boxShadow:`0px 1px 0px 0px var(--focus-color)`}},indicatorGroup:{px:`0`}}},size:{xs:{root:{"--combobox-input-height":`sizes.8`,"--combobox-input-padding-x":`spacing.2`,"--combobox-indicator-size":`sizes.3.5`},input:{textStyle:`xs`},content:{"--combobox-item-padding-x":`spacing.1.5`,"--combobox-item-padding-y":`spacing.1`,"--combobox-indicator-size":`sizes.3.5`,p:`1`,textStyle:`xs`},trigger:{textStyle:`xs`,gap:`1`}},sm:{root:{"--combobox-input-height":`sizes.9`,"--combobox-input-padding-x":`spacing.2.5`,"--combobox-indicator-size":`sizes.4`},input:{textStyle:`sm`},content:{"--combobox-item-padding-x":`spacing.2`,"--combobox-item-padding-y":`spacing.1.5`,"--combobox-indicator-size":`sizes.4`,p:`1`,textStyle:`sm`},trigger:{textStyle:`sm`,gap:`1`}},md:{root:{"--combobox-input-height":`sizes.10`,"--combobox-input-padding-x":`spacing.3`,"--combobox-indicator-size":`sizes.4`},input:{textStyle:`sm`},content:{"--combobox-item-padding-x":`spacing.2`,"--combobox-item-padding-y":`spacing.1.5`,"--combobox-indicator-size":`sizes.4`,p:`1`,textStyle:`sm`},itemIndicator:{display:`flex`,alignItems:`center`,justifyContent:`center`},trigger:{textStyle:`sm`,gap:`2`}},lg:{root:{"--combobox-input-height":`sizes.12`,"--combobox-input-padding-x":`spacing.4`,"--combobox-indicator-size":`sizes.5`},input:{textStyle:`md`},content:{"--combobox-item-padding-y":`spacing.2`,"--combobox-item-padding-x":`spacing.3`,"--combobox-indicator-size":`sizes.5`,p:`1.5`,textStyle:`md`},trigger:{textStyle:`md`,py:`3`,gap:`2`}}}},defaultVariants:{size:`md`,variant:`outline`}}),sse=Xp({slots:hoe.keys(),className:`chakra-data-list`,base:{itemLabel:{display:`flex`,alignItems:`center`,gap:`1`},itemValue:{display:`flex`,minWidth:`0`,flex:`1`}},variants:{orientation:{horizontal:{root:{display:`flex`,flexDirection:`column`},item:{display:`inline-flex`,alignItems:`center`,gap:`4`},itemLabel:{minWidth:`120px`}},vertical:{root:{display:`flex`,flexDirection:`column`},item:{display:`flex`,flexDirection:`column`,gap:`1`}}},size:{sm:{root:{gap:`3`},item:{textStyle:`xs`}},md:{root:{gap:`4`},item:{textStyle:`sm`}},lg:{root:{gap:`5`},item:{textStyle:`md`}}},variant:{subtle:{itemLabel:{color:`fg.muted`}},bold:{itemLabel:{fontWeight:`medium`},itemValue:{color:`fg.muted`}}}},defaultVariants:{size:`md`,orientation:`vertical`,variant:`subtle`}}),cse=Zp({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,boxSize:`var(--datepicker-nav-trigger-size)`,borderRadius:`l2`,color:`fg`,focusVisibleRing:`inside`,focusRingWidth:`2px`,_hover:{bg:`colorPalette.subtle`},_focusVisible:{boxShadow:`0 0 0 2px var(--colors-color-palette-focus-ring)`},_disabled:{opacity:.5},_icon:{boxSize:`4`}}),lse=Zp({height:`var(--datepicker-select-height)`,ps:`2`,pe:`8`,textStyle:`sm`,borderWidth:`1px`,borderRadius:`l2`,outline:`none`,focusVisibleRing:`inside`,appearance:`none`,fieldSizing:`content`,backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")`,backgroundRepeat:`no-repeat`,backgroundPosition:`right 0.375rem center`,backgroundSize:`1.25em`}),use=Xp({className:`date-picker`,slots:goe.keys(),base:{root:{display:`flex`,flexDirection:`column`,gap:`1.5`,width:`full`,"--datepicker-indicators-offset":`sizes.3`,_disabled:{opacity:.5}},label:{textStyle:`sm`,fontWeight:`medium`},indicatorGroup:{position:`absolute`,insetEnd:`var(--datepicker-indicators-offset)`,top:`50%`,transform:`translateY(-50%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:`1`},control:{display:`flex`,alignItems:`center`,gap:`2`,width:`full`,position:`relative`},input:{flex:`1`,minWidth:`0`,height:`var(--datepicker-input-height)`,"--input-height":`var(--datepicker-input-height)`,px:`var(--datepicker-input-px)`,textStyle:`sm`,bg:`transparent`,borderRadius:`l2`,outline:`0`,appearance:`none`,color:`fg`,"--focus-color":`colors.colorPalette.focusRing`,"--error-color":`colors.border.error`,_placeholder:{color:`fg.muted`},_invalid:{focusRingColor:`var(--error-color)`,borderColor:`var(--error-color)`}},trigger:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,width:`6`,he
vendor: 4,698 bytes, line 12
12ight:`6`,borderRadius:`l1`,color:`fg.muted`,outline:`none`,_hover:{color:`fg`},focusVisibleRing:`inside`,focusRingWidth:`2px`,_icon:{boxSize:`4`}},content:{display:`flex`,flexDirection:`column`,gap:`3`,p:`3`,minW:`18rem`,bg:`bg.panel`,borderRadius:`l2`,boxShadow:`lg`,color:`fg`,"--date-picker-z-index":`zIndex.popover`,zIndex:`calc(var(--date-picker-z-index) + var(--layer-index, 0))`,outline:`none`,_open:{animationStyle:`scale-fade-in`,animationDuration:`fast`},_closed:{animationStyle:`scale-fade-out`,animationDuration:`faster`}},view:{display:`flex`,flexDirection:`column`,gap:`3`},viewControl:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:`2`,height:`var(--datepicker-nav-trigger-size)`},viewTrigger:{display:`inline-flex`,flex:`1`,alignItems:`center`,justifyContent:`center`,gap:`1`,py:`1.5`,px:`2`,textStyle:`sm`,fontWeight:`semibold`,borderRadius:`l2`,focusVisibleRing:`inside`,focusRingWidth:`2px`,_hover:{bg:`colorPalette.subtle`}},prevTrigger:cse,nextTrigger:cse,rangeText:{textStyle:`sm`,fontWeight:`semibold`},table:{borderCollapse:`separate`,borderSpacing:`0`},tableHeader:{width:`var(--table-cell-size)`,py:`2`,textStyle:`xs`,fontWeight:`medium`,color:`fg.muted`,textAlign:`center`,textTransform:`uppercase`,"&[data-type='week-number']":{color:`fg.subtle`}},tableCell:{py:`0.5`,"&[data-type='week-number']":{color:`fg.subtle`}},tableCellTrigger:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,minWidth:`var(--table-cell-size)`,minHeight:`var(--table-cell-size)`,textStyle:`sm`,borderRadius:`l2`,focusVisibleRing:`inside`,focusRingWidth:`2px`,focusRingOffset:`0px`,cursor:`default`,position:`relative`,_hover:{bg:`colorPalette.subtle`},"[data-view=month] &, [data-view=year] &":{width:`calc(var(--table-cell-size) * 1.75)`},_today:{color:`colorPalette.fg`,fontWeight:`semibold`,textDecoration:`underline`,textUnderlineOffset:`3px`,textDecorationThickness:`2px`},"&[data-selected]":{bg:`colorPalette.solid`,color:`colorPalette.contrast`,_hover:{bg:`colorPalette.solid`}},"&[data-in-range]":{bg:`colorPalette.subtle`,color:`colorPalette.fg`,borderRadius:`0`,_hover:{bg:`colorPalette.subtle`}},"&[data-in-range][data-selected]":{bg:`colorPalette.solid`,color:`colorPalette.contrast`,borderRadius:`0`,_hover:{bg:`colorPalette.solid`},"&[data-range-start][data-range-end]":{borderRadius:`l2`},"&[data-range-start]:not([data-range-end])":{borderStartRadius:`l2`,borderEndRadius:`0`},"&[data-range-end]:not([data-range-start])":{borderEndRadius:`l2`,borderStartRadius:`0`}},_disabled:{opacity:.4}},monthSelect:lse,yearSelect:lse,clearTrigger:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,width:`6`,height:`6`,flexShrink:0,textStyle:`xs`,borderRadius:`l2`,color:`fg.muted`,_hover:{color:`fg`},focusVisibleRing:`inside`,_icon:{width:`4`,height:`4`}}},variants:{size:{xs:{root:{"--datepicker-input-height":`sizes.8`,"--datepicker-input-px":`sizes.2`,"--datepicker-indicators-offset":`sizes.2`},view:{"--table-cell-size":`sizes.8`,"--datepicker-nav-trigger-size":`sizes.7`,"--datepicker-select-height":`sizes.8`}},sm:{root:{"--datepicker-input-height":`sizes.9`,"--datepicker-input-px":`sizes.2.5`,"--datepicker-indicators-offset":`sizes.2.5`},view:{"--table-cell-size":`sizes.9`,"--datepicker-nav-trigger-size":`sizes.8`,"--datepicker-select-height":`sizes.9`}},md:{root:{"--datepicker-input-height":`sizes.10`,"--datepicker-input-px":`sizes.3`},view:{"--table-cell-size":`sizes.10`,"--datepicker-nav-trigger-size":`sizes.8`,"--datepicker-select-height":`sizes.10`}},lg:{root:{"--datepicker-input-height":`sizes.11`,"--datepicker-input-px":`sizes.4`},view:{"--table-cell-size":`sizes.10`,"--datepicker-nav-trigger-size":`sizes.9`,"--datepicker-select-height":`sizes.10`}},xl:{root:{"--datepicker-input-height":`sizes.12`,"--datepicker-input-px":`sizes.4.5`},view:{"--table-cell-size":`sizes.10`,"--datepicker-nav-trigger-size":`sizes.9`,"--datepicker-select-height":`sizes.10`}}},hideOutsideDays:{true:{tableCellTrigger:{"&[data-outside-range]":{visibility:`hidden`}}}},variant:{outline:{input:{bg:`transparent`,borderWidth:`1px`,borderColor:`border`,focusVisibleRing:`inside`,focusRingColor:`var(--focus-color)`}},subtle:{input:{borderWidth:`1px`,borderColor:`transparent`,bg:`bg.muted`,focusVisibleRing:`inside`,focusRingColor:`var(--focus-color)`}},flushed:{input:{bg:`transparent`,borderBottomWidth:`1px`,borderBottomColor:`border`,borderRadius:`0`,px:`0`,_focusVisible:{borderColor:`var(--focus-color)`,boxShadow:`0px 1px 0px 0px var(--focus-color)`,_invalid:{borderColor:`var(--error-color)`,boxShadow:`0px 1px 0px 0px var(--error-color)`}}},indicatorGroup:{insetEnd:`0`}}}},defaultVariants:{size:`md`,variant:`outline`}}
12),dse=Xp({slots:_oe.keys(),className:`chakra-dialog`,base:{backdrop:{bg:`blackAlpha.500`,pos:`fixed`,left:0,top:0,w:`100dvw`,h:`100dvh`,"--dialog-z-index":`zIndex.popover`,zIndex:`calc(var(--dialog-z-index) + var(--layer-index, 0) - 1)`,_open:{animationName:`fade-in`,animationDuration:`slow`},_closed:{animationName:`fade-out`,animationDuration:`moderate`}},positioner:{display:`flex`,width:`100dvw`,height:`100dvh`,position:`fixed`,left:0,top:0,"--dialog-z-index":`zIndex.popover`,zIndex:`calc(var(--dialog-z-index) + var(--layer-index, 0))`,justifyContent:`center`,overscrollBehaviorY:`none`},content:{display:`flex`,flexDirection:`column`,position:`relative`,width:`100%`,outline:0,borderRadius:`l3`,textStyle:`sm`,my:`var(--dialog-margin, var(--dialog-base-margin))`,"--dialog-z-index":`zIndex.popover`,zIndex:`calc(var(--dialog-z-index) + var(--layer-index, 0))`,bg:`bg.panel`,boxShadow:`lg`,_open:{animationDuration:`moderate`},_closed:{animationDuration:`faster`}},header:{display:`flex`,gap:`2`,flex:0,px:`6`,pt:`6`,pb:`4`},body:{flex:`1`,px:`6`,pt:`2`,pb:`6`},footer:{display:`flex`,alignItems:`center`,justifyContent:`flex-end`,gap:`3`,px:`6`,pt:`2`,pb:`4`},title:{textStyle:`lg`,fontWeight:`semibold`},description:{color:`fg.muted`},closeTrigger:{pos:`absolute`,top:`2`,insetEnd:`2`}},variants:{placement:{center:{positioner:{alignItems:`center`},content:{"--dialog-base-margin":`auto`,mx:`auto`}},top:{positioner:{alignItems:`flex-start`},content:{"--dialog-base-margin":`spacing.16`,mx:`auto`}},bottom:{positioner:{alignItems:`flex-end`},content:{"--dialog-base-margin":`spacing.16`,mx:`auto`}}},scrollBehavior:{inside:{positioner:{overflow:`hidden`},content:{maxH:`calc(100% - 7.5rem)`},body:{overflow:`auto`}},outside:{positioner:{overflow:`auto`,pointerEvents:`auto`}}},size:{xs:{content:{maxW:`sm`}},sm:{content:{maxW:`md`}},md:{content:{maxW:`lg`}},lg:{content:{maxW:`2xl`}},xl:{content:{maxW:`4xl`}},cover:{positioner:{padding:`10`},content:{width:`100%`,height:`100%`,"--dialog-margin":`0`}},full:{content:{maxW:`100dvw`,minH:`100dvh`,"--dialog-margin":`0`,borderRadius:`0`}}},motionPreset:{scale:{content:{_open:{animationName:`scale-in, fade-in`},_closed:{animationName:`scale-out, fade-out`}}},"slide-in-bottom":{content:{_open:{animationName:`slide-from-bottom, fade-in`},_closed:{animationName:`slide-to-bottom, fade-out`}}},"slide-in-top":{content:{_open:{animationName:`slide-from-top, fade-in`},_closed:{animationName:`slide-to-top, fade-out`}}},"slide-in-left":{content:{_open:{animationName:`slide-from-left, fade-in`},_closed:{animationName:`slide-to-left, fade-out`}}},"slide-in-right":{content:{_open:{animationName:`slide-from-right, fade-in`},_closed:{animationName:`slide-to-right, fade-out`}}},none:{}}},defaultVariants:{size:`md`,scrollBehavior:`outside`,placement:`top`,motionPreset:`scale`}}),fse=Xp({slots:voe.keys(),className:`chakra-drawer`,base:{backdrop:{bg:`blackAlpha.500`,pos:`fixed`,insetInlineStart:0,top:0,w:`100vw`,h:`100dvh`,"--drawer-z-index":`zIndex.popover`,zIndex:`calc(var(--drawer-z-index) + var(--layer-index, 0) - 1)`,_open:{animationName:`fade-in`,animationDuration:`slow`},_closed:{animationName:`fade-out`,animationDuration:`moderate`}},positioner:{display:`flex`,width:`100vw`,height:`100dvh`,position:`fixed`,insetInlineStart:0,top:0,"--drawer-z-index":`zIndex.popover`,zIndex:`calc(var(--drawer-z-index) + var(--layer-index, 0))`,overscrollBehaviorY:`none`},content:{display:`flex`,flexDirection:`column`,position:`relative`,width:`100%`,outline:0,"--drawer-z-index":`zIndex.popover`,zIndex:`calc(var(--drawer-z-index) + var(--layer-index, 0))`,textStyle:`sm`,maxH:`100dvh`,color:`inherit`,bg:`bg.panel`,boxShadow:`lg`,_open:{animationDuration:`slowest`,animationTimingFunction:`ease-in-smooth`},_closed:{animationDuration:`slower`,animationTimingFunction:`ease-in-smooth`}},header:{display:`flex`,alignItems:`center`,gap:`2`,flex:0,px:`6`,pt:`6`,pb:`4`},body:{px:`6`,py:`2`,flex:`1`,overflow:`auto`},footer:{display:`flex`,alignItems:`center`,justifyContent:`flex-end`,gap:`3`,px:`6`,pt:`2`,pb:`4`},title:{flex:`1`,textStyle:`lg`,fontWeight:`semibold`},description:{color:`fg.muted`},closeTrigger:{pos:`absolute`,top:`3`,insetEnd:`2`}},variants:{size:{xs:{content:{maxW:`xs`}},sm:{content:{maxW:`md`}},md:{content:{maxW:`lg`}},lg:{content:{maxW:`2xl`}},xl:{content:{maxW:`4xl`}},full:{content:{maxW:`100vw`,h:`100dvh`}}},placement:{start:{positioner:{justifyContent:`flex-start`,alignItems:`stretch`}
12,content:{_open:{animationName:{base:`slide-from-left-full, fade-in`,_rtl:`slide-from-right-full, fade-in`}},_closed:{animationName:{base:`slide-to-left-full, fade-out`,_rtl:`slide-to-right-full, fade-out`}}}},end:{positioner:{justifyContent:`flex-end`,alignItems:`stretch`},content:{_open:{animationName:{base:`slide-from-right-full, fade-in`,_rtl:`slide-from-left-full, fade-in`}},_closed:{animationName:{base:`slide-to-right-full, fade-out`,_rtl:`slide-to-left-full, fade-out`}}}},top:{positioner:{justifyContent:`stretch`,alignItems:`flex-start`},content:{maxW:`100%`,_open:{animationName:`slide-from-top-full, fade-in`},_closed:{animationName:`slide-to-top-full, fade-out`}}},bottom:{positioner:{justifyContent:`stretch`,alignItems:`flex-end`},content:{maxW:`100%`,_open:{animationName:`slide-from-bottom-full, fade-in`},_closed:{animationName:`slide-to-bottom-full, fade-out`}}}},contained:{true:{positioner:{padding:`4`},content:{borderRadius:`l3`}}}},defaultVariants:{size:`xs`,placement:`end`}}),pse=Zp({fontSize:`inherit`,fontWeight:`inherit`,textAlign:`inherit`,bg:`transparent`,borderRadius:`l2`}),mse=Xp({slots:yoe.keys(),className:`chakra-editable`,base:{root:{display:`inline-flex`,alignItems:`center`,position:`relative`,gap:`1.5`,width:`full`},preview:{...pse,py:`1`,px:`1`,display:`inline-flex`,alignItems:`center`,transitionProperty:`common`,transitionDuration:`moderate`,cursor:`text`,_hover:{bg:`bg.muted`},_disabled:{userSelect:`none`}},input:{...pse,outline:`0`,py:`1`,px:`1`,transitionProperty:`common`,transitionDuration:`normal`,width:`full`,focusVisibleRing:`inside`,focusRingWidth:`2px`,_placeholder:{opacity:.6}},control:{display:`inline-flex`,alignItems:`center`,gap:`1.5`}},variants:{size:{sm:{root:{textStyle:`sm`},preview:{minH:`8`},input:{minH:`8`}},md:{root:{textStyle:`sm`},preview:{minH:`9`},input:{minH:`9`}},lg:{root:{textStyle:`md`},preview:{minH:`10`},input:{minH:`10`}}}},defaultVariants:{size:`md`}}),hse=Xp({slots:boe.keys(),className:`chakra-empty-state`,base:{root:{width:`full`},content:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`},indicator:{display:`flex`,alignItems:`center`,justifyContent:`center`,color:`fg.subtle`,_icon:{boxSize:`1em`}},title:{fontWeight:`semibold`},description:{textStyle:`sm`,color:`fg.muted`}},variants:{size:{sm:{root:{px:`4`,py:`6`},title:{textStyle:`md`},content:{gap:`4`},indicator:{textStyle:`2xl`}},md:{root:{px:`8`,py:`12`},title:{textStyle:`lg`},content:{gap:`6`},indicator:{textStyle:`4xl`}},lg:{root:{px:`12`,py:`16`},title:{textStyle:`xl`},content:{gap:`8`},indicator:{textStyle:`6xl`}}}},defaultVariants:{size:`md`}}),gse=Xp({className:`chakra-field`,slots:xoe.keys(),base:{requiredIndicator:{color:`fg.error`,lineHeight:`1`},root:{display:`flex`,width:`100%`,position:`relative`,gap:`1.5`},label:{display:`flex`,alignItems:`center`,textAlign:`start`,textStyle:`sm`,fontWeight:`medium`,gap:`1`,userSelect:`none`,_disabled:{opacity:`0.5`}},errorText:{display:`inline-flex`,alignItems:`center`,fontWeight:`medium`,gap:`1`,color:`fg.error`,textStyle:`xs`},helperText:{color:`fg.muted`,textStyle:`xs`}},variants:{orientation:{vertical:{root:{flexDirection:`column`,alignItems:`flex-start`}},horizontal:{root:{flexDirection:`row`,alignItems:`center`,justifyContent:`space-between`},label:{flex:`0 0 var(--field-label-width, 80px)`}}}},defaultVariants:{orientation:`vertical`}}),_se=Xp({className:`fieldset`,slots:Soe.keys(),base:{root:{display:`flex`,flexDirection:`column`,width:`full`},content:{display:`flex`,flexDirection:`column`,width:`full`},legend:{color:`fg`,fontWeight:`medium`,_disabled:{opacity:`0.5`}},helperText:{color:`fg.muted`,textStyle:`sm`},errorText:{display:`inline-flex`,alignItems:`center`,color:`fg.error`,gap:`2`,fontWeight:`medium`,textStyle:`sm`}},variants:{size:{sm:{root:{spaceY:`2`},content:{gap:`1.5`},legend:{textStyle:`sm`}},md:{root:{spaceY:`4`},content:{gap:`4`},legend:{textStyle:`sm`}},lg:{root:{spaceY:`6`},content:{gap:`4`},legend:{textStyle:`md`}}}},defaultVariants:{size:`md`}}),vse=Xp({className:`chakra-file-upload`,slots:Coe.keys(),base:{root:{display:`flex`,flexDirection:`column`,gap:`4`,width:`100%`,alignItems:`flex-start`},label:{fontWeight:`medium`,textStyle:`sm`},dropzone:{background:`bg`,borderRadius:`l3`,borderWidth:`2px`,borderStyle:`dashed`,display:`flex`,alignItems:`center`,flexDirection:`column`,gap:`4`,justifyContent:`center`,minHeight:`2xs`,px:`3`,py:`2`,transition:`backgrounds`,focusVisibleRing:`outside`,_hover:{bg:`bg.subtle`},_dragging:{bg:`colorPalette.subtle`,borderStyle:`solid`,borderColor:`colorPalette.solid`}},dropzoneContent:{display:`flex`,flexDirection:`column`,alignItems:`center`,textAlign:`center`,gap:`1`,textStyle:`sm`},item:{pos:`relative`,textStyle:`sm`,animationName:`fade-in`,animationDuration:`moderate`,background:`bg`,borderRadius:`l2`,borderWidth:`1px`,width:`100%`,dis
12play:`flex`,alignItems:`center`,gap:`3`,p:`4`},itemGroup:{width:`100%`,display:`flex`,flexDirection:`column`,gap:`3`,_empty:{display:`none`}},itemName:{color:`fg`,fontWeight:`medium`,lineClamp:`1`},itemContent:{display:`flex`,flexDirection:`column`,gap:`0.5`,flex:`1`},itemSizeText:{color:`fg.muted`,textStyle:`xs`},itemDeleteTrigger:{display:`flex`,alignItems:`center`,justifyContent:`center`,alignSelf:`flex-start`,boxSize:`5`,p:`2px`,color:`fg.muted`,cursor:`button`},itemPreview:{color:`fg.muted`,_icon:{boxSize:`4.5`}}},defaultVariants:{}}),yse=Xp({className:`chakra-hover-card`,slots:Tne.keys(),base:{content:{position:`relative`,display:`flex`,flexDirection:`column`,textStyle:`sm`,"--hovercard-bg":`colors.bg.panel`,bg:`var(--hovercard-bg)`,boxShadow:`lg`,maxWidth:`80`,borderRadius:`l3`,"--hover-card-z-index":`zIndex.popover`,zIndex:`calc(var(--hover-card-z-index) + var(--layer-index, 0))`,transformOrigin:`var(--transform-origin)`,outline:`0`,_open:{animationStyle:`slide-fade-in`,animationDuration:`fast`},_closed:{animationStyle:`slide-fade-out`,animationDuration:`faster`}},arrow:{"--arrow-size":`sizes.3`,"--arrow-background":`var(--hovercard-bg)`},arrowTip:{borderTopWidth:`0.5px`,borderLeftWidth:`0.5px`}},variants:{size:{xs:{content:{padding:`3`}},sm:{content:{padding:`4`}},md:{content:{padding:`5`}},lg:{content:{padding:`6`}}}},defaultVariants:{size:`md`}}),bse=Xp({className:`chakra-list`,slots:woe.keys(),base:{root:{display:`flex`,flexDirection:`column`,gap:`var(--list-gap)`,"& :where(ul, ol)":{marginTop:`var(--list-gap)`}},item:{whiteSpace:`normal`,display:`list-item`},indicator:{marginEnd:`2`,minHeight:`1lh`,flexShrink:0,display:`inline-block`,verticalAlign:`middle`}},variants:{variant:{marker:{root:{listStyle:`revert`},item:{_marker:{color:`fg.subtle`}}},plain:{item:{alignItems:`flex-start`,display:`inline-flex`}}},align:{center:{item:{alignItems:`center`}},start:{item:{alignItems:`flex-start`}},end:{item:{alignItems:`flex-end`}}}},defaultVariants:{variant:`marker`}}),xse=Xp({className:`chakra-listbox`,slots:Koe.keys(),base:{root:{display:`flex`,flexDirection:`column`,gap:`1.5`,width:`full`},content:{display:`flex`,maxH:`96`,p:`1`,gap:`1`,textStyle:`sm`,outline:`none`,scrollPadding:`1`,_horizontal:{flexDirection:`row`,overflowX:`auto`},_vertical:{flexDirection:`column`,overflowY:`auto`},"--listbox-item-padding-x":`spacing.2`,"--listbox-item-padding-y":`spacing.1.5`},item:{position:`relative`,userSelect:`none`,display:`flex`,alignItems:`center`,gap:`2`,cursor:`pointer`,justifyContent:`space-between`,flex:`1`,textAlign:`start`,borderRadius:`l1`,py:`var(--listbox-item-padding-y)`,px:`var(--listbox-item-padding-x)`,_highlighted:{outline:`2px solid`,outlineColor:`border.emphasized`},_disabled:{pointerEvents:`none`,opacity:`0.5`}},empty:{py:`var(--listbox-item-padding-y)`,px:`var(--listbox-item-padding-x)`},itemText:{flex:`1`},itemGroup:{mt:`1.5`,_first:{mt:`0`}},itemGroupLabel:{py:`1.5`,px:`2`,fontWeight:`medium`},label:{fontWeight:`medium`,userSelect:`none`,textStyle:`sm`,_disabled:{layerStyle:`disabled`}},valueText:{lineClamp:`1`,maxW:`80%`},itemIndicator:{display:`flex`,alignItems:`center`,justifyContent:`center`,_icon:{boxSize:`4`}}},variants:{variant:{subtle:{content:{bg:`bg.panel`,borderWidth:`1px`,borderRadius:`l2`},item:{_hover:{bg:`bg.emphasized/60`},_selected:{bg:`bg.muted`}}},solid:{content:{bg:`bg.panel`,borderWidth:`1px`,borderRadius:`l2`},item:{_selected:{bg:`colorPalette.solid`,color:`colorPalette.contrast`}}},plain:{}}},defaultVariants:{variant:`subtle`}}),Sse=Xp({className:`chakra-marquee`,slots:One.keys(),base:{root:{position:`relative`,width:`100%`,"--marquee-edge-color":`colors.bg`,"--marquee-edge-size":`20%`,"&[data-paused]":{animationPlayState:`paused !important`,"& *":{animationPlayState:`paused !important`}}},viewport:{overflow:`hidden`,display:`flex`,width:`100%`,height:`100%`},content:{display:`flex`,minWidth:`max-content`,animationTimingFunction:`linear`,animationFillMode:`forwards`,animationDuration:`var(--marquee-duration)`,animationDelay:`var(--marquee-delay)`,animationIterationCount:`var(--marquee-loop-count)`,_motionReduce:{animation:`none !important`},"&[data-side='start'], &[data-side='end']":{animationName:`marqueeX`},"&[data-side='top'], &[data-side='bottom']":{animationName:`marqueeY`},"&[data-reverse]":{animationDirection:`reverse`},"&[data-orientation='horizontal']":{flexDirection:`row`},"&[data-orientation='vertical']":{flexDirection:`column`}},edge:{position:`absolute`,zIndex:`1`,pointerEvents:`none`,"&[data-side='start']":{width:`var(--marquee-edge-size)`,insetY:`0`,insetInlineStart:`0`,background:`linear-gradient(to right, var(--marquee-edge-color, white), transparent)`,_rtl:{background:`linear-gradient(to left, var(--marquee-edge-color, white), transparent)`}},"&[data-side='end']":{width:`var(--marquee-edge-size)`,insetY:`0`,insetInlineEnd:`0`,background:`linear-gradient(to left, var(--marquee-edge-color, white), transparent)`,_rtl:{background:`linear-gradient(to right, var(--marquee-edge-color, white), transparent)`}},"&[data-side='top']":{height:`var(--marquee-edge-size)`,insetX:`0`,top:`0`,background:`linear-gradient(to bottom, var(--marquee-edge-color, white), transparent)`},"&[data-side='bottom']":{height:`var(--marquee-edge-size)`,insetX:`0`,bottom:`0`,background:`linear-gradient(to top, var(--marquee-edge-color, white), transparent)`}}}}),Cse=Xp({className:`chakra-menu`,slots:Toe.keys(),base:{content:{outline:0,"--menu-bg":`colors.bg.panel`,bg:`var(--menu-bg)`,boxShadow:`lg`,color:`fg`,maxHeight:`var(--available-height)`,"--menu-z-index":`zIndex.popover`,zIndex:`calc(var(--menu-z-index) + var(--layer-index, 0))`,borderRadius:`l2`,overflow:`hidden`,overflowY:`auto`,_open:{animationStyle:`slide-fade-in`,animationDuration:`fast`},_closed:{animationStyle:`slide-fade-out`,animationDuration:`faster`}},item:{textDecoration:`none`,color:`fg`,userSelect:`none`,borderRadius:`l1`,width:`100%`,dis
vendor: 20,612 bytes, line 12
12play:`flex`,cursor:`menuitem`,alignItems:`center`,textAlign:`start`,position:`relative`,flex:`0 0 auto`,outline:0,_disabled:{layerStyle:`disabled`},"&[data-type]":{ps:`8`}},itemText:{flex:`1`},itemIndicator:{position:`absolute`,insetStart:`2`,transform:`translateY(-50%)`,top:`50%`},itemGroupLabel:{px:`2`,py:`1.5`,fontWeight:`semibold`,textStyle:`sm`},indicator:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,flexShrink:`0`},itemCommand:{opacity:`0.6`,textStyle:`xs`,ms:`auto`,ps:`4`,letterSpacing:`widest`,fontFamily:`inherit`},separator:{height:`1px`,bg:`bg.muted`,my:`1`,mx:`-1`},arrow:{"--arrow-size":`sizes.3`,"--arrow-background":`var(--menu-bg)`},arrowTip:{borderTopWidth:`1px`,borderLeftWidth:`1px`}},variants:{variant:{subtle:{item:{_highlighted:{bg:`bg.emphasized/60`}}},solid:{item:{_highlighted:{bg:`colorPalette.solid`,color:`colorPalette.contrast`}}}},size:{sm:{content:{minW:`8rem`,padding:`1`,scrollPadding:`1`},item:{gap:`1`,textStyle:`xs`,py:`1`,px:`1.5`}},md:{content:{minW:`8rem`,padding:`1.5`,scrollPadding:`1.5`},item:{gap:`2`,textStyle:`sm`,py:`1.5`,px:`2`}}}},defaultVariants:{size:`md`,variant:`subtle`}}),sh=Xp({className:`chakra-select`,slots:joe.keys(),base:{root:{display:`flex`,flexDirection:`column`,gap:`1.5`,width:`full`},trigger:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`full`,minH:`var(--select-trigger-height)`,"--input-height":`var(--select-trigger-height)`,px:`var(--select-trigger-padding-x)`,borderRadius:`l2`,userSelect:`none`,textAlign:`start`,focusVisibleRing:`inside`,_placeholderShown:{color:`fg.muted/80`},_disabled:{layerStyle:`disabled`},_invalid:{borderColor:`border.error`}},indicatorGroup:{display:`flex`,alignItems:`center`,gap:`1`,pos:`absolute`,insetEnd:`0`,top:`0`,bottom:`0`,px:`var(--select-trigger-padding-x)`,pointerEvents:`none`},indicator:{display:`flex`,alignItems:`center`,justifyContent:`center`,color:{base:`fg.muted`,_disabled:`fg.subtle`,_invalid:`fg.error`}},content:{background:`bg.panel`,display:`flex`,flexDirection:`column`,"--select-z-index":`zIndex.popover`,zIndex:`calc(var(--select-z-index) + var(--layer-index, 0))`,borderRadius:`l2`,outline:0,maxH:`96`,overflowY:`auto`,boxShadow:`md`,_open:{animationStyle:`slide-fade-in`,animationDuration:`fast`},_closed:{animationStyle:`slide-fade-out`,animationDuration:`fastest`}},item:{position:`relative`,userSelect:`none`,display:`flex`,alignItems:`center`,gap:`2`,cursor:`option`,justifyContent:`space-between`,flex:`1`,textAlign:`start`,borderRadius:`l1`,_highlighted:{bg:`bg.emphasized/60`},_disabled:{pointerEvents:`none`,opacity:`0.5`},_icon:{width:`4`,height:`4`}},control:{pos:`relative`},itemText:{flex:`1`},itemGroup:{_first:{mt:`0`}},itemGroupLabel:{py:`1`,fontWeight:`medium`},label:{fontWeight:`medium`,userSelect:`none`,textStyle:`sm`,_disabled:{layerStyle:`disabled`}},valueText:{lineClamp:`1`,maxW:`80%`},clearTrigger:{color:`fg.muted`,pointerEvents:`auto`,focusVisibleRing:`inside`,focusRingWidth:`2px`,rounded:`l1`}},variants:{variant:{outline:{trigger:{bg:`transparent`,borderWidth:`1px`,borderColor:`border`,_expanded:{borderColor:`border.emphasized`}}},subtle:{trigger:{borderWidth:`1px`,borderColor:`transparent`,bg:`bg.muted`}},ghost:{trigger:{bg:`transparent`,_expanded:{bg:`bg.muted`}}}},size:{xs:{root:{"--select-trigger-height":`sizes.8`,"--select-trigger-padding-x":`spacing.2`},content:{p:`1`,gap:`1`,textStyle:`xs`},trigger:{textStyle:`xs`,gap:`1`},item:{py:`1`,px:`2`},itemGroupLabel:{py:`1`,px:`2`},indicator:{_icon:{width:`3.5`,height:`3.5`}}},sm:{root:{"--select-trigger-height":`sizes.9`,"--select-trigger-padding-x":`spacing.2.5`},content:{p:`1`,textStyle:`sm`},trigger:{textStyle:`sm`,gap:`1`},indicator:{_icon:{width:`4`,height:`4`}},item:{py:`1`,px:`1.5`},itemGroup:{mt:`1`},itemGroupLabel:{py:`1`,px:`1.5`}},md:{root:{"--select-trigger-height":`sizes.10`,"--select-trigger-padding-x":`spacing.3`},content:{p:`1`,textStyle:`sm`},itemGroup:{mt:`1.5`},item:{py:`1.5`,px:`2`},itemIndicator:{display:`flex`,alignItems:`center`,justifyContent:`center`},itemGroupLabel:{py:`1.5`,px:`2`},trigger:{textStyle:`sm`,gap:`2`},indicator:{_icon:{width:`4`,height:`4`}}},lg:{root:{"--select-trigger-height":`sizes.12`,"--select-trigger-padding-x":`spacing.4`},content:{p:`1.5`,textStyle:`md`},itemGroup:{mt:`2`},item:{py:`2`,px:`3`},itemGroupLabel:{py:`2`,px:`3`},trigger:{textStyle:`md`,py:`3`,gap:`2`},indicator:{_icon:{width:`5`,height:`5`}}}}},defaultVariants:{size:`md`,variant:`outline`}}),wse=Xp({className:`chakra-native-select`,slots:Eoe.keys(),base:{root:{height:`fit-content`,display:`flex`,width:`100%`,position:`relative`},field:{width:`100%`,minWidth:`0`,outline:`0`,appearance:`none`,borderRadius:`l2`,"--error-color":`colors.border.error`,"--input-height":`var(--select-field-height)`,height:`var(--select-field-height)`,_disabled:{layerStyle:`disabled`},_invalid:{focusRingColor:`var(--error-color)`,borderColor:`var(--error-color)`},focusVisibleRing:`inside`,lineHeight:`normal`,"& > option, & > optgroup":{bg:`bg`}},indicator:{position:`absolute`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,pointerEvents:`none`,top:`50%`,transform:`translateY(-50%)`,height:`100%`,color:`fg.muted`,_disabled:{opacity:`0.5`},_invalid:{color:`fg.error`},_icon:{width:`1em`,height:`1em`}}},variants:{variant:{outline:{field:sh.variants?.variant.outline.trigger},subtle:{field:sh.variants?.variant.subtle.trigger},plain:{field:{bg:`transparent`,color:`fg`,focusRingWidth:`2px`}},ghost:{field:sh.variants?.variant.ghost.trigger}},size:{xs:{root:{"--select-field-height":`sizes.8`},field:{textStyle:`xs`,ps:`2`,pe:`6`},indicator:{textStyle:`sm`,insetEnd:`1.5`}},sm:{root:{"--select-field-height":`sizes.9`},field:{textStyle:`sm`,ps:`2.5`,pe:`8`},indicator:{textStyle:`md`,insetEnd:`2`}},md:{root:{"--select-field-height":`sizes.10`},field:{textStyle:`sm`,ps:`3`,pe:`8`},indicator:{textStyle:`lg`,insetEnd:`2`}},lg:{root:{"--select-field-height":`sizes.11`},field:{textStyle:`md`,ps:`4`,pe:`8`},indicator:{textStyle:`xl`,insetEnd:`3`}},xl:{root:{"--select-field-height":`sizes.12`},field:{textStyle:`md`,ps:`4.5`,pe:`10`},indicator:{textStyle:`xl`,insetEnd:`3`}}}},defaultVariants:sh.defaultVariants}),Tse=Zp({display:`flex`,justifyContent:`center`,alignItems:`center`,flex:`1`,userSelect:`none`,cursor:`button`,lineHeight:`1`,color:`fg.muted`,"--stepper-base-radius":`radii.l1`,"--stepper-radius":`calc(var(--stepper-base-radius) + 1px)`,_icon:{boxSize:`1em`},_disabled:{opacity:`0.5`},_hover:{bg:`bg.muted`},_active:{bg:`bg.emphasized`}}),Ese=Xp({className:`chakra-number-input`,slots:Ane.keys(),base:{root:{position:`relative`,zIndex:`0`,isolation:`isolate`},input:{...ah.base,verticalAlign:`top`,pe:`calc(var(--stepper-width) + 0.5rem)`},control:{display:`flex`,flexDirection:`column`,position:`absolute`,top:`0`,insetEnd:`0px`,margin:`1px`,width:`var(--stepper-width)`,height:`calc(100% - 2px)`,zIndex:`1`,borderStartWidth:`1px`,divideY:`1px`},incrementTrigger:{...Tse,borderTopEndRadius:`var(--stepper-radius)`},decrementTrigger:{...Tse,borderBottomEndRadius:`var(--stepper-radius)`},valueText:{fontWeight:`medium`,fontFeatureSettings:`pnum`,fontVariantNumeric:`proportional-nums`}},variants:{size:{xs:{input:ah.variants.size.xs,control:{fontSize:`2xs`,"--stepper-width":`sizes.4`}},sm:{input:ah.variants.size.sm,control:{fontSize:`xs`,"--stepper-width":`sizes.5`}},md:{input:ah.variants.size.md,control:{fontSize:`sm`,"--stepper-width":`sizes.6`}},lg:{input:ah.variants.size.lg,control:{fontSize:`sm`,"--stepper-width":`sizes.6`}}},variant:dm(ah.variants.variant,(e,t)=>[e,{input:t}])},defaultVariants:{size:`md`,variant:`outline`}}),{variants:Dse,defaultVariants:Ose}=ah,kse=Xp({className:`chakra-pin-input`,slots:jne.keys(),base:{input:{...ah.base,textAlign:`center`,width:`var(--input-height)`},control:{display:`inline-flex`,gap:`2`,isolation:`isolate`}},variants:{size:dm(Dse.size,(e,t)=>[e,{input:{...t,px:`1`}}]),variant:dm(Dse.variant,(e,t)=>[e,{input:t}]),attached:{true:{control:{gap:`0`,spaceX:`-1px`},input:{_notFirst:{borderStartRadius:`0`},_notLast:{borderEndRadius:`0`},_focusVisible:{zIndex:`1`}}}}},defaultVariants:Ose}),Ase=Xp({className:`chakra-popover`,slots:Doe.keys(),base:{content:{position:`relative`,display:`flex`,flexDirection:`column`,textStyle:`sm`,"--popover-bg":`colors.bg.panel`,bg:`var(--popover-bg)`,boxShadow:`lg`,"--popover-size":`sizes.xs`,"--popover-mobile-size":`calc(100dvw - 1rem)`,width:{base:`min(var(--popover-mobile-size), var(--popover-size))`,sm:`var(--popover-size)`},borderRadius:`l3`,"--popover-z-index":`zIndex.popover`,zIndex:`calc(var(--popover-z-index) + var(--layer-index, 0))`,outline:`0`,transformOrigin:`var(--transform-origin)`,maxHeight:`var(--available-height)`,_open:{animationStyle:`scale-fade-in`,animationDuration:`fast`},_closed:{animationStyle:`scale-fade-out`,animationDuration:`faster`}},header:{paddingInline:`var(--popover-padding)`,paddingTop:`var(--popover-padding)`},body:{padding:`var(--popover-padding)`,flex:`1`},footer:{display:`flex`,alignItems:`center`,paddingInline:`var(--popover-padding)`,paddingBottom:`var(--popover-padding)`},arrow:{"--arrow-size":`sizes.3`,"--arrow-background":`var(--popover-bg)`},arrowTip:{borderTopWidth:`1px`,borderLeftWidth:`1px`}},variants:{size:{xs:{content:{"--popover-padding":`spacing.3`}},sm:{content:{"--popover-padding":`spacing.4`}},md:{content:{"--popover-padding":`spacing.5`}},lg:{content:{"--popover-padding":`spacing.6`}}}},defaultVariants:{size:`md`}}),jse=Xp({slots:xf.keys(),className:`chakra-progress`,base:{root:{textStyle:`sm`,position:`relative`},track:{overflow:`hidden`,position:`relative`},range:{display:`flex`,alignItems:`center`,justifyContent:`center`,transitionProperty:`width, height`,transitionDuration:`slow`,height:`100%`,bgColor:`var(--track-color)`,_indeterminate:{"--animate-from-x":`-40%`,"--animate-to-x":`100%`,position:`absolute`,willChange:`left`,minWidth:`50%`,animation:`position 1s ease infinite normal none running`,backgroundImage:`linear-gradient(to right, transparent 0%, var(--track-color) 50%, transparent 100%)`}},label:{display:`inline-flex`,fontWeight:`medium`,alignItems:`center`,gap:`1`},valueText:{textStyle:`xs`,lineHeight:`1`,fontWeight:`medium`}},variants:{variant:{outline:{track:{shadow:`inset`,bgColor:`bg.muted`},range:{bgColor:`colorPalette.solid`}},subtle:{track:{bgColor:`colorPalette.muted`},range:{bgColor:`colorPalette.solid/72`}}},shape:{square:{},rounded:{track:{borderRadius:`l1`}},full:{track:{borderRadius:`full`}}},striped:{true:{range:{backgroundImage:`linear-gradient(45deg, var(--stripe-color) 25%, transparent 25%, transparent 50%, var(--stripe-color) 50%, var(--stripe-color) 75%, transparent 75%, transparent)`,backgroundSize:`var(--stripe-size) var(--stripe-size)`,"--stripe-size":`1rem`,"--stripe-color":{_light:`rgba(255, 255, 255, 0.3)`,_dark:`rgba(0, 0, 0, 0.3)`}}}},animated:{true:{range:{"--animate-from":`var(--stripe-size)`,animation:`bg-position 1s linear infinite`}}},size:{xs:{track:{h:`1.5`}},sm:{track:{h:`2`}},md:{track:{h:`2.5`}},lg:{track:{h:`3`}},xl:{track:{h:`4`}}}},defaultVariants:{variant:`outline`,size:`md`,shape:`rounded`}}),Mse=Xp({className:`chakra-progress-circle`,slots:xf.keys(),base:{root:{display:`inline-flex`,textStyle:`sm`,position:`relative`},circle:{_indeterminate:{animation:`spin 2s linear infinite`}},circleTrack:{"--track-color":`colors.colorPalette.muted`,stroke:`var(--track-color)`},circleRange:{stroke:`colorPalette.solid`,transitionProperty:`stroke-dashoffset, stroke-dasharray`,transitionDuration:`0.6s`,_indeterminate:{animation:`circular-progress 1.5s linear infinite`}},label:{display:`inline-flex`},valueText:{lineHeight:`1`,fontWeight:`medium`,letterSpacing:`tight`,fontVariantNumeric:`tabular-nums`}},variants:{size:{xs:{circle:{"--size":`24px`,"--thickness":`4px`},valueText:{textStyle:`2xs`}},sm:{circle:{"--size":`32px`,"--thickness":`5px`},valueText:{textStyle:`2xs`}},md:{circle:{"--size":`40px`,"--thickness":`6px`},valueText:{textStyle:`xs`}},lg:{circle:{"--size":`48px`,"--thickness":`7px`},valueText:{textStyle:`sm`}},xl:{circle:{"--size":`64px`,"--thickness":`8px`},valueText:{textStyle:`sm`}}}},defaultVariants:{size:`md`}}),Nse=Xp({slots:Nne.keys(),className:`chakra-qr-code`,base:{root:{position:`relative`,width:`fit-content`,"--qr-code-overlay-size":`calc(var(--qr-code-size) / 3)`},frame:{width:`var(--qr-code-size)`,height:`var(--qr-code-size)`,fill:`currentColor`},overlay:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`var(--qr-code-overlay-size)`,height:`var(--qr-code-overlay-size)`,padding:`1`,bg:`bg`,rounded:`l1`}},variants:{size:{"2xs":{root:{"--qr-code-size":`40px`}},xs:{root:{"--qr-code-size":`64px`}},sm:{root:{"--qr-code-size":`80px`}},md:{root:{"--qr-code-size":`120px`}},lg:{root:{"--qr-code-size":`160px`}},xl:{root:{"--qr-code-size":`200px`}},"2xl":{root:{"--qr-code-size":`240px`}},full:{root:{"--qr-code-size":`100%`}}}},defaultVariants:{size:`md`}}),Pse=Xp({className:`chakra-radio-card`,slots:koe.keys(),base:{root:{display:`flex`,flexDirection:`column`,gap:`1.5`,isolation:`isolate`},item:{flex:`1`,display:`flex`,flexDirection:`column`,userSelect:`none`,position:`relative`,borderRadius:`l2`,_focus:{bg:`colorPalette.muted/20`},_disabled:{opacity:`0.5`},_checked:{zIndex:`1`}},label:{display:`inline-flex`,fontWeight:`medium`,textStyle:`sm`,_disabled:{opacity:`0.5`}},itemText:{fontWeight:`medium`,flex:`1`},itemDescription:{opacity:`0.64`,textStyle:`sm`},itemControl:{display:`inline-flex`,flex:`1`,pos:`relative`,rounded:`inherit`,justifyContent:`var(--radio-card-justify)`,alignItems:`var(--radio-card-align)`,_disabled:{bg:`bg.muted`}},itemIndicator:oh.base,itemAddon:{roundedBottom:`inherit`,_disabled:{color:`fg.muted`}},itemContent:{display:`flex`,flexDirection:`column`,flex:`1`,gap:`1`,justifyContent:`var(--radio-card-justify)`,alignItems:`var(--radio-card-align)`}},variants:{size:{sm:{item:{textStyle:`sm`},itemControl:{padding:`3`,gap:`1.5`},itemAddon:{px:`3`,py:`1.5`,borderTopWidth:`1px`},itemIndicator:oh.variants?.size.sm},md:{item:{textStyle:`sm`},itemControl:{padding:`4`,gap:`2.5`},itemAddon:{px:`4`,py:`2`,borderTopWidth:`1px`},itemIndicator:oh.variants?.size.md},lg:{item:{textStyle:`md`},itemControl:{padding:`4`,gap:`3.5`},itemAddon:{px:`4`,py:`2`,borderTopWidth:`1px`},itemIndicator:oh.variants?.size.lg}},variant:{surface:{item:{borderWidth:`1px`,_checked:{bg:`colorPalette.subtle`,color:`colorPalette.fg`,borderColor:`colorPalette.muted`}},itemIndicator:oh.variants?.variant.solid},subtle:{item:{bg:`bg.muted`},itemControl:{_checked:{bg:`colorPalette.muted`,color:`colorPalette.fg`}},itemIndicator:oh.variants?.variant.outline},outline:{item:{borderWidth:`1px`,_checked:{boxShadow:`0 0 0 1px var(--shadow-color)`,boxShadowColor:`colorPalette.solid`,borderColor:`colorPalette.solid`}},itemIndicator:oh.variants?.variant.solid},solid:{item:{borderWidth:`1px`,_checked:{bg:`colorPalette.solid`,color:`colorPalette.contrast`,borderColor:`colorPalette.solid`}},itemControl:{_disabled:{bg:`unset`}},itemIndicator:oh.variants?.variant.inverted}},justify:{start:{item:{"--radio-card-justify":`flex-start`}},end:{item:{"--radio-card-justify":`flex-end`}},center:{item:{"--radio-card-justify":`center`}}},align:{start:{item:{"--radio-card-align":`flex-start`},itemControl:{textAlign:`start`}},end:{item:{"--radio-card-align":`flex-end`},itemControl:{textAlign:`end`}},center:{item:{"--radio-card-align":`center`},itemControl:{textAlign:`center`}}},orientation:{vertical:{itemControl:{flexDirection:`column`}},horizontal:{itemControl:{flexDirection:`row`}}}},defaultVariants:{size:`md`,variant:`outline`,align:`start`,orientation:`horizontal`}}),Fse=Xp({className:`chakra-radio-group`,slots:Ooe.keys(),base:{item:{display:`inline-flex`,alignItems:`center`,position:`relative`,fontWeight:`medium`,_disabled:{cursor:`disabled`}},itemControl:oh.base,label:{userSelect:`none`,textStyle:`sm`,_disabled:{opacity:`0.5`}}},variants:{variant:{outline:{itemControl:oh.variants?.variant?.outline},subtle:{itemControl:oh.variants?.variant?.subtle},solid:{itemControl:oh.variants?.variant?.solid}},size:{xs:{item:{textStyle:`xs`,gap:`1.5`},itemControl:oh.variants?.size?.xs},sm:{item:{textStyle:`sm`,gap:`2`},itemControl:oh.variants?.size?.sm},md:{item:{textStyle:`sm`,gap:`2.5`},itemControl:oh.variants?.size?.md},lg:{item:{textStyle:`md`,gap:`3`},itemControl:oh.variants?.size?.lg}}},defaultVariants:{size:`md`,variant:`solid`}}),Ise=Xp({className:`chakra-rating-group`,slots:Aoe.keys(),base:{root:{display:`inline-flex`},control:{display:`inline-flex`,alignItems:`center`},item:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,userSelect:`none`},itemIndicator:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,width:`1em`,height:`1em`,position:`relative`,"--clip-path":{base:`inset(0 50% 0 0)`,_rtl:`inset(0 0 0 50%)`},_icon:{stroke:`currentColor`,width:`100%`,height:`100%`,display:`inline-block`,flexShrink:0,position:`absolute`,left:0,top:0},"& [data-bg]":{color:`bg.emphasized`},"& [data-fg]":{color:`transparent`},"&[data-highlighted]:not([data-half])":{"& [data-fg]":{color:`colorPalette.solid`}},"&[data-half]":{"& [data-fg]":{color:`colorPalette.solid`,clipPath:`var(--clip-path)`}}}},variants:{size:{xs:{item:{textStyle:`sm`}},sm:{item:{textStyle:`md`}},md:{item:{textStyle:`xl`}},lg:{item:{textStyle:`2xl`}}}},defaultVariants:{size:`md`}}),Lse=Xp({className:`chakra-scroll-area`,slots:Fne.keys(),base:{root:{display:`flex`,flexDirection:`column`,width:`100%`,height:`100%`,position:`relative`,overflow:`hidden`,"--scrollbar-margin":`2px`,"--scrollbar-click-area":`calc(var(--scrollbar-size) + calc(var(--scrollbar-margin) * 2))`},viewport:{display:`flex`,flexDirection:`column`,height:`100%`,width:`100%`,borderRadius:`inherit`,WebkitOverflowScrolling:`touch`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}},content:{minWidth:`100%`},scrollbar:{display:`flex`,userSelect:`none`,touchAction:`none`,borderRadius:`full`,colorPalette:`gray`,transition:`opacity 150ms 300ms`,position:`relative`,margin:`var(--scrollbar-margin)`,"&:not([data-overflow-x], [data-overflow-y])":{display:`none`},bg:`{colors.colorPalette.solid/10}`,"--thumb-bg":`{colors.colorPalette.solid/25}`,"&:is(:hover, :active)":{"--thumb-bg":`{colors.colorPalette.solid/50}`},_before:{content:`""`,position:`absolute`},_vertical:{width:`var(--scrollbar-size)`,flexDirection:`column`,"&::before":{width:`var(--scrollbar-click-area)`,height:`100%`,insetInlineStart:`calc(var(--scrollbar-margin) * -1)`}},_horizontal:{height:`var(--scrollbar-size)`,flexDirection:`row`,"&::before":{height:`var(--scrollbar-click-area)`,width:`100%`,top:`calc(var(--scrollbar-margin) * -1)`}}},thumb:{borderRadius:`inherit`,bg:`var(--thumb-bg)`,transition:`backgrounds`,_vertical:{width:`full`},_horizontal:{height:`full`}},corner:{bg:`bg.muted`,margin:`var(--scrollbar-margin)`,opacity:0,transition:`opacity 150ms 300ms`,"&[data-hover]":{transitionDelay:`0ms`,opacity:1}}},variants:{variant:{hover:{scrollbar:{opacity:`0`,"&[data-hover], &[data-scrolling]":{opacity:`1`,transitionDuration:`faster`,transitionDelay:`0ms`}}},always:{scrollbar:{opacity:`1`}}},size:{xs:{root:{"--scrollbar-size":`sizes.1`}},sm:{root:{"--scrollbar-size":`sizes.1.5`}},md:{root:{"--scrollbar-size":`sizes.2`}},lg:{root:{"--scrollbar-size":`sizes.3`}}}},defaultVariants:{size:`md`,variant:`hover`}}),Rse=Xp({className:`chakra-segment-group`,slots:Ine.keys(),base:{root:{"--segment-radius":`radii.l2`,"--segment-indicator-bg":{_light:`colors.bg`,_dark:`colors.bg.emphasized`},"--segment-indicator-shadow":`shadows.sm`,borderRadius:`var(--segment-radius)`,display:`inline-flex`,boxShadow:`inset`,minW:`max-content`,textAlign:`center`,position:`relative`,isolation:`isolate`,bg:`bg.muted`,_vertical:{flexDirection:`column`}},item:{display:`flex`,alignItems:`center`,justifyContent:`center`,userSelect:`none`,fontSize:`sm`,position:`relative`,color:`fg`,borderRadius:`var(--segment-radius)`,_disabled:{opacity:`0.5`},"&:has(input:focus-visible)":{focusRing:`outside`},_before:{content:`""`,position:`absolute`,bg:`border`,transition:`opacity 0.2s`},_horizontal:{_before:{insetInlineStart:0,insetBlock:`1.5`,width:`1px`}},_vertical:{_before:{insetBlockStart:0,insetInline:`1.5`,height:`1px`}},"& + &[data-state=checked], &[data-state=checked] + &, &:first-of-type":{_before:{opacity:`0`}},"&[data-state=checked][data-ssr]":{shadow:`sm`,bg:`bg`,borderRadius:`var(--segment-radius)`}},indicator:{shadow:`var(--segment-indicator-shadow)`,pos:`absolute`,bg:`var(--segment-indicator-bg)`,width:`var(--width)`,he
12ight:`var(--height)`,top:`var(--top)`,left:`var(--left)`,zIndex:-1,borderRadius:`var(--segment-radius)`}},variants:{size:{xs:{item:{textStyle:`xs`,px:`3`,gap:`1`,height:`6`}},sm:{item:{textStyle:`sm`,px:`4`,gap:`2`,height:`8`}},md:{item:{textStyle:`sm`,px:`4`,gap:`2`,height:`10`}},lg:{item:{textStyle:`md`,px:`4.5`,gap:`3`,height:`11`}}}},defaultVariants:{size:`md`}}),zse=Xp({className:`chakra-slider`,slots:Noe.keys(),base:{root:{display:`flex`,flexDirection:`column`,gap:`1`,textStyle:`sm`,position:`relative`,isolation:`isolate`,touchAction:`none`},label:{fontWeight:`medium`,textStyle:`sm`},control:{display:`inline-flex`,alignItems:`center`,position:`relative`},track:{overflow:`hidden`,borderRadius:`full`,flex:`1`},range:{width:`inherit`,height:`inherit`,_disabled:{bg:`border.emphasized!`}},markerGroup:{position:`absolute!`,zIndex:`1`},marker:{"--marker-bg":{base:`white`,_underValue:`colors.bg`},display:`flex`,alignItems:`center`,gap:`calc(var(--slider-thumb-size) / 2)`,color:`fg.muted`,textStyle:`xs`},markerIndicator:{width:`var(--slider-marker-size)`,height:`var(--slider-marker-size)`,borderRadius:`full`,bg:`var(--marker-bg)`},thumb:{width:`var(--slider-thumb-size)`,height:`var(--slider-thumb-size)`,display:`flex`,alignItems:`center`,justifyContent:`center`,outline:0,zIndex:`2`,borderRadius:`full`,transition:`shadow`,_focusVisible:{ring:`3px`,ringColor:`colorPalette.focusRing/50`}}},variants:{size:{sm:{root:{"--slider-thumb-size":`sizes.4`,"--slider-track-size":`sizes.1.5`,"--slider-marker-center":`6px`,"--slider-marker-size":`sizes.1`,"--slider-marker-inset":`3px`}},md:{root:{"--slider-thumb-size":`sizes.5`,"--slider-track-size":`sizes.2`,"--slider-marker-center":`8px`,"--slider-marker-size":`sizes.1`,"--slider-marker-inset":`4px`}},lg:{root:{"--slider-thumb-size":`sizes.6`,"--slider-track-size":`sizes.2.5`,"--slider-marker-center":`9px`,"--slider-marker-size":`sizes.1.5`,"--slider-marker-inset":`5px`}}},variant:{outline:{track:{shadow:`inset`,bg:`bg.emphasized/72`},range:{bg:`colorPalette.solid`},thumb:{borderWidth:`2px`,borderColor:`colorPalette.solid`,bg:`bg`,_disabled:{bg:`border.emphasized`,borderColor:`border.emphasized`}}},solid:{track:{bg:`colorPalette.subtle`,_disabled:{bg:`bg.muted`}},range:{bg:`colorPalette.solid`},thumb:{bg:`colorPalette.solid`,_disabled:{bg:`border.emphasized`}}}},orientation:{vertical:{root:{display:`inline-flex`},control:{flexDirection:`column`,height:`100%`,minWidth:`var(--slider-thumb-size)`,"&:has(.chakra-slider__markerLabel)":{marginEnd:`4`}},track:{width:`var(--slider-track-size)`},thumb:{left:`50%`,translate:`-50% 0`},markerGroup:{insetStart:`var(--slider-marker-center)`,insetBlock:`var(--slider-marker-inset)`},marker:{flexDirection:`row`}},horizontal:{control:{flexDirection:`row`,width:`100%`,minHeight:`var(--slider-thumb-size)`,"&:has(.chakra-slider__markerLabel)":{marginBottom:`4`}},track:{height:`var(--slider-track-size)`},thumb:{top:`50%`,translate:`0 -50%`},markerGroup:{top:`var(--slider-marker-center)`,insetInline:`var(--slider-marker-inset)`},marker:{flexDirection:`column`}}}},defaultVariants:{size:`md`,variant:`outline`,orientation:`horizontal`}}),Bse=Xp({slots:Goe.keys(),className:`splitter`,base:{resizeTrigger:{"--splitter-border-color":`colors.border`,"--splitter-thumb-color":`colors.bg`,"--splitter-thumb-size":`sizes.2`,"--splitter-thumb-inset":`calc(var(--splitter-thumb-size) * -0.5)`,"--splitter-border-size":`1px`,"--splitter-handle-size":`sizes.6`,outline:`0`,display:`grid`,placeItems:`center`,position:`relative`,_focus:{"--splitter-border-color":`colors.border.emphasized`,"--splitter-thumb-color":`colors.colorPalette.subtle`},_dragging:{"--splitter-thumb-color":`colors.colorPalette.focusRing`},_horizontal:{minWidth:`var(--splitter-thumb-size)`,marginInline:`var(--splitter-thumb-inset)`},_vertical:{minHeight:`var(--splitter-thumb-size)`,marginBlock:`var(--splitter-thumb-inset)`}},resizeTriggerSeparator:{position:`absolute`,bg:`var(--splitter-border-color)`,"[data-part='resize-trigger'][data-orientation=horizontal] &":{insetInlineEnd:`calc(var(--splitter-thumb-size) * 0.5)`,insetBlock:`0`,insetInlineStart:`auto`,w:`var(--splitter-border-size)`}
12,"[data-part='resize-trigger'][data-orientation=vertical] &":{insetBlockEnd:`calc(var(--splitter-thumb-size) * 0.5)`,insetInline:`0`,insetBlockStart:`auto`,h:`var(--splitter-border-size)`}},resizeTriggerIndicator:{position:`relative`,rounded:`full`,bg:`var(--splitter-thumb-color)`,shadow:`xs`,borderWidth:`1px`,zIndex:`1`,"[data-part='resize-trigger'][data-orientation=horizontal] &":{w:`full`,h:`var(--splitter-handle-size)`},"[data-part='resize-trigger'][data-orientation=vertical] &":{w:`var(--splitter-handle-size)`,h:`full`},"[data-part='resize-trigger'][data-focus]:focus-visible &":{outlineWidth:`2px`,outlineColor:`colorPalette.focusRing`,outlineStyle:`solid`},"[data-part='resize-trigger'][data-disabled] &":{visibility:`hidden`}}}}),Vse=Xp({className:`chakra-stat`,slots:Poe.keys(),base:{root:{display:`flex`,flexDirection:`column`,gap:`1`,position:`relative`,flex:`1`},label:{display:`inline-flex`,gap:`1.5`,alignItems:`center`,color:`fg.muted`,textStyle:`sm`},helpText:{color:`fg.muted`,textStyle:`xs`},valueUnit:{color:`fg.muted`,textStyle:`xs`,fontWeight:`initial`,letterSpacing:`initial`},valueText:{verticalAlign:`baseline`,fontWeight:`semibold`,letterSpacing:`tight`,fontFeatureSettings:`pnum`,fontVariantNumeric:`proportional-nums`,display:`inline-flex`,gap:`1`},indicator:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,marginEnd:1,"& :where(svg)":{w:`1em`,h:`1em`},"&[data-type=up]":{color:`fg.success`},"&[data-type=down]":{color:`fg.error`}}},variants:{size:{sm:{valueText:{textStyle:`xl`}},md:{valueText:{textStyle:`2xl`}},lg:{valueText:{textStyle:`3xl`}}}},defaultVariants:{size:`md`}}),Hse=Xp({className:`chakra-status`,slots:Foe.keys(),base:{root:{display:`inline-flex`,alignItems:`center`,gap:`2`},indicator:{width:`0.64em`,height:`0.64em`,flexShrink:0,borderRadius:`full`,forcedColorAdjust:`none`,bg:`colorPalette.solid`}},variants:{size:{sm:{root:{textStyle:`xs`}},md:{root:{textStyle:`sm`}},lg:{root:{textStyle:`md`}}}},defaultVariants:{size:`md`}}),Use=Xp({className:`chakra-steps`,slots:Ioe.keys(),base:{root:{display:`flex`,width:`full`},list:{display:`flex`,justifyContent:`space-between`,"--steps-gutter":`spacing.3`,"--steps-thickness":`2px`},title:{fontWeight:`medium`,color:`fg`},description:{color:`fg.muted`},separator:{bg:`border`,flex:`1`},indicator:{display:`flex`,justifyContent:`center`,alignItems:`center`,flexShrink:`0`,borderRadius:`full`,fontWeight:`medium`,width:`var(--steps-size)`,height:`var(--steps-size)`,_icon:{flexShrink:`0`,width:`var(--steps-icon-size)`,height:`var(--steps-icon-size)`}},item:{position:`relative`,display:`flex`,gap:`3`,flex:`1 0 0`,"&:last-of-type":{flex:`initial`,"& [data-part=separator]":{display:`none`}}},trigger:{display:`flex`,alignItems:`center`,gap:`3`,textAlign:`start`,focusVisibleRing:`outside`,borderRadius:`l2`},content:{focusVisibleRing:`outside`}},variants:{orientation:{vertical:{root:{flexDirection:`row`,height:`100%`},list:{flexDirection:`column`,alignItems:`flex-start`},separator:{position:`absolute`,width:`var(--steps-thickness)`,height:`100%`,maxHeight:`calc(100% - var(--steps-size) - var(--steps-gutter) * 2)`,top:`calc(var(--steps-size) + var(--steps-gutter))`,insetStart:`calc(var(--steps-size) / 2 - 1px)`},item:{alignItems:`flex-start`}},horizontal:{root:{flexDirection:`column`,width:`100%`},list:{flexDirection:`row`,alignItems:`center`},separator:{width:`100%`,height:`var(--steps-thickness)`,marginX:`var(--steps-gutter)`},item:{alignItems:`center`}}},variant:{solid:{indicator:{_incomplete:{borderWidth:`var(--steps-thickness)`},_current:{bg:`colorPalette.muted`,borderWidth:`var(--steps-thickness)`,borderColor:`colorPalette.solid`,color:`colorPalette.fg`},_complete:{bg:`colorPalette.solid`,borderColor:`colorPalette.solid`,color:`colorPalette.contrast`}},separator:{_complete:{bg:`colorPalette.solid`}}},subtle:{indicator:{_incomplete:{bg:`bg.muted`},_current:{bg:`colorPalette.muted`,color:`colorPalette.fg`},_complete:{bg:`colorPalette.emphasized`,color:`colorPalette.fg`}},separator:{_complete:{bg:`colorPalette.emphasized`}}}},size:{xs:{root:{gap:`2.5`},list:{"--steps-size":`sizes.6`,"--steps-icon-size":`sizes.3.5`,textStyle:`xs`},title:{textStyle:`sm`}},sm:{root:{gap:`3`},list:{"--steps-size":`sizes.8`,"--steps-icon-size":`sizes.4`,textStyle:`xs`},title:{textStyle:`sm`}},md:{root:{gap:`4`},list:{"--steps-size":`sizes.10`,"--steps-icon-size":`sizes.4`,textStyle:`sm`},title:{textStyle:`sm`}},lg:{root:{gap:`6`},list:{"--steps-size":`sizes.11`,"--steps-icon-size":`sizes.5`,textStyle:`md`},title:{textStyle:`md`}}}},defaultVariants:{size:`md`,variant:`solid`,orientation:`horizontal`}}),Wse=Xp({slots:Loe.keys(),className:`chakra-switch`,base:{root:{display:`inline-flex`,ga
vendor: 9,822 bytes, line 12
12p:`2.5`,alignItems:`center`,position:`relative`,verticalAlign:`middle`,"--switch-diff":`calc(var(--switch-width) - var(--switch-height))`,"--switch-x":{base:`var(--switch-diff)`,_rtl:`calc(var(--switch-diff) * -1)`}},label:{lineHeight:`1`,userSelect:`none`,fontSize:`sm`,fontWeight:`medium`,_disabled:{opacity:`0.5`}},indicator:{position:`absolute`,height:`var(--switch-height)`,width:`var(--switch-height)`,fontSize:`var(--switch-indicator-font-size)`,fontWeight:`medium`,flexShrink:0,userSelect:`none`,display:`grid`,placeContent:`center`,transition:`inset-inline-start 0.12s ease`,insetInlineStart:`calc(var(--switch-x) - 2px)`,_checked:{insetInlineStart:`2px`}},control:{display:`inline-flex`,gap:`0.5rem`,flexShrink:0,justifyContent:`flex-start`,cursor:`switch`,borderRadius:`full`,position:`relative`,width:`var(--switch-width)`,height:`var(--switch-height)`,transition:`backgrounds`,_disabled:{opacity:`0.5`,cursor:`not-allowed`},_invalid:{outline:`2px solid`,outlineColor:`border.error`,outlineOffset:`2px`}},thumb:{display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,transitionProperty:`translate`,transitionDuration:`fast`,borderRadius:`inherit`,_checked:{translate:`var(--switch-x) 0`}}},variants:{variant:{solid:{control:{borderRadius:`full`,bg:`bg.emphasized`,focusVisibleRing:`outside`,_checked:{bg:`colorPalette.solid`}},thumb:{bg:`white`,width:`var(--switch-height)`,height:`var(--switch-height)`,scale:`0.8`,boxShadow:`sm`,_checked:{bg:`colorPalette.contrast`}}},raised:{control:{borderRadius:`full`,height:`calc(var(--switch-height) / 2)`,bg:`bg.muted`,boxShadow:`inset`,_checked:{bg:`colorPalette.solid/60`}},thumb:{width:`var(--switch-height)`,height:`var(--switch-height)`,position:`relative`,top:`calc(var(--switch-height) * -0.25)`,bg:`white`,boxShadow:`xs`,focusVisibleRing:`outside`,_checked:{bg:`colorPalette.solid`}}}},size:{xs:{root:{"--switch-width":`sizes.6`,"--switch-height":`sizes.3`,"--switch-indicator-font-size":`fontSizes.xs`}},sm:{root:{"--switch-width":`sizes.8`,"--switch-height":`sizes.4`,"--switch-indicator-font-size":`fontSizes.xs`}},md:{root:{"--switch-width":`sizes.10`,"--switch-height":`sizes.5`,"--switch-indicator-font-size":`fontSizes.sm`}},lg:{root:{"--switch-width":`sizes.12`,"--switch-height":`sizes.6`,"--switch-indicator-font-size":`fontSizes.md`}}}},defaultVariants:{variant:`solid`,size:`md`}}),Gse=Xp({className:`chakra-table`,slots:Roe.keys(),base:{root:{fontVariantNumeric:`lining-nums tabular-nums`,borderCollapse:`collapse`,width:`full`,textAlign:`start`,verticalAlign:`top`},row:{_selected:{bg:`colorPalette.subtle`}},cell:{textAlign:`start`,alignItems:`center`},columnHeader:{fontWeight:`medium`,textAlign:`start`,color:`fg`},caption:{fontWeight:`medium`,textStyle:`xs`},footer:{fontWeight:`medium`}},variants:{interactive:{true:{body:{"& tr":{_hover:{bg:`colorPalette.subtle`}}}}},stickyHeader:{true:{header:{"& :where(tr)":{top:`var(--table-sticky-offset, 0)`,position:`sticky`,zIndex:1}}}},striped:{true:{row:{"&:nth-of-type(odd) td":{bg:`bg.muted`}}}},showColumnBorder:{true:{columnHeader:{"&:not(:last-of-type)":{borderInlineEndWidth:`1px`}},cell:{"&:not(:last-of-type)":{borderInlineEndWidth:`1px`}}}},variant:{line:{columnHeader:{borderBottomWidth:`1px`},cell:{borderBottomWidth:`1px`},row:{bg:`bg`}},outline:{root:{boxShadow:`0 0 0 1px {colors.border}`},columnHeader:{borderBottomWidth:`1px`},header:{bg:`bg.muted`},row:{"&:not(:last-of-type)":{borderBottomWidth:`1px`}},footer:{borderTopWidth:`1px`}}},size:{sm:{root:{textStyle:`sm`},columnHeader:{px:`2`,py:`2`},cell:{px:`2`,py:`2`}},md:{root:{textStyle:`sm`},columnHeader:{px:`3`,py:`3`},cell:{px:`3`,py:`3`}},lg:{root:{textStyle:`md`},columnHeader:{px:`4`,py:`3`},cell:{px:`4`,py:`3`}}}},defaultVariants:{variant:`line`,size:`md`}}),Kse=Xp({slots:Boe.keys(),className:`chakra-tabs`,base:{root:{"--tabs-trigger-radius":`radii.l2`,"--tabs-indicator-shadow":`shadows.xs`,"--tabs-indicator-bg":`colors.bg`,position:`relative`,_horizontal:{display:`block`},_vertical:{display:`flex`}},list:{display:`inline-flex`,position:`relative`,isolation:`isolate`,minH:`var(--tabs-height)`,_horizontal:{flexDirection:`row`},_vertical:{flexDirection:`column`}},trigger:{outline:`0`,minW:`var(--tabs-height)`,height:`var(--tabs-height)`,display:`flex`,alignItems:`center`,fontWeight:`medium`,position:`relative`,cursor:`button`,gap:`2`,_focusVisible:{zIndex:1,outline:`2px solid`,outlineColor:`colorPalette.focusRing`},_disabled:{cursor:`not-allowed`,opacity:.5}},content:{focusVisibleRing:`inside`,_horizontal:{width:`100%`,pt:`var(--tabs-content-padding)`},_vertical:{height:`100%`,ps:`var(--tabs-content-padding)`}},indicator:{width:`var(--width)`,height:`var(--height)`,borderRadius:`var(--tabs-trigger-radius)`,bg:`var(--tabs-indicator-bg)`,shadow:`var(--tabs-indicator-shadow)`,zIndex:-1}},variants:{fitted:{true:{list:{display:`flex`},trigger:{flex:1,textAlign:`center`,justifyContent:`center`}}},justify:{start:{list:{justifyContent:`flex-start`}},center:{list:{justifyContent:`center`}},end:{list:{justifyContent:`flex-end`}}},size:{sm:{root:{"--tabs-height":`sizes.9`,"--tabs-content-padding":`spacing.3`},trigger:{py:`1`,px:`3`,textStyle:`sm`}},md:{root:{"--tabs-height":`sizes.10`,"--tabs-content-padding":`spacing.4`},trigger:{py:`2`,px:`4`,textStyle:`sm`}},lg:{root:{"--tabs-height":`sizes.11`,"--tabs-content-padding":`spacing.4.5`},trigger:{py:`2`,px:`4.5`,textStyle:`md`}}},variant:{line:{list:{display:`flex`,borderColor:`border`,_horizontal:{borderBottomWidth:`1px`},_vertical:{borderEndWidth:`1px`}},trigger:{color:`fg.muted`,_disabled:{_active:{bg:`initial`}},_selected:{color:`fg`,_horizontal:{layerStyle:`indicator.bottom`,"--indicator-offset-y":`-1px`,"--indicator-color":`colors.colorPalette.solid`},_vertical:{layerStyle:`indicator.end`,"--indicator-offset-x":`-1px`}}}},subtle:{trigger:{borderRadius:`var(--tabs-trigger-radius)`,color:`fg.muted`,_selected:{bg:`colorPalette.subtle`,color:`colorPalette.fg`}}},enclosed:{list:{bg:`bg.muted`,padding:`1`,borderRadius:`l3`,minH:`calc(var(--tabs-height) - 4px)`},trigger:{justifyContent:`center`,color:`fg.muted`,borderRadius:`var(--tabs-trigger-radius)`,_selected:{bg:`bg`,color:`colorPalette.fg`,shadow:`xs`}}},outline:{list:{"--line-thickness":`1px`,"--line-offset":`calc(var(--line-thickness) * -1)`,borderColor:`border`,display:`flex`,_horizontal:{_before:{content:`""`,position:`absolute`,bottom:`0px`,width:`100%`,borderBottomWidth:`var(--line-thickness)`,borderBottomColor:`border`}},_vertical:{_before:{content:`""`,position:`absolute`,insetInline:`var(--line-offset)`,height:`calc(100% - calc(var(--line-thickness) * 2))`,borderEndWidth:`var(--line-thickness)`,borderEndColor:`border`}}},trigger:{color:`fg.muted`,borderWidth:`1px`,borderColor:`transparent`,_selected:{bg:`currentBg`,color:`colorPalette.fg`},_horizontal:{borderTopRadius:`var(--tabs-trigger-radius)`,marginBottom:`var(--line-offset)`,marginEnd:{_notLast:`var(--line-offset)`},_selected:{borderColor:`border`,borderBottomColor:`transparent`}},_vertical:{borderStartRadius:`var(--tabs-trigger-radius)`,marginEnd:`var(--line-offset)`,marginBottom:{_notLast:`var(--line-offset)`},_selected:{borderColor:`border`,borderEndColor:`transparent`}}}},plain:{trigger:{color:`fg.muted`,_selected:{color:`colorPalette.fg`},borderRadius:`var(--tabs-trigger-radius)`,"&[data-selected][data-ssr]":{bg:`var(--tabs-indicator-bg)`,shadow:`var(--tabs-indicator-shadow)`,borderRadius:`var(--tabs-trigger-radius)`}}}}},defaultVariants:{size:`md`,variant:`line`}}),ch=rh.variants?.variant,qse=Xp({slots:Voe.keys(),className:`chakra-tag`,base:{root:{display:`inline-flex`,alignItems:`center`,verticalAlign:`top`,maxWidth:`100%`,userSelect:`none`,borderRadius:`l2`,focusVisibleRing:`outside`},label:{lineClamp:`1`},closeTrigger:{display:`flex`,alignItems:`center`,justifyContent:`center`,outline:`0`,borderRadius:`l1`,color:`currentColor`,focusVisibleRing:`inside`,focusRingWidth:`2px`},startElement:{flexShrink:0,boxSize:`var(--tag-element-size)`,ms:`var(--tag-element-offset)`,"&:has([data-scope=avatar])":{boxSize:`var(--tag-avatar-size)`,ms:`calc(var(--tag-element-offset) * 1.5)`},_icon:{boxSize:`100%`}},endElement:{flexShrink:0,boxSize:`var(--tag-element-size)`,me:`var(--tag-element-offset)`,_icon:{boxSize:`100%`},"&:has(button)":{ms:`calc(var(--tag-element-offset) * -1)`}}},variants:{size:{sm:{root:{px:`1.5`,minH:`4.5`,gap:`1`,"--tag-avatar-size":`spacing.3`,"--tag-element-size":`spacing.3`,"--tag-element-offset":`-2px`},label:{textStyle:`xs`}},md:{root:{px:`1.5`,minH:`5`,gap:`1`,"--tag-avatar-size":`spacing.3.5`,"--tag-element-size":`spacing.3.5`,"--tag-element-offset":`-2px`},label:{textStyle:`xs`}},lg:{root:{px:`2`,minH:`6`,gap:`1.5`,"--tag-avatar-size":`spacing.4.5`,"--tag-element-size":`spacing.4`,"--tag-element-offset":`-3px`},label:{textStyle:`sm`}},xl:{root:{px:`2.5`,minH:`8`,gap:`1.5`,"--tag-avatar-size":`spacing.6`,"--tag-element-size":`spacing.4.5`,"--tag-element-offset":`-4px`},label:{textStyle:`sm`}}},variant:{subtle:{root:ch?.subtle},solid:{root:ch?.solid},outline:{root:ch?.outline},surface:{root:ch?.surface}}},defaultVariants:{size:`md`,variant:`surface`}}),Jse=Xp({slots:Nf.keys(),className:`tags-input`,base:{root:{display:`flex`,flexDirection:`column`,gap:`1.5`,width:`full`},label:{fontWeight:`medium`,textStyle:`sm`,_disabled:{opacity:`0.5`}},control:{"--focus-color":`colors.colorPalette.focusRing`,"--error-color":`colors.border.error`,minH:`var(--tags-input-height)`,"--input-height":`var(--tags-input-height)`,px:`var(--tags-input-px)`,py:`var(--tags-input-py)`,gap:`var(--tags-input-gap)`,display:`flex`,flexWrap:`wrap`,alignItems:`center`,borderRadius:`l2`,pos:`relative`,transitionProperty:`border-color, box-shadow`,transitionDuration:`normal`,_disabled:{opacity:`0.5`},_invalid:{borderColor:`var(--error-color)`}}
12,input:{flex:`1`,minWidth:`20`,outline:`none`,bg:`transparent`,color:`fg`,px:`calc(var(--tags-input-item-px) / 1.25)`,height:`var(--tags-input-item-height)`,_readOnly:{display:`none`}},item:{maxWidth:`100%`,minWidth:`0`},itemText:{lineClamp:`1`,minWidth:`0`},itemInput:{outline:`none`,bg:`transparent`,minWidth:`2ch`,color:`inherit`,px:`var(--tags-input-item-px)`,height:`var(--tags-input-item-height)`},itemPreview:{height:`var(--tags-input-item-height)`,userSelect:`none`,display:`inline-flex`,alignItems:`center`,gap:`1`,rounded:`l1`,px:`var(--tags-input-item-px)`,maxWidth:`100%`},itemDeleteTrigger:{display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:`0`,boxSize:`calc(var(--tags-input-item-height) / 1.5)`,cursor:{base:`button`,_disabled:`initial`},me:`-1`,opacity:`0.4`,_hover:{opacity:`1`},"[data-highlighted] &":{opacity:`1`},_icon:{boxSize:`80%`}},clearTrigger:{display:`flex`,alignItems:`center`,justifyContent:`center`,boxSize:`calc(var(--tags-input-item-height) / 1.5)`,cursor:{base:`button`,_disabled:`initial`},color:`fg.muted`,focusVisibleRing:`inside`,focusRingWidth:`2px`,rounded:`l1`,_icon:{boxSize:`5`}}},variants:{size:{xs:{root:{"--tags-input-height":`sizes.8`,"--tags-input-px":`spacing.1.5`,"--tags-input-py":`spacing.1`,"--tags-input-gap":`spacing.1`,"--tags-input-item-height":`sizes.6`,"--tags-input-item-px":`spacing.2`,textStyle:`xs`}},sm:{root:{"--tags-input-height":`sizes.9`,"--tags-input-px":`spacing.1.5`,"--tags-input-py":`spacing.1`,"--tags-input-gap":`spacing.1`,"--tags-input-item-height":`sizes.6`,"--tags-input-item-px":`spacing.2`,textStyle:`sm`}},md:{root:{"--tags-input-height":`sizes.10`,"--tags-input-px":`spacing.1.5`,"--tags-input-py":`spacing.1`,"--tags-input-gap":`spacing.1`,"--tags-input-item-height":`sizes.7`,"--tags-input-item-px":`spacing.2`,textStyle:`sm`}},lg:{root:{"--tags-input-height":`sizes.11`,"--tags-input-px":`spacing.1.5`,"--tags-input-py":`spacing.1`,"--tags-input-gap":`spacing.1`,"--tags-input-item-height":`sizes.8`,"--tags-input-item-px":`spacing.2`,textStyle:`md`}}},variant:{outline:{control:{borderWidth:`1px`,bg:`bg`,_focus:{outlineWidth:`1px`,outlineStyle:`solid`,outlineColor:`var(--focus-color)`,borderColor:`var(--focus-color)`,_invalid:{outlineColor:`var(--error-color)`,borderColor:`var(--error-color)`}}},itemPreview:{bg:`colorPalette.subtle`,_highlighted:{bg:`colorPalette.muted`}}},subtle:{control:{bg:`bg.muted`,borderWidth:`1px`,borderColor:`transparent`,_focus:{outlineWidth:`1px`,outlineStyle:`solid`,outlineColor:`var(--focus-color)`,borderColor:`var(--focus-color)`,_invalid:{outlineColor:`var(--error-color)`,borderColor:`var(--error-color)`}}},itemPreview:{bg:`bg`,borderWidth:`1px`,_highlighted:{bg:`colorPalette.subtle`,borderColor:`colorPalette.emphasized`}}},flushed:{control:{borderRadius:`0`,px:`0`,bg:`transparent`,borderBottomWidth:`1px`,borderBottomColor:`border`,_focus:{borderColor:`var(--focus-color)`,boxShadow:`0px 1px 0px 0px var(--focus-color)`}},itemPreview:{bg:`colorPalette.subtle`,_highlighted:{bg:`colorPalette.muted`}}}}},defaultVariants:{size:`md`,variant:`outline`}}),Yse=Xp({slots:Hoe.keys(),className:`chakra-timeline`,base:{root:{display:`flex`,flexDirection:`column`,width:`full`,"--timeline-thickness":`1px`,"--timeline-gutter":`4px`},item:{"--timeline-content-gap":`spacing.6`,display:`flex`,position:`relative`,alignItems:`flex-start`,flexShrink:0,gap:`4`,_last:{"--timeline-content-gap":`0`}},separator:{display:`var(--timeline-separator-display)`,position:`absolute`,borderStartWidth:`var(--timeline-thickness)`,ms:`calc(-1 * var(--timeline-thickness) / 2)`,insetInlineStart:`calc(var(--timeline-indicator-size) / 2)`,insetBlock:`0`,borderColor:`border`},indicator:{outline:`2px solid {colors.bg}`,position:`relative`,flexShrink:`0`,boxSize:`var(--timeline-indicator-size)`,fontSize:`var(--timeline-font-size)`,display:`flex`,alignItems:`center`,justifyContent:`center`,borderRadius:`full`,fontWeight:`medium`},connector:{alignSelf:`stretch`,position:`relative`},content:{pb:`var(--timeline-content-gap)`,display:`flex`,flexDirection:`column`,width:`full`,gap:`2`},title:{display:`flex`,fontWeight:`medium`,flexWrap:`wrap`,gap:`1.5`,alignItems:`center`,mt:`var(--timeline-margin)`},description:{color:`fg.muted`,textStyle:`xs`}},variants:{variant:{subtle:{indicator:{bg:`colorPalette.muted`}},solid:{indicator:{bg:`colorPalette.solid`,color:`colorPalette.contrast`}},outline:{indicator:{bg:`currentBg`,borderWidth:`1px`,borderColor:`colorPalette.muted`}},plain:{}},showLastSeparator:{true:{item:{_last:{"--timeline-separator-display":`initial`}}},false:{item:{_last:{"--timeline-separator-display":`none`}}}},size:{sm:{root:{"--timeline-indicator-size":`sizes.4`,"--timeline-font-size":`fontSizes.2xs`},title:{textStyle:`xs`}},md:{root:{"--timeline-indicator-size":`sizes.5`,"--timeline-font-size":`fontSizes.xs`},title:{textStyle:`sm`}},lg:{root:{"--timeline-indicator-size":`sizes.6`,"--timeline-font-size":`fontSizes.xs`},title:{mt:`0.5`,textStyle:`sm`}},xl:{root:{"--timeline-indicator-size":`sizes.8`,"--timeline-font-size":`fontSizes.sm`},title:{mt:`1.5`,textStyle:`sm`}}}},defaultVariants:{size:`md`,variant:`solid`,showLastSeparator:!1}}),Xse=Xp({slots:zoe.keys(),className:`chakra-toast`,base:{root:{width:`full`,display:`flex`,alignItems:`flex-start`,position:`relative`,gap:`3`,py:`4`,ps:`4`,pe:`6`,borderRadius:`l2`,translate:`var(--x) var(--y)`,scale:`var(--scale)`,zIndex:`var(--z-index)`,height:`var(--height)`,opacity:`var(--opacity)`,willChange:`translate, opacity, scale`,transition:`translate 400ms, scale 400ms, opacity 400ms, height 400ms, box-shadow 200ms`,transitionTimingFunction:`cubic-bezier(0.21, 1.02, 0.73,
121)`,_closed:{transition:`translate 400ms, scale 400ms, opacity 200ms`,transitionTimingFunction:`cubic-bezier(0.06, 0.71, 0.55, 1)`},bg:`bg.panel`,color:`fg`,boxShadow:`xl`,"--toast-trigger-bg":`colors.bg.muted`,"&[data-type=warning]":{bg:`orange.solid`,color:`orange.contrast`,"--toast-trigger-bg":`{white/10}`,"--toast-border-color":`{white/40}`},"&[data-type=success]":{bg:`green.solid`,color:`green.contrast`,"--toast-trigger-bg":`{white/10}`,"--toast-border-color":`{white/40}`},"&[data-type=error]":{bg:`red.solid`,color:`red.contrast`,"--toast-trigger-bg":`{white/10}`,"--toast-border-color":`{white/40}`}},title:{fontWeight:`medium`,textStyle:`sm`,marginEnd:`2`},description:{display:`inline`,textStyle:`sm`,opacity:`0.8`},indicator:{flexShrink:`0`,boxSize:`5`},actionTrigger:{textStyle:`sm`,fontWeight:`medium`,height:`8`,px:`3`,borderRadius:`l2`,alignSelf:`center`,borderWidth:`1px`,borderColor:`var(--toast-border-color, inherit)`,transition:`background 200ms`,_hover:{bg:`var(--toast-trigger-bg)`}},closeTrigger:{position:`absolute`,top:`1`,insetEnd:`1`,padding:`1`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,color:`{currentColor/60}`,borderRadius:`l2`,textStyle:`md`,transition:`background 200ms`,_icon:{boxSize:`1em`}}}}),Zse=Xp({slots:Pf.keys(),className:`chakra-tooltip`,base:{content:{"--tooltip-bg":`colors.bg.inverted`,bg:`var(--tooltip-bg)`,color:`fg.inverted`,px:`2.5`,py:`1`,borderRadius:`l2`,fontWeight:`medium`,textStyle:`xs`,boxShadow:`md`,maxW:`xs`,zIndex:`tooltip`,transformOrigin:`var(--transform-origin)`,_open:{animationStyle:`scale-fade-in`,animationDuration:`fast`},_closed:{animationStyle:`scale-fade-out`,animationDuration:`fast`}},arrow:{"--arrow-size":`sizes.2`,"--arrow-background":`var(--tooltip-bg)`},arrowTip:{borderTopWidth:`1px`,borderLeftWidth:`1px`,borderColor:`var(--tooltip-bg)`}}}),Qse=Zp({display:`flex`,alignItems:`center`,gap:`var(--tree-item-gap)`,rounded:`l2`,userSelect:`none`,position:`relative`,"--tree-depth":`calc(var(--depth) - 1)`,"--tree-indentation-offset":`calc(var(--tree-indentation) * var(--tree-depth))`,"--tree-icon-offset":`calc(var(--tree-icon-size) * var(--tree-depth) * 0.5)`,"--tree-offset":`calc(var(--tree-padding-inline) + var(--tree-indentation-offset) + var(--tree-icon-offset))`,ps:`var(--tree-offset)`,pe:`var(--tree-padding-inline)`,py:`var(--tree-padding-block)`,focusVisibleRing:`inside`,focusRingColor:`border.emphasized`,focusRingWidth:`2px`,"&:hover, &:focus-visible":{bg:`bg.muted`},_disabled:{layerStyle:`disabled`}}),$se=Zp({flex:`1`}),ece=Zp({_selected:{bg:`colorPalette.subtle`,color:`colorPalette.fg`}}),tce=Zp({_selected:{layerStyle:`fill.solid`}}),nce={accordion:qoe,actionBar:Joe,alert:Yoe,avatar:Xoe,blockquote:Zoe,breadcrumb:Qoe,card:$oe,carousel:ese,checkbox:tse,checkboxCard:nse,codeBlock:rse,collapsible:ise,dataList:sse,datePicker:use,dialog:dse,drawer:fse,editable:mse,emptyState:hse,field:gse,f
12ieldset:_se,fileUpload:vse,hoverCard:yse,list:bse,listbox:xse,menu:Cse,nativeSelect:wse,numberInput:Ese,pinInput:kse,popover:Ase,progress:jse,progressCircle:Mse,radioCard:Pse,radioGroup:Fse,ratingGroup:Ise,scrollArea:Lse,segmentGroup:Rse,select:sh,combobox:ose,slider:zse,splitter:Bse,stat:Vse,steps:Use,switch:Wse,table:Gse,tabs:Kse,tag:qse,tagsInput:Jse,toast:Xse,tooltip:Zse,status:Hse,timeline:Yse,colorPicker:ase,qrCode:Nse,treeView:Xp({slots:Hf.keys(),className:`chakra-tree-view`,base:{root:{width:`full`,display:`flex`,flexDirection:`column`,gap:`2`},tree:{display:`flex`,flexDirection:`column`,"--tree-item-gap":`spacing.2`,_icon:{boxSize:`var(--tree-icon-size)`}},label:{fontWeight:`medium`,textStyle:`sm`},branch:{position:`relative`},branchContent:{position:`relative`},branchIndentGuide:{height:`100%`,width:`1px`,bg:`border`,position:`absolute`,"--tree-depth":`calc(var(--depth) - 1)`,"--tree-indentation-offset":`calc(var(--tree-indentation) * var(--tree-depth))`,"--tree-offset":`calc(var(--tree-padding-inline) + var(--tree-indentation-offset))`,"--tree-icon-offset":`calc(var(--tree-icon-size) * 0.5 * var(--depth))`,insetInlineStart:`calc(var(--tree-offset) + var(--tree-icon-offset))`,zIndex:`1`},branchIndicator:{color:`fg.muted`,transformOrigin:`center`,transitionDuration:`normal`,transitionProperty:`transform`,transitionTimingFunction:`default`,_open:{transform:`rotate(90deg)`}},branchTrigger:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`},branchControl:Qse,item:Qse,itemText:$se,branchText:$se,nodeCheckbox:{display:`inline-flex`}},variants:{size:{md:{tree:{textStyle:`sm`,"--tree-indentation":`spacing.4`,"--tree-padding-inline":`spacing.3`,"--tree-padding-block":`spacing.1.5`,"--tree-icon-size":`spacing.4`}},sm:{tree:{textStyle:`sm`,"--tree-indentation":`spacing.4`,"--tree-padding-inline":`spacing.3`,"--tree-padding-block":`spacing.1`,"--tree-icon-size":`spacing.3`}},xs:{tree:{textStyle:`xs`,"--tree-indentation":`spacing.4`,"--tree-padding-inline":`spacing.2`,"--tree-padding-block":`spacing.1`,"--tree-icon-size":`spacing.3`}}},variant:{subtle:{branchControl:ece,item:ece},solid:{branchControl:tce,item:tce}},animateContent:{true:{branchContent:{_open:{animationName:`expand-height, fade-in`,animationDuration:`moderate`},_closed:{animationName:`collapse-height, fade-out`,animationDuration:`moderate`}}}}},defaultVariants:{size:`md`,variant:`subtle`}}),marquee:Sse},rce=Qp({"2xs":{value:{fontSize:`2xs`,lineHeight:`0.75rem`}},xs:{value:{fontSize:`xs`,lineHeight:`1rem`}},sm:{value:{fontSize:`sm`,lineHeight:`1.25rem`}},md:{value:{fontSize:`md`,lineHeight:`1.5rem`}},lg:{value:{fontSize:`lg`,lineHeight:`1.75rem`}},xl:{value:{fontSize:`xl`,lineHeight:`1.875rem`}},"2xl":{value:{fontSize:`2xl`,lineHeight:`2rem`}},"3xl":{value:{fontSize:`3xl`,lineHeight:`2.375rem`}},"4xl":{value:{fontSize:`4xl`,lineHeight:`2.75rem`,letterSpacing:`-0.025em`}},"5xl":{value:{fontSize:`5xl`,lineHeight:`3.75rem`,letterSpacing:`-0.025em`}},"6xl":{value:{fontSize:`6xl`,lineHeight:`4.5rem`,letterSpacing:`-0.025em`}},"7xl":{value:{fontSize:`7xl`,lineHeight:`5.75rem`,letterSpacing:`-0.025em`}},none:{value:{}},label:{value:{fontSize:`sm`,lineHeight:`1.25rem`,fontWeight:`medium`}}}),ice=em.animations({spin:{value:`spin 1s linear infinite`},ping:{value:`ping 1s cubic-bezier(0, 0, 0.2, 1) infinite`},pulse:{value:`pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite`},bounce:{value:`bounce 1s infinite`}}),ace=em.aspectRatios({square:{value:`1 / 1`},landscape:{value:`4 / 3`},portrait:{value:`3 / 4`},wide:{value:`16 / 9`},ultrawide:{value:`18 / 5`},golden:{value:`1.618 / 1`}}),oce=em.blurs({none:{value:` `},sm:{value:`4px`},md:{value:`8px`},lg:{value:`12px`},xl:{value:`16px`},"2xl":{value:`24px`},"3xl":{value:`40px`},"4xl":{value:`64px`}}),sce=em.borders({xs:{value:`0.5px solid`},sm:{value:`1px solid`},md:{value:`2px solid`},lg:{value:`4px solid`},xl:{value:`8px solid`}}),cce=em.colors({transparent:{value:`transparent`},current:{value:`currentColor`},black:{value:`#09090B`},white:{value:`#FFFFFF`},whiteAlpha:{50:{value:`rgba(255, 255, 255, 0.04)`},100:{value:`rgba(255, 255, 255, 0.06)`},200:{value:`rgba(255, 255, 255, 0.08)`},300:{value:`rgba(255, 255, 255, 0.16)`},400:{value:`rgba(255, 255, 255, 0.24)`},500:{value:`rgba(255, 255, 255, 0.36)`},600:{value:`rgba(255, 255, 255, 0.48)`},700:{value:`rgba(255, 255, 255, 0.64)`},800:{value:`rgba(255, 255, 255, 0.80)`},900:{value:`rgba(255, 255, 255, 0.92)`},950:{value:`rgba(255, 255, 255, 0.95)`}},blackAlpha:{50:{value:`rgba(0, 0, 0, 0.04)`},100:{value:`rgba(0, 0, 0, 0.06)`},200:{value:`rgba(0, 0, 0, 0.08)`},300:{value:`rgba(0, 0, 0, 0.16)`},400:{value:`rgba(0, 0, 0, 0.24)`},500:{value:`rgba(0, 0, 0, 0.36)`},600:{value:`rgba(0, 0, 0, 0.48)`},700:{value:`rgba(0, 0, 0, 0.64)`},800:{value:`rgba(0, 0, 0, 0.80)`},900:{value:`rgba(0, 0, 0, 0.92)`},950:{value:`rgba(0, 0, 0, 0.95)`}},gray:{50:{value:`#fafafa`}
vendor: 5,171 bytes, line 12
12,100:{value:`#f4f4f5`},200:{value:`#e4e4e7`},300:{value:`#d4d4d8`},400:{value:`#a1a1aa`},500:{value:`#71717a`},600:{value:`#52525b`},700:{value:`#3f3f46`},800:{value:`#27272a`},900:{value:`#18181b`},950:{value:`#111111`}},red:{50:{value:`#fef2f2`},100:{value:`#fee2e2`},200:{value:`#fecaca`},300:{value:`#fca5a5`},400:{value:`#f87171`},500:{value:`#ef4444`},600:{value:`#dc2626`},700:{value:`#991919`},800:{value:`#511111`},900:{value:`#300c0c`},950:{value:`#1f0808`}},orange:{50:{value:`#fff7ed`},100:{value:`#ffedd5`},200:{value:`#fed7aa`},300:{value:`#fdba74`},400:{value:`#fb923c`},500:{value:`#f97316`},600:{value:`#ea580c`},700:{value:`#92310a`},800:{value:`#6c2710`},900:{value:`#3b1106`},950:{value:`#220a04`}},yellow:{50:{value:`#fefce8`},100:{value:`#fef9c3`},200:{value:`#fef08a`},300:{value:`#fde047`},400:{value:`#facc15`},500:{value:`#eab308`},600:{value:`#ca8a04`},700:{value:`#845209`},800:{value:`#713f12`},900:{value:`#422006`},950:{value:`#281304`}},green:{50:{value:`#f0fdf4`},100:{value:`#dcfce7`},200:{value:`#bbf7d0`},300:{value:`#86efac`},400:{value:`#4ade80`},500:{value:`#22c55e`},600:{value:`#16a34a`},700:{value:`#116932`},800:{value:`#124a28`},900:{value:`#042713`},950:{value:`#03190c`}},teal:{50:{value:`#f0fdfa`},100:{value:`#ccfbf1`},200:{value:`#99f6e4`},300:{value:`#5eead4`},400:{value:`#2dd4bf`},500:{value:`#14b8a6`},600:{value:`#0d9488`},700:{value:`#0c5d56`},800:{value:`#114240`},900:{value:`#032726`},950:{value:`#021716`}},blue:{50:{value:`#eff6ff`},100:{value:`#dbeafe`},200:{value:`#bfdbfe`},300:{value:`#a3cfff`},400:{value:`#60a5fa`},500:{value:`#3b82f6`},600:{value:`#2563eb`},700:{value:`#173da6`},800:{value:`#1a3478`},900:{value:`#14204a`},950:{value:`#0c142e`}},cyan:{50:{value:`#ecfeff`},100:{value:`#cffafe`},200:{value:`#a5f3fc`},300:{value:`#67e8f9`},400:{value:`#22d3ee`},500:{value:`#06b6d4`},600:{value:`#0891b2`},700:{value:`#0c5c72`},800:{value:`#134152`},900:{value:`#072a38`},950:{value:`#051b24`}},purple:{50:{value:`#faf5ff`},100:{value:`#f3e8ff`},200:{value:`#e9d5ff`},300:{value:`#d8b4fe`},400:{value:`#c084fc`},500:{value:`#a855f7`},600:{value:`#9333ea`},700:{value:`#641ba3`},800:{value:`#4a1772`},900:{value:`#2f0553`},950:{value:`#1a032e`}},pink:{50:{value:`#fdf2f8`},100:{value:`#fce7f3`},200:{value:`#fbcfe8`},300:{value:`#f9a8d4`},400:{value:`#f472b6`},500:{value:`#ec4899`},600:{value:`#db2777`},700:{value:`#a41752`},800:{value:`#6d0e34`},900:{value:`#45061f`},950:{value:`#2c0514`}}}),lce=em.cursor({button:{value:`pointer`},checkbox:{value:`default`},disabled:{value:`not-allowed`},menuitem:{value:`default`},option:{value:`default`},radio:{value:`default`},slider:{value:`default`},switch:{value:`pointer`}}),uce=em.durations({fastest:{value:`50ms`},faster:{value:`100ms`},fast:{value:`150ms`},moderate:{value:`200ms`},slow:{value:`300ms`},slower:{value:`400ms`},slowest:{value:`500ms`}}),dce=em.easings({"ease-in":{value:`cubic-bezier(0.42, 0, 1, 1)`},"ease-out":{value:`cubic-bezier(0, 0, 0.58, 1)`},"ease-in-out":{value:`cubic-bezier(0.42, 0, 0.58, 1)`},"ease-in-smooth":{value:`cubic-bezier(0.32, 0.72, 0, 1)`}}),fce=em.fontSizes({"2xs":{value:`0.625rem`},xs:{value:`0.75rem`},sm:{value:`0.875rem`},md:{value:`1rem`},lg:{value:`1.125rem`},xl:{value:`1.25rem`},"2xl":{value:`1.5rem`},"3xl":{value:`1.875rem`},"4xl":{value:`2.25rem`},"5xl":{value:`3rem`},"6xl":{value:`3.75rem`},"7xl":{value:`4.5rem`},"8xl":{value:`6rem`},"9xl":{value:`8rem`}}),pce=em.fontWeights({thin:{value:`100`},extralight:{value:`200`},light:{value:`300`},normal:{value:`400`},medium:{value:`500`},semibold:{value:`600`},bold:{value:`700`},extrabold:{value:`800`},black:{value:`900`}}),mce=`-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"`,hce=em.fonts({heading:{value:`Inter, ${mce}`},body:{value:`Inter, ${mce}`},mono:{value:`SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace`}}),gce=die({spin:{"0%":{transform:`rotate(0deg)`},"100%":{transform:`rotate(360deg)`}},pulse:{"50%":{opacity:`0.5`}},ping:{"75%, 100%":{transform:`scale(2)`,opacity:`0`}},bounce:{"0%, 100%":{transform:`translateY(-25%)`,animationTimingFunction:`cubic-bezier(0.8,0,1,1)`},"50%":{transform:`none`,animationTimingFunction:`cubic-bezier(0,0,0.2,1)`}},"bg-position":{from:{backgroundPosition:`var(--animate-from, 1rem) 0`},to:{backgroundPosition:`var(--animate-to, 0) 0`}},position:{from:{insetInlineStart:`var(--animate-from-x)`,insetBlockStart:`var(--animate-from-y)`},to:{insetInlineStart:`var(--animate-to-x)`,insetBlockStart:`var(--animate-to-y)`}},"circular-progress":{"0%":{strokeDasharray:`1, 400`,strokeDashoffset:`0`},"50%":{strokeDasharray:`400, 400`,strokeDashoffset:`-100%`},"100%":{strokeDasharray:`400, 400`,strokeDashoffset:`-260%`}},"expand-height":{from:{height:`var(--collapsed-height, 0)`},to:{height:`var(--height)`}},"collapse-height":{from:{height:`var(--height)`},to:{height:`var(--collapsed-height, 0)`}},"expand-width":{from:{width:`var(--collapsed-width, 0)`},to:{width:`var(--width)`}},"collapse-width":{from:{width:`var(--width)`},to:{width:`var(--collapsed-width, 0)`}},"fade-in":{from:{opacity:0}
12,to:{opacity:1}},"fade-out":{from:{opacity:1},to:{opacity:0}},"slide-from-left-full":{from:{translate:`-100% 0`},to:{translate:`0 0`}},"slide-from-right-full":{from:{translate:`100% 0`},to:{translate:`0 0`}},"slide-from-top-full":{from:{translate:`0 -100%`},to:{translate:`0 0`}},"slide-from-bottom-full":{from:{translate:`0 100%`},to:{translate:`0 0`}},"slide-to-left-full":{from:{translate:`0 0`},to:{translate:`-100% 0`}},"slide-to-right-full":{from:{translate:`0 0`},to:{translate:`100% 0`}},"slide-to-top-full":{from:{translate:`0 0`},to:{translate:`0 -100%`}},"slide-to-bottom-full":{from:{translate:`0 0`},to:{translate:`0 100%`}},"slide-from-top":{"0%":{translate:`0 calc(var(--slide-from-top-distance, 0.5rem) * -1)`},to:{translate:`0`}},"slide-from-bottom":{"0%":{translate:`0 var(--slide-from-bottom-distance, 0.5rem)`},to:{translate:`0`}},"slide-from-left":{"0%":{translate:`calc(var(--slide-from-left-distance, 0.5rem) * -1) 0`},to:{translate:`0`}},"slide-from-right":{"0%":{translate:`var(--slide-from-right-distance, 0.5rem) 0`},to:{translate:`0`}},"slide-to-top":{"0%":{translate:`0`},to:{translate:`0 calc(var(--slide-to-top-distance, 0.5rem) * -1)`}},"slide-to-bottom":{"0%":{translate:`0`},to:{translate:`0 var(--slide-to-bottom-distance, 0.5rem)`}},"slide-to-left":{"0%":{translate:`0`},to:{translate:`calc(var(--slide-to-left-distance, 0.5rem) * -1) 0`}},"slide-to-right":{"0%":{translate:`0`},to:{translate:`var(--slide-to-right-distance, 0.5rem) 0`}},"scale-in":{from:{scale:`0.95`},to:{scale:`1`}},"scale-out":{from:{scale:`1`},to:{scale:`0.95`}},marqueeX:{from:{transform:`translateX(0%)`},to:{transform:`translateX(var(--marquee-translate))`}},marqueeY:{from:{transform:`translateY(0%)`},to:{transform:`translateY(var(--marquee-translate))`}}}),_ce=em.letterSpacings({tighter:{value:`-0.05em`},tight:{value:`-0.025em`},wide:{value:`0.025em`},wider:{value:`0.05em`},widest:{value:`0.1em`}}),vce=em.lineHeights({shorter:{value:1.25},short:{value:1.375},moderate:{value:1.5},tall:{value:1.625},taller:{value:2}}),yce=em.radii({none:{value:`0`},"2xs":{value:`0.0625rem`},xs:{value:`0.125rem`},sm:{value:`0.25rem`},md:{value:`0.375rem`},lg:{value:`0.5rem`},xl:{value:`0.75rem`},"2xl":{value:`1rem`},"3xl":{value:`1.5rem`},"4xl":{value:`2rem`},full:{value:`9999px`}}),bce=em.spacing({.5:{value:`0.125rem`},1:{value:`0.25rem`},1.5:{value:`0.375rem`},2:{value:`0.5rem`},2.5:{value:`0.625rem`},3:{value:`0.75rem`},3.5:{value:`0.875rem`},4:{value:`1rem`},4.5:{value:`1.125rem`},5:{value:`1.25rem`},6:{value:`1.5rem`},7:{value:`1.75rem`},8:{value:`2rem`},9:{value:`2.25rem`},10:{value:`2.5rem`},11:{value:`2.75rem`},12:{value:`3rem`},14:{value:`3.5rem`},16:{value:`4rem`},20:{value:`5rem`},24:{value:`6rem`},28:{value:`7rem`},32:{value:`8rem`},36:{value:`9rem`},40:{value:`10rem`},44:{value:`11rem`},48:{value:`12rem`},52:{value:`13rem`},56:{value:`14rem`},60:{value:`15rem`},64:{value:`16rem`},72:{value:`18rem`},80:{value:`20rem`},96:{value:`24rem`}}),xce=em.sizes({"3xs":{value:`14rem`},"2xs":{value:`16rem`},xs:{value:`20rem`},sm:{value:`24rem`},md:{value:`28rem`},lg:{value:`32rem`},xl:{value:`36rem`},"2xl":{value:`42rem`},"3xl":{value:`48rem`},"4xl":{value:`56rem`},"5xl":{value:`64rem`},"6xl":{value:`72rem`},"7xl":{value:`80rem`},"8xl":{value:`90rem`}}),Sce=em.sizes({max:{value:`max-content`},min:{value:`min-content`},fit:{value:`fit-content`},prose:{value:`60ch`},full:{value:`100%`},dvh:{value:`100dvh`},svh:{value:`100svh`},lvh:{value:`100lvh`},dvw:{value:`100dvw`},svw:{value:`100svw`},lvw:{value:`100lvw`},vw:{value:`100vw`},vh:{value:`100vh`}}),Cce=em.sizes({"1/2":{value:`50%`},"1/3":{value:`33.333333%`},"2/3":{value:`66.666667%`},"1/4":{value:`25%`},"3/4":{value:`75%`},"1/5":{value:`20%`},"2/5":{value:`40%`},"3/5":{value:`60%`},"4/5":{value:`80%`},"1/6":{value:`16.666667%`},"2/6":{value:`33.333333%`},"3/6":{value:`50%`},"4/6":{value:`66.666667%`},"5/6":{value:`83.333333%`},"1/12":{value:`8.333333%`},"2/12":{value:`16.666667%`},"3/12":{value:`25%`},"4/12":{value:`33.333333%`},"5/12":{value:`41.666667%`},"6/12":{value:`50%`},"7/12":{value:`58.333333%`},"8/12":{value:`66.666667%`},"9/12":{value:`75%`},"10/12":{value:`83.333333%`},"11/12":{value:`91.666667%`}}),wce=Jp(Sie,nm({preflight:!0,cssVarsPrefix:`chakra`,cssVarsRoot:`:where(html, .chakra-theme)`,globalCss:Uae,theme:{breakpoints:Hae,keyframes:gce,tokens:{aspectRatios:ace,animations:ice,blurs:oce,borders:sce,colors:cce,durations:uce,easings:dce,fonts:hce,fontSizes:fce,fontWeights:pce,letterSpacings:_ce,lineHeights:vce,radii:yce,spacing:bce,sizes:em.sizes({...xce,...bce,...Cce,...Sce}),zIndex:em.zIndex({hide:{value:-1},base:{value:0},docked:{value:10},dropdown:{value:1e3},sticky:{value:1100},banner:{value:1200},overlay:{value:1300},modal:{value:1400},popover:{value:1500},skipNav:{value:1600},toast:{value:1700},tooltip:{value:1800},max:{value:2147483647}}),cursor:lce},semanticTokens:{colors:aoe,shadows:soe,radii:ooe},recipes:ioe,slotRecipes:nce,textStyles:rce,layerStyles:Wae,animationStyles:Gae}}));Lae(wce);function Tce(e){let{key:t,recipe:n}=e,r=sa();return(0,_.useMemo)(()=>{let e=n||(t==null?{}:r.getSlotRecipe(t));return r.sva(structuredClone(e))},[t,n,r])}var lh=e=>{let{key:t,recipe:n}=e,r=Oa(t||n.className||`Component`),[i,a]=aa({name:`${r}StylesContext`,errorMessage:`use${r}Styles returned is 'undefined'. Seems you forgot to wrap the components in "<${r}.Root />" `}),[o,s]=aa({name:`${r}ClassNameContext`,errorMessage:`use${r}ClassNames returned is 'undefined'. Seems you forgot to wrap the components in "<${r}.Root />" `,strict:!1}),[c,l]=aa({strict:!1,name:`${r}PropsContext`,providerName:`${r}PropsContext`,defaultValue:{}});function u(e){let{unstyled:r,...i}=e,a=Tce({key:t,recipe:i.recipe||n}),[o,s]=(0,_.useMemo)(()=>a.splitVariantProps(i),[i,a]);return{styles:(0,_.useMemo)(()=>r?Ma:a(o),[r,o,a]),classNames:a.classNameMap,props:s}}function d(e,t={}){let{defaultProps:n,displayName:a}=t,s=Da(e),c=Aa(r,s),d=t=>{let r=l(),{styles:a,classNames:s,props:c}=u((0,_.useMemo)(()=>Ki(n,r,t),[r,t]));return(0,B.jsx)(i,{value:a,children:(0,B.jsx)(o,{value:s,children:(0,B.jsx)(e,{...c})})})};return d.displayName=a??c??s,d}return{StylesProvider:i,ClassNamesProvider:o,PropsProvider:c,usePropsContext:l,useRecipeResult:u,withProvider:(e,t,n)=>{let{defaultProps:a,displayName:s,wrapElement:c,...d}=n??{},f=ka(r,String(t)),p=Ca(e,{},d),m=(0,_.forwardRef)((e,n)=>{let r=l(),s=(0,_.useMemo)(()=>Ki(a??{},r,e),[r,e]),{styles:d,props:f,classNames:m}=u(s),h=m[t],g=(0,B.jsx)(i,{value:d,children:(0,B.jsx)(o,{value:m,children:(0,B.jsx)(p,{ref:n,...f,css:[d[t],s.css],className:ea(s.className,h)})})});return c?.(g,s)??g});return m.displayName=s??f??Da(e),m}
12,withContext:(e,t,n)=>{let{displayName:i,...o}=n??{},c=t!=null&&t!==``?ka(r,String(t)):r,l=Ca(e,{},o),u=(0,_.forwardRef)((e,n)=>{let{unstyled:r,...i}=e,o=a(),c=s()?.[t];return(0,B.jsx)(l,{...i,css:[!r&&t?o[t]:void 0,e.css],ref:n,className:ea(e.className,c)})});return u.displayName=i??c??Da(e),u},withRootProvider:d,useStyles:a,useClassNames:s}},Ece=Ca(`div`,{base:{position:`absolute`,display:`flex`,alignItems:`center`,justifyContent:`center`},variants:{axis:{horizontal:{insetStart:`50%`,translate:`-50%`,_rtl:{translate:`50%`}},vertical:{top:`50%`,translate:`0 -50%`},both:{insetStart:`50%`,top:`50%`,translate:`-50% -50%`,_rtl:{translate:`50% -50%`}}}},defaultVariants:{axis:`both`}});Ece.displayName=`AbsoluteCenter`;var Dce=e=>(0,B.jsx)(Ca.svg,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...e,children:(0,B.jsx)(`path`,{d:`m6 9 6 6 6-6`})}),Oce=e=>(0,B.jsxs)(Ca.svg,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,...e,children:[(0,B.jsx)(`path`,{d:`m5 12 7-7 7 7`}),(0,B.jsx)(`path`,{d:`M12 19V5`})]}),kce=e=>(0,B.jsxs)(Ca.svg,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,...e,children:[(0,B.jsx)(`path`,{d:`M12 5v14`}),(0,B.jsx)(`path`,{d:`m19 12-7 7-7-7`})]}),Ace=e=>(0,B.jsx)(Ca.svg,{viewBox:`0 0 24 24`,fill:`currentColor`,...e,children:(0,B.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M18.7071 6.70711C19.0976 6.31658 19.0976 5.68342 18.7071 5.29289C18.3166 4.90237 17.6834 4.90237 17.2929 5.29289L12 10.5858L6.70711 5.29289C6.31658 4.90237 5.68342 4.90237 5.29289 5.29289C4.90237 5.68342 4.90237 6.31658 5.29289 6.70711L10.5858 12L5.29289 17.2929C4.90237 17.6834 4.90237 18.3166 5.29289 18.7071C5.68342 19.0976 6.31658 19.0976 6.70711 18.7071L12 13.4142L17.2929 18.7071C17.6834 19.0976 18.3166 19.0976 18.7071 18.7071C19.0976 18.3166 19.0976 17.6834 18.7071 17.2929L13.4142 12L18.7071 6.70711Z`})}),uh=e=>e?``:void 0,{PropsProvider:jce,withContext:Mce}=Pa({key:`badge`}),dh=Mce(`span`),{withContext:Nce,PropsProvider:Pce}=Pa({key:`spinner`}),fh=Nce(`span`),Fce=_.forwardRef(function(e,t){let{spinner:n=(0,B.jsx)(fh,{size:`inherit`,borderWidth:`0.125em`,color:`inherit`}),spinnerPlacement:r=`start`,children:i,text:a,visible:o=!0,...s}=e;return o?a?(0,B.jsxs)(iu,{ref:t,display:`contents`,...s,children:[r===`start`&&n,a,r===`end`&&n]}):n?(0,B.jsxs)(iu,{ref:t,display:`contents`,...s,children:[(0,B.jsx)(Ece,{display:`inline-flex`,children:n}),(0,B.jsx)(iu,{visibility:`hidden`,display:`contents`,children:i})]}):(0,B.jsx)(iu,{ref:t,display:`contents`,...s,children:i}):i});Fce.displayName=`Loader`;var{useRecipeResult:Ice,PropsProvider:Lce,usePropsContext:Rce}=Pa({key:`button`}),ph=(0,_.forwardRef)(function(e,t){let n=Rce(),r=(0,_.useMemo)(()=>Ki(n,e),[n,e]),i=Ice(r),{loading:a,loadingText:o,children:s,spinner:c,spinnerPlacement:l,...u}=i.props;return(0,B.jsx)(Ca.button,{type:`button`,ref:t,...u,"data-loading":uh(a),disabled:a||u.disabled,className:ea(i.className,r.className),css:[i.styles,r.css],children:!r.asChild&&a?(0,B.jsx)(Fce,{spinner:c,text:o,spinnerPlacement:l,children:s}):s})});ph.displayName=`Button`;function zce(e){let{when:t,fallback:n,children:r}=e,i;return i=t?typeof r==`function`?r(t):r:n,(0,_.isValidElement)(i)?i:(0,B.jsx)(B.Fragment,{children:i})}var Bce=e=>{let{children:t,fallback:n}=e,[r,i]=(0,_.useState)(!1);return(0,_.useEffect)(()=>{i(!0)},[]),(0,B.jsx)(zce,{when:r,fallback:n,children:t})},mh=(0,_.forwardRef)(function(e,t){return(0,B.jsx)(ph,{px:`0`,py:`0`,_icon:{fontSize:`1.2em`},ref:t,...e})});mh.displayName=`IconButton`;var hh=_.forwardRef(function(e,t){return(0,B.jsx)(mh,{variant:`ghost`,"aria-label":`Close`,ref:t,...e,children:e.children??(0,B.jsx)(Ace,{})})});hh.displayName=`CloseButton`;var{withContext:Vce,PropsProvider:Hce}=Pa({key:`code`}),gh=Vce(`code`);function Uce(e){let{gap:t,direction:n}=e,r={column:{marginY:t,marginX:0,borderInlineStartWidth:0,borderTopWidth:`1px`},"column-reverse":{marginY:t,marginX:0,borderInlineStartWidth:0,borderTopWidth:`1px`},row:{marginX:t,marginY:0,borderInlineStartWidth:`1px`,borderTopWidth:0},"row-reverse":{marginX:t,marginY:0,borderInlineStartWidth:`1px`,borderTopWidth:0}};return{"&":Kp(n,e=>r[e])}}function Wce(e){return _.Children.toArray(e).filter(e=>(0,_.isValidElement)(e))}var _h=(0,_.forwardRef)(function(e,t){let{direction:n=`column`,align:r,justify:i,gap:a=`0.5rem`,wrap:o,children:s,separator:c,className:l,...u}=e,d=(0,_.useMemo)(()=>Uce({gap:a,direction:n}),[a,n]),f=(0,_.useMemo)(()=>(0,_.isValidElement)(c)?Wce(s).map((e,t,n)=>{let r=e.key===void 0?t:e.key,i=c,a=(0,_.cloneElement)(i,{css:[d,i.props.css]});return(0,B.jsxs)(_.Fragment,{children:[e,t===n.length-1?null:a]},r)}):s,[s,c,d]);return(0,B.jsx)(Ca.div,{ref:t,display:`flex`,alignItems:r,justifyContent:i,flexDirection:n,flexWrap:o,gap:c?void 0:a,className:ea(`chakra-stack`,l),...u,children:f})});_h.displayName=`Stack`;var{withContext:Gce,PropsProvider:Kce}=Pa({key:`container`}
12),vh=Gce(`div`),{withRootProvider:qce,withContext:yh,useStyles:Jce,PropsProvider:Yce}=lh({key:`dialog`});qce(pp.RootProvider,{defaultProps:{unmountOnExit:!0,lazyMount:!0}});var Xce=qce(pp.Root,{defaultProps:{unmountOnExit:!0,lazyMount:!0}}),Zce=yh(pp.Trigger,`trigger`,{forwardAsChild:!0}),Qce=yh(pp.Positioner,`positioner`,{forwardAsChild:!0}),$ce=yh(pp.Content,`content`,{forwardAsChild:!0});yh(pp.Description,`description`,{forwardAsChild:!0});var ele=yh(pp.Title,`title`,{forwardAsChild:!0}),tle=yh(pp.CloseTrigger,`closeTrigger`,{forwardAsChild:!0});(0,_.forwardRef)(function(e,t){let n=ap();return(0,B.jsx)(Ca.button,{...e,ref:t,onClick:()=>n.setOpen(!1)})});var nle=yh(pp.Backdrop,`backdrop`,{forwardAsChild:!0}),rle=yh(`div`,`body`);yh(`div`,`footer`);var ile=yh(`div`,`header`);pp.Context;var{withRootProvider:ale,withContext:bh,useStyles:ole,PropsProvider:sle}=lh({key:`drawer`});ale(pp.RootProvider,{defaultProps:{unmountOnExit:!0,lazyMount:!0}});var cle=ale(pp.Root,{defaultProps:{unmountOnExit:!0,lazyMount:!0}}),lle=bh(pp.Trigger,`trigger`,{forwardAsChild:!0}),ule=bh(pp.Positioner,`positioner`,{forwardAsChild:!0}),dle=bh(pp.Content,`content`,{forwardAsChild:!0});bh(pp.Description,`description`,{forwardAsChild:!0});var fle=bh(pp.Title,`title`,{forwardAsChild:!0}),ple=bh(pp.CloseTrigger,`closeTrigger`,{forwardAsChild:!0});(0,_.forwardRef)(function(e,t){let n=ap();return(0,B.jsx)(Ca.button,{...e,ref:t,onClick:()=>n.setOpen(!1)})});var mle=bh(pp.Backdrop,`backdrop`,{forwardAsChild:!0}),hle=bh(`div`,`body`);bh(`div`,`footer`);var gle=bh(`div`,`header`);pp.Context;var{useRecipeResult:_le,PropsProvider:vle}=Pa({key:`icon`}),yle=_.forwardRef(function(e,t){let{styles:n,className:r,props:i}=_le({asChild:!e.as,...e});return(0,B.jsx)(Ca.svg,{ref:t,focusable:!1,"aria-hidden":`true`,...i,css:[n,e.css],className:ea(r,e.className)})});function ble(e){let{each:t,fallback:n,children:r}=e;return t?.length===0?n||null:t?.map(r)}var xh=(0,_.forwardRef)(function(e,t){let{direction:n,align:r,justify:i,wrap:a,basis:o,grow:s,shrink:c,inline:l,...u}=e;return(0,B.jsx)(Ca.div,{ref:t,...u,css:{display:l?`inline-flex`:`flex`,flexDirection:n,alignItems:r,justifyContent:i,flexWrap:a,flexBasis:o,flexGrow:s,flexShrink:c,...e.css}})});xh.displayName=`Flex`;function xle(e){return Kp(e,e=>e===`auto`?`auto`:`span ${e}/span ${e}`)}var Sh=(0,_.forwardRef)(function(e,t){let{area:n,colSpan:r,colStart:i,colEnd:a,rowEnd:o,rowSpan:s,rowStart:c,css:l,...u}=e,d=(0,_.useMemo)(()=>Xi({gridArea:n,gridColumn:xle(r),gridRow:xle(s),gridColumnStart:i,gridColumnEnd:a,gridRowStart:c,gridRowEnd:o}),[n,r,i,a,o,s,c]);return(0,B.jsx)(Ca.div,{ref:t,css:[d,l],...u})});Sh.displayName=`GridItem`;var Ch=(0,_.forwardRef)(function(e,t){return(0,B.jsx)(_h,{align:`center`,...e,direction:`row`,ref:t})});Ch.displayName=`HStack`;var wh=(0,_.forwardRef)(function(e,t){let{align:n,fit:r=`cover`,...i}=e;return(0,B.jsx)(Ca.img,{ref:t,objectFit:r,objectPosition:n,className:ea(`chakra-image`,e.className),...i})});wh.displayName=`Image`;var{withContext:Sle,PropsProvider:Cle}=Pa({key:`input`}),Th=Sle(rp.Input),{withContext:wle,PropsProvider:Tle}=Pa({key:`link`}),Eh=wle(`a`),{withProvider:Ele,withContext:Dle,useStyles:Ole,PropsProvider:kle}=lh({key:`list`}),Ale=Ele(`ul`,`root`,{defaultProps:{role:`list`}}),Dh=Dle(`li`,`item`);Dle(`span`,`indicator`);var[jle,Oh]=aa({name:`NativeSelectBasePropsContext`,hookName:`useNativeSelectBaseProps`,providerName:`<NativeSelectRoot />`,strict:!1}),{withProvider:Mle,useClassNames:kh,useStyles:Nle,PropsProvider:Ple}=lh({key:`nativeSelect`}),Ah=Mle(`div`,`root`,{wrapElement(e,t){let n=Kf();return(0,B.jsx)(jle,{value:{disabled:!!(n?.disabled??t.disabled),invalid:!!(n?.invalid??t.invalid)},children:e})}}),Fle=Ca(rp.Select,{},{forwardAsChild:!0}),jh=(0,_.forwardRef)(function(e,t){let{children:n,placeholder:r,unstyled:i,...a}=e,{disabled:o,invalid:s}=Oh(),c=Nle(),l=kh();return(0,B.jsxs)(Fle,{disabled:o,"data-invalid":uh(s),...a,ref:t,className:ea(l.field,e.className),css:[i?void 0:c.field,e.css],children:[r&&(0,B.jsx)(`option`,{value:``,children:r}),n]})});function Mh(e){let{unstyled:t,...n}=e,r=Nle(),{disabled:i,invalid:a}=Oh(),o=kh();return(0,B.jsx)(Ca.div,{...n,"data-disabled":uh(i),"data-invalid":uh(a),className:ea(o.indicator,e.className),css:[t?void 0:r.indicator,e.css],children:e.children??(0,B.jsx)(Dce,{})})}var{useRecipeResult:Ile,PropsProvider:Lle}=Pa({key:`separator`}),Nh=(0,_.forwardRef)(function(e,t){let{styles:n,className:r,props:i}=Ile(e),a=e.orientation||`horizontal`;return(0,B.jsx)(Ca.span,{ref:t,role:Qi(a)?`separator`:`presentation`,"aria-orientation":Qi(a)?a:void 0,...zp(i,[`orientation`]),className:ea(r,e.className),css:[n,e.css]})});Nh.displayName=`Separator`;
12var Ph=(0,_.forwardRef)(function(e,t){let{columns:n,minChildWidth:r,...i}=e,a=sa();return(0,B.jsx)(Fa,{ref:t,templateColumns:r?zle(r,a):Ble(n),...i})});Ph.displayName=`SimpleGrid`;function Rle(e){return typeof e==`number`?`${e}px`:e}function zle(e,t){return Kp(e,e=>{let n=t.tokens.getVar(`sizes.${e}`,Rle(e));return e===null?null:`repeat(auto-fit, minmax(${n}, 1fr))`})}function Ble(e){return Kp(e,e=>e===null?null:`repeat(${e}, minmax(0, 1fr))`)}var{withContext:Vle,PropsProvider:Hle}=Pa({key:`skeleton`}),Fh=Vle(`div`),Ule=_.forwardRef(function(e,t){let{size:n,...r}=e;return(0,B.jsx)(Ea,{size:n,asChild:!0,ref:t,children:(0,B.jsx)(Fh,{...r})})});Ule.displayName=`SkeletonCircle`;var Wle=_.forwardRef(function(e,t){let{loading:n=!0,noOfLines:r=3,gap:i,rootProps:a,...o}=e;return(0,B.jsx)(_h,{gap:i,width:`full`,ref:t,...a,children:Array.from({length:n?r:1}).map((e,t)=>(0,B.jsx)(Fh,{loading:n,height:n?`4`:void 0,maxW:n?t===r-1&&r>1?`80%`:`100%`:void 0,...o},t))})});Wle.displayName=`SkeletonText`;var{withProvider:Ih,withContext:Lh,useStyles:Gle,PropsProvider:Kle}=lh({key:`slider`});Ih(Ap.RootProvider,`root`,{forwardAsChild:!0});var qle=Ih(Ap.Root,`root`,{forwardAsChild:!0}),Jle=Lh(Ap.Track,`track`,{forwardAsChild:!0}),Yle=Lh(Ap.Range,`range`,{forwardAsChild:!0}),Xle=Lh(Ap.Thumb,`thumb`,{forwardAsChild:!0});Lh(Ap.ValueText,`valueText`,{forwardAsChild:!0}),Lh(Ap.Label,`label`,{forwardAsChild:!0});var Zle=Lh(Ap.MarkerGroup,`markerGroup`,{forwardAsChild:!0}),Qle=Lh(Ap.Marker,`marker`,{forwardAsChild:!0}),$le=Lh(`div`,`markerIndicator`),eue=Lh(`span`,`markerLabel`);Lh(Ap.DraggingIndicator,`draggingIndicator`,{forwardAsChild:!0});var tue=e=>(0,B.jsx)(ble,{each:gp().value,children:(t,n)=>(0,B.jsx)(Xle,{index:n,...e,children:(0,B.jsx)(nue,{})},n)});(0,_.forwardRef)(function(e,t){let{marks:n,...r}=e;return n?.length?(0,B.jsx)(Zle,{ref:t,...r,children:n.map((e,t)=>{let n=typeof e==`number`?e:e.value,r=typeof e==`number`?void 0:e.label;return(0,B.jsxs)(Qle,{value:n,children:[(0,B.jsx)($le,{}),r!=null&&(0,B.jsx)(eue,{children:r})]},t)})}):null});var Rh=Lh(Ap.Control,`control`,{forwardAsChild:!0});Ap.Context;var nue=Ap.HiddenInput,{withProvider:rue,withContext:zh,useStyles:iue,PropsProvider:aue}=lh({key:`stat`}),Bh=rue(`dl`,`root`),Vh=zh(`dt`,`label`),Hh=zh(`dd`,`valueText`);zh(`span`,`helpText`),zh(`span`,`valueUnit`),zh(`span`,`indicator`,{defaultProps:{"data-type":`up`,children:(0,B.jsx)(Oce,{})}}),zh(`span`,`indicator`,{defaultProps:{"data-type":`down`,children:(0,B.jsx)(kce,{})}}),(0,_.forwardRef)(function(e,t){let n=Tce({key:`stat`}),[r,i]=(0,_.useMemo)(()=>n.splitVariantProps(e),[e,n]);return(0,B.jsx)(aue,{value:r,children:(0,B.jsx)(Ca.div,{ref:t,role:`group`,display:`flex`,flexWrap:`wrap`,justifyContent:`space-around`,alignItems:`flex-start`,...i})})});var{withProvider:oue,withContext:Uh,useStyles:sue,PropsProvider:cue}=lh({key:`tag`}),lue=oue(`div`,`root`),uue=Uh(`span`,`label`);Uh(`button`,`closeTrigger`,{defaultProps:{children:(0,B.jsx)(Ace,{})}}),Uh(`span`,`startElement`),Uh(`span`,`endElement`);var{withContext:due,PropsProvider:fue}=Pa({key:`textarea`}),pue=due(rp.Textarea),{withRootProvider:mue,withContext:Wh,useStyles:hue,PropsProvider:gue}=lh({key:`tooltip`});mue(Rp.RootProvider);var _ue=mue(Rp.Root,{defaultProps:{lazyMount:!0,unmountOnExit:!0}}),vue=Wh(Rp.Trigger,`trigger`,{forwardAsChild:!0}),yue=Wh(Rp.Positioner,`positioner`,{forwardAsChild:!0}),bue=Wh(Rp.Content,`content`,{forwardAsChild:!0}),xue=Wh(Rp.ArrowTip,`arrowTip`,{forwardAsChild:!0}),Sue=Wh(Rp.Arrow,`arrow`,{forwardAsChild:!0,defaultProps:{children:(0,B.jsx)(xue,{})}});Rp.Context;var Gh=(0,_.forwardRef)(function(e,t){return(0,B.jsx)(_h,{align:`center`,...e,direction:`column`,ref:t})});Gh.displayName=`VStack`;var Kh=(0,_.forwardRef)(function(e,t){let{gap:n=`0.5rem`,justify:r,direction:i,align:a,...o}=e;return(0,B.jsx)(Ca.div,{ref:t,display:`flex`,flexWrap:`wrap`,justifyContent:r,alignItems:a,flexDirection:i,gap:n,...o,className:ea(`chakra-wrap`,e.className)})});Kh.displayName=`Wrap`;var Cue=Zp({display:`flex`,alignItems:`flex-start`}),qh=(0,_.forwardRef)(function(e,t){return(0,B.jsx)(Ca.div,{ref:t,css:[Cue,e.css],...e,className:ea(`chakra-wrap__listitem`,e.className)})}),Jh={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Yh=_.createContext&&_.createContext(Jh),wue=[`attr`,`size`,`title`];function Tue(e,t){if(e==null)return{};var n,r,i=Eue(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Eue(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Xh(){return Xh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xh.apply(null,arguments)}function Zh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];
12t%2?Zh(Object(n),!0).forEach(function(t){Due(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Due(e,t,n){return(t=Oue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oue(e){var t=kue(e,`string`);return typeof t==`symbol`?t:t+``}function kue(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function $h(e){return e&&e.map((e,t)=>_.createElement(e.tag,Qh({key:t},e.attr),$h(e.child)))}function eg(e){return t=>_.createElement(Aue,Xh({attr:Qh({},e.attr)},t),$h(e.child))}function Aue(e){var t=t=>{var{attr:n,size:r,title:i}=e,a=Tue(e,wue),o=r||t.size||`1em`,s;return t.className&&(s=t.className),e.className&&(s=(s?s+` `:``)+e.className),_.createElement(`svg`,Xh({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,a,{className:s,style:Qh(Qh({color:e.color||t.color},t.style),e.style),height:o,width:o,xmlns:`http://www.w3.org/2000/svg`}),i&&_.createElement(`title`,null,i),e.children)};return Yh===void 0?t(Jh):_.createElement(Yh.Consumer,null,e=>t(e))}function tg(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M18 6 6 18`},child:[]},{tag:`path`,attr:{d:`m6 6 12 12`},child:[]}]})(e)}function jue(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`},child:[]},{tag:`path`,attr:{d:`M12 9v4`},child:[]},{tag:`path`,attr:{d:`M12 17h.01`},child:[]}]})(e)}function Mue(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`circle`,attr:{cx:`12`,cy:`12`,r:`4`},child:[]},{tag:`path`,attr:{d:`M12 2v2`},child:[]},{tag:`path`,attr:{d:`M12 20v2`},child:[]},{tag:`path`,attr:{d:`m4.93 4.93 1.41 1.41`},child:[]},{tag:`path`,attr:{d:`m17.66 17.66 1.41 1.41`},child:[]},{tag:`path`,attr:{d:`M2 12h2`},child:[]},{tag:`path`,attr:{d:`M20 12h2`},child:[]},{tag:`path`,attr:{d:`m6.34 17.66-1.41 1.41`},child:[]},{tag:`path`,attr:{d:`m19.07 4.93-1.41 1.41`},child:[]}]})(e)}function Nue(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`rect`,attr:{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`},child:[]}]})(e)}function Pue(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`circle`,attr:{cx:`11`,cy:`11`,r:`8`},child:[]},{tag:`path`,attr:{d:`m21 21-4.3-4.3`},child:[]}]})(e)}function Fue(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`},child:[]},{tag:`path`,attr:{d:`M3 3v5h5`},child:[]}]})(e)}function Iue(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M5 12h14`},child:[]},{tag:`path`,attr:{d:`M12 5v14`},child:[]}]})(e)}function ng(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`polygon`,attr:{points:`6 3 20 12 6 21 6 3`},child:[]}]})(e)}function Lue(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`rect`,attr:{x:`14`,y:`4`,width:`4`,height:`16`,rx:`1`},child:[]},{tag:`rect`,attr:{x:`6`,y:`4`,width:`4`,height:`16`,rx:`1`},child:[]}]})(e)}function Rue(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z`},child:[]}]})(e)}function zue(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`line`,attr:{x1:`4`,x2:`20`,y1:`12`,y2:`12`},child:[]},{tag:`line`,attr:{x1:`4`,x2:`20`,y1:`6`,y2:`6`},child:[]},{tag:`line`,attr:{x1:`4`,x2:`20`,y1:`18`,y2:`18`},child:[]}]})(e)}function Bue(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}
12,child:[{tag:`rect`,attr:{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`},child:[]},{tag:`path`,attr:{d:`m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7`},child:[]}]})(e)}function Vue(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z`},child:[]},{tag:`rect`,attr:{width:`4`,height:`12`,x:`2`,y:`9`},child:[]},{tag:`circle`,attr:{cx:`4`,cy:`4`,r:`2`},child:[]}]})(e)}function rg(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4`},child:[]},{tag:`path`,attr:{d:`M9 18c-4.51 2-5-2-7-2`},child:[]}]})(e)}function ig(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M15 3h6v6`},child:[]},{tag:`path`,attr:{d:`M10 14 21 3`},child:[]},{tag:`path`,attr:{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`},child:[]}]})(e)}function Hue(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`},child:[]},{tag:`polyline`,attr:{points:`7 10 12 15 17 10`},child:[]},{tag:`line`,attr:{x1:`12`,x2:`12`,y1:`15`,y2:`3`},child:[]}]})(e)}function Uue(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`polyline`,attr:{points:`9 10 4 15 9 20`},child:[]},{tag:`path`,attr:{d:`M20 4v7a4 4 0 0 1-4 4H4`},child:[]}]})(e)}function Wue(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`m18 15-6-6-6 6`},child:[]}]})(e)}function Gue(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`m9 18 6-6-6-6`},child:[]}]})(e)}function Kue(e){return eg({tag:`svg`,attr:{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{d:`m12 19-7-7 7-7`},child:[]},{tag:`path`,attr:{d:`M19 12H5`},child:[]}]})(e)}var que=(e,t,n,r,i,a,o,s)=>{let c=document.documentElement,l=[`light`,`dark`];function u(t){(Array.isArray(e)?e:[e]).forEach(e=>{let n=e===`class`,r=n&&a?i.map(e=>a[e]||e):i;n?(c.classList.remove(...r),c.classList.add(a&&a[t]?a[t]:t)):c.setAttribute(e,t)}),d(t)}function d(e){s&&l.includes(e)&&(c.style.colorScheme=e)}function f(){return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}if(r)u(r);else try{let e=localStorage.getItem(t)||n;u(o&&e===`system`?f():e)}catch{}},ag=[`light`,`dark`],og=`(prefers-color-scheme: dark)`,Jue=typeof window>`u`,sg=_.createContext(void 0),Yue={setTheme:e=>{},themes:[]},Xue=()=>_.useContext(sg)??Yue,Zue=e=>_.useContext(sg)?_.createElement(_.Fragment,null,e.children):_.createElement($ue,{...e}),Que=[`light`,`dark`],$ue=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:i=`theme`,themes:a=Que,defaultTheme:o=n?`system`:`light`,attribute:s=`data-theme`,value:c,children:l,nonce:u,scriptProps:d})=>{let[f,p]=_.useState(()=>tde(i,o)),[m,h]=_.useState(()=>f===`system`?cg():f),g=c?Object.values(c):a,v=_.useCallback(e=>{let i=e;if(!i)return;e===`system`&&n&&(i=cg());let a=c?c[i]:i,l=t?nde(u):null,d=document.documentElement,f=e=>{e===`class`?(d.classList.remove(...g),a&&d.classList.add(a)):e.startsWith(`data-`)&&(a?d.setAttribute(e,a):d.removeAttribute(e))};
12if(Array.isArray(s)?s.forEach(f):f(s),r){let e=ag.includes(o)?o:null,t=ag.includes(i)?i:e;d.style.colorScheme=t}l?.()},[u]),y=_.useCallback(e=>{let t=typeof e==`function`?e(f):e;p(t);try{localStorage.setItem(i,t)}catch{}},[f]),b=_.useCallback(t=>{h(cg(t)),f===`system`&&n&&!e&&v(`system`)},[f,e]);_.useEffect(()=>{let e=window.matchMedia(og);return e.addListener(b),b(e),()=>e.removeListener(b)},[b]),_.useEffect(()=>{let e=e=>{e.key===i&&(e.newValue?p(e.newValue):y(o))};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[y]),_.useEffect(()=>{v(e??f)},[e,f]);let x=_.useMemo(()=>({theme:f,setTheme:y,forcedTheme:e,resolvedTheme:f===`system`?m:f,themes:n?[...a,`system`]:a,systemTheme:n?m:void 0}),[f,y,e,m,n,a]);return _.createElement(sg.Provider,{value:x},_.createElement(ede,{forcedTheme:e,storageKey:i,attribute:s,enableSystem:n,enableColorScheme:r,defaultTheme:o,value:c,themes:a,nonce:u,scriptProps:d}),l)},ede=_.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:o,themes:s,nonce:c,scriptProps:l})=>{let u=JSON.stringify([n,t,a,e,s,o,r,i]).slice(1,-1);return _.createElement(`script`,{...l,suppressHydrationWarning:!0,nonce:typeof window>`u`?c:``,dangerouslySetInnerHTML:{__html:`(${que.toString()})(${u})`}})}),tde=(e,t)=>{if(Jue)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},nde=e=>{let t=document.createElement(`style`);return e&&t.setAttribute(`nonce`,e),t.appendChild(document.createTextNode(`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`)),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},cg=e=>(e||=window.matchMedia(og),e.matches?`dark`:`light`);function lg(){let{resolvedTheme:e,setTheme:t}=Xue();return{colorMode:e,setColorMode:t,toggleColorMode:()=>{t(e===`dark`?`light`:`dark`)}}}function ug(e,t){let{colorMode:n}=lg();return n===`dark`?t:e}function rde(){let{colorMode:e}=lg();return e===`dark`?(0,B.jsx)(Rue,{}):(0,B.jsx)(Mue,{})}var ide=_.forwardRef(function(e,t){let{toggleColorMode:n}=lg();return(0,B.jsx)(Bce,{fallback:(0,B.jsx)(Fh,{boxSize:`8`}),children:(0,B.jsx)(mh,{onClick:n,"aria-label":`Toggle color mode`,size:`sm`,ref:t,...e,css:{_icon:{width:`5`,height:`5`}},variant:`subtle`,bgColor:`transparent`,children:(0,B.jsx)(rde,{})})})}),ade=Qp({heading:{value:{fontFamily:`Poppins`}},body:{description:`The body text style - used in paragraphs`,value:{fontFamily:`Poppins`}}}),dg={light:`#2b6cb0`,dark:`#DFD0B8`},fg={light:`#2b6cb0`,dark:`#E8E0D0`},pg={light:`#F0F5F9`,dark:`#3A332B`},mg={blue:{light:`#4269D0`,dark:`#7B9BE8`},orange:{light:`#EFB118`,dark:`#F5C44D`},red:{light:`#FF725C`,dark:`#FF9580`},cyan:{light:`#6CC5B0`,dark:`#8FD8C5`},green:{light:`#3CA951`,dark:`#6BC97D`},pink:{light:`#FF8AB7`,dark:`#FFA8C8`},purple:{light:`#A463F2`,dark:`#BC8AF5`},lightBlue:{light:`#97BBF5`,dark:`#B5CFFB`},brown:{light:`#9C6B4E`,dark:`#B58A72`},teal:{light:`#2CA8A0`,dark:`#6FD3CC`},gray:{light:`#9498A0`,dark:`#B8BCC4`}},ode=Object.fromEntries(Object.entries(mg).map(([e,t])=>[e,{value:{_light:t.light,_dark:t.dark}}])),sde=nm({theme:{textStyles:ade,semanticTokens:{colors:{accent:{value:{_light:dg.light,_dark:dg.dark}},accentSubtle:{value:{_light:fg.light,_dark:fg.dark}},accentBackground:{value:{_light:pg.light,_dark:pg.dark}},chart:ode}}}}),hg=[{to:`/explorations`,label:`Explorations`},{to:`/publications`,label:`Publications`},{to:`/about`,label:`About`}],cde=()=>{let e=nt(),[t,n]=(0,_.useState)(!1),r=ug(dg.light,dg.dark),i=ug(`gray.600`,`gray.400`),a=t=>({textDecoration:`none`,color:e.pathname===t?r:i,fontWeight:e.pathname===t?`600`:`normal`,borderBottom:e.pathname===t?`2px solid ${r}`:`none`,paddingBottom:`2px`}),o=()=>n(!1);return(0,B.jsx)(V,{px:{base:4,md:8},py:2,fontSize:`sm`,children:(0,B.jsxs)(xh,{h:8,alignItems:`center`,justifyContent:`space-between`,children:[(0,B.jsx)(Tn,{to:`/`,style:{textDecoration:`none`,fontWeight:`600`,fontSize:`medium`,color:e.pathname===`/`?r:i},children:`Home`}),(0,B.jsxs)(xh,{gap:{base:4,md:8},alignItems:`center`,children:[(0,B.jsx)(xh,{as:`nav`,gap:{base:4,md:8},alignItems:`center`,display:{base:`none`,md:`flex`},children:hg.map(({to:e,label:t})=>(0,B.jsx)(Tn,{to:e,style:a(e),children:t},e))}),(0,B.jsx)(V,{display:{base:`block`,md:`none`},children:(0,B.jsxs)(cle,{open:t,onOpenChange:e=>n(e.open),placement:`end`,size:`xs`,children:[(0,B.jsx)(lle,{asChild:!0,children:(0,B.jsx)(mh,{"aria-label":`Open menu`,variant:`ghost`,size:`sm`,children:(0,B.jsx)(zue,{})})}),(0,B.jsx)(mle,{}),(0,B.jsx)(ule,{children:(0,B.jsxs)(dle,{children:[(0,B.jsxs)(gle,{children:[(0,B.jsx)(fle,{children:`Menu`}),(0,B.jsx)(ple,{asChild:!0,children:(0,B.jsx)(mh,{"aria-label":`Close menu`,variant:`ghost`,size:`sm`,position:`absolute`,top:4,insetEnd:2,children:(0,B.jsx)(tg,{size:18})})})]}),(0,B.jsx)(hle,{pt:2,children:(0,B.jsx)(Gh,{align:`stretch`,gap:1,children:hg.map(({to:t,label:n})=>(0,B.jsx)(Tn,{to:t,onClick:o,style:{...a(t),borderBottom:`none`,paddingTop:`10px`,paddingBottom:`10px`,borderRadius:`8px`},children:(0,B.jsx)(U,{fontWeight:e.pathname===t?`600`:`normal`,color:e.pathname===t?r:i,children:n})},t))})})]})})]})}),(0,B.jsx)(ide,{})]})]})})},gg=({children:e})=>
12(0,B.jsxs)(xh,{direction:`column`,height:`100dvh`,width:`100%`,children:[(0,B.jsx)(V,{as:`header`,flex:`none`,children:(0,B.jsx)(cde,{})}),(0,B.jsx)(V,{as:`main`,flex:`1`,overflowY:`auto`,children:e}),(0,B.jsx)(V,{as:`footer`,py:4,px:{base:2,md:6},borderTop:`1px solid`,borderColor:`gray.subtle`,children:(0,B.jsxs)(xh,{direction:{base:`column`,md:`row`},justifyContent:`space-between`,alignItems:`center`,gap:2,color:`gray.focusRing`,children:[(0,B.jsxs)(U,{fontSize:`xs`,children:[`© `,new Date().getFullYear(),` Karthik Badam. All rights reserved.`]}),(0,B.jsxs)(xh,{gap:4,fontSize:`xs`,children:[(0,B.jsx)(Eh,{href:`mailto:[email protected]`,children:`Email`}),(0,B.jsx)(Eh,{href:`https://linkedin.com/in/karthikbadam`,target:`_blank`,rel:`noopener noreferrer`,children:`LinkedIn`}),(0,B.jsx)(Eh,{href:`https://github.com/karthikbadam`,target:`_blank`,rel:`noopener noreferrer`,children:`GitHub`})]})]})})]}),lde=o(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),ude=o(((e,t)=>{var n=lde();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),dde=o(((e,t)=>{t.exports=ude()()})),fde=o(((e,t)=>{(function(){var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()})),_g=l(dde()),vg=l(fde()),pde=[`top`,`left`,`transform`,`className`,`children`,`innerRef`];function yg(){return yg=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},yg.apply(this,arguments)}function mde(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function bg(e){var t=e.top,n=t===void 0?0:t,r=e.left,i=r===void 0?0:r,a=e.transform,o=e.className,s=e.children,c=e.innerRef,l=mde(e,pde);return _.createElement(`g`,yg({ref:c,className:(0,vg.default)(`visx-group`,o),transform:a||`translate(`+i+`, `+n+`)`},l),s)}bg.propTypes={top:_g.default.number,left:_g.default.number,transform:_g.default.string,className:_g.default.string,children:_g.default.node,innerRef:_g.default.oneOfType([_g.default.string,_g.default.func,_g.default.object])};function xg(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Sg(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Cg(e){let t,n,r;e.length===2?(t=e===xg||e===Sg?e:hde,n=e,r=e):(t=xg,n=(t,n)=>xg(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function hde(){return 0}function wg(e){return e===null?NaN:+e}function*gde(e,t){if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}var Tg=Cg(xg),Eg=Tg.right;Tg.left,Cg(wg).center;var Dg=Og(jg),_de=Og(vde);function Og(e){return function(t,n,r=n){if(!((n=+n)>=0))throw RangeError(`invalid rx`);if(!((r=+r)>=0))throw RangeError(`invalid ry`);let{data:i,width:a,height:o}=t;if(!((a=Math.floor(a))>=0))throw RangeError(`invalid width`);if(!((o=Math.floor(o===void 0?i.length/a:o))>=0))throw RangeError(`invalid height`);if(!a||!o||!n&&!r)return t;let s=n&&e(n),c=r&&e(r),l=i.slice();return s&&c?(kg(s,l,i,a,o),kg(s,i,l,a,o),kg(s,l,i,a,o),Ag(c,i,l,a,o),Ag(c,l,i,a,o),Ag(c,i,l,a,o)):s?(kg(s,i,l,a,o),kg(s,l,i,a,o),kg(s,i,l,a,o)):c&&(Ag(c,i,l,a,o),Ag(c,l,i,a,o),Ag(c,i,l,a,o)),t}}function kg(e,t,n,r,i){for(let a=0,o=r*i;a<o;)e(t,n,a,a+=r,1)}function Ag(e,t,n,r,i){for(let a=0,o=r*i;a<r;++a)e(t,n,a,a+o,r)}function vde(e){let t=jg(e);return(e,n,r,i,a)=>{r<<=2,i<<=2,a<<=2,t(e,n,r+0,i+0,a),t(e,n,r+1,i+1,a),t(e,n,r+2,i+2,a),t(e,n,r+3,i+3,a)}}function jg(e){let t=Math.floor(e);if(t===e)return yde(e);let n=e-t,r=2*e+1;return(e,i,a,o,s)=>{if(!((o-=s)>=a))return;let c=t*i[a],l=s*t,u=l+s;
12for(let e=a,t=a+l;e<t;e+=s)c+=i[Math.min(o,e)];for(let t=a,d=o;t<=d;t+=s)c+=i[Math.min(o,t+l)],e[t]=(c+n*(i[Math.max(a,t-u)]+i[Math.min(o,t+u)]))/r,c-=i[Math.max(a,t-l)]}}function yde(e){let t=2*e+1;return(n,r,i,a,o)=>{if(!((a-=o)>=i))return;let s=e*r[i],c=o*e;for(let e=i,t=i+c;e<t;e+=o)s+=r[Math.min(a,e)];for(let e=i,l=a;e<=l;e+=o)s+=r[Math.min(a,e+c)],n[e]=s/t,s-=r[Math.max(i,e-c)]}}function Mg(e,t){let n=0;if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&++n;else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(i=+i)>=i&&++n}return n}function bde(e){return e.length|0}function xde(e){return!(e>0)}function Sde(e){return typeof e!=`object`||`length`in e?e:Array.from(e)}function Cde(e){return t=>e(...t)}function wde(...e){let t=typeof e[e.length-1]==`function`&&Cde(e.pop());e=e.map(Sde);let n=e.map(bde),r=e.length-1,i=Array(r+1).fill(0),a=[];if(r<0||n.some(xde))return a;for(;;){a.push(i.map((t,n)=>e[n][t]));let o=r;for(;++i[o]===n[o];){if(o===0)return t?a.map(t):a;i[o--]=0}}}function Tde(e,t){var n=0,r=0;return Float64Array.from(e,t===void 0?e=>n+=+e||0:i=>n+=+t(i,r++,e)||0)}function Ng(e,t){let n=0,r,i=0,a=0;if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(r=t-i,i+=r/++n,a+=r*(t-i));else{let o=-1;for(let s of e)(s=t(s,++o,e))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,a+=r*(s-i))}if(n>1)return a/(n-1)}function Pg(e,t){let n=Ng(e,t);return n&&Math.sqrt(n)}function Fg(e,t){let n,r;if(t===void 0)for(let t of e)t!=null&&(n===void 0?t>=t&&(n=r=t):(n>t&&(n=t),r<t&&(r=t)));else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(n===void 0?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}var Ig=class{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){let t=this._partials,n=0;for(let r=0;r<this._n&&r<32;r++){let i=t[r],a=e+i,o=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);o&&(t[n++]=o),e=a}return t[n]=e,this._n=n+1,this}valueOf(){let e=this._partials,t=this._n,n,r,i,a=0;if(t>0){for(a=e[--t];t>0&&(n=a,r=e[--t],a=n+r,i=r-(a-n),!i););t>0&&(i<0&&e[t-1]<0||i>0&&e[t-1]>0)&&(r=i*2,n=a+r,r==n-a&&(a=n))}return a}},Lg=class extends Map{constructor(e,t=Ode){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(zg(this,e))}has(e){return super.has(zg(this,e))}set(e,t){return super.set(Ede(this,e),t)}delete(e){return super.delete(Dde(this,e))}},Rg=class extends Set{constructor(e,t=Ode){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let t of e)this.add(t)}has(e){return super.has(zg(this,e))}add(e){return super.add(Ede(this,e))}delete(e){return super.delete(Dde(this,e))}};function zg({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function Ede({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Dde({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Ode(e){return typeof e==`object`&&e?e.valueOf():e}function Bg(e){return e}function Vg(e,...t){return Ug(e,Bg,Bg,t)}
12function Hg(e,t,...n){return Ug(e,Bg,t,n)}function kde(e,t,...n){return Ug(e,Array.from,t,n)}function Ug(e,t,n,r){return(function e(i,a){if(a>=r.length)return n(i);let o=new Lg,s=r[a++],c=-1;for(let e of i){let t=s(e,++c,i),n=o.get(t);n?n.push(e):o.set(t,[e])}for(let[t,n]of o)o.set(t,e(n,a));return t(o)})(e,0)}function Ade(e,t){return Array.from(t,t=>e[t])}function Wg(e,...t){if(typeof e[Symbol.iterator]!=`function`)throw TypeError(`values is not iterable`);e=Array.from(e);let[n]=t;if(n&&n.length!==2||t.length>1){let r=Uint32Array.from(e,(e,t)=>t);return t.length>1?(t=t.map(t=>e.map(t)),r.sort((e,n)=>{for(let r of t){let t=Kg(r[e],r[n]);if(t)return t}})):(n=e.map(n),r.sort((e,t)=>Kg(n[e],n[t]))),Ade(e,r)}return e.sort(Gg(n))}function Gg(e=xg){if(e===xg)return Kg;if(typeof e!=`function`)throw TypeError(`compare is not a function`);return(t,n)=>{let r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Kg(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:+(e>t))}function qg(e,t,n){return(t.length===2?Wg(Vg(e,n),(([e,n],[r,i])=>t(n,i)||xg(e,r))):Wg(Hg(e,t,n),(([e,t],[n,r])=>xg(t,r)||xg(e,n)))).map(([e])=>e)}var Jg=Math.sqrt(50),Yg=Math.sqrt(10),Xg=Math.sqrt(2);function Zg(e,t,n){var r,i=-1,a,o,s;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t<e)&&(a=e,e=t,t=a),(s=Qg(e,t,n))===0||!isFinite(s))return[];if(s>0){let n=Math.round(e/s),r=Math.round(t/s);for(n*s<e&&++n,r*s>t&&--r,o=Array(a=r-n+1);++i<a;)o[i]=(n+i)*s}else{s=-s;let n=Math.round(e*s),r=Math.round(t*s);for(n/s<e&&++n,r/s>t&&--r,o=Array(a=r-n+1);++i<a;)o[i]=(n+i)/s}return r&&o.reverse(),o}function Qg(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/10**i;return i>=0?(a>=Jg?10:a>=Yg?5:a>=Xg?2:1)*10**i:-(10**-i)/(a>=Jg?10:a>=Yg?5:a>=Xg?2:1)}function $g(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=10**Math.floor(Math.log(r)/Math.LN10),a=r/i;return a>=Jg?i*=10:a>=Yg?i*=5:a>=Xg&&(i*=2),t<e?-i:i}function e_(e,t,n){let r;for(;;){let i=Qg(e,t,n);if(i===r||i===0||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}function t_(e){return Math.ceil(Math.log(Mg(e))/Math.LN2)+1}function n_(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function jde(e,t){let n,r=-1,i=-1;if(t===void 0)for(let t of e)++i,t!=null&&(n<t||n===void 0&&t>=t)&&(n=t,r=i);else for(let a of e)(a=t(a,++i,e))!=null&&(n<a||n===void 0&&a>=a)&&(n=a,r=i);return r}function r_(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Mde(e,t){let n,r=-1,i=-1;if(t===void 0)for(let t of e)++i,t!=null&&(n>t||n===void 0&&t>=t)&&(n=t,r=i);else for(let a of e)(a=t(a,++i,e))!=null&&(n>a||n===void 0&&a>=a)&&(n=a,r=i);return r}function i_(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?Kg:Gg(i);r>n;){if(r-n>600){let a=r-n+1,o=t-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1),u=Math.max(n,Math.floor(t-o*c/a+l)),d=Math.min(r,Math.floor(t+(a-o)*c/a+l));i_(e,t,u,d,i)}let a=e[t],o=n,s=r;for(a_(e,n,t),i(e[r],a)>0&&a_(e,n,r);o<s;){for(a_(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?a_(e,n,s):(++s,a_(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function a_(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function o_(e,t=xg){let n,r=!1;if(t.length===1){let i;for(let a of e){let e=t(a);(r?xg(e,i)>0:xg(e,e)===0)&&(n=a,i=e,r=!0)}}else for(let i of e)(r?t(i,n)>0:t(i,i)===0)&&(n=i,r=!0);return n}function s_(e,t,n){if(e=Float64Array.from(gde(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return r_(e);if(t>=1)return n_(e);var r,i=(r-1)*t,a=Math.floor(i),o=n_(i_(e,a).subarray(0,a+1));return o+(r_(e.subarray(a+1))-o)*(i-a)}}function Nde(e,t,n=wg){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function Pde(e,t,n){return Math.ceil((n-t)/(2*(s_(e,.75)-s_(e,.25))*Mg(e)**(-1/3)))}
12function c_(e,t,n){return Math.ceil((n-t)*Math.cbrt(Mg(e))/(3.49*Pg(e)))}function l_(e,t){let n=0,r=0;if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(++n,r+=t);else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n}function u_(e,t){return s_(e,.5,t)}function*Fde(e){for(let t of e)yield*t}function d_(e){return Array.from(Fde(e))}function f_(e,t){let n=new Lg;if(t===void 0)for(let t of e)t!=null&&t>=t&&n.set(t,(n.get(t)||0)+1);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&i>=i&&n.set(i,(n.get(i)||0)+1)}let r,i=0;for(let[e,t]of n)t>i&&(i=t,r=e);return r}function Ide(e,t=Lde){let n=[],r,i=!1;for(let a of e)i&&n.push(t(r,a)),r=a,i=!0;return n}function Lde(e,t){return[e,t]}function p_(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function m_(e,t=xg){if(typeof e[Symbol.iterator]!=`function`)throw TypeError(`values is not iterable`);let n=Array.from(e),r=new Float64Array(n.length);t.length!==2&&(n=n.map(t),t=xg);let i=(e,r)=>t(n[e],n[r]),a,o;return Uint32Array.from(n,(e,t)=>t).sort(t===xg?(e,t)=>Kg(n[e],n[t]):Gg(i)).forEach((e,t)=>{let n=i(e,a===void 0?e:a);n>=0?((a===void 0||n>0)&&(a=e,o=t),r[e]=o):r[e]=NaN}),r}function Rde(e,t=xg){let n,r=!1;if(t.length===1){let i;for(let a of e){let e=t(a);(r?xg(e,i)<0:xg(e,e)===0)&&(n=a,i=e,r=!0)}}else for(let i of e)(r?t(i,n)<0:t(i,i)===0)&&(n=i,r=!0);return n}function h_(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function g_(e){if(typeof e[Symbol.iterator]!=`function`)throw TypeError(`values is not iterable`);return Array.from(e).reverse()}function __(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function v_(e,t){switch(arguments.length){case 0:break;case 1:typeof e==`function`?this.interpolator(e):this.range(e);break;default:this.domain(e),typeof t==`function`?this.interpolator(t):this.range(t);break}return this}var y_=Symbol(`implicit`);function b_(){var e=new Lg,t=[],n=[],r=y_;function i(i){let a=e.get(i);if(a===void 0){if(r!==y_)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new Lg;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return b_(t,n).unknown(r)},__.apply(i,arguments),i}function x_(){var e=b_().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=p_(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()}
12,e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return x_(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},__.apply(d(),arguments)}function S_(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return S_(t())},e}function zde(){return S_(x_.apply(null,arguments).paddingInner(1))}function C_(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function w_(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function T_(){}var E_=.7,D_=1/E_,O_=`\\s*([+-]?\\d+)\\s*`,k_=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,A_=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Bde=/^#([0-9a-f]{3,8})$/,Vde=RegExp(`^rgb\\(${O_},${O_},${O_}\\)$`),Hde=RegExp(`^rgb\\(${A_},${A_},${A_}\\)$`),Ude=RegExp(`^rgba\\(${O_},${O_},${O_},${k_}\\)$`),Wde=RegExp(`^rgba\\(${A_},${A_},${A_},${k_}\\)$`),Gde=RegExp(`^hsl\\(${k_},${A_},${A_}\\)$`),Kde=RegExp(`^hsla\\(${k_},${A_},${A_},${k_}\\)$`),j_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};C_(T_,P_,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:M_,formatHex:M_,formatHex8:qde,formatHsl:Jde,formatRgb:N_,toString:N_});function M_(){return this.rgb().formatHex()}function qde(){return this.rgb().formatHex8()}function Jde(){return K_(this).formatHsl()}function N_(){return this.rgb().formatRgb()}function P_(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Bde.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?F_(t):n===3?new z_(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?I_(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?I_(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Vde.exec(e))?new z_(t[1],t[2],t[3],1):(t=Hde.exec(e))?new z_(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ude.exec(e))?I_(t[1],t[2],t[3],t[4]):(t=Wde.exec(e))?I_(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Gde.exec(e))?G_
12(t[1],t[2]/100,t[3]/100,1):(t=Kde.exec(e))?G_(t[1],t[2]/100,t[3]/100,t[4]):j_.hasOwnProperty(e)?F_(j_[e]):e===`transparent`?new z_(NaN,NaN,NaN,0):null}function F_(e){return new z_(e>>16&255,e>>8&255,e&255,1)}function I_(e,t,n,r){return r<=0&&(e=t=n=NaN),new z_(e,t,n,r)}function L_(e){return e instanceof T_||(e=P_(e)),e?(e=e.rgb(),new z_(e.r,e.g,e.b,e.opacity)):new z_}function R_(e,t,n,r){return arguments.length===1?L_(e):new z_(e,t,n,r??1)}function z_(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}C_(z_,R_,w_(T_,{brighter(e){return e=e==null?D_:D_**+e,new z_(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?E_:E_**+e,new z_(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new z_(U_(this.r),U_(this.g),U_(this.b),H_(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:B_,formatHex:B_,formatHex8:Yde,formatRgb:V_,toString:V_}));function B_(){return`#${W_(this.r)}${W_(this.g)}${W_(this.b)}`}function Yde(){return`#${W_(this.r)}${W_(this.g)}${W_(this.b)}${W_((isNaN(this.opacity)?1:this.opacity)*255)}`}function V_(){let e=H_(this.opacity);return`${e===1?`rgb(`:`rgba(`}${U_(this.r)}, ${U_(this.g)}, ${U_(this.b)}${e===1?`)`:`, ${e})`}`}function H_(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function U_(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function W_(e){return e=U_(e),(e<16?`0`:``)+e.toString(16)}function G_(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new J_(e,t,n,r)}function K_(e){if(e instanceof J_)return new J_(e.h,e.s,e.l,e.opacity);if(e instanceof T_||(e=P_(e)),!e)return new J_;if(e instanceof J_)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new J_(o,s,c,e.opacity)}function q_(e,t,n,r){return arguments.length===1?K_(e):new J_(e,t,n,r??1)}function J_(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}C_(J_,q_,w_(T_,{brighter(e){return e=e==null?D_:D_**+e,new J_(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?E_:E_**+e,new J_(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new z_(Z_(e>=240?e-240:e+120,i,r),Z_(e,i,r),Z_(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new J_(Y_(this.h),X_(this.s),X_(this.l),H_(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=H_(this.opacity);return`${e===1?`hsl(`:`hsla(`}${Y_(this.h)}, ${X_(this.s)*100}%, ${X_(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function Y_(e){return e=(e||0)%360,e<0?e+360:e}function X_(e){return Math.max(0,Math.min(1,e||0))}function Z_(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Q_=Math.PI/180,$_=180/Math.PI,ev=18,tv=.96422,nv=1,rv=.82521,iv=4/29,av=6/29,ov=3*av*av,Xde=av*av*av;function sv(e){if(e instanceof lv)return new lv(e.l,e.a,e.b,e.opacity);if(e instanceof hv)return gv(e);e instanceof z_||(e=L_(e));var t=pv(e.r),n=pv(e.g),r=pv(e.b),i=uv((.2225045*t+.7168786*n+.0606169*r)/nv),a,o;return t===n&&n===r?a=o=i:(a=uv((.4360747*t+.3850649*n+.1430804*r)/tv),o=uv((.0139322*t+.0971045*n+.7141733*r)/rv)),new lv(116*i-16,500*(a-i),200*(i-o),e.opacity)}function cv(e,t,n,r){return arguments.length===1?sv(e):new lv(e,t,n,r??1)}function lv(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}C_(lv,cv,w_(T_,{brighter(e){return new lv(this.l+ev*(e??1),this.a,this.b,this.opacity)},darker(e){return new lv(this.l-ev*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=tv*dv(t),e=nv*dv(e),n=rv*dv(n),new z_(fv(3.1338561*t-1.6168667*e-.4906146*n),fv(-.9787684*t+1.9161415*e+.033454*n),fv(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function uv(e){return e>Xde?e**(1/3):e/ov+iv}function dv(e){return e>av?e*e*e:ov*(e-iv)}function fv(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}function pv(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function Zde(e){if(e instanceof hv)return new hv(e.h,e.c,e.l,e.opacity);if(e instanceof lv||(e=sv(e)),e.a===0&&e.b===0)return new hv(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*$_;return new hv(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function mv(e,t,n,r){return arguments.length===1?Zde(e):new hv(e,t,n,r??1)}function hv(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}
12function gv(e){if(isNaN(e.h))return new lv(e.l,0,0,e.opacity);var t=e.h*Q_;return new lv(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}C_(hv,mv,w_(T_,{brighter(e){return new hv(this.h,this.c,this.l+ev*(e??1),this.opacity)},darker(e){return new hv(this.h,this.c,this.l-ev*(e??1),this.opacity)},rgb(){return gv(this).rgb()}}));var _v=-.14861,vv=1.78277,yv=-.29227,bv=-.90649,xv=1.97294,Sv=xv*bv,Cv=xv*vv,wv=vv*yv-bv*_v;function Qde(e){if(e instanceof Ev)return new Ev(e.h,e.s,e.l,e.opacity);e instanceof z_||(e=L_(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(wv*r+Sv*t-Cv*n)/(wv+Sv-Cv),a=r-i,o=(xv*(n-i)-yv*a)/bv,s=Math.sqrt(o*o+a*a)/(xv*i*(1-i)),c=s?Math.atan2(o,a)*$_-120:NaN;return new Ev(c<0?c+360:c,s,i,e.opacity)}function Tv(e,t,n,r){return arguments.length===1?Qde(e):new Ev(e,t,n,r??1)}function Ev(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}C_(Ev,Tv,w_(T_,{brighter(e){return e=e==null?D_:D_**+e,new Ev(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?E_:E_**+e,new Ev(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*Q_,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new z_(255*(t+n*(_v*r+vv*i)),255*(t+n*(yv*r+bv*i)),255*(t+xv*r*n),this.opacity)}}));function $de(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function efe(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return $de((n-r/t)*t,o,i,a,s)}}var Dv=e=>()=>e;function Ov(e,t){return function(n){return e+n*t}}function tfe(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function kv(e,t){var n=t-e;return n?Ov(e,n>180||n<-180?n-360*Math.round(n/360):n):Dv(isNaN(e)?t:e)}function nfe(e){return(e=+e)==1?Av:function(t,n){return n-t?tfe(t,n,e):Dv(isNaN(t)?n:t)}}function Av(e,t){var n=t-e;return n?Ov(e,n):Dv(isNaN(e)?t:e)}var jv=(function e(t){var n=nfe(t);function r(e,t){var r=n((e=R_(e)).r,(t=R_(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Av(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function rfe(e){return function(t){var n=t.length,r=Array(n),i=Array(n),a=Array(n),o,s;for(o=0;o<n;++o)s=R_(t[o]),r[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return r=e(r),i=e(i),a=e(a),s.opacity=1,function(e){return s.r=r(e),s.g=i(e),s.b=a(e),s+``}}}var ife=rfe(efe);function afe(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function ofe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function sfe(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=Iv(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function cfe(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Mv(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function lfe(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=Iv(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var Nv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Pv=new RegExp(Nv.source,`g`);function ufe(e){return function(){return e}}function dfe(e){return function(t){return e(t)+``}}function Fv(e,t){var n=Nv.lastIndex=Pv.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=Nv.exec(e))&&(i=Pv.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Mv(r,i)})),n=Pv.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?dfe(c[0].x):ufe(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function Iv(e,t){var n=typeof t,r;return t==null||n===`boolean`?Dv(t):(n===`number`?Mv:n===`string`?(r=P_(t))?(t=r,jv):Fv:t instanceof P_?jv:t instanceof Date?cfe:ofe(t)?afe:Array.isArray(t)?sfe:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?lfe:Mv)(e,t)}function Lv(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Rv=180/Math.PI,zv={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Bv(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Rv,skewX:Math.atan(c)*Rv,scaleX:o,scaleY:s}}var Vv;function ffe(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?zv:Bv(t.a,t.b,t.c,t.d,t.e,t.f)}function pfe(e){return e==null||(Vv||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Vv.setAttribute(`transform`,e),!(e=Vv.transform.baseVal.consolidate()))?zv:(e=e.matrix,Bv(e.a,e.b,e.c,e.d,e.e,e.f))}function Hv(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}
12function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:Mv(e,i)},{i:c-2,x:Mv(r,a)})}else (i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:Mv(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:Mv(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:Mv(e,n)},{i:s-2,x:Mv(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var mfe=Hv(ffe,`px, `,`px)`,`deg)`),hfe=Hv(pfe,`, `,`)`,`)`);function Uv(e){return function(t,n){var r=e((t=q_(t)).h,(n=q_(n)).h),i=Av(t.s,n.s),a=Av(t.l,n.l),o=Av(t.opacity,n.opacity);return function(e){return t.h=r(e),t.s=i(e),t.l=a(e),t.opacity=o(e),t+``}}}var Wv=Uv(kv),gfe=Uv(Av);function Gv(e,t){var n=Av((e=cv(e)).l,(t=cv(t)).l),r=Av(e.a,t.a),i=Av(e.b,t.b),a=Av(e.opacity,t.opacity);return function(t){return e.l=n(t),e.a=r(t),e.b=i(t),e.opacity=a(t),e+``}}function Kv(e){return function(t,n){var r=e((t=mv(t)).h,(n=mv(n)).h),i=Av(t.c,n.c),a=Av(t.l,n.l),o=Av(t.opacity,n.opacity);return function(e){return t.h=r(e),t.c=i(e),t.l=a(e),t.opacity=o(e),t+``}}}var qv=Kv(kv),_fe=Kv(Av);function Jv(e){return(function t(n){n=+n;function r(t,r){var i=e((t=Tv(t)).h,(r=Tv(r)).h),a=Av(t.s,r.s),o=Av(t.l,r.l),s=Av(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=a(e),t.l=o(e**+n),t.opacity=s(e),t+``}}return r.gamma=t,r})(1)}var vfe=Jv(kv),Yv=Jv(Av);function Xv(e,t){t===void 0&&(t=e,e=Iv);for(var n=0,r=t.length-1,i=t[0],a=Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}function Zv(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}function yfe(e){return function(){return e}}function Qv(e){return+e}var $v=[0,1];function ey(e){return e}function ty(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:yfe(isNaN(t)?NaN:.5)}function bfe(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function xfe(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=ty(i,r),a=n(o,a)):(r=ty(r,i),a=n(a,o)),function(e){return a(r(e))}}function Sfe(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=ty(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=Eg(e,t,1,r)-1;return a[n](i[n](t))}}function ny(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ry(){var e=$v,t=$v,n=Iv,r,i,a,o=ey,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==ey&&(o=bfe(e[0],e[n-1])),s=n>2?Sfe:xfe,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),Mv))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,Qv),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=Lv,u()},d.clamp=function(e){return arguments.length?(o=e?!0:ey,u()):o!==ey},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function iy(){return ry()(ey,ey)}function Cfe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function ay(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function oy(e){return e=ay(Math.abs(e)),e?e[1]:NaN}function wfe(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function Tfe(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var Efe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function sy(e){if(!(t=Efe.exec(e)))throw Error(`invalid format: `+e);var t;return new cy({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}sy.prototype=cy.prototype;function cy(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}cy.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function Dfe(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var ly;function Ofe(e,t){var n=ay(e,t);if(!n)return e+``;var r=n[0],i=n[1],a=i-(ly=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+ay(e,Math.max(0,t+a-1))[0]}function uy(e,t){var n=ay(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var dy={"%":(e,t)=>
12(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:Cfe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>uy(e*100,t),r:uy,s:Ofe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function fy(e){return e}var py=Array.prototype.map,my=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function kfe(e){var t=e.grouping===void 0||e.thousands===void 0?fy:wfe(py.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?fy:Tfe(py.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`â`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e){e=sy(e);var l=e.fill,u=e.align,d=e.sign,f=e.symbol,p=e.zero,m=e.width,h=e.comma,g=e.precision,_=e.trim,v=e.type;v===`n`?(h=!0,v=`g`):dy[v]||(g===void 0&&(g=12),_=!0,v=`g`),(p||l===`0`&&u===`=`)&&(p=!0,l=`0`,u=`=`);var y=f===`$`?n:f===`#`&&/[boxX]/.test(v)?`0`+v.toLowerCase():``,b=f===`$`?r:/[%p]/.test(v)?o:``,x=dy[v],S=/[defgprs%]/.test(v);g=g===void 0?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function C(e){var n=y,r=b,o,f,C;if(v===`c`)r=x(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),g),_&&(e=Dfe(e)),w&&+e==0&&d!==`+`&&(w=!1),n=(w?d===`(`?d:s:d===`-`||d===`(`?``:d)+n,r=(v===`s`?my[8+ly/3]:``)+r+(w&&d===`(`?`)`:``),S){for(o=-1,f=e.length;++o<f;)if(C=e.charCodeAt(o),48>C||C>57){r=(C===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}h&&!p&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<m?Array(m-T+1).join(l):``;switch(h&&p&&(e=t(E+e,E.length?m-r.length:1/0),E=``),u){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r;break}return a(e)}return C.toString=function(){return e+``},C}function u(e,t){var n=l((e=sy(e),e.type=`f`,e)),r=Math.max(-8,Math.min(8,Math.floor(oy(t)/3)))*3,i=10**-r,a=my[8+r/3];return function(e){return n(i*e)+a}}return{format:l,formatPrefix:u}}var hy,gy,_y;Afe({thousands:`,`,grouping:[3],currency:[`$`,``]});function Afe(e){return hy=kfe(e),gy=hy.format,_y=hy.formatPrefix,hy}function jfe(e){return Math.max(0,-oy(Math.abs(e)))}function Mfe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(oy(t)/3)))*3-oy(Math.abs(e)))}function Nfe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,oy(t)-oy(e))+1}function Pfe(e,t,n,r){var i=$g(e,t,n),a;switch(r=sy(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Mfe(i,o))&&(r.precision=a),_y(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=Nfe(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=jfe(i))&&(r.precision=a-(r.type===`%`)*2);break}return gy(r)}function vy(e){var t=e.domain;return e.ticks=function(e){var n=t();return Zg(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return Pfe(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=Qg(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function yy(){var e=iy();return e.copy=function(){return ny(e,yy())},__.apply(e,arguments),vy(e)}function by(e){var t;function n(e){return e==null||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,Qv),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return by(e).unknown(t)},e=arguments.length?Array.from(e,Qv):[0,1],vy(n)}function xy(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function Sy(e){return Math.log(e)}function Cy(e){return Math.exp(e)}function Ffe(e){return-Math.log(-e)}function Ife(e){return-Math.exp(-e)}function Lfe(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function Rfe(e){return e===10?Lfe:e===Math.E?Math.exp:t=>e**+t}function zfe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function wy(e){return(t,n)=>-e(-t,n)}function Bfe(e){let t=e(Sy,Cy),n=t.domain,r=10,i,a;function o(){return i=zfe(r),a=Rfe(r),n()[0]<0?(i=wy(i),a=wy(a),e(Ffe,Ife)):e(Sy,Cy),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=Zg(o,s,p))}else m=Zg(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=sy(n)).precision==null&&(n.trim=!0),n=gy(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(xy(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function Vfe(){let e=Bfe(ry()).domain([1,10]);return e.copy=()=>ny(e,Vfe()).base(e.base()),__.apply(e,arguments),e}
12function Hfe(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Ufe(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Wfe(e){var t=1,n=e(Hfe(t),Ufe(t));return n.constant=function(n){return arguments.length?e(Hfe(t=+n),Ufe(t)):t},vy(n)}function Gfe(){var e=Wfe(ry());return e.copy=function(){return ny(e,Gfe()).constant(e.constant())},__.apply(e,arguments)}function Kfe(e){return function(t){return t<0?-((-t)**+e):t**+e}}function qfe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Jfe(e){return e<0?-e*e:e*e}function Yfe(e){var t=e(ey,ey),n=1;function r(){return n===1?e(ey,ey):n===.5?e(qfe,Jfe):e(Kfe(n),Kfe(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},vy(t)}function Xfe(){var e=Yfe(ry());return e.copy=function(){return ny(e,Xfe()).exponent(e.exponent())},__.apply(e,arguments),e}function Zfe(){var e=[],t=[],n=[],r;function i(){var r=0,i=Math.max(1,t.length);for(n=Array(i-1);++r<i;)n[r-1]=Nde(e,r/i);return a}function a(e){return e==null||isNaN(e=+e)?r:t[Eg(n,e)]}return a.invertExtent=function(r){var i=t.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:e[0],i<n.length?n[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(xg),i()},a.range=function(e){return arguments.length?(t=Array.from(e),i()):t.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return Zfe().domain(e).range(t).unknown(r)},__.apply(a,arguments)}function Qfe(){var e=[.5],t=[0,1],n,r=1;function i(i){return i!=null&&i<=i?t[Eg(e,i,0,r)]:n}return i.domain=function(n){return arguments.length?(e=Array.from(n),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(n){return arguments.length?(t=Array.from(n),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(n){var r=t.indexOf(n);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return Qfe().domain(e).range(t).unknown(n)},__.apply(i,arguments)}var Ty=new Date,Ey=new Date;function Dy(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>Dy(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Ty.setTime(+t),Ey.setTime(+r),e(Ty),e(Ey),Math.floor(n(Ty,Ey))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var Oy=Dy(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Oy.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Dy(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Oy),Oy.range;var ky=1e3,Ay=ky*60,jy=Ay*60,My=jy*24,Ny=My*7,$fe=My*30,Py=My*365,Fy=Dy(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ky)},(e,t)=>(t-e)/ky,e=>e.getUTCSeconds());Fy.range;var Iy=Dy(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ky)},(e,t)=>{e.setTime(+e+t*Ay)},(e,t)=>(t-e)/Ay,e=>e.getMinutes());Iy.range;var Ly=Dy(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ay)},(e,t)=>(t-e)/Ay,e=>e.getUTCMinutes());Ly.range;var Ry=Dy(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ky-e.getMinutes()*Ay)},(e,t)=>{e.setTime(+e+t*jy)},(e,t)=>(t-e)/jy,e=>e.getHours());Ry.range;var zy=Dy(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*jy)},(e,t)=>(t-e)/jy,e=>e.getUTCHours());zy.range;var By=Dy(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ay)/My,e=>e.getDate()-1);By.range;var Vy=Dy(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/My,e=>e.getUTCDate()-1);Vy.range;var Hy=Dy(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/My,e=>Math.floor(e/My));Hy.range;function Uy(e){return Dy(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ay)/Ny)}var Wy=Uy(0),Gy=Uy(1),epe=Uy(2),tpe=Uy(3),Ky=Uy(4),npe=Uy(5),rpe=Uy(6);Wy.range,Gy.range,epe.range,tpe.range,Ky.range,npe.range,rpe.range;function qy(e){return Dy(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Ny)}var Jy=qy(0),Yy=qy(1),ipe=qy(2),ape=qy(3),Xy=qy(4),ope=qy(5),spe=qy(6);Jy.range,Yy.range,ipe.range,ape.range,Xy.range,ope.range,spe.range;var Zy=Dy(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Zy.range;var Qy=Dy(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Qy.range;var $y=Dy(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());$y.every=e=>
vendor: 4,303 bytes, line 12
12!isFinite(e=Math.floor(e))||!(e>0)?null:Dy(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),$y.range;var eb=Dy(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());eb.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Dy(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),eb.range;function cpe(e,t,n,r,i,a){let o=[[Fy,1,ky],[Fy,5,5*ky],[Fy,15,15*ky],[Fy,30,30*ky],[a,1,Ay],[a,5,5*Ay],[a,15,15*Ay],[a,30,30*Ay],[i,1,jy],[i,3,3*jy],[i,6,6*jy],[i,12,12*jy],[r,1,My],[r,2,2*My],[n,1,Ny],[t,1,$fe],[t,3,3*$fe],[e,1,Py]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=Cg(([,,e])=>e).right(o,i);if(a===o.length)return e.every($g(t/Py,n/Py,r));if(a===0)return Oy.every(Math.max($g(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[lpe,upe]=cpe(eb,Qy,Jy,Hy,zy,Ly),[dpe,fpe]=cpe($y,Zy,Wy,By,Ry,Iy);function tb(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function nb(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function rb(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function ppe(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=ob(i),u=sb(i),d=ob(a),f=sb(a),p=ob(o),m=sb(o),h=ob(s),g=sb(s),_=ob(c),v=sb(c),y={a:N,A:P,b:F,B:ee,c:null,d:Rpe,e:Rpe,f:Upe,g:eme,G:nme,H:zpe,I:Bpe,j:Vpe,L:Hpe,m:Wpe,M:Gpe,p:te,q:ne,Q:Tme,s:Eme,S:Kpe,u:qpe,U:Jpe,V:Xpe,w:Zpe,W:Qpe,x:null,X:null,y:$pe,Y:tme,Z:rme,"%":wme},b={a:I,A:re,b:ie,B:ae,c:null,d:ime,e:ime,f:lme,g:bme,G:Sme,H:ame,I:ome,j:sme,L:cme,m:ume,M:dme,p:oe,q:se,Q:Tme,s:Eme,S:fme,u:pme,U:mme,V:gme,w:_me,W:vme,x:null,X:null,y:yme,Y:xme,Z:Cme,"%":wme},x={a:E,A:D,b:O,B:k,c:A,d:Ope,e:Ope,f:Ppe,g:wpe,G:Cpe,H:Ape,I:Ape,j:kpe,L:Npe,m:Dpe,M:jpe,p:T,q:Epe,Q:Ipe,s:Lpe,S:Mpe,u:ype,U:bpe,V:xpe,w:vpe,W:Spe,x:j,X:M,y:wpe,Y:Cpe,Z:Tpe,"%":Fpe};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=mpe[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=rb(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=nb(rb(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?Yy.ceil(a):Yy(a),a=Vy.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=tb(rb(r.y,0,1)),o=a.getDay(),a=o>4||o===0?Gy.ceil(a):Gy(a),a=By.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else (`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?nb(rb(r.y,0,1)).getUTCDay():tb(rb(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,nb(r)):tb(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in mpe?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}
12function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function F(e){return c[e.getMonth()]}function ee(e){return s[e.getMonth()]}function te(e){return i[+(e.getHours()>=12)]}function ne(e){return 1+~~(e.getMonth()/3)}function I(e){return o[e.getUTCDay()]}function re(e){return a[e.getUTCDay()]}function ie(e){return c[e.getUTCMonth()]}function ae(e){return s[e.getUTCMonth()]}function oe(e){return i[+(e.getUTCHours()>=12)]}function se(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var mpe={"-":``,_:` `,0:`0`},ib=/^\s*\d+/,hpe=/^%/,gpe=/[\\^$*+?|[\]().{}]/g;function ab(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function _pe(e){return e.replace(gpe,`\\$&`)}function ob(e){return RegExp(`^(?:`+e.map(_pe).join(`|`)+`)`,`i`)}function sb(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function vpe(e,t,n){var r=ib.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ype(e,t,n){var r=ib.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function bpe(e,t,n){var r=ib.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function xpe(e,t,n){var r=ib.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Spe(e,t,n){var r=ib.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Cpe(e,t,n){var r=ib.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function wpe(e,t,n){var r=ib.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Tpe(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function Epe(e,t,n){var r=ib.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Dpe(e,t,n){var r=ib.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Ope(e,t,n){var r=ib.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function kpe(e,t,n){var r=ib.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Ape(e,t,n){var r=ib.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function jpe(e,t,n){var r=ib.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Mpe(e,t,n){var r=ib.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Npe(e,t,n){var r=ib.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ppe(e,t,n){var r=ib.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Fpe(e,t,n){var r=hpe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ipe(e,t,n){var r=ib.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Lpe(e,t,n){var r=ib.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Rpe(e,t){return ab(e.getDate(),t,2)}function zpe(e,t){return ab(e.getHours(),t,2)}function Bpe(e,t){return ab(e.getHours()%12||12,t,2)}function Vpe(e,t){return ab(1+By.count($y(e),e),t,3)}function Hpe(e,t){return ab(e.getMilliseconds(),t,3)}function Upe(e,t){return Hpe(e,t)+`000`}function Wpe(e,t){return ab(e.getMonth()+1,t,2)}function Gpe(e,t){return ab(e.getMinutes(),t,2)}function Kpe(e,t){return ab(e.getSeconds(),t,2)}function qpe(e){var t=e.getDay();return t===0?7:t}function Jpe(e,t){return ab(Wy.count($y(e)-1,e),t,2)}function Ype(e){var t=e.getDay();return t>=4||t===0?Ky(e):Ky.ceil(e)}function Xpe(e,t){return e=Ype(e),ab(Ky.count($y(e),e)+($y(e).getDay()===4),t,2)}function Zpe(e){return e.getDay()}function Qpe(e,t){return ab(Gy.count($y(e)-1,e),t,2)}function $pe(e,t){return ab(e.getFullYear()%100,t,2)}function eme(e,t){return e=Ype(e),ab(e.getFullYear()%100,t,2)}function tme(e,t){return ab(e.getFullYear()%1e4,t,4)}function nme(e,t){var n=e.getDay();return e=n>=4||n===0?Ky(e):Ky.ceil(e),ab(e.getFullYear()%1e4,t,4)}function rme(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+ab(t/60|0,`0`,2)+ab(t%60,`0`,2)}function ime(e,t){return ab(e.getUTCDate(),t,2)}function ame(e,t){return ab(e.getUTCHours(),t,2)}function ome(e,t){return ab(e.getUTCHours()%12||12,t,2)}function sme(e,t){return ab(1+Vy.count(eb(e),e),t,3)}function cme(e,t){return ab(e.getUTCMilliseconds(),t,3)}function lme(e,t){return cme(e,t)+`000`}function ume(e,t){return ab(e.getUTCMonth()+1,t,2)}function dme(e,t){return ab(e.getUTCMinutes(),t,2)}function fme(e,t){return ab(e.getUTCSeconds(),t,2)}function pme(e){var t=e.getUTCDay();return t===0?7:t}function mme(e,t){return ab(Jy.count(eb(e)-1,e),t,2)}function hme(e){var t=e.getUTCDay();return t>=4||t===0?Xy(e):Xy.ceil(e)}function gme(e,t){return e=hme(e),ab(Xy.count(eb(e),e)+(eb(e).getUTCDay()===4),t,2)}function _me(e){return e.getUTCDay()}function vme(e,t){return ab(Yy.count(eb(e)-1,e),t,2)}function yme(e,t){return ab(e.getUTCFullYear()%100,t,2)}function bme(e,t){return e=hme(e),ab(e.getUTCFullYear()%100,t,2)}function xme(e,t){return ab(e.getUTCFullYear()%1e4,t,4)}function Sme(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Xy(e):Xy.ceil(e),ab(e.getUTCFullYear()%1e4,t,4)}function Cme(){return`+0000`}function wme(){return`%`}function Tme(e){return+e}function Eme(e){return Math.floor(e/1e3)}var cb,lb,ub;Dme({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function Dme(e){return cb=ppe(e),lb=cb.format,cb.parse,ub=cb.utcFormat,cb.utcParse,cb}function Ome(e){return new Date(e)}function kme(e){return e instanceof Date?+e:+new Date(+e)}function db(e,t,n,r,i,a,o,s,c,l){var u=iy(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,kme)):f().map(Ome)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(xy(n,e)):u},u.copy=function(){return ny(u,db(e,t,n,r,i,a,o,s,c,l))},u}function Ame(){return __.apply(db(dpe,fpe,$y,Zy,Wy,By,Ry,Iy,Fy,lb).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function jme(){return __.apply(db(lpe,upe,eb,Qy,Jy,Vy,zy,Ly,Fy,ub).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function fb(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function pb(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,l=ey,u,d=!1,f;function p(e){return isNaN(e=+e)?f:(e=.5+((e=+u(e))-a)*(r*e<r*a?s:c),l(d?Math.max(0,Math.min(1,e)):e))}p.domain=function(l){return arguments.length?([e,t,n]=l,i=u(e=+e),a=u(t=+t),o=u(n=+n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r
12=a<i?-1:1,p):[e,t,n]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(l=e,p):l};function m(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,l=Xv(e,[n,r,i]),p):[l(0),l(.5),l(1)]}}return p.range=m(Iv),p.rangeRound=m(Lv),p.unknown=function(e){return arguments.length?(f=e,p):f},function(l){return u=l,i=l(e),a=l(t),o=l(n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p}}function Mme(){var e=vy(pb()(ey));return e.copy=function(){return fb(e,Mme())},v_.apply(e,arguments)}function Nme(){var e=Bfe(pb()).domain([.1,1,10]);return e.copy=function(){return fb(e,Nme()).base(e.base())},v_.apply(e,arguments)}function Pme(){var e=Wfe(pb());return e.copy=function(){return fb(e,Pme()).constant(e.constant())},v_.apply(e,arguments)}function Fme(){var e=Yfe(pb());return e.copy=function(){return fb(e,Fme()).exponent(e.exponent())},v_.apply(e,arguments)}function Ime(e,t){t.domain&&(`nice`in e||`quantiles`in e||`padding`in e,e.domain(t.domain))}function Lme(e,t){t.range&&(`padding`in e,e.range(t.range))}function Rme(e,t){`align`in e&&`align`in t&&t.align!==void 0&&e.align(t.align)}function zme(e,t){`base`in e&&`base`in t&&t.base!==void 0&&e.base(t.base)}function Bme(e,t){`clamp`in e&&`clamp`in t&&t.clamp!==void 0&&e.clamp(t.clamp)}function Vme(e,t){`constant`in e&&`constant`in t&&t.constant!==void 0&&e.constant(t.constant)}function Hme(e,t){`exponent`in e&&`exponent`in t&&t.exponent!==void 0&&e.exponent(t.exponent)}var Ume={lab:Gv,hcl:qv,"hcl-long":_fe,hsl:Wv,"hsl-long":gfe,cubehelix:vfe,"cubehelix-long":Yv,rgb:jv};function Wme(e){switch(e){case`lab`:case`hcl`:case`hcl-long`:case`hsl`:case`hsl-long`:case`cubehelix`:case`cubehelix-long`:case`rgb`:return Ume[e];default:}var t=e.type,n=e.gamma,r=Ume[t];return n===void 0?r:r.gamma(n)}function Gme(e,t){if(`interpolate`in t&&`interpolate`in e&&t.interpolate!==void 0){var n=Wme(t.interpolate);e.interpolate(n)}}var Kme=new Date(Date.UTC(2020,1,2,3,4,5)),qme=`%Y-%m-%d %H:%M`;function Jme(e){return e.tickFormat(1,qme)(Kme)===`2020-02-02 03:04`}var Yme={day:By,hour:Ry,minute:Iy,month:Zy,second:Fy,week:Wy,year:$y},Xme={day:Vy,hour:zy,minute:Ly,month:Qy,second:Fy,week:Jy,year:eb};function Zme(e,t){if(`nice`in t&&t.nice!==void 0&&`nice`in e){var n=t.nice;if(typeof n==`boolean`)n&&e.nice();else if(typeof n==`number`)e.nice(n);else{var r=e,i=Jme(r);if(typeof n==`string`)r.nice(i?Xme[n]:Yme[n]);else{var a=n.interval,o=n.step,s=(i?Xme[a]:Yme[a]).every(o);s!=null&&r.nice(s)}}}}function Qme(e,t){`padding`in e&&`padding`in t&&t.padding!==void 0&&e.padding(t.padding),`paddingInner`in e&&`paddingInner`in t&&t.paddingInner!==void 0&&e.paddingInner(t.paddingInner),`paddingOuter`in e&&`paddingOuter`in t&&t.paddingOuter!==void 0&&e.paddingOuter(t.paddingOuter)}function $me(e,t){if(t.reverse){var n=e.range().slice().reverse();`padding`in e,e.range(n)}}function ehe(e,t){`round`in t&&t.round!==void 0&&(t.round&&`interpolate`in t&&t.interpolate!==void 0?console.warn(`[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:`,t):`round`in e?e.round(t.round):`interpolate`in e&&t.round&&e.interpolate(Lv))}function the(e,t){`unknown`in e&&`unknown`in t&&t.unknown!==void 0&&e.unknown(t.unknown)}function nhe(e,t){if(`zero`in t&&t.zero===!0){var n=e.domain(),r=n[0],i=n[1],a=i<r,o=a?[i,r]:[r,i],s=o[0],c=o[1],l=[Math.min(0,s),Math.max(0,c)];e.domain(a?l.reverse():l)}}var rhe=[`domain`,`nice`,`zero`,`interpolate`,`round`,`range`,`reverse`,`align`,`base`,`clamp`,`constant`,`exponent`,`padding`,`unknown`],ihe={domain:Ime,nice:Zme,zero:nhe,interpolate:Gme,round:ehe,align:Rme,base:zme,clamp:Bme,constant:Vme,exponent:Hme,padding:Qme,range:Lme,reverse:$me,unknown:the};function ahe(){var e=new Set([...arguments]),t=rhe.filter(function(t){return e.has(t)});return function(e,n){return n!==void 0&&t.forEach(function(t){ihe[t](e,n)}),e}}var ohe=ahe(`domain`,`range`,`reverse`,`clamp`,`interpolate`,`nice`,`round`,`zero`);function mb(e){return ohe(yy(),e)}var she=ahe(`domain`,`range`,`reverse`,`unknown`);function hb(e){return she(b_(),e)}function che(e){if((typeof e==`function`||typeof e==`object`&&e)&&`valueOf`in e){var t=e.valueOf();if(typeof t==`number`)return t}return e}function lhe(e,t){var n=e;return`ticks`in n?n.ticks(t):n.domain().filter(function(e,n,r){return t==null||r.length<=t||n%Math.round((r.length-1)/t)===0})}function uhe(e){return e?.toString()}var dhe=[`from`,`to`,`fill`,`className`,`innerRef`];function gb(){return gb=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},gb.apply(this,arguments)}function fhe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function phe(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,i=r===void 0?{x:1,y:1}:r,a=e.fill,o=a===void 0?`transparent`:a,s=e.className,c=e.innerRef,l=fhe(e,dhe),u=n.x===i.x||n.y===i.y;return _.createElement(`line`,gb({ref:c,className:(0,vg.default)(`visx-line`,s),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:o,shapeRendering:u?`crispEdges`:`auto`},l))}var mhe=[`className`,`innerRef`];function _b(){return _b=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},_b.apply(this,arguments)}function hhe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function vb(e){var t=e.className,n=e.innerRef,r=hhe(e,mhe);return _.createElement(`rect`,_b({ref:n,className:(0,vg.default)(`visx-bar`,t)},r))}var ghe=[`className`,`innerRef`];function yb(){return yb=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},yb.apply(this,arguments)}function _he(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function vhe(e){var t=e.className,n=e.innerRef,r=_he(e,ghe);return _.createElement(`circle`,yb({ref:n,className:(0,vg.default)(`visx-circle`,t)},r))}var yhe=o(((e,t)=>{t.exports=n;function n(e,t,n){e instanceof RegExp&&(e=r(e,n)),t instanceof RegExp&&(t=r(t,n));var a=i(e,t,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+e.length,a[1]),post:n.slice(a[1]+t.length)}}function r(e,t){var n=t.match(e);return n?n[0]:null}n.range=i;function i(e,t,n){var r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){for(r=[],a=n.length;u>=0&&!s;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),l]:(i=r.pop(),i<a&&(a=i,o=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(s=[a,o])}return s}})),bhe=o(((e,t)=>{t.exports=n;function n(e,t,n){e instanceof RegExp&&(e=r(e,n)),t instanceof RegExp&&(t=r(t,n));var a=i(e,t,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+e.length,a[1]),post:n.slice(a[1]+t.length)}}function r(e,t){var n=t.match(e);return n?n[0]:null}n.range=i;function i(e,t,n){var r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),l]:(i=r.pop(),i<a&&(a=i,o=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(s=[a,o])}return s}})),xhe=o(((e,t)=>{var n=bhe();t.exports=r;function r(e,t,n){var r=e;return i(e,t).reduce(function(e,i){return e.replace(i.functionIdentifier+`(`+i.matches.body+`)`,a(i.matches.body,i.functionIdentifier,n,r,t))},e)}function i(e,t){var r=[],i=typeof t==`string`?RegExp(`\\b(`+t+`)\\(`):t;do{var a=i.exec(e);if(!a)return r;if(a[1]===void 0)throw Error(`Missing the first couple of parenthesis to get the function identifier in `+t);var o=a[1],s=a.index,c=n(`(`,`)`,e.substring(s));if(!c||c.start!==a[0].length-1)throw SyntaxError(o+`(): missing closing ')' in the value '`+e+`'`);r.push({matches:c,functionIdentifier:o}),e=c.post}while(i.test(e));return r}function a(e,t,n,i,a){return n(r(e,a,n),t,i)}})),She=o(((e,t)=>{var n=function(e){this.value=e};n.math={isDegree:!0,acos:function(e){return n.math.isDegree?180/Math.PI*Math.acos(e):Math.acos(e)},add:function(e,t){return e+t},asin:function(e){return n.math.isDegree?180/Math.PI*Math.asin(e):Math.asin(e)},atan:function(e){return n.math.isDegree?180/Math.PI*Math.atan(e):Math.atan(e)},acosh:function(e){return Math.log(e+Math.sqrt(e*e-1))},asinh:function(e){return Math.log(e+Math.sqrt(e*e+1))},atanh:function(e){return Math.log((1+e)/(1-e))},C:function(e,t){var r=1,i=e-t,a=t;a<i&&(a=i,i=t);for(var o=a+1;o<=e;o++)r*=o;return r/n.math.fact(i)},changeSign:function(e){return-e},cos:function(e){return n.math.isDegree&&(e=n.math.toRadian(e)),Math.cos(e)},cosh:function(e){return(Math.E**+e+Math.E**(-1*e))/2},div:function(e,t){return e/t},fact:function(e){if(e%1!=0)return`NaN`;for(var t=1,n=2;n<=e;n++)t*=n;return t},inverse:function(e){return 1/e},log:function(e){return Math.log(e)/Math.log(10)},mod:function(e,t){return e%t},mul:function(e,t){return e*t},P:function(e,t){for(var n=1,r=Math.floor(e)-Math.floor(t)+1;r<=Math.floor(e);r++)n*=r;return n},Pi:function(e,t,n){for(var r=1,i=e;i<=t;i++)r*=Number(n.postfixEval({n:i}));return r},pow10x:function(e){for(var t=1;e--;)t*=10;return t},sigma:function(e,t,n){for(var r=0,i=e;i<=t;i++)r+=Number(n.postfixEval({n:i}));return r},sin:function(e){return n.math.isDegree&&(e=n.math.toRadian(e)),Math.sin(e)},sinh:function(e){return(Math.E**+e-Math.E**(-1*e))/2},sub:function(e,t){return e-t},tan:function(e){return n.math.isDegree&&(e=n.math.toRadian(e)),Math.tan(e)},tanh:function(e){return n.sinha(e)/n.cosha(e)},toRadian:function(e){return e*Math.PI/180},and:function(e,t){return e&t}},n.Exception=function(e){this.message=e}
12,t.exports=n})),Che=o(((e,t)=>{var n=She();function r(e,t){for(var n=0;n<e.length;n++)e[n]+=t;return e}for(var i=[{token:`sin`,show:`sin`,type:0,value:n.math.sin},{token:`cos`,show:`cos`,type:0,value:n.math.cos},{token:`tan`,show:`tan`,type:0,value:n.math.tan},{token:`pi`,show:`π`,type:3,value:`PI`},{token:`(`,show:`(`,type:4,value:`(`},{token:`)`,show:`)`,type:5,value:`)`},{token:`P`,show:`P`,type:10,value:n.math.P},{token:`C`,show:`C`,type:10,value:n.math.C},{token:` `,show:` `,type:14,value:` `.anchor},{token:`asin`,show:`asin`,type:0,value:n.math.asin},{token:`acos`,show:`acos`,type:0,value:n.math.acos},{token:`atan`,show:`atan`,type:0,value:n.math.atan},{token:`7`,show:`7`,type:1,value:`7`},{token:`8`,show:`8`,type:1,value:`8`},{token:`9`,show:`9`,type:1,value:`9`},{token:`int`,show:`Int`,type:0,value:Math.floor},{token:`cosh`,show:`cosh`,type:0,value:n.math.cosh},{token:`acosh`,show:`acosh`,type:0,value:n.math.acosh},{token:`ln`,show:` ln`,type:0,value:Math.log},{token:`^`,show:`^`,type:10,value:Math.pow},{token:`root`,show:`root`,type:0,value:Math.sqrt},{token:`4`,show:`4`,type:1,value:`4`},{token:`5`,show:`5`,type:1,value:`5`},{token:`6`,show:`6`,type:1,value:`6`},{token:`/`,show:`÷`,type:2,value:n.math.div},{token:`!`,show:`!`,type:7,value:n.math.fact},{token:`tanh`,show:`tanh`,type:0,value:n.math.tanh},{token:`atanh`,show:`atanh`,type:0,value:n.math.atanh},{token:`Mod`,show:` Mod `,type:2,value:n.math.mod},{token:`1`,show:`1`,type:1,value:`1`},{token:`2`,show:`2`,type:1,value:`2`},{token:`3`,show:`3`,type:1,value:`3`},{token:`*`,show:`×`,type:2,value:n.math.mul},{token:`sinh`,show:`sinh`,type:0,value:n.math.sinh},{token:`asinh`,show:`asinh`,type:0,value:n.math.asinh},{token:`e`,show:`e`,type:3,value:`E`},{token:`log`,show:` log`,type:0,value:n.math.log},{token:`0`,show:`0`,type:1,value:`0`},{token:`.`,show:`.`,type:6,value:`.`},{token:`+`,show:`+`,type:9,value:n.math.add},{token:`-`,show:`-`,type:9,value:n.math.sub},{token:`,`,show:`,`,type:11,value:`,`},{token:`Sigma`,show:`Σ`,type:12,value:n.math.sigma},{token:`n`,show:`n`,type:13,value:`n`},{token:`Pi`,show:`Π`,type:12,value:n.math.Pi},{token:`pow`,show:`pow`,type:8,value:Math.pow,numberOfArguments:2},{token:`&`,show:`&`,type:9,value:n.math.and}],a={0:11,1:0,2:3,3:0,4:0,5:0,6:0,7:11,8:11,9:1,10:10,11:0,12:11,13:0,14:-1,15:11},o=0;o<i.length;o++)i[o].precedence=a[i[o].type];var s={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,9:!0,12:!0,13:!0,14:!0,15:!0},c={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0,13:!0,15:!0},l={0:!0,3:!0,4:!0,8:!0,12:!0,13:!0,15:!0},u={},d={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,12:!0,13:!0,15:!0},f={1:!0},p=[[],`123789456+-*/()^!PCe0.,n &`.split(``),[`pi`,`ln`,`Pi`],[`sin`,`cos`,`tan`,`Del`,`int`,`Mod`,`log`,`pow`],[`asin`,`acos`,`atan`,`cosh`,`root`,`tanh`,`sinh`],[`acosh`,`atanh`,`asinh`,`Sigma`]];function m(e,t,n,r){for(var i=0;i<r;i++)if(e[n+i]!==t[i])return!1;return!0}n.tokenTypes={FUNCTION_WITH_ONE_ARG:0,NUMBER:1,BINARY_OPERATOR_HIGH_PRECENDENCE:2,CONSTANT:3,OPENING_PARENTHESIS:4,CLOSING_PARENTHESIS:5,DECIMAL:6,POSTFIX_FUNCTION_WITH_ONE_ARG:7,FUNCTION_WITH_N_ARGS:8,BINARY_OPERATOR_LOW_PRECENDENCE:9,BINARY_OPERATOR_PERMUTATION:10,COMMA:11,EVALUATED_FUNCTION:12,EVALUATED_FUNCTION_PARAMETER:13,SPACE:14},n.addToken=function(e){for(var t=0;t<e.length;t++){var r=e[t].token.length,o=-1;e[t].type===n.tokenTypes.FUNCTION_WITH_N_ARGS&&e[t].numberOfArguments===void 0&&(e[t].numberOfArguments=2),p[r]=p[r]||[];for(var s=0;s<p[r].length;s++)if(e[t].token===p[r][s]){o=h(p[r][s],i);break}o===-1?(i.push(e[t]),e[t].precedence=a[e[t].type],p.length<=e[t].token.length&&(p[e[t].token.length]=[]),p[e[t].token.length].push(e[t].token)):(i[o]=e[t],e[t].precedence=a[e[t].type])}};function h(e,t){for(var n=0;n<t.length;n++)if(t[n].token===e)return n;return-1}function g(e){for(var t=[],r=e.length,a,o,s,c=0;c<r;c++)if(!(c<r-1&&e[c]===` `&&e[c+1]===` `)){for(a=``,o=e.length-c>p.length-2?p.length-1:e.length-c;o>0;o--)if(p[o]!==void 0)for(s=0;s<p[o].length;s++)m(e,p[o][s],c,o)&&(a=p[o][s],s=p[o].length,o=0);if(c+=a.length-1,a===``)throw new n.Exception(`Can't understand after `+e.slice(c));t.push(i[h(a,i)])}return t}var _={value:n.math.changeSign,type:0,pre:21,show:`-`},v={value:`)`,show:`)`,type:5,pre:0},y={value:`(`,type:4,pre:0,show:`(`};n.lex=function(e,t){var i=[y],a=[],o=e,p=s,m=0,h=u,b=``,x;t!==void 0&&n.addToken(t);var S={},C=g(o);for(x=0;x<C.length;x++){var w=C[x];if(w.type===14){if(x>0&&x<C.length-1&&C[x+1].type===1&&(C[x-1].type===1||C[x-1].type===6))throw new n.Exception(`Unexpected Space`);continue}var T=w.token,E=w.type,D=w.value,O=w.precedence,k=w.show,A=i[i.length-1],j;for(j=a.length;j--&&a[j]===0;)if([0,2,3,4,5,9,11,12,13].indexOf(E)!==-1){if(p[E]!==!0)throw new n.Exception(T+` is not allowed after `+b);i.push(v),p=c,h=d,a.pop()}if(p[E]!==!0)throw new n.Exception(T+` is not allowed after `+b);if(h[E]===!0&&(E=2,D=n.math.mul,k=`×`,O=3,--x),S={value:D,type:E,pre:O,show:k,numberOfArguments:w.numberOfArguments},E===0)p=s,h=u,r(a,2),i.push(S),C[x+1].type!==4&&(i.push(y),a.push(2));else if(E===1)A.type===1?(A.value+=D,r(a,1)):i.push(S),p=c,h=l;else if(E===2)p=s,h=u,r(a,2),i.push(S);else if(E===3)i.push(S),p=c,h=d;else if(E===4)r(a,1),m++,p=s,h=u,i.push(S);else if(E===5){if(!m)throw new n.Exception(`Closing parenthesis are more than opening one, wait What!!!`);m--,p=c,h=d,i.push(S),r(a,1)}else if(E===6){if(A.hasDec)throw new n.Exception(`Two decimals are not allowed in one number`);A.type!==1&&(A={value:0,type:1,pre:0},i.push(A)),p=f,r(a,1),h=u,A.value+=D,A.hasDec=!0}else E===7&&(p=c,h=d,r(a,1),i.push(S));E===8?(p=s,h=u,r(a,w.numberOfArguments+2),i.push(S),C[x+1].type!==4&&(i.push(y),a.push(w.numberOfArguments+2))):E===9?(A.type===9?A.value===n.math.add?(A.value=D,A.show=k,r(a,1)):A.value===n.math.sub&&k===`-`&&(A.value=n.math.add,A.show=`+`,r(a,1)):A.type!==5&&A.type!==7&&A.type!==1&&A.type!==3&&A.type!==13?T===`-`&&(p=s,h=u,r(a,2).push(2),i.push(_),i.push(y)):(i.push(S),r(a,2)),p=s,h=u):E===10?(p=s,h=u,r(a,2),i.push(S)):E===11?(p=s,h=u,i.push(S)):E===12?(p=s,h=u,r(a,6),i.push(S),C[x+1].type!==4&&(i.push(y),a.push(6))):E===13&&(p=c,h=d,i.push(S)),r(a,-1),b=T}for(j=a.length;j--;)i.push(v);if(p[5]!==!0)throw new n.Exception(`complete the expression`);for(;m--;)i.push(v);return i.push(v),new n(i)},t.exports=n})),whe=o(((e,t)=>{var n=Che();n.prototype.toPostfix=function(){for(var e=[],t,r,i,a,o,s=[{value:`(`,type:4,pre:0}],c=this.value,l=1;l<c.length;
12l++)if(c[l].type===1||c[l].type===3||c[l].type===13)c[l].type===1&&(c[l].value=Number(c[l].value)),e.push(c[l]);else if(c[l].type===4)s.push(c[l]);else if(c[l].type===5)for(;(r=s.pop()).type!==4;)e.push(r);else if(c[l].type===11){for(;(r=s.pop()).type!==4;)e.push(r);s.push(r)}else{t=c[l],a=t.pre,o=s[s.length-1],i=o.pre;var u=o.value==`Math.pow`&&t.value==`Math.pow`;if(a>i)s.push(t);else{for(;i>=a&&!u||u&&a<i;)r=s.pop(),o=s[s.length-1],e.push(r),i=o.pre,u=t.value==`Math.pow`&&o.value==`Math.pow`;s.push(t)}}return new n(e)},t.exports=n})),The=o(((e,t)=>{var n=whe();n.prototype.postfixEval=function(e){e||={},e.PI=Math.PI,e.E=Math.E;for(var t=[],r,i,a,o=this.value,s=e.n!==void 0,c=0;c<o.length;c++)if(o[c].type===1)t.push({value:o[c].value,type:1});else if(o[c].type===3)t.push({value:e[o[c].value],type:1});else if(o[c].type===0)t[t.length-1].type===void 0?t[t.length-1].value.push(o[c]):t[t.length-1].value=o[c].value(t[t.length-1].value);else if(o[c].type===7)t[t.length-1].type===void 0?t[t.length-1].value.push(o[c]):t[t.length-1].value=o[c].value(t[t.length-1].value);else if(o[c].type===8){for(var l=[],u=0;u<o[c].numberOfArguments;u++)l.push(t.pop().value);t.push({type:1,value:o[c].value.apply(o[c],l.reverse())})}else o[c].type===10?(r=t.pop(),i=t.pop(),i.type===void 0?(i.value=i.concat(r),i.value.push(o[c]),t.push(i)):r.type===void 0?(r.unshift(i),r.push(o[c]),t.push(r)):t.push({type:1,value:o[c].value(i.value,r.value)})):o[c].type===2||o[c].type===9?(r=t.pop(),i=t.pop(),i.type===void 0?(i=i.concat(r),i.push(o[c]),t.push(i)):r.type===void 0?(r.unshift(i),r.push(o[c]),t.push(r)):t.push({type:1,value:o[c].value(i.value,r.value)})):o[c].type===12?(r=t.pop(),r.type!==void 0&&(r=[r]),i=t.pop(),a=t.pop(),t.push({type:1,value:o[c].value(a.value,i.value,new n(r))})):o[c].type===13&&(s?t.push({value:e[o[c].value],type:3}):t.push([o[c]]));if(t.length>1)throw new n.Exception(`Uncaught Syntax error`);return t[0].value>0x38d7ea4c68000?`Infinity`:parseFloat(t[0].value.toFixed(15))},n.eval=function(e,t,n){return t===void 0?this.lex(e).toPostfix().postfixEval():n===void 0?t.length===void 0?this.lex(e).toPostfix().postfixEval(t):this.lex(e,t).toPostfix().postfixEval():this.lex(e,t).toPostfix().postfixEval(n)},t.exports=n})),Ehe=o(((e,t)=>{var n=The();n.prototype.formulaEval=function(){for(var e,t,n,r=[],i=this.value,a=0;a<i.length;a++)i[a].type===1||i[a].type===3?r.push({value:i[a].type===3?i[a].show:i[a].value,type:1}):i[a].type===13?r.push({value:i[a].show,type:1}):i[a].type===0?r[r.length-1]={value:i[a].show+(i[a].show==`-`?``:`(`)+r[r.length-1].value+(i[a].show==`-`?``:`)`),type:0}:i[a].type===7?r[r.length-1]={value:(r[r.length-1].type==1?``:`(`)+r[r.length-1].value+(r[r.length-1].type==1?``:`)`)+i[a].show,type:7}:i[a].type===10?(e=r.pop(),t=r.pop(),i[a].show===`P`||i[a].show===`C`?r.push({value:`<sup>`+t.value+`</sup>`+i[a].show+`<sub>`+e.value+`</sub>`,type:10}):r.push({value:(t.type==1?``:`(`)+t.value+(t.type==1?``:`)`)+`<sup>`+e.value+`</sup>`,type:1})):i[a].type===2||i[a].type===9?(e=r.pop(),t=r.pop(),r.push({value:(t.type==1?``:`(`)+t.value+(t.type==1?``:`)`)+i[a].show+(e.type==1?``:`(`)+e.value+(e.type==1?``:`)`),type:i[a].type})):i[a].type===12&&(e=r.pop(),t=r.pop(),n=r.pop(),r.push({value:i[a].show+`(`+n.value+`,`+t.value+`,`+e.value+`)`,type:12}));return r[0].value},t.exports=n})),Dhe=o(((e,t)=>{var n=yhe(),r=xhe(),i=Ehe(),a=100,o=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,s;t.exports=c;function c(e,t){s=0,t=10**(t===void 0?5:t),e=e.replace(/\n+/g,` `);function c(e,n,r){if(s++>a)throw s=0,Error(`Call stack overflow for `+r);if(e===``)throw Error(n+`(): '`+r+`' must contain a non-whitespace string`);e=u(e,r);var o=l(e);if(o.length>1||e.indexOf(`var(`)>-1)return n+`(`+e+`)`;var c=o[0]||``;c===`%`&&(e=e.replace(/\b[0-9\.]+%/g,function(e){return parseFloat(e.slice(0,-1))*.01}));var d=e.replace(new RegExp(c,`gi`),``),f;try{f=i.eval(d)}catch{return n+`(`+e+`)`}return c===`%`&&(f*=100),(n.length||c===`%`)&&(f=Math.round(f*t)/t),f+=c,f}function u(e,t){e=e.replace(/((?:\-[a-z]+\-)?calc)/g,``);for(var r=``,i=e,a;a=o.exec(i);){a[0].index>0&&(r+=i.substring(0,a[0].index));var s=n(`(`,`)`,i.substring([0].index));if(s.body===``)throw Error(`'`+e+`' must contain a non-whitespace string`);var l=c(s.body,``,t);r+=s.pre+l,i=s.post}return r+i}return r(e,/((?:\-[a-z]+\-)?calc)\(/,c)}function l(e){for(var t=[],n=[],r=/[\.0-9]([%a-z]+)/gi,i=r.exec(e);i;)!i||!i[1]||(n.indexOf(i[1].toLowerCase())===-1&&(t.push(i[1]),n.push(i[1].toLowerCase())),i=r.exec(e));return t}})),Ohe=o(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),bb=o(((e,t)=>{var n=Ohe(),r=typeof self==`object`&&self&&self.Object===Object&&self;
vendor: 4,405 bytes, line 12
12t.exports=n||r||Function(`return this`)()})),khe=o(((e,t)=>{t.exports=bb().Symbol})),Ahe=o(((e,t)=>{var n=khe(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),jhe=o(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),Mhe=o(((e,t)=>{var n=khe(),r=Ahe(),i=jhe(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),Nhe=o(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),Phe=o(((e,t)=>{var n=Mhe(),r=Nhe(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),Fhe=o(((e,t)=>{t.exports=bb()[`__core-js_shared__`]})),Ihe=o(((e,t)=>{var n=Fhe(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),Lhe=o(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),Rhe=o(((e,t)=>{var n=Phe(),r=Ihe(),i=Nhe(),a=Lhe(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),zhe=o(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),Bhe=o(((e,t)=>{var n=Rhe(),r=zhe();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),xb=o(((e,t)=>{t.exports=Bhe()(Object,`create`)})),Vhe=o(((e,t)=>{var n=xb();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),Hhe=o(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),Uhe=o(((e,t)=>{var n=xb(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),Whe=o(((e,t)=>{var n=xb(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),Ghe=o(((e,t)=>{var n=xb(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=i})),Khe=o(((e,t)=>{var n=Vhe(),r=Hhe(),i=Uhe(),a=Whe(),o=Ghe();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),qhe=o(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),Jhe=o(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),Sb=o(((e,t)=>{var n=Jhe();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),Yhe=o(((e,t)=>{var n=Sb(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),Xhe=o(((e,t)=>{var n=Sb();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),Zhe=o(((e,t)=>{var n=Sb();function r(e){return n(this.__data__,e)>-1}t.exports=r})),Qhe=o(((e,t)=>{var n=Sb();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),$he=o(((e,t)=>{var n=qhe(),r=Yhe(),i=Xhe(),a=Zhe(),o=Qhe();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),ege=o(((e,t)=>{t.exports=Bhe()(bb(),`Map`)})),tge=o(((e,t)=>{var n=Khe(),r=$he(),i=ege();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),nge=o(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),Cb=o(((e,t)=>{var n=nge();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),rge=o(((e,t)=>
12{var n=Cb();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),ige=o(((e,t)=>{var n=Cb();function r(e){return n(this,e).get(e)}t.exports=r})),age=o(((e,t)=>{var n=Cb();function r(e){return n(this,e).has(e)}t.exports=r})),oge=o(((e,t)=>{var n=Cb();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),sge=o(((e,t)=>{var n=tge(),r=rge(),i=ige(),a=age(),o=oge();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),cge=l(o(((e,t)=>{var n=sge(),r=`Expected a function`;function i(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(r);var a=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=e.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(i.Cache||n),a}i.Cache=n,t.exports=i}))()),lge=`__react_svg_text_measurement_id`;function uge(e,t){try{var n=document.getElementById(lge);if(!n){var r=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);r.setAttribute(`aria-hidden`,`true`),r.style.width=`0`,r.style.height=`0`,r.style.position=`absolute`,r.style.top=`-100%`,r.style.left=`-100%`,n=document.createElementNS(`http://www.w3.org/2000/svg`,`text`),n.setAttribute(`id`,lge),r.appendChild(n),document.body.appendChild(r)}return Object.assign(n.style,t),n.textContent=e,n.getComputedTextLength()}catch{return null}}var dge=(0,cge.default)(uge,function(e,t){return e+`_`+JSON.stringify(t)}),wb=l(Dhe()),fge=[`verticalAnchor`,`scaleToFit`,`angle`,`width`,`lineHeight`,`capHeight`,`children`,`style`];function pge(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Tb(e){return typeof e==`number`}function mge(e){return typeof e==`number`&&Number.isFinite(e)||typeof e==`string`}function hge(e){var t=e.verticalAnchor,n=t===void 0?`end`:t,r=e.scaleToFit,i=r===void 0?!1:r,a=e.angle,o=e.width,s=e.lineHeight,c=s===void 0?`1em`:s,l=e.capHeight,u=l===void 0?`0.71em`:l,d=e.children,f=e.style,p=pge(e,fge),m=p.x,h=m===void 0?0:m,g=p.y,v=g===void 0?0:g,y=!mge(h)||!mge(v),b=(0,_.useMemo)(function(){return{wordsWithWidth:(d==null?[]:d.toString().split(/(?:(?!\u00A0+)\s+)/)).map(function(e){return{word:e,wordWidth:dge(e,f)||0}}),spaceWidth:dge(`\xA0`,f)||0}},[d,f]),x=b.wordsWithWidth,S=b.spaceWidth,C=(0,_.useMemo)(function(){return y?[]:o||i?x.reduce(function(e,t){var n=t.word,r=t.wordWidth,a=e[e.length-1];if(a&&(o==null||i||(a.width||0)+r+S<o))a.words.push(n),a.width=a.width||0,a.width+=r+S;else{var s={words:[n],width:r};e.push(s)}return e},[]):[{words:d==null?[]:d.toString().split(/(?:(?!\u00A0+)\s+)/)}]},[y,o,i,d,x,S]);return{wordsByLines:C,startDy:(0,_.useMemo)(function(){return y?``:n===`start`?(0,wb.default)(`calc(`+u+`)`):n===`middle`?(0,wb.default)(`calc(`+(C.length-1)/2+` * -`+c+` + (`+u+` / 2))`):(0,wb.default)(`calc(`+(C.length-1)+` * -`+c+`)`)},[y,n,u,C.length,c]),transform:(0,_.useMemo)(function(){var e=[];if(y)return``;if(Tb(h)&&Tb(v)&&Tb(o)&&i&&C.length>0){var t=C[0].width||1,n=i===`shrink-only`?Math.min(o/t,1):o/t,r=n,s=h-n*h,c=v-r*v;e.push(`matrix(`+n+`, 0, 0, `+r+`, `+s+`, `+c+`)`)}return a&&e.push(`rotate(`+a+`, `+h+`, `+v+`)`),e.length>0?e.join(` `):``},[y,h,v,o,i,C,a])}}var gge=[`dx`,`dy`,`textAnchor`,`innerRef`,`innerTextRef`,`verticalAnchor`,`angle`,`lineHeight`,`scaleToFit`,`capHeight`,`width`];function Eb(){return Eb=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},Eb.apply(this,arguments)}function _ge(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var vge={overflow:`visible`};function Db(e){var t=e.dx,n=t===void 0?0:t,r=e.dy,i=r===void 0?0:r,a=e.textAnchor,o=a===void 0?`start`:a,s=e.innerRef,c=e.innerTextRef;e.verticalAnchor,e.angle;
12var l=e.lineHeight,u=l===void 0?`1em`:l;e.scaleToFit,e.capHeight,e.width;var d=_ge(e,gge),f=d.x,p=f===void 0?0:f,m=d.fontSize,h=hge(e),g=h.wordsByLines,v=h.startDy,y=h.transform;return _.createElement(`svg`,{ref:s,x:n,y:i,fontSize:m,style:vge},g.length>0?_.createElement(`text`,Eb({ref:c,transform:y},d,{textAnchor:o}),g.map(function(e,t){return _.createElement(`tspan`,{key:t,x:p,dy:t===0?v:u},e.words.join(` `))})):null)}var Ob={top:`top`,left:`left`,right:`right`,bottom:`bottom`};function yge(e){var t=e.labelOffset,n=e.labelProps,r=e.orientation,i=e.range,a=e.tickLabelFontSize,o=e.tickLength,s=r===Ob.left||r===Ob.top?-1:1,c,l,u;if(r===Ob.top||r===Ob.bottom){var d=r===Ob.bottom&&typeof n.fontSize==`number`?n.fontSize:0;c=(Number(i[0])+Number(i[i.length-1]))/2,l=s*(o+t+a+d)}else c=s*((Number(i[0])+Number(i[i.length-1]))/2),l=-(o+t),u=`rotate(`+s*90+`)`;return{x:c,y:l,transform:u}}function kb(){return kb=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},kb.apply(this,arguments)}function bge(e){var t=e.hideTicks,n=e.horizontal,r=e.orientation,i=e.tickClassName,a=e.tickComponent,o=e.tickLabelProps,s=e.tickStroke,c=s===void 0?`#222`:s,l=e.tickTransform,u=e.ticks,d=e.strokeWidth,f=e.tickLineProps;return u.map(function(e){var s=e.value,u=e.index,p=e.from,m=e.to,h=e.formattedValue,g=o[u]??{},v=Math.max(10,typeof g.fontSize==`number`&&g.fontSize||0),y=m.y+(n&&r!==Ob.top?v:0);return _.createElement(bg,{key:`visx-tick-`+s+`-`+u,className:(0,vg.default)(`visx-axis-tick`,i),transform:l},!t&&_.createElement(phe,kb({from:p,to:m,stroke:c,strokeWidth:d,strokeLinecap:`square`},f)),a?a(kb({},g,{x:m.x,y,formattedValue:h})):_.createElement(Db,kb({x:m.x,y},g),h))})}function Ab(){return Ab=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},Ab.apply(this,arguments)}var jb={textAnchor:`middle`,fontFamily:`Arial`,fontSize:10,fill:`#222`};function xge(e){var t=e.axisFromPoint,n=e.axisLineClassName,r=e.axisToPoint,i=e.hideAxisLine,a=e.hideTicks,o=e.horizontal,s=e.label,c=s===void 0?``:s,l=e.labelClassName,u=e.labelOffset,d=u===void 0?14:u,f=e.labelProps,p=e.orientation,m=p===void 0?Ob.bottom:p,h=e.scale,g=e.stroke,v=g===void 0?`#222`:g,y=e.strokeDasharray,b=e.strokeWidth,x=b===void 0?1:b,S=e.tickClassName,C=e.tickComponent,w=e.tickLineProps,T=e.tickLabelProps,E=e.tickLength,D=E===void 0?8:E,O=e.tickStroke,k=O===void 0?`#222`:O,A=e.tickTransform,j=e.ticks,M=e.ticksComponent,N=M===void 0?bge:M,P=Ab({},jb,f),F=Ab({},jb,typeof T==`object`?T:null),ee=j.map(function(e){var t=e.value,n=e.index;return typeof T==`function`?T(t,n,j):F}),te=Math.max.apply(Math,[10].concat(ee.map(function(e){return typeof e.fontSize==`number`?e.fontSize:0})));return _.createElement(_.Fragment,null,N({hideTicks:a,horizontal:o,orientation:m,scale:h,tickClassName:S,tickComponent:C,tickLabelProps:ee,tickStroke:k,tickTransform:A,ticks:j,strokeWidth:x,tickLineProps:w}),!i&&_.createElement(phe,{className:(0,vg.default)(`visx-axis-line`,n),from:t,to:r,stroke:v,strokeWidth:x,strokeDasharray:y}),c&&_.createElement(Db,Ab({className:(0,vg.default)(`visx-axis-label`,l)},yge({labelOffset:d,labelProps:P,orientation:m,range:h.range(),tickLabelFontSize:te,tickLength:D}),P),c))}function Sge(e,t){t===void 0&&(t=`center`);var n=e;if(t!==`start`&&`bandwidth`in n){var r=n.bandwidth();return t===`center`&&(r/=2),n.round()&&(r=Math.round(r)),function(e){var t=n(e);return typeof t==`number`?t+r:t}}return e}function Cge(e){var t=e;return`tickFormat`in t?t.tickFormat():uhe}var Mb=function(){function e(e){var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r;this.x=0,this.y=0,this.x=n,this.y=i}var t=e.prototype;return t.value=function(){return{x:this.x,y:this.y}},t.toArray=function(){return[this.x,this.y]},e}();function Nb(e,t){var n=e.x,r=e.y;return new Mb(t?{x:n,y:r}:{x:r,y:n})}function Pb(){return Pb=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},Pb.apply(this,arguments)}function wge(e){return e===void 0&&(e=0),typeof e==`number`?{start:e,end:e}:Pb({start:0,end:0},e)}var Tge=[`children`,`axisClassName`,`hideAxisLine`,`hideTicks`,`hideZero`,`innerRef`,`left`,`numTicks`,`orientation`,`rangePadding`,`scale`,`tickFormat`,`tickLength`,`tickValues`,`top`];function Fb(){return Fb=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},Fb.apply(this,arguments)}function Ege(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Ib(e){var t=e.children,n=t===void 0?xge:t,r=e.axisClassName,i=e.hideAxisLine,a=i===void 0?!1:i,o=e.hideTicks,s=o===void 0?!1:o,c=e.hideZero,l=c===void 0?!1:c,u=e.innerRef,d=e.left,f=d===void 0?0:d,p=e.numTicks,m=p===void 0?10:p,h=e.orientation,g=h===void 0?Ob.bottom:h,v=e.rangePadding,y=v===void 0?0:v,b=e.scale,x=e.tickFormat,S=e.tickLength,C=S===void 0?8:S,w=e.tickValues,T=e.top,E=T===void 0?0:T,D=Ege(e,Tge),O=x??Cge(b),k=g===Ob.left,A=g===Ob.top,j=A||g===Ob.bottom,M=Sge(b),N=k||A?-1:1,P=b.range(),F=wge(y),ee=Nb({x:Number(P[0])+.5-F.start,y:0},j),te=Nb({x:Number(P[P.length-1])+.5+F.end,y:0}
12,j),ne=(w??lhe(b,m)).filter(function(e){return!l||e!==0&&e!==`0`}).map(function(e,t){return{value:e,index:t}}),I=ne.map(function(e){var t=e.value,n=e.index,r=che(M(t));return{value:t,index:n,from:Nb({x:r,y:0},j),to:Nb({x:r,y:C*N},j),formattedValue:O(t,n,ne)}});return _.createElement(bg,{className:(0,vg.default)(`visx-axis`,r),innerRef:u,top:E,left:f},n(Fb({},D,{axisFromPoint:ee,axisToPoint:te,hideAxisLine:a,hideTicks:s,hideZero:l,horizontal:j,numTicks:m,orientation:g,rangePadding:y,scale:b,tickFormat:O,tickLength:C,tickPosition:M,tickSign:N,ticks:I})))}var Dge=[`axisClassName`,`labelOffset`,`tickLength`,`tickLabelProps`];function Lb(){return Lb=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},Lb.apply(this,arguments)}function Oge(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var kge={dx:`-0.25em`,dy:`0.25em`,fill:`#222`,fontFamily:`Arial`,fontSize:10,textAnchor:`end`};function Age(e){var t=e.axisClassName,n=e.labelOffset,r=n===void 0?36:n,i=e.tickLength,a=i===void 0?8:i,o=e.tickLabelProps,s=Oge(e,Dge),c=typeof o==`function`?o:Lb({},kge,o);return _.createElement(Ib,Lb({axisClassName:(0,vg.default)(`visx-axis-left`,t),labelOffset:r,orientation:Ob.left,tickLabelProps:c,tickLength:a},s))}var jge=[`axisClassName`,`labelOffset`,`tickLength`,`tickLabelProps`];function Rb(){return Rb=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},Rb.apply(this,arguments)}function Mge(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Nge={dy:`0.25em`,fill:`#222`,fontFamily:`Arial`,fontSize:10,textAnchor:`middle`};function zb(e){var t=e.axisClassName,n=e.labelOffset,r=n===void 0?8:n,i=e.tickLength,a=i===void 0?8:i,o=e.tickLabelProps,s=Mge(e,jge),c=typeof o==`function`?o:Rb({},Nge,o);return _.createElement(Ib,Rb({axisClassName:(0,vg.default)(`visx-axis-bottom`,t),labelOffset:r,orientation:Ob.bottom,tickLabelProps:c,tickLength:a},s))}function Pge(e){return!!e&&e instanceof Element}function Fge(e){return!!e&&(e instanceof SVGElement||`ownerSVGElement`in e)}function Ige(e){return!!e&&`createSVGPoint`in e}function Lge(e){return!!e&&`getScreenCTM`in e}function Rge(e){return!!e&&`changedTouches`in e}function zge(e){return!!e&&`clientX`in e}function Bge(e){return!!e&&(e instanceof Event||`nativeEvent`in e&&e.nativeEvent instanceof Event)}function Bb(){return Bb=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},Bb.apply(this,arguments)}var Vb={x:0,y:0};function Vge(e){if(!e)return Bb({},Vb);if(Rge(e))return e.changedTouches.length>0?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:Bb({},Vb);if(zge(e))return{x:e.clientX,y:e.clientY};var t=e?.target,n=t&&`getBoundingClientRect`in t?t.getBoundingClientRect():null;return n?{x:n.x+n.width/2,y:n.y+n.height/2}:Bb({},Vb)}function Hb(e,t){if(!e||!t)return null;var n=Vge(t),r=Fge(e)?e.ownerSVGElement:e,i=Lge(r)?r.getScreenCTM():null;if(Ige(r)&&i){var a=r.createSVGPoint();return a.x=n.x,a.y=n.y,a=a.matrixTransform(i.inverse()),new Mb({x:a.x,y:a.y})}var o=e.getBoundingClientRect();return new Mb({x:n.x-o.left-e.clientLeft,y:n.y-o.top-e.clientTop})}function Hge(e,t){if(Pge(e)&&t)return Hb(e,t);if(Bge(e)){var n=e,r=n.target;if(r)return Hb(r,n)}return null}var Uge=[`tooltipOpen`];function Wge(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Ub(){return Ub=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},Ub.apply(this,arguments)}function Wb(e){var t=(0,_.useState)(Ub({tooltipOpen:!1},e)),n=t[0],r=t[1],i=(0,_.useCallback)(function(e){return r(typeof e==`function`?function(t){t.tooltipOpen;var n=Wge(t,Uge);return Ub({},e(n),{tooltipOpen:!0})}:{tooltipOpen:!0,tooltipLeft:e.tooltipLeft,tooltipTop:e.tooltipTop,tooltipData:e.tooltipData})},[r]),a=(0,_.useCallback)(function(){return r({tooltipOpen:!1,tooltipLeft:void 0,tooltipTop:void 0,tooltipData:void 0})},[r]);return{tooltipOpen:n.tooltipOpen,tooltipLeft:n.tooltipLeft,tooltipTop:n.tooltipTop,tooltipData:n.tooltipData,updateTooltip:r,showTooltip:i,hideTooltip:a}}function Gb(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function Gge({debounce:e,scroll:t,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){let i=n||(typeof window>`u`?class{}:window.ResizeObserver);if(!i)throw Error(`This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills`);let[a,o]=(0,_.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}
12),s=(0,_.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),c=e?typeof e==`number`?e:e.scroll:null,l=e?typeof e==`number`?e:e.resize:null,u=(0,_.useRef)(!1);(0,_.useEffect)(()=>(u.current=!0,()=>void(u.current=!1)));let[d,f,p]=(0,_.useMemo)(()=>{let e=()=>{if(!s.current.element)return;let{left:e,top:t,width:n,height:i,bottom:a,right:c,x:l,y:d}=s.current.element.getBoundingClientRect(),f={left:e,top:t,width:n,height:i,bottom:a,right:c,x:l,y:d};s.current.element instanceof HTMLElement&&r&&(f.height=s.current.element.offsetHeight,f.width=s.current.element.offsetWidth),Object.freeze(f),u.current&&!Yge(s.current.lastBounds,f)&&o(s.current.lastBounds=f)};return[e,l?Gb(e,l):e,c?Gb(e,c):e]},[o,r,c,l]);function m(){s.current.scrollContainers&&(s.current.scrollContainers.forEach(e=>e.removeEventListener(`scroll`,p,!0)),s.current.scrollContainers=null),s.current.resizeObserver&&(s.current.resizeObserver.disconnect(),s.current.resizeObserver=null),s.current.orientationHandler&&(`orientation`in screen&&`removeEventListener`in screen.orientation?screen.orientation.removeEventListener(`change`,s.current.orientationHandler):`onorientationchange`in window&&window.removeEventListener(`orientationchange`,s.current.orientationHandler))}function h(){s.current.element&&(s.current.resizeObserver=new i(p),s.current.resizeObserver.observe(s.current.element),t&&s.current.scrollContainers&&s.current.scrollContainers.forEach(e=>e.addEventListener(`scroll`,p,{capture:!0,passive:!0})),s.current.orientationHandler=()=>{p()},`orientation`in screen&&`addEventListener`in screen.orientation?screen.orientation.addEventListener(`change`,s.current.orientationHandler):`onorientationchange`in window&&window.addEventListener(`orientationchange`,s.current.orientationHandler))}return qge(p,!!t),Kge(f),(0,_.useEffect)(()=>{m(),h()},[t,p,f]),(0,_.useEffect)(()=>m,[]),[e=>{!e||e===s.current.element||(m(),s.current.element=e,s.current.scrollContainers=Kb(e),h())},a,d]}function Kge(e){(0,_.useEffect)(()=>{let t=e;return window.addEventListener(`resize`,t),()=>void window.removeEventListener(`resize`,t)},[e])}function qge(e,t){(0,_.useEffect)(()=>{if(t){let t=e;return window.addEventListener(`scroll`,t,{capture:!0,passive:!0}),()=>void window.removeEventListener(`scroll`,t,!0)}},[e,t])}function Kb(e){let t=[];if(!e||e===document.body)return t;let{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(e);return[n,r,i].some(e=>e===`auto`||e===`scroll`)&&t.push(e),[...t,...Kb(e.parentElement)]}var Jge=[`x`,`y`,`top`,`bottom`,`left`,`right`,`width`,`height`],Yge=(e,t)=>Jge.every(n=>e[n]===t[n]);function Xge(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,qb(e,t)}function qb(e,t){return qb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qb(e,t)}var Jb=function(e){Xge(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.componentWillUnmount=function(){this.node&&document.body&&(document.body.removeChild(this.node),delete this.node)},n.render=function(){return!this.node&&typeof document<`u`&&(this.node=document.createElement(`div`),this.props.zIndex!=null&&(this.node.style.zIndex=``+this.props.zIndex),document.body.append(this.node)),this.node?v.createPortal(this.props.children,this.node):null},t}(_.PureComponent);Jb.propTypes={zIndex:_g.default.oneOfType([_g.default.number,_g.default.string])};var Zge=[`className`,`top`,`left`,`offsetLeft`,`offsetTop`,`style`,`children`,`unstyled`,`applyPositionStyle`];function Yb(){return Yb=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},Yb.apply(this,arguments)}function Qge(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Xb={position:`absolute`,backgroundColor:`white`,color:`#666666`,padding:`.3rem .5rem`,borderRadius:`3px`,fontSize:`14px`,boxShadow:`0 1px 2px rgba(33,33,33,0.2)`,lineHeight:`1em`,pointerEvents:`none`},Zb=_.forwardRef(function(e,t){var n=e.className,r=e.top,i=e.left,a=e.offsetLeft,o=a===void 0?10:a,s=e.offsetTop,c=s===void 0?10:s,l=e.style,u=l===void 0?Xb:l,d=e.children,f=e.unstyled,p=f===void 0?!1:f,m=e.applyPositionStyle,h=m===void 0?!1:m,g=Qge(e,Zge);return _.createElement(`div`,Yb({ref:t,className:(0,vg.default)(`visx-tooltip`,n),style:Yb({top:r==null||c==null?r:r+c,left:i==null||o==null?i:i+o},h&&{position:`absolute`},!p&&u)},g),d)});Zb.propTypes={children:_g.default.node,className:_g.default.string,left:_g.default.number,offsetLeft:_g.default.number,offsetTop:_g.default.number,top:_g.default.number,applyPositionStyle:_g.default.bool,unstyled:_g.default.bool},Zb.displayName=`Tooltip`;function Qb(){return Qb=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},Qb.apply(this,arguments)}function $ge(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function e_e(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$b(e,t)}function $b(e,t){return $b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$b(e,t)}var ex={top:0,right:0,bottom:0,left:0,width:0,height:0};function t_e(e){var t;return t=function(t){e_e(n,t);function n(e){var n=t.call(this,e)||this;return n.state={rect:void 0,parentRect:void 0},n.nodeRef=_.createRef(),n.getRects=n.getRects.bind($ge(n)),n}
12var r=n.prototype;return r.componentDidMount=function(){var e,t=this;this.node=(e=this.nodeRef)!=null&&e.current?this.nodeRef.current:v.findDOMNode(this),this.setState(function(){return t.getRects()})},r.getRects=function(){if(!this.node)return this.state;var e=this.node,t=e.parentNode;return{rect:e.getBoundingClientRect?e.getBoundingClientRect():ex,parentRect:t!=null&&t.getBoundingClientRect?t.getBoundingClientRect():ex}},r.render=function(){return _.createElement(e,Qb({nodeRef:this.nodeRef,getRects:this.getRects},this.state,this.props))},n}(_.PureComponent),t.displayName=`withBoundingRects(`+(e.displayName||``)+`)`,t}var tx=(0,_.createContext)({isFlippedVertically:!1,isFlippedHorizontally:!1}),n_e=tx.Provider;tx.Consumer;var r_e=[`children`,`getRects`,`left`,`offsetLeft`,`offsetTop`,`parentRect`,`rect`,`style`,`top`,`unstyled`,`nodeRef`];function nx(){return nx=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},nx.apply(this,arguments)}function i_e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function rx(e){var t=e.children;e.getRects;var n=e.left,r=n===void 0?0:n,i=e.offsetLeft,a=i===void 0?10:i,o=e.offsetTop,s=o===void 0?10:o,c=e.parentRect,l=e.rect,u=e.style,d=u===void 0?Xb:u,f=e.top,p=f===void 0?0:f,m=e.unstyled,h=m===void 0?!1:m,g=e.nodeRef,v=i_e(e,r_e),y,b=!1,x=!1;if(l&&c){var S=r,C=p;if(c.width){var w=S+a+l.width-c.width,T=l.width-S-a;b=w>0&&w>T}else{var E=S+a+l.width-window.innerWidth,D=l.width-S-a;b=E>0&&E>D}if(c.height){var O=C+s+l.height-c.height,k=l.height-C-s;x=O>0&&O>k}else x=C+s+l.height>window.innerHeight;S=b?S-l.width-a:S+a,C=x?C-l.height-s:C+s,S=Math.round(S),C=Math.round(C),y=`translate(`+S+`px, `+C+`px)`}return _.createElement(Zb,nx({ref:g,style:nx({left:0,top:0,transform:y},!h&&d)},v),_.createElement(n_e,{value:{isFlippedVertically:!x,isFlippedHorizontally:!b}},t))}rx.propTypes={nodeRef:_g.default.oneOfType([_g.default.string,_g.default.func,_g.default.object])};var a_e=t_e(rx),o_e=[`detectBounds`,`zIndex`],s_e=[`left`,`top`,`detectBounds`,`zIndex`];function ix(){return ix=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},ix.apply(this,arguments)}function ax(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function ox(e){var t=e===void 0?{}:e,n=t.detectBounds,r=n===void 0?!0:n,i=t.zIndex,a=Gge(ax(t,o_e)),o=a[0],s=a[1],c=a[2],l=(0,_.useState)(!1),u=l[0],d=l[1];return(0,_.useEffect)(function(){d(!1)},[]),{containerRef:o,containerBounds:s,forceRefreshBounds:c,TooltipInPortal:(0,_.useMemo)(function(){return function(e){var t=e.left,n=t===void 0?0:t,a=e.top,o=a===void 0?0:a,c=e.detectBounds,l=e.zIndex,d=ax(e,s_e),f=c??r,p=l??i,m=f?a_e:Zb,h=u?0:window.scrollX,g=u?0:window.scrollY,v=n+(s.left||0)+h,y=o+(s.top||0)+g;return _.createElement(Jb,{zIndex:p},_.createElement(m,ix({left:v,top:y},d)))}},[r,i,s.left,s.top,u])}}function c_e(e){return e}var sx=1,cx=2,lx=3,ux=4,dx=1e-6;function l_e(e){return`translate(`+e+`,0)`}function u_e(e){return`translate(0,`+e+`)`}function d_e(e){return t=>+e(t)}function f_e(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function p_e(){return!this.__axis}function m_e(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===sx||e===ux?-1:1,u=e===ux||e===cx?`x`:`y`,d=e===sx||e===lx?l_e:u_e;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):c_e),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?f_e:d_e)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge
vendor: 5,002 bytes, line 12
12(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===sx?`0em`:e===lx?`0.71em`:`0.32em`)),f!==b&&(x=x.transition(f),S=S.transition(f),T=T.transition(f),E=E.transition(f),C=C.transition(f).attr(`opacity`,dx).attr(`transform`,function(e){return isFinite(e=y(e))?d(e+c):this.getAttribute(`transform`)}),w.attr(`opacity`,dx).attr(`transform`,function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:y(e))+c)})),C.remove(),x.attr(`d`,e===ux||e===cx?o?`M`+l*o+`,`+_+`H`+c+`V`+v+`H`+l*o:`M`+c+`,`+_+`V`+v:o?`M`+_+`,`+l*o+`V`+c+`H`+v+`V`+l*o:`M`+_+`,`+c+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return d(y(e)+c)}),T.attr(u+`2`,l*a),E.attr(u,l*h).text(m),b.filter(p_e).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===cx?`start`:e===ux?`end`:`middle`),b.each(function(){this.__axis=y})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(a=o=+e,f):a},f.tickSizeInner=function(e){return arguments.length?(a=+e,f):a},f.tickSizeOuter=function(e){return arguments.length?(o=+e,f):o},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.offset=function(e){return arguments.length?(c=+e,f):c},f}function h_e(e){return m_e(lx,e)}var g_e={value:()=>{}};function fx(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new px(n)}function px(e){this._=e}function __e(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}px.prototype=fx.prototype={constructor:px,on:function(e,t){var n=this._,r=__e(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=v_e(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=mx(n[i],e.name,t);else if(t==null)for(i in n)n[i]=mx(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new px(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function v_e(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function mx(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=g_e,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var hx={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function gx(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),hx.hasOwnProperty(t)?{space:hx[t],local:e}:e}function y_e(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function b_e(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function _x(e){var t=gx(e);return(t.local?b_e:y_e)(t)}function x_e(){}function vx(e){return e==null?x_e:function(){return this.querySelector(e)}}function S_e(e){typeof e!=`function`&&(e=vx(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new Nx(r,this._parents)}function C_e(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function w_e(){return[]}function yx(e){return e==null?w_e:function(){return this.querySelectorAll(e)}}function T_e(e){return function(){return C_e(e.apply(this,arguments))}}function E_e(e){e=typeof e==`function`?T_e(e):yx(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new Nx(r,i)}function bx(e){return function(){return this.matches(e)}}function xx(e){return function(t){return t.matches(e)}}var D_e=Array.prototype.find;function O_e(e){return function(){return D_e.call(this.children,e)}}function k_e(){return this.firstElementChild}
vendor: 10,363 bytes, line 12
12function A_e(e){return this.select(e==null?k_e:O_e(typeof e==`function`?e:xx(e)))}var j_e=Array.prototype.filter;function M_e(){return Array.from(this.children)}function N_e(e){return function(){return j_e.call(this.children,e)}}function P_e(e){return this.selectAll(e==null?M_e:N_e(typeof e==`function`?e:xx(e)))}function F_e(e){typeof e!=`function`&&(e=bx(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Nx(r,this._parents)}function Sx(e){return Array(e.length)}function I_e(){return new Nx(this._enter||this._groups.map(Sx),this._parents)}function Cx(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Cx.prototype={constructor:Cx,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function L_e(e){return function(){return e}}function R_e(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new Cx(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function z_e(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new Cx(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function B_e(e){return e.__data__}function V_e(e,t){if(!arguments.length)return Array.from(this,B_e);var n=t?z_e:R_e,r=this._parents,i=this._groups;typeof e!=`function`&&(e=L_e(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=H_e(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new Nx(o,r),o._enter=s,o._exit=c,o}function H_e(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function U_e(){return new Nx(this._exit||this._groups.map(Sx),this._parents)}function W_e(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function G_e(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new Nx(s,this._parents)}function K_e(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function q_e(e){e||=J_e;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new Nx(i,this._parents).order()}function J_e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Y_e(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function X_e(){return Array.from(this)}function Z_e(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Q_e(){let e=0;for(let t of this)++e;return e}function $_e(){return!this.node()}function eve(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function tve(e){return function(){this.removeAttribute(e)}}function nve(e){return function(){this.removeAttributeNS(e.space,e.local)}}function rve(e,t){return function(){this.setAttribute(e,t)}}function ive(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ave(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function ove(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function sve(e,t){var n=gx(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?nve:tve:typeof t==`function`?n.local?ove:ave:n.local?ive:rve)(n,t))}function wx(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function cve(e){return function(){this.style.removeProperty(e)}}function lve(e,t,n){return function(){this.style.setProperty(e,t,n)}}function uve(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function dve(e,t,n){return arguments.length>1?this.each((t==null?cve:typeof t==`function`?uve:lve)(e,t,n??``)):Tx(this.node(),e)}function Tx(e,t){return e.style.getPropertyValue(t)||wx(e).getComputedStyle(e,null).getPropertyValue(t)}function fve(e){return function(){delete this[e]}}function pve(e,t){return function(){this[e]=t}}function mve(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function hve(e,t){return arguments.length>1?this.each((t==null?fve:typeof t==`function`?mve:pve)(e,t)):this.node()[e]}function Ex(e){return e.trim().split(/^|\s+/)}function Dx(e){return e.classList||new Ox(e)}function Ox(e){this._node=e,this._names=Ex(e.getAttribute(`class`)||``)}Ox.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function kx(e,t){for(var n=Dx(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Ax(e,t){for(var n=Dx(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function gve(e){return function(){kx(this,e)}}function _ve(e){return function(){Ax(this,e)}}function vve(e,t){return function(){(t.apply(this,arguments)?kx:Ax)(this,e)}}function yve(e,t){var n=Ex(e+``);if(arguments.length<2){for(var r=Dx(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?vve:t?gve:_ve)(n,t))}function bve(){this.textContent=``}function xve(e){return function(){this.textContent=e}}function Sve(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function Cve(e){return arguments.length?this.each(e==null?bve:(typeof e==`function`?Sve:xve)(e)):this.node().textContent}function wve(){this.innerHTML=``}function Tve(e){return function(){this.innerHTML=e}}function Eve(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function Dve(e){return arguments.length?this.each(e==null?wve:(typeof e==`function`?Eve:Tve)(e)):this.node().innerHTML}function Ove(){this.nextSibling&&this.parentNode.appendChild(this)}function kve(){return this.each(Ove)}function Ave(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function jve(){return this.each(Ave)}function Mve(e){var t=typeof e==`function`?e:_x(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Nve(){return null}function Pve(e,t){var n=typeof e==`function`?e:_x(e),r=t==null?Nve:typeof t==`function`?t:vx(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Fve(){var e=this.parentNode;e&&e.removeChild(this)}function Ive(){return this.each(Fve)}function Lve(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Rve(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function zve(e){return this.select(e?Rve:Lve)}function Bve(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function Vve(e){return function(t){e.call(this,t,this.__data__)}}function Hve(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function Uve(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Wve(e,t,n){return function(){var r=this.__on,i,a=Vve(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Gve(e,t,n){var r=Hve(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?Wve:Uve,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function jx(e,t,n){var r=wx(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Kve(e,t){return function(){return jx(this,e,t)}}function qve(e,t){return function(){return jx(this,e,t.apply(this,arguments))}}function Jve(e,t){return this.each((typeof t==`function`?qve:Kve)(e,t))}function*Yve(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var Mx=[null];function Nx(e,t){this._groups=e,this._parents=t}function Px(){return new Nx([[document.documentElement]],Mx)}function Xve(){return this}Nx.prototype=Px.prototype={constructor:Nx,select:S_e,selectAll:E_e,selectChild:A_e,selectChildren:P_e,filter:F_e,data:V_e,enter:I_e,exit:U_e,join:W_e,merge:G_e,selection:Xve,order:K_e,sort:q_e,call:Y_e,nodes:X_e,node:Z_e,size:Q_e,empty:$_e,each:eve,attr:sve,style:dve,property:hve,classed:yve,text:Cve,html:Dve,raise:kve,lower:jve,append:Mve,insert:Pve,remove:Ive,clone:zve,datum:
12Bve,on:Gve,dispatch:Jve,[Symbol.iterator]:Yve};function Fx(e){return typeof e==`string`?new Nx([[document.querySelector(e)]],[document.documentElement]):new Nx([[e]],Mx)}function Zve(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ix(e,t){if(e=Zve(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var Lx={capture:!0,passive:!1};function Rx(e){e.preventDefault(),e.stopImmediatePropagation()}function Qve(e){var t=e.document.documentElement,n=Fx(e).on(`dragstart.drag`,Rx,Lx);`onselectstart`in t?n.on(`selectstart.drag`,Rx,Lx):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function $ve(e,t){var n=e.document.documentElement,r=Fx(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,Rx,Lx),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var zx=0,Bx=0,Vx=0,Hx=1e3,Ux,Wx,Gx=0,Kx=0,qx=0,Jx=typeof performance==`object`&&performance.now?performance:Date,Yx=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Xx(){return Kx||=(Yx(eye),Jx.now()+qx)}function eye(){Kx=0}function Zx(){this._call=this._time=this._next=null}Zx.prototype=Qx.prototype={constructor:Zx,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?Xx():+n)+(t==null?0:+t),!this._next&&Wx!==this&&(Wx?Wx._next=this:Ux=this,Wx=this),this._call=e,this._time=n,eS()},stop:function(){this._call&&(this._call=null,this._time=1/0,eS())}};function Qx(e,t,n){var r=new Zx;return r.restart(e,t,n),r}function tye(){Xx(),++zx;for(var e=Ux,t;e;)(t=Kx-e._time)>=0&&e._call.call(void 0,t),e=e._next;--zx}function $x(){Kx=(Gx=Jx.now())+qx,zx=Bx=0;try{tye()}finally{zx=0,rye(),Kx=0}}function nye(){var e=Jx.now(),t=e-Gx;t>Hx&&(qx-=t,Gx=e)}function rye(){for(var e,t=Ux,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Ux=n);Wx=e,eS(r)}function eS(e){zx||(Bx&&=clearTimeout(Bx),e-Kx>24?(e<1/0&&(Bx=setTimeout($x,e-Jx.now()-qx)),Vx&&=clearInterval(Vx)):(Vx||=(Gx=Jx.now(),setInterval(nye,Hx)),zx=1,Yx($x)))}function tS(e,t,n){var r=new Zx;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var iye=fx(`start`,`end`,`cancel`,`interrupt`),aye=[];function nS(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;oye(e,n,{name:t,index:r,group:i,on:iye,tween:aye,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function rS(e,t){var n=aS(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function iS(e,t){var n=aS(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function aS(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function oye(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Qx(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return tS(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(tS(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function oS(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function sye(e){return this.each(function(){oS(this,e)})}function cye(e,t){var n,r;return function(){var i=iS(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function lye(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=iS(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function uye(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=aS(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?cye:lye)(n,e,t))}function sS(e,t,n){var r=e._id;return e.each(function(){var e=iS(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return aS(e,r).value[t]}}function cS(e,t){var n;return(typeof t==`number`?Mv:t instanceof P_?jv:(n=P_(t))?(t=n,jv):Fv)(e,t)}function dye(e){return function(){this.removeAttribute(e)}}function fye(e){return function(){this.removeAttributeNS(e.space,e.local)}}function pye(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function mye(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function hye(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function gye(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function _ye(e,t){var n=gx(e),r=n===`transform`?hfe:cS;return this.attrTween(e,typeof t==`function`?(n.local?gye:hye)(n,r,sS(this,`attr.`+e,t)):t==null?(n.local?fye:dye)(n):(n.local?mye:pye)(n,r,t))}function vye(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function yye(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function bye(e,t){var n,r;function i(){var i=t.apply(this,arguments);
vendor: 4,288 bytes, line 12
12return i!==r&&(n=(r=i)&&yye(e,i)),n}return i._value=t,i}function xye(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&vye(e,i)),n}return i._value=t,i}function Sye(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=gx(e);return this.tween(n,(r.local?bye:xye)(r,t))}function Cye(e,t){return function(){rS(this,e).delay=+t.apply(this,arguments)}}function wye(e,t){return t=+t,function(){rS(this,e).delay=t}}function Tye(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Cye:wye)(t,e)):aS(this.node(),t).delay}function Eye(e,t){return function(){iS(this,e).duration=+t.apply(this,arguments)}}function Dye(e,t){return t=+t,function(){iS(this,e).duration=t}}function Oye(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Eye:Dye)(t,e)):aS(this.node(),t).duration}function kye(e,t){if(typeof t!=`function`)throw Error();return function(){iS(this,e).ease=t}}function Aye(e){var t=this._id;return arguments.length?this.each(kye(t,e)):aS(this.node(),t).ease}function jye(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();iS(this,e).ease=n}}function Mye(e){if(typeof e!=`function`)throw Error();return this.each(jye(this._id,e))}function Nye(e){typeof e!=`function`&&(e=bx(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new uS(r,this._parents,this._name,this._id)}function Pye(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new uS(o,this._parents,this._name,this._id)}function Fye(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function Iye(e,t,n){var r,i,a=Fye(t)?rS:iS;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Lye(e,t){var n=this._id;return arguments.length<2?aS(this.node(),n).on.on(e):this.each(Iye(n,e,t))}function Rye(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function zye(){return this.on(`end.remove`,Rye(this._id))}function Bye(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=vx(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,nS(l[f],t,n,f,l,aS(u,n)));return new uS(a,this._parents,t,n)}function Vye(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=yx(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=aS(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&nS(p,t,n,h,f,m);a.push(f),o.push(u)}return new uS(a,o,t,n)}var Hye=Px.prototype.constructor;function Uye(){return new Hye(this._groups,this._parents)}function Wye(e,t){var n,r,i;return function(){var a=Tx(this,e),o=(this.style.removeProperty(e),Tx(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function lS(e){return function(){this.style.removeProperty(e)}}function Gye(e,t,n){var r,i=n+``,a;return function(){var o=Tx(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function Kye(e,t,n){var r,i,a;return function(){var o=Tx(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),Tx(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function qye(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=iS(this,e),l=c.on,u=c.value[a]==null?s||=lS(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function Jye(e,t,n){var r=(e+=``)==`transform`?mfe:cS;return t==null?this.styleTween(e,Wye(e,r)).on(`end.style.`+e,lS(e)):typeof t==`function`?this.styleTween(e,Kye(e,r,sS(this,`style.`+e,t))).each(qye(this._id,e)):this.styleTween(e,Gye(e,r,t),n).on(`end.style.`+e,null)}function Yye(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Xye(e,t,n){var r,i;
vendor: 5,022 bytes, line 12
12function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Yye(e,a,n)),r}return a._value=t,a}function Zye(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,Xye(e,t,n??``))}function Qye(e){return function(){this.textContent=e}}function $ye(e){return function(){var t=e(this);this.textContent=t??``}}function ebe(e){return this.tween(`text`,typeof e==`function`?$ye(sS(this,`text`,e)):Qye(e==null?``:e+``))}function tbe(e){return function(t){this.textContent=e.call(this,t)}}function nbe(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&tbe(r)),t}return r._value=e,r}function rbe(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,nbe(e))}function ibe(){for(var e=this._name,t=this._id,n=dS(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=aS(c,t);nS(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new uS(r,this._parents,e,n)}function abe(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=iS(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var obe=0;function uS(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function sbe(e){return Px().transition(e)}function dS(){return++obe}var fS=Px.prototype;uS.prototype=sbe.prototype={constructor:uS,select:Bye,selectAll:Vye,selectChild:fS.selectChild,selectChildren:fS.selectChildren,filter:Nye,merge:Pye,selection:Uye,transition:ibe,call:fS.call,nodes:fS.nodes,node:fS.node,size:fS.size,empty:fS.empty,each:fS.each,on:Lye,attr:_ye,attrTween:Sye,style:Jye,styleTween:Zye,text:ebe,textTween:rbe,remove:zye,tween:uye,delay:Tye,duration:Oye,ease:Aye,easeVarying:Mye,end:abe,[Symbol.iterator]:fS[Symbol.iterator]};function cbe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var lbe={time:null,delay:0,duration:250,ease:cbe};function ube(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function dbe(e){var t,n;e instanceof uS?(t=e._id,e=e._name):(t=dS(),(n=lbe).time=Xx(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&nS(c,e,t,l,o,n||ube(c,t));return new uS(r,this._parents,e,t)}Px.prototype.interrupt=sye,Px.prototype.transition=dbe;var pS=e=>()=>e;function fbe(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function pbe(e){e.stopImmediatePropagation()}function mS(e){e.preventDefault(),e.stopImmediatePropagation()}var hS={name:`drag`},gS={name:`space`},_S={name:`handle`},vS={name:`center`},{abs:yS,max:bS,min:xS}=Math;function SS(e){return[+e[0],+e[1]]}function CS(e){return[SS(e[0]),SS(e[1])]}var wS={name:`x`,handles:[`w`,`e`].map(kS),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},TS={name:`y`,handles:[`n`,`s`].map(kS),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},mbe={name:`xy`,handles:[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(kS),input:function(e){return e==null?null:CS(e)},output:function(e){return e}},ES={overlay:`crosshair`,selection:`move`,n:`ns-resize`,e:`ew-resize`,s:`ns-resize`,w:`ew-resize`,nw:`nwse-resize`,ne:`nesw-resize`,se:`nwse-resize`,sw:`nesw-resize`},DS={e:`w`,w:`e`,nw:`ne`,ne:`nw`,se:`sw`,sw:`se`},OS={n:`s`,s:`n`,nw:`sw`,ne:`se`,se:`ne`,sw:`nw`},hbe={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},gbe={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function kS(e){return{type:e}}function _be(e){return!e.ctrlKey&&!e.button}function vbe(){var e=this.ownerSVGElement||this;return e.hasAttribute(`viewBox`)?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function ybe(){return navigator.maxTouchPoints||`ontouchstart`in this}function AS(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function bbe(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function xbe(){return jS(wS)}function Sbe(){return jS(TS)}function Cbe(){return jS(mbe)}function jS(e){var t=vbe,n=_be,r=ybe,i=!0,a=fx(`start`,`brush`,`end`),o=6,s;function c(t){var n=t.property(`__brush`,h).selectAll(`.overlay`).data([kS(`overlay`)]);n.enter().append(`rect`).attr(`class`,`overlay`).attr(`pointer-events`,`all`).attr(`curs
12or`,ES.overlay).merge(n).each(function(){var e=AS(this).extent;Fx(this).attr(`x`,e[0][0]).attr(`y`,e[0][1]).attr(`width`,e[1][0]-e[0][0]).attr(`height`,e[1][1]-e[0][1])}),t.selectAll(`.selection`).data([kS(`selection`)]).enter().append(`rect`).attr(`class`,`selection`).attr(`cursor`,ES.selection).attr(`fill`,`#777`).attr(`fill-opacity`,.3).attr(`stroke`,`#fff`).attr(`shape-rendering`,`crispEdges`);var i=t.selectAll(`.handle`).data(e.handles,function(e){return e.type});i.exit().remove(),i.enter().append(`rect`).attr(`class`,function(e){return`handle handle--`+e.type}).attr(`cursor`,function(e){return ES[e.type]}),t.each(l).attr(`fill`,`none`).attr(`pointer-events`,`all`).on(`mousedown.brush`,f).filter(r).on(`touchstart.brush`,f).on(`touchmove.brush`,p).on(`touchend.brush touchcancel.brush`,m).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}c.move=function(t,n,r){t.tween?t.on(`start.brush`,function(e){u(this,arguments).beforestart().start(e)}).on(`interrupt.brush end.brush`,function(e){u(this,arguments).end(e)}).tween(`brush`,function(){var t=this,r=t.__brush,i=u(t,arguments),a=r.selection,o=e.input(typeof n==`function`?n.apply(this,arguments):n,r.extent),s=Iv(a,o);function c(e){r.selection=e===1&&o===null?null:s(e),l.call(t),i.brush()}return a!==null&&o!==null?c:c(1)}):t.each(function(){var t=this,i=arguments,a=t.__brush,o=e.input(typeof n==`function`?n.apply(t,i):n,a.extent),s=u(t,i).beforestart();oS(t),a.selection=o===null?null:o,l.call(t),s.start(r).brush(r).end(r)})},c.clear=function(e,t){c.move(e,null,t)};function l(){var e=Fx(this),t=AS(this).selection;t?(e.selectAll(`.selection`).style(`display`,null).attr(`x`,t[0][0]).attr(`y`,t[0][1]).attr(`width`,t[1][0]-t[0][0]).attr(`height`,t[1][1]-t[0][1]),e.selectAll(`.handle`).style(`display`,null).attr(`x`,function(e){return e.type[e.type.length-1]===`e`?t[1][0]-o/2:t[0][0]-o/2}).attr(`y`,function(e){return e.type[0]===`s`?t[1][1]-o/2:t[0][1]-o/2}).attr(`width`,function(e){return e.type===`n`||e.type===`s`?t[1][0]-t[0][0]+o:o}).attr(`height`,function(e){return e.type===`e`||e.type===`w`?t[1][1]-t[0][1]+o:o})):e.selectAll(`.selection,.handle`).style(`display`,`none`).attr(`x`,null).attr(`y`,null).attr(`width`,null).attr(`height`,null)}function u(e,t,n){var r=e.__brush.emitter;return r&&(!n||!r.clean)?r:new d(e,t,n)}function d(e,t,n){this.that=e,this.args=t,this.state=e.__brush,this.active=0,this.clean=n}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(e,t){return this.starting?(this.starting=!1,this.emit(`start`,e,t)):this.emit(`brush`,e),this},brush:function(e,t){return this.emit(`brush`,e,t),this},end:function(e,t){return--this.active===0&&(delete this.state.emitter,this.emit(`end`,e,t)),this},emit:function(t,n,r){var i=Fx(this.that).datum();a.call(t,this.that,new fbe(t,{sourceEvent:n,target:c,selection:e.output(this.state.selection),mode:r,dispatch:a}),i)}};function f(t){if(s&&!t.touches||!n.apply(this,arguments))return;var r=this,a=t.target.__data__.type,o=(i&&t.metaKey?a=`overlay`:a)===`selection`?hS:i&&t.altKey?vS:_S,c=e===TS?null:hbe[a],d=e===wS?null:gbe[a],f=AS(r),p=f.extent,m=f.selection,h=p[0][0],g,_,v=p[0][1],y,b,x=p[1][0],S,C,w=p[1][1],T,E,D=0,O=0,k,A=c&&d&&i&&t.shiftKey,j,M,N=Array.from(t.touches||[t],e=>{let t=e.identifier;return e=Ix(e,r),e.point0=e.slice(),e.identifier=t,e});oS(r);var P=u(r,arguments,!0).beforestart();if(a===`overlay`){m&&(k=!0);let n=[N[0],N[1]||N[0]];f.selection=m=[[g=e===TS?h:xS(n[0][0],n[1][0]),y=e===wS?v:xS(n[0][1],n[1][1])],[S=e===TS?x:bS(n[0][0],n[1][0]),T=e===wS?w:bS(n[0][1],n[1][1])]],N.length>1&&I(t)}else g=m[0][0],y=m[0][1],S=m[1][0],T=m[1][1];_=g,b=y,C=S,E=T;var F=Fx(r).attr(`pointer-events`,`none`),ee=F.selectAll(`.overlay`).attr(`cursor`,ES[a]);if(t.touches)P.moved=ne,P.ended=re;else{var te=Fx(t.view).on(`mousemove.brush`,ne,!0).on(`mouseup.brush`,re,!0);i&&te.on(`keydown.brush`,ie,!0).on(`keyup.brush`,ae,!0),Qve(t.view)}l.call(r),P.start(t,o.name);function ne(e){for(let t of e.changedTouches||[e])for(let e of N)e.identifier===t.identifier&&(e.cur=Ix(t,r));if(A&&!j&&!M&&N.length===1){let e=N[0];yS(e.cur[0]-e[0])>yS(e.cur[1]-e[1])?M=!0:j=!0}for(let e of N)e.cur&&(e[0]=e.cur[0],e[1]=e.cur[1]);k=!0,mS(e),I(e)}function I(e){let t=N[0],n=t.point0;var i;switch(D=t[0]-n[0],O=t[1]-n[1],o){case gS:case hS:c&&(D=bS(h-g,xS(x-S,D)),_=g+D,C=S+D),d&&(O=bS(v-y,xS(w-T,O)),b=y+O,E=T+O);break;case _S:N[1]?(c&&=(_=bS(h,xS(x,N[0][0])),C=bS(h,xS(x,N[1][0])),1),d&&=(b=bS(v,xS(w,N[0][1])),E=bS(v,xS(w,N[1][1])),1)):(c<0?(D=bS(h-g,xS(x-g,D)),_=g+D,C=S):c>0&&(D=bS(h-S,xS(x-S,D)),_=g,C=S+D),d<0?(O=bS(v-y,xS(w-y,O)),b=y+O,E=T):d>0&&(O=bS(v-T,xS(w-T,O)),b=y,E=T+O));break;case vS:c&&(_=bS(h,xS(x,g-D*c)),C=bS(h,xS(x,S+D*c))),d&&(b=bS(v,xS(w,y-O*d)),E=bS(v,xS(w,T+O*d)));break}
12C<_&&(c*=-1,i=g,g=S,S=i,i=_,_=C,C=i,a in DS&&ee.attr(`cursor`,ES[a=DS[a]])),E<b&&(d*=-1,i=y,y=T,T=i,i=b,b=E,E=i,a in OS&&ee.attr(`cursor`,ES[a=OS[a]])),f.selection&&(m=f.selection),j&&(_=m[0][0],C=m[1][0]),M&&(b=m[0][1],E=m[1][1]),(m[0][0]!==_||m[0][1]!==b||m[1][0]!==C||m[1][1]!==E)&&(f.selection=[[_,b],[C,E]],l.call(r),P.brush(e,o.name))}function re(e){if(pbe(e),e.touches){if(e.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else $ve(e.view,k),te.on(`keydown.brush keyup.brush mousemove.brush mouseup.brush`,null);F.attr(`pointer-events`,`all`),ee.attr(`cursor`,ES.overlay),f.selection&&(m=f.selection),bbe(m)&&(f.selection=null,l.call(r)),P.end(e,o.name)}function ie(e){switch(e.keyCode){case 16:A=c&&d;break;case 18:o===_S&&(c&&(S=C-D*c,g=_+D*c),d&&(T=E-O*d,y=b+O*d),o=vS,I(e));break;case 32:(o===_S||o===vS)&&(c<0?S=C-D:c>0&&(g=_-D),d<0?T=E-O:d>0&&(y=b-O),o=gS,ee.attr(`cursor`,ES.selection),I(e));break;default:return}mS(e)}function ae(e){switch(e.keyCode){case 16:A&&(j=M=A=!1,I(e));break;case 18:o===vS&&(c<0?S=C:c>0&&(g=_),d<0?T=E:d>0&&(y=b),o=_S,I(e));break;case 32:o===gS&&(e.altKey?(c&&(S=C-D*c,g=_+D*c),d&&(T=E-O*d,y=b+O*d),o=vS):(c<0?S=C:c>0&&(g=_),d<0?T=E:d>0&&(y=b),o=_S),ee.attr(`cursor`,ES[a]),I(e));break;default:return}mS(e)}}function p(e){u(this,arguments).moved(e)}function m(e){u(this,arguments).ended(e)}function h(){var n=this.__brush||{selection:null};return n.extent=CS(t.apply(this,arguments)),n.dim=e,n}return c.extent=function(e){return arguments.length?(t=typeof e==`function`?e:pS(CS(e)),c):t},c.filter=function(e){return arguments.length?(n=typeof e==`function`?e:pS(!!e),c):n},c.touchable=function(e){return arguments.length?(r=typeof e==`function`?e:pS(!!e),c):r},c.handleSize=function(e){return arguments.length?(o=+e,c):o},c.keyModifiers=function(e){return arguments.length?(i=!!e,c):i},c.on=function(){var e=a.on.apply(a,arguments);return e===a?c:e},c}var MS=Array.prototype.slice;function wbe(e,t){return e-t}function Tbe(e){for(var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t<n;)r+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1];return r}var NS=e=>()=>e;function Ebe(e,t){for(var n=-1,r=t.length,i;++n<r;)if(i=Dbe(e,t[n]))return i;return 0}function Dbe(e,t){for(var n=t[0],r=t[1],i=-1,a=0,o=e.length,s=o-1;a<o;s=a++){var c=e[a],l=c[0],u=c[1],d=e[s],f=d[0],p=d[1];if(Obe(c,d,t))return 0;u>r!=p>r&&n<(f-l)*(r-u)/(p-u)+l&&(i=-i)}return i}function Obe(e,t,n){var r;return kbe(e,t,n)&&Abe(e[r=+(e[0]===t[0])],n[r],t[r])}function kbe(e,t,n){return(t[0]-e[0])*(n[1]-e[1])===(n[0]-e[0])*(t[1]-e[1])}function Abe(e,t,n){return e<=t&&t<=n||n<=t&&t<=e}function jbe(){}var PS=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function FS(){var e=1,t=1,n=t_,r=c;function i(e){var t=n(e);if(Array.isArray(t))t=t.slice().sort(wbe);else{let n=Fg(e,Mbe);for(t=Zg(...e_(n[0],n[1],t),t);t[t.length-1]>=n[1];)t.pop();for(;t[1]<n[0];)t.shift()}return t.map(t=>a(e,t))}function a(e,t){let n=t==null?NaN:+t;if(isNaN(n))throw Error(`invalid value: ${t}`);var i=[],a=[];return o(e,n,function(t){r(t,e,n),Tbe(t)>0?i.push([t]):a.push(t)}),a.forEach(function(e){for(var t=0,n=i.length,r;t<n;++t)if(Ebe((r=i[t])[0],e)!==-1){r.push(e);return}}),{type:`MultiPolygon`,value:t,coordinates:i}}function o(n,r,i){var a=[],o=[],c=l=-1,l,u,d=IS(n[0],r),f,p;for(PS[d<<1].forEach(m);++c<e-1;)u=d,d=IS(n[c+1],r),PS[u|d<<1].forEach(m);for(PS[d<<0].forEach(m);++l<t-1;){for(c=-1,d=IS(n[l*e+e],r),f=IS(n[l*e],r),PS[d<<1|f<<2].forEach(m);++c<e-1;)u=d,d=IS(n[l*e+e+c+1],r),p=f,f=IS(n[l*e+c+1],r),PS[u|d<<1|f<<2|p<<3].forEach(m);PS[d|f<<3].forEach(m)}for(c=-1,f=n[l*e]>=r,PS[f<<2].forEach(m);++c<e-1;)p=f,f=IS(n[l*e+c+1],r),PS[f<<2|p<<3].forEach(m);PS[f<<3].forEach(m);function m(e){var t=[e[0][0]+c,e[0][1]+l],n=[e[1][0]+c,e[1][1]+l],r=s(t),u=s(n),d,f;(d=o[r])?(f=a[u])?(delete o[d.end],delete a[f.start],d===f?(d.ring.push(n),i(d.ring)):a[d.start]=o[f.end]={start:d.start,end:f.end,ring:d.ring.concat(f.ring)}):(delete o[d.end],d.ring.push(n),o[d.end=u]=d):(d=a[u])?(f=o[r])?(delete a[d.start],delete o[f.end],d===f?(d.ring.push(n),i(d.ring)):a[f.start]=o[d.end]={start:f.start,end:d.end,ring:f.ring.concat(d.ring)}
12):(delete a[d.start],d.ring.unshift(t),a[d.start=r]=d):a[r]=o[u]={start:r,end:u,ring:[t,n]}}}function s(t){return t[0]*2+t[1]*(e+1)*4}function c(n,r,i){n.forEach(function(n){var a=n[0],o=n[1],s=a|0,c=o|0,l=LS(r[c*e+s]);a>0&&a<e&&s===a&&(n[0]=RS(a,LS(r[c*e+s-1]),l,i)),o>0&&o<t&&c===o&&(n[1]=RS(o,LS(r[(c-1)*e+s]),l,i))})}return i.contour=a,i.size=function(n){if(!arguments.length)return[e,t];var r=Math.floor(n[0]),a=Math.floor(n[1]);if(!(r>=0&&a>=0))throw Error(`invalid size`);return e=r,t=a,i},i.thresholds=function(e){return arguments.length?(n=typeof e==`function`?e:NS(Array.isArray(e)?MS.call(e):e),i):n},i.smooth=function(e){return arguments.length?(r=e?c:jbe,i):r===c},i}function Mbe(e){return isFinite(e)?e:NaN}function IS(e,t){return e==null?!1:+e>=t}function LS(e){return e==null||isNaN(e=+e)?-1/0:e}function RS(e,t,n,r){let i=r-t,a=n-t,o=isFinite(i)||isFinite(a)?i/a:Math.sign(i)/Math.sign(a);return isNaN(o)?e:e+o-.5}function Nbe(e){return e[0]}function Pbe(e){return e[1]}function Fbe(){return 1}function Ibe(){var e=Nbe,t=Pbe,n=Fbe,r=960,i=500,a=20,o=2,s=a*3,c=r+s*2>>o,l=i+s*2>>o,u=NS(20);function d(r){var i=new Float32Array(c*l),u=2**-o,d=-1;for(let a of r){var f=(e(a,++d,r)+s)*u,p=(t(a,d,r)+s)*u,m=+n(a,d,r);if(m&&f>=0&&f<c&&p>=0&&p<l){var h=Math.floor(f),g=Math.floor(p),_=f-h-.5,v=p-g-.5;i[h+g*c]+=(1-_)*(1-v)*m,i[h+1+g*c]+=_*(1-v)*m,i[h+1+(g+1)*c]+=_*v*m,i[h+(g+1)*c]+=(1-_)*v*m}}return Dg({data:i,width:c,height:l},a*u),i}function f(e){var t=d(e),n=u(t),r=2**(2*o);return Array.isArray(n)||(n=Zg(Number.MIN_VALUE,n_(t)/r,n)),FS().size([c,l]).thresholds(n.map(e=>e*r))(t).map((e,t)=>(e.value=+n[t],p(e)))}f.contours=function(e){var t=d(e),n=FS().size([c,l]),r=2**(2*o),i=e=>{e=+e;var i=p(n.contour(t,e*r));return i.value=e,i};return Object.defineProperty(i,"max",{get:()=>n_(t)/r}),i};function p(e){return e.coordinates.forEach(m),e}function m(e){e.forEach(h)}function h(e){e.forEach(g)}function g(e){e[0]=e[0]*2**o-s,e[1]=e[1]*2**o-s}function _(){return s=a*3,c=r+s*2>>o,l=i+s*2>>o,f}return f.x=function(t){return arguments.length?(e=typeof t==`function`?t:NS(+t),f):e},f.y=function(e){return arguments.length?(t=typeof e==`function`?e:NS(+e),f):t},f.weight=function(e){return arguments.length?(n=typeof e==`function`?e:NS(+e),f):n},f.size=function(e){if(!arguments.length)return[r,i];var t=+e[0],n=+e[1];if(!(t>=0&&n>=0))throw Error(`invalid size`);return r=t,i=n,_()},f.cellSize=function(e){if(!arguments.length)return 1<<o;if(!((e=+e)>=1))throw Error(`invalid cell size`);return o=Math.floor(Math.log(e)/Math.LN2),_()},f.thresholds=function(e){return arguments.length?(u=typeof e==`function`?e:NS(Array.isArray(e)?MS.call(e):e),f):u},f.bandwidth=function(e){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((e=+e)>=0))throw Error(`invalid bandwidth`);return a=(Math.sqrt(4*e*e+1)-1)/2,_()},f}var zS=11102230246251565e-32,BS=134217729,Lbe=3.000000000000001*zS;function VS(e,t,n,r,i){let a,o,s,c,l=t[0],u=r[0],d=0,f=0;u>l==u>-l?(a=l,l=t[++d]):(a=u,u=r[++f]);let p=0;if(d<e&&f<n)for(u>l==u>-l?(o=l+a,s=a-(o-l),l=t[++d]):(o=u+a,s=a-(o-u),u=r[++f]),a=o,s!==0&&(i[p++]=s);d<e&&f<n;)u>l==u>-l?(o=a+l,c=o-a,s=a-(o-c)+(l-c),l=t[++d]):(o=a+u,c=o-a,s=a-(o-c)+(u-c),u=r[++f]),a=o,s!==0&&(i[p++]=s);for(;d<e;)o=a+l,c=o-a,s=a-(o-c)+(l-c),l=t[++d],a=o,s!==0&&(i[p++]=s);for(;f<n;)o=a+u,c=o-a,s=a-(o-c)+(u-c),u=r[++f],a=o,s!==0&&(i[p++]=s);return(a!==0||p===0)&&(i[p++]=a),p}function Rbe(e,t){let n=t[0];for(let r=1;r<e;r++)n+=t[r];return n}function G(e){return new Float64Array(e)}var zbe=(3+16*zS)*zS,Bbe=(2+12*zS)*zS,Vbe=(9+64*zS)*zS*zS,HS=G(4),US=G(8),WS=G(12),GS=G(16),KS=G(4);function Hbe(e,t,n,r,i,a,o){let s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=e-i,E=n-i,D=t-a,O=r-a;b=T*O,f=BS*T,p=f-(f-T),m=T-p,f=BS*O,h=f-(f-O),g=O-h,x=m*g-(b-p*h-m*h-p*g),S=D*E,f=BS*D,p=f-(f-D),m=D-p,f=BS*E,h=f-(f-E),g=E-h,C=m*g-(S-p*h-m*h-p*g),_=x-C,d=x-_,HS[0]=x-(_+d)+(d-C),v=b+_,d=v-b,y=b-(v-d)+(_-d),_=y-S,d=y-_,HS[1]=y-(_+d)+(d-S),w=v+_,d=w-v,HS[2]=v-(w-d)+(_-d),HS[3]=w;let k=Rbe(4,HS),A=Bbe*o;if(k>=A||-k>=A||(d=e-T,s=e-(T+d)+(d-i),d=n-E,l=n-(E+d)+(d-i),d=t-D,c=t-(D+d)+(d-a),d=r-O,u=r-(O+d)+(d-a),s===0&&c===0&&l===0&&u===0)||(A=Vbe*o+Lbe*Math.abs(k),k+=T*u+O*s-(D*l+E*c),k>=A||-k>=A))return k;b=s*O,f=BS*s,p=f-(f-s),m=s-p,f=BS*O,h=f-(f-O),g=O-h,x=m*g-(b-p*h-m*h-p*g),S=c*E,f=BS*c,p=f-(f-c),m=c-p,f=BS*E,h=f-(f-E),g=E-h,C=m*g-(S-p*h-m*h-p*g),_=x-C,d=x-_,KS[0]=x-(_+d)+(d-C),v=b+_,d=v-b,y=b-(v-d)+(_-d),_=y-S,d=y-_,KS[1]=y-(_+d)+(d-S),w=v+_,d=w-v,KS[2]=v-(w-d)+(_-d),KS[3]=w;let j=VS(4,HS,4,KS,US);b=T*u,f=BS*T,p=f-(f-T),m=T-p,f=BS*u,h=f-(f-u),g=u-h,x=m*g-(b-p*h-m*h-p*g),S=D*l,f=BS*D,p=f-(f-D),m=D-p,f=BS*l,h=f-(f-l),g=l-h,C=m*g-(S-p*h-m*h-p*g),_=x-C,d=x-_,KS[0]=x-(_+d)+(d-C),v=b+_,d=v-b,y=b-(v-d)+(_-d),_=y-S,d=y-_,KS[1]=y-(_+d)+(d-S),w=v+_,d=w-v,KS[2]=v-(w-d)+(_-d),KS[3]=w;let M=VS(j,US,4,KS,WS);return b=s*u,f=BS*s,p=f-(f-s),m=s-p,f=BS*u,h=f-(f-u),g=u-h,x=m*g-(b-p*h-m*h-p*g),S=c*l,f=BS*c,p=f-(f-c),m=c-p,f=BS*l,h=f-(f-l),g=l-h,C=m*g-(S-p*h-m*h-p*g),_=x-C,d=x-_,KS[0]=x-(_+d)+(d-C),v=b+_,d=v-b,y=b-(v-d)+(_-d),_=y-S,d=y-_,KS[1]=y-(_+d)+(d-S),w=v+_,d=w-v,KS[2]=v-(w-d)+(_-d),KS[3]=w,GS[VS(M,WS,4,KS,GS)-1]}
vendor: 44,416 bytes, line 12
12function qS(e,t,n,r,i,a){let o=(t-a)*(n-i),s=(e-i)*(r-a),c=o-s,l=Math.abs(o+s);return Math.abs(c)>=zbe*l?c:-Hbe(e,t,n,r,i,a,l)}(7+56*zS)*zS,(3+28*zS)*zS,(26+288*zS)*zS*zS,G(4),G(4),G(4),G(4),G(4),G(4),G(4),G(4),G(4),G(8),G(8),G(8),G(4),G(8),G(8),G(16),G(12),G(192),G(192),(10+96*zS)*zS,(4+48*zS)*zS,(44+576*zS)*zS*zS,G(4),G(4),G(4),G(4),G(4),G(4),G(4),G(4),G(8),G(8),G(8),G(8),G(8),G(8),G(8),G(8),G(8),G(4),G(4),G(4),G(8),G(16),G(16),G(16),G(32),G(32),G(48),G(64),G(1152),G(1152),(16+224*zS)*zS,(5+72*zS)*zS,(71+1408*zS)*zS*zS,G(4),G(4),G(4),G(4),G(4),G(4),G(4),G(4),G(4),G(4),G(24),G(24),G(24),G(24),G(24),G(24),G(24),G(24),G(24),G(24),G(1152),G(1152),G(1152),G(1152),G(1152),G(2304),G(2304),G(3456),G(5760),G(8),G(8),G(8),G(16),G(24),G(48),G(48),G(96),G(192),G(384),G(384),G(384),G(768),G(96),G(96),G(96),G(1152);var JS=2**-52,YS=new Uint32Array(512),XS=class e{static from(t,n=qbe,r=Jbe){let i=t.length,a=new Float64Array(i*2);for(let e=0;e<i;e++){let i=t[e];a[2*e]=n(i),a[2*e+1]=r(i)}return new e(a)}constructor(e){let t=e.length>>1;if(t>0&&typeof e[0]!=`number`)throw Error(`Expected coords to contain numbers.`);this.coords=e;let n=Math.max(2*t-5,0);this._triangles=new Uint32Array(n*3),this._halfedges=new Int32Array(n*3),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.trianglesLen=0,this._cx=0,this._cy=0,this._hullStart=0,this.hull=this._triangles,this.triangles=this._triangles,this.halfedges=this._halfedges,this.update()}update(){let{coords:e,_hullPrev:t,_hullNext:n,_hullTri:r,_hullHash:i}=this,a=e.length>>1,o=1/0,s=1/0,c=-1/0,l=-1/0;for(let t=0;t<a;t++){let n=e[2*t],r=e[2*t+1];n<o&&(o=n),r<s&&(s=r),n>c&&(c=n),r>l&&(l=r),this._ids[t]=t}let u=(o+c)/2,d=(s+l)/2,f=0,p=0,m=0;for(let t=0,n=1/0;t<a;t++){let r=ZS(u,d,e[2*t],e[2*t+1]);r<n&&(f=t,n=r)}let h=e[2*f],g=e[2*f+1];for(let t=0,n=1/0;t<a;t++){if(t===f)continue;let r=ZS(h,g,e[2*t],e[2*t+1]);r<n&&r>0&&(p=t,n=r)}let _=e[2*p],v=e[2*p+1],y=1/0;for(let t=0;t<a;t++){if(t===f||t===p)continue;let n=Gbe(h,g,_,v,e[2*t],e[2*t+1]);n<y&&(m=t,y=n)}let b=e[2*m],x=e[2*m+1];if(y===1/0){for(let t=0;t<a;t++)this._dists[t]=e[2*t]-e[0]||e[2*t+1]-e[1];QS(this._ids,this._dists,0,a-1);let t=new Uint32Array(a),n=0;for(let e=0,r=-1/0;e<a;e++){let i=this._ids[e],a=this._dists[i];a>r&&(t[n++]=i,r=a)}this.hull=t.subarray(0,n),this.triangles=new Uint32Array,this.halfedges=new Int32Array;return}if(qS(h,g,_,v,b,x)<0){let e=p,t=_,n=v;p=m,_=b,v=x,m=e,b=t,x=n}let S=Kbe(h,g,_,v,b,x);this._cx=S.x,this._cy=S.y;for(let t=0;t<a;t++)this._dists[t]=ZS(e[2*t],e[2*t+1],S.x,S.y);QS(this._ids,this._dists,0,a-1),this._hullStart=f;let C=3;n[f]=t[m]=p,n[p]=t[f]=m,n[m]=t[p]=f,r[f]=0,r[p]=1,r[m]=2,i.fill(-1),i[this._hashKey(h,g)]=f,i[this._hashKey(_,v)]=p,i[this._hashKey(b,x)]=m,this.trianglesLen=0,this._addTriangle(f,p,m,-1,-1,-1);for(let a=0,o=0,s=0;a<this._ids.length;a++){let c=this._ids[a],l=e[2*c],u=e[2*c+1];if(a>0&&Math.abs(l-o)<=JS&&Math.abs(u-s)<=JS||(o=l,s=u,c===f||c===p||c===m))continue;let d=0;for(let e=0,t=this._hashKey(l,u);e<this._hashSize&&(d=i[(t+e)%this._hashSize],!(d!==-1&&d!==n[d]));e++);d=t[d];let h=d,g;for(;g=n[h],qS(l,u,e[2*h],e[2*h+1],e[2*g],e[2*g+1])>=0;)if(h=g,h===d){h=-1;break}if(h===-1)continue;let _=this._addTriangle(h,c,n[h],-1,-1,r[h]);r[c]=this._legalize(_+2),r[h]=_,C++;let v=n[h];for(;g=n[v],qS(l,u,e[2*v],e[2*v+1],e[2*g],e[2*g+1])<0;)_=this._addTriangle(v,c,g,r[c],-1,r[v]),r[c]=this._legalize(_+2),n[v]=v,C--,v=g;if(h===d)for(;g=t[h],qS(l,u,e[2*g],e[2*g+1],e[2*h],e[2*h+1])<0;)_=this._addTriangle(g,c,h,-1,r[h],r[g]),this._legalize(_+2),r[g]=_,n[h]=h,C--,h=g;this._hullStart=t[c]=h,n[h]=t[v]=c,n[c]=v,i[this._hashKey(l,u)]=c,i[this._hashKey(e[2*h],e[2*h+1])]=h}this.hull=new Uint32Array(C);for(let e=0,t=this._hullStart;e<C;e++)this.hull[e]=t,t=n[t];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,t){return Math.floor(Ube(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){let{_triangles:t,_halfedges:n,coords:r}=this,i=0,a=0;for(;;){let o=n[e],s=e-e%3;if(a=s+(e+2)%3,o===-1){if(i===0)break;e=YS[--i];continue}let c=o-o%3,l=s+(e+1)%3,u=c+(o+2)%3,d=t[a],f=t[e],p=t[l],m=t[u];if(Wbe(r[2*d],r[2*d+1],r[2*f],r[2*f+1],r[2*p],r[2*p+1],r[2*m],r[2*m+1])){t[e]=m,t[o]=d;let r=n[u];if(r===-1){let t=this._hullStart;do{if(this._hullTri[t]===u){this._hullTri[t]=e;break}t=this._hullPrev[t]}while(t!==this._hullStart)}this._link(e,r),this._link(o,n[a]),this._link(a,u);let s=c+(o+1)%3;i<YS.length&&(YS[i++]=s)}else{if(i===0)break;e=YS[--i]}}return a}_link(e,t){this._halfedges[e]=t,t!==-1&&(this._halfedges[t]=e)}_addTriangle(e,t,n,r,i,a){let o=this.trianglesLen;return this._triangles[o]=e,this._triangles[o+1]=t,this._triangles[o+2]=n,this._link(o,r),this._link(o+1,i),this._link(o+2,a),this.trianglesLen+=3,o}};function Ube(e,t){let n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}function ZS(e,t,n,r){let i=e-n,a=t-r;return i*i+a*a}function Wbe(e,t,n,r,i,a,o,s){let c=e-o,l=t-s,u=n-o,d=r-s,f=i-o,p=a-s,m=c*c+l*l,h=u*u+d*d,g=f*f+p*p;return c*(d*g-h*p)-l*(u*g-h*f)+m*(u*p-d*f)<0}function Gbe(e,t,n,r,i,a){let o=n-e,s=r-t,c=i-e,l=a-t,u=o*o+s*s,d=c*c+l*l,f=.5/(o*l-s*c),p=(l*u-s*d)*f,m=(o*d-c*u)*f;return p*p+m*m}function Kbe(e,t,n,r,i,a){let o=n-e,s=r-t,c=i-e,l=a-t,u=o*o+s*s,d=c*c+l*l,f=.5/(o*l-s*c);return{x:e+(l*u-s*d)*f,y:t+(o*d-c*u)*f}}function QS(e,t,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){let r=e[i],a=t[r],o=i-1;for(;o>=n&&t[e[o]]>a;)e[o+1]=e[o--];e[o+1]=r}else{let i=n+r>>1,a=n+1,o=r;$S(e,i,a),t[e[n]]>t[e[r]]&&$S(e,n,r),t[e[a]]>t[e[r]]&&$S(e,a,r),t[e[n]]>t[e[a]]&&$S(e,n,a);let s=e[a],c=t[s];for(;;){do a++;while(t[e[a]]<c);do o--;while(t[e[o]]>c);if(o<a)break;$S(e,a,o)}e[n+1]=e[o],e[o]=s,r-a+1>=o-n?(QS(e,t,a,r),QS(e,t,n,o-1)):(QS(e,t,n,o-1),QS(e,t,a,r))}}function $S(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function qbe(e){return e[0]}function Jbe(e){return e[1]}var eC=1e-6,tC=class{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=``}moveTo(e,t){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=`Z`)}lineTo(e,t){this._+=`L${this._x1=+e},${this._y1=+t}`}arc(e,t,n){e=+e,t=+t,n=+n;let r=e+n,i=t;if(n<0)throw Error(`negative radius`);this._x1===null?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>eC||Math.abs(this._y1-i)>eC)&&(this._+=`L`+r+`,`+i),n&&(this._+=`A${n},${n},0,1,1,${e-n},${t}A${n},${n},0,1,1,${this._x1=r},${this._y1=i}`)}rect(e,t,n,r){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${+n}v${+r}h${-n}Z`}value(){return this._||null}},nC=class{constructor(){this._=[]}moveTo(e,t){this._.push([e,t])}closePath(){this._.push(this._[0].slice())}lineTo(e,t){this._.push([e,t])}value(){return this._.length?this._:null}},Ybe=class{constructor(e,[t,n,r,i]=[0,0,960,500]){if(!((r=+r)>=(t=+t))||!((i=+i)>=(n=+n)))throw Error(`invalid bounds`);this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=r,this.xmin=t,this.ymax=i,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){let{delaunay:{points:e,hull:t,triangles:n},vectors:r}=this,i=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let t=0,r=0,a=n.length,o,s;t<a;t+=3,r+=2){let a=n[t]*2,c=n[t+1]*2,l=n[t+2]*2,u=e[a],d=e[a+1],f=e[c],p=e[c+1],m=e[l],h=e[l+1],g=f-u,_=p-d,v=m-u,y=h-d,b=(g*y-_*v)*2;if(Math.abs(b)<1e-9){let t=1e9,r=n[0]*2;t*=Math.sign((e[r]-u)*y-(e[r+1]-d)*v),o=(u+m)/2-t*y,s=(d+h)/2+t*v}else{let e=1/b,t=g*g+_*_,n=v*v+y*y;o=u+(y*t-_*n)*e,s=d+(g*n-v*t)*e}i[r]=o,i[r+1]=s}let a=t[t.length-1],o,s=a*4,c,l=e[2*a],u,d=e[2*a+1];r.fill(0);for(let n=0;n<t.length;++n)a=t[n],o=s,c=l,u=d,s=a*4,l=e[2*a],d=e[2*a+1],r[o+2]=r[s]=u-d,r[o+3]=r[s+1]=l-c}render(e){let t=e==null?e=new tC:void 0,{delaunay:{halfedges:n,inedges:r,hull:i},circumcenters:a,vectors:o}=this;if(i.length<=1)return null;for(let t=0,r=n.length;t<r;++t){let r=n[t];if(r<t)continue;let i=Math.floor(t/3)*2,o=Math.floor(r/3)*2,s=a[i],c=a[i+1],l=a[o],u=a[o+1];this._renderSegment(s,c,l,u,e)}let s,c=i[i.length-1];for(let t=0;t<i.length;++t){s=c,c=i[t];let n=Math.floor(r[c]/3)*2,l=a[n],u=a[n+1],d=s*4,f=this._project(l,u,o[d+2],o[d+3]);f&&this._renderSegment(l,u,f[0],f[1],e)}return t&&t.value()}renderBounds(e){let t=e==null?e=new tC:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),t&&t.value()}renderCell(e,t){let n=t==null?t=new tC:void 0,r=this._clip(e);if(r===null||!r.length)return;t.moveTo(r[0],r[1]);let i=r.length;for(;r[0]===r[i-2]&&r[1]===r[i-1]&&i>1;)i-=2;for(let e=2;e<i;e+=2)(r[e]!==r[e-2]||r[e+1]!==r[e-1])&&t.lineTo(r[e],r[e+1]);return t.closePath(),n&&n.value()}*cellPolygons(){let{delaunay:{points:e}}=this;for(let t=0,n=e.length/2;t<n;++t){let e=this.cellPolygon(t);e&&(e.index=t,yield e)}}cellPolygon(e){let t=new nC;return this.renderCell(e,t),t.value()}_renderSegment(e,t,n,r,i){let a,o=this._regioncode(e,t),s=this._regioncode(n,r);o===0&&s===0?(i.moveTo(e,t),i.lineTo(n,r)):(a=this._clipSegment(e,t,n,r,o,s))&&(i.moveTo(a[0],a[1]),i.lineTo(a[2],a[3]))}contains(e,t,n){return(t=+t,t!==t)||(n=+n,n!==n)?!1:this.delaunay._step(e,t,n)===e}*neighbors(e){let t=this._clip(e);if(t)for(let n of this.delaunay.neighbors(e)){let e=this._clip(n);if(e){loop:for(let r=0,i=t.length;r<i;r+=2)for(let a=0,o=e.length;a<o;a+=2)if(t[r]==e[a]&&t[r+1]==e[a+1]&&t[(r+2)%i]==e[(a+o-2)%o]&&t[(r+3)%i]==e[(a+o-1)%o]){yield n;break loop}}}}_cell(e){let{circumcenters:t,delaunay:{inedges:n,halfedges:r,triangles:i}}=this,a=n[e];if(a===-1)return null;let o=[],s=a;do{let n=Math.floor(s/3);if(o.push(t[n*2],t[n*2+1]),s=s%3==2?s-2:s+1,i[s]!==e)break;s=r[s]}while(s!==a&&s!==-1);return o}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];let t=this._cell(e);if(t===null)return null;let{vectors:n}=this,r=e*4;return n[r]||n[r+1]?this._clipInfinite(e,t,n[r],n[r+1],n[r+2],n[r+3]):this._clipFinite(e,t)}_clipFinite(e,t){let n=t.length,r=null,i,a,o=t[n-2],s=t[n-1],c,l=this._regioncode(o,s),u,d=0;for(let f=0;f<n;f+=2)if(i=o,a=s,o=t[f],s=t[f+1],c=l,l=this._regioncode(o,s),c===0&&l===0)u=d,d=0,r?r.push(o,s):r=[o,s];else{let t,n,f,p,m;if(c===0){if((t=this._clipSegment(i,a,o,s,c,l))===null)continue;[n,f,p,m]=t}else{if((t=this._clipSegment(o,s,i,a,l,c))===null)continue;[p,m,n,f]=t,u=d,d=this._edgecode(n,f),u&&d&&this._edge(e,u,d,r,r.length),r?r.push(n,f):r=[n,f]}u=d,d=this._edgecode(p,m),u&&d&&this._edge(e,u,d,r,r.length),r?r.push(p,m):r=[p,m]}if(r)u=d,d=this._edgecode(r[0],r[1]),u&&d&&this._edge(e,u,d,r,r.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return r}_clipSegment(e,t,n,r,i,a){for(;;){if(i===0&&a===0)return[e,t,n,r];if(i&a)return null;let o,s,c=i||a;c&8?(o=e+(n-e)*(this.ymax-t)/(r-t),s=this.ymax):c&4?(o=e+(n-e)*(this.ymin-t)/(r-t),s=this.ymin):c&2?(s=t+(r-t)*(this.xmax-e)/(n-e),o=this.xmax):(s=t+(r-t)*(this.xmin-e)/(n-e),o=this.xmin),i?(e=o,t=s,i=this._regioncode(e,t)):(n=o,r=s,a=this._regioncode(n,r))}}_clipInfinite(e,t,n,r,i,a){let o=Array.from(t),s;if((s=this._project(o[0],o[1],n,r))&&o.unshift(s[0],s[1]),(s=this._project(o[o.length-2],o[o.length-1],i,a))&&o.push(s[0],s[1]),o=this._clipFinite(e,o))for(let t=0,n=o.length,r,i=this._edgecode(o[n-2],o[n-1]);t<n;t+=2)r=i,i=this._edgecode(o[t],o[t+1]),r&&i&&(t=this._edge(e,r,i,o,t),n=o.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(o=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return o}_edge(e,t,n,r,i){for(;t!==n;){let n,a;switch(t){case 5:t=4;continue;case 4:t=6,n=this.xmax,a=this.ymin;break;case 6:t=2;continue;case 2:t=10,n=this.xmax,a=this.ymax;break;case 10:t=8;continue;case 8:t=9,n=this.xmin,a=this.ymax;break;case 9:t=1;continue;case 1:t=5,n=this.xmin,a=this.ymin;break}(r[i]!==n||r[i+1]!==a)&&this.contains(e,n,a)&&(r.splice(i,0,n,a),i+=2)}if(r.length>4)for(let e=0;e<r.length;e+=2){let t=(e+2)%r.length,n=(e+4)%r.length;(r[e]===r[t]&&r[t]===r[n]||r[e+1]===r[t+1]&&r[t+1]===r[n+1])&&(r.splice(t,2),e-=2)}return i}_project(e,t,n,r){let i=1/0,a,o,s;if(r<0){if(t<=this.ymin)return null;(a=(this.ymin-t)/r)<i&&(s=this.ymin,o=e+(i=a)*n)}else if(r>0){if(t>=this.ymax)return null;(a=(this.ymax-t)/r)<i&&(s=this.ymax,o=e+(i=a)*n)}if(n>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/n)<i&&(o=this.xmax,s=t+(i=a)*r)}else if(n<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/n)<i&&(o=this.xmin,s=t+(i=a)*r)}return[o,s]}_edgecode(e,t){return(e===this.xmin?1:e===this.xmax?2:0)|(t===this.ymin?4:t===this.ymax?8:0)}_regioncode(e,t){return(e<this.xmin?1:e>this.xmax?2:0)|(t<this.ymin?4:t>this.ymax?8:0)}},Xbe=2*Math.PI,rC=Math.pow;function Zbe(e){return e[0]}function Qbe(e){return e[1]}function $be(e){let{triangles:t,coords:n}=e;for(let e=0;e<t.length;e+=3){let r=2*t[e],i=2*t[e+1],a=2*t[e+2];if((n[a]-n[r])*(n[i+1]-n[r+1])-(n[i]-n[r])*(n[a+1]-n[r+1])>1e-10)return!1}return!0}function exe(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}var iC=class e{static from(t,n=Zbe,r=Qbe,i){return new e(`length`in t?txe(t,n,r,i):Float64Array.from(nxe(t,n,r,i)))}constructor(e){this._delaunator=new XS(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){let e=this._delaunator,t=this.points;if(e.hull&&e.hull.length>2&&$be(e)){this.collinear=Int32Array.from({length:t.length/2},(e,t)=>t).sort((e,n)=>t[2*e]-t[2*n]||t[2*e+1]-t[2*n+1]);let e=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[t[2*e],t[2*e+1],t[2*n],t[2*n+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let e=0,n=t.length/2;e<n;++e){let n=exe(t[2*e],t[2*e+1],i);t[2*e]=n[0],t[2*e+1]=n[1]}this._delaunator=new XS(t)}else delete this.collinear;let n=this.halfedges=this._delaunator.halfedges,r=this.hull=this._delaunator.hull,i=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),o=this._hullIndex.fill(-1);for(let e=0,t=n.length;e<t;++e){let t=i[e%3==2?e-2:e+1];(n[e]===-1||a[t]===-1)&&(a[t]=e)}for(let e=0,t=r.length;e<t;++e)o[r[e]]=e;r.length<=2&&r.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],a[r[0]]=1,r.length===2&&(a[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(e){return new Ybe(this,e)}*neighbors(e){let{inedges:t,hull:n,_hullIndex:r,halfedges:i,triangles:a,collinear:o}=this;if(o){let t=o.indexOf(e);t>0&&(yield o[t-1]),t<o.length-1&&(yield o[t+1]);return}let s=t[e];if(s===-1)return;let c=s,l=-1;do{if(yield l=a[c],c=c%3==2?c-2:c+1,a[c]!==e)return;if(c=i[c],c===-1){let t=n[(r[e]+1)%n.length];t!==l&&(yield t);return}}while(c!==s)}find(e,t,n=0){if((e=+e,e!==e)||(t=+t,t!==t))return-1;let r=n,i;for(;(i=this._step(n,e,t))>=0&&i!==n&&i!==r;)n=i;return i}_step(e,t,n){let{inedges:r,hull:i,_hullIndex:a,halfedges:o,triangles:s,points:c}=this;if(r[e]===-1||!c.length)return(e+1)%(c.length>>1);let l=e,u=rC(t-c[e*2],2)+rC(n-c[e*2+1],2),d=r[e],f=d;do{let r=s[f],d=rC(t-c[r*2],2)+rC(n-c[r*2+1],2);if(d<u&&(u=d,l=r),f=f%3==2?f-2:f+1,s[f]!==e)break;if(f=o[f],f===-1){if(f=i[(a[e]+1)%i.length],f!==r&&rC(t-c[f*2],2)+rC(n-c[f*2+1],2)<u)return f;break}}while(f!==d);return l}render(e){let t=e==null?e=new tC:void 0,{points:n,halfedges:r,triangles:i}=this;for(let t=0,a=r.length;t<a;++t){let a=r[t];if(a<t)continue;let o=i[t]*2,s=i[a]*2;e.moveTo(n[o],n[o+1]),e.lineTo(n[s],n[s+1])}return this.renderHull(e),t&&t.value()}renderPoints(e,t){t===void 0&&(!e||typeof e.moveTo!=`function`)&&(t=e,e=null),t=t==null?2:+t;let n=e==null?e=new tC:void 0,{points:r}=this;for(let n=0,i=r.length;n<i;n+=2){let i=r[n],a=r[n+1];e.moveTo(i+t,a),e.arc(i,a,t,0,Xbe)}return n&&n.value()}renderHull(e){let t=e==null?e=new tC:void 0,{hull:n,points:r}=this,i=n[0]*2,a=n.length;e.moveTo(r[i],r[i+1]);for(let t=1;t<a;++t){let i=2*n[t];e.lineTo(r[i],r[i+1])}return e.closePath(),t&&t.value()}hullPolygon(){let e=new nC;return this.renderHull(e),e.value()}renderTriangle(e,t){let n=t==null?t=new tC:void 0,{points:r,triangles:i}=this,a=i[e*=3]*2,o=i[e+1]*2,s=i[e+2]*2;return t.moveTo(r[a],r[a+1]),t.lineTo(r[o],r[o+1]),t.lineTo(r[s],r[s+1]),t.closePath(),n&&n.value()}*trianglePolygons(){let{triangles:e}=this;for(let t=0,n=e.length/3;t<n;++t)yield this.trianglePolygon(t)}trianglePolygon(e){let t=new nC;return this.renderTriangle(e,t),t.value()}};function txe(e,t,n,r){let i=e.length,a=new Float64Array(i*2);for(let o=0;o<i;++o){let i=e[o];a[o*2]=t.call(r,i,o,e),a[o*2+1]=n.call(r,i,o,e)}return a}function*nxe(e,t,n,r){let i=0;for(let a of e)yield t.call(r,a,i,e),yield n.call(r,a,i,e),++i}var aC=1e-6,oC=Math.PI,sC=oC/2,cC=oC/4,lC=oC*2,uC=180/oC,dC=oC/180,fC=Math.abs,pC=Math.atan,mC=Math.atan2,hC=Math.cos,gC=Math.ceil,_C=Math.exp,vC=Math.hypot,yC=Math.log,bC=Math.pow,xC=Math.sin,SC=Math.sign||function(e){return e>0?1:e<0?-1:0},CC=Math.sqrt,wC=Math.tan;function TC(e){return e>1?0:e<-1?oC:Math.acos(e)}function EC(e){return e>1?sC:e<-1?-sC:Math.asin(e)}function DC(){}function OC(e,t){e&&AC.hasOwnProperty(e.type)&&AC[e.type](e,t)}var kC={Feature:function(e,t){OC(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)OC(n[r].geometry,t)}},AC={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){jC(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)jC(n[r],t,0)},Polygon:function(e,t){MC(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)MC(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)OC(n[r],t)}};function jC(e,t,n){var r=-1,i=e.length-n,a;for(t.lineStart();++r<i;)a=e[r],t.point(a[0],a[1],a[2]);t.lineEnd()}function MC(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)jC(e[n],t,1);t.polygonEnd()}function NC(e,t){e&&kC.hasOwnProperty(e.type)?kC[e.type](e,t):OC(e,t)}function PC(e){return[mC(e[1],e[0]),EC(e[2])]}function FC(e){var t=e[0],n=e[1],r=hC(n);return[r*hC(t),r*xC(t),xC(n)]}function IC(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function LC(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function RC(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function zC(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function BC(e){var t=CC(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var VC,HC,UC,WC,GC,KC,qC,JC,YC,XC,ZC,QC,$C,ew,tw,nw,rw={sphere:DC,point:iw,lineStart:ow,lineEnd:sw,polygonStart:function(){rw.lineStart=axe,rw.lineEnd=oxe},polygonEnd:function(){rw.lineStart=ow,rw.lineEnd=sw}};function iw(e,t){e*=dC,t*=dC;var n=hC(t);aw(n*hC(e),n*xC(e),xC(t))}function aw(e,t,n){++VC,UC+=(e-UC)/VC,WC+=(t-WC)/VC,GC+=(n-GC)/VC}function ow(){rw.point=rxe}function rxe(e,t){e*=dC,t*=dC;var n=hC(t);ew=n*hC(e),tw=n*xC(e),nw=xC(t),rw.point=ixe,aw(ew,tw,nw)}function ixe(e,t){e*=dC,t*=dC;var n=hC(t),r=n*hC(e),i=n*xC(e),a=xC(t),o=mC(CC((o=tw*a-nw*i)*o+(o=nw*r-ew*a)*o+(o=ew*i-tw*r)*o),ew*r+tw*i+nw*a);HC+=o,KC+=o*(ew+(ew=r)),qC+=o*(tw+(tw=i)),JC+=o*(nw+(nw=a)),aw(ew,tw,nw)}function sw(){rw.point=iw}function axe(){rw.point=sxe}function oxe(){cw(QC,$C),rw.point=iw}function sxe(e,t){QC=e,$C=t,e*=dC,t*=dC,rw.point=cw;var n=hC(t);ew=n*hC(e),tw=n*xC(e),nw=xC(t),aw(ew,tw,nw)}function cw(e,t){e*=dC,t*=dC;var n=hC(t),r=n*hC(e),i=n*xC(e),a=xC(t),o=tw*a-nw*i,s=nw*r-ew*a,c=ew*i-tw*r,l=vC(o,s,c),u=EC(l),d=l&&-u/l;YC.add(d*o),XC.add(d*s),ZC.add(d*c),HC+=u,KC+=u*(ew+(ew=r)),qC+=u*(tw+(tw=i)),JC+=u*(nw+(nw=a)),aw(ew,tw,nw)}function cxe(e){VC=HC=UC=WC=GC=KC=qC=JC=0,YC=new Ig,XC=new Ig,ZC=new Ig,NC(e,rw);var t=+YC,n=+XC,r=+ZC,i=vC(t,n,r);return i<1e-12&&(t=KC,n=qC,r=JC,HC<1e-6&&(t=UC,n=WC,r=GC),i=vC(t,n,r),i<1e-12)?[NaN,NaN]:[mC(n,t)*uC,EC(r/i)*uC]}function lw(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return n=t.invert(n,r),n&&e.invert(n[0],n[1])}),n}function uw(e,t){return fC(e)>oC&&(e-=Math.round(e/lC)*lC),[e,t]}uw.invert=uw;function dw(e,t,n){return(e%=lC)?t||n?lw(pw(e),mw(t,n)):pw(e):t||n?mw(t,n):uw}function fw(e){return function(t,n){return t+=e,fC(t)>oC&&(t-=Math.round(t/lC)*lC),[t,n]}}function pw(e){var t=fw(e);return t.invert=fw(-e),t}function mw(e,t){var n=hC(e),r=xC(e),i=hC(t),a=xC(t);function o(e,t){var o=hC(t),s=hC(e)*o,c=xC(e)*o,l=xC(t),u=l*n+s*r;return[mC(c*i-u*a,s*n-l*r),EC(u*i+c*a)]}return o.invert=function(e,t){var o=hC(t),s=hC(e)*o,c=xC(e)*o,l=xC(t),u=l*i-c*a;return[mC(c*i+l*a,s*n+u*r),EC(u*n-s*r)]},o}function lxe(e){e=dw(e[0]*dC,e[1]*dC,e.length>2?e[2]*dC:0);function t(t){return t=e(t[0]*dC,t[1]*dC),t[0]*=uC,t[1]*=uC,t}return t.invert=function(t){return t=e.invert(t[0]*dC,t[1]*dC),t[0]*=uC,t[1]*=uC,t},t}function uxe(e,t,n,r,i,a){if(n){var o=hC(t),s=xC(t),c=r*n;i==null?(i=t+r*lC,a=t-c/2):(i=hw(o,i),a=hw(o,a),(r>0?i<a:i>a)&&(i+=r*lC));for(var l,u=i;r>0?u>a:u<a;u-=c)l=PC([o,-s*hC(u),-s*xC(u)]),e.point(l[0],l[1])}}function hw(e,t){t=FC(t),t[0]-=e,BC(t);var n=TC(-t[1]);return((-t[2]<0?-n:n)+lC-aC)%lC}function gw(){var e=[],t;return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:DC,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function _w(e,t){return fC(e[0]-t[0])<1e-6&&fC(e[1]-t[1])<1e-6}function vw(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function yw(e,t,n,r,i){var a=[],o=[],s,c;if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t],c;if(_w(n,r)){if(!n[2]&&!r[2]){for(i.lineStart(),s=0;s<t;++s)i.point((n=e[s])[0],n[1]);i.lineEnd();return}r[0]+=2*aC}a.push(c=new vw(n,e,null,!0)),o.push(c.o=new vw(n,null,c,!1)),a.push(c=new vw(r,e,null,!1)),o.push(c.o=new vw(r,null,c,!0))}}),a.length){for(o.sort(t),bw(a),bw(o),s=0,c=o.length;s<c;++s)o[s].e=n=!n;for(var l=a[0],u,d;;){for(var f=l,p=!0;f.v;)if((f=f.n)===l)return;u=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(s=0,c=u.length;s<c;++s)i.point((d=u[s])[0],d[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(p)for(u=f.p.z,s=u.length-1;s>=0;--s)i.point((d=u[s])[0],d[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,u=f.z,p=!p}while(!f.v);i.lineEnd()}}}function bw(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function xw(e){return fC(e[0])<=oC?e[0]:SC(e[0])*((fC(e[0])+oC)%lC-oC)}function dxe(e,t){var n=xw(t),r=t[1],i=xC(r),a=[xC(n),-hC(n),0],o=0,s=0,c=new Ig;i===1?r=sC+aC:i===-1&&(r=-sC-aC);for(var l=0,u=e.length;l<u;++l)if(f=(d=e[l]).length)for(var d,f,p=d[f-1],m=xw(p),h=p[1]/2+cC,g=xC(h),_=hC(h),v=0;v<f;++v,m=b,g=S,_=C,p=y){var y=d[v],b=xw(y),x=y[1]/2+cC,S=xC(x),C=hC(x),w=b-m,T=w>=0?1:-1,E=T*w,D=E>oC,O=g*S;if(c.add(mC(O*T*xC(E),_*C+O*hC(E))),o+=D?w+T*lC:w,D^m>=n^b>=n){var k=LC(FC(p),FC(y));BC(k);var A=LC(a,k);BC(A);var j=(D^w>=0?-1:1)*EC(A[2]);(r>j||r===j&&(k[0]||k[1]))&&(s+=D^w>=0?1:-1)}}return(o<-1e-6||o<1e-6&&c<-1e-12)^s&1}function Sw(e,t,n,r){return function(i){var a=t(i),o=gw(),s=t(o),c=!1,l,u,d,f={point:p,lineStart:h,lineEnd:g,polygonStart:function(){f.point=_,f.lineStart=v,f.lineEnd=y,u=[],l=[]},polygonEnd:function(){f.point=p,f.lineStart=h,f.lineEnd=g,u=d_(u);var e=dxe(l,r);u.length?(c||=(i.polygonStart(),!0),yw(u,pxe,e,n,i)):e&&(c||=(i.polygonStart(),!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),c&&=(i.polygonEnd(),!1),u=l=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(t,n){e(t,n)&&i.point(t,n)}function m(e,t){a.point(e,t)}function h(){f.point=m,a.lineStart()}function g(){f.point=p,a.lineEnd()}function _(e,t){d.push([e,t]),s.point(e,t)}function v(){s.lineStart(),d=[]}function y(){_(d[0][0],d[0][1]),s.lineEnd();var e=s.clean(),t=o.result(),n,r=t.length,a,f,p;if(d.pop(),l.push(d),d=null,r){if(e&1){if(f=t[0],(a=f.length-1)>0){for(c||=(i.polygonStart(),!0),i.lineStart(),n=0;n<a;++n)i.point((p=f[n])[0],p[1]);i.lineEnd()}return}r>1&&e&2&&t.push(t.pop().concat(t.shift())),u.push(t.filter(fxe))}}return f}}function fxe(e){return e.length>1}function pxe(e,t){return((e=e.x)[0]<0?e[1]-sC-aC:sC-e[1])-((t=t.x)[0]<0?t[1]-sC-aC:sC-t[1])}var Cw=Sw(function(){return!0},mxe,gxe,[-oC,-sC]);function mxe(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(a,o){var s=a>0?oC:-oC,c=fC(a-t);fC(c-oC)<1e-6?(e.point(t,n=(n+o)/2>0?sC:-sC),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(a,n),i=0):r!==s&&c>=oC&&(fC(t-r)<1e-6&&(t-=r*aC),fC(a-s)<1e-6&&(a-=s*aC),n=hxe(t,n,a,o),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),i=0),e.point(t=a,n=o),r=s},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function hxe(e,t,n,r){var i,a,o=xC(e-n);return fC(o)>1e-6?pC((xC(t)*(a=hC(r))*xC(n)-xC(r)*(i=hC(t))*xC(e))/(i*a*o)):(t+r)/2}function gxe(e,t,n,r){var i;if(e==null)i=n*sC,r.point(-oC,i),r.point(0,i),r.point(oC,i),r.point(oC,0),r.point(oC,-i),r.point(0,-i),r.point(-oC,-i),r.point(-oC,0),r.point(-oC,i);else if(fC(e[0]-t[0])>1e-6){var a=e[0]<t[0]?oC:-oC;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(t[0],t[1])}function _xe(e){var t=hC(e),n=6*dC,r=t>0,i=fC(t)>aC;function a(t,r,i,a){uxe(a,e,n,i,t,r)}function o(e,n){return hC(e)*hC(n)>t}function s(e){var t,n,a,s,u;return{lineStart:function(){s=a=!1,u=1},point:function(d,f){var p=[d,f],m,h=o(d,f),g=r?h?0:l(d,f):h?l(d+(d<0?oC:-oC),f):0;if(!t&&(s=a=h)&&e.lineStart(),h!==a&&(m=c(t,p),(!m||_w(t,m)||_w(p,m))&&(p[2]=1)),h!==a)u=0,h?(e.lineStart(),m=c(p,t),e.point(m[0],m[1])):(m=c(t,p),e.point(m[0],m[1],2),e.lineEnd()),t=m;else if(i&&t&&r^h){var _;!(g&n)&&(_=c(p,t,!0))&&(u=0,r?(e.lineStart(),e.point(_[0][0],_[0][1]),e.point(_[1][0],_[1][1]),e.lineEnd()):(e.point(_[1][0],_[1][1]),e.lineEnd(),e.lineStart(),e.point(_[0][0],_[0][1],3)))}h&&(!t||!_w(t,p))&&e.point(p[0],p[1]),t=p,a=h,n=g},lineEnd:function(){a&&e.lineEnd(),t=null},clean:function(){return u|(s&&a)<<1}}}function c(e,n,r){var i=FC(e),a=FC(n),o=[1,0,0],s=LC(i,a),c=IC(s,s),l=s[0],u=c-l*l;if(!u)return!r&&e;var d=t*c/u,f=-t*l/u,p=LC(o,s),m=zC(o,d);RC(m,zC(s,f));var h=p,g=IC(m,h),_=IC(h,h),v=g*g-_*(IC(m,m)-1);if(!(v<0)){var y=CC(v),b=zC(h,(-g-y)/_);if(RC(b,m),b=PC(b),!r)return b;var x=e[0],S=n[0],C=e[1],w=n[1],T;S<x&&(T=x,x=S,S=T);var E=S-x,D=fC(E-oC)<aC,O=D||E<1e-6;if(!D&&w<C&&(T=C,C=w,w=T),O?D?C+w>0^b[1]<(fC(b[0]-x)<1e-6?C:w):C<=b[1]&&b[1]<=w:E>oC^(x<=b[0]&&b[0]<=S)){var k=zC(h,(-g+y)/_);return RC(k,m),[b,PC(k)]}}}function l(t,n){var i=r?e:oC-e,a=0;return t<-i?a|=1:t>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return Sw(o,s,a,r?[0,-e]:[-oC,e-oC])}function vxe(e,t,n,r,i,a){var o=e[0],s=e[1],c=t[0],l=t[1],u=0,d=1,f=c-o,p=l-s,m=n-o;if(!(!f&&m>0)){if(m/=f,f<0){if(m<u)return;m<d&&(d=m)}else if(f>0){if(m>d)return;m>u&&(u=m)}if(m=i-o,!(!f&&m<0)){if(m/=f,f<0){if(m>d)return;m>u&&(u=m)}else if(f>0){if(m<u)return;m<d&&(d=m)}if(m=r-s,!(!p&&m>0)){if(m/=p,p<0){if(m<u)return;m<d&&(d=m)}else if(p>0){if(m>d)return;m>u&&(u=m)}if(m=a-s,!(!p&&m<0)){if(m/=p,p<0){if(m>d)return;m>u&&(u=m)}else if(p>0){if(m<u)return;m<d&&(d=m)}return u>0&&(e[0]=o+u*f,e[1]=s+u*p),d<1&&(t[0]=o+d*f,t[1]=s+d*p),!0}}}}}var ww=1e9,Tw=-ww;function Ew(e,t,n,r){function i(i,a){return e<=i&&i<=n&&t<=a&&a<=r}function a(i,a,s,l){var u=0,d=0;if(i==null||(u=o(i,s))!==(d=o(a,s))||c(i,a)<0^s>0)do l.point(u===0||u===3?e:n,u>1?r:t);while((u=(u+s+4)%4)!==d);else l.point(a[0],a[1])}function o(r,i){return fC(r[0]-e)<1e-6?i>0?0:3:fC(r[0]-n)<1e-6?i>0?2:1:fC(r[1]-t)<1e-6?+(i>0):i>0?3:2}function s(e,t){return c(e.x,t.x)}function c(e,t){var n=o(e,1),r=o(t,1);return n===r?n===0?t[1]-e[1]:n===1?e[0]-t[0]:n===2?e[1]-t[1]:t[0]-e[0]:n-r}return function(o){var c=o,l=gw(),u,d,f,p,m,h,g,_,v,y,b,x={point:S,lineStart:E,lineEnd:D,polygonStart:w,polygonEnd:T};function S(e,t){i(e,t)&&c.point(e,t)}function C(){for(var t=0,n=0,i=d.length;n<i;++n)for(var a=d[n],o=1,s=a.length,c=a[0],l,u,f=c[0],p=c[1];o<s;++o)l=f,u=p,c=a[o],f=c[0],p=c[1],u<=r?p>r&&(f-l)*(r-u)>(p-u)*(e-l)&&++t:p<=r&&(f-l)*(r-u)<(p-u)*(e-l)&&--t;return t}function w(){c=l,u=[],d=[],b=!0}function T(){var e=C(),t=b&&e,n=(u=d_(u)).length;(t||n)&&(o.polygonStart(),t&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),n&&yw(u,s,e,a,o),o.polygonEnd()),c=o,u=d=f=null}function E(){x.point=O,d&&d.push(f=[]),y=!0,v=!1,g=_=NaN}function D(){u&&(O(p,m),h&&v&&l.rejoin(),u.push(l.result())),x.point=S,v&&c.lineEnd()}function O(a,o){var s=i(a,o);if(d&&f.push([a,o]),y)p=a,m=o,h=s,y=!1,s&&(c.lineStart(),c.point(a,o));else if(s&&v)c.point(a,o);else{var l=[g=Math.max(Tw,Math.min(ww,g)),_=Math.max(Tw,Math.min(ww,_))],u=[a=Math.max(Tw,Math.min(ww,a)),o=Math.max(Tw,Math.min(ww,o))];vxe(l,u,e,t,n,r)?(v||(c.lineStart(),c.point(l[0],l[1])),c.point(u[0],u[1]),s||c.lineEnd(),b=!1):s&&(c.lineStart(),c.point(a,o),b=!1)}g=a,_=o,v=s}return x}}function Dw(e,t,n){var r=p_(e,t-aC,n).concat(t);return function(e){return r.map(function(t){return[e,t]})}}function Ow(e,t,n){var r=p_(e,t-aC,n).concat(t);return function(e){return r.map(function(t){return[t,e]})}}function yxe(){var e,t,n,r,i,a,o,s,c=10,l=c,u=90,d=360,f,p,m,h,g=2.5;function _(){return{type:`MultiLineString`,coordinates:v()}}function v(){return p_(gC(r/u)*u,n,u).map(m).concat(p_(gC(s/d)*d,o,d).map(h)).concat(p_(gC(t/c)*c,e,c).filter(function(e){return fC(e%u)>aC}).map(f)).concat(p_(gC(a/l)*l,i,l).filter(function(e){return fC(e%d)>aC}).map(p))}return _.lines=function(){return v().map(function(e){return{type:`LineString`,coordinates:e}})},_.outline=function(){return{type:`Polygon`,coordinates:[m(r).concat(h(o).slice(1),m(n).reverse().slice(1),h(s).reverse().slice(1))]}},_.extent=function(e){return arguments.length?_.extentMajor(e).extentMinor(e):_.extentMinor()},_.extentMajor=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],s=+e[0][1],o=+e[1][1],r>n&&(e=r,r=n,n=e),s>o&&(e=s,s=o,o=e),_.precision(g)):[[r,s],[n,o]]},_.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],a=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),a>i&&(n=a,a=i,i=n),_.precision(g)):[[t,a],[e,i]]},_.step=function(e){return arguments.length?_.stepMajor(e).stepMinor(e):_.stepMinor()},_.stepMajor=function(e){return arguments.length?(u=+e[0],d=+e[1],_):[u,d]},_.stepMinor=function(e){return arguments.length?(c=+e[0],l=+e[1],_):[c,l]},_.precision=function(c){return arguments.length?(g=+c,f=Dw(a,i,90),p=Ow(t,e,g),m=Dw(s,o,90),h=Ow(r,n,g),_):g},_.extentMajor([[-180,-90+aC],[180,90-aC]]).extentMinor([[-180,-80-aC],[180,80+aC]])}function bxe(){return yxe()()}var kw=e=>e,Aw=new Ig,jw=new Ig,Mw,Nw,Pw,Fw,Iw={point:DC,lineStart:DC,lineEnd:DC,polygonStart:function(){Iw.lineStart=xxe,Iw.lineEnd=Cxe},polygonEnd:function(){Iw.lineStart=Iw.lineEnd=Iw.point=DC,Aw.add(fC(jw)),jw=new Ig},result:function(){var e=Aw/2;return Aw=new Ig,e}};function xxe(){Iw.point=Sxe}function Sxe(e,t){Iw.point=Lw,Mw=Pw=e,Nw=Fw=t}function Lw(e,t){jw.add(Fw*e-Pw*t),Pw=e,Fw=t}function Cxe(){Lw(Mw,Nw)}var Rw=1/0,zw=Rw,Bw=-Rw,Vw=Bw,Hw={point:wxe,lineStart:DC,lineEnd:DC,polygonStart:DC,polygonEnd:DC,result:function(){var e=[[Rw,zw],[Bw,Vw]];return Bw=Vw=-(zw=Rw=1/0),e}};function wxe(e,t){e<Rw&&(Rw=e),e>Bw&&(Bw=e),t<zw&&(zw=t),t>Vw&&(Vw=t)}var Uw=0,Ww=0,Gw=0,Kw=0,qw=0,Jw=0,Yw=0,Xw=0,Zw=0,Qw,$w,eT,tT,nT={point:rT,lineStart:iT,lineEnd:aT,polygonStart:function(){nT.lineStart=Dxe,nT.lineEnd=Oxe},polygonEnd:function(){nT.point=rT,nT.lineStart=iT,nT.lineEnd=aT},result:function(){var e=Zw?[Yw/Zw,Xw/Zw]:Jw?[Kw/Jw,qw/Jw]:Gw?[Uw/Gw,Ww/Gw]:[NaN,NaN];return Uw=Ww=Gw=Kw=qw=Jw=Yw=Xw=Zw=0,e}};function rT(e,t){Uw+=e,Ww+=t,++Gw}function iT(){nT.point=Txe}function Txe(e,t){nT.point=Exe,rT(eT=e,tT=t)}function Exe(e,t){var n=e-eT,r=t-tT,i=CC(n*n+r*r);Kw+=i*(eT+e)/2,qw+=i*(tT+t)/2,Jw+=i,rT(eT=e,tT=t)}function aT(){nT.point=rT}function Dxe(){nT.point=kxe}function Oxe(){oT(Qw,$w)}function kxe(e,t){nT.point=oT,rT(Qw=eT=e,$w=tT=t)}function oT(e,t){var n=e-eT,r=t-tT,i=CC(n*n+r*r);Kw+=i*(eT+e)/2,qw+=i*(tT+t)/2,Jw+=i,i=tT*e-eT*t,Yw+=i*(eT+e),Xw+=i*(tT+t),Zw+=i*3,rT(eT=e,tT=t)}function sT(e){this._context=e}sT.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,lC);break}},result:DC};var cT=new Ig,lT,uT,dT,fT,pT,mT={point:DC,lineStart:function(){mT.point=Axe},lineEnd:function(){lT&&hT(uT,dT),mT.point=DC},polygonStart:function(){lT=!0},polygonEnd:function(){lT=null},result:function(){var e=+cT;return cT=new Ig,e}};function Axe(e,t){mT.point=hT,uT=fT=e,dT=pT=t}function hT(e,t){fT-=e,pT-=t,cT.add(CC(fT*fT+pT*pT)),fT=e,pT=t}var gT,_T,vT,yT,bT=class{constructor(e){this._append=e==null?xT:jxe(e),this._radius=4.5,this._=``}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+=`Z`),this._point=NaN}point(e,t){switch(this._point){case 0:this._append`M${e},${t}`,this._point=1;break;case 1:this._append`L${e},${t}`;break;default:if(this._append`M${e},${t}`,this._radius!==vT||this._append!==_T){let e=this._radius,t=this._;this._=``,this._append`m0,${e}a${e},${e} 0 1,1 0,${-2*e}a${e},${e} 0 1,1 0,${2*e}z`,vT=e,_T=this._append,yT=this._,this._=t}this._+=yT;break}}result(){let e=this._;return this._=``,e.length?e:null}};function xT(e){let t=1;this._+=e[0];for(let n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function jxe(e){let t=Math.floor(e);if(!(t>=0))throw RangeError(`invalid digits: ${e}`);if(t>15)return xT;if(t!==gT){let e=10**t;gT=t,_T=function(t){let n=1;this._+=t[0];for(let r=t.length;n<r;++n)this._+=Math.round(arguments[n]*e)/e+t[n]}}return _T}function ST(e,t){let n=3,r=4.5,i,a;function o(e){return e&&(typeof r==`function`&&a.pointRadius(+r.apply(this,arguments)),NC(e,i(a))),a.result()}return o.area=function(e){return NC(e,i(Iw)),Iw.result()},o.measure=function(e){return NC(e,i(mT)),mT.result()},o.bounds=function(e){return NC(e,i(Hw)),Hw.result()},o.centroid=function(e){return NC(e,i(nT)),nT.result()},o.projection=function(t){return arguments.length?(i=t==null?(e=null,kw):(e=t).stream,o):e},o.context=function(e){return arguments.length?(a=e==null?(t=null,new bT(n)):new sT(t=e),typeof r!=`function`&&a.pointRadius(r),o):t},o.pointRadius=function(e){return arguments.length?(r=typeof e==`function`?e:(a.pointRadius(+e),+e),o):r},o.digits=function(e){if(!arguments.length)return n;if(e==null)n=null;else{let t=Math.floor(e);if(!(t>=0))throw RangeError(`invalid digits: ${e}`);n=t}return t===null&&(a=new bT(n)),o},o.projection(e).digits(n).context(t)}function CT(e){return{stream:wT(e)}}function wT(e){return function(t){var n=new TT;for(var r in e)n[r]=e[r];return n.stream=t,n}}function TT(){}TT.prototype={constructor:TT,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function ET(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),NC(n,e.stream(Hw)),t(Hw.result()),r!=null&&e.clipExtent(r),e}function DT(e,t,n){return ET(e,function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+t[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([o,s])},n)}function OT(e,t,n){return DT(e,[[0,0],t],n)}function kT(e,t,n){return ET(e,function(n){var r=+t,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];e.scale(150*i).translate([a,o])},n)}function AT(e,t,n){return ET(e,function(n){var r=+t,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([a,o])},n)}var jT=16,Mxe=hC(30*dC);function MT(e,t){return+t?Pxe(e,t):Nxe(e)}function Nxe(e){return wT({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Pxe(e,t){function n(r,i,a,o,s,c,l,u,d,f,p,m,h,g){var _=l-r,v=u-i,y=_*_+v*v;if(y>4*t&&h--){var b=o+f,x=s+p,S=c+m,C=CC(b*b+x*x+S*S),w=EC(S/=C),T=fC(fC(S)-1)<1e-6||fC(a-d)<1e-6?(a+d)/2:mC(x,b),E=e(T,w),D=E[0],O=E[1],k=D-r,A=O-i,j=v*k-_*A;(j*j/y>t||fC((_*k+v*A)/y-.5)>.3||o*f+s*p+c*m<Mxe)&&(n(r,i,a,o,s,c,D,O,T,b/=C,x/=C,S,h,g),g.point(D,O),n(D,O,T,b,x,S,l,u,d,f,p,m,h,g))}}return function(t){var r,i,a,o,s,c,l,u,d,f,p,m,h={point:g,lineStart:_,lineEnd:y,polygonStart:function(){t.polygonStart(),h.lineStart=b},polygonEnd:function(){t.polygonEnd(),h.lineStart=_}};function g(n,r){n=e(n,r),t.point(n[0],n[1])}function _(){u=NaN,h.point=v,t.lineStart()}function v(r,i){var a=FC([r,i]),o=e(r,i);n(u,d,l,f,p,m,u=o[0],d=o[1],l=r,f=a[0],p=a[1],m=a[2],jT,t),t.point(u,d)}function y(){h.point=g,t.lineEnd()}function b(){_(),h.point=x,h.lineEnd=S}function x(e,t){v(r=e,t),i=u,a=d,o=f,s=p,c=m,h.point=v}function S(){n(u,d,l,f,p,m,i,a,r,o,s,c,jT,t),h.lineEnd=y,y()}return h}}var Fxe=wT({point:function(e,t){this.stream.point(e*dC,t*dC)}});function Ixe(e){return wT({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function Lxe(e,t,n,r,i){function a(a,o){return a*=r,o*=i,[t+e*a,n-e*o]}return a.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},a}function NT(e,t,n,r,i,a){if(!a)return Lxe(e,t,n,r,i);var o=hC(a),s=xC(a),c=o*e,l=s*e,u=o/e,d=s/e,f=(s*n-o*t)/e,p=(s*t+o*n)/e;function m(e,a){return e*=r,a*=i,[c*e-l*a+t,n-l*e-c*a]}return m.invert=function(e,t){return[r*(u*e-d*t+f),i*(p-d*e-u*t)]},m}function PT(e){return FT(function(){return e})()}function FT(e){var t,n=150,r=480,i=250,a=0,o=0,s=0,c=0,l=0,u,d=0,f=1,p=1,m=null,h=Cw,g=null,_,v,y,b=kw,x=.5,S,C,w,T,E;function D(e){return w(e[0]*dC,e[1]*dC)}function O(e){return e=w.invert(e[0],e[1]),e&&[e[0]*uC,e[1]*uC]}D.stream=function(e){return T&&E===e?T:T=Fxe(Ixe(u)(h(S(b(E=e)))))},D.preclip=function(e){return arguments.length?(h=e,m=void 0,A()):h},D.postclip=function(e){return arguments.length?(b=e,g=_=v=y=null,A()):b},D.clipAngle=function(e){return arguments.length?(h=+e?_xe(m=e*dC):(m=null,Cw),A()):m*uC},D.clipExtent=function(e){return arguments.length?(b=e==null?(g=_=v=y=null,kw):Ew(g=+e[0][0],_=+e[0][1],v=+e[1][0],y=+e[1][1]),A()):g==null?null:[[g,_],[v,y]]},D.scale=function(e){return arguments.length?(n=+e,k()):n},D.translate=function(e){return arguments.length?(r=+e[0],i=+e[1],k()):[r,i]},D.center=function(e){return arguments.length?(a=e[0]%360*dC,o=e[1]%360*dC,k()):[a*uC,o*uC]},D.rotate=function(e){return arguments.length?(s=e[0]%360*dC,c=e[1]%360*dC,l=e.length>2?e[2]%360*dC:0,k()):[s*uC,c*uC,l*uC]},D.angle=function(e){return arguments.length?(d=e%360*dC,k()):d*uC},D.reflectX=function(e){return arguments.length?(f=e?-1:1,k()):f<0},D.reflectY=function(e){return arguments.length?(p=e?-1:1,k()):p<0},D.precision=function(e){return arguments.length?(S=MT(C,x=e*e),A()):CC(x)},D.fitExtent=function(e,t){return DT(D,e,t)},D.fitSize=function(e,t){return OT(D,e,t)},D.fitWidth=function(e,t){return kT(D,e,t)},D.fitHeight=function(e,t){return AT(D,e,t)};function k(){var e=NT(n,0,0,f,p,d).apply(null,t(a,o)),m=NT(n,r-e[0],i-e[1],f,p,d);return u=dw(s,c,l),C=lw(t,m),w=lw(u,C),S=MT(C,x),A()}function A(){return T=E=null,D}return function(){return t=e.apply(this,arguments),D.invert=t.invert&&O,k()}}function IT(e){var t=0,n=oC/3,r=FT(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*dC,n=e[1]*dC):[t*uC,n*uC]},i}function Rxe(e){var t=hC(e);function n(e,n){return[e*t,xC(n)/t]}return n.invert=function(e,n){return[e/t,EC(n*t)]},n}function zxe(e,t){var n=xC(e),r=(n+xC(t))/2;if(fC(r)<1e-6)return Rxe(e);var i=1+n*(2*r-n),a=CC(i)/r;function o(e,t){var n=CC(i-2*r*xC(t))/r;return[n*xC(e*=r),a-n*hC(e)]}return o.invert=function(e,t){var n=a-t,o=mC(e,fC(n))*SC(n);return n*r<0&&(o-=oC*SC(e)*SC(n)),[o/r,EC((i-(e*e+n*n)*r*r)/(2*r))]},o}function LT(){return IT(zxe).scale(155.424).center([0,33.6442])}function RT(){return LT().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Bxe(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i<t;)e[i].point(n,r)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}function Vxe(){var e,t,n=RT(),r,i=LT().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a,o=LT().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,c,l={point:function(e,t){c=[e,t]}};function u(e){var t=e[0],n=e[1];return c=null,(r.point(t,n),c)||(a.point(t,n),c)||(s.point(t,n),c)}u.invert=function(e){var t=n.scale(),r=n.translate(),a=(e[0]-r[0])/t,s=(e[1]-r[1])/t;return(s>=.12&&s<.234&&a>=-.425&&a<-.214?i:s>=.166&&s<.234&&a>=-.214&&a<-.115?o:n).invert(e)},u.stream=function(r){return e&&t===r?e:e=Bxe([n.stream(t=r),i.stream(r),o.stream(r)])},u.precision=function(e){return arguments.length?(n.precision(e),i.precision(e),o.precision(e),d()):n.precision()},u.scale=function(e){return arguments.length?(n.scale(e),i.scale(e*.35),o.scale(e),u.translate(n.translate())):n.scale()},u.translate=function(e){if(!arguments.length)return n.translate();var t=n.scale(),c=+e[0],u=+e[1];return r=n.translate(e).clipExtent([[c-.455*t,u-.238*t],[c+.455*t,u+.238*t]]).stream(l),a=i.translate([c-.307*t,u+.201*t]).clipExtent([[c-.425*t+aC,u+.12*t+aC],[c-.214*t-aC,u+.234*t-aC]]).stream(l),s=o.translate([c-.205*t,u+.212*t]).clipExtent([[c-.214*t+aC,u+.166*t+aC],[c-.115*t-aC,u+.234*t-aC]]).stream(l),d()},u.fitExtent=function(e,t){return DT(u,e,t)},u.fitSize=function(e,t){return OT(u,e,t)},u.fitWidth=function(e,t){return kT(u,e,t)},u.fitHeight=function(e,t){return AT(u,e,t)};function d(){return e=t=null,u}return u.scale(1070)}function zT(e){return function(t,n){var r=hC(t),i=hC(n),a=e(r*i);return a===1/0?[2,0]:[a*i*xC(t),a*xC(n)]}}function BT(e){return function(t,n){var r=CC(t*t+n*n),i=e(r),a=xC(i),o=hC(i);return[mC(t*a,r*o),EC(r&&n*a/r)]}}var VT=zT(function(e){return CC(2/(1+e))});VT.invert=BT(function(e){return 2*EC(e/2)});function Hxe(){return PT(VT).scale(124.75).clipAngle(179.999)}var HT=zT(function(e){return(e=TC(e))&&e/xC(e)});HT.invert=BT(function(e){return e});function Uxe(){return PT(HT).scale(79.4188).clipAngle(179.999)}function UT(e,t){return[e,yC(wC((sC+t)/2))]}UT.invert=function(e,t){return[e,2*pC(_C(t))-sC]};function Wxe(){return WT(UT).scale(961/lC)}function WT(e){var t=PT(e),n=t.center,r=t.scale,i=t.translate,a=t.clipExtent,o=null,s,c,l;t.scale=function(e){return arguments.length?(r(e),u()):r()},t.translate=function(e){return arguments.length?(i(e),u()):i()},t.center=function(e){return arguments.length?(n(e),u()):n()},t.clipExtent=function(e){return arguments.length?(e==null?o=s=c=l=null:(o=+e[0][0],s=+e[0][1],c=+e[1][0],l=+e[1][1]),u()):o==null?null:[[o,s],[c,l]]};function u(){var n=oC*r(),i=t(lxe(t.rotate()).invert([0,0]));return a(o==null?[[i[0]-n,i[1]-n],[i[0]+n,i[1]+n]]:e===UT?[[Math.max(i[0]-n,o),s],[Math.min(i[0]+n,c),l]]:[[o,Math.max(i[1]-n,s)],[c,Math.min(i[1]+n,l)]])}return u()}function GT(e){return wC((sC+e)/2)}function Gxe(e,t){var n=hC(e),r=e===t?xC(e):yC(n/hC(t))/yC(GT(t)/GT(e)),i=n*bC(GT(e),r)/r;if(!r)return UT;function a(e,t){i>0?t<-sC+1e-6&&(t=-sC+aC):t>sC-1e-6&&(t=sC-aC);var n=i/bC(GT(t),r);return[n*xC(r*e),i-n*hC(r*e)]}return a.invert=function(e,t){var n=i-t,a=SC(r)*CC(e*e+n*n),o=mC(e,fC(n))*SC(n);return n*r<0&&(o-=oC*SC(e)*SC(n)),[o/r,2*pC(bC(i/a,1/r))-sC]},a}function Kxe(){return IT(Gxe).scale(109.5).parallels([30,30])}function KT(e,t){return[e,t]}KT.invert=KT;function qxe(){return PT(KT).scale(152.63)}function Jxe(e,t){var n=hC(e),r=e===t?xC(e):(n-hC(t))/(t-e),i=n/r+e;if(fC(r)<1e-6)return KT;function a(e,t){var n=i-t,a=r*e;return[n*xC(a),i-n*hC(a)]}return a.invert=function(e,t){var n=i-t,a=mC(e,fC(n))*SC(n);return n*r<0&&(a-=oC*SC(e)*SC(n)),[a/r,i-SC(r)*CC(e*e+n*n)]},a}function Yxe(){return IT(Jxe).scale(131.154).center([0,13.9389])}
12var qT=1.340264,JT=-.081106,YT=893e-6,XT=.003796,ZT=CC(3)/2,Xxe=12;function QT(e,t){var n=EC(ZT*xC(t)),r=n*n,i=r*r*r;return[e*hC(n)/(ZT*(qT+3*JT*r+i*(7*YT+9*XT*r))),n*(qT+JT*r+i*(YT+XT*r))]}QT.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,a=0,o,s,c;a<Xxe&&(s=n*(qT+JT*r+i*(YT+XT*r))-t,c=qT+3*JT*r+i*(7*YT+9*XT*r),n-=o=s/c,r=n*n,i=r*r*r,!(fC(o)<1e-12));++a);return[ZT*e*(qT+3*JT*r+i*(7*YT+9*XT*r))/hC(n),EC(xC(n)/ZT)]};function Zxe(){return PT(QT).scale(177.158)}function $T(e,t){var n=hC(t),r=hC(e)*n;return[n*xC(e)/r,xC(t)/r]}$T.invert=BT(pC);function Qxe(){return PT($T).scale(144.049).clipAngle(60)}function eE(e,t){return[hC(t)*xC(e),xC(t)]}eE.invert=BT(EC);function $xe(){return PT(eE).scale(249.5).clipAngle(90+aC)}function tE(e,t){var n=hC(t),r=1+hC(e)*n;return[n*xC(e)/r,xC(t)/r]}tE.invert=BT(function(e){return 2*pC(e)});function eSe(){return PT(tE).scale(250).clipAngle(142)}function nE(e,t){return[yC(wC((sC+t)/2)),-e]}nE.invert=function(e,t){return[-t,2*pC(_C(e))-sC]};function tSe(){var e=WT(nE),t=e.center,n=e.rotate;return e.center=function(e){return arguments.length?t([-e[1],e[0]]):(e=t(),[e[1],-e[0]])},e.rotate=function(e){return arguments.length?n([e[0],e[1],e.length>2?e[2]+90:90]):(e=n(),[e[0],e[1],e[2]-90])},n([0,0,90]).scale(159.155)}function nSe(e,t){return e.parent===t.parent?1:2}function rSe(e){return e.reduce(iSe,0)/e.length}function iSe(e,t){return e+t.x}function aSe(e){return 1+e.reduce(oSe,0)}function oSe(e,t){return Math.max(e,t.y)}function sSe(e){for(var t;t=e.children;)e=t[0];return e}function cSe(e){for(var t;t=e.children;)e=t[t.length-1];return e}function rE(){var e=nSe,t=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter(function(t){var n=t.children;n?(t.x=rSe(n),t.y=aSe(n)):(t.x=a?o+=e(t,a):0,t.y=0,a=t)});var s=sSe(i),c=cSe(i),l=s.x-e(s,c)/2,u=c.x+e(c,s)/2;return i.eachAfter(r?function(e){e.x=(e.x-i.x)*t,e.y=(i.y-e.y)*n}:function(e){e.x=(e.x-l)/(u-l)*t,e.y=(1-(i.y?e.y/i.y:1))*n})}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function lSe(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function uSe(){return this.eachAfter(lSe)}function dSe(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function fSe(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function pSe(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function mSe(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function hSe(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function gSe(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function _Se(e){for(var t=this,n=vSe(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function vSe(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function ySe(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function bSe(){return Array.from(this)}function xSe(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function SSe(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*CSe(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function iE(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=ESe)):t===void 0&&(t=TSe);for(var n=new aE(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new aE(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(OSe)}function wSe(){return iE(this).eachBefore(DSe)}function TSe(e){return e.children}function ESe(e){return Array.isArray(e)?e[1]:null}function DSe(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function OSe(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function aE(e){this.data=e,this.depth=this.height=0,this.parent=null}aE.prototype=iE.prototype={constructor:aE,count:uSe,each:dSe,eachAfter:pSe,eachBefore:fSe,find:mSe,sum:hSe,sort:gSe,path:_Se,ancestors:ySe,descendants:bSe,leaves:xSe,links:SSe,copy:wSe,[Symbol.iterator]:CSe};function oE(e){return e==null?null:kSe(e)}function kSe(e){if(typeof e!=`function`)throw Error();return e}function ASe(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function jSe(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function MSe(){var e=1,t=1,n=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=n,i.x1=e,i.y1=t/o,i.eachBefore(a(t,o)),r&&i.eachBefore(ASe),i}function a(e,t){return function(r){r.children&&jSe(r,r.x0,e*(r.depth+1)/t,r.x1,e*(r.depth+2)/t);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}return i.round=function(e){return arguments.length?(r=!!e,i):r},i.size=function(n){return arguments.length?(e=+n[0],t=+n[1],i):[e,t]},i.padding=function(e){return arguments.length?(n=+e,i):n},i}var NSe={depth:-1},PSe={},sE={};function FSe(e){return e.id}function ISe(e){return e.parentId}function LSe(){var e=FSe,t=ISe,n;function r(r){var i=Array.from(r),a=e,o=t,s,c,l,u,d,f,p,m,h=new Map;if(n!=null){let e=i.map((e,t)=>RSe(n(e,t,r))),t=e.map(zSe),s=new Set(e).add(``);for(let n of t)s.has(n)||(s.add(n),e.push(n),t.push(zSe(n)),i.push(sE));a=(t,n)=>e[n],o=(e,n)=>t[n]}for(l=0,s=i.length;l<s;++l)c=i[l],f=i[l]=new aE(c),(p=a(c,l,r))!=null&&(p+=``)&&(m=f.id=p,h.set(m,h.has(m)?PSe:f)),(p=o(c,l,r))!=null&&(p+=``)&&(f.parent=p);for(l=0;l<s;++l)if(f=i[l],p=f.parent){if(d=h.get(p),!d)throw Error(`missing: `+p);if(d===PSe)throw Error(`ambiguous: `+p);
12d.children?d.children.push(f):d.children=[f],f.parent=d}else{if(u)throw Error(`multiple roots`);u=f}if(!u)throw Error(`no root`);if(n!=null){for(;u.data===sE&&u.children.length===1;)u=u.children[0],--s;for(let e=i.length-1;e>=0&&(f=i[e],f.data===sE);--e)f.data=null}if(u.parent=NSe,u.eachBefore(function(e){e.depth=e.parent.depth+1,--s}).eachBefore(OSe),u.parent=null,s>0)throw Error(`cycle`);return u}return r.id=function(t){return arguments.length?(e=oE(t),r):e},r.parentId=function(e){return arguments.length?(t=oE(e),r):t},r.path=function(e){return arguments.length?(n=oE(e),r):n},r}function RSe(e){e=`${e}`;let t=e.length;return cE(e,t-1)&&!cE(e,t-2)&&(e=e.slice(0,-1)),e[0]===`/`?e:`/${e}`}function zSe(e){let t=e.length;if(t<2)return``;for(;--t>1&&!cE(e,t););return e.slice(0,t)}function cE(e,t){if(e[t]===`/`){let n=0;for(;t>0&&e[--t]===`\\`;)++n;if(!(n&1))return!0}return!1}function BSe(e,t){return e.parent===t.parent?1:2}function lE(e){var t=e.children;return t?t[0]:e.t}function uE(e){var t=e.children;return t?t[t.length-1]:e.t}function VSe(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function HSe(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function USe(e,t,n){return e.a.parent===t.parent?e.a:n}function dE(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}dE.prototype=Object.create(aE.prototype);function WSe(e){for(var t=new dE(e,0),n,r=[t],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new dE(a[o],o)),i.parent=n;return(t.parent=new dE(null,0)).children=[t],t}function fE(){var e=BSe,t=1,n=1,r=null;function i(i){var s=WSe(i);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(o),r)i.eachBefore(c);else{var l=i,u=i,d=i;i.eachBefore(function(e){e.x<l.x&&(l=e),e.x>u.x&&(u=e),e.depth>d.depth&&(d=e)});var f=l===u?1:e(l,u)/2,p=f-l.x,m=t/(u.x+f+p),h=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+p)*m,e.y=e.depth*h})}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){HSe(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=s(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(t,n,r){if(n){for(var i=t,a=t,o=n,s=i.parent.children[0],c=i.m,l=a.m,u=o.m,d=s.m,f;o=uE(o),i=lE(i),o&&i;)s=lE(s),a=uE(a),a.a=t,f=o.z+u-i.z-c+e(o._,i._),f>0&&(VSe(USe(o,t,r),t,f),c+=f,l+=f),u+=o.m,c+=i.m,d+=s.m,l+=a.m;o&&!uE(a)&&(a.t=o,a.m+=u-l),i&&!lE(s)&&(s.t=i,s.m+=c-d,r=t)}return r}function c(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}var pE=Math.PI,mE=2*pE,hE=1e-6,GSe=mE-hE;function KSe(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function qSe(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return KSe;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var gE=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?KSe:qSe(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>hE)if(!(Math.abs(u*s-c*l)>hE)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((pE-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>hE&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}
12arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>hE||Math.abs(this._y1-l)>hE)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%mE+mE),d>GSe?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>hE&&this._append`A${n},${n},0,${+(d>=pE)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function JSe(){return new gE}JSe.prototype=gE.prototype;function _E(e=3){return new gE(+e)}var YSe=1664525,XSe=1013904223,ZSe=1/4294967296;function vE(e=Math.random()){let t=(0<=e&&e<1?e/ZSe:Math.abs(e))|0;return()=>(t=YSe*t+XSe|0,ZSe*(t>>>0))}function yE(e){for(var t=e.length/6|0,n=Array(t),r=0;r<t;)n[r]=`#`+e.slice(r*6,++r*6);return n}var QSe=yE(`1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf`),$Se=yE(`7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666`),eCe=yE(`1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666`),tCe=yE(`4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0`),nCe=yE(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`),rCe=yE(`fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2`),iCe=yE(`b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc`),aCe=yE(`e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999`),oCe=yE(`66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3`),sCe=yE(`8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f`),cCe=yE(`4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab`),bE=e=>ife(e[e.length-1]),lCe=[,,,`d8b365f5f5f55ab4ac`,`a6611adfc27d80cdc1018571`,`a6611adfc27df5f5f580cdc1018571`,`8c510ad8b365f6e8c3c7eae55ab4ac01665e`,`8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e`,`8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e`,`8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e`,`5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30`,`5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30`].map(yE),uCe=bE(lCe),dCe=[,,,`af8dc3f7f7f77fbf7b`,`7b3294c2a5cfa6dba0008837`,`7b3294c2a5cff7f7f7a6dba0008837`,`762a83af8dc3e7d4e8d9f0d37fbf7b1b7837`,`762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837`,`762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837`,`762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837`,`40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b`,`40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b`].map(yE),fCe=bE(dCe),pCe=[,,,`e9a3c9f7f7f7a1d76a`,`d01c8bf1b6dab8e1864dac26`,`d01c8bf1b6daf7f7f7b8e1864dac26`,`c51b7de9a3c9fde0efe6f5d0a1d76a4d9221`,`c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221`,`c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221`,`c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221`,`8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419`,`8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419`].map(yE),mCe=bE(pCe),hCe=[,,,`998ec3f7f7f7f1a340`,`5e3c99b2abd2fdb863e66101`,`5e3c99b2abd2f7f7f7fdb863e66101`,`542788998ec3d8daebfee0b6f1a340b35806`,`542788998ec3d8daebf7f7f7fee0b6f1a340b35806`,`5427888073acb2abd2d8daebfee0b6fdb863e08214b35806`,`5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806`,`2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08`,`2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08`].map(yE),gCe=bE(hCe),xE=[,,,`ef8a62f7f7f767a9cf`,`ca0020f4a58292c5de0571b0`,`ca0020f4a582f7f7f792c5de0571b0`,`b2182bef8a62fddbc7d1e5f067a9cf2166ac`,`b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac`,`b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac`,`b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac`,`67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061`,`67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061`].map(yE),SE=bE(xE),_Ce=[,,,`ef8a62ffffff999999`,`ca0020f4a582bababa404040`,`ca0020f4a582ffffffbababa404040`,`b2182bef8a62fddbc7e0e0e09999994d4d4d`,`b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d`,`b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d`,`b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d`,`67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a`,`67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a`].map(yE),vCe=bE(_Ce),CE=[,,,`fc8d59ffffbf91bfdb`,`d7191cfdae61abd9e92c7bb6`,`d7191cfdae61ffffbfabd9e92c7bb6`,`d73027fc8d59fee090e0f3f891bfdb4575b4`,`d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4`,`d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4`,`d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4`,`a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695`,`a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695`].map(yE),wE=bE(CE),yCe=[,,,`fc8d59ffffbf91cf60`,`d7191cfdae61a6d96a1a9641`,`d7191cfdae61ffffbfa6d96a1a9641`,`d73027fc8d59fee08bd9ef8b91cf601a9850`,`d73027fc8d59fee08bffffbfd9ef8b91cf601a9850`,`d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850`,`d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850`,`a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837`,`a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837`].map(yE),bCe=bE(yCe),xCe=[,,,`fc8d59ffffbf99d594`,`d7191cfdae61abdda42b83ba`,`d7191cfdae61ffffbfabdda42b83ba`,`d53e4ffc8d59fee08be6f59899d5943288bd`,`d53e4ffc8d59fee08bffffbfe6f59899d5943288bd`,`d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd`,`d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd`,`9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2`,`9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2`].map(yE),SCe=bE(xCe),CCe=[,,,`e5f5f999d8c92ca25f`,`edf8fbb2e2e266c2a4238b45`,`edf8fbb2e2e266c2a42ca25f006d2c`,`edf8fbccece699d8c966c2a42ca25f006d2c`,`edf8fbccece699d8c966c2a441ae76238b45005824`,`f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824`,`f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b`].map(yE),wCe=bE(CCe),TCe=[,,,`e0ecf49ebcda8856a7`,`edf8fbb3cde38c96c688419d`,`edf8fbb3cde38c96c68856a7810f7c`,`edf8fbbfd3e69ebcda8c96c68856a7810f7c`,`edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b`,`f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b`,`f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b`].map(yE),TE=bE(TCe),ECe=[,,,`e0f3dba8ddb543a2ca`,`f0f9e8bae4bc7bccc42b8
12cbe`,`f0f9e8bae4bc7bccc443a2ca0868ac`,`f0f9e8ccebc5a8ddb57bccc443a2ca0868ac`,`f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e`,`f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e`,`f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081`].map(yE),DCe=bE(ECe),OCe=[,,,`fee8c8fdbb84e34a33`,`fef0d9fdcc8afc8d59d7301f`,`fef0d9fdcc8afc8d59e34a33b30000`,`fef0d9fdd49efdbb84fc8d59e34a33b30000`,`fef0d9fdd49efdbb84fc8d59ef6548d7301f990000`,`fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000`,`fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000`].map(yE),kCe=bE(OCe),ACe=[,,,`ece2f0a6bddb1c9099`,`f6eff7bdc9e167a9cf02818a`,`f6eff7bdc9e167a9cf1c9099016c59`,`f6eff7d0d1e6a6bddb67a9cf1c9099016c59`,`f6eff7d0d1e6a6bddb67a9cf3690c002818a016450`,`fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450`,`fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636`].map(yE),jCe=bE(ACe),MCe=[,,,`ece7f2a6bddb2b8cbe`,`f1eef6bdc9e174a9cf0570b0`,`f1eef6bdc9e174a9cf2b8cbe045a8d`,`f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d`,`f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b`,`fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b`,`fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858`].map(yE),NCe=bE(MCe),PCe=[,,,`e7e1efc994c7dd1c77`,`f1eef6d7b5d8df65b0ce1256`,`f1eef6d7b5d8df65b0dd1c77980043`,`f1eef6d4b9dac994c7df65b0dd1c77980043`,`f1eef6d4b9dac994c7df65b0e7298ace125691003f`,`f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f`,`f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f`].map(yE),FCe=bE(PCe),ICe=[,,,`fde0ddfa9fb5c51b8a`,`feebe2fbb4b9f768a1ae017e`,`feebe2fbb4b9f768a1c51b8a7a0177`,`feebe2fcc5c0fa9fb5f768a1c51b8a7a0177`,`feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177`,`fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177`,`fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a`].map(yE),LCe=bE(ICe),RCe=[,,,`edf8b17fcdbb2c7fb8`,`ffffcca1dab441b6c4225ea8`,`ffffcca1dab441b6c42c7fb8253494`,`ffffccc7e9b47fcdbb41b6c42c7fb8253494`,`ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84`,`ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84`,`ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58`].map(yE),zCe=bE(RCe),BCe=[,,,`f7fcb9addd8e31a354`,`ffffccc2e69978c679238443`,`ffffccc2e69978c67931a354006837`,`ffffccd9f0a3addd8e78c67931a354006837`,`ffffccd9f0a3addd8e78c67941ab5d238443005a32`,`ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32`,`ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529`].map(yE),VCe=bE(BCe),HCe=[,,,`fff7bcfec44fd95f0e`,`ffffd4fed98efe9929cc4c02`,`ffffd4fed98efe9929d95f0e993404`,`ffffd4fee391fec44ffe9929d95f0e993404`,`ffffd4fee391fec44ffe9929ec7014cc4c028c2d04`,`ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04`,`ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506`].map(yE),UCe=bE(HCe),WCe=[,,,`ffeda0feb24cf03b20`,`ffffb2fecc5cfd8d3ce31a1c`,`ffffb2fecc5cfd8d3cf03b20bd0026`,`ffffb2fed976feb24cfd8d3cf03b20bd0026`,`ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026`,`ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026`,`ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026`].map(yE),GCe=bE(WCe),KCe=[,,,`deebf79ecae13182bd`,`eff3ffbdd7e76baed62171b5`,`eff3ffbdd7e76baed63182bd08519c`,`eff3ffc6dbef9ecae16baed63182bd08519c`,`eff3ffc6dbef9ecae16baed64292c62171b5084594`,`f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594`,`f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b`].map(yE),qCe=bE(KCe),JCe=[,,,`e5f5e0a1d99b31a354`,`edf8e9bae4b374c476238b45`,`edf8e9bae4b374c47631a354006d2c`,`edf8e9c7e9c0a1d99b74c47631a354006d2c`,`edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32`,`f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32`,`f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b`].map(yE),YCe=bE(JCe),XCe=[,,,`f0f0f0bdbdbd636363`,`f7f7f7cccccc969696525252`,`f7f7f7cccccc969696636363252525`,`f7f7f7d9d9d9bdbdbd969696636363252525`,`f7f7f7d9d9d9bdbdbd969696737373525252252525`,`fffffff0f0f0d9d9d9bdbdbd969696737373525252252525`,`fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000`].map(yE),ZCe=bE(XCe),QCe=[,,,`efedf5bcbddc756bb1`,`f2f0f7cbc9e29e9ac86a51a3`,`f2f0f7cbc9e29e9ac8756bb154278f`,`f2f0f7dadaebbcbddc9e9ac8756bb154278f`,`f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486`,`fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486`,`fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d`].map(yE),$Ce=bE(QCe),ewe=[,,,`fee0d2fc9272de2d26`,`fee5d9fcae91fb6a4acb181d`,`fee5d9fcae91fb6a4ade2d26a50f15`,`fee5d9fcbba1fc9272fb6a4ade2d26a50f15`,`fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d`,`fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d`,`fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d`].map(yE),twe=bE(ewe),nwe=[,,,`fee6cefdae6be6550d`,`feeddefdbe85fd8d3cd94701`,`feeddefdbe85fd8d3ce6550da63603`,`feeddefdd0a2fdae6bfd8d3ce6550da63603`,`feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04`,`fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04`,`fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704`].map(yE),rwe=bE(nwe);function iwe(e){return e=Math.max(0,Math.min(1,e)),`rgb(`+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+`, `+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+`, `+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+`)`}var awe=Yv(Tv(300,.5,0),Tv(-240,.5,1)),owe=Yv(Tv(-100,.75,.35),Tv(80,1.5,.8)),swe=Yv(Tv(260,.75,.35),Tv(80,1.5,.8)),EE=Tv();function cwe(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return EE.h=360*e-100,EE.s=1.5-1.5*t,EE.l=.8-.9*t,EE+``}var DE=R_(),lwe=Math.PI/3,uwe=Math.PI*2/3;function dwe(e){var t;
12return e=(.5-e)*Math.PI,DE.r=255*(t=Math.sin(e))*t,DE.g=255*(t=Math.sin(e+lwe))*t,DE.b=255*(t=Math.sin(e+uwe))*t,DE+``}function fwe(e){return e=Math.max(0,Math.min(1,e)),`rgb(`+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+`, `+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+`, `+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+`)`}function OE(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}var pwe=OE(yE(`44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725`)),mwe=OE(yE(`00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf`)),hwe=OE(yE(`00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4`)),gwe=OE(yE(`0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0a
12a58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921`));function kE(e){return function(){return e}}var _we=Math.cos,AE=Math.min,jE=Math.sin,ME=Math.sqrt,NE=Math.PI;NE/2;var PE=2*NE;function vwe(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new gE(t)}Array.prototype.slice;function ywe(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function bwe(e){this._context=e}bwe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function FE(e){return new bwe(e)}function xwe(e){return e[0]}function Swe(e){return e[1]}function Cwe(e,t){var n=kE(!0),r=null,i=FE,a=null,o=vwe(s);e=typeof e==`function`?e:e===void 0?xwe:kE(e),t=typeof t==`function`?t:t===void 0?Swe:kE(t);function s(s){var c,l=(s=ywe(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:kE(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:kE(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:kE(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function IE(e,t,n){var r=null,i=kE(!0),a=null,o=FE,s=null,c=vwe(l);e=typeof e==`function`?e:e===void 0?xwe:kE(+e),t=typeof t==`function`?t:kE(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?Swe:kE(+n);function l(l){var u,d,f,p=(l=ywe(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return Cwe().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:kE(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:kE(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:kE(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:kE(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:kE(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:kE(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:kE(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var wwe=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function Twe(e){return new wwe(e,!0)}function Ewe(e){return new wwe(e,!1)}var Dwe=ME(3),Owe={draw(e,t){let n=ME(t+AE(t/28,.75))*.59436,r=n/2,i=r*Dwe;e.moveTo(0,n),e.lineTo(0,-n),e.moveTo(-i,-r),e.lineTo(i,r),e.moveTo(-i,r),e.lineTo(i,-r)}},LE={draw(e,t){let n=ME(t/NE);e.moveTo(n,0),e.arc(0,0,n,0,PE)}},kwe={draw(e,t){let n=ME(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Awe=ME(1/3),jwe=Awe*2,Mwe={draw(e,t){let n=ME(t/jwe),r=n*Awe;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Nwe={draw(e,t){let n=ME(t)*.62625;e.moveTo(0,-n),e.lineTo(n,0),e.lineTo(0,n),e.lineTo(-n,0),e.closePath()}},Pwe={draw(e,t){let n=ME(t-AE(t/7,2))*.87559;e.moveTo(-n,0),e.lineTo(n,0),e.moveTo(0,n),e.lineTo(0,-n)}},Fwe={draw(e,t){let n=ME(t),r=-n/2;e.rect(r,r,n,n)}},Iwe={draw(e,t){let n=ME(t)*.4431;e.moveTo(n,n),e.lineTo(n,-n),e.lineTo(-n,-n),e.lineTo(-n,n),e.closePath()}},Lwe=.8908130915292852,Rwe=jE(NE/10)/jE(7*NE/10),zwe=jE(PE/10)*Rwe,Bwe=-_we(PE/10)*Rwe,Vwe={draw(e,t){let n=ME(t*Lwe),r=zwe*n,i=Bwe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=PE*t/5,o=_we(a),s=jE(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},RE=ME(3),Hwe={draw(e,t){let n=-ME(t/(RE*3));e.moveTo(0,n*2),e.lineTo(-RE*n,-n),e.lineTo(RE*n,-n),e.closePath()}},Uwe=ME(3),Wwe={draw(e,t){let n=ME(t)*.6824,r=n/2,i=n*Uwe/2;e.moveTo(0,-n),e.lineTo(i,r),e.lineTo(-i,r),e.closePath()}},zE=-.5,BE=ME(3)/2,VE=1/ME(12),Gwe=(VE/2+1)*3,Kwe={draw(e,t){let n=ME(t/Gwe),r=n/2,i=n*VE,a=r,o=n*VE+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(zE*r-BE*i,BE*r+zE*i),e.lineTo(zE*a-BE*o,BE*a+zE*o),e.lineTo(zE*s-BE*c,BE*s+zE*c),e.lineTo(zE*r+BE*i,zE*i-BE*r),e.lineTo(zE*a+BE*o,zE*o-BE*a),e.lineTo(zE*s+BE*c,zE*c-BE*s),e.closePath()}},qwe={draw(e,t){let n=ME(t-AE(t/6,1.7))*.6189;e.moveTo(-n,-n),e.lineTo(n,n),e.moveTo(-n,n),e.lineTo(n,-n)}},Jwe=[LE,kwe,Mwe,Fwe,Vwe,Hwe,Kwe],Ywe=[LE,Pwe,qwe,Wwe,Owe,Iwe,Nwe];function HE(){}function UE(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function WE(e){this._context=e}WE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:UE(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:UE(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Xwe(e){return new WE(e)}function Zwe(e){this._context=e}Zwe.prototype={areaStart:HE,areaEnd:HE,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:UE(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Qwe(e){return new Zwe(e)}function $we(e){this._context=e}$we.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:UE(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function eTe(e){return new $we(e)}function tTe(e,t){this._basis=new WE(e),this._beta=t}tTe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var nTe=(function e(t){function n(e){return t===1?new WE(e):new tTe(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function GE(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function KE(e,t){this._context=e,this._k=(1-t)/6}KE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:GE(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:GE(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var rTe=(function e(t){function n(e){return new KE(e,t)}return n.tension=function(t){return e(+t)},n})(0);function qE(e,t){this._context=e,this._k=(1-t)/6}qE.prototype={areaStart:HE,areaEnd:HE,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:GE(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var iTe=(function e(t){function n(e){return new qE(e,t)}return n.tension=function(t){return e(+t)},n})(0);function JE(e,t){this._context=e,this._k=(1-t)/6}JE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:GE(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var aTe=(function e(t){function n(e){return new JE(e,t)}return n.tension=function(t){return e(+t)},n})(0);
vendor: 8,937 bytes, line 12
12function YE(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function oTe(e,t){this._context=e,this._alpha=t}oTe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:YE(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var sTe=(function e(t){function n(e){return t?new oTe(e,t):new KE(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function cTe(e,t){this._context=e,this._alpha=t}cTe.prototype={areaStart:HE,areaEnd:HE,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:YE(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var lTe=(function e(t){function n(e){return t?new cTe(e,t):new qE(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function uTe(e,t){this._context=e,this._alpha=t}uTe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:YE(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var dTe=(function e(t){function n(e){return t?new uTe(e,t):new JE(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function fTe(e){this._context=e}fTe.prototype={areaStart:HE,areaEnd:HE,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function pTe(e){return new fTe(e)}function mTe(e){return e<0?-1:1}function hTe(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(mTe(a)+mTe(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function gTe(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function XE(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function ZE(e){this._context=e}ZE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:XE(this,this._t0,gTe(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,XE(this,gTe(this,n=hTe(this,e,t)),n);break;default:XE(this,this._t0,n=hTe(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function _Te(e){this._context=new vTe(e)}(_Te.prototype=Object.create(ZE.prototype)).point=function(e,t){ZE.prototype.point.call(this,t,e)};function vTe(e){this._context=e}vTe.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function yTe(e){return new ZE(e)}function bTe(e){return new _Te(e)}function xTe(e){this._context=e}xTe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=STe(e),i=STe(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function STe(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function CTe(e){return new xTe(e)}function QE(e,t){this._context=e,this._t=t}QE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function wTe(e){return new QE(e,.5)}function TTe(e){return new QE(e,0)}function ETe(e){return new QE(e,1)}function $E(e,t,n){this.k=e,this.x=t,this.y=n}$E.prototype={constructor:$E,scale:function(e){return e===1?this:new $E(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new $E(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var DTe=new $E(1,0,0);OTe.prototype=$E.prototype;function OTe(e){for(;!e.__zoom;)if(!(e=e.parentNode))return DTe;return e.__zoom}
12var kTe=({x:e,y:t,label:n,innerWidth:r,innerHeight:i})=>{let a=e+8,o=t+4,s=`start`;return e+80>r&&(a=e-8,s=`end`),e-80<0&&(a=e+8,s=`start`),t>i&&(o=t-8),t-12<0&&(o=t+12),(0,B.jsx)(Db,{x:a,y:o,fill:`#666`,cursor:`default`,style:{fontSize:`0.8em`},textAnchor:s,children:n})},eD=({data:e,width:t=600,height:n=400,xLabel:r,yLabel:i})=>{let a={top:40,right:20,bottom:40,left:20},o=t-a.left-a.right,s=n-a.top-a.bottom,c=ug(`#dedede`,`#222`),l=(0,_.useMemo)(()=>{if(e.length<=8)return e;let t=e.reduce((e,t)=>(e[t.category]||(e[t.category]=[]),e[t.category].push(t),e),{}),n=Object.keys(t),r=Math.ceil(8/n.length);return n.flatMap(e=>t[e].slice(0,r))},[e]),u=mb({domain:[Math.min(...e.map(e=>e.x)),Math.max(...e.map(e=>e.x))],nice:!0,range:[0,o]}),d=mb({domain:[Math.min(...e.map(e=>e.y)),Math.max(...e.map(e=>e.y))],nice:!0,range:[s,0]}),f=t=>{let n=Array.from(new Set(e.map(e=>e.category)));return hb().domain(n).range(QSe)(t)||`#000000`},{tooltipData:p,tooltipLeft:m,tooltipTop:h,showTooltip:g,hideTooltip:v}=Wb(),{containerRef:y,containerBounds:b,TooltipInPortal:x}=ox({scroll:!0,detectBounds:!0}),S=u.ticks(5).map(e=>(0,B.jsx)(`line`,{x1:u(e),y1:0,x2:u(e),y2:s,stroke:c,strokeWidth:1,strokeDasharray:`2,2`},`x-grid-${e}`)),C=d.ticks(5).map(e=>(0,B.jsx)(`line`,{x1:0,y1:d(e),x2:o,y2:d(e),stroke:c,strokeWidth:1,strokeDasharray:`2,2`},`y-grid-${e}`));return(0,B.jsxs)(V,{style:{width:`100%`,maxWidth:t,margin:`0 auto`},position:`relative`,children:[(0,B.jsx)(`svg`,{width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`,viewBox:`0 0 ${t} ${n}`,style:{userSelect:`none`},ref:y,children:(0,B.jsxs)(bg,{left:a.left,top:a.top,children:[(0,B.jsxs)(`g`,{className:`grid-lines`,children:[S,C]}),r&&(0,B.jsx)(Ib,{orientation:`bottom`,scale:u,top:s,stroke:`var(--axis-color, #666)`,tickStroke:`var(--axis-color, #666)`,tickLabelProps:()=>({fill:`var(--text-color, #666)`,fontSize:10,textAnchor:`middle`,dy:`0.5em`}),hideAxisLine:!0,hideTicks:!0,numTicks:5,label:r,labelProps:{fontSize:12,fill:`var(--text-color, #666)`,textAnchor:`middle`,y:35}}),i&&(0,B.jsx)(Ib,{orientation:`left`,scale:d,stroke:`var(--axis-color, #666)`,tickStroke:`var(--axis-color, #666)`,tickLabelProps:()=>({fill:`var(--text-color, #666)`,fontSize:10,textAnchor:`end`,dx:`-0.5em`}),hideAxisLine:!0,hideTicks:!0,numTicks:5,label:i,labelProps:{fontSize:12,fill:`var(--text-color, #666)`,textAnchor:`middle`,transform:`rotate(-90, -35, ${s/2})`}}),e.map((e,t)=>(0,B.jsxs)(bg,{onMouseMove:t=>{Hge(t)&&g({tooltipData:e,tooltipLeft:t.clientX-b.left,tooltipTop:t.clientY-b.top})},onMouseLeave:v,children:[(0,B.jsx)(vhe,{cx:u(e.x),cy:d(e.y),r:5,fill:f(e.category)}),l.includes(e)&&(0,B.jsx)(kTe,{x:u(e.x),y:d(e.y),label:e.label,innerWidth:o,innerHeight:s})]},t))]})}),p&&(0,B.jsx)(x,{left:m,top:h,style:{position:`absolute`,backgroundColor:`var(--tooltip-bg, white)`,color:`var(--tooltip-text, #333)`,padding:`8px`,borderRadius:`4px`,boxShadow:`0 2px 4px rgba(0,0,0,0.1)`,fontSize:`12px`,pointerEvents:`none`},children:(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`strong`,{children:p.label}),(0,B.jsx)(`br`,{}),`Category: `,p.category,(0,B.jsx)(`br`,{}),`Position: (`,p.x.toFixed(2),`, `,p.y.toFixed(2),`)`]})})]})};function ATe(e){let t={code:`code`,h1:`h1`,h2:`h2`,h3:`h3`,p:`p`,pre:`pre`,span:`span`,...e.components};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(t.h1,{id:`understanding-embeddings-through-epic-fantasy`,children:`Understanding Embeddings Through Epic Fantasy`}),` 13`,(0,B.jsx)(t.p,{children:`In the world of Natural Language Processing (NLP), embeddings are like magical systems that transform words into numbers. Just as Allomancy in Mistborn or the One Power in The Wheel of Time can transmute and manipulate reality, embeddings convert text into numerical vectors that capture meaning and relationships.`}),` 14`,(0,B.jsx)(t.h2,{id:`what-are-embeddings`,children:`What are Embeddings?`}),` 15`,(0,B.jsx)(t.p,{children:`Imagine you're in the Great Library of Tar Valon or the archives of the White Tower. Each book has its own unique characteristics: some are about the One Power, others about Allomancy, some focus on the history of Middle-earth, while others emphasize the Cosmere's magic systems. Embeddings work similarly by capturing these characteristics as numbers, allowing us to understand relationships between different pieces of text.`}),` 16`,(0,B.jsx)(t.h2,{id:`word2vec-the-basic-magic-system`,children:`Word2Vec: The Basic Magic System`}),` 17`,(0,B.jsx)(t.p,{children:`Word2Vec is like the first magic system a novice learns. It creates embeddings by looking at the context of words. For example:`}),` 18`,(0,B.jsx)(t.pre,{className:`language-python`,children:(0,B.jsxs)(t.code,{className:`language-python code-highlight`,children:[(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token comment`,children:`# A simple Word2Vec example`}),` 19`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token keyword`,children:`from`}),` gensim`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`.`}),`models `,(0,B.jsx)(t.span,{className:`token keyword`,children:`import`}),` Word2Vec 20`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[`sentences `,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),` `,(0,B.jsx)(t.span,{className:`token punctuation`,children:`[`}),` 21`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` `,(0,B.jsx)(t.span,{className:`token punctuation`,children:`[`}),(0,B.jsx)(t.span,{className:`token string`,children:`'Kaladin'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` `,(0,B.jsx)(t.span,{className:`token string`,children:`'learns'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` `,(0,B.jsx)(t.span,{className:`token string`,children:`'to'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` `,(0,B.jsx)(t.span,{className:`token string`,children:`'use'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` `,(0,B.jsx)(t.span,{className:`token string`,children:`'Stormlight'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`]`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` 22`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` `,(0,B.jsx)(t.span,{className:`token punctuation`,children:`[`}),(0,B.jsx)(t.span,{className:`token string`,children:`'Gandalf'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` `,(0,B.jsx)(t.span,{className:`token string`,children:`'teaches'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` `,(0,B.jsx)(t.span,{className:`token string`,children:`'Frodo'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` `,(0,B.jsx)(t.span,{className:`token string`,children:`'about'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` `,(0,B.jsx)(t.span,{className:`token string`,children:`'the'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` `,(0,B.jsx)(t.span,{className:`token string`,children:`'Ring'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`]`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` 23`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` `,(0,B.jsx)(t.span,{className:`token punctuation`,children:`[`}),(0,B.jsx)(t.span,{className:`token string`,children:`'Vin'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` `,(0,B.jsx)(t.span,{className:`token string`,children:`'discovers'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` `,(0,B.jsx)(t.span,{className:`token string`,children:`'her'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` `,(0,B.jsx)(t.span,{className:`token string`,children:`'Mistborn'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` `,(0,B.jsx)(t.span,{className:`token string`,children:`'powers'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`]`}),` 24`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token punctuation`,children:`]`}),` 25`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[`model `,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),` Word2Vec`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),`sentences`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` vector_size`,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),(0,B.jsx)(t.span,{className:`token number`,children:`100`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` window`,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),(0,B.jsx)(t.span,{className:`token number`,children:`5`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` min_count`,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),(0,B.jsx)(t.span,{className:`token number`,children:`1`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),` 26`]}),(0,B.jsx)(t.span,{className:`code-line`,children:` 27`}),(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token comment`,children:`# Let's see how similar characters are`}),` 28`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token keyword`,children:`print`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),`model`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`.`}),`wv`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`.`}),`similarity`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),(0,B.jsx)(t.span,{className:`token string`,children:`'Kaladin'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` `,(0,B.jsx)(t.span,{className:`token string`,children:`'Frodo'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),` `,(0,B.jsx)(t.span,{className:`token comment`,children:`# Similar heroes`}),` 29`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token keyword`,children:`print`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),`model`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`.`}),`wv`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`.`}),`similarity`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),(0,B.jsx)(t.span,{className:`token string`,children:`'Kaladin'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` `,(0,B.jsx)(t.span,{className:`token string`,children:`'Sauron'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),` `,(0,B.jsx)(t.span,{className:`token comment`,children:`# Hero vs Villain`}),` 30`]})]})}),` 31`,(0,B.jsx)(t.p,{children:`If we show the Word2Vec numbers for some epic fantasy characters, they might look like this:`}),` 32`,(0,B.jsx)(eD,{data:[{x:.88,y:.95,label:`Kaladin`,category:`Hero`},{x:.82,y:.89,label:`Frodo`,category:`Hero`},{x:.74,y:.8,label:`Gandalf`,category:`Mentor`},{x:.7,y:.74,label:`Dalinar`,category:`Mentor`},{x:.22,y:.38,label:`Sauron`,category:`Villain`},{x:.3,y:.26,label:`Ruin`,category:`Villain`}],title:`Word2Vec: Character Relationships`}),` 33`,(0,B.jsx)(t.p,{children:`Heroes might naturally cluster together, while mentors form their own distinct group, and villains are cast far into the shadows. This captures how Word2Vec represents semantic relationships.`}),` 34`,(0,B.jsx)(t.h2,{id:`bert-the-advanced-magic-system`,children:`BERT: The Advanced Magic System`}),` 35`,(0,B.jsx)(t.p,{children:`BERT (Bidirectional Encoder Representations from Transformers) is like a more powerful magic system that understands context from both directions. It's like having a Fullborn who can use both Allomancy and Feruchemy, or a channeler who can weave the One Power in complex patterns.`}),` 36`,(0,B.jsx)(t.pre,{className:`language-python`,children:(0,B.jsxs)(t.code,{className:`language-python code-highlight`,children:[(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token keyword`,children:`from`}),` transformers `,(0,B.jsx)(t.span,{className:`token keyword`,children:`import`}),` BertTokenizer`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` BertModel 37`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token keyword`,children:`import`}),` torch 38`]}),(0,B.jsx)(t.span,{className:`code-line`,children:` 39`}),(0,B.jsxs)(t.span,{className:`code-line`,children:[`tokenizer `,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),` BertTokenizer`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`.`}),`from_pretrained`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),(0,B.jsx)(t.span,{className:`token string`,children:`'bert-base-uncased'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),` 40`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[`model `,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),` BertModel`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`.`}),`from_pretrained`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),(0,B.jsx)(t.span,{className:`token string`,children:`'bert-base-uncased'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),` 41`]}),(0,B.jsx)(t.span,{className:`code-line`,children:` 42`}),(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token comment`,children:`# Let's encode some fantasy concepts with more complex relationships`}),` 43`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[`texts `,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),` `,(0,B.jsx)(t.span,{className:`token punctuation`,children:`[`}),` 44`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` `,(0,B.jsx)(t.span,{className:`token string`,children:`"The Stormlight Archive tells the story of Kaladin, a former slave who becomes a Windrunner"`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` 45`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` `,(0,B.jsx)(t.span,{className:`token string`,children:`"Mistborn follows Vin's journey as a Mistborn, learning to use Allomancy and Feruchemy"`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` 46`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` `,(0,B.jsx)(t.span,{className:`token string`,children:`"The Wheel of Time weaves the tale of Rand al'Thor, the Dragon Reborn who can channel saidin"`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` 47`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` `,(0,B.jsx)(t.span,{className:`token string`,children:`"The Lord of the Rings chronicles Frodo's quest to destroy the One Ring in Mount Doom"`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` 48`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` `,(0,B.jsx)(t.span,{className:`token string`,children:`"The Way of Kings reveals Dalinar's struggle with his past and his bond with the Stormfather"`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` 49`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` `,(0,B.jsx)(t.span,{className:`token string`,children:`"The Final Empire shows Kelsier's plan to overthrow the Lord Ruler using Allomancy"`}),` 50`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token punctuation`,children:`]`}),` 51`]}),(0,B.jsx)(t.span,{className:`code-line`,children:` 52`}),(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token comment`,children:`# Get BERT embeddings with more detailed processing`}),` 53`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[`embeddings `,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),` `,(0,B.jsx)(t.span,{className:`token punctuation`,children:`[`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`]`}),` 54`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token keyword`,children:`for`}),` text `,(0,B.jsx)(t.span,{className:`token keyword`,children:`in`}),` texts`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`:`}),` 55`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` inputs `,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),` tokenizer`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),
55`text`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` return_tensors`,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),(0,B.jsx)(t.span,{className:`token string`,children:`"pt"`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` padding`,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),(0,B.jsx)(t.span,{className:`token boolean`,children:`True`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` truncation`,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),(0,B.jsx)(t.span,{className:`token boolean`,children:`True`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),` 56`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` outputs `,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),` model`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),(0,B.jsx)(t.span,{className:`token operator`,children:`**`}),`inputs`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),` 57`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` `,(0,B.jsx)(t.span,{className:`token comment`,children:`# Use CLS token embedding for better sentence-level representation`}),` 58`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` embeddings`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`.`}),`append`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),`outputs`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`.`}),`last_hidden_state`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`[`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`:`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` `,(0,B.jsx)(t.span,{className:`token number`,children:`0`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` `,(0,B.jsx)(t.span,{className:`token punctuation`,children:`:`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`]`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`.`}),`detach`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`.`}),`numpy`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),` 59`]})]})}),` 60`,(0,B.jsx)(t.p,{children:`Let's see how BERT might represent different fantasy concepts:`}),` 61`,(0,B.jsx)(eD,{data:[{x:.92,y:.9,label:`Stormlight`,category:`Magic System`},{x:.87,y:.84,label:`Allomancy`,category:`Magic System`},{x:.83,y:.92,label:`Feruchemy`,category:`Magic System`},{x:.9,y:.82,label:`The One Power`,category:`Magic System`},{x:.6,y:.56,label:`Shardblade`,category:`Artifact`},{x:.54,y:.46,label:`The One Ring`,category:`Artifact`},{x:.62,y:.6,label:`Mistcloak`,category:`Artifact`},{x:.5,y:.52,label:`Callandor`,category:`Artifact`}],title:`BERT: Concept Relationships`}),` 62`,(0,B.jsx)(t.p,{children:`If we plot BERT's embeddings, we might see a clear separation between magic systems and artifacts, while maintaining relationships within each category. This is like how a skilled channeler can distinguish between different weaves of the One Power while understanding their underlying connections.`}),` 63`,(0,B.jsx)(t.h2,{id:`visualizing-embeddings-the-art-of-pattern-weaving`,children:`Visualizing Embeddings: The Art of Pattern Weaving`}),` 64`,(0,B.jsx)(t.p,{children:`Visualizing high-dimensional embeddings is like weaving the One Power into a spell or creating surges in the Cosmere - it transforms abstract concepts into tangible effects. There are many ways to do this. Let's explore two powerful techniques:`}),` 65`,(0,B.jsx)(t.h3,{id:`t-sne-the-delicate-weave`,children:`t-SNE: The Delicate Weave`}),` 66`,(0,B.jsx)(t.pre,{className:`language-python`,children:(0,B.jsxs)(t.code,{className:`language-python code-highlight`,children:[(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token keyword`,children:`from`}),` sklearn`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`.`}),`manifold `,(0,B.jsx)(t.span,{className:`token keyword`,children:`import`}),` TSNE 67`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token keyword`,children:`import`}),` numpy `,(0,B.jsx)(t.span,{className:`token keyword`,children:`as`}),` np 68`]}),(0,B.jsx)(t.span,{className:`code-line`,children:` 69`}),(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token comment`,children:`# Apply t-SNE with more iterations for better convergence`}),` 70`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[`tsne `,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),` TSNE`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),` 71`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` n_components`,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),(0,B.jsx)(t.span,{className:`token number`,children:`2`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` 72`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` perplexity`,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),(0,B.jsx)(t.span,{className:`token number`,children:`30`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` 73`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` n_iter`,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),(0,B.jsx)(t.span,{className:`token number`,children:`2000`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` 74`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` learning_rate`,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),(0,B.jsx)(t.span,{className:`token string`,children:`'auto'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` 75`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` init`,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),(0,B.jsx)(t.span,{className:`token string`,children:`'pca'`}),` 76`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),` 77`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[`tsne_results `,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),` tsne`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`.`}),`fit_transform`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),`embeddings`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),` 78`]})]})}),` 79`,(0,B.jsx)(eD,{data:[{x:.93,y:.98,label:`The Stormlight Archive`,category:`Cosmere`},{x:.89,y:.93,label:`Mistborn Era 1`,category:`Cosmere`},{x:.85,y:.96,label:`Mistborn Era 2`,category:`Cosmere`},{x:.97,y:.92,label:`Elantris`,category:`Cosmere`},{x:.91,y:.9,label:`Warbreaker`,category:`Cosmere`},{x:.66,y:.68,label:`The Lord of the Rings`,category:`Middle-earth`},{x:.62,y:.73,label:`The Silmarillion`,category:`Middle-earth`}
79,{x:.7,y:.62,label:`The Hobbit`,category:`Middle-earth`},{x:.6,y:.6,label:`Unfinished Tales`,category:`Middle-earth`},{x:.22,y:.32,label:`The Eye of the World`,category:`Wheel of Time`},{x:.36,y:.4,label:`The Great Hunt`,category:`Wheel of Time`},{x:.28,y:.22,label:`The Dragon Reborn`,category:`Wheel of Time`},{x:.4,y:.36,label:`The Shadow Rising`,category:`Wheel of Time`},{x:.1,y:.88,label:`Stormlight`,category:`Magic System`},{x:.18,y:.92,label:`Allomancy`,category:`Magic System`},{x:.12,y:.8,label:`The One Power`,category:`Magic System`},{x:.2,y:.84,label:`Feruchemy`,category:`Magic System`}],title:`t-SNE: Fantasy Series Clustering`}),` 80`,(0,B.jsx)(t.p,{children:`Much like a delicate weave of the One Power, t-SNE preserves local relationships but can distort global structure. Notice how Cosmere books cluster tightly together, while maintaining some distance from Middle-earth works. This is particularly useful when we want to focus on the relationships between closely related concepts.`}),` 81`,(0,B.jsx)(t.h3,{id:`umap-the-powerful-surge`,children:`UMAP: The Powerful Surge`}),` 82`,(0,B.jsx)(t.pre,{className:`language-python`,children:(0,B.jsxs)(t.code,{className:`language-python code-highlight`,children:[(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token keyword`,children:`import`}),` umap 83`]}),(0,B.jsx)(t.span,{className:`code-line`,children:` 84`}),(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token comment`,children:`# Apply UMAP with more sophisticated parameters`}),` 85`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[`reducer `,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),` umap`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`.`}),`UMAP`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),` 86`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` n_components`,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),(0,B.jsx)(t.span,{className:`token number`,children:`2`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` 87`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` n_neighbors`,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),(0,B.jsx)(t.span,{className:`token number`,children:`15`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` 88`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` min_dist`,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),(0,B.jsx)(t.span,{className:`token number`,children:`0.1`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` 89`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` metric`,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),(0,B.jsx)(t.span,{className:`token string`,children:`'cosine'`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`,`}),` 90`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[` random_state`,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),(0,B.jsx)(t.span,{className:`token number`,children:`42`}),` 91`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),` 92`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[`umap_results `,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),` reducer`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`.`}),`fit_transform`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),`embeddings`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),` 93`]}),(0,B.jsx)(t.span,{className:`code-line`,children:` 94`}),(0,B.jsxs)(t.span,{className:`code-line`,children:[(0,B.jsx)(t.span,{className:`token comment`,children:`# We can also use UMAP for higher dimensions`}),` 95`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[`reducer_3d `,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),` umap`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`.`}),`UMAP`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),`n_components`,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),(0,B.jsx)(t.span,{className:`token number`,children:`3`}),(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),` 96`]}),(0,B.jsxs)(t.span,{className:`code-line`,children:[`umap_3d_results `,(0,B.jsx)(t.span,{className:`token operator`,children:`=`}),` reducer_3d`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`.`}),`fit_transform`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`(`}),`embeddings`,(0,B.jsx)(t.span,{className:`token punctuation`,children:`)`}),` 97`]})]})}),` 98`,(0,B.jsx)(eD,{data:[{x:.98,y:.99,label:`The Way of Kings`,category:`Cosmere`},{x:.94,y:.92,label:`Words of Radiance`,category:`Cosmere`},{x:.9,y:.97,label:`Oathbringer`,category:`Cosmere`},{x:.96,y:.9,label:`Rhythm of War`,category:`Cosmere`},{x:.92,y:.93,label:`The Final Empire`,category:`Cosmere`},{x:.99,y:.91,label:`The Well of Ascension`,category:`Cosmere`},{x:.88,y:.96,label:`The Hero of Ages`,category:`Cosmere`},{x:.68,y:.72,label:`The Fellowship of the Ring`,category:`Middle-earth`},{x:.72,y:.66,label:`The Two Towers`,category:`Middle-earth`},{x:.64,y:.78,label:`The Return of the King`,category:`Middle-earth`},{x:.7,y:.74,label:`The Silmarillion`,category:`Middle-earth`},{x:.18,y:.38,label:`The Eye of the World`,category:`Wheel of Time`},{x:.32,y:.29,label:`The Great Hunt`,category:`Wheel of Time`},{x:.24,y:.33,label:`The Dragon Reborn`,category:`Wheel of Time`},{x:.36,y:.27,label:`The Shadow Rising`,category:`Wheel of Time`},{x:.2,y:.35,label:`The Fires of Heaven`,category:`Wheel of Time`},{x:.08,y:.92,label:`Stormlight`,category:`Magic System`},{x:.16,y:.99,label:`Allomancy`,category:`Magic System`},{x:.12,y:.84,label:`Feruchemy`,category:`Magic System`},{x:.18,y:.89,label:`The One Power`,category:`Magic System`},{x:.1,y:.87,label:`Hemalurgy`,category:`Magic System`}],title:`UMAP: Fantasy Series Clustering`}),` 99`,(0,B.jsx)(t.p,{children:`In contrast to t-SNE, UMAP is like a powerful surge of Stormlight. It can maintain both local and global structure more effectively. The cluster
99s are more evenly distributed, and the relationships between different fantasy worlds are more clearly preserved. This makes it particularly useful when we need to understand both the fine details and the broader picture of our data.`}),` 100`,(0,B.jsx)(t.h2,{id:`conclusion`,children:`Conclusion`}),` 101`,(0,B.jsx)(t.p,{children:`Embeddings are powerful tools that help us understand and work with text in ways that were once thought impossible. Just as epic fantasy literature transports us to worlds of complex magic systems and deep lore, embeddings transform our understanding of language into a mathematical space where we can discover new relationships and insights.`}),` 102`,(0,B.jsx)(t.h2,{id:`authors-note`,children:`Author's Note`}),` 103`,(0,B.jsx)(t.p,{children:`The embeddings and visualizations shown in this article are fictional. They are meant to represent the idea in a simple way. I would personally love to revisit this article with real embeddings and live magical weavings (i.e., charts) in the future!`})]})}function jTe(e={}){let{wrapper:t}=e.components||{};return t?(0,B.jsx)(t,{...e,children:(0,B.jsx)(ATe,{...e})}):ATe(e)}var MTe=({data:e,width:t=1e3,height:n=550,onItemClick:r})=>{let i={top:20,right:120,bottom:60,left:100},a=t-i.left-i.right,o=n-i.top-i.bottom,s=ug(`#E2E8F0`,`#2D3748`),c=ug(`#4A5568`,`#A0AEC0`),l=ug(`#fff`,`#1A202C`),u=ug(`#1A202C`,`#F7FAFC`),d=(0,_.useMemo)(()=>{let t=[];return e.forEach((e,n)=>{e.spans.forEach(e=>{t.push({...e,bucket_index:n})})}),t},[e]),f=(0,_.useMemo)(()=>Array.from(new Set(d.map(e=>e.type))),[d]),p=ug(`#6b8dd6`,`#2f4a9e`),m=ug(`#efb118`,`#c98e0d`),h=ug(`#ff725c`,`#d94e3a`),g=ug(`#6cc5b0`,`#4d9a88`),v=ug(`#3ca951`,`#2d7d3c`),y=hb().domain(f).range([p,m,h,g,v]),b=e.length>0?e[0].bucket_start:0,x=e.length>0?e[e.length-1].bucket_end:b+100,S=mb().domain([0,x-b]).range([0,a]).nice(),{tooltipData:C,tooltipLeft:w,tooltipTop:T,showTooltip:E,hideTooltip:D}=Wb(),{containerRef:O,containerBounds:k,TooltipInPortal:A}=ox({scroll:!0,detectBounds:!0});return(0,B.jsxs)(V,{style:{width:`100%`,maxWidth:t,margin:`0 auto`},position:`relative`,children:[(0,B.jsx)(`svg`,{width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`,viewBox:`0 0 ${t} ${n}`,style:{userSelect:`none`},ref:O,children:(0,B.jsxs)(bg,{left:i.left,top:i.top,children:[S.ticks(10).map(e=>(0,B.jsx)(`line`,{x1:S(e),y1:0,x2:S(e),y2:o,stroke:s,strokeWidth:1,strokeDasharray:`2,2`},`x-grid-${e}`)),d.map((e,t)=>{let n=e.start_time-b,i=S(n),a=Math.max(2,S(n+e.duration)-i),o=t*24;return(0,B.jsxs)(bg,{children:[(0,B.jsx)(vb,{x:i,y:o,width:a,height:20,fill:y(e.type),stroke:l,strokeWidth:1,style:{cursor:r?`pointer`:`default`},onClick:()=>r?.(e),onMouseMove:t=>{E({tooltipData:e,tooltipLeft:t.clientX-k.left,tooltipTop:t.clientY-k.top})},onMouseLeave:D}),a>20&&(0,B.jsx)(`text`,{x:i+4,y:o+20/2,dy:`.35em`,fontSize:10,fill:u,style:{pointerEvents:`none`},children:e.name.length>a/5?e.name.substring(0,7)+`...`:e.name})]},`gantt-item-${t}`)}),(0,B.jsx)(zb,{scale:S,top:o,stroke:c,tickStroke:c,tickFormat:e=>{let t=Math.floor(e);return`${Math.floor(t/60)}:${(t%60).toString().padStart(2,`0`)}`},tickLabelProps:()=>({fill:c,fontSize:10,textAnchor:`middle`}),label:`Time (MM:SS)`,labelProps:{fontSize:12,fill:c,textAnchor:`middle`}}),d.map((e,t)=>(0,B.jsx)(`text`,{x:-10,y:t*24+20/2,dy:`.35em`,fontSize:10,fill:c,textAnchor:`end`,style:{userSelect:`none`},children:e.type},`gantt-label-${t}`)),(0,B.jsx)(bg,{left:a+20,top:0,children:f.map((e,t)=>(0,B.jsxs)(bg,{top:t*20,children:[(0,B.jsx)(`rect`,{width:12,height:12,fill:y(e)}),(0,B.jsx)(`text`,{x:16,y:10,fontSize:11,fill:c,style:{userSelect:`none`},children:e})]},`gantt-legend-${t}`))})]})}),C&&(0,B.jsx)(A,{left:w,top:T,style:{position:`absolute`,backgroundColor:`var(--tooltip-bg, white)`,color:`var(--tooltip-text, #333)`,padding:`8px`,borderRadius:`4px`,boxShadow:`0 2px 4px rgba(0,0,0,0.1)`,fontSize:`12px`,pointerEvents:`none`},children:(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`strong`,{children:C.name}),(0,B.jsx)(`br`,{}),`Type: `,C.type,(0,B.jsx)(`br`,{}),`Duration: `,C.duration.toFixed(3),`s`]})})]})},NTe=l(o(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(d()):typeof define==`function`&&define.amd?define([`react`],r):typeof e==`object`?e.reactJsonView=r(d()):n.reactJsonView=r(n.React)})(e,e=>(()=>{var t={165(e,t,n){let r=n(877),i={};for(let e of Object.keys(r))i[r[e]]=e;let a={rgb:{channels:3,labels:`rgb`},hsl:{channels:3,labels:`hsl`},hsv:{channels:3,labels:`hsv`},hwb:{channels:3,labels:`hwb`},cmyk:{channels:4,labels:`cmyk`},xyz:{channels:3,labels:`xyz`},lab:{channels:3,labels:`lab`},lch:{channels:3,labels:`lch`},hex:{channels:1,labels:[`hex`]},keyword:{channels:1,labels:[`keyword`]},ansi16:{channels:1,labels:[`ansi16`]},ansi256:{channels:1,labels:[`ansi256`]},hcg:{channels:3,labels:[`h`,`c`,`g`]},apple:{channels:3,labels:[`r16`,`g16`,`b16`]},gray:{channels:1,labels:[`gray`]}};e.exports=a;for(let e of Object.keys(a)){if(!(`channels`in a[e]))throw Error(`missing channels property: `+e);if(!(`labels`in a[e]))throw Error(`missing channel labels property: `+e);if(a[e].labels.length!==a[e].channels)throw Error(`channel and label counts mismatch: `+e);let{channels:t,labels:n}=a[e];delete a[e].channels,delete a[e].labels,Object.defineProperty(a[e],"channels",{value:t}
103),Object.defineProperty(a[e],"labels",{value:n})}function o(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}a.rgb.hsl=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s,c;a===i?s=0:t===a?s=(n-r)/o:n===a?s=2+(r-t)/o:r===a&&(s=4+(t-n)/o),s=Math.min(60*s,360),s<0&&(s+=360);let l=(i+a)/2;return c=a===i?0:l<=.5?o/(a+i):o/(2-a-i),[s,100*c,100*l]},a.rgb.hsv=function(e){let t,n,r,i,a,o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),d=function(e){return(l-e)/6/u+.5};return u===0?(i=0,a=0):(a=u/l,t=d(o),n=d(s),r=d(c),o===l?i=r-n:s===l?i=1/3+t-r:c===l&&(i=2/3+n-t),i<0?i+=1:i>1&&--i),[360*i,100*a,100*l]},a.rgb.hwb=function(e){let t=e[0],n=e[1],r=e[2],i=a.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,100*o,100*r]},a.rgb.cmyk=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r);return[100*((1-t-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*i]},a.rgb.keyword=function(e){let t=i[e];if(t)return t;let n,a=1/0;for(let t of Object.keys(r)){let i=o(e,r[t]);i<a&&(a=i,n=t)}return n},a.keyword.rgb=function(e){return r[e]},a.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;return t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},a.rgb.lab=function(e){let t=a.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,[116*r-16,500*(n-r),200*(r-i)]},a.hsl.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i,a,o;if(n===0)return o=255*r,[o,o,o];i=r<.5?r*(1+n):r+n-r*n;let s=2*r-i,c=[0,0,0];for(let e=0;e<3;e++)a=t+1/3*-(e-1),a<0&&a++,a>1&&a--,o=6*a<1?s+6*(i-s)*a:2*a<1?i:3*a<2?s+(i-s)*(2/3-a)*6:s,c[e]=255*o;return c},a.hsl.hsv=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);return r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a,[t,100*(r===0?2*i/(a+i):2*n/(r+n)),100*((r+n)/2)]},a.hsv.rgb=function(e){let t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},a.hsv.hsl=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01),a,o;o=(2-n)*r;let s=(2-n)*i;return a=n*i,a/=s<=1?s:2-s,a||=0,o/=2,[t,100*a,100*o]},a.hwb.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i=n+r,a;i>1&&(n/=i,r/=i);let o=Math.floor(6*t),s=1-r;a=6*t-o,1&o&&(a=1-a);let c=n+a*(s-n),l,u,d;switch(o){default:case 6:case 0:l=s,u=c,d=n;break;case 1:l=c,u=s,d=n;break;case 2:l=n,u=s,d=c;break;case 3:l=n,u=c,d=s;break;case 4:l=c,u=n,d=s;break;case 5:l=s,u=n,d=c}return[255*l,255*u,255*d]},a.cmyk.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},a.xyz.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i,a,o;return i=3.2406*t+-1.5372*n+-.4986*r,a=-.9689*t+1.8758*n+.0415*r,o=.0557*t+-.204*n+1.057*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*i,255*a,255*o]},a.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];return t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,[116*n-16,500*(t-n),200*(n-r)]},a.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;let i=n**3,a=t**3,o=r**3;return n=i>.008856?i:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},a.lab.lch=function(e){let t=e[0],n=e[1],r=e[2],i;return i=360*Math.atan2(r,n)/2/Math.PI,i<0&&(i+=360),[t,Math.sqrt(n*n+r*r),i]},a.lch.lab=function(e){let t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},a.rgb.ansi16=function(e,t=null){let[n,r,i]=e,o=t===null?a.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){let t=e[0],n=e[1],r=e[2];
103return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){let t=10*(e-232)+8;return[t,t,t]}let t;return e-=16,[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},a.rgb.hex=function(e){let t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return`000000`.substring(t.length)+t},a.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split(``).map(e=>e+e).join(``));let r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),o=i-a,s,c;return s=o<1?a/(1-o):0,c=o<=0?0:i===t?(n-r)/o%6:i===n?2+(r-t)/o:4+(t-n)/o,c/=6,c%=1,[360*c,100*o,100*s]},a.hsl.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},a.hsv.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.hcg.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[255*r,255*r,255*r];let i=[0,0,0],a=t%1*6,o=a%1,s=1-o,c=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-n)*r,[255*(n*i[0]+c),255*(n*i[1]+c),255*(n*i[2]+c)]},a.hcg.hsv=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},a.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},a.hcg.hwb=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},a.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=function(e){return[0,0,e[0]]},a.gray.hsv=a.gray.hsl,a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){let t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return`000000`.substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},880(e,t,n){let r=n(165),i=n(985),a={};Object.keys(r).forEach(e=>{a[e]={},Object.defineProperty(a[e],"channels",{value:r[e].channels}),Object.defineProperty(a[e],"labels",{value:r[e].labels});let t=i(e);Object.keys(t).forEach(n=>{let r=t[n];a[e][n]=function(e){let t=function(...t){let n=t[0];if(n==null)return n;n.length>1&&(t=n);let r=e(t);if(typeof r==`object`)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return`conversion`in e&&(t.conversion=e.conversion),t}(r),a[e][n].raw=function(e){let t=function(...t){let n=t[0];return n==null?n:(n.length>1&&(t=n),e(t))};return`conversion`in e&&(t.conversion=e.conversion),t}(r)})}),e.exports=a},985(e,t,n){let r=n(165);function i(e){let t=function(){let e={},t=Object.keys(r);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;){let e=n.pop(),i=Object.keys(r[e]);for(let r=i.length,a=0;a<r;a++){let r=i[a],o=t[r];o.distance===-1&&(o.distance=t[e].distance+1,o.parent=e,n.unshift(r))}}return t}function a(e,t){return function(n){return t(e(n))}}function o(e,t){let n=[t[e].parent,e],i=r[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)n.unshift(t[o].parent),i=a(r[t[o].parent][o],i),o=t[o].parent;return i.conversion=n,i}e.exports=function(e){let t=i(e),n={},r=Object.keys(t);for(let e=r.length,i=0;i<e;i++){let e=r[i];t[e].parent!==null&&(n[e]=o(e,t))}return n}},877(e){e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],ol
103ive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},138(e,t,n){var r=n(877),i=n(403),a=Object.hasOwnProperty,o=Object.create(null);
103for(var s in r)a.call(r,s)&&(o[r[s]]=s);var c=e.exports={to:{},get:{}};function l(e,t,n){return Math.min(Math.max(t,e),n)}function u(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?`0`+t:t}c.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case`hsl`:t=c.get.hsl(e),n=`hsl`;break;case`hwb`:t=c.get.hwb(e),n=`hwb`;break;default:t=c.get.rgb(e),n=`rgb`}return t?{model:n,value:t}:null},c.get.rgb=function(e){if(!e)return null;var t,n,i,o=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=t[2],t=t[1],n=0;n<3;n++){var s=2*n;o[n]=parseInt(t.slice(s,s+2),16)}i&&(o[3]=parseInt(i,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(i=(t=t[1])[3],n=0;n<3;n++)o[n]=parseInt(t[n]+t[n],16);i&&(o[3]=parseInt(i+i,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)o[n]=parseInt(t[n+1],0);t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?t[1]===`transparent`?[0,0,0,0]:a.call(r,t[1])?((o=r[t[1]])[3]=1,o):null:null;for(n=0;n<3;n++)o[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}for(n=0;n<3;n++)o[n]=l(o[n],0,255);return o[3]=l(o[3],0,1),o},c.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.to.hex=function(){var e=i(arguments);return`#`+u(e[0])+u(e[1])+u(e[2])+(e[3]<1?u(Math.round(255*e[3])):``)},c.to.rgb=function(){var e=i(arguments);return e.length<4||e[3]===1?`rgb(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`)`:`rgba(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`, `+e[3]+`)`},c.to.rgb.percent=function(){var e=i(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||e[3]===1?`rgb(`+t+`%, `+n+`%, `+r+`%)`:`rgba(`+t+`%, `+n+`%, `+r+`%, `+e[3]+`)`},c.to.hsl=function(){var e=i(arguments);return e.length<4||e[3]===1?`hsl(`+e[0]+`, `+e[1]+`%, `+e[2]+`%)`:`hsla(`+e[0]+`, `+e[1]+`%, `+e[2]+`%, `+e[3]+`)`},c.to.hwb=function(){var e=i(arguments),t=``;return e.length>=4&&e[3]!==1&&(t=`, `+e[3]),`hwb(`+e[0]+`, `+e[1]+`%, `+e[2]+`%`+t+`)`},c.to.keyword=function(e){return o[e.slice(0,3)]}},742(e,t,n){let r=n(138),i=n(880),a=[`keyword`,`gray`,`hex`],o={};for(let e of Object.keys(i))o[[...i[e].labels].sort().join(``)]=e;let s={};function c(e,t){if(!(this instanceof c))return new c(e,t);if(t&&t in a&&(t=null),t&&!(t in i))throw Error(`Unknown model: `+t);let n,l;if(e==null)this.model=`rgb`,this.color=[0,0,0],this.valpha=1;else if(e instanceof c)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e==`string`){let t=r.get(e);if(t===null)throw Error(`Unable to parse color from string: `+e);this.model=t.model,l=i[this.model].channels,this.color=t.value.slice(0,l),this.valpha=typeof t.value[l]==`number`?t.value[l]:1}else if(e.length>0){this.model=t||`rgb`,l=i[this.model].channels;let n=Array.prototype.slice.call(e,0,l);this.color=f(n,l),this.valpha=typeof e[l]==`number`?e[l]:1}else if(typeof e==`number`)this.model=`rgb`,this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;let t=Object.keys(e);`alpha`in e&&(t.splice(t.indexOf(`alpha`),1),this.valpha=typeof e.alpha==`number`?e.alpha:0);let r=t.sort().join(``);if(!(r in o))throw Error(`Unable to parse color from object: `+JSON.stringify(e));this.model=o[r];let{labels:a}=i[this.model],s=[];for(n=0;n<a.length;n++)s.push(e[a[n]]);this.color=f(s)}if(s[this.model])for(l=i[this.model].channels,n=0;n<l;n++){let e=s[this.model][n];e&&(this.color[n]=e(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}c.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in r.to?this:this.rgb();t=t.round(typeof e==`number`?e:1);let n=t.valpha===1?t.color:[...t.color,this.valpha];return r.to[t.model](n)}
103,percentString(e){let t=this.rgb().round(typeof e==`number`?e:1),n=t.valpha===1?t.color:[...t.color,this.valpha];return r.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=i[this.model],{labels:n}=i[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new c([...this.color.map(l(e)),this.valpha],this.model)},alpha(e){return e===void 0?this.valpha:new c([...this.color,Math.max(0,Math.min(1,e))],this.model)},red:u(`rgb`,0,d(255)),green:u(`rgb`,1,d(255)),blue:u(`rgb`,2,d(255)),hue:u([`hsl`,`hsv`,`hsl`,`hwb`,`hcg`],0,e=>(e%360+360)%360),saturationl:u(`hsl`,1,d(100)),lightness:u(`hsl`,2,d(100)),saturationv:u(`hsv`,1,d(100)),value:u(`hsv`,2,d(100)),chroma:u(`hcg`,1,d(100)),gray:u(`hcg`,2,d(100)),white:u(`hwb`,1,d(100)),wblack:u(`hwb`,2,d(100)),cyan:u(`cmyk`,0,d(100)),magenta:u(`cmyk`,1,d(100)),yellow:u(`cmyk`,2,d(100)),black:u(`cmyk`,3,d(100)),x:u(`xyz`,0,d(95.047)),y:u(`xyz`,1,d(100)),z:u(`xyz`,2,d(108.833)),l:u(`lab`,0,d(100)),a:u(`lab`,1),b:u(`lab`,2),keyword(e){return e===void 0?i[this.model].keyword(this.color):new c(e)},hex(e){return e===void 0?r.to.hex(this.rgb().round().color):new c(e)},hexa(e){if(e!==void 0)return new c(e);let t=this.rgb().round().color,n=Math.round(255*this.valpha).toString(16).toUpperCase();return n.length===1&&(n=`0`+n),r.to.hex(t)+n},rgbNumber(){let e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){let e=this.rgb().color,t=[];for(let[n,r]of e.entries()){let e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?`AAA`:t>=4.5?`AA`:``},isDark(){let e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return c.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw Error(`Argument to "mix" was not a Color instance, but rather an instance of `+typeof e);let n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,a=2*i-1,o=n.alpha()-r.alpha(),s=((a*o===-1?a:(a+o)/(1+a*o))+1)/2,l=1-s;return c.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(let e of Object.keys(i)){if(a.includes(e))continue;let{channels:t}=i[e];c.prototype[e]=function(...t){return this.model===e?new c(this):t.length>0?new c(t,e):new c([...(n=i[this.model][e].raw(this.color),Array.isArray(n)?n:[n]),this.valpha],e);var n},c[e]=function(...n){let r=n[0];return typeof r==`number`&&(r=f(n,t)),new c(r,e)}}function l(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}function u(e,t,n){e=Array.isArray(e)?e:[e];for(let r of e)(s[r]||(s[r]=[]))[t]=n;return e=e[0],function(r){let i;return r===void 0?(i=this[e]().color[t],n&&(i=n(i)),i):(n&&(r=n(r)),i=this[e](),i.color[t]=r,i)}}function d(e){return function(t){return Math.max(0,Math.min(e,t))}}function f(e,t){for(let n=0;n<t;n++)typeof e[n]!=`number`&&(e[n]=0);return e}e.exports=c},784(e){var t,n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}h(e,t,a,{once:!0}),t!==`error`&&function(e,t,n){typeof e.on==`function`&&h(e,`error`,t,n)}(e,i,{once:!0})})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}function c(e){return e._maxListeners===void 0?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,a,o,l;if(s(n),(a=e._events)===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),a=e._events),o=a[t]),o===void 0)
vendor: 4,516 bytes, line 103
103o=a[t]=n,++e._eventsCount;else if(typeof o==`function`?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var u=Error(`Possible EventEmitter memory leak detected. `+o.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);u.name=`MaxListenersExceededWarning`,u.emitter=e,u.type=t,u.count=o.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function p(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}function m(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function h(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else{if(typeof e.addEventListener!=`function`)throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e);e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)})}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if(typeof e!=`number`||e<0||i(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);o=e}}),a.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||i(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else{var l=c.length,u=m(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,o;if(s(t),(r=this._events)===void 0||(n=r[e])===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if((n=this._events)===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i,a=Object.keys(n);for(r=0;r<a.length;++r)(i=a[r])!==`removeListener`&&this.removeAllListeners(i);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(t=n[e])==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):p.c
103all(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},94(e){e.exports=function(e){return!(!e||typeof e==`string`)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!==`String`))}},403(e,t,n){var r=n(94),i=Array.prototype.concat,a=Array.prototype.slice,o=e.exports=function(e){for(var t=[],n=0,o=e.length;n<o;n++){var s=e[n];r(s)?t=i.call(t,a.call(s)):t.push(s)}return t};o.wrap=function(e){return function(){return e(o(arguments))}}},119(t){t.exports=e}},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{function e(t){return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(t){var n=function(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}(t,`string`);return e(n)==`symbol`?n:n+``}function n(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t];t%2?a(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,`value`in i&&(i.writable=!0),Object.defineProperty(e,t(i.key),i)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d=function(){return!!e})()}function f(t,n){if(n&&(e(n)==`object`||typeof n==`function`))return n;if(n!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(t)}function p(e,t,n){return t=u(t),f(e,d()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function h(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}r.r(i),r.d(i,{default:()=>Rr});var g=r(119),_=r.n(g);function v(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function y(e){this.setState(function(t){return this.constructor.getDerivedStateFromProps(e,t)??null}.bind(this))}function b(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function x(e){var t=e.prototype;if(!t||!t.isReactComponent)throw Error(`Can only polyfill class components`);if(typeof e.getDerivedStateFromProps!=`function`&&typeof t.getSnapshotBeforeUpdate!=`function`)return e;var n=null,r=null,i=null;if(typeof t.componentWillMount==`function`?n=`componentWillMount`:typeof t.UNSAFE_componentWillMount==`function`&&(n=`UNSAFE_componentWillMount`),typeof t.componentWillReceiveProps==`function`?r=`componentWillReceiveProps`:typeof t.UNSAFE_componentWillReceiveProps==`function`&&(r=`UNSAFE_componentWillReceiveProps`),typeof t.componentWillUpdate==`function`?i=`componentWillUpdate`:typeof t.UNSAFE_componentWillUpdate==`function`&&(i=`UNSAFE_componentWillUpdate`),n!==null||r!==null||i!==null){var a=e.displayName||e.name,o=typeof e.getDerivedStateFromProps==`function`?`getDerivedStateFromProps()`:`getSnapshotBeforeUpdate()`;throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs. 104 105`+a+` uses `+o+` but also contains the following legacy lifecycles:`+(n===null?``:` 106 `+n)+(r===null?``:` 107 `+r)+(i===null?``:` 108 `+i)+` 109 110The above lifecycles should be removed. Learn more about this warning here: 111https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps==`function`&&(t.componentWillMount=v,t.componentWillReceiveProps=y),typeof t.getSnapshotBeforeUpdate==`function`){if(typeof t.componentDidUpdate!=`function`)throw Error(`Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype`);t.componentWillUpdate=b;var s=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;s.call(this,e,t,r)}}return e}function S(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function C(e,t){if(e==null)return{};var n,r,i=S(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function w(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function T(e,t){if(e){if(typeof e==`string`)return w(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}function E(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}(e)||T(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance. 112In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function D(e,t){if(t&&e?.constructor===t)return`bigNumber`;var n=function(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}(e);return n===`number`&&(n=isNaN(e)?`nan`:(0|e)===e?`integer`:`float`),n}function O(e){return e.replace(/\\/g,`\\\\`).replace(/\n/g,`\\n`).replace(/\t/g,`\\t`).replace(/\r/g,`\\r`).replace(/\f/g,`\\f`)}v.__suppressDeprecationWarning=!0,y.__suppressDeprecationWarning=!0,b.__suppressDeprecationWarning=!0;var k=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=(e.parent_type,e.namespace),n=e.quotesOnKeys,r=e.indentWidth,i=e.theme,a=e.singleIndent,o=e.showComma,s=e.isLast,c=e.jsvRoot,l=e.name?e.name:``;return _().createElement(`div`,{className:`variable-row`},_().createElement(`span`,Object.assign({},z(i,`object-name`),{key:t},z(i,`objectKeyVal`,{paddingLeft:r*a})),_().createElement(`span`,{className:`object-key`}
112,n&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`),_().createElement(`span`,null,l),n&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`)),_().createElement(`span`,z(i,`colon`),`:`)),_().createElement(`span`,z(i,`circularReference`),`[CIRCULAR REFERENCE]`),o&&!s&&!c&&_().createElement(`span`,z(i,`comma`),`,`))}}])}(_().PureComponent),A={scheme:`rjv-default`,author:`mac gainor`,base00:`rgba(0, 0, 0, 0)`,base01:`rgb(245, 245, 245)`,base02:`rgb(235, 235, 235)`,base03:`#93a1a1`,base04:`rgba(0, 0, 0, 0.3)`,base05:`#586e75`,base06:`#073642`,base07:`#002b36`,base08:`#d33682`,base09:`#cb4b16`,base0A:`#dc322f`,base0B:`#859900`,base0C:`#6c71c4`,base0D:`#586e75`,base0E:`#2aa198`,base0F:`#268bd2`},j={scheme:`rjv-grey`,author:`mac gainor`,base00:`rgba(1, 1, 1, 0)`,base01:`rgba(1, 1, 1, 0.1)`,base02:`rgba(0, 0, 0, 0.2)`,base03:`rgba(1, 1, 1, 0.3)`,base04:`rgba(0, 0, 0, 0.4)`,base05:`rgba(1, 1, 1, 0.5)`,base06:`rgba(1, 1, 1, 0.6)`,base07:`rgba(1, 1, 1, 0.7)`,base08:`rgba(1, 1, 1, 0.8)`,base09:`rgba(1, 1, 1, 0.8)`,base0A:`rgba(1, 1, 1, 0.8)`,base0B:`rgba(1, 1, 1, 0.8)`,base0C:`rgba(1, 1, 1, 0.8)`,base0D:`rgba(1, 1, 1, 0.8)`,base0E:`rgba(1, 1, 1, 0.8)`,base0F:`rgba(1, 1, 1, 0.8)`};let M={white:`#fff`,black:`#000`,transparent:`rgba(1, 1, 1, 0)`,globalFontFamily:`monospace`,globalCursor:`default`,indentBlockWidth:`5px`,braceFontWeight:`bold`,braceCursor:`pointer`,ellipsisFontSize:`18px`,ellipsisLineHeight:`10px`,ellipsisCursor:`pointer`,keyMargin:`0px 5px`,keyLetterSpacing:`0.5px`,keyFontStyle:`none`,keyBorderRadius:`3px`,keyColonWeight:`bold`,keyVerticalAlign:`top`,keyOpacity:`0.85`,keyOpacityHover:`1`,keyValPaddingTop:`3px`,keyValPaddingBottom:`3px`,keyValPaddingRight:`5px`,keyValBorderLeft:`1px solid`,keyValBorderHover:`2px solid`,keyValPaddingHover:`3px 5px 3px 4px`,pushedContentMarginLeft:`6px`,variableValuePaddingRight:`6px`,nullFontSize:`11px`,nullFontWeight:`bold`,nullPadding:`1px 2px`,nullBorderRadius:`3px`,nanFontSize:`11px`,nanFontWeight:`bold`,nanPadding:`1px 2px`,nanBorderRadius:`3px`,undefinedFontSize:`11px`,undefinedFontWeight:`bold`,undefinedPadding:`1px 2px`,undefinedBorderRadius:`3px`,dataTypeFontSize:`11px`,dataTypeMarginRight:`4px`,datatypeOpacity:`0.8`,objectSizeBorderRadius:`3px`,objectSizeFontStyle:`italic`,objectSizeMargin:`0px 6px 0px 0px`,clipboardCursor:`pointer`,clipboardCheckMarginLeft:`-12px`,metaDataPadding:`0px 0px 0px 10px`,arrayGroupMetaPadding:`0px 0px 0px 4px`,iconContainerWidth:`17px`,tooltipPadding:`4px`,editInputMinWidth:`130px`,editInputBorderRadius:`2px`,editInputPadding:`5px`,editInputMarginRight:`4px`,editInputFontFamily:`monospace`,iconCursor:`pointer`,iconFontSize:`15px`,iconPaddingRight:`1px`,dateValueMarginLeft:`2px`,iconMarginRight:`3px`,detectedRowPaddingTop:`3px`,addKeyCoverBackground:`rgba(255, 255, 255, 0.3)`,addKeyCoverPosition:`absolute`,addKeyCoverPositionPx:`0px`,addKeyModalWidth:`200px`,addKeyModalMargin:`auto`,addKeyModalPadding:`10px`,addKeyModalRadius:`3px`,commaColor:`#666`,commaFontSize:`12px`,commaMarginRight:`4px`};var N=r(742);let P=function(e){return e},F=typeof global==`object`&&global&&global.Object===Object&&global;var ee=typeof self==`object`&&self&&self.Object===Object&&self;let te=F||ee||Function(`return this`)(),ne=te.Symbol;var I=Object.prototype,re=I.hasOwnProperty,ie=I.toString,ae=ne?ne.toStringTag:void 0;let oe=function(e){var t=re.call(e,ae),n=e[ae];try{e[ae]=void 0;var r=!0}catch{}var i=ie.call(e);return r&&(t?e[ae]=n:delete e[ae]),i};var se=Object.prototype.toString;let ce=function(e){return se.call(e)};var le=ne?ne.toStringTag:void 0;let ue=function(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:le&&le in Object(e)?oe(e):ce(e)},de=function(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)},fe=function(e){if(!de(e))return!1;var t=ue(e);return t==`[object Function]`||t==`[object GeneratorFunction]`||t==`[object AsyncFunction]`||t==`[object Proxy]`},pe=te[`__core-js_shared__`];var me,he=(me=/[^.]+$/.exec(pe&&pe.keys&&pe.keys.IE_PROTO||``))?`Symbol(src)_1.`+me:``;let ge=function(e){return!!he&&he in e};var _e=Function.prototype.toString;let L=function(e){if(e!=null){try{return _e.call(e)}catch{}try{return e+``}catch{}}return``};var ve=/^\[object .+?Constructor\]$/,ye=Function.prototype,be=Object.prototype,R=ye.toString,xe=be.hasOwnProperty,Se=RegExp(`^`+R.call(xe).replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);let Ce=function(e){return!(!de(e)||ge(e))&&(fe(e)?Se:ve).test(L(e))},we=function(e,t){return e?.[t]},Te=function(e,t){var n=we(e,t);return Ce(n)?n:void 0};var Ee=Te(te,`WeakMap`);let De=Ee&&new Ee,Oe=De?function(e,t){return De.set(e,t),e}:P;var ke=Object.create;let Ae=function(){function e(){}return function(t){if(!de(t))return{};if(ke)return ke(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),je=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Ae(e.prototype),r=e.apply(n,t);return de(r)?r:n}},Me=function(e,t,n){var r=1&t,i=je(e);return function t(){return(this&&this!==te&&this instanceof t?i:e).apply(r?n:this,arguments)}},Ne=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)};var Pe=Math.max;let Fe=function(e,t,n,r){for(var i=-1,a=e.length,o=n.length,s=-1,c=t.length,l=Pe(a-o,0),u=Array(c+l),d=!r;++s<c;)u[s]=t[s];for(;++i<o;)(d||i<a)&&(u[n[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u};var Ie=Math.max;let Le=function(e,t,n,r){for(var i=-1,a=e.length,o=-1,s=n.length,c=-1,l=t.length,u=Ie(a-s,0),d=Array(u+l),f=!r;++i<u;)d[i]=e[i];for(var p=i;++c<l;)d[p+c]=t[c];for(;++o<s;)(f||i<a)&&(d[p+n[o]]=e[i++]);return d},Re=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r},ze=function(){};function Be(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}Be.prototype=Ae(ze.prototype),Be.prototype.constructor=Be;let Ve=Be,He=De?function(e){return De.get(e)}:function(){},Ue={};var We=Object.prototype.hasOwnProperty;let Ge=function(e){for(var t=e.name+``,n=Ue[t],r=We.call(Ue,t)?n.length:0;r--;){var i=n[r],a=i.func;
112if(a==null||a==e)return i.name}return t};function Ke(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}Ke.prototype=Ae(ze.prototype),Ke.prototype.constructor=Ke;let qe=Ke,Je=Array.isArray,Ye=function(e){return typeof e==`object`&&!!e},Xe=function(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t},Ze=function(e){if(e instanceof Ve)return e.clone();var t=new qe(e.__wrapped__,e.__chain__);return t.__actions__=Xe(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t};var Qe=Object.prototype.hasOwnProperty;function $e(e){if(Ye(e)&&!Je(e)&&!(e instanceof Ve)){if(e instanceof qe)return e;if(Qe.call(e,`__wrapped__`))return Ze(e)}return new qe(e)}$e.prototype=ze.prototype,$e.prototype.constructor=$e;let et=$e,tt=function(e){var t=Ge(e),n=et[t];if(typeof n!=`function`||!(t in Ve.prototype))return!1;if(e===n)return!0;var r=He(n);return!!r&&e===r[0]};var nt=Date.now;let rt=function(e){var t=0,n=0;return function(){var r=nt(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},at=rt(Oe);var ot=/\{\n\/\* \[wrapped with (.+)\] \*/,st=/,? & /;let ct=function(e){var t=e.match(ot);return t?t[1].split(st):[]};var lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;let ut=function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?`& `:``)+t[r],t=t.join(n>2?`, `:` `),e.replace(lt,`{ 113/* [wrapped with `+t+`] */ 114`)},dt=function(e){return function(){return e}},ft=function(){try{var e=Te(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),pt=rt(ft?function(e,t){return ft(e,`toString`,{configurable:!0,enumerable:!1,value:dt(t),writable:!0})}:P),mt=function(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},ht=function(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1},gt=function(e){return e!=e},_t=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1},vt=function(e,t,n){return t==t?_t(e,t,n):ht(e,gt,n)},yt=function(e,t){return!!(e!=null&&e.length)&&vt(e,t,0)>-1};var bt=[[`ary`,128],[`bind`,1],[`bindKey`,2],[`curry`,8],[`curryRight`,16],[`flip`,512],[`partial`,32],[`partialRight`,64],[`rearg`,256]];let xt=function(e,t){return mt(bt,function(n){var r=`_.`+n[0];t&n[1]&&!yt(e,r)&&e.push(r)}),e.sort()},St=function(e,t,n){var r=t+``;return pt(e,ut(r,xt(ct(r),n)))},Ct=function(e,t,n,r,i,a,o,s,c,l){var u=8&t;t|=u?32:64,4&(t&=~(u?64:32))||(t&=-4);var d=[e,t,i,u?a:void 0,u?o:void 0,u?void 0:a,u?void 0:o,s,c,l],f=n.apply(void 0,d);return tt(e)&&at(f,d),f.placeholder=r,St(f,e,t)},wt=function(e){return e.placeholder};var Tt=/^(?:0|[1-9]\d*)$/;let Et=function(e,t){var n=typeof e;return!!(t??=9007199254740991)&&(n==`number`||n!=`symbol`&&Tt.test(e))&&e>-1&&e%1==0&&e<t};var Dt=Math.min;let Ot=function(e,t){for(var n=e.length,r=Dt(t.length,n),i=Xe(e);r--;){var a=t[r];e[r]=Et(a,n)?i[a]:void 0}return e};var kt=`__lodash_placeholder__`;let At=function(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n];o!==t&&o!==kt||(e[n]=kt,a[i++]=n)}return a},jt=function e(t,n,r,i,a,o,s,c,l,u){var d=128&n,f=1&n,p=2&n,m=24&n,h=512&n,g=p?void 0:je(t);return function _(){for(var v=arguments.length,y=Array(v),b=v;b--;)y[b]=arguments[b];if(m)var x=wt(_),S=Re(y,x);if(i&&(y=Fe(y,i,a,m)),o&&(y=Le(y,o,s,m)),v-=S,m&&v<u){var C=At(y,x);return Ct(t,n,e,_.placeholder,r,y,C,c,l,u-v)}var w=f?r:this,T=p?w[t]:t;return v=y.length,c?y=Ot(y,c):h&&v>1&&y.reverse(),d&&l<v&&(y.length=l),this&&this!==te&&this instanceof _&&(T=g||je(T)),T.apply(w,y)}},Mt=function(e,t,n){var r=je(e);return function i(){for(var a=arguments.length,o=Array(a),s=a,c=wt(i);s--;)o[s]=arguments[s];var l=a<3&&o[0]!==c&&o[a-1]!==c?[]:At(o,c);return(a-=l.length)<n?Ct(e,t,jt,i.placeholder,void 0,o,l,void 0,void 0,n-a):Ne(this&&this!==te&&this instanceof i?r:e,this,o)}},Nt=function(e,t,n,r){var i=1&t,a=je(e);return function t(){for(var o=-1,s=arguments.length,c=-1,l=r.length,u=Array(l+s),d=this&&this!==te&&this instanceof t?a:e;++c<l;)u[c]=r[c];for(;s--;)u[c++]=arguments[++o];return Ne(d,i?n:this,u)}};var Pt=`__lodash_placeholder__`,Ft=128,It=Math.min;let Lt=function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,o=r==Ft&&n==8||r==Ft&&n==256&&e[7].length<=t[8]||r==384&&t[7].length<=t[8]&&n==8;if(!a&&!o)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var s=t[3];if(s){var c=e[3];e[3]=c?Fe(c,s,t[4]):s,e[4]=c?At(e[3],Pt):t[4]}return(s=t[5])&&(c=e[5],e[5]=c?Le(c,s,t[6]):s,e[6]=c?At(e[5],Pt):t[6]),(s=t[7])&&(e[7]=s),r&Ft&&(e[8]=e[8]==null?t[8]:It(e[8],t[8])),e[9]??=t[9],e[0]=t[0],e[1]=i,e};var Rt=/\s/;let zt=function(e){for(var t=e.length;t--&&Rt.test(e.charAt(t)););return t};var Bt=/^\s+/;let Vt=function(e){return e&&e.slice(0,zt(e)+1).replace(Bt,``)},Ht=function(e){return typeof e==`symbol`||Ye(e)&&ue(e)==`[object Symbol]`};var Ut=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Gt=/^0o[0-7]+$/i,Kt=parseInt;let qt=function(e){if(typeof e==`number`)return e;if(Ht(e))return NaN;if(de(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=de(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Vt(e);var n=Wt.test(e);return n||Gt.test(e)?Kt(e.slice(2),n?2:8):Ut.test(e)?NaN:+e};var Jt=1/0;let Yt=function(e){return e?(e=qt(e))===Jt||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:e===0?e:0},Xt=function(e){var t=Yt(e),n=t%1;return t==t?n?t-n:t:0};var Zt=Math.max;let Qt=function(e,t,n,r,i,a,o,s){var c=2&t;if(!c&&typeof e!=`function`)throw TypeError(`Expected a function`);var l=r?r.length:0;if(l||(t&=-97,r=i=void 0),o=o===void 0?o:Zt(Xt(o),0),s=s===void 0?s:Xt(s),l-=i?i.length:0,64&t){var u=r,d=i;r=i=void 0}var f=c?void 0:He(e),p=[e,t,n,r,i,u,d,a,o,s];if(f&&Lt(p,f),e=p[0],t=p[1],n=p[2],r=p[3],i=p[4],!(s=p[9]=p[9]===void 0?c?0:e.length:Zt(p[9]-l,0))&&24&t&&(t&=-25),t&&t!=1)m=t==8||t==16?Mt(e,t,s
114):t!=32&&t!=33||i.length?jt.apply(void 0,p):Nt(e,t,n,r);else var m=Me(e,t,n);return St((f?Oe:at)(m,p),e,t)};function $t(e,t,n){var r=Qt(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=$t.placeholder,r}$t.placeholder={};let en=$t,tn={threezerotwofour:{scheme:`threezerotwofour`,author:`jan t. sott (http://github.com/idleberg)`,base00:`#090300`,base01:`#3a3432`,base02:`#4a4543`,base03:`#5c5855`,base04:`#807d7c`,base05:`#a5a2a2`,base06:`#d6d5d4`,base07:`#f7f7f7`,base08:`#db2d20`,base09:`#e8bbd0`,base0A:`#fded02`,base0B:`#01a252`,base0C:`#b5e4f4`,base0D:`#01a0e4`,base0E:`#a16a94`,base0F:`#cdab53`},apathy:{scheme:`apathy`,author:`jannik siebert (https://github.com/janniks)`,base00:`#031A16`,base01:`#0B342D`,base02:`#184E45`,base03:`#2B685E`,base04:`#5F9C92`,base05:`#81B5AC`,base06:`#A7CEC8`,base07:`#D2E7E4`,base08:`#3E9688`,base09:`#3E7996`,base0A:`#3E4C96`,base0B:`#883E96`,base0C:`#963E4C`,base0D:`#96883E`,base0E:`#4C963E`,base0F:`#3E965B`},ashes:{scheme:`ashes`,author:`jannik siebert (https://github.com/janniks)`,base00:`#1C2023`,base01:`#393F45`,base02:`#565E65`,base03:`#747C84`,base04:`#ADB3BA`,base05:`#C7CCD1`,base06:`#DFE2E5`,base07:`#F3F4F5`,base08:`#C7AE95`,base09:`#C7C795`,base0A:`#AEC795`,base0B:`#95C7AE`,base0C:`#95AEC7`,base0D:`#AE95C7`,base0E:`#C795AE`,base0F:`#C79595`},atelierDune:{scheme:`atelier dune`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)`,base00:`#20201d`,base01:`#292824`,base02:`#6e6b5e`,base03:`#7d7a68`,base04:`#999580`,base05:`#a6a28c`,base06:`#e8e4cf`,base07:`#fefbec`,base08:`#d73737`,base09:`#b65611`,base0A:`#cfb017`,base0B:`#60ac39`,base0C:`#1fad83`,base0D:`#6684e1`,base0E:`#b854d4`,base0F:`#d43552`},atelierForest:{scheme:`atelier forest`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)`,base00:`#1b1918`,base01:`#2c2421`,base02:`#68615e`,base03:`#766e6b`,base04:`#9c9491`,base05:`#a8a19f`,base06:`#e6e2e0`,base07:`#f1efee`,base08:`#f22c40`,base09:`#df5320`,base0A:`#d5911a`,base0B:`#5ab738`,base0C:`#00ad9c`,base0D:`#407ee7`,base0E:`#6666ea`,base0F:`#c33ff3`},atelierHeath:{scheme:`atelier heath`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath)`,base00:`#1b181b`,base01:`#292329`,base02:`#695d69`,base03:`#776977`,base04:`#9e8f9e`,base05:`#ab9bab`,base06:`#d8cad8`,base07:`#f7f3f7`,base08:`#ca402b`,base09:`#a65926`,base0A:`#bb8a35`,base0B:`#379a37`,base0C:`#159393`,base0D:`#516aec`,base0E:`#7b59c0`,base0F:`#cc33cc`},atelierLakeside:{scheme:`atelier lakeside`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)`,base00:`#161b1d`,base01:`#1f292e`,base02:`#516d7b`,base03:`#5a7b8c`,base04:`#7195a8`,base05:`#7ea2b4`,base06:`#c1e4f6`,base07:`#ebf8ff`,base08:`#d22d72`,base09:`#935c25`,base0A:`#8a8a0f`,base0B:`#568c3b`,base0C:`#2d8f6f`,base0D:`#257fad`,base0E:`#5d5db1`,base0F:`#b72dd2`},atelierSeaside:{scheme:`atelier seaside`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/)`,base00:`#131513`,base01:`#242924`,base02:`#5e6e5e`,base03:`#687d68`,base04:`#809980`,base05:`#8ca68c`,base06:`#cfe8cf`,base07:`#f0fff0`,base08:`#e6193c`,base09:`#87711d`,base0A:`#c3c322`,base0B:`#29a329`,base0C:`#1999b3`,base0D:`#3d62f5`,base0E:`#ad2bee`,base0F:`#e619c3`},bespin:{scheme:`bespin`,author:`jan t. sott`,base00:`#28211c`,base01:`#36312e`,base02:`#5e5d5c`,base03:`#666666`,base04:`#797977`,base05:`#8a8986`,base06:`#9d9b97`,base07:`#baae9e`,base08:`#cf6a4c`,base09:`#cf7d34`,base0A:`#f9ee98`,base0B:`#54be0d`,base0C:`#afc4db`,base0D:`#5ea6ea`,base0E:`#9b859d`,base0F:`#937121`},brewer:{scheme:`brewer`,author:`timothée poisot (http://github.com/tpoisot)`,base00:`#0c0d0e`,base01:`#2e2f30`,base02:`#515253`,base03:`#737475`,base04:`#959697`,base05:`#b7b8b9`,base06:`#dadbdc`,base07:`#fcfdfe`,base08:`#e31a1c`,base09:`#e6550d`,base0A:`#dca060`,base0B:`#31a354`,base0C:`#80b1d3`,base0D:`#3182bd`,base0E:`#756bb1`,base0F:`#b15928`},bright:{scheme:`bright`,author:`chris kempson (http://chriskempson.com)`,base00:`#000000`,base01:`#303030`,base02:`#505050`,base03:`#b0b0b0`,base04:`#d0d0d0`,base05:`#e0e0e0`,base06:`#f5f5f5`,base07:`#ffffff`,base08:`#fb0120`,base09:`#fc6d24`,base0A:`#fda331`,base0B:`#a1c659`,base0C:`#76c7b7`,base0D:`#6fb3d2`,base0E:`#d381c3`,base0F:`#be
114643c`},chalk:{scheme:`chalk`,author:`chris kempson (http://chriskempson.com)`,base00:`#151515`,base01:`#202020`,base02:`#303030`,base03:`#505050`,base04:`#b0b0b0`,base05:`#d0d0d0`,base06:`#e0e0e0`,base07:`#f5f5f5`,base08:`#fb9fb1`,base09:`#eda987`,base0A:`#ddb26f`,base0B:`#acc267`,base0C:`#12cfc0`,base0D:`#6fc2ef`,base0E:`#e1a3ee`,base0F:`#deaf8f`},codeschool:{scheme:`codeschool`,author:`brettof86`,base00:`#232c31`,base01:`#1c3657`,base02:`#2a343a`,base03:`#3f4944`,base04:`#84898c`,base05:`#9ea7a6`,base06:`#a7cfa3`,base07:`#b5d8f6`,base08:`#2a5491`,base09:`#43820d`,base0A:`#a03b1e`,base0B:`#237986`,base0C:`#b02f30`,base0D:`#484d79`,base0E:`#c59820`,base0F:`#c98344`},colors:{scheme:`colors`,author:`mrmrs (http://clrs.cc)`,base00:`#111111`,base01:`#333333`,base02:`#555555`,base03:`#777777`,base04:`#999999`,base05:`#bbbbbb`,base06:`#dddddd`,base07:`#ffffff`,base08:`#ff4136`,base09:`#ff851b`,base0A:`#ffdc00`,base0B:`#2ecc40`,base0C:`#7fdbff`,base0D:`#0074d9`,base0E:`#b10dc9`,base0F:`#85144b`},default:{scheme:`default`,author:`chris kempson (http://chriskempson.com)`,base00:`#181818`,base01:`#282828`,base02:`#383838`,base03:`#585858`,base04:`#b8b8b8`,base05:`#d8d8d8`,base06:`#e8e8e8`,base07:`#f8f8f8`,base08:`#ab4642`,base09:`#dc9656`,base0A:`#f7ca88`,base0B:`#a1b56c`,base0C:`#86c1b9`,base0D:`#7cafc2`,base0E:`#ba8baf`,base0F:`#a16946`},eighties:{scheme:`eighties`,author:`chris kempson (http://chriskempson.com)`,base00:`#2d2d2d`,base01:`#393939`,base02:`#515151`,base03:`#747369`,base04:`#a09f93`,base05:`#d3d0c8`,base06:`#e8e6df`,base07:`#f2f0ec`,base08:`#f2777a`,base09:`#f99157`,base0A:`#ffcc66`,base0B:`#99cc99`,base0C:`#66cccc`,base0D:`#6699cc`,base0E:`#cc99cc`,base0F:`#d27b53`},embers:{scheme:`embers`,author:`jannik siebert (https://github.com/janniks)`,base00:`#16130F`,base01:`#2C2620`,base02:`#433B32`,base03:`#5A5047`,base04:`#8A8075`,base05:`#A39A90`,base06:`#BEB6AE`,base07:`#DBD6D1`,base08:`#826D57`,base09:`#828257`,base0A:`#6D8257`,base0B:`#57826D`,base0C:`#576D82`,base0D:`#6D5782`,base0E:`#82576D`,base0F:`#825757`},flat:{scheme:`flat`,author:`chris kempson (http://chriskempson.com)`,base00:`#2C3E50`,base01:`#34495E`,base02:`#7F8C8D`,base03:`#95A5A6`,base04:`#BDC3C7`,base05:`#e0e0e0`,base06:`#f5f5f5`,base07:`#ECF0F1`,base08:`#E74C3C`,base09:`#E67E22`,base0A:`#F1C40F`,base0B:`#2ECC71`,base0C:`#1ABC9C`,base0D:`#3498DB`,base0E:`#9B59B6`,base0F:`#be643c`},google:{scheme:`google`,author:`seth wright (http://sethawright.com)`,base00:`#1d1f21`,base01:`#282a2e`,base02:`#373b41`,base03:`#969896`,base04:`#b4b7b4`,base05:`#c5c8c6`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#CC342B`,base09:`#F96A38`,base0A:`#FBA922`,base0B:`#198844`,base0C:`#3971ED`,base0D:`#3971ED`,base0E:`#A36AC7`,base0F:`#3971ED`},grayscale:{scheme:`grayscale`,author:`alexandre gavioli (https://github.com/alexx2/)`,base00:`#101010`,base01:`#252525`,base02:`#464646`,base03:`#525252`,base04:`#ababab`,base05:`#b9b9b9`,base06:`#e3e3e3`,base07:`#f7f7f7`,base08:`#7c7c7c`,base09:`#999999`,base0A:`#a0a0a0`,base0B:`#8e8e8e`,base0C:`#868686`,base0D:`#686868`,base0E:`#747474`,base0F:`#5e5e5e`},greenscreen:{scheme:`green screen`,author:`chris kempson (http://chriskempson.com)`,base00:`#001100`,base01:`#003300`,base02:`#005500`,base03:`#007700`,base04:`#009900`,base05:`#00bb00`,base06:`#00dd00`,base07:`#00ff00`,base08:`#007700`,base09:`#009900`,base0A:`#007700`,base0B:`#00bb00`,base0C:`#005500`,base0D:`#009900`,base0E:`#00bb00`,base0F:`#005500`},harmonic:{scheme:`harmonic16`,author:`jannik siebert (https://github.com/janniks)`,base00:`#0b1c2c`,base01:`#223b54`,base02:`#405c79`,base03:`#627e99`,base04:`#aabcce`,base05:`#cbd6e2`,base06:`#e5ebf1`,base07:`#f7f9fb`,base08:`#bf8b56`,base09:`#bfbf56`,base0A:`#8bbf56`,base0B:`#56bf8b`,base0C:`#568bbf`,base0D:`#8b56bf`,base0E:`#bf568b`,base0F:`#bf5656`},hopscotch:{scheme:`hopscotch`,author:`jan t. sott`,base00:`#322931`,base01:`#433b42`,base02:`#5c545b`,base03:`#797379`,base04:`#989498`,base05:`#b9b5b8`,base06:`#d5d3d5`,base07:`#ffffff`,base08:`#dd464c`,base09:`#fd8b19`,base0A:`#fdcc59`,base0B:`#8fc13e`,base0C:`#149b93`,base0D:`#1290bf`,base0E:`#c85e7c`,base0F:`#b33508`},isotope:{scheme:`isotope`,author:`jan t. sott`,base00:`#000000`,base01:`#404040`,base02:`#606060`,base03:`#808080`,base04:`#c0c0c0`,base05:`#d0d0d0`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#ff0000`,base09:`#ff9900`,base0A:`#ff0099`,base0B:`#33ff00`,base0C:`#00ffff`,base0D:`#0066ff`,base0E:`#cc00ff`,base0F:`#3300ff`},marrakesh:{scheme:`marrakesh`,author:`alexandre gavioli (http://github.com/alexx2/)`,base00:`#201602`,base01:`#302e00`,base02:`#5f5b17`,base03:`#6c6823`,base04:`#86813b`,base05:`#948e48`,base06:`#ccc37a`,base07:`#faf0a5`,base08:`#c35359`,base09:`#b36144`,base0A:`#a88339`,base0B:`#18974e`,base0C:`#75a738`,base0D:`#477ca1`,base0E:`#8868b3`,base0F:`#b3588e`},mocha:{scheme:`mocha`,author:`chris kempson (http://chriskempson.com)`,base00:`#3B3228`,base01:`#534636`,base02:`#645240`,base03:`#7e705a`,base04:`#b8afad`,base05:`#d0c8c6`,base06:`#e9e1dd`,base07:`#f5eeeb`,base08:`#cb6077`,base09:`#d28b71`,base0A:`#f4bc87`,base0B:`#beb55b`,base0C:`#7bbda4`,base0D:`#8ab3b5`,base0E:`#a89bb9`,base0F:`#bb9584`},monokai:{scheme:`monokai`,author:`wimer hazenberg (http://www.monokai.nl)`,base00:`#272822`,base01:`#383830`,base02:`#49483e`,base03:`#75715e`,base04:`#a59f85`,base05:`#f8f8f2`,base06:`#f5f4f1`,base07:`#f9f8f5`,base08:`#f92672`,base09:`#fd971f`,base0A:`#f4bf75`,base0B:`#a6e22e`,base0C:`#a1efe4`,base0D:`#66d9ef`,base0E:`#ae81ff`,base0F:`#cc6633`},nicinabox:{scheme:`nicinabox`,author:`nicinabox (http://github.com/nicinabox)`,base00:`#2A2F3A`,base01:`#3C444F`,base02:`#4F5A65`,base03:`#BEBEBE`,base04:`#b0b0b0`,base05:`#d0d0d0`,base06:`#FFFFFF`,base07:`#f5f5f5`,base08:`#fb9fb1`,base09:`#FC6D24`,base0A:`#ddb26f`,base0B:`#A1C659`,base0C:`#12cfc0`,base0D:`#6FB3D2`,base0E:`#D381C3`,base0F:`#deaf8f`},ocean:{scheme:`ocean`,author:`chris kempson (http://chriskempson.com)`,base00:`#2b303b`,base01:`#343d46`,base02:`#4f5b66`,base03:`#65737e`,base04:`#a7a
114dba`,base05:`#c0c5ce`,base06:`#dfe1e8`,base07:`#eff1f5`,base08:`#bf616a`,base09:`#d08770`,base0A:`#ebcb8b`,base0B:`#a3be8c`,base0C:`#96b5b4`,base0D:`#8fa1b3`,base0E:`#b48ead`,base0F:`#ab7967`},paraiso:{scheme:`paraiso`,author:`jan t. sott`,base00:`#2f1e2e`,base01:`#41323f`,base02:`#4f424c`,base03:`#776e71`,base04:`#8d8687`,base05:`#a39e9b`,base06:`#b9b6b0`,base07:`#e7e9db`,base08:`#ef6155`,base09:`#f99b15`,base0A:`#fec418`,base0B:`#48b685`,base0C:`#5bc4bf`,base0D:`#06b6ef`,base0E:`#815ba4`,base0F:`#e96ba8`},pop:{scheme:`pop`,author:`chris kempson (http://chriskempson.com)`,base00:`#000000`,base01:`#202020`,base02:`#303030`,base03:`#505050`,base04:`#b0b0b0`,base05:`#d0d0d0`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#eb008a`,base09:`#f29333`,base0A:`#f8ca12`,base0B:`#37b349`,base0C:`#00aabb`,base0D:`#0e5a94`,base0E:`#b31e8d`,base0F:`#7a2d00`},railscasts:{scheme:`railscasts`,author:`ryan bates (http://railscasts.com)`,base00:`#2b2b2b`,base01:`#272935`,base02:`#3a4055`,base03:`#5a647e`,base04:`#d4cfc9`,base05:`#e6e1dc`,base06:`#f4f1ed`,base07:`#f9f7f3`,base08:`#da4939`,base09:`#cc7833`,base0A:`#ffc66d`,base0B:`#a5c261`,base0C:`#519f50`,base0D:`#6d9cbe`,base0E:`#b6b3eb`,base0F:`#bc9458`},shapeshifter:{scheme:`shapeshifter`,author:`tyler benziger (http://tybenz.com)`,base00:`#000000`,base01:`#040404`,base02:`#102015`,base03:`#343434`,base04:`#555555`,base05:`#ababab`,base06:`#e0e0e0`,base07:`#f9f9f9`,base08:`#e92f2f`,base09:`#e09448`,base0A:`#dddd13`,base0B:`#0ed839`,base0C:`#23edda`,base0D:`#3b48e3`,base0E:`#f996e2`,base0F:`#69542d`},solarized:{scheme:`solarized`,author:`ethan schoonover (http://ethanschoonover.com/solarized)`,base00:`#002b36`,base01:`#073642`,base02:`#586e75`,base03:`#657b83`,base04:`#839496`,base05:`#93a1a1`,base06:`#eee8d5`,base07:`#fdf6e3`,base08:`#dc322f`,base09:`#cb4b16`,base0A:`#b58900`,base0B:`#859900`,base0C:`#2aa198`,base0D:`#268bd2`,base0E:`#6c71c4`,base0F:`#d33682`},summerfruit:{scheme:`summerfruit`,author:`christopher corley (http://cscorley.github.io/)`,base00:`#151515`,base01:`#202020`,base02:`#303030`,base03:`#505050`,base04:`#B0B0B0`,base05:`#D0D0D0`,base06:`#E0E0E0`,base07:`#FFFFFF`,base08:`#FF0086`,base09:`#FD8900`,base0A:`#ABA800`,base0B:`#00C918`,base0C:`#1faaaa`,base0D:`#3777E6`,base0E:`#AD00A1`,base0F:`#cc6633`},tomorrow:{scheme:`tomorrow`,author:`chris kempson (http://chriskempson.com)`,base00:`#1d1f21`,base01:`#282a2e`,base02:`#373b41`,base03:`#969896`,base04:`#b4b7b4`,base05:`#c5c8c6`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#cc6666`,base09:`#de935f`,base0A:`#f0c674`,base0B:`#b5bd68`,base0C:`#8abeb7`,base0D:`#81a2be`,base0E:`#b294bb`,base0F:`#a3685a`},tube:{scheme:`london tube`,author:`jan t. sott`,base00:`#231f20`,base01:`#1c3f95`,base02:`#5a5758`,base03:`#737171`,base04:`#959ca1`,base05:`#d9d8d8`,base06:`#e7e7e8`,base07:`#ffffff`,base08:`#ee2e24`,base09:`#f386a1`,base0A:`#ffd204`,base0B:`#00853e`,base0C:`#85cebc`,base0D:`#009ddc`,base0E:`#98005d`,base0F:`#b06110`},twilight:{scheme:`twilight`,author:`david hart (http://hart-dev.com)`,base00:`#1e1e1e`,base01:`#323537`,base02:`#464b50`,base03:`#5f5a60`,base04:`#838184`,base05:`#a7a7a7`,base06:`#c3c3c3`,base07:`#ffffff`,base08:`#cf6a4c`,base09:`#cda869`,base0A:`#f9ee98`,base0B:`#8f9d6a`,base0C:`#afc4db`,base0D:`#7587a6`,base0E:`#9b859d`,base0F:`#9b703f`}},nn=tn.default,rn=Object.keys(nn),an=e=>{let[t,n,r]=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;return[.299*t+.587*n+.114*r,-.14713*t+-.28886*n+.436*r,.615*t+-.51499*n+-.10001*r]}(N(e).array());var i;let a=function(e){let t=e[0],n=e[1],r=e[2],i,a,o;return i=1*t+0*n+1.13983*r,a=1*t+-.39465*n+-.5806*r,o=1*t+2.02311*n+0*r,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*i,255*a,255*o]}([(i=t,i<.25?1:i<.5?.9-i:1.1-i),n,r]);return N.rgb(a).hex()},on=e=>t=>({className:[t.className,e.className].filter(Boolean).join(` `),style:{...t.style||{},...e.style||{}}}),sn=(e,t)=>{let n=Object.keys(t);for(let t in e)n.indexOf(t)===-1&&n.push(t);return n.reduce((n,r)=>(n[r]=((e,t)=>{if(e===void 0)return t;if(t===void 0)return e;let n=typeof t;switch(typeof e){case`string`:switch(n){case`string`:return[t,e].filter(
114Boolean).join(` `);case`object`:return on({className:e,style:t});case`function`:return(n,...r)=>on({className:e})(t(n,...r))}break;case`object`:switch(n){case`string`:return on({className:t,style:e});case`object`:return{...t,...e};case`function`:return(n,...r)=>on({style:e})(t(n,...r))}break;case`function`:switch(n){case`string`:return(n,...r)=>e(on(n)({className:t}),...r);case`object`:return(n,...r)=>e(on(n)({style:t}),...r);case`function`:return(n,...r)=>e(t(n,...r),...r)}}})(e[r],t[r]),n),{})},cn=(e,t,...n)=>{if(t===null)return e;Array.isArray(t)||(t=[t]);let r=t.map(t=>e[t]).filter(Boolean).reduce((e,t)=>(typeof t==`string`?e.className=[e.className,t].filter(Boolean).join(` `):typeof t==`object`?e.style={...e.style,...t}:typeof t==`function`&&(e={...e,...t(e,...n)}),e),{className:``,style:{}});return r.className||delete r.className,Object.keys(r.style).length===0&&delete r.style,r},ln=e=>Object.keys(e).reduce((t,n)=>(t[n]=/^base/.test(n)?an(e[n]):n===`scheme`?e[n]+`:inverted`:e[n],t),{}),un=en((e,t={},n={},...r)=>{let{defaultBase16:i=nn,base16Themes:a=null}=t,o=fn(n,a);o&&(n={...o,...n});let s=rn.reduce((e,t)=>(e[t]=n[t]||i[t],e),{}),c=sn(Object.keys(n).reduce((e,t)=>(rn.indexOf(t)===-1&&(e[t]=n[t]),e),{}),e(s));return en(cn,2)(c,...r)},3),dn=e=>!!e.extend,fn=(e,t)=>{if(e&&dn(e)&&e.extend&&(e=e.extend),typeof e==`string`){let[n,r]=e.split(`:`);e=t?t[n]:tn[n],r===`inverted`&&(e=ln(e))}return e&&Object.prototype.hasOwnProperty.call(e,`base00`)?e:void 0};var pn=function(e){var t=function(e){return{backgroundColor:e.base00,ellipsisColor:e.base09,braceColor:e.base07,expandedIcon:e.base0D,collapsedIcon:e.base0E,keyColor:e.base07,arrayKeyColor:e.base0C,objectSize:e.base04,copyToClipboard:e.base0F,copyToClipboardCheck:e.base0D,objectBorder:e.base02,dataTypes:{boolean:e.base0E,date:e.base0D,float:e.base0B,function:e.base0D,integer:e.base0F,string:e.base09,nan:e.base08,null:e.base0A,undefined:e.base05,regexp:e.base0A,background:e.base02,bigNumber:e.base09},editVariable:{editIcon:e.base0E,cancelIcon:e.base09,removeIcon:e.base09,addIcon:e.base0E,checkIcon:e.base0E,background:e.base01,color:e.base0A,border:e.base07},addKeyModal:{background:e.base05,border:e.base04,color:e.base0A,labelColor:e.base01},validationFailure:{background:e.base09,iconColor:e.base01,fontColor:e.base01}}}(e);return{"app-container":{fontFamily:M.globalFontFamily,cursor:M.globalCursor,backgroundColor:t.backgroundColor,position:`relative`},ellipsis:{display:`inline-block`,color:t.ellipsisColor,fontSize:M.ellipsisFontSize,lineHeight:M.ellipsisLineHeight,cursor:M.ellipsisCursor},"brace-row":{display:`inline-block`,cursor:`pointer`},brace:{display:`inline-block`,cursor:M.braceCursor,fontWeight:M.braceFontWeight,color:t.braceColor},"expanded-icon":{color:t.expandedIcon},"collapsed-icon":{color:t.collapsedIcon},colon:{display:`inline-block`,margin:M.keyMargin,color:t.keyColor,verticalAlign:`top`},objectKeyVal:function(e,n){return{style:o({paddingTop:M.keyValPaddingTop,paddingRight:M.keyValPaddingRight,paddingBottom:M.keyValPaddingBottom,borderLeft:M.keyValBorderLeft+` `+t.objectBorder,":hover":{paddingLeft:n.paddingLeft-1+`px`,borderLeft:M.keyValBorderHover+` `+t.objectBorder}},n)}},"object-key-val-no-border":{padding:M.keyValPadding},"pushed-content":{marginLeft:M.pushedContentMarginLeft},variableValue:function(e,t){return{style:o({display:`inline-block`,paddingRight:M.variableValuePaddingRight,position:`relative`},t)}},"object-name":{display:`inline-block`,color:t.keyColor,letterSpacing:M.keyLetterSpacing,fontStyle:M.keyFontStyle,verticalAlign:M.keyVerticalAlign,opacity:M.keyOpacity,":hover":{opacity:M.keyOpacityHover}},"array-key":{display:`inline-block`,color:t.arrayKeyColor,letterSpacing:M.keyLetterSpacing,fontStyle:M.keyFontStyle,verticalAlign:M.keyVerticalAlign,opacity:M.keyOpacity,":hover":{opacity:M.keyOpacityHover}},"object-size":{color:t.objectSize,borderRadius:M.objectSizeBorderRadius,fontStyle:M.objectSizeFontStyle,margin:M.objectSizeMargin,cursor:`default`},"data-type-label":{fontSize:M.dataTypeFontSize,marginRight:M.dataTypeMarginRight,opacity:M.datatypeOpacity},boolean:{display:`inline-block`,color:t.dataTypes.boolean},date:{display:`inline-block`,color:t.dataTypes.date},"date-value":{marginLeft:M.dateValueMarginLeft},float:{display:`inline-block`,color:t.dataTypes.float},function:{display:`inline-block`,color:t.dataTypes.function,cursor:`pointer`,whiteSpace:`pre-line`},"function-value":{fontStyle:`italic`},integer:{display:`inline-block`,color:t.dataTypes.integer},bigNumber:{display:`inline-block`,color:t.dataTypes.bigNumber},string:{display:`inline-block`,color:t.dataTypes.string},nan:{display:`inline-block`,color:t.dataTypes.nan,fontSize:M.nanFontSize,fontWeight:M.nanFontWeight,backgroundColor:t.dataTypes.background,padding:M.nanPadding,borderRadius:M.nanBorderRadius},null:{display:`inline-block`,color:t.dataTypes.null,fontSize:M.nullFontSize,fontWeight:M.nullFontWeight,backgroundColor:t.dataTypes.background,padding:M.nullPadding,borderRadius:M.nullBorderRadius},undefined:{display:`inline-block`,color:t.dataTypes.undefined,fontSize:M.undefinedFontSize,padding:M.undefinedPadding,borderRadius:M.undefinedBorderRadius,backgroundColor:t.dataTypes.background},circularReference:{display:`inline-block`,color:t.dataTypes.null,fontSize:M.nullFontSize,fontWeight:M.nullFontWeight,backgroundColor:t.dataTypes.background,padding:M.nullPadding,borderRadius:M.nullBorderRadius}
114,regexp:{display:`inline-block`,color:t.dataTypes.regexp},"copy-to-clipboard":{cursor:M.clipboardCursor},"copy-icon":{color:t.copyToClipboard,fontSize:M.iconFontSize,marginRight:M.iconMarginRight,verticalAlign:`top`},"copy-icon-copied":{color:t.copyToClipboardCheck,marginLeft:M.clipboardCheckMarginLeft},"array-group-meta-data":{display:`inline-block`,padding:M.arrayGroupMetaPadding},"object-meta-data":{display:`inline-block`,padding:M.metaDataPadding},"icon-container":{display:`inline-block`,width:M.iconContainerWidth},tooltip:{padding:M.tooltipPadding},removeVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.removeIcon,cursor:M.iconCursor,fontSize:M.iconFontSize,marginRight:M.iconMarginRight},addVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.addIcon,cursor:M.iconCursor,fontSize:M.iconFontSize,marginRight:M.iconMarginRight},editVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.editIcon,cursor:M.iconCursor,fontSize:M.iconFontSize,marginRight:M.iconMarginRight},"edit-icon-container":{display:`inline-block`,verticalAlign:`top`},"check-icon":{display:`inline-block`,cursor:M.iconCursor,color:t.editVariable.checkIcon,fontSize:M.iconFontSize,paddingRight:M.iconPaddingRight},"cancel-icon":{display:`inline-block`,cursor:M.iconCursor,color:t.editVariable.cancelIcon,fontSize:M.iconFontSize,paddingRight:M.iconPaddingRight},"edit-input":{display:`inline-block`,minWidth:M.editInputMinWidth,borderRadius:M.editInputBorderRadius,backgroundColor:t.editVariable.background,color:t.editVariable.color,padding:M.editInputPadding,marginRight:M.editInputMarginRight,fontFamily:M.editInputFontFamily},"detected-row":{paddingTop:M.detectedRowPaddingTop},"key-modal-request":{position:M.addKeyCoverPosition,top:M.addKeyCoverPositionPx,left:M.addKeyCoverPositionPx,right:M.addKeyCoverPositionPx,bottom:M.addKeyCoverPositionPx,backgroundColor:M.addKeyCoverBackground},"key-modal":{width:M.addKeyModalWidth,backgroundColor:t.addKeyModal.background,marginLeft:M.addKeyModalMargin,marginRight:M.addKeyModalMargin,padding:M.addKeyModalPadding,borderRadius:M.addKeyModalRadius,marginTop:`15px`,position:`relative`},"key-modal-label":{color:t.addKeyModal.labelColor,marginLeft:`2px`,marginBottom:`5px`,fontSize:`11px`},"key-modal-input-container":{overflow:`hidden`},"key-modal-input":{width:`100%`,padding:`3px 6px`,fontFamily:`monospace`,color:t.addKeyModal.color,border:`none`,boxSizing:`border-box`,borderRadius:`2px`},"key-modal-cancel":{backgroundColor:t.editVariable.removeIcon,position:`absolute`,top:`0px`,right:`0px`,borderRadius:`0px 3px 0px 3px`,cursor:`pointer`},"key-modal-cancel-icon":{color:t.addKeyModal.labelColor,fontSize:M.iconFontSize,transform:`rotate(45deg)`},"key-modal-submit":{color:t.editVariable.addIcon,fontSize:M.iconFontSize,position:`absolute`,right:`2px`,top:`3px`,cursor:`pointer`},"function-ellipsis":{display:`inline-block`,color:t.ellipsisColor,fontSize:M.ellipsisFontSize,lineHeight:M.ellipsisLineHeight,cursor:M.ellipsisCursor},"validation-failure":{float:`right`,padding:`3px 6px`,borderRadius:`2px`,cursor:`pointer`,color:t.validationFailure.fontColor,backgroundColor:t.validationFailure.background},"validation-failure-label":{marginRight:`6px`},"validation-failure-clear":{position:`relative`,verticalAlign:`top`,cursor:`pointer`,color:t.validationFailure.iconColor,fontSize:M.iconFontSize,transform:`rotate(45deg)`},comma:{display:`inline-block`,color:M.commaColor,fontSize:M.commaFontSize,marginRight:M.commaMarginRight,cursor:`default`}}},mn=function(e){var t=A;return!1!==e&&e!==`none`||(t=j),un(pn,{defaultBase16:t})(e)};function z(e,t,n){return e||console.error(`theme has not been set`),mn(e)(t,n)}var hn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.typeName,n=e.displayDataTypes,r=e.theme;return n?_().createElement(`span`,Object.assign({className:`data-type-label`},z(r,`data-type-label`)),t):null}}])}(_().PureComponent),gn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,z(e.theme,`boolean`),_().createElement(hn,Object.assign({typeName:`bool`},e)),e.value?`true`:`false`)}}])}(_().PureComponent),_n=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,z(e.theme,`date`),_().createElement(hn,Object.assign({typeName:`date`},e)),_().createElement(`span`,Object.assign({className:`date-value`},z(e.theme,`date-value`)),e.value.toLocaleTimeString(`en-us`,{weekday:`short`,year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})))}}])}(_().PureComponent),vn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,z(e.theme,`float`),_().createElement(hn,Object.assign({typeName:`float`},e)),this.props.value)}}])}(_().PureComponent),yn=r(784),bn=function(){return l(function e(){s(this,e),this.handler=function(){}},[{key:`register`,value:function(e){this.handler=e}},{key:`dispatch`,value:function(e){var t;(t=this.handler)==null||t.call(this,e)}}])}();globalThis.__globalDispatcherInstance||(globalThis.__globalDispatcherInstance=new bn);let xn=globalThis.__globalDispatcherInstance;var Sn=`updated_src`,Cn=new(function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).objects={},e.set=function(t,n,r,i){e.objects[t]===void 0&&(e.objects[t]={}),e.objects[t][n]===void 0&&(e.objects[t][n]={}),e.objects[t][n][r]=i},e.get=function(t,n,r,i){return e.objects[t]===void 0||e.objects[t][n]===void 0||e.objects[t][n][r]===void 0?i:e.objects[t][n][r]},e.handleAction=function(t){var n=t.rjvId,r=t.data;switch(t.name){case`RESET`:e.emit(`reset-`+n);break;case`VARIABLE_UPDATED`:t.data[Sn]=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,o(o({},r),{},{type:`variable-edited`})),e.emit(`variable-update-`+n);break;case`VARIABLE_REMOVED`:t.data[Sn]=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,o(o({},r),{},{type:`variable-removed`})),e.emit(`variable-update-`+n);break;case`VARIABLE_ADDED`:t.data[Sn]=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,o(o({},r),{},{type:`variable-added`})),e.emit(`variable-update-`+n);break;case`ADD_VARIABLE_KEY_REQUEST`:e.set(n,`action`,`new-key-request`,r),e.emit(`add-key-request-`+n)}},e.updateSrc=function(t,n){var r=n.name,i=n.namespace,a=n.new_value,o=n.variable_removed;i.shift();var s,c=e.get(t,`global`,`src`),l=e.deepCopy(c,E(i)),u=l,d=function(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];
114if(!n){if(Array.isArray(e)||(n=T(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance. 115In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}(i);try{for(d.s();!(s=d.n()).done;)u=u[s.value]}catch(e){d.e(e)}finally{d.f()}return o?D(u)===`array`?u.splice(r,1):delete u[r]:r===null?l=a:u[r]=a,e.set(t,`global`,`src`,l),l},e.deepCopy=function(t,n){var r,i=D(t),a=n.shift();return i===`array`?r=E(t):i===`object`&&(r=o({},t)),a!==void 0&&(r[a]=e.deepCopy(t[a],n)),r},e}return h(t,e),l(t)}(yn.EventEmitter));xn.register(Cn.handleAction.bind(Cn));let wn=Cn;var Tn=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({collapsed:!n.state.collapsed},function(){wn.set(n.props.rjvId,n.props.namespace,`collapsed`,n.state.collapsed)})},n.getFunctionDisplay=function(e){var t=n.props;return e?_().createElement(`span`,null,n.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,``),_().createElement(`span`,{className:`function-collapsed`,style:{fontWeight:`bold`}},_().createElement(`span`,null,`{`),_().createElement(`span`,z(t.theme,`ellipsis`),`...`),_().createElement(`span`,null,`}`))):n.props.value.toString().slice(9,-1)},n.state={collapsed:wn.get(e.rjvId,e.namespace,`collapsed`,!0)},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=this.state.collapsed;return _().createElement(`div`,z(e.theme,`function`),_().createElement(hn,Object.assign({typeName:`function`},e)),_().createElement(`span`,Object.assign({},z(e.theme,`function-value`),{className:`rjv-function-container`,onClick:this.handleToggleCollapsed}),this.getFunctionDisplay(t)))}}])}(_().PureComponent),En=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,z(this.props.theme,`nan`),`NaN`)}}])}(_().PureComponent),Dn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,z(this.props.theme,`null`),`NULL`)}}])}(_().PureComponent),On=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,z(e.theme,`integer`),_().createElement(hn,Object.assign({typeName:`int`},e)),this.props.value)}}])}(_().PureComponent),kn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,z(e.theme,`regexp`),_().createElement(hn,Object.assign({typeName:`regexp`},e)),this.props.value.toString())}}])}(_().PureComponent),An=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({collapsed:!n.state.collapsed},function(){wn.set(n.props.rjvId,n.props.namespace,`collapsed`,n.state.collapsed)})},n.state={collapsed:wn.get(e.rjvId,e.namespace,`collapsed`,!0)},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.state.collapsed,t=this.props,n=t.collapseStringsAfterLength,r=t.theme,i=t.escapeStrings,a=t.value,o=D(n)===`integer`,s={style:{cursor:`default`,wordBreak:`break-all`}};return i&&(a=O(a)),o&&a.length>n&&(s.style.cursor=`pointer`,e&&(a=_().createElement(`span`,null,a.substring(0,n),_().createElement(`span`,z(r,`ellipsis`),` ...`)))),_().createElement(`div`,z(r,`string`),_().createElement(hn,Object.assign({typeName:`string`},t)),_().createElement(`span`,Object.assign({className:`string-value`},s,{onClick:this.handleToggleCollapsed}),`"`,a,`"`))}}])}(_().PureComponent),jn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,z(this.props.theme,`undefined`),`undefined`)}}])}(_().PureComponent),Mn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,z(e.theme,`bigNumber`),_().createElement(hn,Object.assign({typeName:`bigNumber`},e)),this.props.value.toString())}}])}(_().PureComponent);function Nn(){return Nn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nn.apply(null,arguments)}var Pn=g.useLayoutEffect,Fn=function(e,t){typeof e==`function`?e(t):e.current=t},In={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`}
115,Ln=function(e){Object.keys(In).forEach(function(t){e.style.setProperty(t,In[t],`important`)})},Rn=null,zn=function(e,t){var n=e.scrollHeight;return t.sizingStyle.boxSizing===`border-box`?n+t.borderSize:n-t.paddingSize},Bn=function(){},Vn=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],Hn=!!document.documentElement.currentStyle,Un=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var n,r=(n=t,Vn.reduce(function(e,t){return e[t]=n[t],e},{})),i=r.boxSizing;return i===``?null:(Hn&&i===`border-box`&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+`px`),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})};function Wn(e,t,n){var r,i,a=(r=n,i=_().useRef(r),Pn(function(){i.current=r}),i);g.useLayoutEffect(function(){var n=function(e){return a.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var Gn=[`cacheMeasurements`,`maxRows`,`minRows`,`onChange`,`onHeightChange`],Kn=g.forwardRef(function(e,t){var n=e.cacheMeasurements,r=e.maxRows,i=e.minRows,a=e.onChange,o=a===void 0?Bn:a,s=e.onHeightChange,c=s===void 0?Bn:s,l=S(e,Gn),u=l.value!==void 0,d=g.useRef(null),f=function(e,t){var n=_().useRef();return _().useCallback(function(r){e.current=r,n.current&&Fn(n.current,null),n.current=t,t&&Fn(t,r)},[t])}(d,t),p=g.useRef(0),m=g.useRef(),h=function(){var e=d.current,t=n&&m.current?m.current:Un(e);if(t){m.current=t;var a=function(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),Rn||((Rn=document.createElement(`textarea`)).setAttribute(`tabindex`,`-1`),Rn.setAttribute(`aria-hidden`,`true`),Ln(Rn)),Rn.parentNode===null&&document.body.appendChild(Rn);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(e){var t=e;Rn.style[t]=o[t]}),Ln(Rn),Rn.value=t;var c=zn(Rn,e);Rn.value=t,c=zn(Rn,e),Rn.value=`x`;var l=Rn.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);var d=l*r;return s===`border-box`&&(d=d+i+a),[c=Math.min(d,c),l]}(t,e.value||e.placeholder||`x`,i,r),o=a[0],s=a[1];p.current!==o&&(p.current=o,e.style.setProperty(`height`,o+`px`,`important`),c(o,{rowHeight:s}))}};return g.useLayoutEffect(h),function(e,t){Wn(document.body,`reset`,function(n){e.current.form===n.target&&t(n)})}(d,function(){if(!u){var e=d.current.value;requestAnimationFrame(function(){var t=d.current;t&&e!==t.value&&h()})}}),Wn(window,`resize`,h),function(e){Wn(document.fonts,`loadingdone`,e)}(h),g.createElement(`textarea`,Nn({},l,{onChange:function(e){u||h(),o(e)},ref:f}))});function qn(e,t){e=e.trim();
115try{if((e=structuredClone(e))[0]===`[`)return Jn(`array`,JSON.parse(e));if(e[0]===`{`)return Jn(`object`,JSON.parse(e));if(e.match(/-?\d+\.\d+/)&&e.match(/-?\d+\.\d+/)[0]===e)return t&&parseFloat(e).toString()!==e?Jn(`bigNumber`,e):Jn(`float`,parseFloat(e));if(e.match(/-?\d+e-\d+/)&&e.match(/-?\d+e-\d+/)[0]===e)return Jn(`float`,Number(e));if(e.match(/-?\d+/)&&e.match(/-?\d+/)[0]===e)return t&&parseInt(e).toString()!==e?Jn(`bigNumber`,e):Jn(`integer`,parseInt(e));if(e.match(/-?\d+e\+\d+/)&&e.match(/-?\d+e\+\d+/)[0]===e)return Jn(`integer`,Number(e))}catch{}switch(e=e.toLowerCase()){case`undefined`:return Jn(`undefined`,void 0);case`nan`:return Jn(`nan`,NaN);case`null`:return Jn(`null`,null);case`true`:return Jn(`boolean`,!0);case`false`:return Jn(`boolean`,!1);default:if(e=Date.parse(e))return Jn(`date`,new Date(e))}return Jn(!1,null)}function Jn(e,t){return{type:e,value:t}}let Yn=function(e,t){var n;switch(D(e,t)){case`undefined`:n=`undefined`;break;case`nan`:n=`NaN`;break;case`string`:n=e;break;case`bigNumber`:case`date`:case`function`:case`regexp`:n=e.toString();break;default:try{n=JSON.stringify(e,null,` `)}catch{n=``}}return n};(Object.getOwnPropertyDescriptor(Yn,`name`)||{}).writable||Object.defineProperty(Yn,"name",{value:`default`,configurable:!0});var Xn=[`style`],Zn=[`style`],Qn=[`style`],$n=[`style`],er=[`style`],tr=[`style`],nr=[`style`],rr=[`style`],ir=[`style`],ar=[`style`],or=[`style`],sr=[`style`],cr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Xn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},br(t),{viewBox:`0 0 24 24`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`path`,{d:`M12,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,2M7,13H17V11H7`})))}}])}(_().PureComponent),lr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Zn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},br(t),{viewBox:`0 0 24 24`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`path`,{d:`M12,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,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z`})))}}])}(_().PureComponent),ur=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Qn),r=br(t).style;return _().createElement(`span`,n,_().createElement(`svg`,{fill:r.color,width:r.height,height:r.width,style:r,viewBox:`0 0 1792 1792`},_().createElement(`path`,{d:`M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z`})))}}])}(_().PureComponent),dr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,$n),r=br(t).style;return _().createElement(`span`,n,_().createElement(`svg`,{fill:r.color,width:r.height,height:r.width,style:r,viewBox:`0 0 1792 1792`},_().createElement(`path`,{d:`M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z`})))}}])}(_().PureComponent),fr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,er);return _().createElement(`span`,n,_().createElement(`svg`,{style:o(o({},br(t).style),{}
115,{paddingLeft:`2px`,verticalAlign:`top`}),viewBox:`0 0 15 15`,fill:`currentColor`},_().createElement(`path`,{d:`M0 14l6-6-6-6z`})))}}])}(_().PureComponent),pr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,tr);return _().createElement(`span`,n,_().createElement(`svg`,{style:o(o({},br(t).style),{},{paddingLeft:`2px`,verticalAlign:`top`}),viewBox:`0 0 15 15`,fill:`currentColor`},_().createElement(`path`,{d:`M0 5l6 6 6-6z`})))}}])}(_().PureComponent),mr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,nr);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},br(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z`}))))}}])}(_().PureComponent),hr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,rr);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},br(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}])}(_().PureComponent),gr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,ir);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},br(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}])}(_().PureComponent),_r=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,ar);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},br(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z`}))))}}])}(_().PureComponent),vr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,or);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},br(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2
1150.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z`}))))}}])}(_().PureComponent),yr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,sr);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},br(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}])}(_().PureComponent);function br(e){return e||={},{style:o(o({verticalAlign:`middle`},e),{},{color:e.color?e.color:`#000000`,height:`1em`,width:`1em`})}}var xr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).copiedTimer=null,n.copyToClipboardFallback=function(e){var t=document.createElement(`textarea`);t.value=e,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t)},n.handleCopy=function(){var e=n.props,t=e.clickCallback,r=e.src,i=e.namespace,a=JSON.stringify(n.clipboardValue(r),null,` `);navigator.clipboard?navigator.clipboard.writeText(a).catch(function(){n.copyToClipboardFallback(a)}):n.copyToClipboardFallback(a),n.copiedTimer=setTimeout(function(){n.setState({copied:!1})},5500),n.setState({copied:!0},function(){typeof t==`function`&&t({src:r,namespace:i,name:i[i.length-1]})})},n.getClippyIcon=function(){var e=n.props.theme;return n.state.copied?_().createElement(`span`,null,_().createElement(mr,Object.assign({className:`copy-icon`},z(e,`copy-icon`))),_().createElement(`span`,z(e,`copy-icon-copied`),`â`)):_().createElement(mr,Object.assign({className:`copy-icon`},z(e,`copy-icon`)))},n.clipboardValue=function(e){switch(D(e)){case`function`:case`regexp`:return e.toString();default:return e}},n.state={copied:!1},n}return h(t,e),l(t,[{key:`componentWillUnmount`,value:function(){this.copiedTimer&&=(clearTimeout(this.copiedTimer),null)}},{key:`render`,value:function(){var e=this.props,t=e.theme,n=e.hidden,r=e.rowHovered,i=z(t,`copy-to-clipboard`).style,a=`inline`;return n&&(a=`none`),_().createElement(`span`,{className:`copy-to-clipboard-container`,title:`Copy to clipboard`,style:{verticalAlign:`top`,display:r?`inline-block`:`none`}},_().createElement(`span`,{style:o(o({},i),{},{display:a}),onClick:this.handleCopy},this.getClippyIcon()))}}])}(_().PureComponent);let Sr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleSelect=function(e){var t=n.props,r=t.variable,i=t.namespace,a=t.onEdit,s=t.onSelect,c=t.keyModifier,l=E(i);c(e,`edit`)&&!1!==a?n.prepopInput(r):!1!==s&&(l.shift(),s(o(o({},r),{},{namespace:l})))},n.getEditIcon=function(){var e=n.props,t=e.variable,r=e.theme;return _().createElement(`div`,{className:`click-to-edit`,style:{verticalAlign:`top`,display:n.state.hovered?`inline-block`:`none`}},_().createElement(vr,Object.assign({className:`click-to-edit-icon`},z(r,`editVarIcon`),{onClick:function(){n.prepopInput(t)}})))},n.prepopInput=function(e){if(!1!==n.props.onEdit){var t=Yn(e.value,n.props.bigNumber),r=qn(t,n.props.bigNumber);n.setState({editMode:!0,editValue:t,parsedInput:{type:r.type,value:r.value}})}},n.getRemoveIcon=function(){var e=n.props,t=e.variable,r=e.namespace,i=e.theme,a=e.rjvId;return _().createElement(`div`,{className:`click-to-remove`,style:{verticalAlign:`top`,display:n.state.hovered?`inline-block`:`none`}},_().createElement(hr,Object.assign({className:`click-to-remove-icon`},z(i,`removeVarIcon`),{onClick:function(){xn.dispatch({name:`VARIABLE_REMOVED`,rjvId:a,data:{name:t.name,namespace:r,existing_value:t.value,variable_removed:!0}})}})))},n.getValue=function(e,t){var r=!t&&e.type,i=n.props;switch(r){case!1:return n.getEditInput();case`string`:return _().createElement(An,Object.assign({value:e.value},i));case`integer`:return _().createElement(On,Object.assign({value:e.value},i));case`float`:return _().createElement(vn,Object.assign({value:e.value},i));case`boolean`:return _().createElement(gn,Object.assign({value:e.value},i));case`function`:return _().createElement(Tn,Object.assign({value:e.value},i));case`null`:return _().createElement(Dn,i);case`nan`:return _().createElement(En,i);case`undefined`:return _().createElement(jn,i);case`date`:return _().createElement(_n,Object.assign({value:e.value},i));case`regexp`:return _().createElement(kn,Object.assign({value:e.value},i));case`bigNumber`:return _().createElement(Mn,Object.assign({value:e.value},i));case`circularReference`:return _().createElement(JsonCircularReference,Object.assign({value:e.value},i));default:var a=``;try{a=JSON.stringify(e.value)}catch{a=``}return _().createElement(`div`,{className:`object-value`},a)}},n.getEditInput=function(){var e=n.props,t=e.keyModifier,r=e.selectOnFocus,i=e.theme,a=n.state.editValue;return _().createElement(`div`,null,_().createElement(Kn,Object.assign({type:`text`,ref:function(e){e&&e[r?`select`:`focus`]()},value:a,className:`variable-editor`,onChange:function(e){var t=e.target.value,r=qn(t,n.props.bigNumber);
115n.setState({editValue:t,parsedInput:{type:r.type,value:r.value}})},onKeyDown:function(e){switch(e.key){case`Escape`:n.setState({editMode:!1,editValue:``});break;case`Enter`:t(e,`submit`)&&n.submitEdit(!0)}e.stopPropagation()},placeholder:`update this value`,minRows:2},z(i,`edit-input`))),_().createElement(`div`,z(i,`edit-icon-container`),_().createElement(hr,Object.assign({className:`edit-cancel`},z(i,`cancel-icon`),{onClick:function(e){e&&e.stopPropagation(),n.setState({editMode:!1,editValue:``})}})),_().createElement(yr,Object.assign({className:`edit-check string-value`},z(i,`check-icon`),{onClick:function(e){e&&e.stopPropagation(),n.submitEdit()}})),_().createElement(`div`,null,n.showDetected())))},n.submitEdit=function(e){var t=n.props,r=t.variable,i=t.namespace,a=t.rjvId,o=t.bigNumber,s=n.state,c=s.editValue,l=s.parsedInput,u=c;e&&l.type&&(u=l.value,o&&l.type===`bigNumber`&&(u=new o(u))),n.setState({editMode:!1}),xn.dispatch({name:`VARIABLE_UPDATED`,rjvId:a,data:{name:r.name,namespace:i,existing_value:r.value,new_value:u,variable_removed:!1}})},n.showDetected=function(){var e=n.props.theme,t=n.getDetectedInput();if(t)return _().createElement(`div`,null,_().createElement(`div`,z(e,`detected-row`),t,_().createElement(yr,{className:`edit-check detected`,style:o({verticalAlign:`top`,paddingLeft:`3px`},z(e,`check-icon`).style),onClick:function(e){e&&e.stopPropagation(),n.submitEdit(!0)}})))},n.getDetectedInput=function(){var e=n.state.parsedInput,t=e.type,r=e.value,i=n.props,a=i.theme;if(!1!==t)switch(t.toLowerCase()){case`object`:return _().createElement(`span`,null,_().createElement(`span`,{style:o(o({},z(a,`brace`).style),{},{cursor:`default`})},`{`),_().createElement(`span`,{style:o(o({},z(a,`ellipsis`).style),{},{cursor:`default`})},`...`),_().createElement(`span`,{style:o(o({},z(a,`brace`).style),{},{cursor:`default`})},`}`));case`array`:return _().createElement(`span`,null,_().createElement(`span`,{style:o(o({},z(a,`brace`).style),{},{cursor:`default`})},`[`),_().createElement(`span`,{style:o(o({},z(a,`ellipsis`).style),{},{cursor:`default`})},`...`),_().createElement(`span`,{style:o(o({},z(a,`brace`).style),{},{cursor:`default`})},`]`));case`string`:return _().createElement(An,Object.assign({value:r},i));case`integer`:return _().createElement(On,Object.assign({value:r},i));case`float`:return _().createElement(vn,Object.assign({value:r},i));case`boolean`:return _().createElement(gn,Object.assign({value:r},i));case`function`:return _().createElement(Tn,Object.assign({value:r},i));case`null`:return _().createElement(Dn,i);case`nan`:return _().createElement(En,i);case`undefined`:return _().createElement(jn,i);case`date`:return _().createElement(_n,Object.assign({value:new Date(r)},i));case`bignumber`:return _().createElement(Mn,Object.assign({value:r},i));case`circularreference`:return _().createElement(JsonCircularReference,Object.assign({value:variable.value},i))}},n.state={editMode:!1,editValue:``,hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this,t=this.props,n=t.variable,r=t.singleIndent,i=t.type,a=t.theme,s=t.namespace,c=t.indentWidth,l=t.enableClipboard,u=t.onEdit,d=t.onDelete,f=t.onSelect,p=t.displayArrayKey,m=t.quotesOnKeys,h=t.showComma,g=t.isLast,v=this.state.editMode,y=!1!==f||!1!==u;return _().createElement(`div`,Object.assign({},z(a,`objectKeyVal`,{paddingLeft:c*r}),{onMouseEnter:function(){return e.setState(o(o({},e.state),{},{hovered:!0}))},onMouseLeave:function(){return e.setState(o(o({},e.state),{},{hovered:!1}))},className:`variable-row`,key:n.name}),i===`array`?p?_().createElement(`span`,Object.assign({},z(a,`array-key`),{key:n.name+`_`+s}),n.name,_().createElement(`div`,z(a,`colon`),`:`)):null:_().createElement(`span`,null,_().createElement(`span`,Object.assign({},z(a,`object-name`),{className:`object-key`,key:n.name+`_`+s,onClick:y?this.handleSelect:null}),!!m&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`),_().createElement(`span`,{style:{display:`inline-block`}},O(n.name)),!!m&&_().createElement(`span`,{style:{verticalAlign:`to
115p`}},`"`)),_().createElement(`span`,z(a,`colon`),`:`)),_().createElement(`div`,Object.assign({className:`variable-value`,onClick:y?this.handleSelect:null},z(a,`variableValue`,{cursor:!1===f?`default`:`pointer`})),this.getValue(n,v)),h&&!g&&_().createElement(`span`,z(a,`comma`),`,`),l?_().createElement(xr,{rowHovered:this.state.hovered,hidden:v,src:n.value,clickCallback:l,theme:a,namespace:[].concat(E(s),[n.name])}):null,!1!==u&&!1===v?this.getEditIcon():null,!1!==d&&!1===v?this.getRemoveIcon():null)}}])}(_().PureComponent);var Cr=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).getObjectSize=function(){var t=e.props,n=t.size,r=t.theme;if(t.displayObjectSize)return _().createElement(`span`,Object.assign({className:`object-size`},z(r,`object-size`)),n,` item`,n===1?``:`s`)},e.getAddAttribute=function(t){var n=e.props,r=n.theme,i=n.namespace,a=n.name,s=n.src,c=n.rjvId,l=n.depth;return _().createElement(`span`,{className:`click-to-add`,style:{verticalAlign:`top`,display:t?`inline-block`:`none`}},_().createElement(gr,Object.assign({className:`click-to-add-icon`},z(r,`addVarIcon`),{onClick:function(){var e={name:l>0?a:null,namespace:i.splice(0,i.length-1),existing_value:s,variable_removed:!1,key_name:null};D(s)===`object`?xn.dispatch({name:`ADD_VARIABLE_KEY_REQUEST`,rjvId:c,data:e}):xn.dispatch({name:`VARIABLE_ADDED`,rjvId:c,data:o(o({},e),{},{new_value:[].concat(E(s),[null])})})}})))},e.getRemoveObject=function(t){var n=e.props,r=n.theme,i=n.namespace,a=n.name,o=n.src,s=n.rjvId;if(i.length!==1)return _().createElement(`span`,{className:`click-to-remove`,style:{display:t?`inline-block`:`none`}},_().createElement(hr,Object.assign({className:`click-to-remove-icon`},z(r,`removeVarIcon`),{onClick:function(){xn.dispatch({name:`VARIABLE_REMOVED`,rjvId:s,data:{name:a,namespace:i.splice(0,i.length-1),existing_value:o,variable_removed:!0}})}})))},e.render=function(){var t=e.props,n=t.theme,r=t.onDelete,i=t.onAdd,a=t.enableClipboard,o=t.src,s=t.namespace,c=t.rowHovered;return _().createElement(`div`,Object.assign({},z(n,`object-meta-data`),{className:`object-meta-data`,onClick:function(e){e.stopPropagation()}}),e.getObjectSize(),a?_().createElement(xr,{rowHovered:c,clickCallback:a,src:o,theme:n,namespace:s}):null,!1===i?null:e.getAddAttribute(c),!1===r?null:e.getRemoveObject(c))},e}return h(t,e),l(t)}(_().PureComponent);function wr(e){var t=e.parent_type,n=e.namespace,r=e.quotesOnKeys,i=e.theme,a=e.jsvRoot,o=e.name,s=e.displayArrayKey,c=e.onKeyClick,l=e.name?e.name:``,u=typeof c==`function`?c:null;return!a||!1!==o&&o!==null?t===`array`?s?_().createElement(`span`,Object.assign({},z(i,`array-key`),{key:n,onClick:u}),_().createElement(`span`,{className:`array-key`},l),_().createElement(`span`,z(i,`colon`),`:`)):_().createElement(`span`,null):_().createElement(`span`,Object.assign({},z(i,`object-name`),{key:n,onClick:u}),_().createElement(`span`,{className:`object-key`},r&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`),_().createElement(`span`,null,l),r&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`)),_().createElement(`span`,z(i,`colon`),`:`)):_().createElement(`span`,null)}function Tr(e){var t=e.theme;switch(e.iconStyle){case`triangle`:return _().createElement(pr,Object.assign({},z(t,`expanded-icon`),{className:`expanded-icon`}));case`square`:return _().createElement(ur,Object.assign({},z(t,`expanded-icon`),{className:`expanded-icon`}));default:return _().createElement(cr,Object.assign({},z(t,`expanded-icon`),{className:`expanded-icon`}))}}function Er(e){var t=e.theme;switch(e.iconStyle){case`triangle`:return _().createElement(fr,Object.assign({},z(t,`collapsed-icon`),{className:`collapsed-icon`}));case`square`:return _().createElement(dr,Object.assign({},z(t,`collapsed-icon`),{className:`collapsed-icon`}));default:return _().createElement(lr,Object.assign({},z(t,`collapsed-icon`),{className:`collapsed-icon`}))}}var Dr=[`src`,`groupArraysAfterLength`,`depth`,`name`,`theme`,`jsvRoot`,`namespace`],Or=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).toggleCollapsed=function(e){for(var t=n.state.expanded,r=[],i=Math.max(t.length||0,e+1),a=0;a<i;a++)r[a]=!0===t[a];r[e]=!r[e],n.setState({expanded:r})},n.handleKeySelect=function(){var e=n.props,t=e.name,r=e.namespace,i=e.onSelect,a=e.src;if(typeof i==`function`){var o=E(r);o.shift(),o.length>0&&o.pop(),i({name:t,value:a,type:`array`,namespace:o})}},n.state={expanded:[]},n}return h(t,e),l(t,[{key:`getExpandedIcon`,value:function(e){var t=this.props,n=t.theme,r=t.iconStyle;return this.state.expanded[e]?_().createElement(Tr,{theme:n,iconStyle:r}):_().createElement(Er,{theme:n,iconStyle:r})}},{key:`render`,value:function(){var e=this,t=this.props,n=t.src,r
115=t.groupArraysAfterLength,i=(t.depth,t.name),a=t.theme,o=t.jsvRoot,s=t.namespace,c=C(t,Dr),l=0,u=5*this.props.indentWidth;o||(l=5*this.props.indentWidth);var d=r,f=Math.ceil(n.length/d);return _().createElement(`div`,Object.assign({className:`object-key-val`},z(a,o?`jsv-root`:`objectKeyVal`,{paddingLeft:l})),_().createElement(wr,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),_().createElement(`span`,null,_().createElement(Cr,Object.assign({size:n.length},this.props))),E(Array(f)).map(function(t,r){return _().createElement(`div`,Object.assign({key:r,className:`object-key-val array-group`},z(a,`objectKeyVal`,{marginLeft:6,paddingLeft:u})),_().createElement(`span`,z(a,`brace-row`),_().createElement(`div`,Object.assign({className:`icon-container`},z(a,`icon-container`),{onClick:function(t){e.toggleCollapsed(r)}}),e.getExpandedIcon(r)),e.state.expanded[r]?_().createElement(Mr,Object.assign({key:i+r,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:d,index_offset:r*d,src:n.slice(r*d,r*d+d),namespace:s,type:`array`,parent_type:`array_group`,theme:a,showComma:e.props.showComma,isLast:r===f-1},c)):_().createElement(`span`,Object.assign({},z(a,`brace`),{onClick:function(t){e.toggleCollapsed(r)},className:`array-group-brace`}),`[`,_().createElement(`div`,Object.assign({},z(a,`array-group-meta-data`),{className:`array-group-meta-data`}),_().createElement(`span`,Object.assign({className:`object-size`},z(a,`object-size`)),r*d,` - `,r*d+d-1>n.length?n.length-1:r*d+d-1)),`]`)))}))}}])}(_().PureComponent),kr=[`depth`,`src`,`namespace`,`name`,`type`,`parent_type`,`theme`,`jsvRoot`,`iconStyle`,`showComma`,`isLast`],Ar=function(e){function t(e){var n;s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({expanded:!n.state.expanded},function(){wn.set(n.props.rjvId,n.props.namespace,`expanded`,n.state.expanded)})},n.handleKeySelect=function(){var e=n.props,t=e.name,r=e.namespace,i=e.onSelect,a=e.src,o=n.state.object_type;if(typeof i==`function`){var s=E(r);s.shift(),s.length>0&&s.pop(),i({name:t,value:a,type:o,namespace:s})}},n.getObjectContent=function(e,t,r){return _().createElement(`div`,{className:`pushed-content object-container`},_().createElement(`div`,Object.assign({className:`object-content`},z(n.props.theme,`pushed-content`)),n.renderObjectContents(t,r)))},n.getEllipsis=function(){return n.state.size===0?null:_().createElement(`div`,Object.assign({},z(n.props.theme,`ellipsis`),{className:`node-ellipsis`,onClick:n.handleToggleCollapsed}),`...`)},n.getObjectMetaData=function(e){var t=n.state,r=t.size,i=t.hovered;return _().createElement(Cr,Object.assign({rowHovered:i,size:r},n.props))},n.renderObjectContents=function(e,t){var r,i=n.props,a=i.depth,o=i.parent_type,s=i.index_offset,c=i.groupArraysAfterLength,l=i.namespace,u=i.showComma,d=n.state.object_type,f=[],p=Object.keys(e||{});return n.props.sortKeys&&d!==`array`&&(p=p.sort()),p.forEach(function(i,m){r=new jr(i,e[i],t.bigNumber);var h=m===p.length-1;if(o===`array_group`&&s&&(r.name=parseInt(r.name,10)+s),Object.prototype.hasOwnProperty.call(e,i)&&r.type.toLowerCase()!==`window`)if(n.isCircularReference(r))f.push(_().createElement(k,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),type:`array`,parent_type:d,isLast:h,showComma:u,singleIndent:5,indentWidth:n.props.indentWidth},t)));else if(r.type===`object`)f.push(_().createElement(Mr,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),parent_type:d,isLast:h,showComma:u,listOfAncestors:n.listOfAncestors.concat([n.props.src])},t)));else if(r.type===`array`){var g=Mr;c&&r.value.length>c&&(g=Or),f.push(_().createElement(g,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),type:`array`,parent_type:d,isLast:h,showComma:u,listOfAncestors:n.listOfAncestors.concat([n.props.src])},t)))}else f.push(_().createElement(Sr,Object.assign({key:r.name+`_`+l,variable:r,singleIndent:5,namespace:l,type:n.props.type,isLast:h,showComma:u},t)))}),f};var r=t.getState(e);return n.state=o(o({},r),{},{prevProps:{}}),n.listOfAncestors=Array.from(n.props.listOfAncestors||[]),n.listOfAncestors.push(e.src),n}return h(t,e),l(t,[{key:`getBraceStart`,value:function(e,t){var n=this.props,r=n.theme,i=n.iconStyle;if(n.parent_type===`array_group`)return _().createElement(`span`,null,_().createElement(`span`,z(r,`brace`),e===`array`?`[`:`{`));var a=t?Tr:Er;return _().createElement(`span`,null,_().createElement(`span`,Object.assign({onClick:this.handleToggleCollapsed},z(r,`brace-row`)),_().createElement(`div`,Object.assign({className:`icon-container`},z(r,`icon-container`)),_().createElement(a,{theme:r,iconStyle:i})),_().createElement(wr,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),_().createElement(`span`,z(r,`brace`),e===`array`?`[`:`{`)))}}
115,{key:`isCircularReference`,value:function(e){return this.listOfAncestors.indexOf(e.value)>-1||e.value===this.props.src}},{key:`render`,value:function(){var e=this,t=this.props,n=t.depth,r=t.src,i=(t.namespace,t.name,t.type,t.parent_type),a=t.theme,s=t.jsvRoot,c=t.iconStyle,l=t.showComma,u=t.isLast,d=C(t,kr),f=this.state,p=f.object_type,m=f.expanded,h={};return s||i===`array_group`?i===`array_group`&&(h.borderLeft=0,h.display=`inline`):h.paddingLeft=5*this.props.indentWidth,_().createElement(`div`,Object.assign({className:`object-key-val`,onMouseEnter:function(){return e.setState(o(o({},e.state),{},{hovered:!0}))},onMouseLeave:function(){return e.setState(o(o({},e.state),{},{hovered:!1}))}},z(a,s?`jsv-root`:`objectKeyVal`,h)),this.getBraceStart(p,m),m?this.getObjectContent(n,r,o({theme:a,iconStyle:c},d)):this.getEllipsis(),_().createElement(`span`,{className:`brace-row`},_().createElement(`span`,{style:o(o({},z(a,`brace`).style),{},{paddingLeft:m?`3px`:`0px`})},p===`array`?`]`:`}`)),l&&!u&&!s&&_().createElement(`span`,z(a,`comma`),`,`),this.getObjectMetaData(r))}}],[{key:`getDerivedStateFromProps`,value:function(e,n){var r=n.prevProps;return e.src!==r.src||e.collapsed!==r.collapsed||e.name!==r.name||e.namespace!==r.namespace||e.rjvId!==r.rjvId?o(o({},t.getState(e)),{},{prevProps:e}):null}}])}(_().PureComponent);Ar.getState=function(e){var t=Object.keys(e.src).length,n=(!1===e.collapsed||!0!==e.collapsed&&e.collapsed>e.depth)&&(!e.shouldCollapse||!1===e.shouldCollapse({name:e.name,src:e.src,type:D(e.src),namespace:e.namespace}))&&t!==0;return{expanded:wn.get(e.rjvId,e.namespace,`expanded`,n),object_type:e.type===`array`?`array`:`object`,parent_type:e.type===`array`?`array`:`object`,size:t,hovered:!1}};var jr=l(function e(t,n,r){s(this,e),this.name=t,this.value=n,this.type=D(n,r)});x(Ar);let Mr=Ar;var Nr=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).render=function(){var t,n,r=e.props,i=[r.name],a=Mr;return typeof r.name!=`object`||Array.isArray(r.name)||(i=[r.name?.displayName||r.name?.name||((t=r.name)==null||(n=t.type)==null?void 0:n.name)||`Anonymous`]),Array.isArray(r.src)&&r.groupArraysAfterLength&&r.src.length>r.groupArraysAfterLength&&(a=Or),_().createElement(`div`,{className:`pretty-json-container object-container`},_().createElement(`div`,{className:`object-content`},_().createElement(a,Object.assign({namespace:i,depth:0,jsvRoot:!0},r))))},e}return h(t,e),l(t)}(_().PureComponent),Pr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleCloseModal=function(){xn.dispatch({rjvId:n.props.rjvId,name:`RESET`})},n.handleSubmit=function(){n.props.submit(n.state.input)},n.state={input:e.input?e.input:``},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this,t=this.props,n=t.theme,r=t.rjvId,i=t.isValid,a=this.state.input,o=i(a);return _().createElement(`div`,Object.assign({className:`key-modal-request`},z(n,`key-modal-request`),{onClick:this.handleCloseModal}),_().createElement(`div`,Object.assign({},z(n,`key-modal`),{onClick:function(e){e.stopPropagation()}}),_().createElement(`div`,z(n,`key-modal-label`),`Key Name:`),_().createElement(`div`,{style:{position:`relative`}},_().createElement(`input`,Object.assign({},z(n,`key-modal-input`),{className:`key-modal-input`,ref:function(e){return e&&e.focus()},spellCheck:!1,value:a,placeholder:`...`,onChange:function(t){e.setState({input:t.target.value})},onKeyPress:function(t){o&&t.key===`Enter`?e.handleSubmit():t.key===`Escape`&&e.handleCloseModal()}})),o?_().createElement(yr,Object.assign({},z(n,`key-modal-submit`),{className:`key-modal-submit`,onClick:this.handleSubmit})):null),_().createElement(`span`,z(n,`key-modal-cancel`),_().createElement(_r,Object.assign({},z(n,`key-modal-cancel-icon`),{className:`key-modal-cancel`,onClick:function(){xn.dispatch({rjvId:r,name:`RESET`})}})))))}}])}(_().PureComponent),Fr=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).isValid=function(t){var n=e.props.rjvId,r=wn.get(n,`action`,`new-key-request`);return t!==``&&Object.keys(r.existing_value).indexOf(t)===-1},e.submit=function(t){var n=e.props.rjvId,r=wn.get(n,`action`,`new-key-request`);r.new_value=o({},r.existing_value),r.new_value[t]=e.props.defaultValue,xn.dispatch({name:`VARIABLE_ADDED`,rjvId:n,data:r})},e}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.active,n=e.theme,r=e.rjvId;return t?_().createElement(Pr,{rjvId:r,theme:n,isValid:this.isValid,submit:this.submit}):null}}])}(_().PureComponent),Ir=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.message,n=e.active,r=e.theme,i=e.rjvId;return n?_().createElement(`div`,Object.assign({className:`validation-failure`},z(r,`validation-failure`),{onClick:function(){xn.dispatch({rjvId:i,name:`RESET`})}}),_().createElement(`span`,z(r,`validation-failure-label`),t),_().createElement(_r,z(r,`validation-failure-clear`))):null}}])}(_().PureComponent),Lr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).rjvId=Date.now().toString()+Math.random().toString(36).slice(2),n.getListeners=function(){return{reset:n.resetState,"variable-update":n.updateSrc,"add-key-request":n.addKeyRequest}},n.updateSrc=function(){var e,t=wn.get(n.rjvId,`action`,`variable-update`),r=t.name,i=t.namespace,a=t.new_value,o=t.existing_value,s=t.updated_src,c=t.type,l=n.props,u=l.onEdit,d=l.onDelete,f=l.onAdd,p={existing_src:n.state.src,new_value:a,updated_src:s,name:r,namespace:i,existing_value:o};switch(c){case`variable-added`:e=f(p);break;case`variable-edited`:e=u(p);break;case`variable-removed`:e=d(p)}!1===e?n.setState({validationFailure:!0}):(wn.set(n.rjvId,`global`,`src`,s),n.setState({src:s}))},n.addKeyRequest=function(){n.setState({addKeyRequest:!0})},n.resetState=function(){n.setState({validationFailure:!1,addKeyRequest:!1})},n.state={addKeyRequest:!1,editKeyRequest:!1,validationFailure:!1,src:t.defaultProps.src,name:t.defaultProps.name,theme:t.defaultProps.theme,validationMessage:t.defaultProps.validationMessage,prevSrc:t.defaultProps.src,prevName:t.defaultProps.name,prevTheme:t.defaultProps.theme},n}return h(t,e),l(t,[{key:`componentDidMount`,value:function(){wn.set(this.rjvId,`global`,`src`,this.state.src);var e=this.getListeners();for(var t in e)wn.on(t+`-`+this.rjvId,e[t]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:`componentDidUpdate`,value:function(e,t){!1!==t.addKeyRequest&&this.setState({addKeyRequest:!1}),!1!==t.editKeyRequest&&this.setState({editKeyRequest:!1}),e.src!==this.state.src&&wn.set(this.rjvId,`global`,`src`,this.state.src)}},{key:`componentWillUnmount`,value:function(){var e=this.getListeners();for(var t in e)wn.removeListener(t+`-`+this.rjvId,e[t])}},{key:`render`,value:function(){var e=this.state,t=e.validationFailure,n=e.validationMessage,r=e.addKeyRequest,i=e.theme,a=e.src,s=e.name,c=this.props,l=c.style,u=c.defaultValue;return _().createElement(`div`,{className:`react-json-view`,style:o(o({},z(i,`app-container`).style),l)},_().createElement(Ir,{message:n,active:t,theme:i,rjvId:this.rjvId}),_().createElement(Nr,Object.assign({},this.props,{src:a,name:s,theme:i,type:D(a),rjvId:this.rjvId})),_().createElement(Fr,{active:r,theme:i,rjvId:this.rjvId,defaultValue:u}))}}],[{key:`getDerivedStateFromProps`,value:function(e,n){if(e.src!==n.prevSrc||e.name!==n.prevName||e.theme!==n.prevTheme){var r={src:e.src,name:e.name,theme:e.theme,validationMessage:e.validationMessage,prevSrc:e.src,prevName:e.name,prevTheme:e.theme};return t.validateState(r)}return null}}])}(_().PureComponent);Lr.defaultProps={src:{},name:`root`,theme:`rjv-default`,collapsed:!1,collapseStringsAfterLength:!1,shouldCollapse:!1,sortKeys:!1,quotesOnKeys:!0,groupArraysAfterLength:100,indentWidth:4,enableClipboard:!0,escapeStrings:!0,displayObjectSize:!0,displayDataTypes:!0,onEdit:!1,onDelete:!1,onAdd:!1,onSelect:!1,iconStyle:`triangle`,style:{},validationMessage:`Validation Error`,defaultValue:null,displayArrayKey:!0,selectOnFocus:!1,keyModifier:function(e){return e.metaKey||e.ctrlKey},bigNumber:null,showComma:!0}
115,Lr.validateState=function(e){var t={};return D(e.theme)!==`object`||function(e){var t=[`base00`,`base01`,`base02`,`base03`,`base04`,`base05`,`base06`,`base07`,`base08`,`base09`,`base0A`,`base0B`,`base0C`,`base0D`,`base0E`,`base0F`];if(D(e)===`object`){for(var n=0;n<t.length;n++)if(!(t[n]in e))return!1;return!0}return!1}(e.theme)||(console.error(`react-json-view error:`,`theme prop must be a theme name or valid base-16 theme object.`,`defaulting to "rjv-default" theme`),t.theme=`rjv-default`),D(e.src)!==`object`&&D(e.src)!==`array`&&(console.error(`react-json-view error:`,`src property must be a valid json object`),t.name=`ERROR`,t.src={message:`src property must be a valid json object`}),o(o({},e),t)},x(Lr);let Rr=Lr})(),i})())}))(),1),PTe=NTe.default.default||NTe.default,tD=({data:e,title:t,onClose:n})=>{let r=ug(`rjv-default`,`monokai`);if(!e)return null;let i=t||e.name||`Inspector`,a=e=>{if(e==null)return`N/A`;if(typeof e==`number`)return e%1==0?e.toString():e.toFixed(3);let t=String(e);return t.length>500?t.substring(0,500)+`... (truncated)`:t},o=e=>{if(typeof e==`object`&&e)return e;if(typeof e==`string`){let t=e.trim();if(t.startsWith(`{`)&&t.endsWith(`}`)||t.startsWith(`[`)&&t.endsWith(`]`))try{return JSON.parse(t)}catch{return null}}return null};return(0,B.jsx)(mp,{children:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(V,{position:`fixed`,top:0,left:0,right:0,bottom:0,bg:`blackAlpha.600`,zIndex:1e3,onClick:n}),(0,B.jsxs)(V,{position:`fixed`,top:0,right:0,bottom:0,width:{base:`100%`,md:`500px`},bg:`bg`,boxShadow:`xl`,zIndex:1001,overflowY:`auto`,p:6,children:[(0,B.jsx)(hh,{position:`absolute`,top:4,right:4,onClick:n}),(0,B.jsx)(Ll,{size:`md`,mb:6,children:i}),(0,B.jsx)(V,{children:Object.keys(e).map(t=>{let n=e[t];if(n==null)return null;let i=o(n);return(0,B.jsxs)(V,{mb:4,children:[(0,B.jsxs)(U,{fontWeight:`semibold`,fontSize:`sm`,mb:1,children:[t,`:`]}),i?(0,B.jsx)(PTe,{src:i,theme:r,collapsed:1,enableClipboard:!1,displayDataTypes:!1,displayObjectSize:!1,style:{backgroundColor:`transparent`,fontSize:`11px`}}):(0,B.jsx)(U,{fontSize:`sm`,children:a(n)})]},t)})})]})]})})},FTe={};function nD(e,t=!1){let n,r,i=FTe;function a(t){n=e(t)?.catch(()=>{}).finally(()=>{if(r){let{event:e}=r;r=null,a(e)}else n=null})||null}function o(e){r={event:e}}function s(e){n?o(e):a(e)}function c(e){i!==e&&requestAnimationFrame(()=>{let e=i;i=FTe,s(e)}),i=e}return t?c:s}function rD(e){return e instanceof iD}var iD=class{_filterBy;_requestUpdate;_coordinator;_pending;_enabled;_initialized;_request;constructor(e){this._filterBy=e,this._requestUpdate=nD(()=>this.requestQuery(),!0),this._coordinator=null,this._pending=Promise.resolve(),this._enabled=!0,this._initialized=0,this._request=null}get coordinator(){return this._coordinator}set coordinator(e){this._coordinator=e}get enabled(){return this._enabled}get initialized(){return this._initialized>0}set enabled(e){e=!!e,this._enabled!==e&&(this._enabled=e,e&&(this._initialized?this._request&&this.requestQuery(this._request===!0?void 0:this._request):this.initialize(),this._request=null))}get pending(){return this._pending}get filterBy(){return this._filterBy}get filterStable(){return!0}async prepare(){}query(e){return null}queryPending(){return this}queryResult(e){return this}queryError(e){return this}requestQuery(e){if(this._enabled){let t=e||this.query(this.filterBy?.predicate(this));return this._coordinator.requestQuery(this,t)}else return this._request=e??!0,null}requestUpdate(){this._enabled?this._requestUpdate():this.requestQuery()}initialize(){this._enabled?this._coordinator&&(this._initialized=-1,this._pending=this.prepare().then(()=>(this._initialized=1,this.requestQuery()))):this._initialized=0}destroy(){this._enabled=!1,this.coordinator?.disconnect(this)}update(){return this}},ITe=Uint8Array.of(65,82,82,79,87,49),aD={V1:0,V2:1,V3:2,V4:3,V5:4},oD={NONE:0,Schema:1,DictionaryBatch:2,RecordBatch:3,Tensor:4,SparseTensor:5},K={Dictionary:-1,NONE:0,Null:1,Int:2,Float:3,Binary:4,Utf8:5,Bool:6,Decimal:7,Date:8,Time:9,Timestamp:10,Interval:11,List:12,Struct:13,Union:14,FixedSizeBinary:15,FixedSizeList:16,Map:17,Duration:18,LargeBinary:19,LargeUtf8:20,LargeList:21,RunEndEncoded:22,BinaryView:23,Utf8View:24,ListView:25,LargeListView:26},LTe={HALF:0,SINGLE:1,DOUBLE:2},sD={DAY:0,MILLISECOND:1},cD={SECOND:0,MILLISECOND:1,MICROSECOND:2,NANOSECOND:3},lD={YEAR_MONTH:0,DAY_TIME:1,MONTH_DAY_NANO:2},uD={Sparse:0,Dense:1},RTe={LZ4_FRAME:0,ZSTD:1},zTe={BUFFER:0},BTe=Uint8Array,VTe=Uint16Array,HTe=Uint32Array,UTe=BigUint64Array,WTe=Int8Array,GTe=Int16Array,dD=Int32Array,fD=BigInt64Array,KTe=Float32Array,pD=Float64Array;function mD(e){return Object.prototype.toString.call(e)}function qTe(e){return mD(e)===`[object ArrayBuffer]`||mD(e)===`[object SharedArrayBuffer]`}function JTe(e){return mD(e)===`[object Uint8Array]`}function YTe(e,t){let n=Math.log2(e)-3;return(t?[WTe,GTe,dD,fD]:[BTe,VTe,HTe,UTe])[n]}function hD(e,t){let n=0,r=e.length;if(r<=2147483648)do{let i=n+r>>>1;e[i]<=t?n=i+1:r=i}while(n<r);else do{let i=Math.trunc((n+r)/2);e[i]<=t?n=i+1:r=i}while(n<r);return n}function gD(e,t,n){if(t(e))return e;throw Error(n(e))}function _D(e,t,n){return t=Array.isArray(t)?t:Object.values(t),gD(e,e=>t.includes(e),n??(()=>`${e} must be one of ${t}`))}function vD(e,t){for(let[n,r]of Object.entries(e))if(r===t)return n;return`<Unknown>`}var yD=e=>`Unsupported data type: "${vD(K,e)}" (id ${e})`,XTe=(e,t,n=!0,r=null)=>({name:e,type:t,nullable:n,metadata:r});function ZTe(e){return Object.hasOwn(e,`name`)&&QTe(e.type)}function QTe(e){return typeof e?.typeId==`number`}function bD(e,t=``,n=!0){return ZTe(e)?e:XTe(t,gD(e,QTe,()=>`Data type expected.`),n)}var $Te=(e,t,n=!1,r=-1)=>({typeId:K.Dictionary,id:r,dictionary:e,indices:t||tEe(),ordered:n}),eEe=(e=32,t=!0)=>({typeId:K.Int,bitWidth:_D(e,[8,16,32,64]),signed:t,values:YTe(e,t)}),tEe=()=>eEe(32),nEe=(e=2)=>({typeId:K.Float,precision:_D(e,LTe),values:[VTe,KTe,pD][e]}),rEe=()=>({typeId:K.Binary,offsets:dD}),iEe=()=>({typeId:K.Utf8,offsets:dD}),aEe=(e,t,n=128)=>({typeId:K.Decimal,precision:e,scale:t,bitWidth:_D(n,[32,64,128,256]),values:n===32?dD:UTe}),oEe=e=>
vendor: 11,036 bytes, line 115
115({typeId:K.Date,unit:_D(e,sD),values:e===sD.DAY?dD:fD}),sEe=(e=cD.MILLISECOND)=>{e=_D(e,cD);let t=e===cD.SECOND||e===cD.MILLISECOND?32:64;return{typeId:K.Time,unit:e,bitWidth:t,values:t===32?dD:fD}},cEe=(e=cD.MILLISECOND,t=null)=>({typeId:K.Timestamp,unit:_D(e,cD),timezone:t,values:fD}),lEe=(e=lD.MONTH_DAY_NANO)=>({typeId:K.Interval,unit:_D(e,lD),values:e===lD.MONTH_DAY_NANO?void 0:dD}),uEe=e=>({typeId:K.List,children:[bD(e)],offsets:dD}),dEe=e=>({typeId:K.Struct,children:Array.isArray(e)&&e.length>0&&ZTe(e[0])?e:Object.entries(e).map(([e,t])=>XTe(e,t))}),fEe=(e,t,n,r)=>(n??=t.map((e,t)=>t),{typeId:K.Union,mode:_D(e,uD),typeIds:n,typeMap:n.reduce((e,t,n)=>(e[t]=n,e),{}),children:t.map((e,t)=>bD(e,`_${t}`)),typeIdForValue:r,offsets:dD}),pEe=e=>({typeId:K.FixedSizeBinary,stride:e}),mEe=(e,t)=>({typeId:K.FixedSizeList,stride:t,children:[bD(e)]}),hEe=(e,t)=>({typeId:K.Map,keysSorted:e,children:[t],offsets:dD}),gEe=(e=cD.MILLISECOND)=>({typeId:K.Duration,unit:_D(e,cD),values:fD}),_Ee=()=>({typeId:K.LargeBinary,offsets:fD}),vEe=()=>({typeId:K.LargeUtf8,offsets:fD}),yEe=e=>({typeId:K.LargeList,children:[bD(e)],offsets:fD}),bEe=(e,t)=>({typeId:K.RunEndEncoded,children:[gD(bD(e,`run_ends`),e=>e.type.typeId===K.Int,()=>`Run-ends must have an integer type.`),bD(t,`values`)]}),xEe=e=>({typeId:K.ListView,children:[bD(e,`value`)],offsets:dD}),SEe=e=>({typeId:K.LargeListView,children:[bD(e,`value`)],offsets:fD}),xD=new pD(2).buffer;new fD(xD),new HTe(xD),new dD(xD),new BTe(xD);function SD(e){if(e>2**53-1||e<-(2**53-1))throw Error(`BigInt exceeds integer number representation: ${e}`);return Number(e)}function CD(e,t){return Number(e/t)+Number(e%t)/Number(t)}var wD=e=>BigInt.asUintN(64,e);function CEe(e,t){return BigInt.asIntN(64,e[t])}function wEe(e,t){let n=t<<1,r;return BigInt.asIntN(64,e[n+1])<0?(r=wD(~e[n])|wD(~e[n+1])<<64n,r=-(r+1n)):r=e[n]|e[n+1]<<64n,r}function TEe(e,t){let n=t<<2,r;return BigInt.asIntN(64,e[n+3])<0?(r=wD(~e[n])|wD(~e[n+1])<<64n|wD(~e[n+2])<<128n|wD(~e[n+3])<<192n,r=-(r+1n)):r=e[n]|e[n+1]<<64n|e[n+2]<<128n|e[n+3]<<192n,r}var EEe=new TextDecoder(`utf-8`);new TextEncoder;function TD(e){return EEe.decode(e)}function DEe(e,t){return(e[t>>3]&1<<t%8)!=0}function ED(e,t){let n=t+MD(e,t),r=n-MD(e,n),i=jD(e,r);return(t,a,o=null)=>{if(t<i){let i=jD(e,r+t);if(i)return a(e,n+i)}return o}}function DD(e,t){return t}function OD(e,t){return!!kD(e,t)}function kD(e,t){return AD(e,t)<<24>>24}function AD(e,t){return e[t]}function jD(e,t){return OEe(e,t)<<16>>16}function OEe(e,t){return e[t]|e[t+1]<<8}function MD(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function kEe(e,t){return MD(e,t)>>>0}function ND(e,t){return SD(BigInt.asIntN(64,BigInt(kEe(e,t))+(BigInt(kEe(e,t+4))<<32n)))}function PD(e,t){let n=t+MD(e,t),r=MD(e,n);return n+=4,TD(e.subarray(n,n+r))}function FD(e,t,n,r){if(!t)return[];let i=t+MD(e,t);return Array.from({length:MD(e,i)},(t,a)=>r(e,i+4+a*n))}var ID=Symbol(`rowIndex`);function LD(e,t){class n{constructor(e){this[ID]=e}toJSON(){return jEe(e,t,this[ID])}}let r=n.prototype;for(let n=0;n<e.length;++n){if(Object.hasOwn(r,e[n]))continue;let i=t[n];Object.defineProperty(r,e[n],{get(){return i.at(this[ID])},enumerable:!0})}return e=>new n(e)}function AEe(e,t){return n=>jEe(e,t,n)}function jEe(e,t,n){let r={};for(let i=0;i<e.length;++i)r[e[i]]=t[i].at(n);return r}function MEe(e){return e instanceof zD}var RD=class{static ArrayType=null;constructor({length:e,nullCount:t,type:n,validity:r,values:i,offsets:a,sizes:o,children:s}){this.length=e,this.nullCount=t,this.type=n,this.validity=r,this.values=i,this.offsets=a,this.sizes=o,this.children=s,(!t||!this.validity)&&(this.at=e=>this.value(e))}get[Symbol.toStringTag](){return`Batch`}at(e){return this.isValid(e)?this.value(e):null}isValid(e){return DEe(this.validity,e)}value(e){return this.values[e]}slice(e,t){let n=t-e,r=Array(n);for(let t=0;t<n;++t)r[t]=this.at(e+t);return r}*[Symbol.iterator](){for(let e=0;e<this.length;++e)yield this.at(e)}},zD=class extends RD{constructor(e){super(e);let{length:t,values:n}=this;this.values=n.subarray(0,t)}slice(e,t){return this.nullCount?super.slice(e,t):this.values.subarray(e,t)}[Symbol.iterator](){return this.nullCount?super[Symbol.iterator]():this.values[Symbol.iterator]()}},BD=class extends RD{static ArrayType=pD},VD=class extends RD{static ArrayType=Array},NEe=class extends VD{value(e){return null}},HD=class extends BD{value(e){return SD(this.values[e])}},PEe=class extends BD{value(e){let t=this.values[e],n=(t&31744)>>10,r=(t&1023)/1024,i=(-1)**((t&32768)>>15);switch(n){case 31:return i*(r?NaN:1/0);case 0:return i*(r?6103515625e-14*r:0)}return i*2**(n-15)*(1+r)}},FEe=class extends VD{value(e){return DEe(this.values,e)}},IEe=class extends BD{constructor(e){super(e);let{scale:t}=this.type;this.scale=10**t}value(e){return this.values[e]/this.scale}},LEe=class extends RD{constructor(e){super(e);let{bitWidth:t,scale:n}=this.type;this.decimal=t===64?CEe:t===128?wEe:TEe,this.scale=10n**BigInt(n)}},REe=class extends LEe{static ArrayType=pD;value(e){return CD(this.decimal(this.values,e),this.scale)}},zEe=class extends LEe{static ArrayType=Array;value(e){return this.decimal(this.values,e)}},BEe=class extends VD{constructor(e){super(e),this.source=e}value(e){return new Date(this.source.value(e))}},VEe=class extends BD{value(e){return 864e5*this.values[e]}},HEe=HD,UEe=class extends HD{value(e){return super.value(e)*1e3}},WEe=HD,GEe=class extends HD{value(e){return CD(this.values[e],1000n)}},KEe=class extends HD{value(e){return CD(this.values[e],1000000n)}},qEe=class extends VD{value(e){return this.values.subarray(e<<1,e+1<<1)}},JEe=class extends VD{value(e){let t=this.values,n=e<<4;return Float64Array.of(MD(t,n),MD(t,n+4),ND(t,n+8))}},YEe=({values:e,offsets:t},n)=>e.subarray(t[n],t[n+1]),XEe=({values:e,offsets:t},n)=>e.subarray(SD(t[n]),SD(t[n+1])),ZEe=class extends VD{value(e){return YEe(this,e)}},QEe=class extends VD{value(e){return XEe(this,e)}},$Ee=class extends VD{value(e){return TD(YEe(this,e))}},eDe=class extends VD{value(e){return TD(XEe(this,e))}},tDe=class extends VD{value(e){let t=this.offsets;return this.children[0].slice(t[e],t[e+1])}},nDe=class extends VD{value(e){let t=this.offsets;return this.children[0].slice(SD(t[e]),SD(t[e+1]))}},rDe=class extends VD{value(e){let t=this.offsets[e],n=t+this.sizes[e];return this.children[0].slice(t,n)}},iDe=class extends VD{value(e){let t=this.offsets[e],n=t+this.sizes[e];return this.children[0].slice(SD(t),SD(n))}},aDe=class extends VD{constructor(e){super(e),this.stride=this.type.stride}},oDe=class extends aDe{value(e){let{stride:t,values:n}=this;return n.subarray(e*t,(e+1)*t)}},sDe=class extends aDe{value(e){let{children:t,stride:n}=this;return t[0].slice(e*n,(e+1)*n)}};function cDe({children:e,offsets:t},n){let[r,i]=e[0].children,a=t[n],o=t[n+1],s=[];for(let e=a;e<o;++e)s.push([r.at(e),i.at(e)]);return s}var lDe=class extends VD{value(e){return cDe(this,e)}},uDe=class extends VD{value(e){return new Map(cDe(this,e))}},dDe=class extends VD{constructor({typeIds:e,...t}){super(t),this.typeIds=e,this.typeMap=this.type.typeMap}value(e,t=e){let{typeIds:n,children:r,typeMap:i}=this;return r[i[n[e]]].at(t)}},fDe=class extends dDe{value(e){return super.value(e,this.offsets[e])}},pDe=class extends VD{constructor(e,t=AEe){super(e),this.names=this.type.children.map(e=>e.name),this.factory=t(this.names,this.children)}value(e){return this.factory(e)}},mDe=class extends pDe{constructor(e){super(e,LD)}},hDe=class extends VD{value(e){let[{values:t},n]=this.children;return n.at(hD(t,e))}},gDe=class extends VD{setDictionary(e){return this.dictionary=e,this.cache=e.cache(),this}value(e){return this.cache[this.key(e)]}key(e){return this.values[e]}},_De=class extends VD{constructor({data:e,...t}){super(t),this.data=e}view(e){let{values:t,data:n}=this,r=e<<4,i=r+4,a=t,o=MD(a,r);return o>12&&(i=MD(a,r+12),a=n[MD(a,r+8)]),a.subarray(i,i+o)}},vDe=class extends _De{value(e){return this.view(e)}},yDe=class extends _De{value(e){return TD(this.view(e))}};function bDe(e){let t=[];return{add(e){return t.push(e),this},clear:()=>t=[],done:()=>new UD(t,e)}}var UD=class{constructor(e,t=e[0]?.type){this.type=t,this.length=e.reduce((e,t)=>e+t.length,0),this.nullCount=e.reduce((e,t)=>e+t.nullCount,0),this.data=e;let n=e.length,r=new Int32Array(n+1);if(n===1){let[t]=e;r[1]=t.length,this.at=e=>t.at(e)}else for(let t=0,i=0;t<n;++t)r[t+1]=i+=e[t].length;this.offsets=r}get[Symbol.toStringTag](){return`Column`}[Symbol.iterator](){let e=this.data;return e.length===1?e[0][Symbol.iterator]():xDe(e)}at(e){let{data:t,offsets:n}=this,r=hD(n,e)-1;return t[r]?.at(e-n[r])}get(e){return this.at(e)}toArray(){let{length:e,nullCount:t,data:n}=this,r=!t&&MEe(n[0]),i=n.length;if(r&&i===1)return n[0].values;let a=new(!i||t>0?Array:n[0].constructor.ArrayType??n[0].values.constructor)(e);return r?SDe(a,n):CDe(a,n)}cache(){return this._cache??=this.toArray()}};function*xDe(e){for(let t=0;t<e.length;++t){let n=e[t][Symbol.iterator]();for(let e=n.next();!e.done;e=n.next())yield e.value}}function SDe(e,t){for(let n=0,r=0;n<t.length;++n){let{values:i}=t[n];e.set(i,r),r+=i.length}return e}function CDe(e,t){let n=-1;for(let r=0;r<t.length;++r){let i=t[r];for(let t=0;t<i.length;++t)e[++n]=i.at(t)}return e}var wDe=class e{constructor(e,t,n=!1){let r=e.fields.map(e=>e.name);this.schema=e,this.names=r,this.children=t,this.factory=n?LD:AEe;let i=[];this.getFactory=e=>i[e]??(i[e]=this.factory(r,t.map(t=>t.data[e])))}get[Symbol.toStringTag](){return`Table`}get numCols(){return this.names.length}get numRows(){return this.children[0]?.length??0}getChildAt(e){return this.children[e]}getChild(e){let t=this.names.findIndex(t=>t===e);return t>-1?this.children[t]:void 0}selectAt(t,n=[]){let{children:r,factory:i,schema:a}=this,{fields:o}=a;return new e({...a,fields:t.map((e,t)=>TDe(o[e],n[t]))},t.map(e=>r[e]),i===LD)}select(e,t){let n=this.names,r=e.map(e=>n.indexOf(e));return this.selectAt(r,t)}toColumns(){let{children:e,names:t}=this,n={};return t.forEach((t,r)=>n[t]=e[r]?.toArray()??[]),n}toArray(){let{children:e,getFactory:t,numRows:n}=this,r=e[0]?.data??[],i=Array(n);for(let e=0,n=-1;e<r.length;++e){let a=t(e);for(let t=0;t<r[e].length;++t)i[++n]=a(t)}return i}*[Symbol.iterator](){let{children:e,getFactory:t}=this,n=e[0]?.data??[];for(let e=0;e<n.length;++e){let r=t(e);for(let t=0;t<n[e].length;++t)yield r(t)}}at(e){let{children:t,getFactory:n,numRows:r}=this;if(e<0||e>=r)return null;let[{offsets:i}]=t,a=hD(i,e)-1;return n(a)(e-i[a])}get(e){return this.at(e)}};function TDe(e,t){return t!=null&&t!==e.name?{...e,name:t}:e}function EDe(e,t={}){let{typeId:n,bitWidth:r,mode:i,precision:a,unit:o}=e,{useBigInt:s,useBigIntTimestamp:c,useDate:l,useDecimalInt:u,useMap:d,useProxy:f}=t;switch(n){case K.Null:return NEe;case K.Bool:return FEe;case K.Int:case K.Time:case K.Duration:return s||r<64?zD:HD;case K.Float:return a?zD:PEe;case K.Date:return DDe(o===sD.DAY?VEe:HEe,l&&BEe);case K.Timestamp:return c?zD:DDe(o===cD.SECOND?UEe:o===cD.MILLISECOND?WEe:o===cD.MICROSECOND?GEe:KEe,l&&BEe);
115case K.Decimal:return r===32?u?zD:IEe:u?zEe:REe;case K.Interval:return o===lD.DAY_TIME?qEe:o===lD.YEAR_MONTH?zD:JEe;case K.FixedSizeBinary:return oDe;case K.Utf8:return $Ee;case K.LargeUtf8:return eDe;case K.Binary:return ZEe;case K.LargeBinary:return QEe;case K.BinaryView:return vDe;case K.Utf8View:return yDe;case K.List:return tDe;case K.LargeList:return nDe;case K.Map:return d?uDe:lDe;case K.ListView:return rDe;case K.LargeListView:return iDe;case K.FixedSizeList:return sDe;case K.Struct:return f?mDe:pDe;case K.RunEndEncoded:return hDe;case K.Dictionary:return gDe;case K.Union:return i?fDe:dDe}throw Error(yD(n))}function DDe(e,t){return t?class extends t{constructor(t){super(new e(t))}}:e}var ODe=-1,kDe=8;function ADe(e){return`Missing compression codec "${vD(RTe,e)}" (id ${e})`}var jDe=new Map;function MDe(e){return e!=null&&jDe.get(e)||null}function NDe(e,{offset:t,length:n},r){if(n===0)return{bytes:new Uint8Array,offset:0,length:0};let i=ND(e,t),a=e.subarray(t+kDe,t+n),o=i===ODe?a:r.decode(a,i);return{bytes:o,offset:0,length:o.length}}function PDe(e,t){return{offset:ND(e,t),metadataLength:MD(e,t+8),bodyLength:ND(e,t+16)}}function FDe(e,t){return FD(e,t,24,PDe)}function IDe(e,t){let n=ED(e,t);return{codec:n(4,kD,RTe.LZ4_FRAME),method:n(6,kD,zTe.BUFFER)}}function LDe(e,t,n){let r=ED(e,t),i=n<aD.V4?8:0;return{length:r(4,ND,0),nodes:FD(e,r(6,DD),16,(e,t)=>({length:ND(e,t),nullCount:ND(e,t+8)})),regions:FD(e,r(8,DD),16+i,(e,t)=>({offset:ND(e,t+i),length:ND(e,t+i+8)})),compression:r(10,IDe),variadic:FD(e,r(12,DD),8,ND)}}function RDe(e,t,n){let r=ED(e,t);return{id:r(4,ND,0),data:r(6,(e,t)=>LDe(e,t,n)),isDelta:r(8,OD,!1)}}function zDe(e,t,n,r){_D(n,K,yD);let i=ED(e,t);switch(n){case K.Binary:return rEe();case K.Utf8:return iEe();case K.LargeBinary:return _Ee();case K.LargeUtf8:return vEe();case K.List:return uEe(r[0]);case K.ListView:return xEe(r[0]);case K.LargeList:return yEe(r[0]);case K.LargeListView:return SEe(r[0]);case K.Struct:return dEe(r);case K.RunEndEncoded:return bEe(r[0],r[1]);case K.Int:return eEe(i(4,MD,0),i(6,OD,!1));case K.Float:return nEe(i(4,jD,LTe.HALF));
115case K.Decimal:return aEe(i(4,MD,0),i(6,MD,0),i(8,MD,128));case K.Date:return oEe(i(4,jD,sD.MILLISECOND));case K.Time:return sEe(i(4,jD,cD.MILLISECOND));case K.Timestamp:return cEe(i(4,jD,cD.SECOND),i(6,PD));case K.Interval:return lEe(i(4,jD,lD.YEAR_MONTH));case K.Duration:return gEe(i(4,jD,cD.MILLISECOND));case K.FixedSizeBinary:return pEe(i(4,MD,0));case K.FixedSizeList:return mEe(r[0],i(4,MD,0));case K.Map:return hEe(i(4,OD,!1),r[0]);case K.Union:return fEe(i(4,jD,uD.Sparse),r,FD(e,i(6,DD),4,MD))}return{typeId:n}}function WD(e,t){let n=FD(e,t,4,(e,t)=>{let n=ED(e,t);return[n(4,PD),n(6,PD)]});return n.length?new Map(n):null}function BDe(e,t,n){let r=ED(e,t);return{version:n,endianness:r(4,jD,0),fields:r(6,VDe,[]),metadata:r(8,WD)}}function VDe(e,t){return FD(e,t,4,HDe)}function HDe(e,t){let n=ED(e,t),r=n(8,AD,K.NONE),i=n(10,DD,0),a=n(12,WDe),o=zDe(e,i,r,n(14,UDe,[]));return a&&(a.dictionary=o,o=a),{name:n(4,PD),type:o,nullable:n(6,OD,!1),metadata:n(16,WD)}}function UDe(e,t){return FD(e,t,4,HDe)}function WDe(e,t){if(!t)return null;let n=ED(e,t);return $Te(null,n(6,GDe,tEe()),n(8,OD,!1),n(4,ND,0))}function GDe(e,t){return zDe(e,t,K.Int)}var KDe=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,qDe=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`,JDe=e=>`Unsupported message type: ${e} (${vD(oD,e)})`;function GD(e,t){let n=MD(e,t)||0;if(t+=4,n===-1&&(n=MD(e,t)||0,t+=4),n===0)return null;let r=e.subarray(t,t+=n);if(r.byteLength<n)throw Error(KDe(n,r.byteLength));let i=ED(r,0),a=i(4,jD,aD.V1),o=i(6,AD,oD.NONE),s=i(8,DD,0),c=i(10,ND,0),l;if(s){let n=o===oD.Schema?BDe:o===oD.DictionaryBatch?RDe:o===oD.RecordBatch?LDe:null;if(!n)throw Error(JDe(o));if(l=n(r,s,a),c>0){let n=e.subarray(t,t+=c);if(n.byteLength<c)throw Error(qDe(c,n.byteLength));l.body=n}else o!==oD.Schema&&(l.body=new Uint8Array)}return{version:a,type:o,index:t,content:l}}function YDe(e){let t=qTe(e)?new Uint8Array(e):e;return JTe(t)&&XDe(t)?QDe(t):ZDe(t)}function XDe(e){if(!e||e.length<4)return!1;for(let t=0;t<6;++t)if(ITe[t]!==e[t])return!1;return!0}function ZDe(e){let t=[e].flat(),n,r=[],i=[],a=[];for(let e of t){if(!JTe(e))throw Error(`IPC data batch was not a Uint8Array.`);let t=0;for(;;){let o=GD(e,t);if(o===null)break;if(t=o.index,o.content)switch(o.type){case oD.Schema:n||=o.content;break;case oD.RecordBatch:r.push(o.content),a.push(i.length);break;case oD.DictionaryBatch:i.push(o.content);break}}}return{schema:n,dictionaries:i,records:r,dictsBeforeRecord:a,metadata:null}}function QDe(e){let t=e.byteLength-(ITe.length+4),n=ED(e,t-MD(e,t)),r=n(4,jD,aD.V1),i=n(8,FDe,[]),a=n(10,FDe,[]),o=a.map(e=>i.filter(t=>t.offset<e.offset).length);return{schema:n(6,(e,t)=>BDe(e,t,r)),dictionaries:i.map(({offset:t})=>GD(e,t).content),records:a.map(({offset:t})=>GD(e,t).content),dictsBeforeRecord:o,metadata:n(12,WD)}}function $De(e,t){return eOe(YDe(e),t)}function eOe(e,t={}){let{schema:n={fields:[]},dictionaries:r,records:i,dictsBeforeRecord:a}=e,{version:o,fields:s}=n,c=new Map,l=nOe(t,o,c),u=new Map;tOe(n,e=>{let t=e.type;t.typeId===K.Dictionary&&u.set(t.id,t.dictionary)});let d=e=>{let{id:t,data:n,isDelta:r,body:i}=e,a=u.get(t),o=KD(a,l({...n,body:i})),s=c.get(t);if(s)r?c.set(t,new UD([...s.data,o],a)):c.set(t,new UD([o],a));else{if(r)throw Error(`Delta update can not be first dictionary batch.`);c.set(t,new UD([o],a))}},f=s.map(e=>bDe(e.type)),p=0;for(let e=0;e<i.length;e++){let t=a?a[e]:r.length;for(;p<t;)d(r[p++]);let n=l(i[e]);s.forEach((e,t)=>f[t].add(KD(e.type,n)))}for(;p<r.length;)d(r[p++]);return new wDe(n,f.map(e=>e.done()),t.useProxy)}function tOe(e,t){e.fields.forEach(function e(n){t(n),n.type.dictionary?.children?.forEach(e),n.type.children?.forEach(e)})}function nOe(e,t,n){let r={version:t,options:e,dictionary:e=>n.get(e)};return e=>{let{length:t,nodes:n,regions:i,compression:a,variadic:o,body:s}=e,c=-1,l=-1,u=-1;return{...r,length:t,node:()=>n[++c],buffer:e=>{let{bytes:t,length:n,offset:r}=rOe(s,i[++l],a);return e?new e(t.buffer,t.byteOffset+r,n/e.BYTES_PER_ELEMENT):t.subarray(r,r+n)},variadic:()=>o[++u],visit(e){return e.map(e=>KD(e.type,this))}}}}function rOe(e,t,n){if(!n)return{bytes:e,...t};if(n.method!==zTe.BUFFER)throw Error(`Unknown compression method (${n.method})`);{let r=n.codec,i=MDe(r);if(!i)throw Error(ADe(r));return NDe(e,t,i)}}function KD(e,t){let{typeId:n}=e,{options:r,node:i,buffer:a,variadic:o,version:s}=t,c=EDe(e,r),l={...i(),type:e};
115if(n===K.Null)return new c({...l,nullCount:l.length});switch(n){case K.Bool:case K.Int:case K.Time:case K.Duration:case K.Float:case K.Decimal:case K.Date:case K.Timestamp:case K.Interval:case K.FixedSizeBinary:return new c({...l,validity:a(),values:a(e.values)});case K.Utf8:case K.LargeUtf8:case K.Binary:case K.LargeBinary:return new c({...l,validity:a(),offsets:a(e.offsets),values:a()});case K.BinaryView:case K.Utf8View:return new c({...l,validity:a(),values:a(),data:Array.from({length:o()},()=>a())});case K.List:case K.LargeList:case K.Map:return new c({...l,validity:a(),offsets:a(e.offsets),children:t.visit(e.children)});case K.ListView:case K.LargeListView:return new c({...l,validity:a(),offsets:a(e.offsets),sizes:a(e.offsets),children:t.visit(e.children)});case K.FixedSizeList:case K.Struct:return new c({...l,validity:a(),children:t.visit(e.children)});case K.RunEndEncoded:return new c({...l,children:t.visit(e.children)});case K.Dictionary:{let{id:n,indices:r}=e;return new c({...l,validity:a(),values:a(r.values)}).setDictionary(t.dictionary(n))}case K.Union:return s<aD.V5&&a(),new c({...l,typeIds:a(WTe),offsets:e.mode===uD.Sparse?null:a(e.offsets),children:t.visit(e.children)});default:throw Error(yD(n))}}new Uint16Array(new Uint8Array([1,0]).buffer)[0];function qD(e,t={useDate:!0}){return $De(e,t)}function iOe(e){return new JD(e)}var JD=class{_uri;_queue;_connected;_request;_ws;_events;constructor({uri:e=`ws://localhost:3000/`,ipc:t=void 0}={}){this._uri=e,this._queue=[],this._connected=!1,this._request=null,this._ws=null;let n=this;this._events={open(){n._connected=!0,n.next()},close(){for(n._connected=!1,n._request=null,n._ws=null;n._queue.length;)n._queue.shift().reject(`Socket closed`)},error(e){if(n._request){let{reject:t}=n._request;n._request=null,n.next(),t(e)}else console.error(`WebSocket error: `,e)},message(e){let{data:r}=e;if(n._request){let{query:e,resolve:i,reject:a}=n._request;if(n._request=null,n.next(),typeof r==`string`){let e=JSON.parse(r);e.error?a(e.error):i(e)}else if(e.type===`exec`)i();else if(e.type===`arrow`)i(qD(r,t));else throw Error(`Unexpected socket data: ${r}`)}else console.log(`WebSocket message: `,r)}}}get connected(){return this._connected}init(){this._ws=new WebSocket(this._uri),this._ws.binaryType=`arraybuffer`;for(let e in this._events)this._ws.addEventListener(e,this._events[e])}enqueue(e,t,n){this._ws??this.init(),this._queue.push({query:e,resolve:t,reject:n}),this._connected&&!this._request&&this.next()}next(){this._queue.length&&(this._request=this._queue.shift(),this._ws.send(JSON.stringify(this._request.query)))}query(e){return new Promise((t,n)=>this.enqueue(e,t,n))}};function YD(e){return e instanceof XD}var aOe;function oOe(e){aOe=e}var XD=class{type;constructor(e){this.type=e}clone(){let e=new this.constructor(this.type);for(let t in this)t!==`type`&&(e[t]=this[t]);return e}
115toString(e=aOe){if(!e)throw Error(`No visitor provided and no default visitor set.`);return e.toString(this)}},ZD=class extends XD{},QD=`COLUMN_REF`,$D=`COLUMN_PARAM`,sOe=`TABLE_REF`,cOe=`LITERAL`,lOe=`INTERVAL`,eO=`LIST`,tO=`TUPLE`,nO=`UNNEST`,rO=`ORDER_BY`,iO=`CAST`,aO=`CASE`,oO=`WHEN`,sO=`COLLATE`,cO=`UNARY`,lO=`UNARY_POSTFIX`,uO=`BINARY`,dO=`BETWEEN`,fO=`NOT_BETWEEN`,pO=`LOGICAL_OPERATOR`,mO=`FUNCTION`,hO=`AGGREGATE`,gO=`WINDOW`,_O=`WINDOW_FUNCTION`,vO=`WINDOW_DEF`,yO=`WINDOW_FRAME`,bO=`WINDOW_EXTENT_EXPR`,uOe=`EXPRESSION`,xO=`FRAGMENT`,SO=`VERBATIM`,CO=`PARAM`,wO=`WITH_CLAUSE`,TO=`WINDOW_CLAUSE`,EO=`SELECT_CLAUSE`,DO=`FROM_CLAUSE`,OO=`JOIN_CLAUSE`,dOe=`SAMPLE_CLAUSE`,kO=`SELECT_QUERY`,AO=`DESCRIBE_QUERY`,jO=`SET_OPERATION`,MO=`CREATE_QUERY`,NO=`CREATE_SCHEMA_QUERY`,PO=`SCALAR_SUBQUERY`,FO=class extends ZD{param;constructor(e){super(CO),this.param=e}get value(){return this.param.value}},fOe=class extends ZD{name;args;constructor(e,t=[]){super(mO),this.name=e,this.args=t}};function IO(e,...t){return new fOe(e,VO(t).map(fk))}function LO(e,...t){return new vk(e,VO(t).map(fk))}function RO(e,...t){return new UO(new WO(e,VO(t).map(fk)))}function zO(e,t){return e.flat().filter(e=>e!=null).map(e=>t(e))}function BO(e){return zO(e,fk)}function VO(e){let t=e.length,n=t;for(;n>0&&e[n-1]===void 0;--n);return n<t?e.slice(0,n):e}var HO=class extends XD{name;def;constructor(e,t){super(TO),this.name=e,this.def=t}},UO=class e extends ZD{func;def;constructor(e,t=new GO){super(gO),this.func=e,this.def=t}over(t){return new e(this.func,this.def.over(t))}partitionby(...t){return new e(this.func,this.def.partitionby(...t))}orderby(...t){return new e(this.func,this.def.orderby(...t))}frame(t){return new e(this.func,this.def.frame(t))}},WO=class extends ZD{name;args;ignoreNulls;order;constructor(e,t=[],n=!1,r=[]){super(_O),this.name=e,this.args=t,this.ignoreNulls=n,this.order=BO([r])}},GO=class extends XD{name;partition;order;framedef;constructor(e,t,n,r){super(vO),this.name=e,this.partition=t,this.order=n,this.framedef=r}over(e){return KO(this,{name:e})}partitionby(...e){return KO(this,{partition:BO(e)})}orderby(...e){return KO(this,{order:BO(e)})}frame(e){return KO(this,{framedef:e})}};function KO(e,t){return new GO(t.name??e.name,t.partition??e.partition,t.order??e.order,t.framedef??e.framedef)}function qO(e){return e instanceof JO}var JO=class extends ZD{table;constructor(e,t){super(e),this.table=t}get column(){return``}},YO=class extends JO{name;constructor(e,t){super(QD,t),this.name=e}get column(){return this.name}};function XO(e){return e instanceof ZO}var ZO=class extends JO{param;constructor(e,t){super($D,t),this.param=e}get column(){return`${this.param.value}`}};function QO(e){return typeof e==`string`}function $O(e){return Array.isArray(e)}function ek(e){if(e){let t=e;return typeof t?.addEventListener==`function`&&t.dynamic!==!1&&`value`in t}return!1}function tk(e,t){let n=hk(t);return ek(e)?new ZO(new FO(e),n):new YO(e,n)}var nk=class extends ZD{value;constructor(e){super(cOe),this.value=e}};function rk(e){switch(typeof e){case`number`:return Number.isFinite(e)?`${e}`:`NULL`;case`string`:return`'${e.replaceAll(`'`,`''`)}'`;case`boolean`:return e?`TRUE`:`FALSE`;default:if(e==null)return`NULL`;if(e instanceof Date){let t=+e;if(Number.isNaN(t))return`NULL`;let n=e.getUTCFullYear(),r=e.getUTCMonth(),i=e.getUTCDate();return t===Date.UTC(n,r,i)?`DATE '${n}-${r+1}-${i}'`:`epoch_ms(${t})`}else if(e instanceof RegExp)return`'${e.source}'`;else return`${e}`}}var ik=class extends ZD{value;hint;constructor(e,t){super(SO),this.value=e,this.hint=t}};function ak(e){return new nk(e)}function ok(e,t){return new ik(e,t)}function sk(e){return e instanceof ck}var ck=class extends ZD{table;constructor(e){super(sOe),this.table=[e].flat()}get name(){return this.table[this.table.length-1]}};function lk(...e){let t=zO(e,String);return t?.length?new ck(t):void 0}function pOe(e){return e.split(`.`)}function uk(e){return`"${e.replaceAll(`"`,`""`)}"`}function dk(e){return e&&mOe(e)?e.slice(1,-1):e}function mOe(e){return e[0]===`"`&&e[e.length-1]===`"`}function fk(e){return QO(e)?tk(e):mk(e)}function pk(e){return QO(e)?ok(e):mk(e)}function mk(e){return e instanceof ZD?e:ek(e)?new FO(e):ak(e)}function hk(e){return gk(e)}function hOe(e){return gk(e)}function gk(e){return QO(e)||$O(e)?lk(e):e}function gOe(e){let t=pOe(e);return tk(t.pop(),lk(t))}function _Oe(e){return lk(pOe(e))}function _k(){return new GO}var vk=class e extends ZD{name;args;isDistinct;filter;order;constructor(e,t,n=!1,r=null,i=[]){super(hO),this.name=e,this.args=t,this.isDistinct=n,this.filter=r,this.order=BO([i])}distinct(t=!0){return new e(this.name,this.args,t,this.filter,this.order)}where(t){return QO(t)&&(t=pk(t)),new e(this.name,this.args,this.isDistinct,t,this.order)}argOrder(t){return new e(this.name,this.args,this.isDistinct,this.filter,t)}window(){return new UO(this)}partitionby(...e){return this.window().partitionby(...e)}orderby(...e){return this.window().orderby(...e)}frame(e){return this.window().frame(e)}};function vOe(e){return yk.includes(e.toLowerCase())}
115var yk=`any_value.approx_count_distinct.approx_quantile.arbitrary.arg_max.arg_max_null.arg_min.arg_min_null.array_agg.avg.bit_and.bit_or.bit_xor.bitstring_agg.bool_and.bool_or.corr.count.count_star.covar_pop.covar_samp.entropy.favg.first.fsum.geomean.kurtosis_pop.kurtosis.last.mad.max.max_by.median.min.min_by.mode.product.quantile.quantile_cont.quantile_disc.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_sxx.regr_sxy.regr_syy.regr_slope.reservoir_quantile.skewness.stddev.stddev_pop.stddev_samp.string_agg.sum.variance.var_pop.var_samp`.split(`.`),bk=class extends ZD{expr;extent;constructor(e,t,n){super(e),this.expr=t,this.extent=n}toSQL(e){let{extent:t,expr:n}=this;return t?`(${n} ${e} ${t[0]} AND ${t[1]})`:``}},xk=class extends bk{constructor(e,t){super(dO,e,t)}},Sk=class extends bk{constructor(e,t){super(fO,e,t)}},Ck=class extends ZD{op;left;right;constructor(e,t,n){super(uO),this.op=e,this.left=t,this.right=n}},wk=class e extends ZD{expr;_when;_else;constructor(e=void 0,t=[],n=void 0){super(aO),this.expr=e,this._when=t,this._else=n}when(t,n){return new e(this.expr,this._when.concat(new Tk(fk(t),fk(n))),this._else)}else(t){return new e(this.expr,this._when,fk(t))}},Tk=class extends XD{when;then;constructor(e,t){super(oO),this.when=e,this.then=t}},Ek=class extends ZD{expr;cast;constructor(e,t){super(iO),this.expr=e,this.cast=t}},Dk=class extends ZD{expr;collation;constructor(e,t){super(sO),this.expr=e,this.collation=t}},Ok=class extends ZD{spans;constructor(e){super(xO),this.spans=e}},kk=class extends XD{},Ak=class e extends kk{expr;alias;sample;constructor(e,t,n){super(DO),this.expr=e,this.alias=t,this.sample=n}as(t){return new e(this.expr,t,this.sample)}},jk=class extends ZD{expr;values;constructor(e,t){super(`IN`),this.expr=e,this.values=t}},Mk=class extends ZD{name;steps;constructor(e,t=1){super(lOe),this.name=e,this.steps=t}},Nk=class extends kk{left;right;joinVariant;joinType;condition;using;sample;constructor(e,t,n=`NATURAL`,r=`INNER`,i,a,o){super(OO),this.left=e,this.right=t,this.joinVariant=n,this.joinType=r,this.condition=i,this.using=a,this.sample=o}},Pk=class extends ZD{values;constructor(e){super(eO),this.values=e}},Fk=class extends ZD{op;clauses;constructor(e,t){super(pO),this.op=e,this.clauses=t}},Ik=class extends Fk{constructor(e){super(`AND`,e)}},Lk=class extends Fk{constructor(e){super(`OR`,e)}},Rk=class extends ZD{expr;desc;nullsFirst;constructor(e,t,n){super(rO),this.expr=e,this.desc=t,this.nullsFirst=n}},zk=class extends XD{size;perc;method;seed;constructor(e,t=!1,n,r){super(dOe),this.size=e,this.perc=t,this.method=n,this.seed=r}},yOe=class extends XD{expr;alias;constructor(e,t){super(EO),this.expr=e,this.alias=t}},Bk=class extends XD{name;query;materialized;constructor(e,t,n=null){super(wO),this.name=e,this.query=t,this.materialized=n}};function Vk(e){return e instanceof Uk}function Hk(e){return e instanceof Wk}function bOe(e){return e instanceof Gk}function xOe(e){return e instanceof Kk}function SOe(e){return e instanceof qk}var Uk=class extends ZD{static with(...e){return new COe(...e)}static select(...e){return new Wk().select(...e)}static from(...e){return new Wk().from(...e)}static union(...e){return new Jk(`UNION`,e.flat())}static unionByName(...e){return new Jk(`UNION BY NAME`,e.flat())}static unionAll(...e){return new Jk(`UNION ALL`,e.flat())}static unionAllByName(...e){return new Jk(`UNION ALL BY NAME`,e.flat())}static intersect(...e){return new Jk(`INTERSECT`,e.flat())}static intersectAll(...e){return new Jk(`INTERSECT ALL`,e.flat())}static except(...e){return new Jk(`EXCEPT`,e.flat())}static exceptAll(...e){return new Jk(`EXCEPT ALL`,e.flat())}static describe(e){return new Gk(e)}_with=[];_orderby=[];_limitPerc=!1;_limit;_offset;cteFor=null;constructor(e){super(e)}get subqueries(){return[]}clone(){return this}setCteFor(e){this.cteFor=e}with(...e){let t=[],n=(e,n)=>{let r=n.clone();r.setCteFor(this),t.push(new Bk(e,r))};return e.flat().forEach(e=>{if(e instanceof Bk)t.push(e);else if(e!=null)for(let t in e)n(t,e[t])}),this._with=this._with.concat(t),this}orderby(...e){return this._orderby=this._orderby.concat(BO(e)),this}setOrderby(...e){return this._orderby=[],this.orderby(...e)}limitPercent(e){return this._limitPerc=!0,this._limit=fk(e),this}limit(e){return this._limitPerc=!1,this._limit=fk(e),this}offset(e){return this._offset=fk(e),this}},Wk=class e extends Uk{_select=[];_from=[];_where=[];_sample;_groupby=[];_having=[];_window=[];_qualify=[];_distinct=!1;constructor(){super(kO)}get subqueries(){let t=this.cteFor||this,n=(t instanceof e?t._with:[]).reduce((e,t)=>
115(e[t.name]=t.query,e),{}),r=[];return this._from.forEach(e=>{if(e instanceof Ak){let{expr:t}=e;if(Vk(t))r.push(t);else if(sk(t)){let e=n[t.name];e&&r.push(e)}}}),r}clone(){return Object.assign(new e,this)}select(...e){let t=new Set,n=[],r=(e,r)=>{let i=dk(r);t.add(i),e&&n.push(new yOe(fk(e),i))};return e.flat().forEach(e=>{if(e!=null)if(QO(e))r(e,e);else if(qO(e))r(e,e.column);else if($O(e))r(e[1],e[0]);else if(YD(e))r(e,`${e}`);else for(let t in e)r(e[t],t)}),this._select=this._select.filter(e=>!t.has(e.alias)).concat(n),this}setSelect(...e){return this._select=[],this.select(...e)}distinct(e=!0){return this._distinct=!!e,this}from(...e){let t=[],n=(e,n)=>{t.push(new Ak(hOe(e),dk(n)))};return e.flat().forEach(e=>{if(e!=null)if(e instanceof kk)t.push(e);else if(QO(e))n(e,e);else if(sk(e))n(e,e.name);else if(YD(e))n(e);else if($O(e))n(e[1],e[0]);else for(let t in e)n(e[t],t)}),this._from=this._from.concat(t),this}setFrom(...e){return this._from=[],this.from(...e)}sample(e,t,n){let r;if(typeof e==`number`){let i=e>0&&e<1;r=new zk(i?e*100:Math.floor(e),i,t,n)}else r=e;return this._sample=r??void 0,this}where(...e){return this._where=this._where.concat(zO(e,pk)),this}setWhere(...e){return this._where=[],this.where(...e)}groupby(...e){return this._groupby=this._groupby.concat(BO(e)),this}setGroupby(...e){return this._groupby=[],this.groupby(...e)}having(...e){return this._having=this._having.concat(zO(e,pk)),this}window(...e){let t=[];return e.flat().forEach(e=>{if(e!=null)if(e instanceof HO)t.push(e);else for(let n in e)t.push(new HO(dk(n),e[n]))}),this._window=this._window.concat(t),this}qualify(...e){return this._qualify=this._qualify.concat(zO(e,pk)),this}},Gk=class e extends XD{query;constructor(e){super(AO),this.query=e}clone(){return new e(this.query.clone())}},Kk=class extends XD{name;query;replace;temp;view;constructor(e,t,{replace:n=!1,temp:r=!1,view:i=!1}={}){super(MO),this.name=hk(e),this.query=QO(t)?new ik(t):t,this.replace=n,this.temp=r,this.view=i}},qk=class extends XD{name;strict;constructor(e,{strict:t=!1}={}){super(NO),this.name=hk(e),this.strict=t}},Jk=class e extends Uk{op;queries;constructor(e,t){super(jO),this.op=e,this.queries=t}setCteFor(e){super.setCteFor(e);let{queries:t,cteFor:n}=this;n&&t.forEach(e=>e.setCteFor(n))}get subqueries(){return this.queries}clone(){let{op:t,queries:n,...r}=this;return Object.assign(new e(t,n),r)}},COe=class{_with;constructor(...e){this._with=e}select(...e){return Uk.select(...e).with(...this._with)}from(...e){return Uk.from(...e).with(...this._with)}union(...e){return Uk.union(...e).with(...this._with)}unionByName(...e){return Uk.unionByName(...e).with(...this._with)}unionAll(...e){return Uk.unionAll(...e).with(...this._with)}unionAllByName(...e){return Uk.unionAllByName(...e).with(...this._with)}intersect(...e){return Uk.intersect(...e).with(...this._with)}intersectAll(...e){return Uk.intersectAll(...e).with(...this._with)}except(...e){return Uk.except(...e).with(...this._with)}exceptAll(...e){return Uk.exceptAll(...e).with(...this._with)}},wOe=class extends ZD{subquery;constructor(e){super(PO),this.subquery=e}},TOe=class extends ZD{values;constructor(e){super(tO),this.values=e}},EOe=class extends ZD{op;expr;constructor(e,t,n){super(e),this.op=t,this.expr=n}},DOe=class extends EOe{constructor(e,t){super(cO,e,t)}},OOe=class extends EOe{constructor(e,t){super(lO,e,t)}},kOe=class extends ZD{expr;recursive;maxDepth;constructor(e,t=!1,n=0){super(nO),this.expr=e,this.recursive=t,this.maxDepth=n}},AOe=`ROWS`,jOe=`RANGE`,MOe=`GROUPS`,NOe=`PRECEDING`,POe=`FOLLOWING`,FOe=`CURRENT ROW`,IOe=`UNBOUNDED`,Yk=class extends XD{frameType;extent;exclude;constructor(e,t,n){super(yO),this.frameType=e,this.extent=ek(t)?new FO(t):t,this.exclude=n}},Xk=class extends XD{scope;expr;constructor(e,t=null){super(bO),this.scope=e,this.expr=t}},LOe=class{toString(e){if(!e)throw Error(`Node is null or undefined`);if(typeof e.type!=`string`)throw Error(`Node type is not a string: ${typeof e.type}, value: ${e.type}`);if(e.type===`CUSTOM`)return e.toString(this);let t=this.getVisitMethod(e.type);if(typeof t==`function`)return t.call(this,e);throw Error(`No visitor method for node type: '${e.type}'`)}getVisitMethod(e){switch(e){case hO:return this.visitAggregate;case dO:return this.visitBetween;case uO:return this.visitBinary;case aO:return this.visitCase;case iO:return this.visitCast;
115case sO:return this.visitCollate;case $D:return this.visitColumnParam;case QD:return this.visitColumnRef;case MO:return this.visitCreateQuery;case NO:return this.visitCreateSchemaQuery;case AO:return this.visitDescribeQuery;case uOe:return this.visitExpression;case xO:return this.visitFragment;case DO:return this.visitFromClause;case mO:return this.visitFunction;case`IN`:return this.visitIn;case lOe:return this.visitInterval;case OO:return this.visitJoinClause;case eO:return this.visitList;case cOe:return this.visitLiteral;case pO:return this.visitLogicalOperator;case fO:return this.visitNotBetween;case rO:return this.visitOrderBy;case CO:return this.visitParam;case dOe:return this.visitSampleClause;case PO:return this.visitScalarSubquery;case EO:return this.visitSelectClause;case kO:return this.visitSelectQuery;case jO:return this.visitSetOperation;case sOe:return this.visitTableRef;case tO:return this.visitTuple;case cO:return this.visitUnary;case lO:return this.visitUnaryPostfix;case nO:return this.visitUnnest;case SO:return this.visitVerbatim;case oO:return this.visitWhen;case gO:return this.visitWindow;case TO:return this.visitWindowClause;case vO:return this.visitWindowDef;case bO:return this.visitWindowExtentExpr;case yO:return this.visitWindowFrame;case _O:return this.visitWindowFunction;case wO:return this.visitWithClause;default:throw Error(`Unknown node type: '${e}'`)}}mapToString(e){return e.map(e=>this.toString(e))}},ROe=class extends LOe{visitAggregate(e){let{name:t,args:n,isDistinct:r,filter:i,order:a}=e;return`${t}(${[r?`DISTINCT`:``,n?.length?this.mapToString(n).join(`, `):t.toLowerCase()===`count`?`*`:``,a.length?`ORDER BY ${this.mapToString(a).join(`, `)}`:``].filter(e=>e).join(` `)})${i?` FILTER (WHERE ${this.toString(i)})`:``}`}visitBetween(e){return BOe(this,e,`BETWEEN`)}visitBinary(e){let{left:t,right:n,op:r}=e;return`(${this.toString(t)} ${r} ${this.toString(n)})`}visitCase(e){let{expr:t,_when:n,_else:r}=e;return`CASE `+(t?`${this.toString(t)} `:``)+this.mapToString(n).join(` `)+(r?` ELSE ${this.toString(r)}`:``)+` END`}visitCast(e){let{expr:t,cast:n}=e;return`(${this.toString(t)})::${n}`}visitCollate(e){let{expr:t,collation:n}=e;return`${this.toString(t)} COLLATE ${n}`}visitColumnParam(e){return this.visitColumnRef(e)}visitColumnRef(e){let{column:t,table:n}=e;return`${n?`${this.toString(n)}.`:``}${t===`*`?`*`:uk(t)}`}visitCreateQuery(e){let{name:t,query:n,replace:r,temp:i,view:a}=e;return`CREATE`+(r?` OR REPLACE `:` `)+(i?`TEMP `:``)+(a?`VIEW`:`TABLE`)+(r?` `:` IF NOT EXISTS `)+this.toString(t)+` AS `+this.toString(n)}visitCreateSchemaQuery(e){let{name:t,strict:n}=e;return`CREATE SCHEMA `+(n?``:`IF NOT EXISTS `)+this.toString(t)}visitDescribeQuery(e){let{query:t}=e;return`DESC ${this.toString(t)}`}visitExpression(e){throw Error(`Unexpected EXPRESSION node type. Node: ${JSON.stringify(e)}`)}visitFragment(e){let{spans:t}=e;return t.map(e=>typeof e==`string`?e:this.toString(e)).join(``)}visitFromClause(e){let{expr:t,alias:n,sample:r}=e,i=Vk(t)?`(${this.toString(t)})`:`${this.toString(t)}`;return`${n&&!(sk(t)&&t.table?.join(`.`)===n)?`${i} AS ${uk(n)}`:`${i}`}${r?` TABLESAMPLE ${this.toString(r)}`:``}`}visitFunction(e){let{name:t,args:n}=e;return`${t}(${this.mapToString(n).join(`, `)})`}visitIn(e){let{expr:t,values:n}=e;return`(${this.toString(t)} IN ${this.toString(n)})`}visitInterval(e){let{steps:t,name:n}=e;return`INTERVAL ${t} ${n}`}visitJoinClause(e){let{left:t,right:n,joinVariant:r,joinType:i,condition:a,using:o,sample:s}=e,c=r===`REGULAR`?``:`${r} `,l=``,u=``;r!==`CROSS`&&(l=i===`INNER`?``:`${i} `,u=a?` ON ${this.toString(a)}`:o?` USING (${this.mapToString(o).join(`, `)})`:``);let d=s?` USING SAMPLE ${this.toString(s)}`:``;return`${this.toString(t)} ${c}${l}JOIN ${this.toString(n)}${u}${d}`}visitList(e){let{values:t}=e;return`[${this.mapToString(t).join(`, `)}]`}visitLiteral(e){let{value:t}=e;return rk(t)}visitLogicalOperator(e){let{clauses:t,op:n}=e,r=this.mapToString(t);return r.length===0?``:r.length===1?`${r[0]}`:`(${r.join(` ${n} `)})`}visitNotBetween(e){return BOe(this,e,`NOT BETWEEN`)}visitOrderBy(e){let{expr:t,desc:n,nullsFirst:r}=e,i=n?` DESC`:n===!1?` ASC`:``,a=r?` NULLS FIRST`:r===!1?` NULLS LAST`:``;return`${this.toString(t)}${i}${a}`}visitParam(e){let{param:t}=e;return rk(t.value)}visitSampleClause(e){let{size:t,perc:n,method:r,seed:i}=e,a=r?`${r} `:``,o=i==null?``:` REPEATABLE (${i})`;return`${a}(${t}${n?`%`:` ROWS`})${o}`}visitScalarSubquery(e){return`(${this.toString(e.subquery)})`}visitSelectClause(e){let{expr:t,alias:n}=e;return!n||zOe(t,n)?this.toString(t):`${this.toString(t)} AS ${uk(n)}`}visitSelectQuery(e){let{_with:t,_select:n,_distinct:r,_from:i,_sample:a,_where:o,_groupby:s,_having:c,_window:l,_qualify:u,_orderby:d,_limitPerc:f,_limit:p,_offset:m}=e,h=[];if(t.length&&h.push(`WITH ${this.mapToString(t).join(`, `)}`),h.push(`SELECT${r?` DISTINCT`:``} ${this.mapToString(n).join(`, `)}`),i.length&&h.push(`FROM ${this.mapToString(i).join(`, `)}`),a&&h.push(`USING SAMPLE ${this.toString(a)}`),o.length){let e=this.mapToString(o).filter(e=>e).join(` AND `);e&&h.push(`WHERE ${e}`)}if(s.length&&h.push(`GROUP BY ${this.mapToString(s).join(`, `)}`),c.length){let e=this.mapToString(c).filter(e=>e).join(` AND `);e&&h.push(`HAVING ${e}`)}if(l.length&&h.push(`WINDOW ${this.mapToString(l).join(`, `)}`),u.length){let e=this.mapToString(u).filter(e=>e).join(` AND `);e&&h.push(`QUALIFY ${e}`)}return d.length&&h.push(`ORDER BY ${this.mapToString(d).join(`, `)}
115`),p&&h.push(`LIMIT ${this.toString(p)}${f?`%`:``}`),m!=null&&h.push(`OFFSET ${this.toString(m)}`),h.join(` `)}visitSetOperation(e){let{op:t,queries:n,_with:r,_orderby:i,_limitPerc:a,_limit:o,_offset:s}=e,c=[];return r.length&&c.push(`WITH ${this.mapToString(r).join(`, `)}`),c.push(n.join(` ${t} `)),i.length&&c.push(`ORDER BY ${this.mapToString(i).join(`, `)}`),o&&c.push(`LIMIT ${this.toString(o)}${a?`%`:``}`),s&&c.push(`OFFSET ${this.toString(s)}`),c.join(` `)}visitTableRef(e){let{table:t}=e;return t.map(e=>uk(e)).join(`.`)}visitTuple(e){let{values:t}=e;return`(${this.mapToString(t).join(`, `)})`}visitUnary(e){let{expr:t,op:n}=e;return`(${n} ${this.toString(t)})`}visitUnaryPostfix(e){let{expr:t,op:n}=e;return`(${this.toString(t)} ${n})`}visitUnnest(e){let{expr:t,recursive:n,maxDepth:r}=e,i=[this.toString(t)];return n&&i.push(`recursive := true`),r!=null&&r>0&&i.push(`max_depth := ${r}`),`UNNEST(${i.join(`, `)})`}visitVerbatim(e){let{value:t}=e;return t}visitWhen(e){let{when:t,then:n}=e;return`WHEN ${this.toString(t)} THEN ${this.toString(n)}`}visitWindow(e){let{func:t,def:n}=e;return`${this.toString(t)} OVER ${this.toString(n)}`}visitWindowClause(e){let{name:t,def:n}=e;return`${uk(t)} AS ${this.toString(n)}`}visitWindowDef(e){let{name:t,partition:n,order:r,framedef:i}=e,a=t&&uk(t),o=[a,n?.length&&`PARTITION BY ${this.mapToString(n).join(`, `)}`,r?.length&&`ORDER BY ${this.mapToString(r).join(`, `)}`,i&&this.toString(i)].filter(e=>e);return a&&o.length<2?a:`(${o.join(` `)})`}visitWindowExtentExpr(e){let{scope:t,expr:n}=e;return t===`CURRENT ROW`?t:`${YD(n)?this.toString(n):n??`UNBOUNDED`} ${t}`}visitWindowFrame(e){let{frameType:t,exclude:n,extent:r}=e,[i,a]=YD(r)?r.value:r;return`${t} BETWEEN ${VOe(this,i,NOe)} AND ${VOe(this,a,POe)}${n?` ${n}`:``}`}visitWindowFunction(e){let{name:t,args:n,ignoreNulls:r,order:i}=e;return`${t}(${[this.mapToString(n).join(`, `),i.length?`ORDER BY ${this.mapToString(i).join(`, `)}`:``,r?`IGNORE NULLS`:``].filter(e=>e).join(` `)})`}visitWithClause(e){let{name:t,query:n,materialized:r}=e,i=r===!0?`MATERIALIZED `:r===!1?`NOT MATERIALIZED `:``;return`${uk(t)} AS ${i}(${this.toString(n)})`}};function zOe(e,t){return e instanceof JO&&e.table==null&&e.column===t}function BOe(e,t,n){let{extent:r,expr:i}=t;if(!r)return``;let[a,o]=e.mapToString(r);return`(${e.toString(i)} ${n} ${a} AND ${o})`}function VOe(e,t,n){let r=YD(t)?e.toString(t):t;return YD(t)&&t.type===`WINDOW_EXTENT_EXPR`?r:r!=null&&typeof r!=`number`?`${r} ${n}`:r===0?FOe:r&&Number.isFinite(r)?`${Math.abs(r)} ${n}`:`${IOe} ${n}`}var Zk=new ROe;oOe(Zk);function Qk(e,t){return LO(`arg_max`,e,t)}function $k(e,t){return LO(`arg_min`,e,t)}function HOe(e){return LO(`array_agg`,e)}function UOe(e){return LO(`avg`,e)}function WOe(e,t){return LO(`corr`,e,t)}function eA(e){return LO(`count`,e)}function GOe(e,t){return LO(`covar_samp`,e,t)}function KOe(e,t){return LO(`covar_pop`,e,t)}function qOe(e){return LO(`entropy`,e)}function JOe(e){return LO(`first`,e)}function YOe(e){return LO(`geomean`,e)}function XOe(e){return LO(`kurtosis`,e)}function ZOe(e){return LO(`mad`,e)}function tA(e){return LO(`max`,e)}function QOe(e){return LO(`median`,e)}function nA(e){return LO(`min`,e)}function $Oe(e){return LO(`mode`,e)}function eke(e){return LO(`last`,e)}function tke(e){return LO(`product`,e)}function nke(e,t){return LO(`quantile`,e,t)}function rA(e,t){return LO(`regr_avgx`,e,t)}function iA(e,t){return LO(`regr_avgy`,e,t)}function aA(e,t){return LO(`regr_count`,e,t)}function rke(e,t){return LO(`regr_intercept`,e,t)}function ike(e,t){return LO(`regr_r2`,e,t)}function ake(e,t){return LO(`regr_sxx`,e,t)}function oke(e,t){return LO(`regr_sxy`,e,t)}function ske(e,t){return LO(`regr_syy`,e,t)}function cke(e,t){return LO(`regr_slope`,e,t)}function lke(e){return LO(`skewness`,e)}function uke(e){return LO(`stddev`,e)}function dke(e){return LO(`stddev_pop`,e)}function fke(e){return LO(`string_agg`,e)}function oA(e){return LO(`sum`,e)}function pke(e){return LO(`var_samp`,e)}function mke(e){return LO(`var_pop`,e)}function hke(e,t,n){return e?new wk(void 0,[new Tk(fk(e),fk(t))],fk(n)):new wk}function sA(e,t){return new Ek(fk(e),t)}function cA(e){return sA(e,`INTEGER`)}function gke(e){return sA(e,`FLOAT`)}
115function lA(e){return sA(e,`DOUBLE`)}function _ke(e,t){return new Dk(fk(e),t)}function uA(e,t,n=null){return new Bk(e,t,n)}function dA(e,t){return new Mk(e,t)}function vke(e){return dA(`YEARS`,e)}function yke(e){return dA(`MONTHS`,e)}function bke(e){return dA(`DAYS`,e)}function xke(e){return dA(`HOURS`,e)}function Ske(e){return dA(`MINUTES`,e)}function Cke(e){return dA(`SECONDS`,e)}function wke(e){return dA(`MILLISECONDS`,e)}function Tke(e){return dA(`MICROSECONDS`,e)}function fA(e){return IO(`epoch_ms`,e)}function pA(e,t,n=1){return IO(`time_bucket`,dA(t,n),e)}function Eke(e){return IO(`make_date`,2012,IO(`month`,e),1)}function Dke(e){let t=fk(e);return IO(`make_date`,2012,IO(`month`,t),IO(`day`,t))}function Oke(e){return IO(`make_date`,2012,1,IO(`day`,e))}function kke(e,t){return IO(`timezone`,ak(e),t)}function Ake(e,t,n){return new Ak(hk(e),t,n)}function mA(e){return e instanceof kk?e:hk(e)}function hA(e,t,n,r={}){if(r.on&&r.using)throw Error(`Only one join condition (on or using) can be applied.`);return new Nk(mA(e),mA(t),n,r.type,r.on,r.using?.map(e=>fk(e)))}function jke(e,t){return hA(e,t,`CROSS`)}function Mke(e,t){return hA(e,t,`POSITIONAL`)}function Nke(e,t,n){return hA(e,t,n?.on||n?.using?`REGULAR`:`NATURAL`,n)}function Pke(e,t,n){if(!(n.on||n.using))throw Error(`ASOF join requires a join condition.`);return hA(e,t,`ASOF`,n)}function gA(e){return new Pk(VO(e).map(mk))}function _A(e){return Array.isArray(e)?gA(e):fk(e)}function Fke(e,t){return IO(`list_contains`,_A(e),mk(t))}function vA(e,t){return IO(`list_has_all`,_A(e),_A(t))}function yA(e,t){return IO(`list_has_any`,_A(e),_A(t))}function Ike(e){return IO(`isnan`,e)}function Lke(e){return IO(`isfinite`,e)}function Rke(e){return IO(`isinf`,e)}function bA(...e){return IO(`greatest`,...e)}function zke(...e){return IO(`least`,...e)}function xA(e){return IO(`exp`,e)}function SA(e){return IO(`log`,e)}function CA(e){return IO(`ln`,e)}function wA(e){return IO(`sign`,e)}function TA(e){return IO(`abs`,e)}function EA(e){return IO(`sqrt`,e)}function DA(e){return IO(`ceil`,e)}function OA(e){return IO(`floor`,e)}function kA(e,t){return IO(`round`,e,t)}function Bke(e){return IO(`trunc`,e)}function AA(e,t){return new DOe(e,fk(t))}function jA(e,t){return new OOe(e,fk(t))}function MA(e,t,n){return new Ck(e,fk(t),fk(n))}function NA(...e){return new Ik(BO(e))}function PA(...e){return new Lk(BO(e))}function Vke(e){return AA(`NOT`,e)}function FA(e){return jA(`IS NULL`,e)}function IA(e){return jA(`IS NOT NULL`,e)}function Hke(e){return AA(`~`,e)}function Uke(e,t){return MA(`&`,e,t)}function Wke(e,t){return MA(`|`,e,t)}function Gke(e,t){return MA(`<<`,e,t)}function Kke(e,t){return MA(`>>`,e,t)}function LA(e,t){return MA(`+`,e,t)}function RA(e,t){return MA(`-`,e,t)}function zA(e,t){return MA(`*`,e,t)}function BA(e,t){return MA(`/`,e,t)}function qke(e,t){return MA(`//`,e,t)}function Jke(e,t){return MA(`%`,e,t)}function VA(e,t){return MA(`**`,e,t)}function Yke(e,t){return MA(`=`,e,t)}function HA(e,t){return MA(`<>`,e,t)}function UA(e,t){return MA(`<`,e,t)}function WA(e,t){return MA(`>`,e,t)}function GA(e,t){return MA(`<=`,e,t)}function Xke(e,t){return MA(`>=`,e,t)}function Zke(e,t){return MA(`IS DISTINCT FROM`,e,t)}function KA(e,t){return MA(`IS NOT DISTINCT FROM`,e,t)}function qA(e,t){return new xk(fk(e),t?.map(fk))}function Qke(e,t){return new Sk(fk(e),t?.map(fk))}function JA(e,t){return new jk(fk(e),new TOe(t.map(fk)))}function YA(e,t){let n=fk(e),r=t.map(fk).filter(e=>!(e.type===`LITERAL`&&e.value==null)),i=JA(n,r);return r.length===t.length?i:r.length===0?t.length===0?ak(!1):FA(n):PA(i,FA(n))}function XA(e,t){return new Rk(fk(e),!1,t)}function $ke(e,t){return new Rk(fk(e),!0,t)}function eAe(e){return IO(`st_asgeojson`,e)}function ZA(e){return IO(`st_x`,e)}function QA(e){return IO(`st_y`,e)}function $A(e){return IO(`st_centroid`,e)}function tAe(e){return ZA($A(e))}function nAe(e){return QA($A(e))}function ej(e,...t){return new Ok(rAe(e,t))}function rAe(e,t){let n=[e[0]],r=t.length;for(let i=0,a=0;i<r;){let r=t[i];YD(r)?n[++a]=r:ek(r)?n[++a]=new FO(r):n[a]+=QO(r)?r:`${ak(r)}`;let o=e[++i];YD(n[a])?n[++a]=o:n[a]+=o}return n.filter(e=>e).map(e=>QO(e)?new ik(e):e)}function tj(e,t,...n){return IO(e,t,...VO(n).map(mk))}function nj(e,t,n){return tj(`regexp_matches`,e,t,n)}function rj(e,t){return tj(`contains`,e,t)}function ij(e,t){return tj(`starts_with`,e,t)}function aj(e,t){return tj(`ends_with`,e,t)}function oj(e){return tj(`lower`,e)}function iAe(e){return tj(`upper`,e)}function aAe(e){return tj(`length`,e)}function sj(e,t=!1,n=0){return new kOe(fk(e),t,n)}function cj(...e){return IO(`coalesce`,...e)}function oAe(){return RO(`row_number`)}function sAe(){return RO(`rank`)}function cAe(){return RO(`dense_rank`)}function lAe(){return RO(`percent_rank`)}function uAe(){return RO(`cume_dist`)}function dAe(e){return RO(`ntile`,e)}function fAe(e,t,n){return RO(`lag`,e,t,n)}
115function lj(e,t,n){return RO(`lead`,e,t,n)}function pAe(e){return RO(`first_value`,e)}function mAe(e){return RO(`last_value`,e)}function hAe(e,t){return RO(`nth_value`,e,t)}function gAe(e,t){return new Yk(AOe,e,t)}function _Ae(e,t){return new Yk(jOe,e,t)}function vAe(e,t){return new Yk(MOe,e,t)}function yAe(e){return new Xk(NOe,e)}function bAe(e){return new Xk(POe,e)}function xAe(){return new Xk(FOe)}var uj={[hO]:[`args`,`order`,`filter`],[dO]:[`expr`,`extent`],[uO]:[`left`,`right`],[aO]:[`expr`,`_when`,`_else`],[iO]:[`expr`],[sO]:[`expr`],[$D]:[`param`,`table`],[QD]:[`table`],[MO]:[`name`,`query`],[NO]:[`name`],[AO]:[`query`],[uOe]:[`node`],[xO]:[`spans`],[DO]:[`expr`],[mO]:[`args`],IN:[`expr`,`values`],[OO]:[`left`,`right`,`on`,`using`,`sample`],[eO]:[`values`],[pO]:[`clauses`],[fO]:[`expr`,`extent`],[rO]:[`expr`],[CO]:[`value`],[PO]:[`subquery`],[EO]:[`expr`],[kO]:[`_with`,`_select`,`_from`,`_where`,`_sample`,`_groupby`,`_having`,`_window`,`_qualify`,`_orderby`],[jO]:[`queries`,`_orderby`],[tO]:[`values`],[cO]:[`expr`],[lO]:[`expr`],[nO]:[`expr`],[oO]:[`when`,`then`],[gO]:[`func`,`def`],[TO]:[`def`],[vO]:[`partition`,`order`,`framedef`],[bO]:[`expr`],[yO]:[`extent`],[_O]:[`args`],[wO]:[`query`]};function dj(e){let t=SAe(e);if(YD(e)){let n=uj[e.type],r=n?.length??0;for(let i=0;i<r;++i){let r=n[i],a=e[r];t[r]=Array.isArray(a)?a.map(e=>dj(e)):dj(a)}}return t}function SAe(e){let t;if(!e||typeof e!=`object`)return e;if(YD(e))t=e.clone();else if(e instanceof Date)return new Date(+e);else if(Array.isArray(e))return e.slice();else return{...e};return t}function fj(e,t){if(t.has(e))return t.get(e);if(YD(e)){let n=uj[e.type],r=n?.length??0;if(r>0){e=e.clone();for(let i=0;i<r;++i){let r=n[i],a=e[r];if(Array.isArray(a)){let n=e[r]=a.slice(),i=a.length;for(let e=0;e<i;++e)n[e]=fj(a[e],t)}else a&&(e[r]=fj(a,t))}}}return e}function pj(e,t){return mj(e,void 0,t)}function mj(e,t,n){if(!YD(e))return;let r=n(e,t);if(r)return r;let i=uj[e.type],a=i?.length??0;for(let t=0;t<a;++t){let a=e[i[t]];if(Array.isArray(a)){let t=a.length;for(let i=0;i<t;++i)if(a[i]&&Number(mj(a[i],e,n))<0)return r}else if(a&&Number(mj(a,e,n))<0)return-1}}var CAe=RegExp(`^(${yk.join(`|`)}
115)$`),wAe=/(\\'|\\"|"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|\w+\()/g;function TAe(e){return e.split(wAe).some(e=>e.endsWith(`(`)&&CAe.test(e.slice(0,-1)))}function hj(e){let t=0;return pj(e,(e,n)=>{switch(e.type){case hO:if(n?.type===`WINDOW`)break;return t|=1,-1;case xO:case SO:{let n=`${e}`.toLowerCase(),r=n.indexOf(`(select `);return r>=0&&(n=n.slice(0,r)),n.includes(`) over `)?-1:TAe(n)?(t|=2,-1):1}}}),t}function gj(e){let t=new Set;return pj(e,(e,n)=>{e.type===`AGGREGATE`&&n?.type!==`WINDOW`&&t.add(e)}),Array.from(t)}function _j(e){let t={};return pj(e,e=>{(e.type===`COLUMN_REF`||e.type===`COLUMN_PARAM`)&&(t[`${e}`]=e)}),Object.values(t)}function vj(e){let t=new Set;return pj(e,e=>{e.type===`PARAM`&&t.add(e.param)}),Array.from(t)}function yj(e,t,n={}){return new Kk(e,t,n)}function bj(e,t={}){return new qk(e,t)}function EAe(e){return`INSTALL ${e}; LOAD ${e}`}function DAe(e,{columns:t=Object.keys(e?.[0]||{})}={}){let n=[];if(Array.isArray(t)?(n=t,t=n.reduce((e,t)=>(e[t]=t,e),{})):t&&(n=Object.keys(t)),!n.length)throw Error(`Can not create table from empty column set.`);let r=[];for(let i of e){let e=n.map(e=>`${mk(i[e])} AS "${t[e]}"`);r.push(`(SELECT ${e.join(`, `)})`)}return r.join(` UNION ALL `)}function xj(e,t,n,r={},i={}){let{select:a=[`*`],where:o,view:s,temp:c,replace:l,...u}=r,d=NAe({...i,...u}),f=`${e}('${n}'${d?`, `+d:``})`,p=o?` WHERE ${o}`:``;return yj(t,`SELECT ${a.join(`, `)} FROM ${f}${p}`,{view:s,temp:c,replace:l})}function OAe(e,t,n){return xj(`read_csv`,e,t,n,{auto_detect:!0,sample_size:-1})}function kAe(e,t,n){return xj(`read_json`,e,t,n,{auto_detect:!0,format:`auto`})}function AAe(e,t,n){return xj(`read_parquet`,e,t,n)}function jAe(e,t,n={}){let{options:r,...i}=n;if(r){let e=Array.isArray(r)?r.join(`, `):typeof r==`string`?r:Object.entries(r).map(([e,t])=>`${e}=${t}`).join(`, `);Object.assign(i,{open_options:e.toUpperCase()})}return xj(`st_read`,e,t,i)}function MAe(e,t,n={}){let{select:r=[`*`],...i}=n,a=DAe(t);return yj(e,r.length===1&&r[0]===`*`?a:`SELECT ${r} FROM ${a}`,i)}function NAe(e){return Object.entries(e).map(([e,t])=>`${e}=${Sj(t)}`).join(`, `)}function Sj(e){switch(typeof e){case`boolean`:return String(e);case`string`:return`'${e}'`;case`undefined`:case`object`:return e==null?`NULL`:Array.isArray(e)?`[`+e.map(e=>Sj(e)).join(`, `)+`]`:`{`+Object.entries(e).map(([e,t])=>`'${e}': ${Sj(t)}`).join(`, `)+`}`;default:return`${e}`}}function PAe(e,t,n,r,i=!1){let a=i?RA(n,lA(e)):RA(lA(e),t),o=n===t?0:r/(n-t);return o?zA(a,lA(o)):a}function FAe(e,t,n,r,i,a){return e.select({index:LA(cA(OA(t)),zA(cA(OA(n)),i)),...r}).groupby(`index`,a)}function IAe(e,t,n){let{step:r,steps:i=25}=n,{minstep:a=0,nice:o=!0,base:s}=n;if(o!==!1){let n=t-e,o=s?Math.log(s):Math.LN10;r||=Cj(n,i,a,o);let c=Math.log(r),l=10**(-(c>=0?0:~~(-c/o)+1)-1);c=Math.floor(e/r+l)*r,e=e<c?c-r:c,t=Math.ceil(t/r)*r,i=Math.round((t-e)/r)}return{min:e,max:t,steps:i}}function Cj(e,t,n=0,r=Math.LN10){let i,a=Math.ceil(Math.log(t)/r),o=Math.max(n,10**(Math.round(Math.log(e)/r)-a));for(;Math.ceil(e/o)>t;)o*=10;let s=[5,2];for(let r=0,a=s.length;r<a;++r)i=o/s[r],i>=n&&e/i<=t&&(o=i);return o}var LAe=`year`,RAe=`month`,wj=`day`,Tj=`hour`,Ej=`minute`,Dj=`second`,zAe=`millisecond`,BAe=`microsecond`,Oj=1e3,kj=Oj*60,Aj=kj*60,jj=Aj*24,VAe=jj*7,HAe=jj*30,UAe=jj*365,Mj=[{unit:Dj,step:1,dt:Oj},{unit:Dj,step:5,dt:Oj*5},{unit:Dj,step:15,dt:Oj*15},{unit:Dj,step:30,dt:Oj*30},{unit:Ej,step:1,dt:kj},{unit:Ej,step:5,dt:kj*5},{unit:Ej,step:15,dt:kj*15},{unit:Ej,step:30,dt:kj*30},{unit:Tj,step:1,dt:Aj},{unit:Tj,step:3,dt:Aj*3},{unit:Tj,step:6,dt:Aj*6},{unit:Tj,step:12,dt:Aj*12},{unit:wj,step:1,dt:jj},{unit:wj,step:7,dt:VAe},{unit:RAe,step:1,dt:HAe},{unit:RAe,step:3,dt:HAe*3},{unit:LAe,step:1,dt:UAe}];function WAe(e,t,n){let r=t-+e;if(r===0)return{unit:wj,step:1};let i=r/n,a=GAe(Mj,i,e=>e.dt),o,s;return a===Mj.length?(o=LAe,s=Cj(r/UAe,n)):a?{unit:o,step:s}=Mj[i/Mj[a-1].dt<Mj[a].dt/i?a-1:a]:(s=Cj(r,n),o=s>=1?zAe:BAe,s=s>=1?s:s*1e3),{unit:o,step:s}}function GAe(e,t,n){let r=(e,t)=>Number(e)-Number(t),i=(e,t)=>r(n(e),t),a=0,o=e.length;if(a<o){if(r(t,t)!==0)return o;do{let n=a+o>>>1;i(e[n],t)<=0?a=n+1:o=n}while(a<o)}return a}function KAe(e,t,n={}){let{offset:r=0}=n,{unit:i,step:a=1}
115=n.interval?{unit:n.interval,step:n.step}:WAe(t[0],t[1],n.steps||40),o=pA(e,i,a);return r?LA(o,dA(i,r*a)):o}function Nj(e){return e}function qAe(){return{apply:Nj,invert:Nj,sqlApply:fk,sqlInvert:Nj}}function JAe({base:e=null}={}){if(e==null||e===Math.E)return{apply:Math.log,invert:Math.exp,sqlApply:e=>CA(e),sqlInvert:e=>xA(e)};if(e===10)return{apply:Math.log10,invert:e=>10**e,sqlApply:e=>SA(e),sqlInvert:e=>VA(10,e)};{let t=+e;return{apply:e=>Math.log(e)/Math.log(t),invert:e=>t**+e,sqlApply:e=>BA(CA(e),CA(t)),sqlInvert:e=>VA(t,e)}}}function YAe({constant:e=1}={}){let t=+e;return{apply:e=>Math.sign(e)*Math.log1p(Math.abs(e)),invert:e=>Math.sign(e)*Math.exp(Math.abs(e)-t),sqlApply:e=>(e=fk(e),zA(wA(e),CA(LA(t,TA(e))))),sqlInvert:e=>zA(wA(e),RA(xA(TA(e)),t))}}function XAe(){return{apply:e=>Math.sign(e)*Math.sqrt(Math.abs(e)),invert:e=>Math.sign(e)*e*e,sqlApply:e=>(e=fk(e),zA(wA(e),EA(TA(e)))),sqlInvert:e=>zA(wA(e),VA(e,2))}}function ZAe({exponent:e=1}={}){let t=+e;return{apply:e=>Math.sign(e)*Math.abs(e)**+t,invert:e=>Math.sign(e)*Math.abs(e)**(1/t),sqlApply:e=>(e=fk(e),zA(wA(e),VA(TA(e),t))),sqlInvert:e=>zA(wA(e),VA(TA(e),BA(1,t)))}}function QAe(){return{apply:e=>Number(e),invert:e=>new Date(e),sqlApply:e=>e instanceof Date?ak(+e):eje(e)?ak(Number(e.value)):fA(e),sqlInvert:Nj}}var $Ae={identity:qAe,linear:qAe,log:JAe,symlog:YAe,sqrt:XAe,pow:ZAe,time:QAe,utc:QAe};function Pj(e){let t=$Ae[e.type];if(!t)throw Error(`Unrecognized scale type: ${e.type}`);return{...e,...t(e)}}function eje(e){return e instanceof nk&&e.value instanceof Date}function tje(e,t,n={},r=Pj({type:`linear`})){let[i,a]=t,{offset:o=0}=n;if(a===i)return o?LA(o,OA(e)):OA(e);let{apply:s,sqlApply:c,sqlInvert:l}=r,u=IAe(s(i),s(a),n),d=c(e),f=(u.max-u.min)/u.steps||1,p=u.min===0?d:RA(d,u.min);return f!==1&&(p=BA(p,lA(f))),p=o?LA(o,OA(p)):OA(p),f!==1&&(p=zA(f,p)),u.min!==0&&(p=LA(u.min,p)),l(p)}function nje(e,t,n=void 0,r=[]){let i=n?(e=>zA(e,n)):(e=>e),a=OA(t),o=LA(a,1);return Uk.from(Uk.unionAll(e.clone().select({i:cA(a),w:i(RA(o,t))}),e.clone().select({i:cA(o),w:i(RA(t,a))}))).select({index:`i`,density:oA(`w`)},r).groupby(`index`,r).having(HA(`density`,0))}function rje(e,t,n,r,i,a=[]){let o=r?e=>zA(e,r):Nj,s=(r,i)=>e.clone().select({xp:t,yp:n,i:r,w:i}),c=(e,t)=>LA(e,zA(t,i)),l=cA(OA(t)),u=cA(OA(n)),d=LA(l,1),f=LA(u,1),p=RA(t,l),m=RA(d,t),h=RA(n,u),g=RA(f,n);return Uk.from(Uk.unionAll(s(c(l,u),o(zA(m,g))),s(c(l,f),o(zA(m,h))),s(c(d,u),o(zA(p,g))),s(c(d,f),o(zA(p,h))))).select({index:`i`,density:oA(`w`)},a).groupby(`index`,a).having(HA(`density`,0))}function ije(e,t,n){let r=dj(e),i=hk(t);return pj(r,e=>{Hk(e)&&e._from.length===1&&e._from[0]instanceof Ak&&sk(e._from[0].expr)&&oje(e._from[0].expr.table,i.table)&&e.where(n)}),r}function aje(e,t){return n=>ije(e,t,n)}function oje(e,t){if(e===t)return!0;if(e==null||t==null||e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0}function sje(e,t,n,r,i,a,o=[],s=!0){e.select({x:cA(OA(t)),y:cA(OA(n))});let c=o.concat(r),l=Uk.from(e).select(c,{x0:`x`,y0:`y`,dx:RA(lj(`x`).over(`sw`),`x`),dy:RA(lj(`y`).over(`sw`),`y`)}).window({sw:_k().partitionby(c).orderby(XA(`x`))}).qualify([PA(UA(`x0`,i),UA(LA(`x0`,`dx`),i)),PA(UA(`y0`,a),UA(LA(`y0`,`dy`),a)),PA(WA(`x0`,0),WA(LA(`x0`,`dx`),0)),PA(WA(`y0`,0),WA(LA(`y0`,`dy`),0))]),u=Uk.select({x:bA(tA(TA(`dx`)),tA(TA(`dy`)))}).from(`pairs`),d=Uk.select({i:cA(ej`UNNEST(range((${u})))`)}),f=Uk.unionAll(Uk.select(c,{x:LA(`x0`,`i`),y:LA(`y0`,cA(kA(BA(zA(`i`,`dy`),`dx`))))}).from(`pairs`,`indices`).where([GA(TA(`dy`),TA(`dx`)),UA(`i`,TA(`dx`))]),Uk.select(c,{x:LA(`x0`,cA(kA(BA(zA(zA(wA(`dy`),`i`),`dx`),`dy`)))),y:LA(`y0`,zA(wA(`dy`),`i`))}).from(`pairs`,`indices`).where([WA(TA(`dy`),TA(`dx`)),UA(`i`,TA(`dy`))]),Uk.select(c,{x:`x0`,y:`y0`}).from(`pairs`).where(FA(`dx`))),p=Uk.from(`raster`).select(c,`x`,`y`,s?{w:BA(1,eA().partitionby([`x`].concat(c)))}:null).where([GA(0,`x`),UA(`x`,i),GA(0,`y`),UA(`y`,a)]);return Uk.with({pairs:l,indices:d,raster:f,points:p}).from(`points`).select(o,{index:LA(`x`,zA(`y`,cA(i))),density:s?oA(`w`):eA()}).groupby(`index`,o)}function cje(e,t,n,r,i=[]){let a=cA(OA(t)),o=Vk(e),s=o?`input`:e,c=o?Uk.with(uA(String(s),e,!0)):Uk,l=e=>Uk.from(s).select(e).groupby(a,i);return c.union(l([{[n]:nA(n),[r]:$k(r,n)},...i]),l([{[n]:tA(n),[r]:Qk(r,n)},...i]),l([{[n]:$k(n,r),[r]:nA(r)},...i]),l([{[n]:Qk(n,r),[r]:tA(r)},...i])).orderby(i,n)}var lje=s({AggregateNode:()=>vk,AndNode:()=>Ik,BetweenOpNode:()=>xk,BinaryOpNode:()=>Ck,CaseNode:()=>wk,CastNode:()=>Ek,CollateNode:()=>
115Dk,ColumnNameRefNode:()=>YO,ColumnParamNode:()=>ZO,ColumnRefNode:()=>JO,CreateQuery:()=>Kk,CreateSchemaQuery:()=>qk,DescribeQuery:()=>Gk,DuckDBCodeGenerator:()=>ROe,ExprNode:()=>ZD,FragmentNode:()=>Ok,FromClauseNode:()=>Ak,FunctionNode:()=>fOe,InOpNode:()=>jk,IntervalNode:()=>Mk,JoinNode:()=>Nk,ListNode:()=>Pk,LiteralNode:()=>nk,LogicalOpNode:()=>Fk,NotBetweenOpNode:()=>Sk,OrNode:()=>Lk,OrderByNode:()=>Rk,ParamNode:()=>FO,Query:()=>Uk,SQLCodeGenerator:()=>LOe,SQLNode:()=>XD,SampleClauseNode:()=>zk,ScalarSubqueryNode:()=>wOe,SelectClauseNode:()=>yOe,SelectQuery:()=>Wk,SetOperation:()=>Jk,TableRefNode:()=>ck,TupleNode:()=>TOe,UnaryOpNode:()=>DOe,UnaryPostfixOpNode:()=>OOe,UnnestNode:()=>kOe,VerbatimNode:()=>ik,WhenNode:()=>Tk,WindowClauseNode:()=>HO,WindowDefNode:()=>GO,WindowFrameExprNode:()=>Xk,WindowFrameNode:()=>Yk,WindowFunctionNode:()=>WO,WindowNode:()=>UO,WithClauseNode:()=>Bk,abs:()=>TA,add:()=>LA,aggregateNames:()=>yk,and:()=>NA,argmax:()=>Qk,argmin:()=>$k,arrayAgg:()=>HOe,asLiteral:()=>mk,asNode:()=>fk,asTableRef:()=>hk,asVerbatim:()=>pk,asc:()=>XA,asof_join:()=>Pke,avg:()=>UOe,bin1d:()=>PAe,bin2d:()=>FAe,binDate:()=>KAe,binHistogram:()=>tje,binLinear1d:()=>nje,binLinear2d:()=>rje,binSpec:()=>IAe,binStep:()=>Cj,bitAnd:()=>Uke,bitLeft:()=>Gke,bitNot:()=>Hke,bitOr:()=>Wke,bitRight:()=>Kke,cast:()=>sA,ceil:()=>DA,centroid:()=>$A,centroidX:()=>tAe,centroidY:()=>nAe,coalesce:()=>cj,collate:()=>_ke,collectAggregates:()=>gj,collectColumns:()=>_j,collectParams:()=>vj,column:()=>tk,cond:()=>hke,contains:()=>rj,corr:()=>WOe,count:()=>eA,covarPop:()=>KOe,covariance:()=>GOe,createSchema:()=>bj,createTable:()=>yj,cross_join:()=>jke,cte:()=>uA,cume_dist:()=>uAe,currentRow:()=>xAe,dateBin:()=>pA,dateDay:()=>Oke,dateMonth:()=>Eke,dateMonthDay:()=>Dke,days:()=>bke,deepClone:()=>dj,dense_rank:()=>cAe,desc:()=>$ke,div:()=>BA,duckDBCodeGenerator:()=>Zk,entropy:()=>qOe,epoch_ms:()=>fA,eq:()=>Yke,exp:()=>xA,filterPushdown:()=>ije,filterQuery:()=>aje,first:()=>JOe,first_value:()=>pAe,float32:()=>gke,float64:()=>lA,floor:()=>OA,following:()=>bAe,frameGroups:()=>vAe,frameRange:()=>_Ae,frameRows:()=>gAe,from:()=>Ake,geojson:()=>eAe,geomean:()=>YOe,greatest:()=>bA,gt:()=>WA,gte:()=>Xke,hours:()=>xke,idiv:()=>qke,int32:()=>cA,interval:()=>dA,isAggregateExpression:()=>hj,isAggregateFunction:()=>vOe,isBetween:()=>qA,isColumnParam:()=>XO,isColumnRef:()=>qO,isCreateQuery:()=>xOe,isCreateSchemaQuery:()=>SOe,isDescribeQuery:()=>bOe,isDistinct:()=>Zke,isFinite:()=>Lke,isIn:()=>JA,isInDistinct:()=>YA,isInfinite:()=>Rke,isNaN:()=>Ike,isNode:()=>YD,isNotBetween:()=>Qke,isNotDistinct:()=>KA,isNotNull:()=>IA,isNull:()=>FA,isParamLike:()=>ek,isQuery:()=>Vk,isSelectQuery:()=>Hk,isTableRef:()=>sk,join:()=>Nke,kurtosis:()=>XOe,lag:()=>fAe,last:()=>eke,last_value:()=>mAe,lead:()=>lj,least:()=>zke,length:()=>aAe,lineDensity:()=>sje,list:()=>gA,listContains:()=>Fke,listHasAll:()=>
115vA,listHasAny:()=>yA,literal:()=>ak,ln:()=>CA,loadCSV:()=>OAe,loadExtension:()=>EAe,loadJSON:()=>kAe,loadObjects:()=>MAe,loadParquet:()=>AAe,loadSpatial:()=>jAe,log:()=>SA,lower:()=>oj,lt:()=>UA,lte:()=>GA,m4:()=>cje,mad:()=>ZOe,max:()=>tA,median:()=>QOe,microseconds:()=>Tke,milliseconds:()=>wke,min:()=>nA,minutes:()=>Ske,mod:()=>Jke,mode:()=>$Oe,months:()=>yke,mul:()=>zA,neq:()=>HA,not:()=>Vke,nth_value:()=>hAe,ntile:()=>dAe,or:()=>PA,over:()=>_k,parseColumnRef:()=>gOe,parseTableRef:()=>_Oe,percent_rank:()=>lAe,positional_join:()=>Mke,pow:()=>VA,preceding:()=>yAe,prefix:()=>ij,product:()=>tke,quantile:()=>nke,rank:()=>sAe,regexp_matches:()=>nj,regrAvgX:()=>rA,regrAvgY:()=>iA,regrCount:()=>aA,regrIntercept:()=>rke,regrR2:()=>ike,regrSXX:()=>ake,regrSXY:()=>oke,regrSYY:()=>ske,regrSlope:()=>cke,rewrite:()=>fj,round:()=>kA,row_number:()=>oAe,scaleTransform:()=>Pj,seconds:()=>Cke,sign:()=>wA,skewness:()=>lke,sql:()=>ej,sqrt:()=>EA,stddev:()=>uke,stddevPop:()=>dke,stringAgg:()=>fke,sub:()=>RA,suffix:()=>aj,sum:()=>oA,timeInterval:()=>WAe,timezone:()=>kke,trunc:()=>Bke,unnest:()=>sj,upper:()=>iAe,varPop:()=>mke,variance:()=>pke,verbatim:()=>ok,walk:()=>pj,x:()=>ZA,y:()=>QA,years:()=>vke});function uje(e){let t=2166136261;for(let n=0,r=e.length;n<r;++n){let r=e.charCodeAt(n),i=r&65280;i&&(t=dje(t^i>>8)),t=dje(t^r&255)}return fje(t)>>>0}function dje(e){return e+(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24)}function fje(e){return e+=e<<13,e^=e>>>7,e+=e<<3,e^=e>>>17,e+=e<<5,e&4294967295}function pje(e,t,n){switch(e.name){case`count`:case`count_star`:return hje(t,e);case`sum`:return gje(t,e);case`avg`:return _je(t,e);case`geomean`:return vje(t,e);case`arg_max`:return yje(t,e);case`arg_min`:return bje(t,e);case`variance`:case`var_samp`:return Lj(t,e,n);case`var_pop`:return Lj(t,e,n,!1);case`stddev`:case`stddev_samp`:return EA(Lj(t,e,n));case`stddev_pop`:return EA(Lj(t,e,n,!1));case`covar_samp`:return Rj(t,e,n);case`covar_pop`:return Rj(t,e,n,!1);case`corr`:return xje(t,e,n);case`regr_count`:return zj(t,e).expr;case`regr_avgx`:return Cje(t,e);case`regr_avgy`:return wje(t,e);case`regr_syy`:return Hj(t,0,e,n);case`regr_sxx`:return Hj(t,1,e,n);case`regr_sxy`:return Rj(t,e,n,null);case`regr_slope`:return Tje(t,e,n);case`regr_intercept`:return Eje(t,e,n);case`regr_r2`:return VA(xje(t,e,n),2);case`max`:case`min`:case`bit_and`:case`bit_or`:case`bit_xor`:case`bool_and`:case`bool_or`:case`product`:{let n=mje(e);return t[n]=e,ej`${e.name}("${n}")`}default:return null}}function mje(e){return`pre_`+uje(`${e}`).toString(16)}function Fj(e,t,n){let r=n?.filter;r&&(t=t.filter?t.where(NA(r,t.filter)):t.where(r));let i=mje(t);return e[i]=t,i}function Ij(e,t){let n=Fj(e,eA(t.args[0]),t);return{expr:cj(oA(n),0),name:n}}function hje(e,t){return cj(gje(e,t),0)}function gje(e,t){return oA(Fj(e,t))}function _je(e,t){let n=Fj(e,t),{expr:r,name:i}=Ij(e,t);return BA(oA(zA(n,i)),r)}function vje(e,t){let n=t.args[0],r=Fj(e,oA(CA(n)),t),{expr:i}=Ij(e,t);return xA(BA(oA(r),i))}function yje(e,t){return Qk(Fj(e,t),Fj(e,tA(t.args[1]),t))}function bje(e,t){return $k(Fj(e,t),Fj(e,nA(t.args[1]),t))}function Lj(e,t,n,r=!0){let i=t.args[0],{expr:a}=Ij(e,t),o=RA(i,n(i)),s=Fj(e,oA(VA(o,2)),t),c=Fj(e,oA(o),t),l=r?RA(a,1):a;return BA(RA(oA(s),BA(VA(oA(c),2),a)),l)}function Rj(e,t,n,r=!0){let{expr:i}=zj(e,t),a=RA(Sje(e,t,n),BA(zA(Bj(e,1,t,n),Bj(e,0,t,n)),i));return r===null?a:r?BA(a,RA(i,1)):BA(a,i)}function xje(e,t,n){let{expr:r}=zj(e,t),i=Sje(e,t,n),a=Vj(e,1,t,n),o=Vj(e,0,t,n),s=Bj(e,1,t,n),c=Bj(e,0,t,n),l=RA(a,BA(VA(s,2),r)),u=RA(o,BA(VA(c,2),r));return BA(RA(i,BA(zA(s,c),r)),EA(zA(l,u)))}function zj(e,t){let[n,r]=t.args,i=Fj(e,aA(n,r),t);return{expr:oA(i),name:i}}function Bj(e,t,n,r){let i=n.args,a=i[t],o=i[1-t];return oA(Fj(e,oA(RA(a,r(a))).where(IA(o)),n))}function Vj(e,t,n,r){let i=n.args,a=i[t],o=i[1-t];return oA(Fj(e,oA(VA(RA(a,r(a)),2)).where(IA(o)),n))}function Sje(e,t,n){let[r,i]=t.args;return oA(Fj(e,oA(zA(RA(i,n(i)),RA(r,n(r)))),t))}function Cje(e,t){let[n,r]=t.args,{expr:i,name:a}=zj(e,t);return BA(oA(zA(Fj(e,rA(n,r),t),a)),i)}function wje(e,t){let[n,r]=t.args,{expr:i,name:a}=zj(e,t);return BA(oA(zA(Fj(e,iA(n,r),t),a)),i)}function Hj(e,t,n,r){let{expr:i}
115=zj(e,n),a=Bj(e,t,n,r);return RA(Vj(e,t,n,r),BA(VA(a,2),i))}function Tje(e,t,n){return BA(Rj(e,t,n,null),Hj(e,1,t,n))}function Eje(e,t,n){let r=Cje(e,t);return RA(wje(e,t),zA(Tje(e,t,n),r))}function Dje(e){if(!e.filterStable)return null;let t=e.query();if(!Hk(t))return null;let n=Uj(t,e=>{let t=e._from[0],n=t instanceof Ak&&t.expr;return sk(n)?n.name:n});if(typeof n!=`string`)return null;let r=new Map,i={},a={},o={};for(let e of t._groupby)if(e.type!==`LITERAL`){let t=qO(e)?e.column:`${e}`;o[t]=e}let s=new Set(Object.keys(o)),c=e=>{let r=e.column;return ej`(SELECT avg(${Uj(t,e=>e._select.find(e=>e.alias===r)?.expr)??e}) FROM "${n}")`};for(let{alias:e,expr:n}of t._select){if(hj(n)>1)return null;let t=gj(n);if(t.length===0)s.add(e),i[e]=n;else{for(let e of t){if(e.isDistinct)return null;let t=pje(e,i,c);if(!t)return null;r.set(e,t)}a[e]=fj(n,r)}}return r.size?{dims:Array.from(s),groupby:o,preagg:i,output:a}:null}function Uj(e,t){let n=e.subqueries;if(Hk(e)&&n.length===0)return t(e);let r=Uj(n[0],t);for(let e=1;e<n.length;++e){let i=Uj(n[e],t);if(i!==void 0&&i!==r)return NaN}return r}var Oje={skip:!0,result:null},kje=class{entries;active;mc;_schema;_enabled;constructor(e,{schema:t=`mosaic`,enabled:n=!0}={}){this.entries=new Map,this.active=null,this.mc=e,this._schema=t,this._enabled=n}set enabled(e){this._enabled!==e&&(e||this.clear(),this._enabled=e)}get enabled(){return this._enabled}set schema(e){this._schema!==e&&(this.clear(),this._schema=e)}get schema(){return this._schema}dropSchema(){return this.clear(),this.mc.exec(`DROP SCHEMA IF EXISTS "${this.schema}" CASCADE`)}clear(){this.entries.clear(),this.active=null}request(e,t,n){if(!this.enabled||n==null)return null;let{entries:r,mc:i,schema:a}=this,{source:o}=n;if(!o||this.active&&(this.active.source!==o&&this.clear(),this.active?.source===null))return null;let{active:s}=this;if(!s&&(n.predicate==null||(this.active=s=Aje(n),s.source===null)))return null;if(r.has(e))return r.get(e);let c=Dje(e),l;if(!c)l=null;else if(t.skip(e,n))l=Oje;else{let n=t.remove(o).predicate(e);l=Nje(e.query(n),s,c,a),l.result=i.exec([bj(a),yj(l.table,l.create,{temp:!1})]),l.result.catch(e=>i.logger().error(e))}return r.set(e,l),l}};function Aje(e){let{source:t,meta:n}=e,r=e.predicate,i=_j(r).map(e=>e.column),a,o;if(!n||!i)return{source:null,columns:o,predicate:a};switch(n.type){case`point`:a=e=>e,o=Object.fromEntries(i.map(e=>[`${e}`,fk(e)]));break;case`interval`:{let{scales:e,bin:t,pixelSize:i=1}=n;if(!e)break;let s=e.map(e=>Mje(e,i,t));s.some(e=>!e)||(s.length===1?(a=e=>e?qA(`active0`,e.extent?.map(s[0])):[],o={active0:s[0](r.expr)}):(a=e=>e?NA(e.clauses.map((e,t)=>qA(`active${t}`,e.extent?.map(s[t])))):[],o=Object.fromEntries(r.clauses.map((e,t)=>[`active${t}`,s[t](e.expr)]))))}}return{source:o?t:null,columns:o,predicate:a}}var jje={ceil:DA,round:kA};function Mje(e,t,n){let{type:r,domain:i,range:a,apply:o,sqlApply:s}=Pj(e);if(!o)return;let c=jje[`${n}`.toLowerCase()]||OA,l=i.map(e=>Number(e)),u=o(Math.min(...l)),d=o(Math.max(...l)),f=(r===`identity`?1:Math.abs(a[1]-a[0])/(d-u))/t,p=f===1?e=>e:e=>zA(lA(f),e),m=u===0?e=>e:e=>RA(e,lA(u));return e=>cA(c(p(m(s(e)))))}function Nje(e,t,n,r){let{dims:i,groupby:a,output:o,preagg:s}=n,{columns:c={}}=t,l=Uk.from(e._from).with(e._with).sample(e._sample).where(e._where).select({...a,...s,...c}).groupby(i,Object.keys(c)),[u]=l.subqueries;u&&Fje(u,Object.values(c).flatMap(e=>_j(e).map(e=>e.column)));let d=new ck([r,`preagg_${(uje(l.toString())>>>0).toString(16)}`]),f=e.clone().setSelect(i,o).setFrom(d).setGroupby(i).setOrderby(Pje(e._orderby,e._select)).sample(null);return f._with=[],f.setWhere(),new Lje({table:d,create:l,active:t,select:f})}function Pje(e,t){return e.flatMap(e=>{if(e.type===`ORDER_BY`){let n=e.expr;if(n.type===`LITERAL`){let r=t[n.value-1];if(r){let t=e.clone();return t.expr=fk(r.alias),t}else return[]}}else if(e.type===`LITERAL`){let n=t[e.value-1];return n?fk(n.alias):[]}return e})}function Fje(e,t){let n=new Set,r=e=>{if(!n.has(e)){if(n.add(e),Hk(e)&&e._from.length&&(e.select(t),Ije(e))){let n=new Set(e._groupby.flatMap(e=>e instanceof YO?[e.name]:[]));e.groupby(t.filter(e=>!n.has(e)))}
115e.subqueries.forEach(r)}};r(e)}function Ije(e){return e._groupby.length>0||e._select.some(e=>hj(e))}var Lje=class{table;create;result;active;select;skip;constructor({table:e,create:t,active:n,select:r}){this.table=e,this.create=t,this.result=null,this.active=n,this.select=r,this.skip=!1}query(e){return this.select.clone().where(this.active.predicate(e))}};function Wj(){return{debug(){},info(){},log(){},warn(){},error(){},group(){},groupCollapsed(){},groupEnd(){}}}var Gj=Object.freeze({pending:Symbol(`pending`),ready:Symbol(`ready`),error:Symbol(`error`),done:Symbol(`done`)}),Kj=class extends Promise{_resolve;_reject;_state;_value;constructor(){let e,t;super((n,r)=>{e=n,t=r}),this._resolve=e,this._reject=t,this._state=Gj.pending,this._value=void 0}fulfill(e){if(this._value!==void 0){if(e!==void 0)throw Error(`Promise is ready and fulfill has a provided value`);this._resolve(this._value)}else if(e===void 0)throw Error(`Promise is neither ready nor has provided value`);else this._resolve(e);return this._state=Gj.done,this}ready(e){return this._state=Gj.ready,this._value=e,this}reject(e){return this._state=Gj.error,this._reject(e),this}get state(){return this._state}};Kj.prototype.constructor=Promise;function Rje(e){return typeof requestAnimationFrame<`u`?requestAnimationFrame(e):typeof setImmediate<`u`?setImmediate(e):setTimeout(e)}function zje(e,t){let n=[],r=0;function i(){let i=Bje(n,t);n=[],r=0;for(let n of i)Hje(n,e),Gje(n,t)}return{add(t,a){t.request.type===`arrow`?(r||=Rje(()=>i()),n.push({entry:t,priority:a,index:n.length})):e(t,a)}}}function Bje(e,t){let n=[],r=new Map;for(let i of e){let{entry:{request:e}}=i,a=Vje(e.query,t);if(!r.has(a)){let e=[];n.push(e),r.set(a,e)}r.get(a).push(i)}return n}function Vje(e,t){if(Array.isArray(e))return e.map(e=>Vje(e,t)).join(`; 116`);let n=`${e}`;if(Hk(e)&&!t.get(n)){if(e._where.length||e._qualify.length||e._having.length||e._orderby.length||e._distinct)return n;let t=e.clone().setSelect(`*`),r=e._groupby;if(r.length){let n={};e._select.forEach(({alias:e,expr:t})=>n[e]=t),t.setGroupby(r.map(e=>qO(e)&&n[e.column]||e))}else e._select.some(e=>hj(e.expr))&&t.setGroupby(`ALL`);return`${t}`}else return n}function Hje(e,t){if(Uje(e))t({request:{type:`arrow`,cache:!1,query:e.query=Wje(e)},result:e.result=new Kj});else for(let{entry:n,priority:r}of e)t(n,r)}function Uje(e){if(e.length>1){let t=`${e[0].entry.request.query}`;for(let n=1;n<e.length;++n)if(t!==`${e[n].entry.request.query}`)return!0}return!1}function Wje(e){let t=e.maps=[],n=new Map;for(let r of e){let e=r.entry.request.query,i=[];t.push(i);for(let{alias:t,expr:r}of e._select){let e=`${r}`;n.has(e)||n.set(e,[`col${n.size}`,r]);let[a]=n.get(e);i.push([a,t])}}let r=e[0].entry.request.query.clone(),i=r._groupby;if(i.length){let t={};e.maps[0].forEach(([e,n])=>t[n]=e),r.setGroupby(i.map(e=>qO(e)&&t[e.column]||e))}return r.setSelect(Array.from(n.values()))}async function Gje(e,t){let{maps:n,query:r,result:i}=e;if(!n)return;let a;try{a=await i}catch(t){for(let{entry:n}of e)n.result.reject(t);return}let o=bOe(r);e.forEach(({entry:e},r)=>{let{request:i,result:s}=e,c=n[r],l=o&&c?qje(a,c):c?Kje(a,c):a;i.cache&&t.set(String(i.query),l),s.fulfill(l)})}function Kje(e,t){return e.select(t.map(e=>e[0]),t.map(e=>e[1]))}function qje(e,t){let n=new Map(t),r=[];for(let t of e)n.has(t.column_name)&&r.push({...t,column_name:n.get(t.column_name)});return r}var Jje=typeof requestIdleCallback<`u`?requestIdleCallback:setTimeout;function Yje(){return{get:()=>void 0,set:(e,t)=>t,clear:()=>{}}}function Xje({max:e=1e3,ttl:t=10800*1e3}={}){let n=new Map;function r(){let e=performance.now()-t,r=null,i=1/0;for(let[t,a]of n){let{last:o}=a;o<i&&(r=t,i=o),e>o&&n.delete(t)}r&&n.delete(r)}return{get(e){let t=n.get(e);if(t)return t.last=performance.now(),t.value},set(t,i){return n.set(t,{last:performance.now(),value:i}),n.size>e&&Jje(r),i},clear(){n=new Map}}}var Zje=class{queue;constructor(e){this.queue=Array.from({length:e},()=>({head:null,tail:null}))}isEmpty(){return this.queue.every(e=>!e.head)}insert(e,t){let n=this.queue[t];if(!n)throw Error(`Invalid queue priority rank: ${t}`);let r={item:e,next:null};n.head===null?n.head=n.tail=r:n.tail=n.tail.next=r}remove(e){for(let t of this.queue){let{head:n,tail:r}=t;for(let t=null,i=n;i;
116t=i,i=i.next)e(i.item)&&(i===n?n=i.next:t.next=i.next,i===r&&(r=t||n));t.head=n,t.tail=r}}next(){for(let e of this.queue){let{head:t}=e;if(t!==null)return e.head=t.next,e.tail===t&&(e.tail=null),t.item}}},qj=Object.freeze({High:0,Normal:1,Low:2}),Qje=class{queue;db;clientCache;_logger;_logQueries;_consolidate;pendingResults;maxConcurrentRequests;pendingExec;constructor(e=32){this.queue=new Zje(3),this.db=null,this.clientCache=null,this._logger=Wj(),this._logQueries=!1,this._consolidate=null,this.pendingResults=[],this.maxConcurrentRequests=e,this.pendingExec=!1}next(){if(this.queue.isEmpty()||this.pendingResults.length>this.maxConcurrentRequests||this.pendingExec)return;let e=this.queue.next();if(!e)return;let{request:t,result:n}=e;this.pendingResults.push(n),t.type===`exec`&&(this.pendingExec=!0),this.submit(t,n).finally(()=>{for(;this.pendingResults.length&&this.pendingResults[0].state!==Gj.pending;){let e=this.pendingResults.shift();e.state===Gj.ready?e.fulfill():e.state===Gj.done&&this._logger.warn(`Found resolved query in pending results.`)}t.type===`exec`&&(this.pendingExec=!1),this.next()})}enqueue(e,t=qj.Normal){this.queue.insert(e,t),this.next()}async submit(e,t){try{let{query:n,type:r,cache:i=!1,options:a}=e,o=Array.isArray(n)?n.filter(e=>e).join(`; 117`):n?String(n):null;if(i){let e=this.clientCache.get(o);if(e){let n=await e;this._logger.debug(`Cache`),t.ready(n);return}}let s=performance.now();this._logQueries&&this._logger.debug(`Query`,{type:r,sql:o,...a});let c=this.db.query({type:r,sql:o,...a});i&&this.clientCache.set(o,c);let l=await c;i&&this.clientCache.set(o,l),this._logger.debug(`Request: ${(performance.now()-s).toFixed(1)}`),t.ready(r===`exec`?null:l)}catch(e){t.reject(e)}}cache(e){return e===void 0?this.clientCache:this.clientCache=e===!0?Xje():e||Yje()}logger(e){return e?this._logger=e:this._logger}logQueries(e){return e===void 0?this._logQueries:this._logQueries=!!e}connector(e){return e?this.db=e:this.db}consolidate(e){e&&!this._consolidate?this._consolidate=zje(this.enqueue.bind(this),this.clientCache):!e&&this._consolidate&&(this._consolidate=null)}request(e,t=qj.Normal){let n=new Kj,r={request:e,result:n};return this._consolidate?this._consolidate.add(r,t):this.enqueue(r,t),n}cancel(e){let t=new Set(e);if(t.size){this.queue.remove(({result:e})=>t.has(e)?(e.reject(`Canceled`),!0):!1);for(let e of this.pendingResults)t.has(e)&&e.reject(`Canceled`)}}clear(){this.queue.remove(({result:e})=>(e.reject(`Cleared`),!0));for(let e of this.pendingResults)e.reject(`Cleared`);this.pendingResults=[]}},Jj;function Yj(e){return e?Jj=e:Jj??=new Xj,Jj}var Xj=class{manager;preaggregator;clients=new Set;filterGroups=new Map;_logger=Wj();constructor(e=new JD,t={}){let{logger:n=console,manager:r=new Qje,cache:i=!0,consolidate:a=!0,preagg:o={}}=t;this.manager=r,this.manager.cache(i),this.manager.consolidate(a),this.databaseConnector(e),this.logger(n),this.clear(),this.preaggregator=new kje(this,o)}clear(e={}){let{clients:t=!0,cache:n=!0}=e;this.manager.clear(),t&&(this.filterGroups?.forEach(e=>e.disconnect()),this.filterGroups=new Map,this.clients?.forEach(e=>this.disconnect(e)),this.clients=new Set),n&&this.manager.cache().clear()}databaseConnector(e){return e?this.manager.connector(e):this.manager.connector()}logger(e){return arguments.length&&(this._logger=e||Wj(),this.manager.logger(this._logger)),this._logger}cancel(e){this.manager.cancel(e)}exec(e,t={}){let{priority:n=qj.Normal}=t;return this.manager.request({type:`exec`,query:e},n)}query(e,t={}){let{type:n=`arrow`,cache:r=!0,priority:i=qj.Normal,...a}=t;return this.manager.request({type:n,query:e,cache:r,options:a},i)}prefetch(e,t={}){return this.query(e,{...t,cache:!0,priority:qj.Low})}updateClient(e,t,n=qj.Normal){return e.queryPending(),e._pending=this.query(t,{priority:n}).then(t=>e.queryResult(t).update(),t=>{this._logger?.error(t),e.queryError(t)}).catch(e=>this._logger?.error(e))}requestQuery(e,t){return this.preaggregator.clear(),t?this.updateClient(e,t):Promise.resolve(e.update())}connect(e){let{clients:t}=this;if(t?.has(e))throw Error(`Client already connected.`);t?.add(e),e.coordinator=this,e.initialize(),$je(this,e.filterBy,e)}disconnect(e){let{clients:t,filterGroups:n}=this;if(!t?.has(e))return;t.delete(e),e.coordinator=null;let r=n?.get(e.filterBy);r&&r.clients.delete(e)}};function $je(e,t,n){if(!t)return;let r=e.filterGroups?.get(t);if(!r){let n=n=>eMe(e,t,n),i=()=>tMe(e,t);t.addEventListener(`activate`,n),t.addEventListener(`value`,i),r={selection:t,clients:new Set,disconnect(){t.removeEventListener(`activate`,n),t.removeEventListener(`value`,i)}},e.filterGroups?.set(t,r)}r.clients.add(n)}function eMe(e,t,n){let{preaggregator:r,filterGroups:i}=e,{clients:a}=i.get(t);for(let e of a)e.enabled&&r.request(e,t,n)}function tMe(e,t){let{preaggregator:n,filterGroups:r}=e,{clients:i}=r.get(t),{active:a}=t;return Promise.allSettled(Array.from(i,async r=>{if(!r.enabled)return r.requestQuery();r.initialized||await r.pending;let i=n.request(r,t,a),o=i?null:t.predicate(r);
117if(i?.skip||!i&&!o)return;let s=i?.query(a.predicate)??r.query(o);return e.updateClient(r,s)}))}function Zj(e){let{coordinator:t=Yj(),...n}=e,r=new nMe(n);return t.connect(r),r}var nMe=class extends iD{_methods;_filterStable;constructor({selection:e=void 0,enabled:t=!0,filterStable:n=!0,...r}){super(e),this.enabled=t,this._methods=r,this._filterStable=n}get filterStable(){return this._filterStable}async prepare(){await this._methods.prepare?.()}query(e){return this._methods.query?.(e)??null}queryResult(e){return this._methods.queryResult?.(e),this}queryPending(){return this._methods.queryPending?.(),this}queryError(e){return this._methods.queryError?.(e),this}},rMe=class{_callbacks;constructor(){this._callbacks=new Map}addEventListener(e,t){this._callbacks.has(e)||this._callbacks.set(e,{callbacks:new Set,pending:null,queue:new iMe}),this._callbacks.get(e).callbacks.add(t)}removeEventListener(e,t){let n=this._callbacks.get(e);n&&n.callbacks.delete(t)}willEmit(e,t){return t}emitQueueFilter(e,t){return null}cancel(e){this._callbacks.get(e)?.queue.clear()}async pending(e){await this._callbacks.get(e)?.pending}emit(e,t){let n=this._callbacks.get(e)||{};if(n.pending)n.queue.enqueue(t,this.emitQueueFilter(e,t));else{let r=this.willEmit(e,t),{callbacks:i,queue:a}=n;if(i?.size){let t=Array.from(i,e=>e(r));n.pending=Promise.allSettled(t).then(()=>{n.pending=null,a.isEmpty()||this.emit(e,a.dequeue())})}}}},iMe=class{next=null;constructor(){this.clear()}clear(){this.next=null}isEmpty(){return!this.next}enqueue(e,t){let n={value:e};if(t&&this.next){let e=this;for(;e.next;)t(e.next.value)?e=e.next:e.next=e.next.next;e.next=n}else this.next=n}dequeue(){let{next:e}=this;return this.next=e?.next||null,e?.value}};function Qj(e,t){return e===t?!1:e instanceof Date&&t instanceof Date?+e!=+t:Array.isArray(e)&&Array.isArray(t)?aMe(e,t):!0}function aMe(e,t){if(e.length!==t.length)return!0;for(let n=0;n<e.length;++n)if(e[n]!==t[n])return!0;return!1}function $j(e){return e instanceof eM}var eM=class e extends rMe{_value;constructor(e){super(),this._value=e}static value(t){return new e(t)}static array(t){if(t.some(e=>$j(e))){let n=new e,r=()=>{n.update(t.map(e=>$j(e)?e.value:e))};return r(),t.forEach(e=>$j(e)?e.addEventListener(`value`,r):0),n}return new e(t)}get value(){return this._value}update(e,{force:t}={}){return Qj(this._value,e)||t?this.emit(`value`,e):this.cancel(`value`),this}willEmit(e,t){return e===`value`&&(this._value=t),t}};function tM(e){return e instanceof rM}function nM(e,t){return new rM(new iM(e),t?[t].flat():void 0)}var rM=class e extends eM{_resolved;_resolver;_relay;static intersect({cross:e=!1,empty:t=!1,include:n=[]}={}){return nM({cross:e,empty:t},n)}static union({cross:e=!1,empty:t=!1,include:n=[]}={}){return nM({cross:e,empty:t,union:!0},n)}static single({cross:e=!1,empty:t=!1,include:n=[]}={}){return nM({cross:e,empty:t,single:!0},n)}static crossfilter({empty:e=!1,include:t=[]}={}){return nM({cross:!0,empty:e},t)}constructor(e=new iM,t=[]){if(super([]),this._resolved=this._value,this._resolver=e,this._relay=new Set,Array.isArray(t))for(let e of t)e._relay.add(this)}clone(){let t=new e(this._resolver);return t._value=t._resolved=this._value,t}remove(e){let t=this.clone();return t._value=t._resolved=t._resolver.resolve(this._resolved,{source:e}),t._value.active={source:e},t}get resolver(){return this._resolver}get single(){return this._resolver.single}get clauses(){return super.value}get active(){return this.clauses.active}get value(){return this.active?.value}valueFor(e){return this.clauses.find(t=>t.source===e)?.value}activate(e){this.emit(`activate`,e),this._relay.forEach(t=>t.activate(e))}update(e){return this._resolved=this._resolver.resolve(this._resolved,e,!0),this._resolved.active=e,this._relay.forEach(t=>t.update(e)),super.update(this._resolved)}reset(e){return e??=this._resolved,e.forEach(e=>e.source?.reset?.()),this._resolved=this._resolved.filter(t=>!e.includes(t)),this._relay.forEach(t=>t.reset(e)),super.update(this._resolved)}willEmit(e,t){return e===`value`?(this._value=t,this.value):t}emitQueueFilter(e,t){return e===`value`?this._resolver.queueFilter(t):null}skip(e,t){return this._resolver.skip(e,t)}predicate(e=void 0,t=!1){let{clauses:n}=this,r=t?null:n.active;return this._resolver.predicate(n,r,e)}},iM=class{union;cross;single;empty;constructor({union:e,cross:t,single:n,empty:r}={}){this.union=!!e,this.cross=!!t,this.single=!!n,this.empty=!!r}resolve(e,t,n=!1){let{source:r,predicate:i}=t,a=e.filter(e=>r!==e.source),o=this.single?[]:a;
117return this.single&&n&&a.forEach(e=>e.source?.reset?.()),i&&o.push(t),o}skip(e,t){return e==null?!1:!!(this.cross&&t?.clients?.has(e))}predicate(e,t,n){let{empty:r,union:i}=this;if(r&&!e.length)return[ak(!1)];if(this.skip(n,t))return;let a=e.filter(e=>!this.skip(n,e)).map(e=>e.predicate);return i&&a.length>1?PA(a):a}queueFilter(e){if(this.cross){let t=e.active?.source;return e=>e.active?.source!==t}return null}};function oMe(e){return new aM(e)}var aM=class{_uri;_ipc;constructor({uri:e=`http://localhost:3000/`,ipc:t=void 0}={}){this._uri=e,this._ipc=t}async query(e){let t=fetch(this._uri,{method:`POST`,mode:`cors`,credentials:`omit`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),n=await t;if(!n.ok)throw Error(`Query failed with HTTP status ${n.status}: ${await n.text()}`);return e.type===`exec`?t:e.type===`arrow`?qD(await n.arrayBuffer(),this._ipc):n.json()}};function oM(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function sM(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function cM(e){return this instanceof cM?(this.v=e,this):new cM(e)}function lM(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof cM?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function uM(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:cM(e[r](t)),done:!1}:i?i(t):t}:i}}function dM(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof sM==`function`?sM(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}var sMe=new TextDecoder(`utf-8`),fM=e=>sMe.decode(e),cMe=new TextEncoder,pM=e=>cMe.encode(e),lMe=e=>typeof e==`number`,mM=e=>typeof e==`boolean`,hM=e=>typeof e==`function`,gM=e=>e!=null&&Object(e)===e,_M=e=>gM(e)&&hM(e.then),vM=e=>gM(e)&&hM(e[Symbol.iterator]),yM=e=>gM(e)&&hM(e[Symbol.asyncIterator]),bM=e=>gM(e)&&gM(e.schema),xM=e=>gM(e)&&`done`in e&&`value`in e,SM=e=>gM(e)&&hM(e.stat)&&lMe(e.fd),CM=e=>gM(e)&&TM(e.body),wM=e=>`_getDOMStream`in e&&`_getNodeStream`in e,uMe=e=>gM(e)&&hM(e.abort)&&hM(e.getWriter)&&!wM(e),TM=e=>gM(e)&&hM(e.cancel)&&hM(e.getReader)&&!wM(e),dMe=e=>gM(e)&&hM(e.end)&&hM(e.write)&&mM(e.writable)&&!wM(e),EM=e=>gM(e)&&hM(e.read)&&hM(e.pipe)&&mM(e.readable)&&!wM(e),fMe=e=>gM(e)&&hM(e.clear)&&hM(e.bytes)&&hM(e.position)&&hM(e.setPosition)&&hM(e.capacity)&&hM(e.getBufferIdentifier)&&hM(e.createLong),DM=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function pMe(e){let t=e[0]?[e[0]]:[],n,r,i,a;for(let o,s,c=0,l=0,u=e.length;++c<u;){if(o=t[l],s=e[c],!o||!s||o.buffer!==s.buffer||s.byteOffset<o.byteOffset){s&&(t[++l]=s);continue}if({byteOffset:n,byteLength:i}=o,{byteOffset:r,byteLength:a}=s,n+i<r||r+a<n){s&&(t[++l]=s);continue}t[l]=new Uint8Array(o.buffer,n,r-n+a)}return t}function OM(e,t,n=0,r=t.byteLength){let i=e.byteLength,a=new Uint8Array(e.buffer,e.byteOffset,i),o=new Uint8Array(t.buffer,t.byteOffset,Math.min(r,i));return a.set(o,n),e}function kM(e,t){let n=pMe(e),r=n.reduce((e,t)=>
117e+t.byteLength,0),i,a,o,s=0,c=-1,l=Math.min(t||1/0,r);for(let e=n.length;++c<e;){if(i=n[c],a=i.subarray(0,Math.min(i.length,l-s)),l<=s+a.length){a.length<i.length?n[c]=i.subarray(a.length):a.length===i.length&&c++,o?OM(o,a,s):o=a;break}OM(o||=new Uint8Array(l),a,s),s+=a.length}return[o||new Uint8Array,n.slice(c),r-(o?o.byteLength:0)]}function AM(e,t){let n=xM(t)?t.value:t;return n instanceof e?e===Uint8Array?new e(n.buffer,n.byteOffset,n.byteLength):n:n?(typeof n==`string`&&(n=pM(n)),n instanceof ArrayBuffer||n instanceof DM?new e(n):fMe(n)?AM(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)}var jM=e=>AM(Int32Array,e),MM=e=>AM(BigInt64Array,e),NM=e=>AM(Uint8Array,e),PM=e=>(e.next(),e);function*mMe(e,t){let n=function*(e){yield e};return yield*PM((function*(t){let n=null;do n=t.next(yield AM(e,n));while(!n.done)})((typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof DM?n(t):vM(t)?t:n(t))[Symbol.iterator]())),new e}var hMe=e=>mMe(Uint8Array,e);function FM(e,t){return lM(this,arguments,function*(){if(_M(t))return yield cM(yield cM(yield*uM(dM(FM(e,yield cM(t))))));let n=function(e){return lM(this,arguments,function*(){yield yield cM(yield cM(e))})};return yield cM(yield*uM(dM(PM((function(t){return lM(this,arguments,function*(){let n=null;do n=yield cM(t.next(yield yield cM(AM(e,n))));while(!n.done)})})((typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof DM?n(t):vM(t)?function(e){return lM(this,arguments,function*(){yield cM(yield*uM(dM(PM((function*(e){let t=null;do t=e.next(yield t?.value);while(!t.done)})(e[Symbol.iterator]())))))})}(t):yM(t)?t:n(t))[Symbol.asyncIterator]()))))),yield cM(new e)})}var gMe=e=>FM(Uint8Array,e);function IM(e,t,n){if(e!==0){n=n.slice(0,t);for(let t=-1,r=n.length;++t<r;)n[t]+=e}return n.subarray(0,t)}function _Me(e,t){let n=0,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}var LM={fromIterable(e){return RM(vMe(e))},fromAsyncIterable(e){return RM(yMe(e))},fromDOMStream(e){return RM(bMe(e))},fromNodeStream(e){return RM(SMe(e))},toDOMStream(e,t){throw Error(`"toDOMStream" not available in this environment`)},toNodeStream(e,t){throw Error(`"toNodeStream" not available in this environment`)}},RM=e=>(e.next(),e);function*vMe(e){let t,n=!1,r=[],i,a,o,s=0;function c(){return a===`peek`?kM(r,o)[0]:([i,r,s]=kM(r,o),i)}({cmd:a,size:o}=(yield null)||{cmd:`read`,size:0});let l=hMe(e)[Symbol.iterator]();try{do if({done:t,value:i}=Number.isNaN(o-s)?l.next():l.next(o-s),!t&&i.byteLength>0&&(r.push(i),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield c());while(o<s);while(!t)}catch(e){(n=!0)&&typeof l.throw==`function`&&l.throw(e)}finally{n===!1&&typeof l.return==`function`&&l.return(null)}return null}function yMe(e){return lM(this,arguments,function*(){let t,n=!1,r=[],i,a,o,s=0;function c(){return a===`peek`?kM(r,o)[0]:([i,r,s]=kM(r,o),i)}({cmd:a,size:o}=(yield yield cM(null))||{cmd:`read`,size:0});let l=gMe(e)[Symbol.asyncIterator]();try{do if({done:t,value:i}=Number.isNaN(o-s)?yield cM(l.next()):yield cM(l.next(o-s)),!t&&i.byteLength>0&&(r.push(i),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield cM(c()));while(o<s);while(!t)}catch(e){(n=!0)&&typeof l.throw==`function`&&(yield cM(l.throw(e)))}finally{n===!1&&typeof l.return==`function`&&(yield cM(l.return(new Uint8Array)))}return yield cM(null)})}function bMe(e){return lM(this,arguments,function*(){let t=!1,n=!1,r=[],i,a,o,s=0;function c(){return a===`peek`?kM(r,o)[0]:([i,r,s]=kM(r,o),i)}({cmd:a,size:o}=(yield yield cM(null))||{cmd:`read`,size:0});let l=new xMe(e);try{do if({done:t,value:i}=Number.isNaN(o-s)?yield cM(l.read()):yield cM(l.read(o-s)),!t&&i.byteLength>0&&(r.push(NM(i)),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield cM(c()));while(o<s);while(!t)}catch(e){(n=!0)&&(yield cM(l.cancel(e)))}finally{n===!1?yield cM(l.cancel()):e.locked&&l.releaseLock()}return yield cM(null)})}var xMe=class{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 oM(this,void 0,void 0,function*(){let{reader:t,source:n}=this;t&&(yield t.cancel(e).catch(()=>{})),n&&n.locked&&this.releaseLock()})}read(e){return oM(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array};let t=yield this.reader.read();return!t.done&&(t.value=NM(t)),t})}},zM=(e,t)=>{let n=e=>r([t,e]),r;return[t,n,new Promise(i=>(r=i)&&e.once(t,n))]};function SMe(e){return lM(this,arguments,function*(){let t=[],n=`error`,r=!1,i=null,a,o,s=0,c=[],l;function u(){return a===`peek`?kM(c,o)[0]:([l,c,s]=kM(c,o),l)}if({cmd:a,size:o}=(yield yield cM(null))||{cmd:`read`,size:0},e.isTTY)return yield yield cM(new Uint8Array),yield cM(null);try{t[0]=zM(e,`end`),t[1]=zM(e,`error`);do{if(t[2]=zM(e,`readable`),[n,i]=yield cM(Promise.race(t.map(e=>e[2]))),n===`error`)break;
vendor: 9,931 bytes, line 117
117if((r=n===`end`)||(Number.isFinite(o-s)?(l=NM(e.read(o-s)),l.byteLength<o-s&&(l=NM(e.read()))):l=NM(e.read()),l.byteLength>0&&(c.push(l),s+=l.byteLength)),r||o<=s)do({cmd:a,size:o}=yield yield cM(u()));while(o<s)}while(!r)}finally{yield cM(d(t,n===`error`?i:null))}return yield cM(null);function d(t,n){return l=c=null,new Promise((r,i)=>{for(let[n,r]of t)e.off(n,r);try{let t=e.destroy;t&&t.call(e,n),n=void 0}catch(e){n=e||n}finally{n==null?r():i(n)}})}})}var BM;(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`})(BM||={});var VM;(function(e){e[e.Sparse=0]=`Sparse`,e[e.Dense=1]=`Dense`})(VM||={});var HM;(function(e){e[e.HALF=0]=`HALF`,e[e.SINGLE=1]=`SINGLE`,e[e.DOUBLE=2]=`DOUBLE`})(HM||={});var UM;(function(e){e[e.DAY=0]=`DAY`,e[e.MILLISECOND=1]=`MILLISECOND`})(UM||={});var WM;(function(e){e[e.SECOND=0]=`SECOND`,e[e.MILLISECOND=1]=`MILLISECOND`,e[e.MICROSECOND=2]=`MICROSECOND`,e[e.NANOSECOND=3]=`NANOSECOND`})(WM||={});var GM;(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`})(GM||={});var KM=new Int32Array(2),qM=new Float32Array(KM.buffer),JM=new Float64Array(KM.buffer),YM=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1,XM;(function(e){e[e.UTF8_BYTES=1]=`UTF8_BYTES`,e[e.UTF16_STRING=2]=`UTF16_STRING`})(XM||={});var ZM=class e{constructor(e){this.bytes_=e,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(t){return new e(new Uint8Array(t))}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 BigInt.asIntN(64,BigInt(this.readUint32(e))+(BigInt(this.readUint32(e+4))<<BigInt(32)))}readUint64(e){return BigInt.asUintN(64,BigInt(this.readUint32(e))+(BigInt(this.readUint32(e+4))<<BigInt(32)))}readFloat32(e){return KM[0]=this.readInt32(e),qM[0]}readFloat64(e){return KM[+!YM]=this.readInt32(e),KM[+!!YM]=this.readInt32(e+4),JM[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,Number(BigInt.asIntN(32,t))),this.writeInt32(e+4,Number(BigInt.asIntN(32,t>>BigInt(32))))}writeUint64(e,t){this.writeUint32(e,Number(BigInt.asUintN(32,t))),this.writeUint32(e+4,Number(BigInt.asUintN(32,t>>BigInt(32))))}writeFloat32(e,t){qM[0]=t,this.writeInt32(e,KM[0])}writeFloat64(e,t){JM[0]=t,this.writeInt32(e,KM[+!YM]),this.writeInt32(e+4,KM[+!!YM])}getBufferIdentifier(){if(this.bytes_.length<this.position_+4+4)throw 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){let 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);let n=this.readInt32(e);e+=4;let r=this.bytes_.subarray(e,e+n);return t===XM.UTF8_BYTES?r:this.text_decoder_.decode(r)}__union_with_string(e,t){return typeof e==`string`?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(e.length!=4)throw 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}createScalarList(e,t){let n=[];for(let r=0;r<t;++r){let t=e(r);t!==null&&n.push(t)}return n}createObjList(e,t){let n=[];for(let r=0;r<t;++r){let t=e(r);t!==null&&n.push(t.unpack())}return n}},QM=class e{constructor(e){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,this.text_encoder=new TextEncoder;let t;t=e||1024,this.bb=ZM.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(t,n){t>this.minalign&&(this.minalign=t);let r=~(this.bb.capacity()-this.space+n)+1&t-1;for(;this.space<r+t+n;){let t=this.bb.capacity();this.bb=e.growByteBuffer(this.bb),this.space+=this.bb.capacity()-t}this.pad(r)}pad(e){for(let t=0;t<e;t++)this.bb.writeInt8(--this.space,0)}writeInt8(e){this.bb.writeInt8(--this.space,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!==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 TypeError(`FlatBuffers: struct must be serialized inline.`)}notNested(){if(this.isNested)throw TypeError(`FlatBuffers: object serialization must not be nested.`)}slot(e){this.vtable!==null&&(this.vtable[e]=this.offset())}offset(){return this.bb.capacity()-this.space}static growByteBuffer(e){let t=e.capacity();if(t&3221225472)throw Error(`FlatBuffers: cannot grow buffer beyond 2 gigabytes.`);let n=t<<1,r=ZM.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(),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(this.vtable==null||!this.isNested)throw Error(`FlatBuffers: endObject called without startObject`);this.addInt32(0);let e=this.offset(),t=this.vtable_in_use-1;for(;t>=0&&this.vtable[t]==0;t--);let n=t+1;for(;t>=0;t--)this.addInt16(this.vtable[t]==0?0:e-this.vtable[t]);this.addInt16(e-this.object_start);let r=(n+2)*2;this.addInt16(r);let i=0,a=this.space;outer_loop:for(t=0;t<this.vtables.length;t++){let 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(a+t)!=this.bb.readInt16(e+t))continue outer_loop;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){let r=n?4:0;if(t){let e=t;if(this.prep(this.minalign,8+r),e.length!=4)throw TypeError(`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){let n=this.bb.capacity()-e,r=n-this.bb.readInt32(n);if(!(t<this.bb.readInt16(r)&&this.bb.readInt16(r+t)!=0))throw TypeError(`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||=new Map,this.string_maps.has(e))return this.string_maps.get(e);let t=this.createString(e);return this.string_maps.set(e,t),t}createString(e){if(e==null)return 0;let t;return t=e instanceof Uint8Array?e:this.text_encoder.encode(e),this.addInt8(0),this.startVector(1,t.length,1),this.bb.setPosition(this.space-=t.length),this.bb.bytes().set(t,this.space),this.endVector()}createByteVector(e){return e==null?0:(this.startVector(1,e.length,1),this.bb.setPosition(this.space-=e.length),this.bb.bytes().set(e,this.space),this.endVector())}createObjectOffset(e){return e===null?0:typeof e==`string`?this.createString(e):e.pack(this)}createObjectOffsetList(e){let t=[];for(let n=0;n<e.length;++n){let r=e[n];if(r!==null)t.push(this.createObjectOffset(r));else throw TypeError(`FlatBuffers: Argument for createObjectOffsetList cannot contain null.`)}return t}createStructOffsetList(e,t){return t(this,e.length),this.createObjectOffsetList(e.slice().reverse()),this.endVector()}},$M;(function(e){e[e.BUFFER=0]=`BUFFER`})($M||={});var eN;(function(e){e[e.LZ4_FRAME=0]=`LZ4_FRAME`,e[e.ZSTD=1]=`ZSTD`})(eN||={});var CMe=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}
117static getRootAsBodyCompression(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsBodyCompression(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}codec(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt8(this.bb_pos+e):eN.LZ4_FRAME}method(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):$M.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,eN.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,$M.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(t,n,r){return e.startBodyCompression(t),e.addCodec(t,n),e.addMethod(t,r),e.endBodyCompression(t)}},tN=class{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(BigInt(n??0)),e.writeInt64(BigInt(t??0)),e.offset()}},nN=class{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(BigInt(n??0)),e.writeInt64(BigInt(t??0)),e.offset()}},rN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsRecordBatch(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsRecordBatch(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}length(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt(`0`)}nodes(e,t){let n=this.bb.__offset(this.bb_pos,6);return n?(t||new nN).__init(this.bb.__vector(this.bb_pos+n)+e*16,this.bb):null}nodesLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,t){let n=this.bb.__offset(this.bb_pos,8);return n?(t||new tN).__init(this.bb.__vector(this.bb_pos+n)+e*16,this.bb):null}buffersLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){let t=this.bb.__offset(this.bb_pos,10);return t?(e||new CMe).__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,BigInt(`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()}},iN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryBatch(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsDictionaryBatch(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt(`0`)}data(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new rN).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isDelta(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startDictionaryBatch(e){e.startObject(3)}static addId(e,t){e.addFieldInt64(0,t,BigInt(`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()}},aN;(function(e){e[e.Little=0]=`Little`,e[e.Big=1]=`Big`})(aN||={});var oN;(function(e){e[e.DenseArray=0]=`DenseArray`})(oN||={});var sN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInt(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsInt(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}bitWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}
vendor: 15,685 bytes, line 117
117static 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(t,n,r){return e.startInt(t),e.addBitWidth(t,n),e.addIsSigned(t,r),e.endInt(t)}},cN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryEncoding(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsDictionaryEncoding(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt(`0`)}indexType(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new sN).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isOrdered(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}dictionaryKind(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt16(this.bb_pos+e):oN.DenseArray}static startDictionaryEncoding(e){e.startObject(4)}static addId(e,t){e.addFieldInt64(0,t,BigInt(`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,oN.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}},lN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsKeyValue(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsKeyValue(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}key(e){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}value(e){let 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(t,n,r){return e.startKeyValue(t),e.addKey(t,n),e.addValue(t,r),e.endKeyValue(t)}},uN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBinary(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsBinary(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(t){return e.startBinary(t),e.endBinary(t)}},dN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBool(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsBool(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(t){return e.startBool(t),e.endBool(t)}},fN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDate(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsDate(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):UM.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,UM.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(t,n){return e.startDate(t),e.addUnit(t,n),e.endDate(t)}},pN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDecimal(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsDecimal(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){let 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(t,n,r,i){return e.startDecimal(t),e.addPrecision(t,n),e.addScale(t,r),e.addBitWidth(t,i),e.endDecimal(t)}},mN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDuration(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsDuration(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):WM.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,WM.MILLISECOND)}static endDuration(e){return e.endObject()}static createDuration(t,n){return e.startDuration(t),e.addUnit(t,n),e.endDuration(t)}},hN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeBinary(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFixedSizeBinary(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}byteWidth(){let 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(t,n){return e.startFixedSizeBinary(t),e.addByteWidth(t,n),e.endFixedSizeBinary(t)}},gN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeList(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFixedSizeList(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}listSize(){let 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(t,n){return e.startFixedSizeList(t),e.addListSize(t,n),e.endFixedSizeList(t)}},_N=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFloatingPoint(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFloatingPoint(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):HM.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,t){e.addFieldInt16(0,t,HM.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(t,n){return e.startFloatingPoint(t),e.addPrecision(t,n),e.endFloatingPoint(t)}},vN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInterval(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsInterval(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):GM.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,GM.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(t,n){return e.startInterval(t),e.addUnit(t,n),e.endInterval(t)}},yN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeBinary(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsLargeBinary(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(t){return e.startLargeBinary(t),e.endLargeBinary(t)}},bN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeUtf8(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsLargeUtf8(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(t){return e.startLargeUtf8(t),e.endLargeUtf8(t)}},xN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsList(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsList(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(t){return e.startList(t),e.endList(t)}},SN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMap(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMap(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}keysSorted(){let e=this.bb.__offset(this.bb_pos,4);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startMap(e){e.startObject(1)}static addKeysSorted(e,t){e.addFieldInt8(0,+t,0)}static endMap(e){return e.endObject()}static createMap(t,n){return e.startMap(t),e.addKeysSorted(t,n),e.endMap(t)}},CN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsNull(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsNull(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(t){return e.startNull(t),e.endNull(t)}},wN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsStruct_(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsStruct_(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(t){return e.startStruct_(t),e.endStruct_(t)}},TN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTime(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsTime(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):WM.MILLISECOND}bitWidth(){let 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,WM.MILLISECOND)}static addBitWidth(e,t){e.addFieldInt32(1,t,32)}static endTime(e){return e.endObject()}static createTime(t,n,r){return e.startTime(t),e.addUnit(t,n),e.addBitWidth(t,r),e.endTime(t)}},EN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTimestamp(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsTimestamp(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):WM.SECOND}timezone(e){let 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,WM.SECOND)}static addTimezone(e,t){e.addFieldOffset(1,t,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(t,n,r){return e.startTimestamp(t),e.addUnit(t,n),e.addTimezone(t,r),e.endTimestamp(t)}},DN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUnion(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUnion(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}mode(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):VM.Sparse}typeIds(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt32(this.bb.__vector(this.bb_pos+t)+e*4):0}typeIdsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}typeIdsArray(){let 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,VM.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(t,n,r){return e.startUnion(t),e.addMode(t,n),e.addTypeIds(t,r),e.endUnion(t)}},ON=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUtf8(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUtf8(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(t){return e.startUtf8(t),e.endUtf8(t)}},kN;(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`,e[e.RunEndEncoded=22]=`RunEndEncoded`})(kN||={});var AN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsField(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsField(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}name(e){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}nullable(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}
117typeType(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):kN.NONE}type(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__union(e,this.bb_pos+t):null}dictionary(e){let t=this.bb.__offset(this.bb_pos,12);return t?(e||new cN).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(t,n){let r=this.bb.__offset(this.bb_pos,14);return r?(n||new e).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+t*4),this.bb):null}childrenLength(){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,16);return n?(t||new lN).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let 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,kN.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()}},jN=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsSchema(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsSchema(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}endianness(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):aN.Little}fields(e,t){let n=this.bb.__offset(this.bb_pos,6);return n?(t||new AN).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}fieldsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,8);return n?(t||new lN).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+e*8):BigInt(0)}featuresLength(){let 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,aN.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(t,n,r,i,a){return e.startSchema(t),e.addEndianness(t,n),e.addFields(t,r),e.addCustomMetadata(t,i),e.addFeatures(t,a),e.endSchema(t)}},MN;(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`})(MN||={});var q;(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.Duration=18]=`Duration`,e[e.LargeBinary=19]=`LargeBinary`,e[e.LargeUtf8=20]=`LargeUtf8`,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`,e[e.DurationSecond=-27]=`DurationSecond`,e[e.DurationMillisecond=-28]=`DurationMillisecond`,e[e.DurationMicrosecond=-29]=`DurationMicrosecond`,e[e.DurationNanosecond=-30]=`DurationNanosecond`})(q||={});var NN;(function(e){e[e.OFFSET=0]=`OFFSET`,e[e.DATA=1]=`DATA`,e[e.VALIDITY=2]=`VALIDITY`,e[e.TYPE=3]=`TYPE`})(NN||={});var wMe=void 0;function PN(e){if(e===null)return`null`;if(e===wMe)return`undefined`;switch(typeof e){case`number`:return`${e}`;case`bigint`:return`${e}`;case`string`:return`"${e}"`}return typeof e[Symbol.toPrimitive]==`function`?e[Symbol.toPrimitive](`string`):ArrayBuffer.isView(e)?e instanceof BigInt64Array||e instanceof BigUint64Array?`[${[...e].map(e=>PN(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}function FN(e){if(typeof e==`bigint`&&(e<-(2**53-1)||e>2**53-1))throw TypeError(`${e} is not safe to convert to a number.`);return Number(e)}function IN(e,t){return FN(e/t)+FN(e%t)/FN(t)}var TMe=Symbol.for(`isArrowBigNum`);function LN(e,...t){return t.length===0?Object.setPrototypeOf(AM(this.TypedArray,e),this.constructor.prototype):Object.
117setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}LN.prototype[TMe]=!0,LN.prototype.toJSON=function(){return`"${HN(this)}"`},LN.prototype.valueOf=function(e){return VN(this,e)},LN.prototype.toString=function(){return HN(this)},LN.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return VN(this);case`string`:return HN(this);case`default`:return DMe(this)}return HN(this)};function RN(...e){return LN.apply(this,e)}function zN(...e){return LN.apply(this,e)}function BN(...e){return LN.apply(this,e)}Object.setPrototypeOf(RN.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(zN.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(BN.prototype,Object.create(Uint32Array.prototype)),Object.assign(RN.prototype,LN.prototype,{constructor:RN,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(zN.prototype,LN.prototype,{constructor:zN,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(BN.prototype,LN.prototype,{constructor:BN,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});var EMe=BigInt(4294967296)*BigInt(4294967296)-BigInt(1);function VN(e,t){let{buffer:n,byteOffset:r,byteLength:i,signed:a}=e,o=new BigUint64Array(n,r,i/8),s=a&&o.at(-1)&BigInt(1)<<BigInt(63),c=BigInt(0),l=0;if(s){for(let e of o)c|=(e^EMe)*(BigInt(1)<<BigInt(64*l++));c*=BigInt(-1),c-=BigInt(1)}else for(let e of o)c|=e*(BigInt(1)<<BigInt(64*l++));if(typeof t==`number`){let e=BigInt(10**t),n=c/e,r=c%e;return FN(n)+FN(r)/FN(e)}return FN(c)}function HN(e){if(e.byteLength===8)return`${new e.BigIntArray(e.buffer,e.byteOffset,1)[0]}`;if(!e.signed)return UN(e);let t=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2);if(new Int16Array([t.at(-1)])[0]>=0)return UN(e);t=t.slice();let n=1;for(let e=0;e<t.length;e++){let r=t[e],i=~r+n;t[e]=i,n&=+(r===0)}return`-${UN(t)}`}function DMe(e){return e.byteLength===8?new e.BigIntArray(e.buffer,e.byteOffset,1)[0]:HN(e)}function UN(e){let t=``,n=new Uint32Array(2),r=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),i=new Uint32Array((r=new Uint16Array(r).reverse()).buffer),a=-1,o=r.length-1;do{for(n[0]=r[a=0];a<o;)r[a++]=n[1]=n[0]/10,n[0]=(n[0]-n[1]*10<<16)+r[a];r[a]=n[1]=n[0]/10,n[0]-=n[1]*10,t=`${n[0]}${t}`}while(i[0]||i[1]||i[2]||i[3]);return t??`0`}var OMe=class e{static new(e,t){switch(t){case!0:return new RN(e);case!1:return new zN(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case BigInt64Array:return new RN(e)}return e.byteLength===16?new BN(e):new zN(e)}static signed(e){return new RN(e)}static unsigned(e){return new zN(e)}static decimal(e){return new BN(e)}constructor(t,n){return e.new(t,n)}},WN,GN,KN,qN,JN,YN,XN,ZN,QN,$N,eP,tP,nP,rP,iP,aP,oP,sP,cP,lP,uP,dP,fP=class e{static isNull(e){return e?.typeId===q.Null}static isInt(e){return e?.typeId===q.Int}static isFloat(e){return e?.typeId===q.Float}static isBinary(e){return e?.typeId===q.Binary}static isLargeBinary(e){return e?.typeId===q.LargeBinary}static isUtf8(e){return e?.typeId===q.Utf8}static isLargeUtf8(e){return e?.typeId===q.LargeUtf8}static isBool(e){return e?.typeId===q.Bool}static isDecimal(e){return e?.typeId===q.Decimal}static isDate(e){return e?.typeId===q.Date}static isTime(e){return e?.typeId===q.Time}static isTimestamp(e){return e?.typeId===q.Timestamp}static isInterval(e){return e?.typeId===q.Interval}static isDuration(e){return e?.typeId===q.Duration}static isList(e){return e?.typeId===q.List}static isStruct(e){return e?.typeId===q.Struct}static isUnion(e){return e?.typeId===q.Union}static isFixedSizeBinary(e){return e?.typeId===q.FixedSizeBinary}static isFixedSizeList(e){return e?.typeId===q.FixedSizeList}static isMap(e){return e?.typeId===q.Map}static isDictionary(e){return e?.typeId===q.Dictionary}static isDenseUnion(t){return e.isUnion(t)&&t.mode===VM.Dense}static isSparseUnion(t){return e.isUnion(t)&&t.mode===VM.Sparse}constructor(e){this.typeId=e}};WN=Symbol.toStringTag,fP[WN]=(e=>(e.children=null,e.ArrayType=Array,e.OffsetArrayType=Int32Array,e[Symbol.toStringTag]=`DataType`))(fP.prototype);var pP=class extends fP{constructor(){super(q.Null)}toString(){return`Null`}};GN=Symbol.toStringTag,pP[GN]=(e=>e[Symbol.toStringTag]=`Null`)(pP.prototype);var mP=class extends fP{constructor(e,t){super(q.Int),this.isSigned=e,this.bitWidth=t}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?BigInt64Array:BigUint64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?`I`:`Ui`}nt${this.bitWidth}`}};KN=Symbol.toStringTag,mP[KN]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(mP.prototype);var kMe=class extends mP{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},AMe=class extends mP{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},hP=class extends mP{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},jMe=class extends mP{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}},MMe=class extends mP{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},NMe=class extends mP{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},PMe=class extends mP{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},FMe=class extends mP{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}};Object.defineProperty(kMe.prototype,"ArrayType",{value:Int8Array}),Object.defineProperty(AMe.prototype,"ArrayType",{value:Int16Array}),Object.defineProperty(hP.prototype,"ArrayType",{value:Int32Array}),Object.defineProperty(jMe.prototype,"ArrayType",{value:BigInt64Array}),Object.defineProperty(MMe.prototype,"ArrayType",{value:Uint8Array}),Object.defineProperty(NMe.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(PMe.prototype,"ArrayType",{value:Uint32Array}),Object.defineProperty(FMe.prototype,"ArrayType",{value:BigUint64Array});var gP=class extends fP{constructor(e){super(q.Float),this.precision=e}get ArrayType(){switch(this.precision){case HM.HALF:return Uint16Array;case HM.SINGLE:return Float32Array;case HM.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};qN=Symbol.toStringTag,gP[qN]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(gP.prototype);var IMe=class extends gP{constructor(){super(HM.HALF)}},LMe=class extends gP{constructor(){super(HM.SINGLE)}},RMe=class extends gP{constructor(){super(HM.DOUBLE)}};Object.defineProperty(IMe.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(LMe.prototype,"ArrayType",{value:Float32Array}),Object.defineProperty(RMe.prototype,"ArrayType",{value:Float64Array});var _P=class extends fP{constructor(){super(q.Binary)}toString(){return`Binary`}};JN=Symbol.toStringTag,_P[JN]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(_P.prototype);var vP=class extends fP{constructor(){super(q.LargeBinary)}toString(){return`LargeBinary`}};YN=Symbol.toStringTag,vP[YN]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeBinary`))(vP.prototype);var yP=class extends fP{constructor(){super(q.Utf8)}toString(){return`Utf8`}};XN=Symbol.toStringTag,yP[XN]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(yP.prototype);var bP=class extends fP{constructor(){super(q.LargeUtf8)}toString(){return`LargeUtf8`}};ZN=Symbol.toStringTag,bP[ZN]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]=`LargeUtf8`))(bP.prototype);var xP=class extends fP{constructor(){super(q.Bool)}toString(){return`Bool`}};QN=Symbol.toStringTag,xP[QN]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(xP.prototype);var SP=class extends fP{constructor(e,t,n=128){super(q.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};$N=Symbol.toStringTag,SP[$N]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(SP.prototype);var CP=class extends fP{constructor(e){super(q.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${UM[this.unit]}>`}get ArrayType(){return this.unit===UM.DAY?Int32Array:BigInt64Array}};eP=Symbol.toStringTag,CP[eP]=(e=>(e.unit=null,e[Symbol.toStringTag]=`Date`))(CP.prototype);var wP=class extends fP{constructor(e,t){super(q.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${WM[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};tP=Symbol.toStringTag,wP[tP]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(wP.prototype);var TP=class extends fP{constructor(e,t){super(q.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${WM[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};nP=Symbol.toStringTag,TP[nP]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Timestamp`))(TP.prototype);var EP=class extends fP{constructor(e){super(q.Interval),this.unit=e}toString(){return`Interval<${GM[this.unit]}>`}};rP=Symbol.toStringTag,EP[rP]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(EP.prototype);var DP=class extends fP{constructor(e){super(q.Duration),this.unit=e}toString(){return`Duration<${WM[this.unit]}>`}};iP=Symbol.toStringTag,DP[iP]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]=`Duration`))(DP.prototype);var OP=class extends fP{constructor(e){super(q.List),this.children=[e]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};aP=Symbol.toStringTag,OP[aP]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))(OP.prototype);var kP=class extends fP{constructor(e){super(q.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};oP=Symbol.toStringTag,kP[oP]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(kP.prototype);var AP=class extends fP{constructor(e,t,n){super(q.Union),this.mode=e,this.children=n,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((e,t,n
117)=>(e[t]=n)&&e||e,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(` | `)}>`}};sP=Symbol.toStringTag,AP[sP]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(AP.prototype);var jP=class extends fP{constructor(e){super(q.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};cP=Symbol.toStringTag,jP[cP]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(jP.prototype);var MP=class extends fP{constructor(e,t){super(q.FixedSizeList),this.listSize=e,this.children=[t]}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}>`}};lP=Symbol.toStringTag,MP[lP]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(MP.prototype);var NP=class extends fP{constructor(e,t=!1){if(super(q.Map),this.children=[e],this.keysSorted=t,e&&(e.name=`entries`,e?.type?.children)){let t=(e?.type)?.children[0];t&&(t.name=`key`);let n=(e?.type)?.children[1];n&&(n.name=`value`)}}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(`, `)}}>`}};uP=Symbol.toStringTag,NP[uP]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(NP.prototype);var zMe=(e=>()=>++e)(-1),PP=class extends fP{constructor(e,t,n,r){super(q.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?zMe():FN(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};dP=Symbol.toStringTag,PP[dP]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(PP.prototype);function FP(e){let t=e;switch(e.typeId){case q.Decimal:return e.bitWidth/32;case q.Interval:return 1+t.unit;case q.FixedSizeList:return t.listSize;case q.FixedSizeBinary:return t.byteWidth;default:return 1}}var IP=class{visitMany(e,...t){return e.map((e,n)=>this.visit(e,...t.map(e=>e[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return BMe(this,e,t)}getVisitFnByTypeId(e,t=!0){return LP(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitLargeUtf8(e,...t){return null}visitBinary(e,...t){return null}visitLargeBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitDuration(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}};function BMe(e,t,n=!0){return typeof t==`number`?LP(e,t,n):typeof t==`string`&&t in q?LP(e,q[t],n):t&&t instanceof fP?LP(e,RP(t),n):t?.type&&t.type instanceof fP?LP(e,RP(t.type),n):LP(e,q.NONE,n)}function LP(e,t,n=!0){let r=null;switch(t){case q.Null:r=e.visitNull;break;case q.Bool:r=e.visitBool;break;case q.Int:r=e.visitInt;break;case q.Int8:r=e.visitInt8||e.visitInt;break;case q.Int16:r=e.visitInt16||e.visitInt;break;case q.Int32:r=e.visitInt32||e.visitInt;break;case q.Int64:r=e.visitInt64||e.visitInt;break;case q.Uint8:r=e.visitUint8||e.visitInt;break;case q.Uint16:r=e.visitUint16||e.visitInt;break;case q.Uint32:r=e.visitUint32||e.visitInt;break;case q.Uint64:r=e.visitUint64||e.visitInt;break;case q.Float:r=e.visitFloat;break;case q.Float16:r=e.visitFloat16||e.visitFloat;break;case q.Float32:r=e.visitFloat32||e.visitFloat;break;case q.Float64:r=e.visitFloat64||e.visitFloat;break;case q.Utf8:r=e.visitUtf8;break;case q.LargeUtf8:r=e.visitLargeUtf8;break;case q.Binary:r=e.visitBinary;break;case q.LargeBinary:r=e.visitLargeBinary;break;case q.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case q.Date:r=e.visitDate;break;case q.DateDay:r=e.visitDateDay||e.visitDate;break;case q.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case q.Timestamp:r=e.visitTimestamp;break;case q.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case q.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case q.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case q.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case q.Time:r=e.visitTime;break;case q.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case q.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case q.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case q.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case q.Decimal:r=e.visitDecimal;break;case q.List:r=e.visitList;break;case q.Struct:r=e.visitStruct;break;case q.Union:r=e.visitUnion;break;case q.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case q.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case q.Dictionary:r=e.visitDictionary;break;case q.Interval:r=e.visitInterval;break;case q.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case q.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case q.Duration:r=e.visitDuration;break;case q.DurationSecond:r=e.visitDurationSecond||e.visitDuration;break;case q.DurationMillisecond:r=e.visitDurationMillisecond||e.visitDuration;break;case q.DurationMicrosecond:r=e.visitDurationMicrosecond||e.visitDuration;break;case q.DurationNanosecond:r=e.visitDurationNanosecond||e.visitDuration;break;case q.FixedSizeList:r=e.visitFixedSizeList;break;case q.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${q[t]}'`)}function RP(e){switch(e.typeId){case q.Null:return q.Null;case q.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?q.Int8:q.Uint8;case 16:return n?q.Int16:q.Uint16;case 32:return n?q.Int32:q.Uint32;case 64:return n?q.Int64:q.Uint64}return q.Int}case q.Float:switch(e.precision){case HM.HALF:return q.Float16;case HM.SINGLE:return q.Float32;case HM.DOUBLE:return q.Float64}return q.Float;case q.Binary:return q.Binary;case q.LargeBinary:return q.LargeBinary;case q.Utf8:return q.Utf8;case q.LargeUtf8:return q.LargeUtf8;case q.Bool:return q.Bool;case q.Decimal:return q.Decimal;case q.Time:switch(e.unit){case WM.SECOND:return q.TimeSecond;case WM.MILLISECOND:return q.TimeMillisecond;case WM.MICROSECOND:return q.TimeMicrosecond;case WM.NANOSECOND:return q.TimeNanosecond}return q.Time;case q.Timestamp:switch(e.unit){case WM.SECOND:return q.TimestampSecond;case WM.MILLISECOND:return q.TimestampMillisecond;case WM.MICROSECOND:return q.TimestampMicrosecond;case WM.NANOSECOND:return q.TimestampNanosecond}return q.Timestamp;case q.Date:switch(e.unit){case UM.DAY:return q.DateDay;case UM.MILLISECOND:return q.DateMillisecond}return q.Date;case q.Interval:switch(e.unit){case GM.DAY_TIME:return q.IntervalDayTime;case GM.YEAR_MONTH:return q.IntervalYearMonth}return q.Interval;case q.Duration:switch(e.unit){case WM.SECOND:return q.DurationSecond;case WM.MILLISECOND:return q.DurationMillisecond;case WM.MICROSECOND:return q.DurationMicrosecond;case WM.NANOSECOND:return q.DurationNanosecond}return q.Duration;case q.Map:return q.Map;case q.List:return q.List;case q.Struct:return q.Struct;case q.Union:switch(e.mode){case VM.Dense:return q.DenseUnion;case VM.Sparse:return q.SparseUnion}return q.Union;case q.FixedSizeBinary:return q.FixedSizeBinary;case q.FixedSizeList:return q.FixedSizeList;case q.Dictionary:return q.Dictionary}throw Error(`Unrecognized type '${q[e.typeId]}'`)}IP.prototype.visitInt8=null,IP.prototype.visitInt16=null,IP.prototype.visitInt32=null,IP.prototype.visitInt64=null,IP.prototype.visitUint8=null,IP.prototype.visitUint16=null,IP.prototype.visitUint32=null,IP.prototype.visitUint64=null,IP.prototype.visitFloat16=null,IP.prototype.visitFloat32=null,IP.prototype.visitFloat64=null,IP.prototype.visitDateDay=null,IP.prototype.visitDateMillisecond=null,IP.prototype.visitTimestampSecond=null,IP.prototype.visitTimestampMillisecond=null,IP.prototype.visitTimestampMicrosecond=null,IP.prototype.visitTimestampNanosecond=null,IP.prototype.visitTimeSecond=null,IP.prototype.visitTimeMillisecond=null,IP.prototype.visitTimeMicrosecond=null,IP.prototype.visitTimeNanosecond=null,IP.prototype.visitDenseUnion=null,IP.prototype.visitSparseUnion=null,IP.prototype.visitIntervalDayTime=null,IP.prototype.visitIntervalYearMonth=null,IP.prototype.visitDuration=null,IP.prototype.visitDurationSecond=null,IP.prototype.visitDurationMillisecond=null,IP.prototype.visitDurationMicrosecond=null,IP.prototype.visitDurationNanosecond=null;var zP=new Float64Array(1),BP=new Uint32Array(zP.buffer);function VP(e){let t=(e&31744)>>10,n=(e&1023)/1024,r=(-1)**((e&32768)>>15);switch(t){case 31:return r*(n?NaN:1/0);case 0:return r*(n?6103515625e-14*n:0)}return r*2**(t-15)*(1+n)}
vendor: 5,689 bytes, line 117
117function VMe(e){if(e!==e)return 32256;zP[0]=e;let t=(BP[1]&2147483648)>>16&65535,n=BP[1]&2146435072,r=0;return n>=1089470464?BP[0]>0?n=31744:(n=(n&2080374784)>>16,r=(BP[1]&1048575)>>10):n<=1056964608?(r=1048576+(BP[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(BP[1]&1048575)+512>>10),t|n|r&65535}var HP=class extends IP{};function UP(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}var HMe=(e,t,n)=>{e[t]=Math.floor(n/864e5)},WP=(e,t,n,r)=>{if(n+1<t.length){let i=FN(t[n]),a=FN(t[n+1]);e.set(r.subarray(0,a-i),i)}},UMe=({offset:e,values:t},n,r)=>{let i=e+n;r?t[i>>3]|=1<<i%8:t[i>>3]&=~(1<<i%8)},GP=({values:e},t,n)=>{e[t]=n},KP=({values:e},t,n)=>{e[t]=n},qP=({values:e},t,n)=>{e[t]=VMe(n)},WMe=(e,t,n)=>{switch(e.type.precision){case HM.HALF:return qP(e,t,n);case HM.SINGLE:case HM.DOUBLE:return KP(e,t,n)}},JP=({values:e},t,n)=>{HMe(e,t,n.valueOf())},YP=({values:e},t,n)=>{e[t]=BigInt(n)},GMe=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},XP=({values:e,valueOffsets:t},n,r)=>WP(e,t,n,r),ZP=({values:e,valueOffsets:t},n,r)=>WP(e,t,n,pM(r)),KMe=(e,t,n)=>{e.type.unit===UM.DAY?JP(e,t,n):YP(e,t,n)},QP=({values:e},t,n)=>{e[t]=BigInt(n/1e3)},$P=({values:e},t,n)=>{e[t]=BigInt(n)},eF=({values:e},t,n)=>{e[t]=BigInt(n*1e3)},tF=({values:e},t,n)=>{e[t]=BigInt(n*1e6)},qMe=(e,t,n)=>{switch(e.type.unit){case WM.SECOND:return QP(e,t,n);case WM.MILLISECOND:return $P(e,t,n);case WM.MICROSECOND:return eF(e,t,n);case WM.NANOSECOND:return tF(e,t,n)}},nF=({values:e},t,n)=>{e[t]=n},rF=({values:e},t,n)=>{e[t]=n},iF=({values:e},t,n)=>{e[t]=n},aF=({values:e},t,n)=>{e[t]=n},JMe=(e,t,n)=>{switch(e.type.unit){case WM.SECOND:return nF(e,t,n);case WM.MILLISECOND:return rF(e,t,n);case WM.MICROSECOND:return iF(e,t,n);case WM.NANOSECOND:return aF(e,t,n)}},YMe=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},XMe=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=mF.getVisitFn(r);if(Array.isArray(n))for(let e=-1,o=i[t],s=i[t+1];o<s;)a(r,o++,n[++e]);else for(let e=-1,o=i[t],s=i[t+1];o<s;)a(r,o++,n.get(++e))},ZMe=(e,t,n)=>{let r=e.children[0],{valueOffsets:i}=e,a=mF.getVisitFn(r),{[t]:o,[t+1]:s}=i,c=n instanceof Map?n.entries():Object.entries(n);for(let e of c)if(a(r,o,e),++o>=s)break},QMe=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),$Me=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),eNe=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),tNe=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),nNe=(e,t,n)=>{let r=e.type.children.map(e=>mF.getVisitFn(e.type)),i=n instanceof Map?eNe(t,n):n instanceof kI?$Me(t,n):Array.isArray(n)?QMe(t,n):tNe(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},rNe=(e,t,n)=>{e.type.mode===VM.Dense?oF(e,t,n):sF(e,t,n)},oF=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];mF.visit(i,e.valueOffsets[t],n)},sF=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];mF.visit(i,t,n)},iNe=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},aNe=(e,t,n)=>{e.type.unit===GM.DAY_TIME?cF(e,t,n):lF(e,t,n)},cF=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},lF=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},uF=({values:e},t,n)=>{e[t]=n},dF=({values:e},t,n)=>{e[t]=n},fF=({values:e},t,n)=>{e[t]=n},pF=({values:e},t,n)=>{e[t]=n},oNe=(e,t,n)=>{switch(e.type.unit){case WM.SECOND:return uF(e,t,n);case WM.MILLISECOND:return dF(e,t,n);case WM.MICROSECOND:return fF(e,t,n);case WM.NANOSECOND:return pF(e,t,n)}},sNe=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=mF.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e<r;)a(i,o+e,n[e]);else for(let e=-1,o=t*r;++e<r;)a(i,o+e,n.get(e))};HP.prototype.visitBool=UP(UMe),HP.prototype.visitInt=UP(GP),HP.prototype.visitInt8=UP(GP),HP.prototype.visitInt16=UP(GP),HP.prototype.visitInt32=UP(GP),HP.prototype.visitInt64=UP(GP),HP.prototype.visitUint8=UP(GP),HP.prototype.visitUint16=UP(GP),HP.prototype.visitUint32=UP(GP),HP.prototype.visitUint64=UP(GP),HP.prototype.visitFloat=UP(WMe),HP.prototype.visitFloat16=UP(qP),HP.prototype.visitFloat32=UP(KP),HP.prototype.visitFloat64=UP(KP),HP.prototype.visitUtf8=UP(ZP),HP.prototype.visitLargeUtf8=UP(ZP),HP.prototype.visitBinary=UP(XP),HP.prototype.visitLargeBinary=UP(XP),HP.prototype.visitFixedSizeBinary=UP(GMe),HP.prototype.visitDate=UP(KMe),HP.prototype.visitDateDay=UP(JP),HP.prototype.visitDateMillisecond=UP(YP),HP.prototype.visitTimestamp=UP(qMe),HP.prototype.visitTimestampSecond=UP(QP),HP.prototype.visitTimestampMillisecond=UP($P),HP.prototype.visitTimestampMicrosecond=UP(eF),HP.prototype.visitTimestampNanosecond=UP(tF),HP.prototype.visitTime=UP(JMe),HP.prototype.visitTimeSecond=UP(nF),HP.prototype.visitTimeMillisecond=UP(rF),HP.prototype.visitTimeMicrosecond=UP(iF),HP.prototype.visitTimeNanosecond=UP(aF),HP.prototype.visitDecimal=UP(YMe),HP.prototype.visitList=UP(XMe),HP.prototype.visitStruct=UP(nNe),HP.prototype.visitUnion=UP(rNe),HP.prototype.visitDenseUnion=UP(oF),HP.prototype.visitSparseUnion=UP(sF),HP.prototype.visitDictionary=UP(iNe),HP.prototype.visitInterval=UP(aNe),HP.prototype.visitIntervalDayTime=UP(cF),HP.prototype.visitIntervalYearMonth=UP(lF),HP.prototype.visitDuration=UP(oNe),HP.prototype.visitDurationSecond=UP(uF),HP.prototype.visitDurationMillisecond=UP(dF),HP.prototype.visitDurationMicrosecond=UP(fF),HP.prototype.visitDurationNanosecond=UP(pF),HP.prototype.visitFixedSizeList=UP(sNe),HP.prototype.visitMap=UP(ZMe);var mF=new HP,hF=Symbol.for(`parent`),gF=Symbol.for(`rowIndex`),_F=class{constructor(e,t){return this[hF]=e,this[gF]=t,new Proxy(this,new lNe)}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[gF],t=this[hF],n=t.type.children,r={};for(let i=-1,a=n.length;++i<a;)r[n[i].name]=UF.visit(t.children[i],e);return r}toString(){return`{${[...this].map(([e,t])=>
117`${PN(e)}: ${PN(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new cNe(this[hF],this[gF])}},cNe=class{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(){let e=this.childIndex;return e<this.numChildren?(this.childIndex=e+1,{done:!1,value:[this.childFields[e].name,UF.visit(this.children[e],this.rowIndex)]}):{done:!0,value:null}}};Object.defineProperties(_F.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[hF]:{writable:!0,enumerable:!1,configurable:!1,value:null},[gF]:{writable:!0,enumerable:!1,configurable:!1,value:-1}});var lNe=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[hF].type.children.map(e=>e.name)}has(e,t){return e[hF].type.children.findIndex(e=>e.name===t)!==-1}getOwnPropertyDescriptor(e,t){if(e[hF].type.children.findIndex(e=>e.name===t)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let n=e[hF].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=UF.visit(e[hF].children[n],e[gF]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[hF].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(mF.visit(e[hF].children[r],e[gF],n),Reflect.set(e,t,n))}},vF=class extends IP{};function yF(e){return(t,n)=>t.getValid(n)?e(t,n):null}var uNe=(e,t)=>864e5*e[t],dNe=(e,t)=>null,bF=(e,t,n)=>{if(n+1>=t.length)return null;let r=FN(t[n]),i=FN(t[n+1]);return e.subarray(r,i)},fNe=({offset:e,values:t},n)=>{let r=e+n;return(t[r>>3]&1<<r%8)!=0},xF=({values:e},t)=>uNe(e,t),SF=({values:e},t)=>FN(e[t]),CF=({stride:e,values:t},n)=>t[e*n],pNe=({stride:e,values:t},n)=>VP(t[e*n]),wF=({values:e},t)=>e[t],mNe=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),TF=({values:e,valueOffsets:t},n)=>bF(e,t,n),EF=({values:e,valueOffsets:t},n)=>{let r=bF(e,t,n);return r===null?null:fM(r)},hNe=({values:e},t)=>e[t],gNe=({type:e,values:t},n)=>e.precision===HM.HALF?VP(t[n]):t[n],_Ne=(e,t)=>e.type.unit===UM.DAY?xF(e,t):SF(e,t),DF=({values:e},t)=>1e3*FN(e[t]),OF=({values:e},t)=>FN(e[t]),kF=({values:e},t)=>IN(e[t],BigInt(1e3)),AF=({values:e},t)=>IN(e[t],BigInt(1e6)),vNe=(e,t)=>{switch(e.type.unit){case WM.SECOND:return DF(e,t);case WM.MILLISECOND:return OF(e,t);case WM.MICROSECOND:return kF(e,t);case WM.NANOSECOND:return AF(e,t)}},jF=({values:e},t)=>e[t],MF=({values:e},t)=>e[t],NF=({values:e},t)=>e[t],PF=({values:e},t)=>e[t],yNe=(e,t)=>{switch(e.type.unit){case WM.SECOND:return jF(e,t);case WM.MILLISECOND:return MF(e,t);case WM.MICROSECOND:return NF(e,t);case WM.NANOSECOND:return PF(e,t)}},bNe=({values:e,stride:t},n)=>OMe.decimal(e.subarray(t*n,t*(n+1))),xNe=(e,t)=>{let{valueOffsets:n,stride:r,children:i}=e,{[t*r]:a,[t*r+1]:o}=n;return new kI([i[0].slice(a,o-a)])},SNe=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new JF(o.slice(i,a-i))},CNe=(e,t)=>new _F(e,t),wNe=(e,t)=>e.type.mode===VM.Dense?FF(e,t):IF(e,t),FF=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return UF.visit(r,e.valueOffsets[t])},IF=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return UF.visit(r,t)},TNe=(e,t)=>e.dictionary?.get(e.values[t]),ENe=(e,t)=>e.type.unit===GM.DAY_TIME?LF(e,t):RF(e,t),LF=({values:e},t)=>e.subarray(2*t,2*(t+1)),RF=({values:e},t)=>{let n=e[t],r=new Int32Array(2);return r[0]=Math.trunc(n/12),r[1]=Math.trunc(n%12),r},zF=({values:e},t)=>e[t],BF=({values:e},t)=>e[t],VF=({values:e},t)=>e[t],HF=({values:e},t)=>e[t],DNe=(e,t)=>{switch(e.type.unit){case WM.SECOND:return zF(e,t);case WM.MILLISECOND:return BF(e,t);case WM.MICROSECOND:return VF(e,t);case WM.NANOSECOND:return HF(e,t)}},ONe=(e,t)=>{let{stride:n,children:r}=e;return new kI([r[0].slice(t*n,n)])};vF.prototype.visitNull=yF(dNe),vF.prototype.visitBool=yF(fNe),vF.prototype.visitInt=yF(hNe),vF.prototype.visitInt8=yF(CF),vF.prototype.visitInt16=yF(CF),vF.prototype.visitInt32=yF(CF),vF.prototype.visitInt64=yF(wF),vF.prototype.visitUint8=yF(CF),vF.prototype.visitUint16=yF(CF),vF.prototype.visitUint32=yF(CF),vF.prototype.visitUint64=yF(wF),vF.prototype.visitFloat=yF(gNe),vF.prototype.visitFloat16=yF(pNe),vF.prototype.visitFloat32=yF(CF),vF.prototype.visitFloat64=yF(CF),vF.prototype.visitUtf8=yF(EF),vF.prototype.visitLargeUtf8=yF(EF),vF.prototype.visitBinary=yF(TF),vF.prototype.visitLargeBinary=yF(TF),vF.prototype.visitFixedSizeBinary=yF(mNe),vF.prototype.visitDate=yF(_Ne),vF.prototype.visitDateDay=yF(xF),vF.prototype.visitDateMillisecond=yF(SF),vF.prototype.visitTimestamp=yF(vNe),vF.prototype.visitTimestampSecond=yF(DF),vF.prototype.visitTimestampMillisecond=yF(OF),vF.prototype.visitTimestampMicrosecond=yF(kF),vF.prototype.visitTimestampNanosecond=yF(AF),vF.prototype.visitTime=yF(yNe),vF.prototype.visitTimeSecond=yF(jF),vF.prototype.visitTimeMillisecond=yF(MF),vF.prototype.visitTimeMicrosecond=yF(NF),vF.prototype.visitTimeNanosecond=yF(PF),vF.prototype.visitDecimal=yF(bNe),vF.prototype.visitList=yF(xNe),vF.prototype.visitStruct=yF(CNe),vF.prototype.visitUnion=yF(wNe),vF.prototype.visitDenseUnion=yF(FF),vF.prototype.visitSparseUnion=yF(IF),vF.prototype.visitDictionary=yF(TNe),vF.prototype.visitInterval=yF(ENe),vF.prototype.visitIntervalDayTime=yF(LF),vF.prototype.visitIntervalYearMonth=yF(RF),vF.prototype.visitDuration=yF(DNe),vF.prototype.visitDurationSecond=yF(zF),vF.prototype.visitDurationMillisecond=yF(BF),vF.prototype.visitDurationMicrosecond=yF(VF),vF.prototype.visitDurationNanosecond=yF(HF),vF.prototype.visitFixedSizeList=yF(ONe),vF.prototype.visitMap=yF(SNe);var UF=new vF,WF=Symbol.for(`keys`),GF=Symbol.for(`vals`),KF=Symbol.for(`kKeysAsStrings`),qF=Symbol.for(`_kKeysAsStrings`),JF=class{constructor(e){return this[WF]=new kI([e.children[0]]).memoize(),this[GF]=e.children[1],new Proxy(this,new ANe)}get[KF](){return this[qF]||(this[qF]=Array.from(this[WF].toArray(),String))}[Symbol.iterator](){return new kNe(this[WF],this[GF])}get size(){return this[WF].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[WF],t=this[GF],n={};for(let r=-1,i=e.length;++r<i;)n[e.get(r)]=UF.visit(t,r);return n}toString(){return`{${[...this].map(([e,t])=>
117`${PN(e)}: ${PN(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},kNe=class{constructor(e,t){this.keys=e,this.vals=t,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){let e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),UF.visit(this.vals,e)]})}},ANe=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[KF]}has(e,t){return e[KF].includes(t)}getOwnPropertyDescriptor(e,t){if(e[KF].indexOf(t)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let n=e[KF].indexOf(t);if(n!==-1){let r=UF.visit(Reflect.get(e,GF),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[KF].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(mF.visit(Reflect.get(e,GF),r,n),Reflect.set(e,t,n))}};Object.defineProperties(JF.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[WF]:{writable:!0,enumerable:!1,configurable:!1,value:null},[GF]:{writable:!0,enumerable:!1,configurable:!1,value:null},[qF]:{writable:!0,enumerable:!1,configurable:!1,value:null}});var YF;function XF(e,t,n,r){let{length:i=0}=e,a=typeof t==`number`?t:0,o=typeof n==`number`?n:i;return a<0&&(a=(a%i+i)%i),o<0&&(o=(o%i+i)%i),o<a&&(YF=a,a=o,o=YF),o>i&&(o=i),r?r(e,a,o):[a,o]}var ZF=(e,t)=>e<0?t+e:e,QF=e=>e!==e;function $F(e){if(typeof e!=`object`||!e)return QF(e)?QF:t=>t===e;if(e instanceof Date){let t=e.valueOf();return e=>e instanceof Date?e.valueOf()===t:!1}return ArrayBuffer.isView(e)?t=>t?_Me(e,t):!1:e instanceof Map?MNe(e):Array.isArray(e)?jNe(e):e instanceof kI?NNe(e):PNe(e,!0)}function jNe(e){let t=[];for(let n=-1,r=e.length;++n<r;)t[n]=$F(e[n]);return eI(t)}function MNe(e){let t=-1,n=[];for(let r of e.values())n[++t]=$F(r);return eI(n)}function NNe(e){let t=[];for(let n=-1,r=e.length;++n<r;)t[n]=$F(e.get(n));return eI(t)}function PNe(e,t=!1){let n=Object.keys(e);if(!t&&n.length===0)return()=>!1;let r=[];for(let t=-1,i=n.length;++t<i;)r[t]=$F(e[n[t]]);return eI(r,n)}function eI(e,t){return n=>{if(!n||typeof n!=`object`)return!1;switch(n.constructor){case Array:return FNe(e,n);case Map:return tI(e,n,n.keys());case JF:case _F:case Object:case void 0:return tI(e,n,t||Object.keys(n))}return n instanceof kI?INe(e,n):!1}}function FNe(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++r<n;)if(!e[r](t[r]))return!1;return!0}function INe(e,t){let 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}function tI(e,t,n){let r=n[Symbol.iterator](),i=t instanceof Map?t.keys():Object.keys(t)[Symbol.iterator](),a=t instanceof Map?t.values():Object.values(t)[Symbol.iterator](),o=0,s=e.length,c=a.next(),l=r.next(),u=i.next();for(;o<s&&!l.done&&!u.done&&!c.done&&!(l.value!==u.value||!e[o](c.value));++o,l=r.next(),u=i.next(),c=a.next());return o===s&&l.done&&u.done&&c.done?!0:(r.return&&r.return(),i.return&&i.return(),a.return&&a.return(),!1)}function nI(e,t,n,r){return(n&1<<r)!=0}function LNe(e,t,n,r){return(n&1<<r)>>r}function rI(e,t,n){let r=n.byteLength+7&-8;if(e>0||n.byteLength<r){let i=new Uint8Array(r);return i.set(e%8==0?n.subarray(e>>3):iI(new aI(n,e,t,null,nI)).subarray(0,r)),i}return n}function iI(e){let t=[],n=0,r=0,i=0;for(let a of e)a&&(i|=1<<r),++r===8&&(t[n++]=i,i=r=0);(n===0||r>0)&&(t[n++]=i);let a=new Uint8Array(t.length+7&-8);return a.set(t),a}var aI=class{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?(this.bit===8&&(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 oI(e,t,n){if(n-t<=0)return 0;if(n-t<8){let r=0;for(let i of new aI(e,t,n-t,e,LNe))r+=i;return r}let r=n>>3<<3,i=t+(t%8==0?0:8-t%8);return oI(e,t,i)+oI(e,r,n)+RNe(e,i>>3,r-i>>3)}function RNe(e,t,n){let r=0,i=Math.trunc(t),a=new DataView(e.buffer,e.byteOffset,e.byteLength),o=n===void 0?e.byteLength:i+n;for(;o-i>=4;)r+=sI(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=sI(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=sI(a.getUint8(i)),i+=1;return r}function sI(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}var cI=class e{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){let{type:e}=this;return fP.isSparseUnion(e)||fP.isDenseUnion(e)?this.children.some(e=>
117e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let e=0,{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(){if(fP.isUnion(this.type))return this.children.reduce((e,t)=>e+t.nullCount,0);let e=this._nullCount,t;return e<=-1&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-oI(t,this.offset,this.offset+this.length)),e}constructor(t,n,r,i,a,o=[],s){this.type=t,this.children=o,this.dictionary=s,this.offset=Math.floor(Math.max(n||0,0)),this.length=Math.floor(Math.max(r||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let c;a instanceof e?(this.stride=a.stride,this.values=a.values,this.typeIds=a.typeIds,this.nullBitmap=a.nullBitmap,this.valueOffsets=a.valueOffsets):(this.stride=FP(t),a&&((c=a[0])&&(this.valueOffsets=c),(c=a[1])&&(this.values=c),(c=a[2])&&(this.nullBitmap=c),(c=a[3])&&(this.typeIds=c)))}getValid(e){let{type:t}=this;if(fP.isUnion(t)){let n=t,r=this.children[n.typeIdToChildIndex[this.typeIds[e]]],i=n.mode===VM.Dense?this.valueOffsets[e]:e;return r.getValid(i)}if(this.nullable&&this.nullCount>0){let t=this.offset+e;return(this.nullBitmap[t>>3]&1<<t%8)!=0}return!0}setValid(e,t){let n,{type:r}=this;if(fP.isUnion(r)){let i=r,a=this.children[i.typeIdToChildIndex[this.typeIds[e]]],o=i.mode===VM.Dense?this.valueOffsets[e]:e;n=a.getValid(o),a.setValid(o,t)}else{let{nullBitmap:r}=this,{offset:i,length:a}=this,o=i+e,s=1<<o%8,c=o>>3;(!r||r.byteLength<=c)&&(r=new Uint8Array((i+a+63&-64)>>3).fill(255),this.nullCount>0?(r.set(rI(i,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:r})):Object.assign(this,{nullBitmap:r,_nullCount:0}));let l=r[c];n=(l&s)!==0,r[c]=t?l|s:l&~s}return n!==!!t&&(this._nullCount=this.nullCount+(t?-1:1)),t}clone(t=this.type,n=this.offset,r=this.length,i=this._nullCount,a=this,o=this.children){return new e(t,n,r,i,a,o,this.dictionary)}slice(e,t){let{stride:n,typeId:r,children:i}=this,a=(this._nullCount===0)-1,o=r===16?n:1,s=this._sliceBuffers(e,t,n,r);return this.clone(this.type,this.offset+e,t,a,s,i.length===0||this.valueOffsets?i:this._sliceChildren(i,o*e,o*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===q.Null)return this.clone(this.type,0,e,0);let{length:t,nullCount:n}=this,r=new Uint8Array((e+63&-64)>>3).fill(255,0,t>>3);r[t>>3]=(1<<t-(t&-8))-1,n>0&&r.set(rI(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[NN.VALIDITY]=r,this.clone(this.type,0,e,n+(e-t),i)}_sliceBuffers(e,t,n,r){let i,{buffers:a}=this;return(i=a[NN.TYPE])&&(a[NN.TYPE]=i.subarray(e,e+t)),(i=a[NN.OFFSET])&&(a[NN.OFFSET]=i.subarray(e,e+t+1))||(i=a[NN.DATA])&&(a[NN.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};cI.prototype.children=Object.freeze([]);var zNe=new class e extends IP{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new cI(t,n,r,r)}visitBool(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new cI(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new cI(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new cI(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=NM(e.data),i=NM(e.nullBitmap),a=jM(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new cI(t,n,o,s,[a,r,i])}visitLargeUtf8(e){let{type:t,offset:n=0}=e,r=NM(e.data),i=NM(e.nullBitmap),a=MM(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new cI(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=NM(e.data),i=NM(e.nullBitmap),a=jM(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new cI(t,n,o,s,[a,r,i])}visitLargeBinary(e){let{type:t,offset:n=0}=e,r=NM(e.data),i=NM(e.nullBitmap),a=MM(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new cI(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length/FP(t),nullCount:o=e.nullBitmap?-1:0}=e;return new cI(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length/FP(t),nullCount:o=e.nullBitmap?-1:0}=e;return new cI(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length/FP(t),nullCount:o=e.nullBitmap?-1:0}=e;return new cI(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length/FP(t),nullCount:o=e.nullBitmap?-1:0}=e;return new cI(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length/FP(t),nullCount:o=e.nullBitmap?-1:0}=e;return new cI(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=NM(e.nullBitmap),a=jM(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new cI(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=NM(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new cI(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=AM(t.ArrayType,e.typeIds),{length:a=i.length,nullCount:o=-1}=e;return fP.isSparseUnion(t)?new cI(t,n,a,o,[void 0,void 0,void 0,i],r):new cI(t,n,a,o,[jM(e.valueOffsets),void 0,void 0,i],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=NM(t.nullBitmap),a=AM(n.indices.ArrayType,t.data),{dictionary:o=new kI([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new cI(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length/FP(t),nullCount:o=e.nullBitmap?-1:0}=e;return new cI(t,n,a,o,[void 0,i,r])}visitDuration(e){let{type:t,offset:n=0}=e,r=NM(e.nullBitmap),i=AM(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new cI(t,n,a,o,[void 0,i,r])}visitFixedSizeList(t){let{type:n,offset:r=0,child:i=new e().visit({type:n.valueType})}=t,a=NM(t.nullBitmap),{length:o=i.length/FP(n),nullCount:s=t.nullBitmap?-1:0}=t;return new cI(n,r,o,s,[void 0,void 0,a],[i])}visitMap(t){let{type:n,offset:r=0,child:i=new e().visit({type:n.childType})}=t,a=NM(t.nullBitmap),o=jM(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new cI(n,r,s,c,[o,void 0,a],[i])}};function lI(e){return zNe.visit(e)}var uI=class{constructor(e=0,t){this.numChunks=e,this.getChunkIterator=t,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndex<this.numChunks;){let 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 BNe(e){return e.some(e=>e.nullable)}function dI(e){return e.reduce((e,t)=>
vendor: 6,149 bytes, line 117
117e+t.nullCount,0)}function fI(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function pI(e,t,n,r){let i=[];for(let a=-1,o=e.length;++a<o;){let o=e[a],s=t[a],{length:c}=o;if(s>=r)break;if(n>=s+c)continue;if(s>=n&&s+c<=r){i.push(o);continue}let l=Math.max(0,n-s),u=Math.min(r-s,c);i.push(o.slice(l,u-l))}return i.length===0&&i.push(e[0].slice(0,0)),i}function mI(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n<t[o]?r(e,i,n-t[i]):null;a=i+Math.trunc((o-i)*.5),n<t[a]?o=a:i=a}while(i<o)}function hI(e,t){return e.getValid(t)}function gI(e){function t(t,n,r){return e(t[n],r)}return function(e){let n=this.data;return mI(n,this._offsets,e,t)}}function _I(e){let t;function n(n,r,i){return e(n[r],i,t)}return function(e,r){let i=this.data;t=r;let a=mI(i,this._offsets,e,n);return t=void 0,a}}function vI(e){let t;function n(n,r,i){let a=i,o=0,s=0;for(let i=r-1,c=n.length;++i<c;){let r=n[i];if(~(o=e(r,t,a)))return s+o;a=0,s+=r.length}return-1}return function(e,r){t=e;let i=this.data,a=typeof r==`number`?mI(i,this._offsets,r,n):n(i,0,0);return t=void 0,a}}var yI=class extends IP{};function VNe(e,t){return t===null&&e.length>0?0:-1}function HNe(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new aI(n,e.offset+(t||0),e.length,n,nI)){if(!i)return r;++r}return-1}function bI(e,t,n){if(t===void 0)return-1;if(t===null)switch(e.typeId){case q.Union:break;case q.Dictionary:break;default:return HNe(e,n)}let r=UF.getVisitFn(e),i=$F(t);for(let t=(n||0)-1,a=e.length;++t<a;)if(i(r(e,t)))return t;return-1}function xI(e,t,n){let r=UF.getVisitFn(e),i=$F(t);for(let t=(n||0)-1,a=e.length;++t<a;)if(i(r(e,t)))return t;return-1}yI.prototype.visitNull=VNe,yI.prototype.visitBool=bI,yI.prototype.visitInt=bI,yI.prototype.visitInt8=bI,yI.prototype.visitInt16=bI,yI.prototype.visitInt32=bI,yI.prototype.visitInt64=bI,yI.prototype.visitUint8=bI,yI.prototype.visitUint16=bI,yI.prototype.visitUint32=bI,yI.prototype.visitUint64=bI,yI.prototype.visitFloat=bI,yI.prototype.visitFloat16=bI,yI.prototype.visitFloat32=bI,yI.prototype.visitFloat64=bI,yI.prototype.visitUtf8=bI,yI.prototype.visitLargeUtf8=bI,yI.prototype.visitBinary=bI,yI.prototype.visitLargeBinary=bI,yI.prototype.visitFixedSizeBinary=bI,yI.prototype.visitDate=bI,yI.prototype.visitDateDay=bI,yI.prototype.visitDateMillisecond=bI,yI.prototype.visitTimestamp=bI,yI.prototype.visitTimestampSecond=bI,yI.prototype.visitTimestampMillisecond=bI,yI.prototype.visitTimestampMicrosecond=bI,yI.prototype.visitTimestampNanosecond=bI,yI.prototype.visitTime=bI,yI.prototype.visitTimeSecond=bI,yI.prototype.visitTimeMillisecond=bI,yI.prototype.visitTimeMicrosecond=bI,yI.prototype.visitTimeNanosecond=bI,yI.prototype.visitDecimal=bI,yI.prototype.visitList=bI,yI.prototype.visitStruct=bI,yI.prototype.visitUnion=bI,yI.prototype.visitDenseUnion=xI,yI.prototype.visitSparseUnion=xI,yI.prototype.visitDictionary=bI,yI.prototype.visitInterval=bI,yI.prototype.visitIntervalDayTime=bI,yI.prototype.visitIntervalYearMonth=bI,yI.prototype.visitDuration=bI,yI.prototype.visitDurationSecond=bI,yI.prototype.visitDurationMillisecond=bI,yI.prototype.visitDurationMicrosecond=bI,yI.prototype.visitDurationNanosecond=bI,yI.prototype.visitFixedSizeList=bI,yI.prototype.visitMap=bI;var SI=new yI,CI=class extends IP{};function wI(e){let{type:t}=e;if(e.nullCount===0&&e.stride===1&&(fP.isInt(t)&&t.bitWidth!==64||fP.isTime(t)&&t.bitWidth!==64||fP.isFloat(t)&&t.precision!==HM.HALF))return new uI(e.data.length,t=>{let n=e.data[t];return n.values.subarray(0,n.length)[Symbol.iterator]()});let n=0;return new uI(e.data.length,t=>{let r=e.data[t].length,i=e.slice(n,n+r);return n+=r,new UNe(i)})}var UNe=class{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}};CI.prototype.visitNull=wI,CI.prototype.visitBool=wI,CI.prototype.visitInt=wI,CI.prototype.visitInt8=wI,CI.prototype.visitInt16=wI,CI.prototype.visitInt32=wI,CI.prototype.visitInt64=wI,CI.prototype.visitUint8=wI,CI.prototype.visitUint16=wI,CI.prototype.visitUint32=wI,CI.prototype.visitUint64=wI,CI.prototype.visitFloat=wI,CI.prototype.visitFloat16=wI,CI.prototype.visitFloat32=wI,CI.prototype.visitFloat64=wI,CI.prototype.visitUtf8=wI,CI.prototype.visitLargeUtf8=wI,CI.prototype.visitBinary=wI,CI.prototype.visitLargeBinary=wI,CI.prototype.visitFixedSizeBinary=wI,CI.prototype.visitDate=wI,CI.prototype.visitDateDay=wI,CI.prototype.visitDateMillisecond=wI,CI.prototype.visitTimestamp=wI,CI.prototype.visitTimestampSecond=wI,CI.prototype.visitTimestampMillisecond=wI,CI.prototype.visitTimestampMicrosecond=wI,CI.prototype.visitTimestampNanosecond=wI,CI.prototype.visitTime=wI,CI.prototype.visitTimeSecond=wI,CI.prototype.visitTimeMillisecond=wI,CI.prototype.visitTimeMicrosecond=wI,CI.prototype.visitTimeNanosecond=wI,CI.prototype.visitDecimal=wI,CI.prototype.visitList=wI,CI.prototype.visitStruct=wI,CI.prototype.visitUnion=wI,CI.prototype.visitDenseUnion=wI,CI.prototype.visitSparseUnion=wI,CI.prototype.visitDictionary=wI,CI.prototype.visitInterval=wI,CI.prototype.visitIntervalDayTime=wI,CI.prototype.visitIntervalYearMonth=wI,CI.prototype.visitDuration=wI,CI.prototype.visitDurationSecond=wI,CI.prototype.visitDurationMillisecond=wI,CI.prototype.visitDurationMicrosecond=wI,CI.prototype.visitDurationNanosecond=wI,CI.prototype.visitFixedSizeList=wI,CI.prototype.visitMap=wI;var TI=new CI,EI,DI={},OI={},kI=class e{constructor(t){let n=t[0]instanceof e?t.flatMap(e=>e.data):t;if(n.length===0||n.some(e=>!(e instanceof cI)))throw TypeError(`Vector constructor expects an Array of Data instances.`);let r=n[0]?.type;switch(n.length){case 0:this._offsets=[0];break;case 1:{let{get:e,set:t,indexOf:i}=DI[r.typeId],a=n[0];this.isValid=e=>hI(a,e),this.get=t=>e(a,t),this.set=(e,n)=>t(a,e,n),this.indexOf=e=>i(a,e),this._offsets=[0,a.length];break}default:Object.setPrototypeOf(this,OI[r.typeId]),this._offsets=fI(n);break}this.data=n,this.type=r,this.stride=FP(r),this.numChildren=r.children?.length??0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((e,t)=>
117e+t.byteLength,0)}get nullable(){return BNe(this.data)}get nullCount(){return dI(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${q[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(ZF(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return TI.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(XF(this,t,n,({data:e,_offsets:t},n,r)=>pI(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case q.Int:case q.Float:case q.Decimal:case q.Time:case q.Timestamp:switch(t.length){case 0:return new i;case 1:return t[0].values.subarray(0,n*r);default:return t.reduce((e,{values:t,length:n})=>(e.array.set(t.subarray(0,n*r),e.offset),e.offset+=n*r,e),{array:new i(n*r),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(`,`)}]`}getChild(e){return this.getChildAt(this.type.children?.findIndex(t=>t.name===e))}getChildAt(t){return t>-1&&t<this.numChildren?new e(this.data.map(({children:e})=>e[t])):null}get isMemoized(){return fP.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(fP.isDictionary(this.type)){let t=new AI(this.data[0].dictionary);return new e(this.data.map(e=>{let n=e.clone();return n.dictionary=t,n}))}return new AI(this)}unmemoize(){if(fP.isDictionary(this.type)&&this.isMemoized){let t=this.data[0].dictionary.unmemoize();return new e(this.data.map(e=>{let n=e.clone();return n.dictionary=t,n}))}return this}};EI=Symbol.toStringTag,kI[EI]=(e=>{e.type=fP.prototype,e.data=[],e.length=0,e.stride=1,e.numChildren=0,e._offsets=new Uint32Array([0]),e[Symbol.isConcatSpreadable]=!0;let t=Object.keys(q).map(e=>q[e]).filter(e=>typeof e==`number`&&e!==q.NONE);for(let n of t)DI[n]={get:UF.getVisitFnByTypeId(n),set:mF.getVisitFnByTypeId(n),indexOf:SI.getVisitFnByTypeId(n)},OI[n]=Object.create(e,{isValid:{value:gI(hI)},get:{value:gI(UF.getVisitFnByTypeId(n))},set:{value:_I(mF.getVisitFnByTypeId(n))},indexOf:{value:vI(SI.getVisitFnByTypeId(n))}});return`Vector`})(kI.prototype);var AI=class e extends kI{constructor(t){super(t.data);let n=this.get,r=this.set,i=this.slice,a=Array(this.length);Object.defineProperty(this,"get",{value(e){let t=a[e];if(t!==void 0)return t;let r=n.call(this,e);return a[e]=r,r}}),Object.defineProperty(this,"set",{value(e,t){r.call(this,e,t),a[e]=t}}),Object.defineProperty(this,"slice",{value:(t,n)=>new e(i.call(this,t,n))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new kI(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}},jI=class{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(BigInt(r??0)),e.pad(4),e.writeInt32(n),e.writeInt64(BigInt(t??0)),e.offset()}},MI=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFooter(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):BM.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new jN).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){let n=this.bb.__offset(this.bb_pos,8);return n?(t||new jI).__init(this.bb.__vector(this.bb_pos+n)+e*24,this.bb):null}dictionariesLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,t){let n=this.bb.__offset(this.bb_pos,10);return n?(t||new jI).__init(this.bb.__vector(this.bb_pos+n)+e*24,this.bb):null}recordBatchesLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,12);return n?(t||new lN).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let 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,BM.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)}}
vendor: 22,496 bytes, line 117
117,NI=class e{constructor(e=[],t,n,r=BM.V5){this.fields=e||[],this.metadata=t||new Map,n||=II(this.fields),this.dictionaries=n,this.metadataVersion=r}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(t){let n=new Set(t);return new e(this.fields.filter(e=>n.has(e.name)),this.metadata)}selectAt(t){return new e(t.map(e=>this.fields[e]).filter(Boolean),this.metadata)}assign(...t){let n=t[0]instanceof e?t[0]:Array.isArray(t[0])?new e(t[0]):new e(t),r=[...this.fields],i=FI(FI(new Map,this.metadata),n.metadata),a=n.fields.filter(e=>{let t=r.findIndex(t=>t.name===e.name);return~t?(r[t]=e.clone({metadata:FI(FI(new Map,r[t].metadata),e.metadata)}))&&!1:!0}),o=II(a,new Map);return new e([...r,...a],i,new Map([...this.dictionaries,...o]))}};NI.prototype.fields=null,NI.prototype.metadata=null,NI.prototype.dictionaries=null;var PI=class e{static new(...t){let[n,r,i,a]=t;return t[0]&&typeof t[0]==`object`&&({name:n}=t[0],r===void 0&&(r=t[0].type),i===void 0&&(i=t[0].nullable),a===void 0&&(a=t[0].metadata)),new e(`${n}`,r,i,a)}constructor(e,t,n=!1,r){this.name=e,this.type=t,this.nullable=n,this.metadata=r||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return`Field`}toString(){return`${this.name}: ${this.type}`}clone(...t){let[n,r,i,a]=t;return!t[0]||typeof t[0]!=`object`?[n=this.name,r=this.type,i=this.nullable,a=this.metadata]=t:{name:n=this.name,type:r=this.type,nullable:i=this.nullable,metadata:a=this.metadata}=t[0],e.new(n,r,i,a)}};PI.prototype.type=null,PI.prototype.name=null,PI.prototype.nullable=null,PI.prototype.metadata=null;function FI(e,t){return new Map([...e||new Map,...t||new Map])}function II(e,t=new Map){for(let n=-1,r=e.length;++n<r;){let r=e[n].type;if(fP.isDictionary(r)){if(!t.has(r.id))t.set(r.id,r.dictionary);else if(t.get(r.id)!==r.dictionary)throw Error(`Cannot create Schema containing two different dictionaries with the same Id`)}r.children&&r.children.length>0&&II(r.children,t)}return t}var WNe=QM,GNe=ZM,LI=class{static decode(e){e=new GNe(NM(e));let t=MI.getRootAsFooter(e);return new KNe(NI.decode(t.schema(),new Map,t.version()),t)}static encode(e){let t=new WNe,n=NI.encode(t,e.schema);MI.startRecordBatchesVector(t,e.numRecordBatches);for(let n of[...e.recordBatches()].slice().reverse())RI.encode(t,n);let r=t.endVector();MI.startDictionariesVector(t,e.numDictionaries);for(let n of[...e.dictionaryBatches()].slice().reverse())RI.encode(t,n);let i=t.endVector();return MI.startFooter(t),MI.addSchema(t,n),MI.addVersion(t,BM.V5),MI.addRecordBatches(t,r),MI.addDictionaries(t,i),MI.finishFooterBuffer(t,MI.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(e,t=BM.V5,n,r){this.schema=e,this.version=t,n&&(this._recordBatches=n),r&&(this._dictionaryBatches=r)}*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}},KNe=class extends LI{get numRecordBatches(){return this._footer.recordBatchesLength()}get numDictionaries(){return this._footer.dictionariesLength()}constructor(e,t){super(e,t.version()),this._footer=t}getRecordBatch(e){if(e>=0&&e<this.numRecordBatches){let t=this._footer.recordBatches(e);if(t)return RI.decode(t)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){let t=this._footer.dictionaries(e);if(t)return RI.decode(t)}return null}},RI=class e{static decode(t){return new e(t.metaDataLength(),t.bodyLength(),t.offset())}static encode(e,t){let{metaDataLength:n}=t,r=BigInt(t.offset),i=BigInt(t.bodyLength);return jI.createBlock(e,r,n,i)}constructor(e,t,n){this.metaDataLength=e,this.offset=FN(n),this.bodyLength=FN(t)}},zI=Object.freeze({done:!0,value:void 0}),BI=class{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}},VI=class{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.toDOMStream()}_getNodeStream(){return this._nodeStream||=this.toNodeStream()}},qNe=class extends VI{constructor(){super(),this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return oM(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){let{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(zI);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return LM.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return LM.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return oM(this,void 0,void 0,function*(){return yield this.abort(e),zI})}return(e){return oM(this,void 0,void 0,function*(){return yield this.close(),zI})}read(e){return oM(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return oM(this,void 0,void 0,function*(){return(yield this.next(e,`peek`)).value})}next(...e){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(zI)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw Error(`AsyncQueue is closed`)}},HI=class extends qNe{write(e){if((e=NM(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?fM(this.toUint8Array(!0)):this.toUint8Array(!1).then(fM)}toUint8Array(e=!1){return e?kM(this._values)[0]:oM(this,void 0,void 0,function*(){var e,t,n,r;let i=[],a=0;try{for(var o=!0,s=dM(this),c;c=yield s.next(),e=c.done,!e;o=!0){r=c.value,o=!1;let e=r;i.push(e),a+=e.byteLength}}catch(e){t={error:e}}finally{try{!o&&!e&&(n=s.return)&&(yield n.call(s))}finally{if(t)throw t.error}}return kM(i,a)[0]})}},UI=class{constructor(e){e&&(this.source=new JNe(LM.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)}},WI=class e{constructor(t){t instanceof e?this.source=t.source:t instanceof HI?this.source=new GI(LM.fromAsyncIterable(t)):EM(t)?this.source=new GI(LM.fromNodeStream(t)):TM(t)?this.source=new GI(LM.fromDOMStream(t)):CM(t)?this.source=new GI(LM.fromDOMStream(t.body)):vM(t)?this.source=new GI(LM.fromIterable(t)):(_M(t)||yM(t))&&(this.source=new GI(LM.fromAsyncIterable(t)))}[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)}},JNe=class{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,t=`read`){return this.source.next({cmd:t,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||zI)}return(e){return Object.create(this.source.return&&this.source.return(e)||zI)}},GI=class{constructor(e){this.source=e,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}cancel(e){return oM(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return oM(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return oM(this,void 0,void 0,function*(){return(yield this.next(e,`peek`)).value})}next(e){return oM(this,arguments,void 0,function*(e,t=`read`){return yield this.source.next({cmd:t,size:e})})}throw(e){return oM(this,void 0,void 0,function*(){let t=this.source.throw&&(yield this.source.throw(e))||zI;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return oM(this,void 0,void 0,function*(){let t=this.source.return&&(yield this.source.return(e))||zI;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}},KI=class extends UI{constructor(e,t){super(),this.position=0,this.buffer=NM(e),this.size=t===void 0?this.buffer.byteLength:t}readInt32(e){let{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){let{buffer:t,size:n,position:r}=this;return t&&r<n?(typeof e!=`number`&&(e=1/0),this.position=Math.min(n,r+Math.min(n-r,e)),t.subarray(r,this.position)):null}readAt(e,t){let n=this.buffer,r=Math.min(this.size,e+t);return n?n.subarray(e,r):new Uint8Array(t)}close(){this.buffer&&=null}throw(e){return this.close(),{done:!0,value:e}}return(e){return this.close(),{done:!0,value:e}}},qI=class extends WI{constructor(e,t){super(),this.position=0,this._handle=e,typeof t==`number`?this.size=t:this._pending=oM(this,void 0,void 0,function*(){this.size=(yield e.stat()).size,delete this._pending})}readInt32(e){return oM(this,void 0,void 0,function*(){let{buffer:t,byteOffset:n}=yield this.readAt(e,4);return new DataView(t,n).getInt32(0,!0)})}seek(e){return oM(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 oM(this,void 0,void 0,function*(){this._pending&&(yield this._pending);let{_handle:t,size:n,position:r}=this;if(t&&r<n){typeof e!=`number`&&(e=1/0);let i=r,a=0,o=0,s=Math.min(n,i+Math.min(n-i,e)),c=new Uint8Array(Math.max(0,(this.position=s)-i));for(;(i+=o)<s&&(a+=o)<c.byteLength;)({bytesRead:o}=yield t.read(c,a,c.byteLength-a,i));return c}return null})}readAt(e,t){return oM(this,void 0,void 0,function*(){this._pending&&(yield this._pending);let{_handle:n,size:r}=this;if(n&&e+t<r){let i=Math.min(r,e+t),a=new Uint8Array(i-e);return(yield n.read(a,0,t,e)).buffer}return new Uint8Array(t)})}close(){return oM(this,void 0,void 0,function*(){let e=this._handle;this._handle=null,e&&(yield e.close())})}throw(e){return oM(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}return(e){return oM(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}},YNe=65536;function JI(e){return e<0&&(e=4294967295+e+1),`0x${e.toString(16)}`}var YI=8,XI=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8],ZI=class{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){let t=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),n=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),r=t[3]*n[3];this.buffer[0]=r&65535;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?YNe: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){let 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`${JI(this.buffer[1])} ${JI(this.buffer[0])}`}},QI=class e extends ZI{times(e){return this._times(e),this}plus(e){return this._plus(e),this}static from(t,n=new Uint32Array(2)){return e.fromString(typeof t==`string`?t:t.toString(),n)}static fromNumber(t,n=new Uint32Array(2)){return e.fromString(t.toString(),n)}static fromString(t,n=new Uint32Array(2)){let r=t.length,i=new e(n);for(let n=0;n<r;){let a=YI<r-n?YI:r-n,o=new e(new Uint32Array([Number.parseInt(t.slice(n,n+a),10),0])),s=new e(new Uint32Array([XI[a],0]));i.times(s),i.plus(o),n+=a}return i}static convertArray(t){let n=new Uint32Array(t.length*2);for(let r=-1,i=t.length;++r<i;)e.from(t[r],new Uint32Array(n.buffer,n.byteOffset+2*r*4,2));return n}static multiply(t,n){return new e(new Uint32Array(t.buffer)).times(n)}static add(t,n){return new e(new Uint32Array(t.buffer)).plus(n)}},$I=class e extends ZI{negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[0]==0&&++this.buffer[1],this}times(e){return this._times(e),this}plus(e){return this._plus(e),this}lessThan(e){let t=this.buffer[1]<<0,n=e.buffer[1]<<0;return t<n||t===n&&this.buffer[0]<e.buffer[0]}static from(t,n=new Uint32Array(2)){return e.fromString(typeof t==`string`?t:t.toString(),n)}static fromNumber(t,n=new Uint32Array(2)){return e.fromString(t.toString(),n)}static fromString(t,n=new Uint32Array(2)){let r=t.startsWith(`-`),i=t.length,a=new e(n);for(let n=+!!r;n<i;){let r=YI<i-n?YI:i-n,o=new e(new Uint32Array([Number.parseInt(t.slice(n,n+r),10),0])),s=new e(new Uint32Array([XI[r],0]));a.times(s),a.plus(o),n+=r}return r?a.negate():a}static convertArray(t){let n=new Uint32Array(t.length*2);for(let r=-1,i=t.length;++r<i;)e.from(t[r],new Uint32Array(n.buffer,n.byteOffset+2*r*4,2));return n}static multiply(t,n){return new e(new Uint32Array(t.buffer)).times(n)}static add(t,n){return new e(new Uint32Array(t.buffer)).plus(n)}},XNe=class e{constructor(e){this.buffer=e}high(){return new $I(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new $I(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset,2))}negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[2]=~this.buffer[2],this.buffer[3]=~this.buffer[3],this.buffer[0]==0&&++this.buffer[1],this.buffer[1]==0&&++this.buffer[2],this.buffer[2]==0&&++this.buffer[3],this}times(e){let t=new QI(new Uint32Array([this.buffer[3],0])),n=new QI(new Uint32Array([this.buffer[2],0])),r=new QI(new Uint32Array([this.buffer[1],0])),i=new QI(new Uint32Array([this.buffer[0],0])),a=new QI(new Uint32Array([e.buffer[3],0])),o=new QI(new Uint32Array([e.buffer[2],0])),s=new QI(new Uint32Array([e.buffer[1],0])),c=new QI(new Uint32Array([e.buffer[0],0])),l=QI.multiply(i,c);this.buffer[0]=l.low();let u=new QI(new Uint32Array([l.high(),0]));return l=QI.multiply(r,c),u.plus(l),l=QI.multiply(i,s),u.plus(l),this.buffer[1]=u.low(),this.buffer[3]=+!!u.lessThan(l),this.buffer[2]=u.high(),new QI(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(QI.multiply(n,c)).plus(QI.multiply(r,s)).plus(QI.multiply(i,o)),this.buffer[3]+=QI.multiply(t,c).plus(QI.multiply(n,s)).plus(QI.multiply(r,o)).plus(QI.multiply(i,a)).low(),this}plus(e){let 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`${JI(this.buffer[3])} ${JI(this.buffer[2])} ${JI(this.buffer[1])} ${JI(this.buffer[0])}`}static multiply(t,n){return new e(new Uint32Array(t.buffer)).times(n)}static add(t,n){return new e(new Uint32Array(t.buffer)).plus(n)}static from(t,n=new Uint32Array(4)){return e.fromString(typeof t==`string`?t:t.toString(),n)}static fromNumber(t,n=new Uint32Array(4)){return e.fromString(t.toString(),n)}static fromString(t,n=new Uint32Array(4)){let r=t.startsWith(`-`),i=t.length,a=new e(n);for(let n=+!!r;n<i;){let r=YI<i-n?YI:i-n,o=new e(new Uint32Array([Number.parseInt(t.slice(n,n+r),10),0,0,0])),s=new e(new Uint32Array([XI[r],0,0,0]));a.times(s),a.plus(o),n+=r}return r?a.negate():a}static convertArray(t){let n=new Uint32Array(t.length*4);for(let r=-1,i=t.length;++r<i;)e.from(t[r],new Uint32Array(n.buffer,n.byteOffset+16*r,4));return n}},eL=class extends IP{constructor(e,t,n,r,i=BM.V5){super(),this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=t,this.buffers=n,this.dictionaries=r,this.metadataVersion=i}visit(e){return super.visit(e instanceof PI?e.type:e)}visitNull(e,{length:t}=this.nextFieldNode()){return lI({type:e,length:t})}visitBool(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitInt(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitFloat(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitUtf8(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitLargeUtf8(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitBinary(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitLargeBinary(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitFixedSizeBinary(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitDate(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitTimestamp(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitTime(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitDecimal(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitList(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),valueOffsets:this.readOffsets(e),child:this.visit(e.children[0])})}visitStruct(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),children:this.visitMany(e.children)})}visitUnion(e,{length:t,nullCount:n}=this.nextFieldNode()){return this.metadataVersion<BM.V5&&this.readNullBitmap(e,n),e.mode===VM.Sparse?this.visitSparseUnion(e,{length:t,nullCount:n}):this.visitDenseUnion(e,{length:t,nullCount:n})}visitDenseUnion(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,typeIds:this.readTypeIds(e),valueOffsets:this.readOffsets(e),children:this.visitMany(e.children)})}visitSparseUnion(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,typeIds:this.readTypeIds(e),children:this.visitMany(e.children)})}visitDictionary(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e.indices),dictionary:this.readDictionary(e)})}visitInterval(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitDuration(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitFixedSizeList(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),child:this.visit(e.children[0])})}visitMap(e,{length:t,nullCount:n}=this.nextFieldNode()){return lI({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,n=this.nextBufferRange()){return t>0&&this.readData(e,n)||new Uint8Array}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:n}=this.nextBufferRange()){return this.bytes.subarray(n,n+t)}readDictionary(e){return this.dictionaries.get(e.id)}},ZNe=class extends eL{constructor(e,t,n,r,i){super(new Uint8Array,t,n,r,i),this.sources=e}readNullBitmap(e,t,{offset:n}=this.nextBufferRange()){return t<=0?new Uint8Array:iI(this.sources[n])}readOffsets(e,{offset:t}=this.nextBufferRange()){return AM(Uint8Array,AM(e.OffsetArrayType,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return AM(Uint8Array,AM(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:n}=this;return fP.isTimestamp(e)||(fP.isInt(e)||fP.isTime(e))&&e.bitWidth===64||fP.isDuration(e)||fP.isDate(e)&&e.unit===UM.MILLISECOND?AM(Uint8Array,$I.convertArray(n[t])):fP.isDecimal(e)?AM(Uint8Array,XNe.convertArray(n[t])):fP.isBinary(e)||fP.isLargeBinary(e)||fP.isFixedSizeBinary(e)?QNe(n[t]):fP.isBool(e)?iI(n[t]):fP.isUtf8(e)||fP.isLargeUtf8(e)?pM(n[t].join(``)):AM(Uint8Array,AM(e.ArrayType,n[t].map(e=>+e)))}};function QNe(e){let t=e.join(``),n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e>>1]=Number.parseInt(t.slice(e,e+2),16);return n}var tL=class extends IP{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.isAr
117ray(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 nL(e,t){return t instanceof e.constructor}function rL(e,t){return e===t||nL(e,t)}function iL(e,t){return e===t||nL(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function aL(e,t){return e===t||nL(e,t)&&e.precision===t.precision}function $Ne(e,t){return e===t||nL(e,t)&&e.byteWidth===t.byteWidth}function oL(e,t){return e===t||nL(e,t)&&e.unit===t.unit}function sL(e,t){return e===t||nL(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function cL(e,t){return e===t||nL(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function ePe(e,t){return e===t||nL(e,t)&&e.children.length===t.children.length&&fL.compareManyFields(e.children,t.children)}function tPe(e,t){return e===t||nL(e,t)&&e.children.length===t.children.length&&fL.compareManyFields(e.children,t.children)}function lL(e,t){return e===t||nL(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&fL.compareManyFields(e.children,t.children)}function nPe(e,t){return e===t||nL(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&fL.visit(e.indices,t.indices)&&fL.visit(e.dictionary,t.dictionary)}function uL(e,t){return e===t||nL(e,t)&&e.unit===t.unit}function dL(e,t){return e===t||nL(e,t)&&e.unit===t.unit}function rPe(e,t){return e===t||nL(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&fL.compareManyFields(e.children,t.children)}function iPe(e,t){return e===t||nL(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&fL.compareManyFields(e.children,t.children)}tL.prototype.visitNull=rL,tL.prototype.visitBool=rL,tL.prototype.visitInt=iL,tL.prototype.visitInt8=iL,tL.prototype.visitInt16=iL,tL.prototype.visitInt32=iL,tL.prototype.visitInt64=iL,tL.prototype.visitUint8=iL,tL.prototype.visitUint16=iL,tL.prototype.visitUint32=iL,tL.prototype.visitUint64=iL,tL.prototype.visitFloat=aL,tL.prototype.visitFloat16=aL,tL.prototype.visitFloat32=aL,tL.prototype.visitFloat64=aL,tL.prototype.visitUtf8=rL,tL.prototype.visitLargeUtf8=rL,tL.prototype.visitBinary=rL,tL.prototype.visitLargeBinary=rL,tL.prototype.visitFixedSizeBinary=$Ne,tL.prototype.visitDate=oL,tL.prototype.visitDateDay=oL,tL.prototype.visitDateMillisecond=oL,tL.prototype.visitTimestamp=sL,tL.prototype.visitTimestampSecond=sL,tL.prototype.visitTimestampMillisecond=sL,tL.prototype.visitTimestampMicrosecond=sL,tL.prototype.visitTimestampNanosecond=sL,tL.prototype.visitTime=cL,tL.prototype.visitTimeSecond=cL,tL.prototype.visitTimeMillisecond=cL,tL.prototype.visitTimeMicrosecond=cL,tL.prototype.visitTimeNanosecond=cL,tL.prototype.visitDecimal=rL,tL.prototype.visitList=ePe,tL.prototype.visitStruct=tPe,tL.prototype.visitUnion=lL,tL.prototype.visitDenseUnion=lL,tL.prototype.visitSparseUnion=lL,tL.prototype.visitDictionary=nPe,tL.prototype.visitInterval=uL,tL.prototype.visitIntervalDayTime=uL,tL.prototype.visitIntervalYearMonth=uL,tL.prototype.visitDuration=dL,tL.prototype.visitDurationSecond=dL,tL.prototype.visitDurationMillisecond=dL,tL.prototype.visitDurationMicrosecond=dL,tL.prototype.visitDurationNanosecond=dL,tL.prototype.visitFixedSizeList=rPe,tL.prototype.visitMap=iPe;var fL=new tL;function pL(e,t){return fL.compareSchemas(e,t)}function mL(e,t){return aPe(e,t.map(e=>e.data.concat()))}function aPe(e,t){let n=[...e.fields],r=[],i={numBatches:t.reduce((e,t)=>Math.max(e,t.length),0)},a=0,o=0,s=-1,c=t.length,l,u=[];for(;i.numBatches-- >0;){for(o=1/0,s=-1;++s<c;)u[s]=l=t[s].shift(),o=Math.min(o,l?l.length:o);Number.isFinite(o)&&(u=oPe(n,o,u,t,i),o>0&&(r[a++]=lI({type:new kP(n),length:o,nullCount:0,children:u.slice()})))}return[e=e.assign(n),r.map(t=>new gL(e,t))]}function oPe(e,t,n,r,i){let a=(t+63&-64)>>3;for(let o=-1,s=r.length;++o<s;){let s=n[o],c=s?.length;if(c>=t)c===t?n[o]=s:(n[o]=s.slice(0,t),i.numBatches=Math.max(i.numBatches,r[o].unshift(s.slice(t,c-t))));else{let r=e[o];e[o]=r.clone({nullable:!0}),n[o]=s?._changeLengthAndBackfillNullBitmap(t)??lI({type:r.type,length:t,nullCount:t,nullBitmap:new Uint8Array(a)})}}return n}var sPe,hL=class e{constructor(...t){if(t.length===0)return this.batches=[],this.schema=new NI([]),this._offsets=[0],this;let n,r;t[0]instanceof NI&&(n=t.shift()),t.at(-1)instanceof Uint32Array&&(r=t.pop());let i=t=>{if(t){if(t instanceof gL)return[t];if(t instanceof e)return t.batches;if(t instanceof cI){if(t.type instanceof kP)return[new gL(new NI(t.type.children),t)]}else if(Array.isArray(t))return t.flatMap(e=>i(e));else if(typeof t[Symbol.iterator]==`function`)return[...t].flatMap(e=>i(e));else if(typeof t==`object`){let e=Object.keys(t),r=e.map(e=>new kI([t[e]])),[,i]=mL(n??new NI(e.map((e,t)=>new PI(String(e),r[t].type,r[t].nullable))),r);return i.length===0?[new gL(t)]:i}}return[]},a=t.flatMap(e=>i(e));if(n=n??a[0]?.schema??new NI([]),!(n instanceof NI))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);for(let e of a){if(!(e instanceof gL))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);if(!pL(n,e.schema))throw TypeError(`Table and inner RecordBatch schemas must be equivalent.`)}this.schema=n,this.batches=a,this._offsets=r??fI(this.data)}get data(){return this.batches.map(({data:e})=>e)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce((e,t)=>
117e+t.length,0)}get nullCount(){return this._nullCount===-1&&(this._nullCount=dI(this.data)),this._nullCount}isValid(e){return!1}get(e){return null}at(e){return this.get(ZF(e,this.numRows))}set(e,t){}indexOf(e,t){return-1}[Symbol.iterator](){return this.batches.length>0?TI.visit(new kI(this.data)):[][Symbol.iterator]()}toArray(){return[...this]}toString(){return`[\n ${this.toArray().join(`, 118 `)}\n]`}concat(...t){let n=this.schema;return new e(n,this.data.concat(t.flatMap(({data:e})=>e)).map(e=>new gL(n,e)))}slice(t,n){let r=this.schema;return[t,n]=XF({length:this.numRows},t,n),new e(r,pI(this.data,this._offsets,t,n).map(e=>new gL(r,e)))}getChild(e){return this.getChildAt(this.schema.fields.findIndex(t=>t.name===e))}getChildAt(e){if(e>-1&&e<this.schema.fields.length){let t=this.data.map(t=>t.children[e]);if(t.length===0){let{type:n}=this.schema.fields[e],r=lI({type:n,length:0,nullCount:0});t.push(r._changeLengthAndBackfillNullBitmap(this.numRows))}return new kI(t)}return null}setChild(e,t){return this.setChildAt(this.schema.fields?.findIndex(t=>t.name===e),t)}setChildAt(t,n){let r=this.schema,i=[...this.batches];if(t>-1&&t<this.numCols){n||=new kI([lI({type:new pP,length:this.numRows})]);let e=r.fields.slice(),a=e[t].clone({type:n.type}),o=this.schema.fields.map((e,t)=>this.getChildAt(t));[e[t],o[t]]=[a,n],[r,i]=mL(r,o)}return new e(r,i)}select(e){let 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(t){return new e(this.schema.selectAt(t),this.batches.map(e=>e.selectAt(t)))}assign(t){let n=this.schema.fields,[r,i]=t.schema.fields.reduce((e,t,r)=>{let[i,a]=e,o=n.findIndex(e=>e.name===t.name);return~o?a[o]=r:i.push(r),e},[[],[]]);return new e(...mL(this.schema.assign(t.schema),[...n.map((e,t)=>[t,i[t]]).map(([e,n])=>n===void 0?this.getChildAt(e):t.getChildAt(n)),...r.map(e=>t.getChildAt(e))].filter(Boolean)))}};sPe=Symbol.toStringTag,hL[sPe]=(e=>(e.schema=null,e.batches=[],e._offsets=new Uint32Array([0]),e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,e.isValid=gI(hI),e.get=gI(UF.getVisitFn(q.Struct)),e.set=_I(mF.getVisitFn(q.Struct)),e.indexOf=vI(SI.getVisitFn(q.Struct)),`Table`))(hL.prototype);var cPe,gL=class e{constructor(...e){switch(e.length){case 2:if([this.schema]=e,!(this.schema instanceof NI)||([,this.data=lI({nullCount:0,type:new kP(this.schema.fields),children:this.schema.fields.map(e=>lI({type:e.type,nullCount:0}))})]=e,!(this.data instanceof cI)))throw TypeError(`RecordBatch constructor expects a [Schema, Data] pair.`);[this.schema,this.data]=lPe(this.schema,this.data.children);break;case 1:{let[t]=e,{fields:n,children:r,length:i}=Object.keys(t).reduce((e,n,r)=>(e.children[r]=t[n],e.length=Math.max(e.length,t[n].length),e.fields[r]=PI.new({name:n,type:t[n].type,nullable:!0}),e),{length:0,fields:[],children:[]}),a=new NI(n),o=lI({type:new kP(n),length:i,children:r,nullCount:0});[this.schema,this.data]=lPe(a,o.children,i);break}default:throw TypeError(`RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.`)}}get dictionaries(){return this._dictionaries||=uPe(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 UF.visit(this.data,e)}at(e){return this.get(ZF(e,this.numRows))}set(e,t){return mF.visit(this.data,e,t)}indexOf(e,t){return SI.visit(this.data,e,t)}[Symbol.iterator](){return TI.visit(new kI([this.data]))}toArray(){return[...this]}concat(...e){return new hL(this.schema,[this,...e])}slice(t,n){let[r]=new kI([this.data]).slice(t,n).data;return new e(this.schema,r)}getChild(e){return this.getChildAt(this.schema.fields?.findIndex(t=>t.name===e))}getChildAt(e){return e>-1&&e<this.schema.fields.length?new kI([this.data.children[e]]):null}setChild(e,t){return this.setChildAt(this.schema.fields?.findIndex(t=>t.name===e),t)}setChildAt(t,n){let r=this.schema,i=this.data;if(t>-1&&t<this.numCols){n||=new kI([lI({type:new pP,length:this.numRows})]);let e=r.fields.slice(),a=i.children.slice(),o=e[t].clone({type:n.type});[e[t],a[t]]=[o,n.data[0]],r=new NI(e,new Map(this.schema.metadata)),i=lI({type:new kP(e),children:a})}return new e(r,i)}select(t){let n=this.schema.select(t),r=new kP(n.fields),i=[];for(let e of t){let t=this.schema.fields.findIndex(t=>t.name===e);~t&&(i[t]=this.data.children[t])}return new e(n,lI({type:r,length:this.numRows,children:i}))}selectAt(t){let n=this.schema.selectAt(t),r=t.map(e=>
118this.data.children[e]).filter(Boolean);return new e(n,lI({type:new kP(n.fields),length:this.numRows,children:r}))}};cPe=Symbol.toStringTag,gL[cPe]=(e=>(e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,`RecordBatch`))(gL.prototype);function lPe(e,t,n=t.reduce((e,t)=>Math.max(e,t.length),0)){let r=[...e.fields],i=[...t],a=(n+63&-64)>>3;for(let[o,s]of e.fields.entries()){let e=t[o];(!e||e.length!==n)&&(r[o]=s.clone({nullable:!0}),i[o]=e?._changeLengthAndBackfillNullBitmap(n)??lI({type:s.type,length:n,nullCount:n,nullBitmap:new Uint8Array(a)}))}return[e.assign(r),lI({type:new kP(r),length:n,children:i})]}function uPe(e,t,n=new Map){if((e?.length??0)>0&&e?.length===t?.length)for(let r=-1,i=e.length;++r<i;){let{type:i}=e[r],a=t[r];for(let e of[a,...a?.dictionary?.data||[]])uPe(i.children,e?.children,n);if(fP.isDictionary(i)){let{id:e}=i;if(!n.has(e))a?.dictionary&&n.set(e,a.dictionary);else if(n.get(e)!==a.dictionary)throw Error(`Cannot create Schema containing two different dictionaries with the same Id`)}}return n}var _L=class extends gL{constructor(e){let t=e.fields.map(e=>lI({type:e.type})),n=lI({type:new kP(e.fields),nullCount:0,children:t});super(e,n)}},vL=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):BM.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):MN.NONE}header(e){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):BigInt(`0`)}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,12);return n?(t||new lN).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let 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,BM.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,MN.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,BigInt(`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(t,n,r,i,a,o){return e.startMessage(t),e.addVersion(t,n),e.addHeaderType(t,r),e.addHeader(t,i),e.addBodyLength(t,a),e.addCustomMetadata(t,o),e.endMessage(t)}},yL=new class extends IP{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return CN.startNull(t),CN.endNull(t)}visitInt(e,t){return sN.startInt(t),sN.addBitWidth(t,e.bitWidth),sN.addIsSigned(t,e.isSigned),sN.endInt(t)}visitFloat(e,t){return _N.startFloatingPoint(t),_N.addPrecision(t,e.precision),_N.endFloatingPoint(t)}visitBinary(e,t){return uN.startBinary(t),uN.endBinary(t)}visitLargeBinary(e,t){return yN.startLargeBinary(t),yN.endLargeBinary(t)}visitBool(e,t){return dN.startBool(t),dN.endBool(t)}visitUtf8(e,t){return ON.startUtf8(t),ON.endUtf8(t)}visitLargeUtf8(e,t){return bN.startLargeUtf8(t),bN.endLargeUtf8(t)}visitDecimal(e,t){return pN.startDecimal(t),pN.addScale(t,e.scale),pN.addPrecision(t,e.precision),pN.addBitWidth(t,e.bitWidth),pN.endDecimal(t)}visitDate(e,t){return fN.startDate(t),fN.addUnit(t,e.unit),fN.endDate(t)}visitTime(e,t){return TN.startTime(t),TN.addUnit(t,e.unit),TN.addBitWidth(t,e.bitWidth),TN.endTime(t)}visitTimestamp(e,t){let n=e.timezone&&t.createString(e.timezone)||void 0;return EN.startTimestamp(t),EN.addUnit(t,e.unit),n!==void 0&&EN.addTimezone(t,n),EN.endTimestamp(t)}visitInterval(e,t){return vN.startInterval(t),vN.addUnit(t,e.unit),vN.endInterval(t)}visitDuration(e,t){return mN.startDuration(t),mN.addUnit(t,e.unit),mN.endDuration(t)}visitList(e,t){return xN.startList(t),xN.endList(t)}visitStruct(e,t){return wN.startStruct_(t),wN.endStruct_(t)}visitUnion(e,t){DN.startTypeIdsVector(t,e.typeIds.length);let n=DN.createTypeIdsVector(t,e.typeIds);return DN.startUnion(t),DN.addMode(t,e.mode),DN.addTypeIds(t,n),DN.endUnion(t)}visitDictionary(e,t){let n=this.visit(e.indices,t);return cN.startDictionaryEncoding(t),cN.addId(t,BigInt(e.id)),cN.addIsOrdered(t,e.isOrdered),n!==void 0&&cN.addIndexType(t,n),cN.endDictionaryEncoding(t)}
vendor: 5,154 bytes, line 118
118visitFixedSizeBinary(e,t){return hN.startFixedSizeBinary(t),hN.addByteWidth(t,e.byteWidth),hN.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return gN.startFixedSizeList(t),gN.addListSize(t,e.listSize),gN.endFixedSizeList(t)}visitMap(e,t){return SN.startMap(t),SN.addKeysSorted(t,e.keysSorted),SN.endMap(t)}};function dPe(e,t=new Map){return new NI(mPe(e,t),bL(e.metadata),t)}function fPe(e){return new SL(e.count,gPe(e.columns),_Pe(e.columns))}function pPe(e){return new CL(fPe(e.data),e.id,e.isDelta)}function mPe(e,t){return(e.fields||[]).filter(Boolean).map(e=>PI.fromJSON(e,t))}function hPe(e,t){return(e.children||[]).filter(Boolean).map(e=>PI.fromJSON(e,t))}function gPe(e){return(e||[]).reduce((e,t)=>[...e,new TL(t.count,vPe(t.VALIDITY)),...gPe(t.children)],[])}function _Pe(e,t=[]){for(let n=-1,r=(e||[]).length;++n<r;){let r=e[n];r.VALIDITY&&t.push(new wL(t.length,r.VALIDITY.length)),r.TYPE_ID&&t.push(new wL(t.length,r.TYPE_ID.length)),r.OFFSET&&t.push(new wL(t.length,r.OFFSET.length)),r.DATA&&t.push(new wL(t.length,r.DATA.length)),t=_Pe(r.children,t)}return t}function vPe(e){return(e||[]).reduce((e,t)=>e+ +(t===0),0)}function yPe(e,t){let n,r,i,a,o,s;return!t||!(a=e.dictionary)?(o=xPe(e,hPe(e,t)),i=new PI(e.name,o,e.nullable,bL(e.metadata))):t.has(n=a.id)?(r=(r=a.indexType)?bPe(r):new hP,s=new PP(t.get(n),r,n,a.isOrdered),i=new PI(e.name,s,e.nullable,bL(e.metadata))):(r=(r=a.indexType)?bPe(r):new hP,t.set(n,o=xPe(e,hPe(e,t))),s=new PP(o,r,n,a.isOrdered),i=new PI(e.name,s,e.nullable,bL(e.metadata))),i||null}function bL(e=[]){return new Map(e.map(({key:e,value:t})=>[e,t]))}function bPe(e){return new mP(e.isSigned,e.bitWidth)}function xPe(e,t){let n=e.type.name;switch(n){case`NONE`:return new pP;case`null`:return new pP;case`binary`:return new _P;case`largebinary`:return new vP;case`utf8`:return new yP;case`largeutf8`:return new bP;case`bool`:return new xP;case`list`:return new OP((t||[])[0]);case`struct`:return new kP(t||[]);case`struct_`:return new kP(t||[])}switch(n){case`int`:{let t=e.type;return new mP(t.isSigned,t.bitWidth)}case`floatingpoint`:{let t=e.type;return new gP(HM[t.precision])}case`decimal`:{let t=e.type;return new SP(t.scale,t.precision,t.bitWidth)}case`date`:{let t=e.type;return new CP(UM[t.unit])}case`time`:{let t=e.type;return new wP(WM[t.unit],t.bitWidth)}case`timestamp`:{let t=e.type;return new TP(WM[t.unit],t.timezone)}case`interval`:{let t=e.type;return new EP(GM[t.unit])}case`duration`:{let t=e.type;return new DP(WM[t.unit])}case`union`:{let n=e.type,[r,...i]=(n.mode+``).toLowerCase();return new AP(VM[r.toUpperCase()+i.join(``)],n.typeIds||[],t||[])}case`fixedsizebinary`:{let t=e.type;return new jP(t.byteWidth)}case`fixedsizelist`:{let n=e.type;return new MP(n.listSize,(t||[])[0])}case`map`:{let n=e.type;return new NP((t||[])[0],n.keysSorted)}}throw Error(`Unrecognized type: "${n}"`)}var SPe=QM,CPe=ZM,xL=class e{static fromJSON(t,n){let r=new e(0,BM.V5,n);return r._createHeader=wPe(t,n),r}static decode(t){t=new CPe(NM(t));let n=vL.getRootAsMessage(t),r=n.bodyLength(),i=n.version(),a=n.headerType(),o=new e(r,i,a);return o._createHeader=TPe(n,a),o}static encode(e){let t=new SPe,n=-1;return e.isSchema()?n=NI.encode(t,e.header()):e.isRecordBatch()?n=SL.encode(t,e.header()):e.isDictionaryBatch()&&(n=CL.encode(t,e.header())),vL.startMessage(t),vL.addVersion(t,BM.V5),vL.addHeader(t,n),vL.addHeaderType(t,e.headerType),vL.addBodyLength(t,BigInt(e.bodyLength)),vL.finishMessageBuffer(t,vL.endMessage(t)),t.asUint8Array()}static from(t,n=0){if(t instanceof NI)return new e(0,BM.V5,MN.Schema,t);if(t instanceof SL)return new e(n,BM.V5,MN.RecordBatch,t);if(t instanceof CL)return new e(n,BM.V5,MN.DictionaryBatch,t);throw Error(`Unrecognized Message header: ${t}`)}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===MN.Schema}isRecordBatch(){return this.headerType===MN.RecordBatch}isDictionaryBatch(){return this.headerType===MN.DictionaryBatch}constructor(e,t,n,r){this._version=t,this._headerType=n,this.body=new Uint8Array,r&&(this._createHeader=()=>r),this._bodyLength=FN(e)}},SL=class{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(e,t,n){this._nodes=t,this._buffers=n,this._length=FN(e)}},CL=class{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}constructor(e,t,n=!1){this._data=e,this._isDelta=n,this._id=FN(t)}},wL=class{constructor(e,t){this.offset=FN(e),this.length=FN(t)}},TL=class{constructor(e,t){this.length=FN(e),this.nullCount=FN(t)}};function wPe(e,t){return(()=>{switch(t){case MN.Schema:return NI.fromJSON(e);case MN.RecordBatch:return SL.fromJSON(e);case MN.DictionaryBatch:return CL.fromJSON(e)}throw Error(`Unrecognized Message type: { name: ${MN[t]}, type: ${t} }`)})}function TPe(e,t){return(()=>{switch(t){case MN.Schema:return NI.decode(e.header(new jN),new Map,e.ver
118sion());case MN.RecordBatch:return SL.decode(e.header(new rN),e.version());case MN.DictionaryBatch:return CL.decode(e.header(new iN),e.version())}throw Error(`Unrecognized Message type: { name: ${MN[t]}, type: ${t} }`)})}PI.encode=zPe,PI.decode=FPe,PI.fromJSON=yPe,NI.encode=RPe,NI.decode=EPe,NI.fromJSON=dPe,SL.encode=BPe,SL.decode=DPe,SL.fromJSON=fPe,CL.encode=VPe,CL.decode=OPe,CL.fromJSON=pPe,TL.encode=HPe,TL.decode=APe,wL.encode=UPe,wL.decode=kPe;function EPe(e,t=new Map,n=BM.V5){return new NI(NPe(e,t),EL(e),t,n)}function DPe(e,t=BM.V5){if(e.compression()!==null)throw Error(`Record batch compression not implemented`);return new SL(e.length(),jPe(e),MPe(e,t))}function OPe(e,t=BM.V5){return new CL(SL.decode(e.data(),t),e.id(),e.isDelta())}function kPe(e){return new wL(e.offset(),e.length())}function APe(e){return new TL(e.length(),e.nullCount())}function jPe(e){let t=[];for(let n,r=-1,i=-1,a=e.nodesLength();++r<a;)(n=e.nodes(r))&&(t[++i]=TL.decode(n));return t}function MPe(e,t){let n=[];for(let r,i=-1,a=-1,o=e.buffersLength();++i<o;)(r=e.buffers(i))&&(t<BM.V4&&(r.bb_pos+=8*(i+1)),n[++a]=wL.decode(r));return n}function NPe(e,t){let n=[];for(let r,i=-1,a=-1,o=e.fieldsLength();++i<o;)(r=e.fields(i))&&(n[++a]=PI.decode(r,t));return n}function PPe(e,t){let n=[];for(let r,i=-1,a=-1,o=e.childrenLength();++i<o;)(r=e.children(i))&&(n[++a]=PI.decode(r,t));return n}function FPe(e,t){let n,r,i,a,o,s;return!t||!(s=e.dictionary())?(i=LPe(e,PPe(e,t)),r=new PI(e.name(),i,e.nullable(),EL(e))):t.has(n=FN(s.id()))?(a=(a=s.indexType())?IPe(a):new hP,o=new PP(t.get(n),a,n,s.isOrdered()),r=new PI(e.name(),o,e.nullable(),EL(e))):(a=(a=s.indexType())?IPe(a):new hP,t.set(n,i=LPe(e,PPe(e,t))),o=new PP(i,a,n,s.isOrdered()),r=new PI(e.name(),o,e.nullable(),EL(e))),r||null}function EL(e){let t=new Map;if(e)for(let n,r,i=-1,a=Math.trunc(e.customMetadataLength());++i<a;)(n=e.customMetadata(i))&&(r=n.key())!=null&&t.set(r,n.value());return t}function IPe(e){return new mP(e.isSigned(),e.bitWidth())}function LPe(e,t){let n=e.typeType();switch(n){case kN.NONE:return new pP;case kN.Null:return new pP;case kN.Binary:return new _P;case kN.LargeBinary:return new vP;case kN.Utf8:return new yP;case kN.LargeUtf8:return new bP;case kN.Bool:return new xP;case kN.List:return new OP((t||[])[0]);case kN.Struct_:return new kP(t||[])}switch(n){case kN.Int:{let t=e.type(new sN);return new mP(t.isSigned(),t.bitWidth())}case kN.FloatingPoint:return new gP(e.type(new _N).precision());case kN.Decimal:{let t=e.type(new pN);return new SP(t.scale(),t.precision(),t.bitWidth())}case kN.Date:return new CP(e.type(new fN).unit());case kN.Time:{let t=e.type(new TN);return new wP(t.unit(),t.bitWidth())}case kN.Timestamp:{let t=e.type(new EN);return new TP(t.unit(),t.timezone())}case kN.Interval:return new EP(e.type(new vN).unit());case kN.Duration:return new DP(e.type(new mN).unit());case kN.Union:{let n=e.type(new DN);return new AP(n.mode(),n.typeIdsArray()||[],t||[])}case kN.FixedSizeBinary:return new jP(e.type(new hN).byteWidth());case kN.FixedSizeList:return new MP(e.type(new gN).listSize(),(t||[])[0]);case kN.Map:{let n=e.type(new SN);return new NP((t||[])[0],n.keysSorted())}}throw Error(`Unrecognized type: "${kN[n]}" (${n})`)}function RPe(e,t){let n=t.fields.map(t=>PI.encode(e,t));jN.startFieldsVector(e,n.length);let r=jN.createFieldsVector(e,n),i=t.metadata&&t.metadata.size>0?jN.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return lN.startKeyValue(e),lN.addKey(e,r),lN.addValue(e,i),lN.endKeyValue(e)})):-1;return jN.startSchema(e),jN.addFields(e,r),jN.addEndianness(e,WPe?aN.Little:aN.Big),i!==-1&&jN.addCustomMetadata(e,i),jN.endSchema(e)}function zPe(e,t){let n=-1,r=-1,i=-1,a=t.type,o=t.typeId;fP.isDictionary(a)?(o=a.dictionary.typeId,i=yL.visit(a,e),r=yL.visit(a.dictionary,e)):r=yL.visit(a,e);let s=(a.children||[]).map(t=>PI.encode(e,t)),c=AN.createChildrenVector(e,s),l=t.metadata&&t.metadata.size>0?AN.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return lN.startKeyValue(e),lN.addKey(e,r),lN.addValue(e,i),lN.endKeyValue(e)})):-1;return t.name&&(n=e.createString(t.name)),AN.startField(e),AN.addType(e,r),AN.addTypeType(e,o),AN.addChildren(e,c),AN.addNullable(e,!!t.nullable),n!==-1&&AN.addName(e,n),i!==-1&&AN.addDictionary(e,i),l!==-1&&AN.addCustomMetadata(e,l),AN.endField(e)}function BPe(e,t){let n=t.nodes||[],r=t.buffers||[];rN.startNodesVector(e,n.length);for(let t of n.slice().reverse())TL.encode(e,t);let i=e.endVector();rN.startBuffersVector(e,r.length);for(let t of r.slice().reverse())wL.encode(e,t);let a=e.endVector();return rN.startRecordBatch(e),rN.addLength(e,BigInt(t.length)),rN.addNodes(e,i),rN.addBuffers(e,a),rN.endRecordBatch(e)}function VPe(e,t){let n=SL.encode(e,t.data);return iN.startDictionaryBatch(e),iN.addId(e,BigInt(t.id)),iN.addIsDelta(e,t.isDelta),iN.addD
118ata(e,n),iN.endDictionaryBatch(e)}function HPe(e,t){return nN.createFieldNode(e,BigInt(t.length),BigInt(t.nullCount))}function UPe(e,t){return tN.createBuffer(e,BigInt(t.offset),BigInt(t.length))}var WPe=(()=>{let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256})(),DL=e=>`Expected ${MN[e]} Message in stream, but was null or length 0.`,OL=e=>`Header pointer of flatbuffer-encoded ${MN[e]} Message is null or length 0.`,GPe=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,KPe=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`,qPe=class{constructor(e){this.source=e instanceof UI?e:new UI(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||e.value===-1&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?zI: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(e!=null&&t.value.headerType!==e)throw Error(DL(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array;let t=NM(this.source.read(e));if(t.byteLength<e)throw Error(KPe(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(e=!1){let t=MN.Schema,n=this.readMessage(t)?.header();if(e&&!n)throw Error(OL(t));return n}readMetadataLength(){let e=this.source.read(4),t=(e&&new ZM(e))?.readInt32(0)||0;return{done:t===0,value:t}}readMetadata(e){let t=this.source.read(e);if(!t)return zI;if(t.byteLength<e)throw Error(GPe(e,t.byteLength));return{done:!1,value:xL.decode(t)}}},JPe=class{constructor(e,t){this.source=e instanceof WI?e:SM(e)?new qI(e,t):new WI(e)}[Symbol.asyncIterator](){return this}next(){return oM(this,void 0,void 0,function*(){let e;return(e=yield this.readMetadataLength()).done||e.value===-1&&(e=yield this.readMetadataLength()).done||(e=yield this.readMetadata(e.value)).done?zI:e})}throw(e){return oM(this,void 0,void 0,function*(){return yield this.source.throw(e)})}return(e){return oM(this,void 0,void 0,function*(){return yield this.source.return(e)})}readMessage(e){return oM(this,void 0,void 0,function*(){let t;if((t=yield this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw Error(DL(e));return t.value})}readMessageBody(e){return oM(this,void 0,void 0,function*(){if(e<=0)return new Uint8Array;let t=NM(yield this.source.read(e));if(t.byteLength<e)throw Error(KPe(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()})}readSchema(){return oM(this,arguments,void 0,function*(e=!1){let t=MN.Schema,n=(yield this.readMessage(t))?.header();if(e&&!n)throw Error(OL(t));return n})}readMetadataLength(){return oM(this,void 0,void 0,function*(){let e=yield this.source.read(4),t=(e&&new ZM(e))?.readInt32(0)||0;return{done:t===0,value:t}})}readMetadata(e){return oM(this,void 0,void 0,function*(){let t=yield this.source.read(e);if(!t)return zI;if(t.byteLength<e)throw Error(GPe(e,t.byteLength));return{done:!1,value:xL.decode(t)}})}},YPe=class extends qPe{constructor(e){super(new Uint8Array),this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof BI?e:new BI(e)}next(){let{_json:e}=this;if(!this._schema)return this._schema=!0,{done:!1,value:xL.fromJSON(e.schema,MN.Schema)};if(this._dictionaryIndex<e.dictionaries.length){let t=e.dictionaries[this._dictionaryIndex++];return this._body=t.data.columns,{done:!1,value:xL.fromJSON(t,MN.DictionaryBatch)}}if(this._batchIndex<e.batches.length){let t=e.batches[this._batchIndex++];return this._body=t.columns,{done:!1,value:xL.fromJSON(t,MN.RecordBatch)}}return this._body=[],zI}readMessageBody(e){return t(this._body);function t(e){return(e||[]).reduce((e,n)=>[...e,...n.VALIDITY&&[n.VALIDITY]||[],...n.TYPE_ID&&[n.TYPE_ID]||[],...n.OFFSET&&[n.OFFSET]||[],...n.DATA&&[n.DATA]||[],...t(n.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw Error(DL(e));return t.value}readSchema(){let e=MN.Schema,t=this.readMessage(e),n=t?.header();if(!t||!n)throw Error(OL(e));return n}},XPe=`ARROW1`,kL=new Uint8Array(6);for(let e=0;e<6;e+=1)kL[e]=XPe.codePointAt(e);function AL(e,t=0){for(let n=-1,r=kL.length;++n<r;
vendor: 18,455 bytes, line 118
118)if(kL[n]!==e[t+n])return!1;return!0}var jL=kL.length,ZPe=jL+4,QPe=jL*2+4,ML=class e extends VI{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){let t=this._impl.open(e);return _M(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 LM.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return LM.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw Error(`"throughNode" not available in this environment`)}static throughDOM(e,t){throw Error(`"throughDOM" not available in this environment`)}static from(t){return t instanceof e?t:bM(t)?cFe(t):SM(t)?dFe(t):_M(t)?oM(this,void 0,void 0,function*(){return yield e.from(yield t)}):CM(t)||TM(t)||EM(t)||yM(t)?uFe(new WI(t)):lFe(new UI(t))}static readAll(t){return t instanceof e?t.isSync()?oFe(t):sFe(t):bM(t)||ArrayBuffer.isView(t)||vM(t)||xM(t)?oFe(t):sFe(t)}},NL=class extends ML{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return lM(this,arguments,function*(){yield cM(yield*uM(dM(this[Symbol.iterator]())))})}},PL=class extends ML{constructor(e){super(e),this._impl=e}readAll(){return oM(this,void 0,void 0,function*(){var e,t,n,r;let i=[];try{for(var a=!0,o=dM(this),s;s=yield o.next(),e=s.done,!e;a=!0){r=s.value,a=!1;let e=r;i.push(e)}}catch(e){t={error:e}}finally{try{!a&&!e&&(n=o.return)&&(yield n.call(o))}finally{if(t)throw t.error}}return i})}[Symbol.iterator](){throw Error(`AsyncRecordBatchStreamReader is not Iterable`)}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}},$Pe=class extends NL{constructor(e){super(e),this._impl=e}},eFe=class extends PL{constructor(e){super(e),this._impl=e}},tFe=class{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}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){let n=this._loadVectors(e,t,this.schema.fields),r=lI({type:new kP(this.schema.fields),length:e.length,children:n});return new gL(this.schema,r)}_loadDictionaryBatch(e,t){let{id:n,isDelta:r}=e,{dictionaries:i,schema:a}=this,o=i.get(n),s=a.dictionaries.get(n),c=this._loadVectors(e.data,t,[s]);return(o&&r?o.concat(new kI(c)):new kI(c)).memoize()}_loadVectors(e,t,n){return new eL(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}},FL=class extends tFe{constructor(e,t){super(t),this._reader=bM(e)?new YPe(this._handle=e):new qPe(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=aFe(this,e),(this.schema||=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):zI}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):zI}next(){if(this.closed)return zI;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let n=e.header(),r=t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(n,r)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let n=e.header(),r=t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new _L(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},IL=class extends tFe{constructor(e,t){super(t),this._reader=new JPe(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return oM(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 oM(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=aFe(this,e),(this.schema||=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return oM(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):zI})}return(e){return oM(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):zI})}next(){return oM(this,void 0,void 0,function*(){if(this.closed)return zI;let e,{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let n=e.header(),r=yield t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(n,r)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let n=e.header(),r=yield t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new _L(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return oM(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},nFe=class extends FL{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(e,t){super(e instanceof KI?e:new KI(e),t)}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){if(this.closed)return null;this._footer||this.open();let t=this._footer?.getRecordBatch(e);if(t&&this._handle.seek(t.offset)){let e=this._reader.readMessage(MN.RecordBatch);if(e?.isRecordBatch()){let t=e.header(),n=this._reader.readMessageBody(e.bodyLength);return this._loadRecordBatch(t,n)}}return null}_readDictionaryBatch(e){let t=this._footer?.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){let e=this._reader.readMessage(MN.DictionaryBatch);if(e?.isDictionaryBatch()){let t=e.header(),n=this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}}_readFooter(){let{_handle:e}=this,t=e.size-ZPe,n=e.readInt32(t),r=e.readAt(t-n,n);return LI.decode(r)}_readNextMessageAndValidate(e){if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer?.getRecordBatch(this._recordBatchIndex);if(t&&this._handle.seek(t.offset))return this._reader.readMessage(e)}return null}},rFe=class extends IL{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(e,...t){let n=typeof t[0]==`number`?void 0:t.shift(),r=t[0]instanceof Map?t.shift():void 0;super(e instanceof qI?e:new qI(e,n),r)}isFile(){return!0}isAsync(){return!0}open(e){let t=Object.create(null,{open:{get:()=>super.open}});return oM(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let e of this._footer.dictionaryBatches())e&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return oM(this,void 0,void 0,function*(){if(this.closed)return null;this._footer||(yield this.open());let t=this._footer?.getRecordBatch(e);if(t&&(yield this._handle.seek(t.offset))){let e=yield this._reader.readMessage(MN.RecordBatch);if(e?.isRecordBatch()){let t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength);return this._loadRecordBatch(t,n)}}return null})}_readDictionaryBatch(e){return oM(this,void 0,void 0,function*(){let t=this._footer?.getDictionaryBatch(e);if(t&&(yield this._handle.seek(t.offset))){let e=yield this._reader.readMessage(MN.DictionaryBatch);if(e?.isDictionaryBatch()){let t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}})}_readFooter(){return oM(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-ZPe,n=yield e.readInt32(t),r=yield e.readAt(t-n,n);return LI.decode(r)})}_readNextMessageAndValidate(e){return oM(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&(yield this._handle.seek(t.offset)))return yield this._reader.readMessage(e)}return null})}},iFe=class extends FL{constructor(e,t){super(e,t)}_loadVectors(e,t,n){return new ZNe(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}};function aFe(e,t){return t&&typeof t.autoDestroy==`boolean`?t.autoDestroy:e.autoDestroy}function*oFe(e){let t=ML.from(e);try{if(!t.open({autoDestroy:!1}).closed)do yield t;while(!t.reset().open().closed)}finally{t.cancel()}}function sFe(e){return lM(this,arguments,function*(){let t=yield cM(ML.from(e));try{if(!(yield cM(t.open({autoDestroy:!1}))).closed)do yield yield cM(t);while(!(yield cM(t.reset().open())).closed)}finally{yield cM(t.cancel())}})}function cFe(e){return new NL(new iFe(e))}function lFe(e){let t=e.peek(jL+7&-8);return t&&t.byteLength>=4?AL(t)?new $Pe(new nFe(e.read())):new NL(new FL(e)):new NL(new FL(function*(){}()))}function uFe(e){return oM(this,void 0,void 0,function*(){let t=yield e.peek(jL+7&-8);return t&&t.byteLength>=4?AL(t)?new $Pe(new nFe(yield e.read())):new PL(new IL(e)):new PL(new IL(function(){return lM(this,arguments,function*(){})}()))})}function dFe(e){return oM(this,void 0,void 0,function*(){let{size:t}=yield e.stat(),n=new qI(e,t);return t>=QPe&&AL(yield n.readAt(0,jL+7&-8))?new eFe(new rFe(n)):new PL(new IL(n))})}var LL=class e extends IP{static assemble(...t){let n=e=>e.flatMap(e=>Array.isArray(e)?n(e):e instanceof gL?e.data.children:e.data),r=new e;return r.visitMany(n(t)),r}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(e){if(e instanceof kI)return this.visitMany(e.data),this;let{type:t}=e;if(!fP.isDictionary(t)){let{length:n}=e;if(n>2147483647)throw RangeError(`Cannot write arrays larger than 2^31 - 1 in length`);if(fP.isUnion(t))this.nodes.push(new TL(n,0));else{let{nullCount:r}=e;fP.isNull(t)||RL.call(this,r<=0?new Uint8Array:rI(e.offset,n,e.nullBitmap)),this.nodes.push(new TL(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 RL(e){let t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new wL(this._byteLength,t)),this._byteLength+=t,this}function fFe(e){let{type:t,length:n,typeIds:r,valueOffsets:i}=e;if(RL.call(this,r),t.mode===VM.Sparse)return HL.call(this,e);if(t.mode===VM.Dense){if(e.offset<=0)return RL.call(this,i),HL.call(this,e);{let a=new Int32Array(n),o=Object.create(null),s=Object.create(null);for(let e,t,c=-1;++c<n;)(e=r[c])!==void 0&&((t=o[e])===void 0&&(t=o[e]=i[c]),a[c]=i[c]-t,s[e]=(s[e]??0)+1);RL.call(this,a),this.visitMany(e.children.map((e,r)=>{let i=t.typeIds[r],a=o[i],c=s[i];return e.slice(a,Math.min(n,c))}))}}return this}function pFe(e){let t;return e.nullCount>=e.length?RL.call(this,new Uint8Array):(t=e.values)instanceof Uint8Array?RL.call(this,rI(e.offset,e.length,t)):RL.call(this,iI(e.values))}function zL(e){return RL.call(this,e.values.subarray(0,e.length*e.stride))}function BL(e){let{length:t,values:n,valueOffsets:r}=e,i=FN(r[0]),a=FN(r[t]),o=Math.min(a-i,n.byteLength-i);return RL.call(this,IM(-i,t+1,r)),RL.call(this,n.subarray(i,i+o)),this}function VL(e){let{length:t,valueOffsets:n}=e;if(n){let{0:r,[t]:i}=n;return RL.call(this,IM(-r,t+1,n)),this.visit(e.children[0].slice(r,i-r))}return this.visit(e.children[0])}function HL(e){return this.visitMany(e.type.children.map((t,n)=>e.children[n]).filter(Boolean))[0]}LL.prototype.visitBool=pFe,LL.prototype.visitInt=zL,LL.prototype.visitFloat=zL,LL.prototype.visitUtf8=BL,LL.prototype.visitLargeUtf8=BL,LL.prototype.visitBinary=BL,LL.prototype.visitLargeBinary=BL,LL.prototype.visitFixedSizeBinary=zL,LL.prototype.visitDate=zL,LL.prototype.visitTimestamp=zL,LL.prototype.visitTime=zL,LL.prototype.visitDecimal=zL,LL.prototype.visitList=VL,LL.prototype.visitStruct=HL,LL.prototype.visitUnion=fFe,LL.prototype.visitInterval=zL,LL.prototype.visitDuration=zL,LL.prototype.visitFixedSizeList=VL,LL.prototype.visitMap=VL;var mFe=class extends VI{static throughNode(e){throw Error(`"throughNode" not available in this environment`)}static throughDOM(e,t){throw Error(`"throughDOM" not available in this environment`)}constructor(e){super(),this._position=0,this._started=!1,this._sink=new HI,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,gM(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof e.autoDestroy==`boolean`?e.autoDestroy:!0,this._writeLegacyIpcFormat=typeof e.writeLegacyIpcFormat==`boolean`?e.writeLegacyIpcFormat:!1}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return _M(e)?e.then(e=>this.writeAll(e)):yM(e)?WL(this,e):UL(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(e=this._sink,t=null){return e===this._sink||e instanceof HI?this._sink=e:(this._sink=new HI,e&&uMe(e)?this.toDOMStream({type:`bytes`}).pipeTo(e):e&&dMe(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,(!t||!pL(t,this._schema))&&(t==null?(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 Error(`RecordBatchWriter is closed`);if(e==null||e instanceof hL&&!(t=e.schema)||e instanceof gL&&!(t=e.schema))return this.finish()&&void 0;if(t&&!pL(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof gL?e instanceof _L||this._writeRecordBatch(e):e instanceof hL?this.writeAll(e.batches):vM(e)&&this.writeAll(e)}_writeMessage(e,t=8){let n=t-1,r=xL.encode(e),i=r.byteLength,a=this._writeLegacyIpcFormat?4:8,o=i+a+n&~n,s=o-i-a;return e.headerType===MN.RecordBatch?this._recordBatchBlocks.push(new RI(o,e.bodyLength,this._position)):e.headerType===MN.DictionaryBatch&&this._dictionaryBlocks.push(new RI(o,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(o-a)),i>0&&this._write(r),this._writePadding(s)}_write(e){if(this._started){let t=NM(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(xL.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(kL)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:n,bufferRegions:r,buffers:i}=LL.assemble(e),a=new SL(e.numRows,n,r),o=xL.from(a,t);return this._writeDictionaries(e)._writeMessage(o)._writeBodyBuffers(i)}_writeDictionaryBatch(e,t,n=!1){let{byteLength:r,nodes:i,bufferRegions:a,buffers:o}=LL.assemble(new kI([e])),s=new CL(new SL(e.length,i,a),t,n),c=xL.from(s,r);return this._writeMessage(c)._writeBodyBuffers(o)}_writeBodyBuffers(e){let t,n,r;for(let i=-1,a=e.length;++i<a;)(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=n?.data??[],r=this._seenDictionaries.get(t),i=this._dictionaryDeltaOffsets.get(t)??0;if(!r||r.data[0]!==e[0])for(let[n,r]of e.entries())this._writeDictionaryBatch(r,t,n>0);else if(i<e.length)for(let n of e.slice(i))this._writeDictionaryBatch(n,t,!0);this._seenDictionaries.set(t,n),this._dictionaryDeltaOffsets.set(t,e.length)}return this}},hFe=class e extends mFe{static writeAll(t,n){let r=new e(n);return _M(t)?t.then(e=>r.writeAll(e)):yM(t)?WL(r,t):UL(r,t)}},gFe=class e extends mFe{static writeAll(t){let n=new e;return _M(t)?t.then(e=>n.writeAll(e)):yM(t)?WL(n,t):UL(n,t)}constructor(){super(),this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(e,t,n=!1){if(!n&&this._seenDictionaries.has(t))throw Error(`The Arrow File format does not support replacement dictionaries. `);
118return super._writeDictionaryBatch(e,t,n)}_writeFooter(e){let t=LI.encode(new LI(e,BM.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};function UL(e,t){let n=t;t instanceof hL&&(n=t.batches,e.reset(void 0,t.schema));for(let t of n)e.write(t);return e.finish()}function WL(e,t){return oM(this,void 0,void 0,function*(){var n,r,i,a,o,s,c;try{for(n=!0,r=dM(t);i=yield r.next(),a=i.done,!a;n=!0){c=i.value,n=!1;let t=c;e.write(t)}}catch(e){o={error:e}}finally{try{!n&&!a&&(s=r.return)&&(yield s.call(r))}finally{if(o)throw o.error}}return e.finish()})}function _Fe(e,t=`stream`){return(t===`stream`?hFe:gFe).writeAll(e).toUint8Array(!0)}var vFe=Object.create,yFe=Object.defineProperty,bFe=Object.getOwnPropertyDescriptor,xFe=Object.getOwnPropertyNames,SFe=Object.getPrototypeOf,CFe=Object.prototype.hasOwnProperty,wFe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),TFe=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of xFe(t))!CFe.call(e,i)&&i!==n&&yFe(e,i,{get:()=>t[i],enumerable:!(r=bFe(t,i))||r.enumerable});return e},EFe=(e,t,n)=>(n=e==null?{}:vFe(SFe(e)),TFe(t||!e||!e.__esModule?yFe(n,`default`,{value:e,enumerable:!0}):n,e)),DFe=wFe((e,t)=>{t.exports=Worker}),OFe=(e=>(e[e.UNDEFINED=0]=`UNDEFINED`,e[e.AUTOMATIC=1]=`AUTOMATIC`,e[e.READ_ONLY=2]=`READ_ONLY`,e[e.READ_WRITE=3]=`READ_WRITE`,e))(OFe||{}),kFe=(e=>(e[e.IDENTIFIER=0]=`IDENTIFIER`,e[e.NUMERIC_CONSTANT=1]=`NUMERIC_CONSTANT`,e[e.STRING_CONSTANT=2]=`STRING_CONSTANT`,e[e.OPERATOR=3]=`OPERATOR`,e[e.KEYWORD=4]=`KEYWORD`,e[e.COMMENT=5]=`COMMENT`,e))(kFe||{}),AFe=(e=>(e[e.NONE=0]=`NONE`,e[e.DEBUG=1]=`DEBUG`,e[e.INFO=2]=`INFO`,e[e.WARNING=3]=`WARNING`,e[e.ERROR=4]=`ERROR`,e))(AFe||{}),jFe=(e=>(e[e.NONE=0]=`NONE`,e[e.CONNECT=1]=`CONNECT`,e[e.DISCONNECT=2]=`DISCONNECT`,e[e.OPEN=3]=`OPEN`,e[e.QUERY=4]=`QUERY`,e[e.INSTANTIATE=5]=`INSTANTIATE`,e))(jFe||{}),MFe=(e=>(e[e.NONE=0]=`NONE`,e[e.OK=1]=`OK`,e[e.ERROR=2]=`ERROR`,e[e.START=3]=`START`,e[e.RUN=4]=`RUN`,e[e.CAPTURE=5]=`CAPTURE`,e))(MFe||{}),NFe=(e=>(e[e.NONE=0]=`NONE`,e[e.WEB_WORKER=1]=`WEB_WORKER`,e[e.NODE_WORKER=2]=`NODE_WORKER`,e[e.BINDINGS=3]=`BINDINGS`,e[e.ASYNC_DUCKDB=4]=`ASYNC_DUCKDB`,e))(NFe||{}),PFe=class{log(e){}},FFe=class{constructor(e=2){this.level=e}log(e){e.level>=this.level&&console.log(e)}},IFe=(e=>(e[e.SUCCESS=0]=`SUCCESS`,e[e.MAX_ARROW_ERROR=255]=`MAX_ARROW_ERROR`,e[e.DUCKDB_WASM_RETRY=256]=`DUCKDB_WASM_RETRY`,e))(IFe||{}),LFe=class{constructor(e,t){this._bindings=e,this._conn=t}get bindings(){return this._bindings}async close(){return this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}async query(e){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:e});let t=await this._bindings.runQuery(this._conn,e),n=ML.from(t);return console.assert(n.isSync(),`Reader is not sync`),console.assert(n.isFile(),`Reader is not file`),new hL(n)}async send(e,t=!1){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:e});let n=await this._bindings.startPendingQuery(this._conn,e,t);for(;n==null;)n=await this._bindings.pollPendingQuery(this._conn);let r=new RFe(this._bindings,this._conn,n),i=await ML.from(r);return console.assert(i.isAsync()),console.assert(i.isStream()),i}async cancelSent(){return await this._bindings.cancelPendingQuery(this._conn)}async getTableNames(e){return await this._bindings.getTableNames(this._conn,e)}async prepare(e){let t=await this._bindings.createPrepared(this._conn,e);return new zFe(this._bindings,this._conn,t)}async insertArrowTable(e,t){let n=_Fe(e,`stream`);await this.insertArrowFromIPCStream(n,t)}async insertArrowFromIPCStream(e,t){await this._bindings.insertArrowFromIPCStream(this._conn,e,t)}async insertCSVFromPath(e,t){await this._bindings.insertCSVFromPath(this._conn,e,t)}async insertJSONFromPath(e,t){await this._bindings.insertJSONFromPath(this._conn,e,t)}},RFe=class{constructor(e,t,n){this.db=e,this.conn=t,this.header=n,this._first=!0,this._depleted=!1,this._inFlight=null}async next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e=null;for(this._inFlight!=null&&(e=await this._inFlight,this._inFlight=null);e==null;)e=await this.db.fetchQueryResults(this.conn);return this._depleted=e.length==0,this._depleted||(this._inFlight=this.db.fetchQueryResults(this.conn)),{done:this._depleted,value:e}}[Symbol.asyncIterator](){return this}},zFe=class{constructor(e,t,n){this.bindings=e,this.connectionId=t,this.statementId=n}async close(){await this.bindings.closePrepared(this.connectionId,this.statementId)}async query(...e){let t=await this.bindings.runPrepared(this.connectionId,this.statementId,e),n=ML.from(t);return console.assert(n.isSync()),console.assert(n.isFile()),new hL(n)}async send(...e){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,e),n=new RFe(this.bindings,this.connectionId,t),r=await ML.from(n);return console.assert(r.isAsync()),console.assert(r.isStream()),r}},BFe=(e=>(e.CANCEL_PENDING_QUERY=`CANCEL_PENDING_QUERY`,e.CLOSE_PREPARED=`CLOSE_PREPARED`,e.COLLECT_FILE_STATISTICS=`COLLECT_FILE_STATISTICS`,e.REGIST
118ER_OPFS_FILE_NAME=`REGISTER_OPFS_FILE_NAME`,e.CONNECT=`CONNECT`,e.COPY_FILE_TO_BUFFER=`COPY_FILE_TO_BUFFER`,e.COPY_FILE_TO_PATH=`COPY_FILE_TO_PATH`,e.CREATE_PREPARED=`CREATE_PREPARED`,e.DISCONNECT=`DISCONNECT`,e.DROP_FILE=`DROP_FILE`,e.DROP_FILES=`DROP_FILES`,e.EXPORT_FILE_STATISTICS=`EXPORT_FILE_STATISTICS`,e.FETCH_QUERY_RESULTS=`FETCH_QUERY_RESULTS`,e.FLUSH_FILES=`FLUSH_FILES`,e.GET_FEATURE_FLAGS=`GET_FEATURE_FLAGS`,e.GET_TABLE_NAMES=`GET_TABLE_NAMES`,e.GET_VERSION=`GET_VERSION`,e.GLOB_FILE_INFOS=`GLOB_FILE_INFOS`,e.INSERT_ARROW_FROM_IPC_STREAM=`INSERT_ARROW_FROM_IPC_STREAM`,e.INSERT_CSV_FROM_PATH=`IMPORT_CSV_FROM_PATH`,e.INSERT_JSON_FROM_PATH=`IMPORT_JSON_FROM_PATH`,e.INSTANTIATE=`INSTANTIATE`,e.OPEN=`OPEN`,e.PING=`PING`,e.POLL_PENDING_QUERY=`POLL_PENDING_QUERY`,e.REGISTER_FILE_BUFFER=`REGISTER_FILE_BUFFER`,e.REGISTER_FILE_HANDLE=`REGISTER_FILE_HANDLE`,e.REGISTER_FILE_URL=`REGISTER_FILE_URL`,e.RESET=`RESET`,e.RUN_PREPARED=`RUN_PREPARED`,e.RUN_QUERY=`RUN_QUERY`,e.SEND_PREPARED=`SEND_PREPARED`,e.START_PENDING_QUERY=`START_PENDING_QUERY`,e.TOKENIZE=`TOKENIZE`,e))(BFe||{}),VFe=(e=>(e.CONNECTION_INFO=`CONNECTION_INFO`,e.ERROR=`ERROR`,e.FEATURE_FLAGS=`FEATURE_FLAGS`,e.FILE_BUFFER=`FILE_BUFFER`,e.FILE_INFOS=`FILE_INFOS`,e.FILE_SIZE=`FILE_SIZE`,e.FILE_STATISTICS=`FILE_STATISTICS`,e.INSTANTIATE_PROGRESS=`INSTANTIATE_PROGRESS`,e.LOG=`LOG`,e.PROGRESS_UPDATE=`PROGRESS_UPDATE`,e.OK=`OK`,e.PREPARED_STATEMENT_ID=`PREPARED_STATEMENT_ID`,e.QUERY_PLAN=`QUERY_PLAN`,e.QUERY_RESULT=`QUERY_RESULT`,e.QUERY_RESULT_CHUNK=`QUERY_RESULT_CHUNK`,e.QUERY_RESULT_HEADER=`QUERY_RESULT_HEADER`,e.QUERY_RESULT_HEADER_OR_NULL=`QUERY_RESULT_HEADER_OR_NULL`,e.REGISTERED_FILE=`REGISTERED_FILE`,e.SCRIPT_TOKENS=`SCRIPT_TOKENS`,e.SUCCESS=`SUCCESS`,e.TABLE_NAMES=`TABLE_NAMES`,e.VERSION_STRING=`VERSION_STRING`,e))(VFe||{}),GL=class{constructor(e,t){this.promiseResolver=()=>{}
118,this.promiseRejecter=()=>{},this.type=e,this.data=t,this.promise=new Promise((e,t)=>{this.promiseResolver=e,this.promiseRejecter=t})}};function KL(e){switch(e.typeId){case q.Binary:return{sqlType:`binary`};case q.Bool:return{sqlType:`bool`};case q.Date:return{sqlType:`date`};case q.DateDay:return{sqlType:`date32[d]`};case q.DateMillisecond:return{sqlType:`date64[ms]`};case q.Decimal:{let t=e;return{sqlType:`decimal`,precision:t.precision,scale:t.scale}}case q.Float:return{sqlType:`float`};case q.Float16:return{sqlType:`float16`};case q.Float32:return{sqlType:`float32`};case q.Float64:return{sqlType:`float64`};case q.Int:return{sqlType:`int32`};case q.Int16:return{sqlType:`int16`};case q.Int32:return{sqlType:`int32`};case q.Int64:return{sqlType:`int64`};case q.Uint16:return{sqlType:`uint16`};case q.Uint32:return{sqlType:`uint32`};case q.Uint64:return{sqlType:`uint64`};case q.Uint8:return{sqlType:`uint8`};case q.IntervalDayTime:return{sqlType:`interval[dt]`};case q.IntervalYearMonth:return{sqlType:`interval[m]`};case q.List:return{sqlType:`list`,valueType:KL(e.valueType)};case q.FixedSizeBinary:return{sqlType:`fixedsizebinary`,byteWidth:e.byteWidth};case q.Null:return{sqlType:`null`};case q.Utf8:return{sqlType:`utf8`};case q.Struct:return{sqlType:`struct`,fields:e.children.map(e=>qL(e.name,e.type))};case q.Map:{let t=e;return{sqlType:`map`,keyType:KL(t.keyType),valueType:KL(t.valueType)}}case q.Time:return{sqlType:`time[s]`};case q.TimeMicrosecond:return{sqlType:`time[us]`};case q.TimeMillisecond:return{sqlType:`time[ms]`};case q.TimeNanosecond:return{sqlType:`time[ns]`};case q.TimeSecond:return{sqlType:`time[s]`};case q.Timestamp:return{sqlType:`timestamp`,timezone:e.timezone||void 0};case q.TimestampSecond:return{sqlType:`timestamp[s]`,timezone:e.timezone||void 0};case q.TimestampMicrosecond:return{sqlType:`timestamp[us]`,timezone:e.timezone||void 0};case q.TimestampNanosecond:return{sqlType:`timestamp[ns]`,timezone:e.timezone||void 0};case q.TimestampMillisecond:return{sqlType:`timestamp[ms]`,timezone:e.timezone||void 0}}throw Error(`unsupported arrow type: ${e.toString()}`)}function qL(e,t){let n=KL(t);return n.name=e,n}var HFe=new TextEncoder,UFe=class{constructor(e,t=null){this._onInstantiationProgress=[],this._onExecutionProgress=[],this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{},this._nextMessageId=0,this._pendingRequests=new Map,this._logger=e,this._onMessageHandler=this.onMessage.bind(this),this._onErrorHandler=this.onError.bind(this),this._onCloseHandler=this.onClose.bind(this),t!=null&&this.attach(t)}get logger(){return this._logger}attach(e){this._worker=e,this._worker.addEventListener(`message`,this._onMessageHandler),this._worker.addEventListener(`error`,this._onErrorHandler),this._worker.addEventListener(`close`,this._onCloseHandler),this._workerShutdownPromise=new Promise((e,t)=>{this._workerShutdownResolver=e})}detach(){this._worker&&(this._worker.removeEventListener(`message`,this._onMessageHandler),this._worker.removeEventListener(`error`,this._onErrorHandler),this._worker.removeEventListener(`close`,this._onCloseHandler),this._worker=null,this._workerShutdownResolver(null),this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async terminate(){this._worker&&(this._worker.terminate(),this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async postTask(e,t=[]){if(!this._worker){console.error(`cannot send a message since the worker is not set!`);return}let n=this._nextMessageId++;return this._pendingRequests.set(n,e),this._worker.postMessage({messageId:n,type:e.type,data:e.data},t),await e.promise}onMessage(e){var t;let n=e.data;switch(n.type){case`PROGRESS_UPDATE`:for(let e of this._onExecutionProgress)e(n.data);return;case`LOG`:this._logger.log(n.data);return;case`INSTANTIATE_PROGRESS`:for(let e of this._onInstantiationProgress)e(n.data);return}let r=this._pendingRequests.get(n.requestId);if(!r){console.warn(`unassociated response: [${n.requestId}, ${n.type.toString()}]`);return}if(this._pendingRequests.delete(n.requestId),n.type==`ERROR`){let e=Error(n.data.message);e.name=n.data.name,(t=Object.getOwnPropertyDescriptor(e,`stack`))!=null&&t.writable&&(e.stack=n.data.stack),r.promiseRe
118jecter(e);return}switch(r.type){case`CLOSE_PREPARED`:case`COLLECT_FILE_STATISTICS`:case`REGISTER_OPFS_FILE_NAME`:case`COPY_FILE_TO_PATH`:case`DISCONNECT`:case`DROP_FILE`:case`DROP_FILES`:case`FLUSH_FILES`:case`INSERT_ARROW_FROM_IPC_STREAM`:case`IMPORT_CSV_FROM_PATH`:case`IMPORT_JSON_FROM_PATH`:case`OPEN`:case`PING`:case`REGISTER_FILE_BUFFER`:case`REGISTER_FILE_HANDLE`:case`REGISTER_FILE_URL`:case`RESET`:if(n.type==`OK`){r.promiseResolver(n.data);return}break;case`INSTANTIATE`:if(this._onInstantiationProgress=[],n.type==`OK`){r.promiseResolver(n.data);return}break;case`GLOB_FILE_INFOS`:if(n.type==`FILE_INFOS`){r.promiseResolver(n.data);return}break;case`GET_VERSION`:if(n.type==`VERSION_STRING`){r.promiseResolver(n.data);return}break;case`GET_FEATURE_FLAGS`:if(n.type==`FEATURE_FLAGS`){r.promiseResolver(n.data);return}break;case`GET_TABLE_NAMES`:if(n.type==`TABLE_NAMES`){r.promiseResolver(n.data);return}break;case`TOKENIZE`:if(n.type==`SCRIPT_TOKENS`){r.promiseResolver(n.data);return}break;case`COPY_FILE_TO_BUFFER`:if(n.type==`FILE_BUFFER`){r.promiseResolver(n.data);return}break;case`EXPORT_FILE_STATISTICS`:if(n.type==`FILE_STATISTICS`){r.promiseResolver(n.data);return}break;case`CONNECT`:if(n.type==`CONNECTION_INFO`){r.promiseResolver(n.data);return}break;case`RUN_PREPARED`:case`RUN_QUERY`:if(n.type==`QUERY_RESULT`){r.promiseResolver(n.data);return}break;case`SEND_PREPARED`:if(n.type==`QUERY_RESULT_HEADER`){r.promiseResolver(n.data);return}break;case`START_PENDING_QUERY`:if(n.type==`QUERY_RESULT_HEADER_OR_NULL`){r.promiseResolver(n.data);return}break;case`POLL_PENDING_QUERY`:if(n.type==`QUERY_RESULT_HEADER_OR_NULL`){r.promiseResolver(n.data);return}break;case`CANCEL_PENDING_QUERY`:if(this._onInstantiationProgress=[],n.type==`SUCCESS`){r.promiseResolver(n.data);return}break;case`FETCH_QUERY_RESULTS`:if(n.type==`QUERY_RESULT_CHUNK`){r.promiseResolver(n.data);return}break;case`CREATE_PREPARED`:if(n.type==`PREPARED_STATEMENT_ID`){r.promiseResolver(n.data);return}break}r.promiseRejecter(Error(`unexpected response type: ${n.type.toString()}`))}onError(e){console.error(e),console.error(`error in duckdb worker: ${e.message}`),this._pendingRequests.clear()}onClose(){if(this._workerShutdownResolver(null),this._pendingRequests.size!=0){console.warn(`worker terminated with ${this._pendingRequests.size} pending requests`);return}
vendor: 4,389 bytes, line 118
118this._pendingRequests.clear()}async reset(){let e=new GL(`RESET`,null);return await this.postTask(e)}async ping(){let e=new GL(`PING`,null);await this.postTask(e)}async dropFile(e){let t=new GL(`DROP_FILE`,e);return await this.postTask(t)}async dropFiles(){let e=new GL(`DROP_FILES`,null);return await this.postTask(e)}async flushFiles(){let e=new GL(`FLUSH_FILES`,null);return await this.postTask(e)}async instantiate(e,t=null,n=e=>{}){this._onInstantiationProgress.push(n);let r=new GL(`INSTANTIATE`,[e,t]);return await this.postTask(r)}async getVersion(){let e=new GL(`GET_VERSION`,null);return await this.postTask(e)}async getFeatureFlags(){let e=new GL(`GET_FEATURE_FLAGS`,null);return await this.postTask(e)}async open(e){let t=new GL(`OPEN`,e);await this.postTask(t)}async tokenize(e){let t=new GL(`TOKENIZE`,e);return await this.postTask(t)}async connectInternal(){let e=new GL(`CONNECT`,null);return await this.postTask(e)}async connect(){let e=await this.connectInternal();return new LFe(this,e)}async disconnect(e){let t=new GL(`DISCONNECT`,e);await this.postTask(t)}async runQuery(e,t){let n=new GL(`RUN_QUERY`,[e,t]);return await this.postTask(n)}async startPendingQuery(e,t,n=!1){let r=new GL(`START_PENDING_QUERY`,[e,t,n]);return await this.postTask(r)}async pollPendingQuery(e){let t=new GL(`POLL_PENDING_QUERY`,e);return await this.postTask(t)}async cancelPendingQuery(e){let t=new GL(`CANCEL_PENDING_QUERY`,e);return await this.postTask(t)}async fetchQueryResults(e){let t=new GL(`FETCH_QUERY_RESULTS`,e);return await this.postTask(t)}async getTableNames(e,t){let n=new GL(`GET_TABLE_NAMES`,[e,t]);return await this.postTask(n)}async createPrepared(e,t){let n=new GL(`CREATE_PREPARED`,[e,t]);return await this.postTask(n)}async closePrepared(e,t){let n=new GL(`CLOSE_PREPARED`,[e,t]);await this.postTask(n)}async runPrepared(e,t,n){let r=new GL(`RUN_PREPARED`,[e,t,n]);return await this.postTask(r)}async sendPrepared(e,t,n){let r=new GL(`SEND_PREPARED`,[e,t,n]);return await this.postTask(r)}async globFiles(e){let t=new GL(`GLOB_FILE_INFOS`,e);return await this.postTask(t)}async registerFileText(e,t){let n=HFe.encode(t);await this.registerFileBuffer(e,n)}async registerFileURL(e,t,n,r){t===void 0&&(t=e);let i=new GL(`REGISTER_FILE_URL`,[e,t,n,r]);await this.postTask(i)}async registerEmptyFileBuffer(e){}async registerFileBuffer(e,t){let n=new GL(`REGISTER_FILE_BUFFER`,[e,t]);await this.postTask(n,[t.buffer])}async registerFileHandle(e,t,n,r){let i=new GL(`REGISTER_FILE_HANDLE`,[e,t,n,r]);await this.postTask(i,[])}async registerOPFSFileName(e){let t=new GL(`REGISTER_OPFS_FILE_NAME`,[e]);await this.postTask(t,[])}async collectFileStatistics(e,t){let n=new GL(`COLLECT_FILE_STATISTICS`,[e,t]);await this.postTask(n,[])}async exportFileStatistics(e){let t=new GL(`EXPORT_FILE_STATISTICS`,e);return await this.postTask(t,[])}async copyFileToBuffer(e){let t=new GL(`COPY_FILE_TO_BUFFER`,e);return await this.postTask(t)}async copyFileToPath(e,t){let n=new GL(`COPY_FILE_TO_PATH`,[e,t]);await this.postTask(n)}async insertArrowFromIPCStream(e,t,n){if(t.length==0)return;let r=new GL(`INSERT_ARROW_FROM_IPC_STREAM`,[e,t,n]);await this.postTask(r,[t.buffer])}async insertCSVFromPath(e,t,n){if(n.columns!==void 0){let e=[];for(let t in n.columns){let r=n.columns[t];e.push(qL(t,r))}n.columnsFlat=e,delete n.columns}let r=new GL(`IMPORT_CSV_FROM_PATH`,[e,t,n]);await this.postTask(r)}async insertJSONFromPath(e,t,n){if(n.columns!==void 0){let e=[];for(let t in n.columns){let r=n.columns[t];e.push(qL(t,r))}n.columnsFlat=e,delete n.columns}let r=new GL(`IMPORT_JSON_FROM_PATH`,[e,t,n]);await this.postTask(r)}};function WFe(){let e=new TextDecoder;return t=>(typeof SharedArrayBuffer<`u`&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),e.decode(t))}WFe();var GFe=(e=>(e[e.BUFFER=0]=`BUFFER`,e[e.NODE_FS=1]=`NODE_FS`,e[e.BROWSER_FILEREADER=2]=`BROWSER_FILEREADER`,e[e.BROWSER_FSACCESS=3]=`BROWSER_FSACCESS`,e[e.HTTP=4]=`HTTP`,e[e.S3=5]=`S3`,e))(GFe||{}),KFe=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),qFe=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),JFe=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),YFe
118=()=>(async e=>{try{return typeof MessageChannel<`u`&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11])),JL={name:`@duckdb/duckdb-wasm`,version:`1.30.0`,description:`DuckDB powered by WebAssembly`,license:`MIT`,repository:{type:`git`,url:`https://github.com/duckdb/duckdb-wasm.git`},keywords:[`sql`,`duckdb`,`relational`,`database`,`data`,`query`,`wasm`,`analytics`,`olap`,`arrow`,`parquet`,`json`,`csv`],dependencies:{"apache-arrow":`^17.0.0`},devDependencies:{"@types/emscripten":`^1.39.10`,"@types/jasmine":`^5.1.4`,"@typescript-eslint/eslint-plugin":`^6.21.0`,"@typescript-eslint/parser":`^6.21.0`,esbuild:`^0.20.2`,eslint:`^8.57.0`,"eslint-plugin-jasmine":`^4.1.3`,"eslint-plugin-react":`^7.34.0`,"fast-glob":`^3.3.2`,jasmine:`^5.1.0`,"jasmine-core":`^5.1.2`,"jasmine-spec-reporter":`^7.0.0`,"js-sha256":`^0.11.1`,karma:`^6.4.2`,"karma-chrome-launcher":`^3.2.0`,"karma-coverage":`^2.2.1`,"karma-firefox-launcher":`^2.1.3`,"karma-jasmine":`^5.1.0`,"karma-jasmine-html-reporter":`^2.1.0`,"karma-sourcemap-loader":`^0.4.0`,"karma-spec-reporter":`^0.0.36`,"make-dir":`^4.0.0`,nyc:`^15.1.0`,prettier:`^3.2.5`,puppeteer:`^22.8.0`,rimraf:`^5.0.5`,s3rver:`^3.7.1`,typedoc:`^0.25.13`,typescript:`^5.3.3`,"wasm-feature-detect":`^1.6.1`,"web-worker":`^1.2.0`},scripts:{"build:debug":`node bundle.mjs debug && tsc --emitDeclarationOnly`,"build:release":`node bundle.mjs release && tsc --emitDeclarationOnly`,docs:`typedoc`,format:`prettier --write "**/*.+(js|ts)"`,report:`node ./coverage.mjs`,"test:node":`node --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs`,"test:node:debug":`node --inspect-brk --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs`,"test:node:coverage":`nyc -r json --report-dir ./coverage/node node ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs`,"test:firefox":`karma start ./karma/tests-firefox.cjs`,"test:chrome":`karma start ./karma/tests-chrome.cjs`,"test:chrome:eh":`karma start ./karma/tests-chrome-eh.cjs`,"test:chrome:coverage":`karma start ./karma/tests-chrome-coverage.cjs`,"test:browser":`karma start ./karma/tests-all.cjs`,"test:browser:debug":`karma start ./karma/tests-debug.cjs`,test:`npm run test:chrome && npm run test:node`,"test:coverage":`npm run test:chrome:coverage && npm run test:node:coverage && npm run report`,lint:`eslint src test`},files:[`dist`,`!dist/tests-*`,`!dist/duckdb-browser-mvp.worker.js.map`,`!dist/types/test`],main:`dist/duckdb-browser.cjs`,module:`dist/duckdb-browser.mjs`,types:`dist/duckdb-browser.d.ts`,jsdelivr:`dist/duckdb-browser.cjs`,unpkg:`dist/duckdb-browser.mjs`,sideEffects:!1,browser:{fs:!1,path:!1,perf_hooks:!1,os:!1,worker_threads:!1},exports:{"./dist/duckdb-mvp.wasm":`./dist/duckdb-mvp.wasm`,"./dist/duckdb-eh.wasm":`./dist/duckdb-eh.wasm`,"./dist/duckdb-coi.wasm":`./dist/duckdb-coi.wasm`,"./dist/duckdb-browser":`./dist/duckdb-browser.mjs`,"./dist/duckdb-browser.cjs":`./dist/duckdb-browser.cjs`,"./dist/duckdb-browser.mjs":`./dist/duckdb-browser.mjs`,"./dist/duckdb-browser-coi.pthread.worker.js":`./dist/duckdb-browser-coi.pthread.worker.js`,"./dist/duckdb-browser-coi.worker.js":`./dist/duckdb-browser-coi.worker.js`,"./dist/duckdb-browser-eh.worker.js":`./dist/duckdb-browser-eh.worker.js`,"./dist/duckdb-browser-mvp.worker.js":`./dist/duckdb-browser-mvp.worker.js`,"./dist/duckdb-node":`./dist/duckdb-node.cjs`,"./dist/duckdb-node.cjs":`./dist/duckdb-node.cjs`,"./dist/duckdb-node-blocking":`./dist/duckdb-node-blocking.cjs`,"./dist/duckdb-node-blocking.cjs":`./dist/duckdb-node-blocking.cjs`,"./dist/duckdb-node-eh.worker.cjs":`./dist/duckdb-node-eh.worker.cjs`,"./dist/duckdb-node-mvp.worker.cjs":`./dist/duckdb-node-mvp.worker.cjs`,"./blocking":{node:{types:`./dist/duckdb-node-blocking.d.ts`,require:`./dist/duckdb-node-blocking.cjs`,import:`./dist/duckdb-node-blocking.cjs`},types:`./dist/duckdb-node-blocking.d.ts`,import:`./dist/duckdb-node-blocking.mjs`,require:`./dist/duckdb-node-blocking.cjs`},".":{browser:{types:`./dist/duckdb-browser.d.ts`,import:`./dist/duckdb-browser.mjs`,require:`./dist/duckdb-browser.cjs`},node:{types:`./dist/duckdb-node.d.ts`,import:`./dist/duckdb-node.cjs`,require:`./dist/duckdb-node.cjs`},types:`./dist/duckdb-browser.d.ts`,import:`./dist/duckdb-browser.mjs`,require:`./dist/duckdb-browser.cjs`}}},XFe=JL.name,ZFe=JL.version,YL=JL.version.split(`.`);YL[0],YL[1],YL[2];var QFe=()=>typeof navigator>`u`;function $Fe(){let e=`https://cdn.jsdelivr.net/npm/${XFe}@${ZFe}/dist/`;return{mvp:{mainModule:`${e}duckdb-mvp.wasm`,mainWorker:`${e}duckdb-browser-mvp.worker.js`},eh:{mainModule:`${e}duckdb-eh.wasm`,mainWorker:`${e}duckdb-browser-eh.worker.js`}}}var eIe=null,tIe=null,nIe=null,rIe=null,iIe=null;async function aIe(){return eIe??=typeof BigInt64Array<`u`,tIe??=await qFe(),nIe??=await YFe(),rIe??=await JFe(),iIe??=await KFe(),{bigInt64Array:eIe,crossOriginIsolated:QFe()||globalThis.crossOriginIsolated||!1,wasmExceptions:tIe,wasmSIMD:rIe,wasmThreads:nIe,wasmBulkMemory:iIe}}async function oIe(e){let t=await aIe();if(t.wasmExceptions){if(t.wasmSIMD&&t.wasmThreads&&t.crossOriginIsolated&&e.coi)return{mainModule:e.coi.mainModule,mainWorker:e.coi.mainWorker,pthreadWorker:e.coi.pthreadWorker};if(e.eh)return{mainModule:e.eh.mainModule,mainWorker:e.eh.mainWorker,pthreadWorker:null}}return{mainModule:e.mvp.mainModule,mainWorker:e.mvp.mainWorker,pthreadWorker:null}}EFe(DFe());function XL(e={}){return new sIe(e)}var sIe=class{_ipc;_options;_db;_con;_config;_loadPromise;constructor(e={}){let{ipc:t,duckdb:n,connection:r,config:i,...a}=e;this._ipc=t,this._options=a,this._db=n,this._con=r,this._config=i}async getDuckDB(){return this._db||await lIe(this),this._db}async getConnection(){return this._con||await lIe(this),this._con}async query(e){let{type:t,sql:n}=e,r=await cIe(await this.getConnection(),n);return t===`exec`?void 0:t===`arrow`?qD(r,this._ipc):qD(r).toArray()}};function cIe(e,t){return new Promise((n,r)=>{e.useUnsafe(async(e,i)=>{try{n(await e.runQuery(i,t))}catch(e){r(e)}})})}function lIe(e){return e._loadPromise||=(e._db?Promise.resolve(e._db):uIe(e._options).then(t=>e._db=t)).then(t=>e._config==null?t:t.open(e._config).then(()=>t)).then(e=>e.connect()).then(t=>e._con=t),e._loadPromise}async function uIe({log:e=!1}={}){let t=await oIe($Fe()),n=URL.createObjectURL(new Blob([`importScripts("${t.mainWorker}");`],{type:`text/javascript`})),r=new Worker(n),i=new UFe(e?new FFe:new PFe,r);return await i.instantiate(t.mainModule,t.pthreadWorker),URL.revokeObjectURL(n),i}function ZL(e,t,{source:n,clients:r=rD(n)?new Set([n]):void 0}){return{meta:{type:`point`},source:n,clients:r,value:t,predicate:t===void 0?null:YA(e,[ak(t)])}}function QL(e,t,{source:n,clients:r=rD(n)?new Set([n]):void 0}){let i=null;if(t?.length){let n=t.length&&e.length===1?[YA(e[0],t.map(e=>ak(e[0])))]:t.map(t=>NA(t.map((t,n)=>KA(e[n],ak(t)))));i=t.length===0?ak(!1):n.length>1?PA(n):n[0]}return{meta:{type:`point`},source:n,clients:r,value:t,predicate:i}}function dIe(e,t,{source:n,clients:r=rD(n)?new Set([n]):void 0,bin:i,scale:a,pixelSize:o=1}){let s=t==null?null:qA(e,t);return{meta:{type:`interval`,scales:a&&[a],bin:i,pixelSize:o},source:n,clients:r,value:t,predicate:s}}function fIe(e,t,{source:n,clients:r=rD(n)?new Set([n]):void 0,bin:i,scales:a=[],pixelSize:o=1}){let s=t==null?null:NA(e.map((e,n)=>qA(e,t[n])));return{meta:{type:`interval`,scales:a,bin:i,pixelSize:o},source:n,clients:r,value:t,predicate:s}}var pIe=e=>e,mIe={contains:rj,prefix:ij,suffix:aj,regexp:nj};function hIe(e,t,{source:n,clients:r=void 0,method:i=`contains`,caseSensitive:a=!1}){let o=mIe[i],s=a?pIe:oj,c=t?o(s(e),s(ak(t))):null;return{meta:{type:`match`,method:i},source:n,clients:r,value:t,predicate:c}}function gIe(e,t,{source:n,clients:r=void 0,method:i=`contains`,caseSensitive:a=!1}){t||=null;let o=mIe[i],s=a?pIe:oj,c=s(ak(t)),l=t?PA(e.flatMap(e=>t?o(s(e),c):[])):null;return{meta:{type:`match`,method:i},source:n,clients:r,value:t,predicate:l}}function _Ie(e,t,{source:n,clients:r=rD(n)?new Set([n]):void 0,listMatch:i=`any`}){return{source:n,clients:r,value:t,predicate:t===void 0?null:(i===`all`?vA:yA)(e,ak(t))}}function vIe(e){return typeof e?.getChild==`function`}var yIe=class{_set;_done;_promise;constructor(){this._set=new Set,this._done=()=>{},this._promise=new Promise(e=>this._done=e)}pending(e){this._set.add(e)}ready(e){return this._set.delete(e),this._set.size===0}resolve(){this._promise=new Promise(e=>{this._done(),this._done=e})}get promise(){return this._promise}};function $L(e){if(vIe(e))return bIe(e);if(Array.isArray(e))return xIe(e);throw Error(`Unrecognized data format.`)}function bIe(e){let{numRows:t}=e;return{numRows:t,columns:e.toColumns()}}function xIe(e){let t=e.length;if(typeof e[0]==`object`){let n=t?Object.keys(e[0]):[],r={};return n.length>
1180&&n.forEach(t=>{r[t]=e.map(e=>e[t])}),{numRows:t,columns:r}}else return{numRows:t,values:e}}function eR(e){switch(e){case`BIGINT`:case`HUGEINT`:case`INTEGER`:case`SMALLINT`:case`TINYINT`:case`UBIGINT`:case`UINTEGER`:case`USMALLINT`:case`UTINYINT`:case`DOUBLE`:case`FLOAT`:case`REAL`:return`number`;case`DATE`:case`TIMESTAMP`:case`TIMESTAMPTZ`:case`TIMESTAMP WITH TIME ZONE`:case`TIME`:case`TIMESTAMP_MS`:case`TIMESTAMP_NS`:return`date`;case`BOOLEAN`:return`boolean`;case`VARCHAR`:case`UUID`:case`JSON`:return`string`;case`ARRAY`:case`LIST`:return`array`;case`BLOB`:case`STRUCT`:case`MAP`:case`GEOMETRY`:return`object`;default:if(e.startsWith(`ENUM`))return`string`;if(e.startsWith(`DECIMAL`))return`number`;if(e.startsWith(`STRUCT`)||e.startsWith(`MAP`))return`object`;if(e.endsWith(`]`))return`array`;throw Error(`Unsupported type: ${e}`)}}var SIe=`count`,CIe=`nulls`,wIe=`distinct`,TIe={[SIe]:eA,[wIe]:e=>eA(e).distinct(),max:tA,min:nA,[CIe]:e=>eA().where(FA(e))};function EIe({table:e,column:t,stats:n}){return Uk.from(e).select(Array.from(n,e=>({[e]:TIe[e](t)})))}async function DIe(e,t){return t.length===1&&t[0].column===`*`?kIe(e,t[0].table):(await Promise.all(t.map(t=>OIe(e,t)))).filter(e=>e!==void 0)}async function OIe(e,{table:t,column:n,stats:r}){let i=YD(n)&&hj(n),a=Uk.from({source:t}).select({column:n},i?`*`:{}).groupby(i?ej`ALL`:[]),o;try{[o]=Array.from(await e.query(Uk.describe(a)))}catch{o={column_name:`column`,column_type:`DOUBLE`,null:`YES`}}let s={table:t,column:`${n}`,sqlType:o.column_type,type:eR(o.column_type),nullable:o.null===`YES`};if(!r?.length)return s;let[c]=await e.query(EIe({table:t,column:n,stats:r}),{persist:!0});return Object.assign(s,c)}async function kIe(e,t){return Array.from(await e.query(`DESC ${hk(t)}`)).map(e=>({table:t,column:e.column_name,sqlType:e.column_type,type:eR(e.column_type),nullable:e.null===`YES`}))}function AIe(e){return typeof e?.activate==`function`&&e.activate.length===0}var jIe=s({Coordinator:()=>Xj,DuckDBWASMConnector:()=>sIe,MosaicClient:()=>iD,Param:()=>eM,Priority:()=>qj,RestConnector:()=>aM,Selection:()=>rM,SocketConnector:()=>JD,Synchronizer:()=>yIe,clauseInterval:()=>dIe,clauseIntervals:()=>fIe,clauseList:()=>_Ie,clauseMatch:()=>hIe,clauseMatchAny:()=>gIe,clausePoint:()=>ZL,clausePoints:()=>QL,coordinator:()=>Yj,decodeIPC:()=>qD,distinct:()=>Qj,isActivatable:()=>AIe,isArrowTable:()=>vIe,isParam:()=>$j,isSelection:()=>tM,jsType:()=>eR,makeClient:()=>Zj,queryFieldInfo:()=>DIe,restConnector:()=>oMe,socketConnector:()=>iOe,throttle:()=>nD,toDataColumns:()=>$L,wasmConnector:()=>XL}),tR=Symbol(`Fixed`),nR=Symbol(`Transient`),MIe=Symbol(`Transform`);function rR(e){return e!=null&&!Number.isNaN(e)}function iR(e,t){return rR(t)-+rR(e)||xg(e,t)}function aR(e,t){return rR(t)-+rR(e)||Sg(e,t)}function oR(e){return e!=null&&`${e}`!=``}function sR(e){return isFinite(e)?e:NaN}function cR(e){return e>0&&isFinite(e)?e:NaN}function lR(e){return e<0&&isFinite(e)?e:NaN}function NIe(e,t){if(e instanceof Date||(e=new Date(+e)),isNaN(e))return typeof t==`function`?t(e):t;let n=e.getUTCHours(),r=e.getUTCMinutes(),i=e.getUTCSeconds(),a=e.getUTCMilliseconds();return`${PIe(e.getUTCFullYear(),4)}-${uR(e.getUTCMonth()+1,2)}-${uR(e.getUTCDate(),2)}${n||r||i||a?`T${uR(n,2)}:${uR(r,2)}${i||a?`:${uR(i,2)}${a?`.${uR(a,3)}`:``}`:``}Z`:``}`}function PIe(e){return e<0?`-${uR(-e,6)}`:e>9999?`+${uR(e,6)}`:uR(e,4)}function uR(e,t){return`${e}`.padStart(t,`0`)}var FIe=/^(?:[-+]\d{2})?\d{4}(?:-\d{2}(?:-\d{2})?)?(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d{3})?)?(?:Z|[-+]\d{2}:?\d{2})?)?$/;function IIe(e,t){return FIe.test(e+=``)?new Date(e):typeof t==`function`?t(e):t}function dR(e){if(e==null)return;let t=e[0],n=e[e.length-1];return Sg(t,n)}var fR=1e3,pR=fR*60,mR=pR*60,hR=mR*24,gR=hR*7,_R=hR*30,vR=hR*365,yR=[[`millisecond`,1],[`2 milliseconds`,2],[`5 milliseconds`,5],[`10 milliseconds`,10],[`20 milliseconds`,20],[`50 milliseconds`,50],[`100 milliseconds`,100],[`200 milliseconds`,200],[`500 milliseconds`,500],[`second`,fR],[`5 seconds`,5*fR],[`15 seconds`,15*fR],[`30 seconds`,30*fR],[`minute`,pR],[`5 minutes`,5*pR],[`15 minutes`,15*pR],[`30 minutes`,30*pR],[`hour`,mR],[`3 hours`,3*mR],[`6 hours`,6*mR],[`12 hours`,12*mR],[`day`,hR],[`2 days`,2*hR],[`week`,gR],[`2 weeks`,2*gR],[`month`,_R],[`3 months`,3*_R],[`6 months`,6*_R],[`year`,vR],[`2 years`,2*vR],[`5 years`,5*vR],[`10 years`,10*vR],[`20 years`,20*vR],[`50 years`,50*vR],[`100 years`,100*vR]],bR=new Map([[`second`,fR],[`minute`,pR],[`hour`,mR],[`day`,hR],[`monday`,gR],[`tuesday`,gR],[`wednesday`,gR],[`thursday`,gR],[`friday`,gR],[`saturday`,gR],[`sunday`,gR],[`week`,gR],[`month`,_R],[`year`,vR]]),LIe=new Map([[`second`,Fy],[`minute`,Iy],[`hour`,Ry],[`day`,By],[`monday`,Gy],[`tuesday`,epe],[`wednesday`,tpe],[`thursday`,Ky],[`friday`,npe],[`saturday`,rpe],[`sunday`,Wy],[`week`,Wy],[`month`,Zy],[`year`,$y]]),xR=new Map([[`second`,Fy],[`minute`,Ly],[`hour`,zy],[`day`,Hy],[`monday`,Yy],[`tuesday`,ipe],[`wednesday`,ape],[`thursday`,Xy],[`friday`,ope],[`saturday`,spe],[`sunday`,Jy],[`week`,Jy],[`month`,Qy],[`year`,eb]]),SR=Symbol(`intervalDuration`),CR=Symbol(`intervalType`);for(let[e,t]of LIe)t[SR]=bR.get(e),t[CR]=`time`;for(let[e,t]of xR)t[SR]=bR.get(e),t[CR]=`utc`;var wR=[[`year`,eb,`utc`],[`month`,Qy,`utc`],[`day`,Hy,`utc`,6*_R],[`hour`,zy,`utc`,3*hR],[`minute`,Ly,`utc`,6*mR],[`second`,Fy,`utc`,3
1180*pR]],TR=[[`year`,$y,`time`],[`month`,Zy,`time`],[`day`,By,`time`,6*_R],[`hour`,Ry,`time`,3*hR],[`minute`,Iy,`time`,6*mR],[`second`,Fy,`time`,30*pR]],RIe=[wR[0],TR[0],wR[1],TR[1],wR[2],TR[2],...wR.slice(3)];function ER(e){let t=`${e}`.toLowerCase();t.endsWith(`s`)&&(t=t.slice(0,-1));let n=1,r=/^(?:(\d+)\s+)/.exec(t);switch(r&&(t=t.slice(r[0].length),n=+r[1]),t){case`quarter`:t=`month`,n*=3;break;case`half`:t=`month`,n*=6;break}let i=xR.get(t);if(!i)throw Error(`unknown interval: ${e}`);if(n>1&&!i.every)throw Error(`non-periodic interval: ${t}`);return[t,n]}function DR(e){return zIe(ER(e),`time`)}function OR(e){return zIe(ER(e),`utc`)}function zIe([e,t],n){let r=(n===`time`?LIe:xR).get(e);return t>1&&(r=r.every(t),r[SR]=bR.get(e)*t,r[CR]=n),r}function BIe(e,t){if(!(t>1))return;let n=e[SR];if(!yR.some(([,e])=>e===n)||n%hR===0&&hR<n&&n<_R)return;let[r]=yR[Cg(([,e])=>Math.log(e)).center(yR,Math.log(n*t))];return(e[CR]===`time`?DR:OR)(r)}function VIe(e,t,n){let r=t===`time`?lb:ub;if(n==null)return r(e===`year`?`%Y`:e===`month`?`%Y-%m`:e===`day`?`%Y-%m-%d`:e===`hour`||e===`minute`?`%Y-%m-%dT%H:%M`:e===`second`?`%Y-%m-%dT%H:%M:%S`:`%Y-%m-%dT%H:%M:%S.%L`);let i=HIe(n);switch(e){case`millisecond`:return kR(r(`.%L`),r(`:%M:%S`),i);case`second`:return kR(r(`:%S`),r(`%-I:%M`),i);case`minute`:return kR(r(`%-I:%M`),r(`%p`),i);case`hour`:return kR(r(`%-I %p`),r(`%b %-d`),i);case`day`:return kR(r(`%-d`),r(`%b`),i);case`month`:return kR(r(`%b`),r(`%Y`),i);case`year`:return r(`%Y`)}throw Error(`unable to format time ticks`)}function HIe(e){return e===`left`||e===`right`?(e,t)=>`\n${e}\n${t}`:e===`top`?(e,t)=>`${t}\n${e}`:(e,t)=>`${e}\n${t}`}function UIe(e){return e===`time`?TR:e===`utc`?wR:RIe}function WIe(e,t,n){let r=n_(Ide(t,(e,t)=>Math.abs(t-e)));if(r<1e3)return VIe(`millisecond`,`utc`,n);for(let[i,a,o,s]of UIe(e)){if(r>s||i===`hour`&&!r)break;if(t.every(e=>a.floor(e)>=e))return VIe(i,o,n)}}function kR(e,t,n){return(r,i,a)=>{let o=e(r,i),s=t(r,i),c=i-dR(a);return i!==c&&a[c]!==void 0&&s===t(a[c],c)?o:n(o,s)}}var AR=Object.getPrototypeOf(Uint8Array),GIe=Object.prototype.toString;function jR(e){return e instanceof Array||e instanceof AR}function KIe(e){return e instanceof AR&&!JIe(e)}function qIe(e){return e?.prototype instanceof AR&&!YIe(e)}function JIe(e){return e instanceof BigInt64Array||e instanceof BigUint64Array}function YIe(e){return e===BigInt64Array||e===BigUint64Array}var XIe=Symbol(`reindex`);function MR(e,t,n){let r=typeof t;return r===`string`?ELe(e)?PR(e.getChild(t),n):QIe(e,eLe(t),n):r===`function`?QIe(e,t,n):r===`number`||t instanceof Date||r===`boolean`?QR(e,UR(t),n):typeof t?.transform==`function`?NR(t.transform(e),n):ZIe(NR(t,n),e?.[XIe])}function ZIe(e,t){return e!=null&&t?lz(e,t):e}function QIe(e,t,n){return QR(e,qIe(n)?(e,n)=>KR(t(e,n)):t,n)}function NR(e,t){return t===void 0?ZR(e):DLe(e)?PR(e,t):e instanceof t?e:t.from(e,qIe(t)&&!KIe(e)?KR:void 0)}function PR(e,t){return e==null?e:(t===void 0||t===Array)&&OLe(e.type)?rLe($Ie(e)):NR($Ie(e),t)}function $Ie(e){return e.nullCount?e.toJSON():e.toArray()}var FR=[null],eLe=e=>t=>{let n=t[e];return n===void 0&&t.type===`Feature`?t.properties?.[e]:n},IR={transform:cz},LR={transform:e=>e},RR=()=>1,tLe=()=>!0,zR=e=>e==null?e:`${e}`,BR=e=>e==null?e:+e,VR=e=>e?e[0]:void 0,HR=e=>e?e[1]:void 0,nLe=e=>e?e[2]:void 0,UR=e=>()=>e;function WR(e){let t=`${e}`.slice(1)/100;return(e,n)=>s_(e,t,n)}function GR(e){return KIe(e)?e:QR(e,KR,Float64Array)}function KR(e){return e==null?NaN:Number(e)}function rLe(e){return QR(e,iLe)}function iLe(e){return e instanceof Date&&!isNaN(e)?e:typeof e==`string`?IIe(e):e==null||isNaN(e=Number(e))?void 0:new Date(e)}function qR(e,t){return e===void 0&&(e=t),e===null?[void 0,`none`]:Dz(e)?[void 0,e]:[e,void 0]}function JR(e,t){return e===void 0&&(e=t),e===null||typeof e==`number`?[void 0,e]:[e,void 0]}function aLe(e,t,n){if(e!=null)return YR(e,t,n)}function YR(e,t,n){let r=`${e}`.toLowerCase();if(!n.includes(r))throw Error(`invalid ${t}: ${e}`);return r}function XR(e){return ELe(e)?e:ZR(e)}function ZR(e){if(e==null||jR(e))return e;if(DLe(e))return PR(e);if(oLe(e))switch(e.type){case`FeatureCollection`:return e.features;case`GeometryCollection`:return e.geometries;default:return[e]}return Array.from(e)}function oLe(e){switch(e?.type){case`FeatureCollection`:case`GeometryCollection`:case`Feature`:case`LineString`:case`MultiLineString`:case`MultiPoint`:case`MultiPolygon`:case`Point`:case`Polygon`
118:case`Sphere`:return!0;default:return!1}}function QR(e,t,n=Array){return e==null?e:e instanceof n?e.map(t):n.from(e,t)}function $R(e,t=Array){return e instanceof t?e.slice():t.from(e)}function sLe({x:e,x1:t,x2:n}){return e!==void 0||t!==void 0||n!==void 0}function cLe({y:e,y1:t,y2:n}){return e!==void 0||t!==void 0||n!==void 0}function ez(e){return sLe(e)||cLe(e)||e.interval!==void 0}function tz(e){return e?.toString===GIe}function nz(e){return tz(e)&&(e.type!==void 0||e.domain!==void 0)}function rz(e){return tz(e)&&typeof e.transform!=`function`}function iz(e){return rz(e)&&e.value===void 0&&e.channel===void 0}function lLe(e,t,n,r=LR){return t===void 0&&n===void 0?(t=0,n=e===void 0?r:e):t===void 0?t=e===void 0?0:e:n===void 0&&(n=e===void 0?0:e),[t,n]}function az(e,t){return e===void 0&&t===void 0?[VR,HR]:[e,t]}function oz({z:e,fill:t,stroke:n}={}){return e===void 0&&([e]=qR(t)),e===void 0&&([e]=qR(n)),e}function sz(e){return jR(e)?e.length:e?.numRows}function cz(e){let t=sz(e),n=new Uint32Array(t);for(let e=0;e<t;++e)n[e]=e;return n}function lz(e,t){return jR(e)?QR(t,t=>e[t],e.constructor):QR(t,t=>e.at(t))}function uz(e){return e.length===1?(t,n)=>e(lz(n,t)):e}function dz(e,t,n){return e.subarray?e.subarray(t,n):e.slice(t,n)}function fz(e){return typeof e==`object`&&e?e.valueOf():e}function uLe(e,t){if(t[e]!==void 0)return t[e];switch(e){case`x1`:case`x2`:e=`x`;break;case`y1`:case`y2`:e=`y`;break}return t[e]}function pz(e){let t;return[{transform:()=>t,label:hz(e)},e=>t=e]}function mz(e){return e==null?[e]:pz(e)}function hz(e,t){return typeof e==`string`?e:e&&e.label!==void 0?e.label:t}function gz(e,t){return{transform(n){let r=e.transform(n),i=t.transform(n);return wz(r)||wz(i)?QR(r,(e,t)=>new Date((+r[t]+ +i[t])/2)):QR(r,(e,t)=>(+r[t]+ +i[t])/2,Float64Array)},label:e.label}}function _z(e,t){let n=dLe(t?.interval,t?.type);return n?QR(e,n):e}function dLe(e,t){let n=vz(e,t);return n&&(e=>rR(e)?n.floor(e):e)}function vz(e,t){if(e!=null){if(typeof e==`number`)return fLe(e);if(typeof e==`string`)return(t===`time`?DR:OR)(e);if(typeof e.floor!=`function`)throw Error(`invalid interval; missing floor method`);
118if(typeof e.offset!=`function`)throw Error(`invalid interval; missing offset method`);return e}}function fLe(e){e=+e,0<e&&e<1&&Number.isInteger(1/e)&&(e=-1/e);let t=Math.abs(e);return e<0?{floor:e=>Math.floor(e*t)/t,offset:(e,n=1)=>(e*t+Math.floor(n))/t,range:(e,n)=>p_(Math.ceil(e*t),n*t).map(e=>e/t)}:{floor:e=>Math.floor(e/t)*t,offset:(e,n=1)=>e+t*Math.floor(n),range:(e,n)=>p_(Math.ceil(e/t),n/t).map(e=>e*t)}}function yz(e,t){if(e=vz(e,t),e&&typeof e.range!=`function`)throw Error(`invalid interval: missing range method`);return e}function pLe(e,t){if(e=yz(e,t),e&&typeof e.ceil!=`function`)throw Error(`invalid interval: missing ceil method`);return e}function mLe(e){return bz(e)&&typeof e?.floor==`function`&&e.floor()instanceof Date}function bz(e){return typeof e?.range==`function`}function xz(e){return e===void 0||rz(e)?e:{value:e}}function hLe(e){return e==null?null:{transform:t=>MR(t,e,Float64Array),label:hz(e)}}function gLe(e){if(!Sz(e))return!1;for(let t of e)if(t!=null)return typeof t==`object`&&`0`in t&&`1`in t}function Sz(e){return e&&typeof e[Symbol.iterator]==`function`}function _Le(e){for(let t of e)if(t!=null)return typeof t!=`object`||t instanceof Date}function Cz(e){for(let t of e){if(t==null)continue;let e=typeof t;return e===`string`||e===`boolean`}}function wz(e){for(let t of e)if(t!=null)return t instanceof Date}function vLe(e){for(let t of e)if(t!=null)return typeof t==`string`&&isNaN(t)&&IIe(t)}function yLe(e){for(let t of e)if(t!=null){if(typeof t!=`string`)return!1;if(t.trim())return!isNaN(t)}}function Tz(e){for(let t of e)if(t!=null)return typeof t==`number`}function Ez(e,t){let n;for(let r of e)if(r!=null){if(!t(r))return!1;n=!0}return n}var bLe=new Set(`none,currentcolor,transparent,aliceblue,antiquewhite,aqua,aquamarine,azure,beige,bisque,black,blanchedalmond,blue,blueviolet,brown,burlywood,cadetblue,chartreuse,chocolate,coral,cornflowerblue,cornsilk,crimson,cyan,darkblue,darkcyan,darkgoldenrod,darkgray,darkgreen,darkgrey,darkkhaki,darkmagenta,darkolivegreen,darkorange,darkorchid,darkred,darksalmon,darkseagreen,darkslateblue,darkslategray,darkslategrey,darkturquoise,darkviolet,deeppink,deepskyblue,dimgray,dimgrey,dodgerblue,firebrick,floralwhite,forestgreen,fuchsia,gainsboro,ghostwhite,gold,goldenrod,gray,green,greenyellow,grey,honeydew,hotpink,indianred,indigo,ivory,khaki,lavender,lavenderblush,lawngreen,lemonchiffon,lightblue,lightcoral,lightcyan,lightgoldenrodyellow,lightgray,lightgreen,lightgrey,lightpink,lightsalmon,lightseagreen,lightskyblue,lightslategray,lightslategrey,lightsteelblue,lightyellow,lime,limegreen,linen,magenta,maroon,mediumaquamarine,mediumblue,mediumorchid,mediumpurple,mediumseagreen,mediumslateblue,mediumspringgreen,mediumturquoise,mediumvioletred,midnightblue,mintcream,mistyrose,moccasin,navajowhite,navy,oldlace,olive,olivedrab,orange,orangered,orchid,palegoldenrod,palegreen,paleturquoise,palevioletred,papayawhip,peachpuff,peru,pink,plum,powderblue,purple,rebeccapurple,red,rosybrown,royalblue,saddlebrown,salmon,sandybrown,seagreen,seashell,sienna,silver,skyblue,slateblue,slategray,slategrey,snow,springgreen,steelblue,tan,teal,thistle,tomato,turquoise,violet,wheat,white,whitesmoke,yellow`.split(`,`));function Dz(e){return typeof e==`string`?(e=e.toLowerCase().trim(),/^#[0-9a-f]{3,8}$/.test(e)||/^(?:url|var|rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color|color-mix)\(.*\)$/.test(e)||bLe.has(e)):!1}function xLe(e){return typeof e==`number`&&(0<=e&&e<=1||isNaN(e))}function Oz(e){return e==null||kz(e)}function kz(e){return/^\s*none\s*$/i.test(e)}function SLe(e){return/^\s*round\s*$/i.test(e)}function Az(e,t){return aLe(e,t,[`middle`,`top-left`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`])}function jz(e=`middle`){return Az(e,`frameAnchor`)}function CLe(e={},...t){let n=e;for(let r of t)for(let t in r)if(n[t]===void 0){let i=r[t];n===e?n={...n,[t]:i}:n[t]=i}return n}function wLe(e){console.warn(`named iterables are deprecated; please use an object instead`);let t=new Set;return Object.fromEntries(Array.from(e,e=>{let{name:n}=e;if(n==null)throw Error(`missing name`);let r=`${n}`;if(r===`__proto__`)throw Error(`illegal name: ${r}`);if(t.has(r))throw Error(`duplicate name: ${r}`);return t.add(r),[n,e]}))}function Mz(e){return Sz(e)?wLe(e):e}function TLe(e){return e===!0?e=`frame`:e===!1?e=null:!oLe(e)&&e!=null&&(e=YR(e,`clip`,[`frame`,`sphere`]),e===`sphere`&&(e={type:`Sphere`})),e}function ELe(e){return e&&typeof e.getChild==`function`&&typeof e.toArray==`function`&&e.schema&&Array.isArray(e.sc
118hema.fields)}function DLe(e){return e&&typeof e.toArray==`function`&&e.type}function OLe(e){return e&&(e.typeId===8||e.typeId===10)&&e.unit===1}var Nz=Symbol(`position`),Pz=Symbol(`color`),Fz=Symbol(`radius`),Iz=Symbol(`length`),Lz=Symbol(`opacity`),Rz=Symbol(`symbol`),kLe=Symbol(`projection`),zz=new Map([[`x`,Nz],[`y`,Nz],[`fx`,Nz],[`fy`,Nz],[`r`,Fz],[`color`,Pz],[`opacity`,Lz],[`symbol`,Rz],[`length`,Iz],[`projection`,kLe]]);function ALe(e){return e===Nz||e===kLe}function jLe(e){return e===Nz||e===Fz||e===Iz||e===Lz}var Bz=Math.sqrt(3),Vz=2/Bz,Hz=new Map([[`asterisk`,Owe],[`circle`,LE],[`cross`,kwe],[`diamond`,Mwe],[`diamond2`,Nwe],[`hexagon`,{draw(e,t){let n=Math.sqrt(t/Math.PI),r=n*Vz,i=r/2;e.moveTo(0,r),e.lineTo(n,i),e.lineTo(n,-i),e.lineTo(0,-r),e.lineTo(-n,-i),e.lineTo(-n,i),e.closePath()}}],[`plus`,Pwe],[`square`,Fwe],[`square2`,Iwe],[`star`,Vwe],[`times`,qwe],[`triangle`,Hwe],[`triangle2`,Wwe],[`wye`,Kwe]]);function Uz(e){return e&&typeof e.draw==`function`}function MLe(e){return Uz(e)?!0:typeof e==`string`?Hz.has(e.toLowerCase()):!1}function Wz(e){if(e==null||Uz(e))return e;let t=Hz.get(`${e}`.toLowerCase());if(t)return t;throw Error(`invalid symbol: ${e}`)}function NLe(e){if(e==null||Uz(e))return[void 0,e];if(typeof e==`string`){let t=Hz.get(`${e}`.toLowerCase());if(t)return[void 0,t]}return[e,void 0]}function Gz({filter:e,sort:t,reverse:n,transform:r,initializer:i,...a}={},o){if(r===void 0&&(e!=null&&(r=Xz(e)),t!=null&&!iz(t)&&(r=qz(r,$z(t))),n&&(r=qz(r,Zz))),o!=null&&i!=null)throw Error(`transforms cannot be applied after initializers`);return{...a,...(t===null||iz(t))&&{sort:t},transform:qz(r,o)}}function Kz({filter:e,sort:t,reverse:n,initializer:r,...i}={},a){return r===void 0&&(e!=null&&(r=Xz(e)),t!=null&&!iz(t)&&(r=Jz(r,$z(t))),n&&(r=Jz(r,Zz))),{...i,...(t===null||iz(t))&&{sort:t},initializer:Jz(r,a)}}function qz(e,t){return e==null?t===null?void 0:t:t==null?e===null?void 0:e:function(n,r,i){return{data:n,facets:r}=e.call(this,n,r,i),t.call(this,XR(n),r,i)}}function Jz(e,t){return e==null?t===null?void 0:t:t==null?e===null?void 0:e:function(n,r,i,...a){let o,s,c,l,u,d;return{data:s=n,facets:c=r,channels:o}=e.call(this,n,r,i,...a),{data:u=s,facets:d=c,channels:l}=t.call(this,s,c,{...i,...o},...a),{data:u,facets:d,channels:{...o,...l}}}}function Yz(e,t){return(e.initializer==null?Gz:Kz)(e,t)}function PLe(e,t){return Yz(t,Xz(e))}function Xz(e){return(t,n)=>{let r=MR(t,e);return{data:t,facets:n.map(e=>e.filter(e=>r[e]))}}}function FLe({sort:e,...t}={}){return{...Yz(t,Zz),sort:iz(e)?e:null}}function Zz(e,t){return{data:e,facets:t.map(e=>e.slice().reverse())}}function ILe({seed:e,sort:t,...n}={}){return{...Yz(n,eB(e==null?Math.random:vE(e))),sort:iz(t)?t:null}}function Qz(e,{sort:t,...n}={}){return{...(rz(e)&&e.channel!==void 0?Kz:Yz)(n,$z(e)),sort:iz(t)?t:null}}function $z(e){return(typeof e==`function`&&e.length!==1?LLe:eB)(e)}function LLe(e){return(t,n)=>{let r=jR(t)?(n,r)=>e(t[n],t[r]):(n,r)=>e(t.get(n),t.get(r));return{data:t,facets:n.map(e=>e.slice().sort(r))}}}function eB(e){let t,n;({channel:t,value:e,order:n}={...xz(e)});let r=t?.startsWith(`-`);if(r&&(t=t.slice(1)),n===void 0&&(n=r?aR:iR),typeof n!=`function`)switch(`${n}`.toLowerCase()){case`ascending`:n=iR;break;case`descending`:n=aR;break;default:throw Error(`invalid order: ${n}`)}return(r,i,a)=>{let o;if(t===void 0)o=MR(r,e);else{if(a===void 0)throw Error(`channel sort requires an initializer`);if(o=a[t],!o)return{};o=o.value}let s=(e,t)=>n(o[e],o[t]);return{data:r,facets:i.map(e=>e.slice().sort(s))}}}function tB(e,t){return aB(null,null,e,t)}function nB(e={y:`count`},t={}){let{x:n=LR}=t;if(n==null)throw Error(`missing channel: x`);return aB(n,null,e,t)}function rB(e={x:`count`},t={}){let{y:n=LR}=t;if(n==null)throw Error(`missing channel: y`);return aB(null,n,e,t)}function iB(e={fill:`count`},t={}){let{x:n,y:r}=t;if([n,r]=az(n,r),n==null)throw Error(`missing channel: x`);if(r==null)throw Error(`missing channel: y`);return aB(n,r,e,t)}function aB(e,t,{data:n=bB,filter:r,sort:i,reverse:a,...o}={},s={}){o=fB(o,s),n=hB(n,LR),i=i==null?void 0:pB(`sort`,i,s),r=r==null?void 0:mB(`filter`,r,s);let[c,l]=mz(e),[u,d]=mz(t),{z:f,fill:p,stroke:m,x1:h,x2:g,y1:_,y2:v,...y}=s,[b,x]=mz(f),[S]=qR(p),[C]=qR(m),[w,T]=mz(S),[E,D]=mz(C);return{...`z`in s&&{z:b||f},...`fill`in s&&{fill:w||p},...`stroke`in s&&{stroke:E||m},...Gz(y,(s,c,u)=>{let p=_z(MR(s,e),u?.x),m=_z(MR(s,t),u?.y),h=MR(s,f),g=MR(s,S),_=MR(s,C),v=gB(o,{z:h,fill:g,stroke:_}),y=[],b=[],w=p&&l([]),E=m&&d([]),O=h&&x([]),k=g&&T([]),A=_&&D([]),j=0;for(let e of o)e.initialize(s);i&&i.initialize(s),r&&r.initialize(s);for(let e of c){let t=[];for(let t of o)t.scope(`facet`,e);i&&i.scope(`facet`,e),r&&r.scope(`facet`,e);for(let[a,c]of uB(e,v))for(let[e,l]of uB(c,m))for(let[c,u]of uB(l,p)){let l={data:s};if(p&&(l.x=c),m&&(l.y=e),v&&(l.z=a),!(r&&!r.reduce(u,l))){t.push(j++),b.push(n.reduceIndex(u,s,l)),p&&w.push(c),m&&E.push(e),h&&O.push(v===h?a:h[u[0]]),g&&k.push(v===g?a:g[u[0]]),_&&A.push(v===_?a:_[u[0]]);for(let e of o)e.reduce(u,l);i&&i.reduce(u,l)}}y.push(t)}return _B(y,i,a),{data:b,facets:y}}),...!oB(o,`x`)&&(c?{x:c}:{x1:h,x2:g}),...!oB(o,`y`)&&(u?{y:u}:{y1:_,y2:v}),...Object.fromEntries(o.map(({name:e,output:t})=>[e,t]))}}function oB(e,...t){for(let{name:n}of e)if(t.includes(n))return!0;return!1}function sB(e,t,n=cB){let r=Object.entries(e);return t.title!=null&&e.title===void 0&&r.push([`title`,ULe]),t.href!=null&&e.href===void 0&&r.push([`href`,xB]),r.filter(([,e])=>e!==void 0).map(([e,r])=>r===null?RLe(e):n(e,r,t))}function cB(e,t,n,r=lB){let i;tz(t)&&`reduce`in t&&(i=t.scale,t=t.reduce);let a=r(e,t,n),[o,s]=pz(a.label),c;return{name:e,output:i===void 0?o:{value:o,scale:i},initialize(e){a.initialize(e),c=s([])},scope(e,t){a.scope(e,t)},reduce(e,t){c.push(a.reduce(e,t))}}}function RLe(e){return{name:e,initialize(){},scope(){},reduce(){}}}
118function lB(e,t,n,r=dB){let i=uLe(e,n),a=r(t,i),o,s;return{label:hz(a===SB?null:i,a.label),initialize(e){o=i===void 0?e:MR(e,i),a.scope===`data`&&(s=a.reduceIndex(cz(e),o))},scope(e,t){a.scope===e&&(s=a.reduceIndex(t,o))},reduce(e,t){return a.scope==null?a.reduceIndex(e,o,t):a.reduceIndex(e,o,s,t)}}}function uB(e,t){return t?Vg(e,e=>t[e]):[[,e]]}function dB(e,t,n=zLe){if(e==null)return n(e);if(typeof e.reduceIndex==`function`)return e;if(typeof e.reduce==`function`&&tz(e))return VLe(e);if(typeof e==`function`)return HLe(e);if(/^p\d{2}$/i.test(e))return vB(WR(e));switch(`${e}`.toLowerCase()){case`first`:return xB;case`last`:return WLe;case`identity`:return bB;case`count`:return SB;case`distinct`:return GLe;case`sum`:return t==null?SB:KLe;case`proportion`:return CB(t,`data`);case`proportion-facet`:return CB(t,`facet`);case`deviation`:return vB(Pg);case`min`:return vB(r_);case`min-index`:return vB(Mde);case`max`:return vB(n_);case`max-index`:return vB(jde);case`mean`:return yB(l_);case`median`:return yB(u_);case`variance`:return vB(Ng);case`mode`:return vB(f_)}return n(e)}function zLe(e){throw Error(`invalid reduce: ${e}`)}function fB(e,t){return sB(e,t,pB)}function pB(e,t,n){return cB(e,t,n,mB)}function mB(e,t,n){return lB(e,t,n,hB)}function hB(e,t){return dB(e,t,BLe)}function BLe(e){switch(`${e}`.toLowerCase()){case`x`:return qLe;case`y`:return JLe;case`z`:return wB}throw Error(`invalid group reduce: ${e}`)}function gB(e,t){for(let n in t){let r=t[n];if(r!==void 0&&!e.some(e=>e.name===n))return r}}function _B(e,t,n){if(t){let n=t.output.transform(),r=(e,t)=>iR(n[e],n[t]);e.forEach(e=>e.sort(r))}n&&e.forEach(e=>e.reverse())}function VLe(e){return console.warn(`deprecated reduce interface; implement reduceIndex instead.`),{...e,reduceIndex:e.reduce.bind(e)}}function HLe(e){return{reduceIndex(t,n,r){return e(lz(n,t),r)}}}function vB(e){return{reduceIndex(t,n){return e(t,e=>n[e])}}}function yB(e){return{reduceIndex(t,n){let r=e(t,e=>n[e]);return wz(n)?new Date(r):r}}}var bB={reduceIndex(e,t){return lz(t,e)}},xB={reduceIndex(e,t){return t[e[0]]}},ULe={reduceIndex(e,t){let n=Wg(Hg(e,e=>e.length,e=>t[e]),HR),r=n.slice(-5).reverse();if(r.length<n.length){let e=n.slice(0,-4);r[4]=[`⦠${e.length.toLocaleString(`en-US`)} more`,h_(e,HR)]}return r.map(([e,t])=>`${e} (${t.toLocaleString(`en-US`)})`).join(` 119`)}},WLe={reduceIndex(e,t){return t[e[e.length-1]]}},SB={label:`Frequency`,reduceIndex(e){return e.length}},GLe={label:`Distinct`,reduceIndex(e,t){let n=new Rg;for(let r of e)n.add(t[r]);return n.size}},KLe=vB(h_);function CB(e,t){return e==null?{scope:t,label:`Frequency`,reduceIndex:(e,t,n=1)=>e.length/n}:{scope:t,reduceIndex:(e,t,n=1)=>h_(e,e=>t[e])/n}}var qLe={reduceIndex(e,t,{x:n}){return n}},JLe={reduceIndex(e,t,{y:n}){return n}},wB={reduceIndex(e,t,{z:n}){return n}};function YLe(e){if(typeof e!=`function`)throw Error(`invalid test function: ${e}`);return{reduceIndex(t,n,{data:r}){return n[t.find(jR(r)?t=>e(r[t],t,r):t=>e(r.get(t),t,r))]}}}function TB(e,{scale:t,type:n,value:r,filter:i,hint:a,label:o=hz(r)},s){return a===void 0&&typeof r?.transform==`function`&&(a=r.hint),OB(s,{scale:t,type:n,value:MR(e,r),label:o,filter:i,hint:a})}function EB(e,t){return Object.fromEntries(Object.entries(e).map(([e,n])=>[e,TB(t,n,e)]))}function DB(e,t){let n=Object.fromEntries(Object.entries(e).map(([e,{scale:n,value:r}])=>{let i=n==null?null:t[n];return[e,i==null?r:QR(r,i)]}));return n.channels=e,n}function OB(e,t){let{scale:n,value:r}=t;if(n===!0||n===`auto`)switch(e){case`fill`:case`stroke`:case`color`:t.scale=n!==!0&&Ez(r,Dz)?null:`color`,t.defaultScale=`color`;break;case`fillOpacity`:case`strokeOpacity`:case`opacity`:t.scale=n!==!0&&Ez(r,xLe)?null:`opacity`,t.defaultScale=`opacity`;break;case`symbol`:n!==!0&&Ez(r,MLe)?(t.scale=null,t.value=QR(r,Wz)):t.scale=`symbol`,t.defaultScale=`symbol`;break;default:t.scale=zz.has(e)?e:null;break}else if(n===!1)t.scale=null;else if(n!=null&&!zz.has(n))throw Error(`unknown scale: ${n}`);return t}function XLe(e,t,n,r,i){let{order:a,reverse:o,reduce:s=!0,limit:c}=i;for(let l in i){if(!zz.has(l))continue;let{value:u,order:d=a,reverse:f=o,reduce:p=s,limit:m=c}=xz(i[l]),h=u?.startsWith(`-`);
119if(h&&(u=u.slice(1)),d=d===void 0?h===(u===`width`||u===`height`)?jB:MB:$Le(d),p==null||p===!1)continue;let g=l===`fx`||l===`fy`?QLe(t,r[l]):ZLe(n,l);if(!g)throw Error(`missing channel for scale: ${l}`);let _=g.value,[v=0,y=1/0]=Sz(m)?m:m<0?[m]:[0,m];if(u==null)g.domain=()=>{let e=Array.from(new Rg(_));return f&&(e=e.reverse()),(v!==0||y!==1/0)&&(e=e.slice(v,y)),e};else{let t=u===`data`?e:u===`height`?kB(n,`y1`,`y2`):u===`width`?kB(n,`x1`,`x2`):AB(n,u,u===`y`?`y2`:u===`x`?`x2`:void 0),r=dB(p===!0?`max`:p,t);g.domain=()=>{let e=kde(cz(_),e=>r.reduceIndex(e,t),e=>_[e]);return d&&e.sort(d),f&&e.reverse(),(v!==0||y!==1/0)&&(e=e.slice(v,y)),e.map(VR)}}}}function ZLe(e,t){for(let n in e){let r=e[n];if(r.scale===t)return r}}function QLe(e,t){let n=e.original;if(n===e)return t;let r=t.value,i=t.value=[];for(let t=0;t<n.length;++t){let a=r[n[t][0]];for(let n of e[t])i[n]=a}return t}function kB(e,t,n){let r=AB(e,t);return QR(AB(e,n),(e,t)=>Math.abs(e-r[t]),Float64Array)}function AB(e,t,n){let r=e[t];if(!r&&n!==void 0&&(r=e[n]),r)return r.value;throw Error(`missing channel: ${t}`)}function $Le(e){if(e==null||typeof e==`function`)return e;switch(`${e}`.toLowerCase()){case`ascending`:return jB;case`descending`:return MB}throw Error(`invalid order: ${e}`)}function jB([e,t],[n,r]){return iR(t,r)||iR(e,n)}function MB([e,t],[n,r]){return aR(t,r)||iR(e,n)}function NB(e,t){let n=e[t];if(n){for(;n.source;)n=n.source;return n.source===null?null:n}}var PB=new Map([[`accent`,$Se],[`category10`,QSe],[`dark2`,eCe],[`observable10`,tCe],[`paired`,nCe],[`pastel1`,rCe],[`pastel2`,iCe],[`set1`,aCe],[`set2`,oCe],[`set3`,sCe],[`tableau10`,cCe]]);function eRe(e){return e!=null&&PB.has(`${e}`.toLowerCase())}var FB=new Map([...PB,[`brbg`,LB(lCe,uCe)],[`prgn`,LB(dCe,fCe)],[`piyg`,LB(pCe,mCe)],[`puor`,LB(hCe,gCe)],[`rdbu`,LB(xE,SE)],[`rdgy`,LB(_Ce,vCe)],[`rdylbu`,LB(CE,wE)],[`rdylgn`,LB(yCe,bCe)],[`spectral`,LB(xCe,SCe)],[`burd`,RB(xE,SE)],[`buylrd`,RB(CE,wE)],[`blues`,IB(KCe,qCe)],[`greens`,IB(JCe,YCe)],[`greys`,IB(XCe,ZCe)],[`oranges`,IB(nwe,rwe)],[`purples`,IB(QCe,$Ce)],[`reds`,IB(ewe,twe)],[`turbo`,zB(fwe)],[`viridis`,zB(pwe)],[`magma`,zB(mwe)],[`inferno`,zB(hwe)],[`plasma`,zB(gwe)],[`cividis`,zB(iwe)],[`cubehelix`,zB(awe)],[`warm`,zB(owe)],[`cool`,zB(swe)],[`bugn`,IB(CCe,wCe)],[`bupu`,IB(TCe,TE)],[`gnbu`,IB(ECe,DCe)],[`orrd`,IB(OCe,kCe)],[`pubu`,IB(MCe,NCe)],[`pubugn`,IB(ACe,jCe)],[`purd`,IB(PCe,FCe)],[`rdpu`,IB(ICe,LCe)],[`ylgn`,IB(BCe,VCe)],[`ylgnbu`,IB(RCe,zCe)],[`ylorbr`,IB(HCe,UCe)],[`ylorrd`,IB(WCe,GCe)],[`rainbow`,BB(cwe)],[`sinebow`,BB(dwe)]]);function IB(e,t){return({length:n})=>n===1?[e[3][1]]:n===2?[e[3][1],e[3][2]]:(n=Math.max(3,Math.floor(n)),n>9?Zv(t,n):e[n])}function LB(e,t){return({length:n})=>n===2?[e[3][0],e[3][2]]:(n=Math.max(3,Math.floor(n)),n>11?Zv(t,n):e[n])}function RB(e,t){return({length:n})=>n===2?[e[3][2],e[3][0]]:(n=Math.max(3,Math.floor(n)),n>11?Zv(e=>t(1-e),n):e[n].slice().reverse())}function zB(e){return({length:t})=>Zv(e,Math.max(2,Math.floor(t)))}function BB(e){return({length:t})=>Zv(e,Math.floor(t)+1).slice(0,-1)}function VB(e){let t=`${e}`.toLowerCase();if(!FB.has(t))throw Error(`unknown ordinal scheme: ${t}`);return FB.get(t)}function HB(e,t){let n=VB(e),r=typeof n==`function`?n({length:t}):n;return r.length===t?r:r.slice(0,t)}function tRe(e,t=`greys`){let n=new Set,[r,i]=HB(t,2);for(let t of e)if(t!=null)if(t===!0)n.add(i);else if(t===!1)n.add(r);else return;return[...n]}var UB=new Map([[`brbg`,uCe],[`prgn`,fCe],[`piyg`,mCe],[`puor`,gCe],[`rdbu`,SE],[`rdgy`,vCe],[`rdylbu`,wE],[`rdylgn`,bCe],[`spectral`,SCe],[`burd`,e=>SE(1-e)],[`buylrd`,e=>wE(1-e)],[`blues`,qCe],[`greens`,YCe],[`greys`,ZCe],[`purples`,$Ce],[`reds`,twe],[`oranges`,rwe],[`turbo`,fwe],[`viridis`,pwe],[`magma`,mwe],[`inferno`,hwe],[`plasma`,gwe],[`cividis`,iwe],[`cubehelix`,awe],[`warm`,owe],[`cool`,swe],[`bugn`,wCe],[`bupu`,TE],[`gnbu`,DCe],[`orrd`,kCe],[`pubugn`,jCe],[`pubu`,NCe],[`purd`,FCe],[`rdpu`,LCe],[`ylgnbu`,zCe],[`ylgn`,VCe],[`ylorbr`,UCe],[`ylorrd`,GCe],[`rainbow`,cwe],[`sinebow`,dwe]]);function WB(e){let t=`${e}`.toLowerCase();if(!UB.has(t))throw Error(`unknown quantitative scheme: ${t}`);return UB.get(t)}var nRe=new Set([`brbg`,`prgn`,`piyg`,`puor`,`rdbu`,`rdgy`,`rdylbu`,`rdylgn`,`spectral`,`burd`,`buylrd`]);function rRe(e){return e!=null&&nRe.has(`${e}`.toLowerCase())}var GB=e=>t=>
119e(1-t),KB=[0,1],qB=new Map([[`number`,Mv],[`rgb`,jv],[`hsl`,Wv],[`hcl`,qv],[`lab`,Gv]]);function JB(e){let t=`${e}`.toLowerCase();if(!qB.has(t))throw Error(`unknown interpolator: ${t}`);return qB.get(t)}function YB(e,t,n,{type:r,nice:i,clamp:a,zero:o,domain:s=eV(e,n),unknown:c,round:l,scheme:u,interval:d,range:f=zz.get(e)===Fz?mRe(n,s):zz.get(e)===Iz?hRe(n,s):zz.get(e)===Lz?KB:void 0,interpolate:p=zz.get(e)===Pz?u==null&&f!==void 0?jv:WB(u===void 0?r===`cyclical`?`rainbow`:`turbo`:u):l?Lv:Mv,reverse:m}){if(s=XB(s),d=yz(d,r),(r===`cyclical`||r===`sequential`)&&(r=`linear`),typeof p!=`function`&&(p=JB(p)),m=!!m,f!==void 0&&s.length!==(f=XB(f)).length){if(p.length===1)throw Error(`invalid piecewise interpolator`);p=Xv(p,f),f=void 0}if(p.length===1?(m&&=(p=GB(p),!1),f===void 0&&(f=Float64Array.from(s,(e,t)=>t/(s.length-1)),f.length===2&&(f=KB)),t.interpolate((f===KB?UR:tV)(p))):t.interpolate(p),o){let[e,t]=Fg(s);(e>0||t<0)&&(s=$R(s),(dR(s)||1)===Math.sign(e)?s[0]=0:s[s.length-1]=0)}return m&&(s=g_(s)),t.domain(s).unknown(c),i&&(t.nice(iRe(i,r)),s=t.domain()),f!==void 0&&t.range(f),a&&t.clamp(a),{type:r,domain:s,range:f,scale:t,interpolate:p,interval:d}}function XB(e){return e=ZR(e),e.length>=2?e:[e[0],e[0]]}function iRe(e,t){return e===!0?void 0:typeof e==`number`?e:pLe(e,t)}function aRe(e,t,n){return YB(e,yy(),t,n)}function oRe(e,t,n){return ZB(e,t,{...n,exponent:.5})}function ZB(e,t,{exponent:n=1,...r}){return YB(e,Xfe().exponent(n),t,{...r,type:`pow`})}function sRe(e,t,{base:n=10,domain:r=gRe(t),...i}){return YB(e,Vfe().base(n),t,{...i,domain:r})}function cRe(e,t,{constant:n=1,...r}){return YB(e,Gfe().constant(n),t,r)}function lRe(e,t,{range:n,quantiles:r=n===void 0?5:(n=[...n]).length,n:i=r,scheme:a=`rdylbu`,domain:o=_Re(t),unknown:s,interpolate:c,reverse:l}){return n===void 0&&(n=c===void 0?zz.get(e)===Pz?HB(a,i):void 0:Zv(c,i)),o.length>0&&(o=Zfe(o,n===void 0?{length:i}:n).quantiles()),QB(e,t,{domain:o,range:n,reverse:l,unknown:s})}function uRe(e,t,{range:n,n:r=n===void 0?5:(n=[...n]).length,scheme:i=`rdylbu`,domain:a=eV(e,t),unknown:o,interpolate:s,reverse:c}){let[l,u]=Fg(a),d;return n===void 0?(d=Zg(l,u,r),d[0]<=l&&d.splice(0,1),d[d.length-1]>=u&&d.pop(),r=d.length+1,n=s===void 0?zz.get(e)===Pz?HB(i,r):void 0:Zv(s,r)):(d=Zv(Mv(l,u),r+1).slice(1,-1),l instanceof Date&&(d=d.map(e=>new Date(e)))),dR(ZR(a))<0&&d.reverse(),QB(e,t,{domain:d,range:n,reverse:c,unknown:o})}function QB(e,t,{domain:n=[0],unknown:r,scheme:i=`rdylbu`,interpolate:a,range:o=a===void 0?zz.get(e)===Pz?HB(i,n.length+1):void 0:Zv(a,n.length+1),reverse:s}){n=ZR(n);let c=dR(n);if(!isNaN(c)&&!dRe(n,c))throw Error(`the ${e} scale has a non-monotonic domain`);return s&&(o=g_(o)),{type:`threshold`,scale:Qfe(c<0?g_(n):n,o===void 0?[]:o).unknown(r),domain:n,range:o}}function dRe(e,t){for(let n=1,r=e.length,i=e[0];n<r;++n){let r=Sg(i,i=e[n]);if(r!==0&&r!==t)return!1}return!0}function fRe(e){return{type:`identity`,scale:jLe(zz.get(e))?by():e=>e}}function $B(e,t=sR){return e.length?[r_(e,({value:e})=>e===void 0?e:r_(e,t)),n_(e,({value:e})=>e===void 0?e:n_(e,t))]:[0,1]}function eV(e,t){let n=zz.get(e);return(n===Fz||n===Lz||n===Iz?pRe:$B)(t)}function pRe(e){return[0,e.length?n_(e,({value:e})=>e===void 0?e:n_(e,sR)):1]}function mRe(e,t){let n=e.find(({radius:e})=>e!==void 0);if(n!==void 0)return[0,n.radius];let r=s_(e,.5,({value:e})=>e===void 0?NaN:s_(e,.25,cR)),i=t.map(e=>3*Math.sqrt(e/r)),a=30/n_(i);return a<1?i.map(e=>e*a):i}function hRe(e,t){let n=u_(e,({value:e})=>e===void 0?NaN:u_(e,Math.abs)),r=t.map(e=>12*e/n),i=60/n_(r);return i<1?r.map(e=>e*i):r}function gRe(e){for(let{value:t}of e)if(t!==void 0)for(let n of t){if(n>0)return $B(e,cR);if(n<0)return $B(e,lR)}return[1,10]}function _Re(e){let t=[];for(let{value:n}of e)if(n!==void 0)for(let e of n)t.push(e);return t}function tV(e){return(t,n)=>r=>e(t+r*(n-t))}var nV=0,rV;function vRe(){let e=nV;return nV=0,rV=void 0,e}function iV(e){e!==rV&&(rV=e,console.warn(e),++nV)}function aV(e,t,n,r,{type:i,nice:a,clamp:o,domain:s=$B(r),unknown:c,pivot:l=0,scheme:u,range:d,symmetric:f=!0,interpolate:p=zz.get(e)===Pz?u==null&&d!==void 0?jv:WB(u===void 0?`rdbu`:u):Mv,reverse:m}){l=+l,s=ZR(s);let[h,g]=s;if(s.length>2&&iV(`Warning: the diverging ${e} scale domain contains extra elements.`),Sg(h,g)<0&&([h,g]=[g,h],m=!m),h=Math.min(h,l),g=Math.max(g,l),typeof p!=`function`&&(p=JB(p)),d!==void 0&&(p=p.length===1?tV(p)(...d):Xv(p,d)),m&&(p=GB(p)),f){let e=n.apply(l),t=e-n.apply(h),r=n.apply(g)-e;t<r?h=n.invert(e-r):t>r&&(g=n.invert(e+t))}return t.domain([h,l,g]).unknown(c).interpolator(p),o&&t.clamp(o),a&&t.nice(a),{type:i,domain:[h,g],pivot:l,interpolate:p,scale:t}}function yRe(e,t,n){return aV(e,Mme(),CRe,t,n)}function bRe(e,t,n){return oV(e,t,{...n,exponent:.5}
119)}function oV(e,t,{exponent:n=1,...r}){return aV(e,Fme().exponent(n=+n),ERe(n),t,{...r,type:`diverging-pow`})}function xRe(e,t,{base:n=10,pivot:r=1,domain:i=$B(t,r<0?lR:cR),...a}){return aV(e,Nme().base(n=+n),wRe,t,{domain:i,pivot:r,...a})}function SRe(e,t,{constant:n=1,...r}){return aV(e,Pme().constant(n=+n),DRe(n),t,r)}var CRe={apply(e){return e},invert(e){return e}},wRe={apply:Math.log,invert:Math.exp},TRe={apply(e){return Math.sign(e)*Math.sqrt(Math.abs(e))},invert(e){return e*e*Math.sign(e)}};function ERe(e){return e===.5?TRe:{apply(t){return Math.sign(t)*Math.abs(t)**+e},invert(t){return Math.sign(t)*Math.abs(t)**(1/e)}}}function DRe(e){return{apply(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))},invert(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}}function sV(e,t,n,r){return YB(e,t,n,r)}function ORe(e,t,n){return sV(e,Ame(),t,n)}function kRe(e,t,n){return sV(e,jme(),t,n)}var cV=Symbol(`ordinal`);function lV(e,t,n,{type:r,interval:i,domain:a,range:o,reverse:s,hint:c}){return i=yz(i,r),a===void 0&&(a=dV(n,i,e)),(r===`categorical`||r===cV)&&(r=`ordinal`),s&&(a=g_(a)),a=t.domain(a).domain(),o!==void 0&&(typeof o==`function`&&(o=o(a)),t.range(o)),{type:r,domain:a,range:o,scale:t,hint:c,interval:i}}function ARe(e,t,{type:n,interval:r,domain:i,range:a,scheme:o,unknown:s,...c}){r=yz(r,n),i===void 0&&(i=dV(t,r,e));let l;if(zz.get(e)===Rz)l=NRe(t),a=a===void 0?PRe(l):QR(a,Wz);else if(zz.get(e)===Pz&&(a===void 0&&(n===`ordinal`||n===cV)&&(a=tRe(i,o),a!==void 0&&(o=void 0)),o===void 0&&a===void 0&&(o=n===`ordinal`?`turbo`:`observable10`),o!==void 0))if(a!==void 0){let e=WB(o),t=a[0],n=a[1]-a[0];a=({length:r})=>Zv(r=>e(t+n*r),r)}else a=VB(o);if(s===y_)throw Error(`implicit unknown on ${e} scale is not supported`);return lV(e,b_().unknown(s),t,{...c,type:n,domain:i,range:a,hint:l})}function jRe(e,t,{align:n=.5,padding:r=.5,...i}){return uV(zde().align(n).padding(r),t,i,e)}function MRe(e,t,{align:n=.5,padding:r=.1,paddingInner:i=r,paddingOuter:a=e===`fx`||e===`fy`?0:r,...o}){return uV(x_().align(n).paddingInner(i).paddingOuter(a),t,o,e)}function uV(e,t,n,r){let{round:i}=n;return i!==void 0&&e.round(i=!!i),e=lV(r,e,t,n),e.round=i,e}function dV(e,t,n){let r=new Rg;for(let{value:t,domain:n}of e){if(n!==void 0)return n();if(t!==void 0)for(let e of t)r.add(e)}if(t!==void 0){let[e,n]=Fg(r).map(t.floor,t);return t.range(e,t.offset(n))}if(r.size>1e4&&zz.get(n)===Nz)throw Error(`implicit ordinal domain of ${n} scale has more than 10,000 values`);return Wg(r,iR)}function fV(e,t){let n;for(let{hint:r}of e){let e=r?.[t];if(e!==void 0){if(n===void 0)n=e;else if(n!==e)return}}return n}function NRe(e){return{fill:fV(e,`fill`),stroke:fV(e,`stroke`)}}function PRe(e){return Oz(e.fill)?Ywe:Jwe}function pV(e,{label:t,inset:n=0,insetTop:r=n,insetRight:i=n,insetBottom:a=n,insetLeft:o=n,round:s,nice:c,clamp:l,zero:u,align:d,padding:f,projection:p,facet:{label:m=t}={},...h}={}){let g={};for(let[n,_]of e){let e=h[n],v=CV(n,_,{round:zz.get(n)===Nz?s:void 0,nice:c,clamp:l,zero:u,align:d,padding:f,projection:p,...e});if(v){let{label:s=n===`fx`||n===`fy`?m:t,percent:c,transform:l,inset:u,insetTop:d=u===void 0?n===`y`?r:0:u,insetRight:f=u===void 0?n===`x`?i:0:u,insetBottom:p=u===void 0?n===`y`?a:0:u,insetLeft:h=u===void 0?n===`x`?o:0:u}=e||{};if(l==null)l=void 0;else if(typeof l!=`function`)throw Error(`invalid scale transform; not a function`);v.percent=!!c,v.label=s===void 0?IRe(_,v):s,v.transform=l,n===`x`||n===`fx`?(v.insetLeft=+h,v.insetRight=+f):(n===`y`||n===`fy`)&&(v.insetTop=+d,v.insetBottom=+p),g[n]=v}}return g}function mV(e){let t={},n={scales:t};for(let[r,i]of Object.entries(e)){let{scale:e,type:a,interval:o,label:s}=i;t[r]=NV(i),n[r]=e,e.type=a,o!=null&&(e.interval=o),s!=null&&(e.label=s)}return n}function FRe(e,t){let{x:n,y:r,fx:i,fy:a}=e,o=i||a?gV(t):t;i&&vV(i,o),a&&yV(a,o);let s=i||a?_V(e,t):t;n&&vV(n,s),r&&yV(r,s)}function IRe(e=[],t){let n;for(let{label:t}of e)if(t!==void 0){if(n===void 0)n=t;else if(n!==t)return}if(n!==void 0)return!OV(t)&&t.percent&&(n=`${n} (%)`),{inferred:!0,toString:()=>n}}function hV(e){return Math.sign(dR(e.domain()))*Math.sign(dR(e.range()))}function gV(e){let{marginTop:t,marginRight:n,marginBottom:r,marginLeft:i,width:a,height:o,facet:{marginTop:s,marginRight:c,marginBottom:l,marginLeft:u}}=e;return{marginTop:Math.max(t,s),marginRight:Math.max(n,c),marginBottom:Math.max(r,l),marginLeft:Math.max(i,u),width:a,height:o}}function _V({fx:e,fy:t},n){let{marginTop:r,marginRight:i,marginBottom:a,marginLeft:o,width:s,height:c}=gV(n);return{marginTop:r,marginRight:i,marginBottom:a,marginLeft:o,width:e?e.scale.bandwidth()+o+i:s,height:t?t.scale.bandwidth()+r+a:c,facet:{width:s,height:c}}}function vV(e,t){if(e.range===void 0){let{insetLeft:n,insetRight:r}=e,{width:i,marginLeft:a=0,marginRight:o=0}=t,s=a+n,c=i-o-r;e.range=[s,Math.max(s,c)],OV(e)||(e.range=xV(e)),e.scale.range(e.range)}bV(e)}function yV(e,t){if(e.range===void 0){let{insetTop:n,insetBottom:r}=e,{height:i,marginTop:a=0,marginBottom:o=0}=t,s=a+n,c=i-o-r;e.range=[Math.max(s,c),s],OV(e)?e.range.reverse():e.range=xV(e),e.scale.range(e.range)}bV(e)}function bV(e){e.round===void 0&&zRe(e)&&LRe(e)<=30&&e.scale.round(!0)}function LRe({scale:e}){let t=e.domain().length,[n,r]=e.range(),i=e.paddingInner?e.paddingInner():1,a=e.paddingOuter?e.paddingOuter():e.padding(),o=t-i,s=Math.abs(r-n)/Math.max(1,o+a*2);return(s-Math.floor(s))*o}function xV(e){let t=e.scale.domain().length+kV(e);if(!(t>2))return e.range;let[n,r]=e.range;return Array.from({length:t},(e,i)=>n+i/(t-1)*(r-n))}function SV(e,t,n){return CV(e,n===void 0?void 0:[{hint:n}],{...t})}function CV(e,t=[],n={}){let r=RRe(e,t,n);if(n.type===void 0&&n.domain===void 0&&n.range===void 0&&n.interval==null&&e!==`fx`&&e!==`fy`&&OV({type:r})){let n=t.map(({value:e})=>e).filter(e=>e!==void 0);
119n.some(wz)?iV(`Warning: some data associated with the ${e} scale are dates. Dates are typically associated with a "utc" or "time" scale rather than a "${wV(r)}" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can specify the interval of the ${e} scale (e.g., d3.utcDay), or you can suppress this warning by setting the type of the ${e} scale to "${wV(r)}".`):n.some(vLe)?iV(`Warning: some data associated with the ${e} scale are strings that appear to be dates (e.g., YYYY-MM-DD). If these strings represent dates, you should parse them to Date objects. Dates are typically associated with a "utc" or "time" scale rather than a "${wV(r)}" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can suppress this warning by setting the type of the ${e} scale to "${wV(r)}".`):n.some(yLe)&&iV(`Warning: some data associated with the ${e} scale are strings that appear to be numbers. If these strings represent numbers, you should parse or coerce them to numbers. Numbers are typically associated with a "linear" scale rather than a "${wV(r)}" scale. If you want to treat this data as ordinal, you can specify the interval of the ${e} scale (e.g., 1 for integers), or you can suppress this warning by setting the type of the ${e} scale to "${wV(r)}".`)}switch(n.type=r,r){case`diverging`:case`diverging-sqrt`:case`diverging-pow`:case`diverging-log`:case`diverging-symlog`:case`cyclical`:case`sequential`:case`linear`:case`sqrt`:case`threshold`:case`quantile`:case`pow`:case`log`:case`symlog`:n=jV(t,n,GR);break;case`identity`:switch(zz.get(e)){case Nz:n=jV(t,n,GR);break;case Rz:n=jV(t,n,BRe);break}break;case`utc`:case`time`:n=jV(t,n,rLe);break}switch(r){case`diverging`:return yRe(e,t,n);case`diverging-sqrt`:return bRe(e,t,n);case`diverging-pow`:return oV(e,t,n);case`diverging-log`:return xRe(e,t,n);case`diverging-symlog`:return SRe(e,t,n);case`categorical`:case`ordinal`:case cV:return ARe(e,t,n);case`cyclical`:case`sequential`:case`linear`:return aRe(e,t,n);case`sqrt`:return oRe(e,t,n);case`threshold`:return QB(e,t,n);case`quantile`:return lRe(e,t,n);case`quantize`:return uRe(e,t,n);case`pow`:return ZB(e,t,n);case`log`:return sRe(e,t,n);case`symlog`:return cRe(e,t,n);case`utc`:return kRe(e,t,n);case`time`:return ORe(e,t,n);case`point`:return jRe(e,t,n);case`band`:return MRe(e,t,n);case`identity`:return fRe(e);case void 0:return;default:throw Error(`unknown scale type: ${r}`)}}function wV(e){return typeof e==`symbol`?e.description:e}function TV(e){return typeof e==`string`?`${e}`.toLowerCase():e}var EV={toString:()=>`projection`};function RRe(e,t,{type:n,domain:r,range:i,scheme:a,pivot:o,projection:s}){if(n=TV(n),e===`fx`||e===`fy`)return`band`;(e===`x`||e===`y`)&&s!=null&&(n=EV);for(let e of t){let t=TV(e.type);if(t!==void 0){if(n===void 0)n=t;else if(n!==t)throw Error(`scale incompatible with channel: ${n} !== ${t}`)}}if(n===EV)return;if(n!==void 0)return n;if(r===void 0&&!t.some(({value:e})=>e!==void 0))return;let c=zz.get(e);if(c===Fz)return`sqrt`;if(c===Lz||c===Iz)return`linear`;if(c===Rz)return`ordinal`;let l=(r??i)?.length;if(l<2||l>2)return DV(c);if(r!==void 0){if(Cz(r))return DV(c);if(wz(r))return`utc`}else{let e=t.map(({value:e})=>e).filter(e=>e!==void 0);if(e.some(Cz))return DV(c);if(e.some(wz))return`utc`}if(c===Pz){if(o!=null||rRe(a))return`diverging`;if(eRe(a))return`categorical`}return`linear`}function DV(e){switch(e){case Nz:return`point`;case Pz:return cV;default:return`ordinal`}}function OV({type:e}){return e===`ordinal`||e===`point`||e===`band`||e===cV}function kV({type:e}){return e===`threshold`}function zRe({type:e}){return e===`point`||e===`band`}function AV(e){if(e===void 0)return!0;let t=e.domain(),n=e(t[0]);for(let r=1,i=t.length;r<i;++r)if(e(t[r])-n)return!1;return!0}function jV(e,{domain:t,...n},r){for(let n of e)n.value!==void 0&&(t===void 0&&(t=n.value?.domain),n.value=r(n.value));return{domain:t===void 0?t:r(t),...n}}function BRe(e){return QR(e,Wz)}function MV(e={}){let t;for(let n in e)if(zz.has(n)&&nz(e[n])){if(t!==void 0)throw Error(`ambiguous scale definition; multiple scales found`);t=NV(SV(n,e[n]))}if(t===void 0)throw Error(`invalid scale definition; no scale found`);return t}function VRe(e){return t=>{if(!zz.has(t=`${t}`))throw Error(`unknown scale: ${t}`);return e[t]}}function NV({scale:e,type:t,domain:n,range:r,interpolate:i,interval:a,transform:o,percent:s,pivot:c}){if(t===`identity`)return{type:`identity`,apply:e=>e,invert:e=>e};let l=e.unknown?e.unknown():void 0;return{type:t,domain:$R(n),...r!==void 0&&{range:$R(r)}
119,...o!==void 0&&{transform:o},...s&&{percent:s},...l!==void 0&&{unknown:l},...a!==void 0&&{interval:a},...i!==void 0&&{interpolate:i},...e.clamp&&{clamp:e.clamp()},...c!==void 0&&{pivot:c,symmetric:!1},...e.base&&{base:e.base()},...e.exponent&&{exponent:e.exponent()},...e.constant&&{constant:e.constant()},...e.align&&{align:e.align(),round:e.round()},...e.padding&&(e.paddingInner?{paddingInner:e.paddingInner(),paddingOuter:e.paddingOuter()}:{padding:e.padding()}),...e.bandwidth&&{bandwidth:e.bandwidth(),step:e.step()},apply:t=>e(t),...e.invert&&{invert:t=>e.invert(t)}}}function HRe(e,t){let{fx:n,fy:r}=pV(e,t),i=n?.scale.domain(),a=r?.scale.domain();return i&&a?wde(i,a).map(([e,t],n)=>({x:e,y:t,i:n})):i?i.map((e,t)=>({x:e,i:t})):a?a.map((e,t)=>({y:e,i:t})):void 0}function URe(e,{x:t,y:n}){return t&&=IV(t),n&&=IV(n),e.filter(t&&n?e=>t.has(e.x)&&n.has(e.y):t?e=>t.has(e.x):e=>n.has(e.y)).sort(t&&n?(e,r)=>t.get(e.x)-t.get(r.x)||n.get(e.y)-n.get(r.y):t?(e,n)=>t.get(e.x)-t.get(n.x):(e,t)=>n.get(e.y)-n.get(t.y))}function PV(e,{fx:t,fy:n}){let r=cz(e),i=t?.value,a=n?.value;return t&&n?Hg(r,e=>(e.fx=i[e[0]],e.fy=a[e[0]],e),e=>i[e],e=>a[e]):t?Hg(r,e=>(e.fx=i[e[0]],e),e=>i[e]):Hg(r,e=>(e.fy=a[e[0]],e),e=>a[e])}function WRe(e,t,{marginTop:n,marginLeft:r}){let i=e?({x:t})=>e(t)-r:()=>0,a=t?({y:e})=>t(e)-n:()=>0;return function(e){this.tagName===`svg`?(this.setAttribute(`x`,i(e)),this.setAttribute(`y`,a(e))):this.setAttribute(`transform`,`translate(${i(e)},${a(e)})`)}}function GRe(e){let t=[],n=new Uint32Array(h_(e,e=>e.length));for(let r of e){let i=0;for(let t of e)r!==t&&(n.set(t,i),i+=t.length);t.push(n.slice(0,i))}return t}var KRe=new Map([[`top`,zV],[`right`,HV],[`bottom`,BV],[`left`,VV],[`top-left`,UV(zV,VV)],[`top-right`,UV(zV,HV)],[`bottom-left`,UV(BV,VV)],[`bottom-right`,UV(BV,HV)],[`top-empty`,YRe],[`right-empty`,QRe],[`bottom-empty`,XRe],[`left-empty`,ZRe],[`empty`,$Re]]);function qRe(e){if(e==null)return null;let t=KRe.get(`${e}`.toLowerCase());if(t)return t;throw Error(`invalid facet anchor: ${e}`)}var FV=new WeakMap;function IV(e){let t=FV.get(e);return t||FV.set(e,t=new Lg(QR(e,(e,t)=>[e,t]))),t}function LV(e,t){return IV(e).get(t)}function JRe(e,t,n){return t=fz(t),n=fz(n),e.find(e=>Object.is(fz(e.x),t)&&Object.is(fz(e.y),n))}function RV(e,t,n){return JRe(e,t,n)?.empty}function zV(e,{y:t},{y:n}){return t?LV(t,n)===0:!0}function BV(e,{y:t},{y:n}){return t?LV(t,n)===t.length-1:!0}function VV(e,{x:t},{x:n}){return t?LV(t,n)===0:!0}function HV(e,{x:t},{x:n}){return t?LV(t,n)===t.length-1:!0}function YRe(e,{y:t},{x:n,y:r,empty:i}){if(i)return!1;if(!t)return;let a=LV(t,r);if(a>0)return RV(e,n,t[a-1])}function XRe(e,{y:t},{x:n,y:r,empty:i}){if(i)return!1;if(!t)return;let a=LV(t,r);if(a<t.length-1)return RV(e,n,t[a+1])}function ZRe(e,{x:t},{x:n,y:r,empty:i}){if(i)return!1;if(!t)return;let a=LV(t,n);if(a>0)return RV(e,t[a-1],r)}function QRe(e,{x:t},{x:n,y:r,empty:i}){if(i)return!1;if(!t)return;let a=LV(t,n);if(a<t.length-1)return RV(e,t[a+1],r)}function $Re(e,t,{empty:n}){return n}function UV(e,t){return function(){return e.apply(null,arguments)&&t.apply(null,arguments)}}function WV(e,{channels:{fx:t,fy:n},groups:r}){return t&&n?e.map(({x:e,y:t})=>r.get(e)?.get(t)??[]):t?e.map(({x:e})=>r.get(e)??[]):e.map(({y:e})=>r.get(e)??[])}var GV=Math.PI,KV=2*GV,qV=.618;function eze({projection:e,inset:t=0,insetTop:n=t,insetRight:r=t,insetBottom:i=t,insetLeft:a=t}={},o){if(e==null)return;if(typeof e.stream==`function`)return e;let s,c,l=`frame`;if(tz(e)){let t;if({type:e,domain:c,inset:t,insetTop:n=t===void 0?n:t,insetRight:r=t===void 0?r:t,insetBottom:i=t===void 0?i:t,insetLeft:a=t===void 0?a:t,clip:l=l,...s}=e,e==null)return}typeof e!=`function`&&({type:e}=JV(e));let{width:u,height:d,marginLeft:f,marginRight:p,marginTop:m,marginBottom:h}=o,g=u-f-p-a-r,_=d-m-h-n-i;if(e=e?.({width:g,height:_,clip:l,...s}),e==null)return;l=tze(l,f,m,u-p,d-h);let v=f+a,y=m+n,b;if(c!=null){let[[t,n],[r,i]]=ST(e).bounds(c),a=Math.min(g/(r-t),_/(i-n));a>0?(v-=(a*(t+r)-g)/2,y-=(a*(n+i)-_)/2,b=CT({point(e,t){this.stream.point(e*a+v,t*a+y)}})):iV(`Warning: the projection could not be fit to the specified domain; using the default scale.`)}return b??=v===0&&y===0?ZV():CT({point(e,t){this.stream.point(e+v,t+y)}}),{stream:t=>e.stream(b.stream(l(t)))}}function JV(e){switch(`${e}`.toLowerCase()){case`albers-usa`:return YV(Vxe,.7463,.4673);case`albers`:return XV(RT,.7463,.4673);case`azimuthal-equal-area`:return YV(Hxe,4,4);case`azimuthal-equidistant`:return YV(Uxe,KV,KV);case`conic-conformal`:return XV(Kxe,KV,KV);case`conic-equal-area`:return XV(LT,6.1702,2.9781);case`conic-equidistant`:return XV(Yxe,7.312,3.6282);case`equal-earth`:return YV(Zxe,5.4133,2.6347);case`equirectangular`:return YV(qxe,KV,GV);case`gnomonic`:return YV(Qxe,3.4641,3.4641);case`identity`:return{type:ZV};case`reflect-y`:return{type:nze};case`mercator`:return YV(Wxe,KV,KV);case`orthographic`:return YV($xe,2,2);case`stereographic`:return YV(eSe,2,2);case`transverse-mercator`:return YV(tSe,KV,KV);default:throw Error(`unknown projection type: ${e}`)}}function tze(e,t,n,r,i){if(e===!1||e==null||typeof e==`number`)return e=>e;switch(e===!0&&(e=`frame`),`${e}`.toLowerCase()){case`frame`:return Ew(t,n,r,i);default:throw Error(`unknown projection clip type: ${e}`)}}function YV(e,t,n){return{type:({width:r,height:i,rotate:a,precision:o=.15,clip:s})=>{let c=e();return o!=null&&c.precision?.(o),a!=null&&c.rotate?.(a),typeof s==`
119number`&&c.clipAngle?.(s),r!=null&&(c.scale(Math.min(r/t,i/n)),c.translate([r/2,i/2])),c},aspectRatio:n/t}}function XV(e,t,n){let{type:r,aspectRatio:i}=YV(e,t,n);return{type:e=>{let{parallels:t,domain:n,width:i,height:a}=e,o=r(e);return t!=null&&(o.parallels(t),n===void 0&&i!=null&&o.fitSize([i,a],{type:`Sphere`})),o},aspectRatio:i}}var ZV=UR({stream:e=>e}),nze=UR(CT({point(e,t){this.stream.point(e,-t)}}));function QV(e,t,n,r){let i=n[e],a=n[t],o=i.length,s=n[e]=new Float64Array(o).fill(NaN),c=n[t]=new Float64Array(o).fill(NaN),l,u=r.stream({point(e,t){s[l]=e,c[l]=t}});for(l=0;l<o;++l)u.point(i[l],a[l])}function rze({projection:e}={}){return e==null?!1:typeof e.stream==`function`?!0:(tz(e)&&(e=e.type),e!=null)}function ize(e){if(typeof e?.stream==`function`)return qV;if(tz(e)){let t,n;if({domain:t,type:e,...n}=e,t!=null&&e!=null){let[[r,i],[a,o]]=ST((typeof e==`string`?JV(e).type:e)({...n,width:100,height:100})).bounds(t),s=(o-i)/(a-r);return s&&isFinite(s)?s<.2?.2:s>5?5:s:qV}}if(e!=null){if(typeof e!=`function`){let{aspectRatio:t}=JV(e);if(t)return t}return qV}}function $V(e,t,{projection:n}){let{x:r,y:i}=e,a={};return r&&(a.x=r),i&&(a.y=i),a=DB(a,t),n&&r?.scale===`x`&&i?.scale===`y`&&QV(`x`,`y`,a,n),r&&(a.x=GR(a.x)),i&&(a.y=GR(a.y)),a}function aze(e){let t=[],n=[],r={scale:`x`,value:t},i={scale:`y`,value:n},a={point(e,r){t.push(e),n.push(r)},lineStart(){},lineEnd(){},polygonStart(){},polygonEnd(){},sphere(){}};for(let t of e.value)NC(t,a);return[r,i]}function oze({x:e,y:t}){if(e||t)return e??=e=>e,t??=e=>e,CT({point(n,r){this.stream.point(e(n),t(r))}})}function eH(e={}){let{document:t=typeof window<`u`?window.document:void 0,clip:n}=e;return{document:t,clip:TLe(n)}}function tH(e,{document:t}){return Fx(_x(e).call(t.documentElement))}var nH=Symbol(`unset`);function rH(e){return(e.length===1?sze:cze)(e)}function sze(e){let t,n=nH;return r=>(Object.is(n,r)||(n=r,t=e(r)),t)}function cze(e){let t,n;return(...r)=>((n?.length!==r.length||n.some((e,t)=>!Object.is(e,r[t])))&&(n=r,t=e(...r)),t)}var lze=rH(e=>new Intl.NumberFormat(e)),uze=rH((e,t)=>new Intl.DateTimeFormat(e,{timeZone:`UTC`,...t&&{month:t}})),dze=rH((e,t)=>new Intl.DateTimeFormat(e,{timeZone:`UTC`,...t&&{weekday:t}}));function iH(e=`en-US`){let t=lze(e);return e=>e!=null&&!isNaN(e)?t.format(e):void 0}function fze(e=`en-US`,t=`short`){let n=uze(e,t);return e=>e!=null&&!isNaN(e=+new Date(Date.UTC(2e3,+e)))?n.format(e):void 0}function pze(e=`en-US`,t=`short`){let n=dze(e,t);return e=>e!=null&&!isNaN(e=+new Date(Date.UTC(2001,0,+e)))?n.format(e):void 0}function aH(e){return NIe(e,`Invalid Date`)}function mze(e=`en-US`){let t=iH(e);return e=>(e instanceof Date?aH:typeof e==`number`?t:zR)(e)}var oH=mze(),sH=(typeof window<`u`?window.devicePixelRatio>1:typeof it>`u`)?0:.5,hze=0,gze=0;function cH(){return`plot-clip-${++hze}`}function _ze(){return`plot-pattern-${++gze}`}function lH(e,{title:t,href:n,ariaLabel:r,ariaDescription:i,ariaHidden:a,target:o,fill:s,fillOpacity:c,stroke:l,strokeWidth:u,strokeOpacity:d,strokeLinejoin:f,strokeLinecap:p,strokeMiterlimit:m,strokeDasharray:h,strokeDashoffset:g,opacity:_,mixBlendMode:v,imageFilter:y,paintOrder:b,pointerEvents:x,shapeRendering:S,channels:C},{ariaLabel:w,fill:T=`currentColor`,fillOpacity:E,stroke:D=`none`,strokeOpacity:O,strokeWidth:k,strokeLinecap:A,strokeLinejoin:j,strokeMiterlimit:M,paintOrder:N}){T===null&&(s=null,c=null),D===null&&(l=null,d=null),Oz(T)?!Oz(D)&&(!Oz(s)||C?.fill)&&(D=`none`):Oz(D)&&(!Oz(l)||C?.stroke)&&(T=`none`);let[P,F]=qR(s,T),[ee,te]=JR(c,E),[ne,I]=qR(l,D),[re,ie]=JR(d,O),[ae,oe]=JR(_);kz(I)||(u===void 0&&(u=k),p===void 0&&(p=A),f===void 0&&(f=j),m===void 0&&!SLe(f)&&(m=M),!kz(F)&&b===void 0&&(b=N));let[se,ce]=JR(u);return T!==null&&(e.fill=bH(F,`currentColor`),e.fillOpacity=xH(te,1)),D!==null&&(e.stroke=bH(I,`none`),e.strokeWidth=xH(ce,1),e.strokeOpacity=xH(ie,1),e.strokeLinejoin=bH(f,`miter`),e.strokeLinecap=bH(p,`butt`),e.strokeMiterlimit=xH(m,4),e.strokeDasharray=bH(h,`none`),e.strokeDashoffset=bH(g,`0`)),e.target=zR(o),e.ariaLabel=zR(w),e.ariaDescription=zR(i),e.ariaHidden=zR(a),e.opacity=xH(oe,1),e.mixBlendMode=bH(v,`normal`),e.imageFilter=bH(y,`none`),e.paintOrder=bH(b,`normal`),e.pointerEvents=bH(x,`auto`),e.shapeRendering=bH(S,`auto`),{title:{value:t,optional:!0,filter:null},href:{value:n,optional:!0,filter:null},ariaLabel:{value:r,optional:!0,filter:null},fill:{value:P,scale:`auto`,optional:!0},fillOpacity:{value:ee,scale:`auto`,optional:!0},stroke:{value:ne,scale:`auto`,optional:!0},strokeOpacity:{value:re,scale:`auto`,optional:!0},strokeWidth:{value:se,optional:!0},opacity:{value:ae,scale:`auto`,optional:!0}}}function vze(e,t){t&&e.filter(e=>oR(t[e])).append(`title`).call(bze,t)}function yze(e,t){t&&e.filter(([e])=>oR(t[e])).append(`title`).call(xze,t)}function bze(e,t){t&&e.text(e=>oH(t[e]))}function xze(e,t){t&&e.text(([e])=>oH(t[e]))}function uH(e,{target:t,tip:n},{ariaLabel:r,title:i,fill:a,fillOpacity:o,stroke:s,strokeOpacity:c,strokeWidth:l,opacity:u,href:d}){r&&vH(e,`aria-label`,e=>r[e]),a&&vH(e,`fill`,e=>a[e]),o&&vH(e,`fill-opacity`,e=>o[e]),s&&vH(e,`stroke`,e=>s[e]),c&&vH(e,`stroke-opacity`,e=>c[e]),l&&vH(e,`stroke-width`,e=>l[e]),u&&vH(e,`opacity`,e=>u[e]),d&&_H(e,e=>d[e],t),n||vze(e,i)}function dH(e,{target:t,tip:n},{ariaLabel:r,title:i,fill:a,fillOpacity:o,stroke:s,strokeOpacity:c,strokeWidth:l,opacity:u,href:d}){r&&vH(e,`aria-label`,([e])=>r[e]),a&&vH(e,`fill`,([e])=>a[e]),o&&vH(e,`fill-opacity`,([e])=>o[e]),s&&vH(e,`stroke`,([e])=>s[e]),c&&vH(e,`stroke-opacity`,([e])=>c[e]),l&&vH(e,`stroke-width`,([e])=>l[e]),u&&vH(e,`opacity`,([e])=>u[e]),d&&_H(e,([e])=>d[e],t),n||yze(e,i)}function Sze({ariaLabel:e,title:t,fill:n,fillOpacity:r,stroke:i,strokeOpacity:a,strokeWidth:o,opacity:s,href:c},{tip:l}){return[e,l?void 0:t,n,r,i,a,o,s,c].filter(e=>e!==void 0)}function fH(e,t,n){let r=Vg(e,e=>t[e]);return n===void 0&&r.size>1+e.length>>1&&iV(`Warning: the implicit z channel has high cardinality. This may occur when the fill or stroke channel is associated with quantitative data rather than ordinal or categorical data. You can suppress this warning by setting the z option explicitly; if this data represents a single series, set z to null.`),r.values()}function*pH(e,t,n,r){let{z:i}=n,{z:a}=r,o=Sze(r,n),s=[...t,...o];for(let t of a?fH(e,a,i):[e]){let e,n;out:for(let r of t){for(let e of s)if(!rR(e[r])){n&&n.push(-1);continue out}if(e===void 0){n&&(yield n),e=o.map(e=>fz(e[r])),n=[r];continue}n.push(r);for(let t=0;t<o.length;++t)if(fz(o[t][r])!==e[t]){yield n,e=o.map(e=>fz(e[r])),n=[r];continue out}}n&&(yield n)}}function Cze(e,t,n,r){let i,{clip:a=r.clip}=t;a===`frame`?(e=tH(`svg:g`,r).each(function(){this.appendChild(e.node()),e.node=()=>this}
119),i=Tze(r,n)):a&&(i=Dze(a,r)),vH(e,`aria-label`,t.ariaLabel),vH(e,`aria-description`,t.ariaDescription),vH(e,`aria-hidden`,t.ariaHidden),vH(e,`clip-path`,i)}function wze(e){let t=new WeakMap;return(n,r)=>{let i=t.get(n);if(!i){let a=cH();Fx(n.ownerSVGElement).append(`clipPath`).attr(`id`,a).call(e,n,r),t.set(n,i=`url(#${a})`)}return i}}var Tze=wze((e,t,n)=>{let{width:r,height:i,marginLeft:a,marginRight:o,marginTop:s,marginBottom:c}=n;e.append(`rect`).attr(`x`,a).attr(`y`,s).attr(`width`,r-o-a).attr(`height`,i-s-c)}),mH=new WeakMap,Eze={type:`Sphere`};function Dze(e,t){let n,r;if((n=mH.get(t))||mH.set(t,n=new WeakMap),e.type===`Sphere`&&(e=Eze),!(r=n.get(e))){let i=cH();Fx(t.ownerSVGElement).append(`clipPath`).attr(`id`,i).append(`path`).attr(`d`,t.path()(e)),n.set(e,r=`url(#${i})`)}return r}function hH(e,t,n,r){Cze(e,t,n,r),vH(e,`class`,t.className),vH(e,`fill`,t.fill),vH(e,`fill-opacity`,t.fillOpacity),vH(e,`stroke`,t.stroke),vH(e,`stroke-width`,t.strokeWidth),vH(e,`stroke-opacity`,t.strokeOpacity),vH(e,`stroke-linejoin`,t.strokeLinejoin),vH(e,`stroke-linecap`,t.strokeLinecap),vH(e,`stroke-miterlimit`,t.strokeMiterlimit),vH(e,`stroke-dasharray`,t.strokeDasharray),vH(e,`stroke-dashoffset`,t.strokeDashoffset),vH(e,`shape-rendering`,t.shapeRendering),vH(e,`filter`,t.imageFilter),vH(e,`paint-order`,t.paintOrder);let{pointerEvents:i=r.pointerSticky===!1?`none`:void 0}=t;vH(e,`pointer-events`,i)}function gH(e,t){Oze(e,`mix-blend-mode`,t.mixBlendMode),vH(e,`opacity`,t.opacity)}function _H(e,t,n){e.each(function(e){let r=t(e);if(r!=null){let e=this.ownerDocument.createElementNS(hx.svg,`a`);e.setAttribute(`fill`,`inherit`),e.setAttributeNS(hx.xlink,`href`,r),n!=null&&e.setAttribute(`target`,n),this.parentNode.insertBefore(e,this).appendChild(this)}})}function vH(e,t,n){n!=null&&e.attr(t,n)}function Oze(e,t,n){n!=null&&e.style(t,n)}function yH(e,t,{x:n,y:r},i=sH,a=sH){i+=t.dx,a+=t.dy,n?.bandwidth&&(i+=n.bandwidth()/2),r?.bandwidth&&(a+=r.bandwidth()/2),(i||a)&&e.attr(`transform`,`translate(${i},${a})`)}function bH(e,t){if((e=zR(e))!==t)return e}function xH(e,t){if((e=BR(e))!==t)return e}var kze=/^-?([_a-z]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])([_a-z0-9-]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])*$/i;function SH(e){if(e===void 0)return`plot-d6a7b5`;if(e=`${e}`,!kze.test(e))throw Error(`invalid class name: ${e}`);return e}function CH(e,t){if(typeof t==`string`)e.property(`style`,t);else if(t!=null)for(let n of e)Object.assign(n.style,t)}function wH({frameAnchor:e},{width:t,height:n,marginTop:r,marginRight:i,marginBottom:a,marginLeft:o}){return[/left$/.test(e)?o:/right$/.test(e)?t-i:(o+t-i)/2,/^top/.test(e)?r:/^bottom/.test(e)?n-a:(r+n-a)/2]}var TH=class{constructor(e,t={},n={},r){let{facet:i=`auto`,facetAnchor:a,fx:o,fy:s,sort:c,dx:l=0,dy:u=0,margin:d=0,marginTop:f=d,marginRight:p=d,marginBottom:m=d,marginLeft:h=d,className:g,clip:_=r?.clip,channels:v,tip:y,render:b}=n;if(this.data=e,this.sort=iz(c)?c:null,this.initializer=Kz(n).initializer,this.transform=this.initializer?n.transform:Gz(n).transform,i===null||i===!1?this.facet=null:(this.facet=YR(i===!0?`include`:i,`facet`,[`auto`,`include`,`exclude`,`super`]),this.fx=e===FR&&typeof o==`string`?[o]:o,this.fy=e===FR&&typeof s==`string`?[s]:s),this.facetAnchor=qRe(a),t=Mz(t),v!==void 0&&(t={...Aze(v),...t}),r!==void 0&&(t={...lH(this,n,r),...t}),this.channels=Object.fromEntries(Object.entries(t).map(([t,n])=>{if(rz(n.value)){let{value:e,label:t=n.label,scale:r=n.scale}=n.value;n={...n,label:t,scale:r,value:e}}if(e===FR&&typeof n.value==`string`){let{value:e}=n;n={...n,value:[e]}}return[t,n]}).filter(([e,{value:t,optional:n}])=>{if(t!=null)return!0;if(n)return!1;throw Error(`missing channel value: ${e}`)})),this.dx=+l,this.dy=+u,this.marginTop=+f,this.marginRight=+p,this.marginBottom=+m,this.marginLeft=+h,this.clip=TLe(_),this.tip=jze(y),this.className=zR(g),this.facet===`super`){if(o||s)throw Error(`super-faceting cannot use fx or fy`);for(let e in this.channels){let{scale:n}=t[e];if(!(n!==`x`&&n!==`y`))throw Error(`super-faceting cannot use x or y`)}}b!=null&&(this.render=DH(b,this.render))}initialize(e,t,n){let r=XR(this.data);e===void 0&&r!=null&&(e=[cz(r)]);let i=e;this.transform!=null&&({facets:e,data:r}=this.transform(r,e,n),r=XR(r)),e!==void 0&&(e.original=i);let a=EB(this.channels,r);return this.sort!=null&&XLe(r,e,a,t,this.sort),{data:r,facets:e,channels:a}}filter(e,t,n){for(let r in t){let{filter:i=rR}=t[r];if(i!==null){let t=n[r];e=e.filter(e=>i(t[e]))}}return e}project(e,t,n){for(let r in e)if(e[r].scale===`x`&&/^x|x$/.test(r)){let i=r.replace(/^x|x$/,`y`);i in e&&e[i].scale===`y`&&QV(r,i,t,n.projection)}}scale(e,t,n){let r=DB(e,t);return n.projection&&this.project(e,r,n),r}};function EH(...e){return e.plot=TH.prototype.plot,e}function DH(e,t){if(e==null)return t===null?void 0:t;if(t==null)return e===null?void 0:e;if(typeof e!=`function`)throw TypeError(`invalid render transform: ${e}`);if(typeof t!=`function`)throw TypeError(`invalid render transform: ${t}`);return function(n,r,i,a,o,s){return e.call(this,n,r,i,a,o,(e,n,r,i,a)=>t.call(this,e,n,r,i,a,s))}}function Aze(e){return Object.fromEntries(Object.entries(Mz(e)).map(([e,t])=>(t=typeof t==`string`?{value:t,label:e}:xz(t),t.filter===void 0&&t.scale==null&&(t={...t,filter:null}),[e,t])))}function jze(e){return e===!0?`xy`:e===!1||e==null?null:typeof e==`string`?YR(e,`tip`,[`x`,`y`,`xy`]):e}function OH(e,t){return e?.tip===!0?{...e,tip:t}:tz(e?.tip)&&e.tip.pointer===void 0?{...e,tip:{...e.tip,pointer:t}}:e}function Mze(e,t,n={}){let r=.5-sH,i=.5+sH,a=.5+sH,o=.5-sH;for(let{marginTop:e,marginRight:n,marginBottom:s,marginLeft:c}of t)e>r&&(r=e),n>i&&(i=n),s>a&&(a=s),c>o&&(o=c);let{margin:s,marginTop:c=s===void 0?r:s,marginRight:l=s===void 0?i:s,marginBottom:u=s===void 0?a:s,marginLeft:d=s===void 0?o:s}=n;c=+c,l=+l,u=+u,d=+d;let{width:f=640,height:p=Nze(e,n,{width:f,marginTopDefault:r,marginRightDefault:i,marginBottomDefault:a,marginLeftDefault:o})+Math.max(0,c-r+u-a)}=n;
119f=+f,p=+p;let m={width:f,height:p,marginTop:c,marginRight:l,marginBottom:u,marginLeft:d};if(e.fx||e.fy){let{margin:e,marginTop:t=e===void 0?c:e,marginRight:r=e===void 0?l:e,marginBottom:i=e===void 0?u:e,marginLeft:a=e===void 0?d:e}=n.facet??{};t=+t,r=+r,i=+i,a=+a,m.facet={marginTop:t,marginRight:r,marginBottom:i,marginLeft:a}}return m}function Nze({x:e,y:t,fy:n,fx:r},{projection:i,aspectRatio:a},{width:o,marginTopDefault:s,marginRightDefault:c,marginBottomDefault:l,marginLeftDefault:u}){let d=n&&n.scale.domain().length||1,f=ize(i);if(f){let e=r?r.scale.domain().length:1,t=(1.1*d-.1)/(1.1*e-.1)*f,n=Math.max(.1,Math.min(10,t));return Math.round((o-u-c)*n+s+l)}let p=t?OV(t)?t.scale.domain().length||1:Math.max(7,17/d):1;if(a!=null){if(a=+a,!(isFinite(a)&&a>0))throw Error(`invalid aspectRatio: ${a}`);let i=kH(`y`,t)/(kH(`x`,e)*a),d=r?r.scale.bandwidth():1,f=n?n.scale.bandwidth():1;return(i*(d*(o-u-c)-e.insetLeft-e.insetRight)+t.insetTop+t.insetBottom)/f+s+l}return!!(t||n)*Math.max(1,Math.min(60,p*d))*20+!!r*30+60}function kH(e,t){if(!t)throw Error(`aspectRatio requires ${e} scale`);let{type:n,domain:r}=t,i;switch(n){case`linear`:case`utc`:case`time`:i=Number;break;case`pow`:{let e=t.scale.exponent();i=t=>t**+e;break}case`log`:i=Math.log;break;case`point`:case`band`:return r.length;default:throw Error(`unsupported ${e} scale for aspectRatio: ${n}`)}let[a,o]=Fg(r);return Math.abs(i(o)-i(a))}var AH=new WeakMap;function jH(e,t,{x:n,y:r,px:i,py:a,maxRadius:o=40,channels:s,render:c,...l}={}){return o=+o,i!=null&&(n??=null,s={...s,px:{value:i,scale:`x`}}),a!=null&&(r??=null,s={...s,py:{value:a,scale:`y`}}),{x:n,y:r,channels:s,...l,render:DH(function(n,r,i,a,s,c){s={...s,pointerSticky:!1};let l=s.ownerSVGElement,{data:u}=s.getMarkState(this),d=AH.get(l);d||AH.set(l,d={sticky:!1,roots:[],renders:[]});let f=d.renders.push(M)-1,{x:p,y:m,fx:h,fy:g}=r,_=h?h(n.fx)-a.marginLeft:0,v=g?g(n.fy)-a.marginTop:0;p?.bandwidth&&(_+=p.bandwidth()/2),m?.bandwidth&&(v+=m.bandwidth()/2);let y=n.fi!=null,b;if(y){let e=d.facetStates;e||(d.facetStates=e=new Map),b=e.get(this),b||e.set(this,b=new Map)}let[x,S]=wH(this,a),{px:C,py:w}=i,T=C?e=>C[e]:FH(i,x),E=w?e=>w[e]:IH(i,S),D,O,k,A;function j(e,t){if(y)if(A&&=cancelAnimationFrame(A),e==null)b.delete(n.fi);else{b.set(n.fi,t),A=requestAnimationFrame(()=>{A=null;for(let[r,i]of b)if(i<t||i===t&&r<n.fi){e=null;break}M(e)});return}M(e)}function M(e){if(D===e&&k===d.sticky)return;D=e,k=s.pointerSticky=d.sticky;let t=D==null?[]:[D];y&&(t.fx=n.fx,t.fy=n.fy,t.fi=n.fi);let o=c(t,r,i,a,s);if(O){if(y){let e=O.parentNode,t=O.getAttribute(`transform`),n=o.getAttribute(`transform`);t?o.setAttribute(`transform`,t):o.removeAttribute(`transform`),n?e.setAttribute(`transform`,n):e.removeAttribute(`transform`),o.removeAttribute(`aria-label`),o.removeAttribute(`aria-description`),o.removeAttribute(`aria-hidden`)}O.replaceWith(o)}if(d.roots[f]=O=o,!(D==null&&b?.size>1)){let e=D==null?null:jR(u)?u[D]:u.get(D);s.dispatchValue(e)}return o}function N(r){if(d.sticky||r.pointerType===`mouse`&&r.buttons===1)return;let[i,s]=Ix(r);i-=_,s-=v;let c=i<a.marginLeft||i>a.width-a.marginRight?1:e,l=s<a.marginTop||s>a.height-a.marginBottom?1:t,u=null,f=o*o;for(let e of n){let t=c*(T(e)-i),n=l*(E(e)-s),r=t*t+n*n;r<=f&&(u=e,f=r)}if(u!=null&&(e!==1||t!==1)){let e=T(u)-i,t=E(u)-s;f=e*e+t*t}j(u,f)}function P(e){e.pointerType===`mouse`&&D!=null&&(d.sticky&&d.roots.some(t=>t?.contains(e.target))||(d.sticky?(d.sticky=!1,d.renders.forEach(e=>e(null))):(d.sticky=!0,M(D)),e.stopImmediatePropagation()))}function F(e){e.pointerType===`mouse`&&(d.sticky||j(null))}return l.addEventListener(`pointerenter`,N),l.addEventListener(`pointermove`,N),l.addEventListener(`pointerdown`,P),l.addEventListener(`pointerleave`,F),M(null)},c)}}function MH(e){return jH(1,1,e)}function NH(e){return jH(1,.01,e)}function PH(e){return jH(.01,1,e)}function FH({x1:e,x2:t,x:n=e},r){return e&&t?n=>(e[n]+t[n])/2:n?e=>n[e]:()=>r}function IH({y1:e,y2:t,y:n=e},r){return e&&t?n=>(e[n]+t[n])/2:n?e=>n[e]:()=>r}function LH(e){return OV(e)&&e.interval===void 0?void 0:`tabular-nums`}function Pze(e,t){let{label:n=e.label,tickSize:r=6,width:i=240,height:a=44+r,marginTop:o=18,marginRight:s=0,marginBottom:c=16+r,marginLeft:l=0,style:u,ticks:d=(i-l-s)/64,tickFormat:f,fontVariant:p=LH(e),round:m=!0,opacity:h,className:g}=t,_=eH(t);g=SH(g),h=JR(h)[1],f===null&&(f=()=>null);let v=tH(`svg`,_).attr(`class`,`${g}-ramp`).attr(`font-family`,`system-ui, sans-serif`).attr(`font-size`,10).attr(`width`,i).attr(`height`,a).attr(`viewBox`,`0 0 ${i} ${a}`).call(e=>e.append(`style`).text(`:where(.${g}-ramp) { 120 display: block; 121 height: auto; 122 height: intrinsic; 123 max-width: 100%; 124 overflow: visible; 125} 126:where(.${g}-ramp text) { 127 white-space: pre; 128}`)).call(CH,u),y=e=>e.selectAll(`.tick line`).attr(`y1`,o+c-a),b,x=m?(e,t)=>e.rangeRound(t):(e,t)=>e.range(t),{type:S,domain:C,range:w,interpolate:T,scale:E,pivot:D}=e;if(T){let e=w===void 0?T:Xv(T.length===1?tV(T):T,w);b=x(E.copy(),Zv(Mv(l,i-s),Math.min(C.length+(D!==void 0),w===void 0?1/0:w.length)));let t=_.document.createElement(`canvas`);t.width=256,t.height=1;let n=t.getContext(`2d`);for(let t=0;t<256;++t)n.fillStyle=e(t/255),n.fillRect(t,0,1,1);v.append(`image`).attr(`opacity`,h).attr(`x`,l).attr(`y`,o).attr(`width`,i-l-s).attr(`height`,a-o-c).attr(`preserveAspectRatio`,`none`).attr(`xlink:href`,t.toDataURL())}else if(S===`threshold`){let e=C,t=f===void 0?e=>
128e:typeof f==`string`?gy(f):f;b=x(yy().domain([-1,w.length-1]),[l,i-s]),v.append(`g`).attr(`fill-opacity`,h).selectAll().data(w).enter().append(`rect`).attr(`x`,(e,t)=>b(t-1)).attr(`y`,o).attr(`width`,(e,t)=>b(t)-b(t-1)).attr(`height`,a-o-c).attr(`fill`,e=>e),d=QR(e,(e,t)=>t),f=n=>t(e[n],n)}else b=x(x_().domain(C),[l,i-s]),v.append(`g`).attr(`fill-opacity`,h).selectAll().data(C).enter().append(`rect`).attr(`x`,b).attr(`y`,o).attr(`width`,Math.max(0,b.bandwidth()-1)).attr(`height`,a-o-c).attr(`fill`,E),y=()=>{};return v.append(`g`).attr(`transform`,`translate(0,${a-c})`).call(h_e(b).ticks(Array.isArray(d)?null:d,typeof f==`string`?f:void 0).tickFormat(typeof f==`function`?f:void 0).tickSize(r).tickValues(Array.isArray(d)?d:null)).attr(`font-size`,null).attr(`font-family`,null).attr(`font-variant`,bH(p,`normal`)).call(y).call(e=>e.select(`.domain`).remove()),n!==void 0&&v.append(`text`).attr(`x`,l).attr(`y`,o-6).attr(`fill`,`currentColor`).attr(`font-weight`,`bold`).text(n),v.node()}var RH=Math.PI/180;function zH(e,{marker:t,markerStart:n=t,markerMid:r=t,markerEnd:i=t}={}){e.markerStart=BH(n),e.markerMid=BH(r),e.markerEnd=BH(i)}function BH(e){if(e==null||e===!1)return null;if(e===!0)return HH;if(typeof e==`function`)return e;switch(`${e}`.toLowerCase()){case`none`:return null;case`arrow`:return VH(`auto`);case`arrow-reverse`:return VH(`auto-start-reverse`);case`dot`:return Fze;case`circle`:case`circle-fill`:return HH;case`circle-stroke`:return Ize;case`tick`:return UH(`auto`);case`tick-x`:return UH(90);case`tick-y`:return UH(0)}throw Error(`invalid marker: ${e}`)}function VH(e){return(t,n)=>tH(`svg:marker`,n).attr(`viewBox`,`-5 -5 10 10`).attr(`markerWidth`,6.67).attr(`markerHeight`,6.67).attr(`orient`,e).attr(`fill`,`none`).attr(`stroke`,t).attr(`stroke-width`,1.5).attr(`stroke-linecap`,`round`).attr(`stroke-linejoin`,`round`).call(e=>e.append(`path`).attr(`d`,`M-1.5,-3l3,3l-3,3`)).node()}function Fze(e,t){return tH(`svg:marker`,t).attr(`viewBox`,`-5 -5 10 10`).attr(`markerWidth`,6.67).attr(`markerHeight`,6.67).attr(`fill`,e).attr(`stroke`,`none`).call(e=>e.append(`circle`).attr(`r`,2.5)).node()}function HH(e,t){return tH(`svg:marker`,t).attr(`viewBox`,`-5 -5 10 10`).attr(`markerWidth`,6.67).attr(`markerHeight`,6.67).attr(`fill`,e).attr(`stroke`,`var(--plot-background)`).attr(`stroke-width`,1.5).call(e=>e.append(`circle`).attr(`r`,3)).node()}function Ize(e,t){return tH(`svg:marker`,t).attr(`viewBox`,`-5 -5 10 10`).attr(`markerWidth`,6.67).attr(`markerHeight`,6.67).attr(`fill`,`var(--plot-background)`).attr(`stroke`,e).attr(`stroke-width`,1.5).call(e=>e.append(`circle`).attr(`r`,3)).node()}function UH(e){return(t,n)=>tH(`svg:marker`,n).attr(`viewBox`,`-3 -3 6 6`).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,e).attr(`stroke`,t).call(e=>e.append(`path`).attr(`d`,`M0,-3v6`)).node()}var Lze=0;function WH(e,t,{stroke:n},r){return qH(e,t,n&&(e=>n[e]),null,r)}function Rze(e,t,{stroke:n,z:r},i){return qH(e,t,n&&(([e])=>n[e]),r,i)}var GH=1,KH=2;function zze(e,t){let n=new Uint8Array(t.length),r=e.data().filter(e=>e.length>1),i=r.length;for(let e=0,a=nH;e<i;++e){let i=r[e];if(i.length>1){let e=i[0];a!==(a=fz(t[e]))&&(n[e]|=GH)}}for(let e=i-1,a=nH;e>=0;--e){let i=r[e];if(i.length>1){let e=i[0];a!==(a=fz(t[e]))&&(n[e]|=KH)}}return([e])=>n[e]}function qH(e,{markerStart:t,markerMid:n,markerEnd:r,stroke:i},a=()=>
128i,o,s){if(!t&&!n&&!r)return;let c=new Map,l=o&&zze(e,o);function u(e,t,n){return function(r){if(n&&!n(r))return;let i=a(r),o=c.get(t);o||c.set(t,o=new Map);let l=o.get(i);if(!l){let e=this.parentNode.insertBefore(t(i,s),this),n=`plot-marker-${++Lze}`;e.setAttribute(`id`,n),o.set(i,l=`url(#${n})`)}this.setAttribute(e,l)}}t&&e.each(u(`marker-start`,t,l&&(e=>l(e)&GH))),n&&l&&e.each(u(`marker-start`,n,e=>!(l(e)&GH))),n&&e.each(u(`marker-mid`,n)),r&&e.each(u(`marker-end`,r,l&&(e=>l(e)&KH)))}function JH({inset:e,insetLeft:t,insetRight:n,...r}={}){return[t,n]=XH(e,t,n),{inset:e,insetLeft:t,insetRight:n,...r}}function YH({inset:e,insetTop:t,insetBottom:n,...r}={}){return[t,n]=XH(e,t,n),{inset:e,insetTop:t,insetBottom:n,...r}}function XH(e,t,n){return e===void 0&&t===void 0&&n===void 0?sH?[1,0]:[.5,.5]:[t,n]}function ZH(e,{interval:t}){return e={...xz(e)},e.interval=vz(e.interval===void 0?t:e.interval),e}function QH(e,t,n,r){let{[e]:i,[`${e}1`]:a,[`${e}2`]:o}=n,{value:s,interval:c}=ZH(i,n);if(s==null||c==null&&!r)return n;let l=hz(i);if(c==null){let t,i={transform:e=>t||=MR(e,s),label:l};return{...n,[e]:void 0,[`${e}1`]:a===void 0?i:a,[`${e}2`]:o===void 0&&!(a===o&&r)?i:o}}let u,d;function f(e){return d!==void 0&&e===u?d:d=QR(MR(u=e,s),e=>c.floor(e))}return t({...n,[e]:void 0,[`${e}1`]:a===void 0?{transform:f,label:l}:a,[`${e}2`]:o===void 0?{transform:e=>f(e).map(e=>c.offset(e)),label:l}:o})}function $H(e,t,n){let{[e]:r}=n,{value:i,interval:a}=ZH(r,n);return i==null||a==null?n:t({...n,[e]:{label:hz(r),transform:e=>{let t=QR(MR(e,i),e=>a.floor(e)),n=t.map(e=>a.offset(e));return t.map(wz(t)?(e,t)=>e==null||isNaN(e=+e)||(t=n[t],t==null)||isNaN(t=+t)?void 0:new Date((e+t)/2):(e,t)=>e==null||(t=n[t],t==null)?NaN:(+e+ +t)/2)}}})}function eU(e={}){return QH(`x`,JH,e,!0)}function tU(e={}){return QH(`y`,YH,e,!0)}function nU(e={}){return QH(`x`,JH,e)}function rU(e={}){return QH(`y`,YH,e)}function iU(e={}){return $H(`x`,JH,e)}function aU(e={}){return $H(`y`,YH,e)}var oU={ariaLabel:`rule`,fill:null,stroke:`currentColor`},sU=class extends TH{constructor(e,t={}){let{x:n,y1:r,y2:i,inset:a=0,insetTop:o=a,insetBottom:s=a}=t;super(e,{x:{value:n,scale:`x`,optional:!0},y1:{value:r,scale:`y`,optional:!0},y2:{value:i,scale:`y`,optional:!0}},OH(t,`x`),oU),this.insetTop=BR(o),this.insetBottom=BR(s),zH(this,t)}render(e,t,n,r,i){let{x:a,y:o}=t,{x:s,y1:c,y2:l}=n,{width:u,height:d,marginTop:f,marginRight:p,marginLeft:m,marginBottom:h}=r,{insetTop:g,insetBottom:_}=this;return tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,{x:s&&a},sH,0).call(t=>t.selectAll().data(e).enter().append(`line`).call(gH,this).attr(`x1`,s?e=>s[e]:(m+u-p)/2).attr(`x2`,s?e=>s[e]:(m+u-p)/2).attr(`y1`,c&&!AV(o)?e=>c[e]+g:f+g).attr(`y2`,l&&!AV(o)?o.bandwidth?e=>l[e]+o.bandwidth()-_:e=>l[e]-_:d-h-_).call(uH,this,n).call(WH,this,n,i)).node()}},cU=class extends TH{constructor(e,t={}){let{x1:n,x2:r,y:i,inset:a=0,insetRight:o=a,insetLeft:s=a}=t;super(e,{y:{value:i,scale:`y`,optional:!0},x1:{value:n,scale:`x`,optional:!0},x2:{value:r,scale:`x`,optional:!0}},OH(t,`y`),oU),this.insetRight=BR(o),this.insetLeft=BR(s),zH(this,t)}render(e,t,n,r,i){let{x:a,y:o}=t,{y:s,x1:c,x2:l}=n,{width:u,height:d,marginTop:f,marginRight:p,marginLeft:m,marginBottom:h}=r,{insetLeft:g,insetRight:_}=this;return tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,{y:s&&o},0,sH).call(t=>t.selectAll().data(e).enter().append(`line`).call(gH,this).attr(`x1`,c&&!AV(a)?e=>c[e]+g:m+g).attr(`x2`,l&&!AV(a)?a.bandwidth?e=>l[e]+a.bandwidth()-_:e=>l[e]-_:u-p-_).attr(`y1`,s?e=>s[e]:(f+d-h)/2).attr(`y2`,s?e=>s[e]:(f+d-h)/2).call(uH,this,n).call(WH,this,n,i)).node()}};function lU(e,t){let{x:n=LR,y:r,y1:i,y2:a,...o}=rU(t);return[i,a]=dU(r,i,a),new sU(e,{...o,x:n,y1:i,y2:a})}function uU(e,t){let{y:n=LR,x:r,x1:i,x2:a,...o}=nU(t);return[i,a]=dU(r,i,a),new cU(e,{...o,y:n,x1:i,x2:a})}function dU(e,t,n){if(e==null){if(t===void 0){if(n!==void 0)return[0,n]}else if(n===void 0)return[0,t]}else if(t===void 0)return n===void 0?[0,e]:[e,n];else if(n===void 0)return[e,t];return[t,n]}function fU(e,...t){let n=t.length;for(let r=0,i=!0;r<n;++r)typeof t[r]!=`function`&&(i&&=(e=e.slice(),!1),e.splice(r,2,e[r]+t[r]+e[r+1]),t.splice(r,1),--r,--n);return r=>{let i=e[0];for(let a=0;a<n;++a)i+=t[a](r)+e[a+1];return i}}var Bze={ariaLabel:`text`,strokeLinejoin:`round`,strokeWidth:3,paintOrder:`stroke`},pU=`Â`,mU=class extends TH{constructor(e,t={}){let{x:n,y:r,text:i=Sz(e)&&_Le(e)?LR:IR,frameAnchor:a,textAnchor:o=/right$/i.test(a)?`end`:/left$/i.test(a)?`start`:`middle`,lineAnchor:s=/^top/i.test(a)?`top`:/^bottom/i.test(a)?`bottom`:`middle`,lineHeight:c=1,lineWidth:l=1/0,textOverflow:u,monospace:d,fontFamily:f=d?`ui-monospace, monospace`:void 0,fontSize:p,fontStyle:m,fontVariant:h,fontWeight:g,rotate:_}=t,[v,y]=JR(_,0),[b,x]=Wze(p);if(super(e,{x:{value:n,scale:`x`,optional:!0},y:{value:r,scale:`y`,optional:!0},fontSize:{value:b,optional:!0},rotate:{value:hLe(v),optional:!0},text:{value:i,filter:oR,optional:!0}},t,Bze),this.rotate=y,this.textAnchor=bH(o,`middle`),this.lineAnchor=YR(s,`lineAnchor`,[`top`,`middle`,`bottom`]),this.lineHeight=+c,this.lineWidth=+l,this.textOverflow=hU(u),this.monospace=!!d,this.fontFamily=zR(f),this.fontSize=x,this.fontStyle=zR(m),this.fontVariant=zR(h),this.fontWeight=zR(g),this.frameAnchor=jz(a),!(this.lineWidth>=0))throw Error(`invalid lineWidth: ${l}`);this.splitLines=CU(this),this.clipLine=wU(this)}render(e,t,n,r,i){let{x:a,y:o}=t,{x:s,y:c,rotate:l,text:u,title:d,fontSize:f}=n,{rotate:p}=this,[m,h]=wH(this,r);return tH(`svg:g`,i).call(hH,this,r,i).call(yU,this,u,r).call(yH,this,{x:s&&a,y:c&&o}).call(t=>t.selectAll().data(e).enter().append(`text`).call(gH,this).call(Vze,this,u,d).attr(`transform`,fU`translate(${s?e=>s[e]:m},${c?e=>c[e]:h})${l?e=>` rotate(${l[e]})`:p?` rotate(${p})`:``}`).call(vH,`font-size`,f&&(e=>f[e])).call(uH,this,n)).node()}};function hU(e){return e==null?null:YR(e,`textOverflow`,[`clip`,`ellipsis`,`clip-start`,`clip-end`,`ellipsis-start`,`ellipsis-middle`,`ellipsis-end`]).replace(/^(clip|ellipsis)$/,`$1-end`)}function Vze(e,t,n,r){if(!n)return;let{lineAnchor:i,lineHeight:a,textOverflow:o,splitLines:s,clipLine:c}=t;e.each(function(e){let t=s(oH(n[e])??``).map(c),l=t.length,u=i===`top`?.71:i===`bottom`?1-l:(164-l*100)/200;if(l>1){let e=0;for(let n=0;n<l;++n){if(++e,!t[n])continue;let r=this.ownerDocument.createElementNS(hx.svg,`tspan`);r.setAttribute(`x`,0),n===e-1?r.setAttribute(`y`,`${(u+n)*a}em`):r.setAttribute(`dy`,`${e*a}em`),r.textContent=t[n],this.appendChild(r),e=0}}else u&&this.setAttribute(`y`,`${u*a}em`),this.textContent=t[0];if(o&&!r&&t[0]!==n[e]){let t=this.ownerDocument.createElementNS(hx.svg,`title`);t.textContent=n[e],this.appendChild(t)}})}function gU(e,{x:t,y:n,...r}={}){return r.frameAnchor===void 0&&([t,n]=az(t,n)),new mU(e,{...r,x:t,y:n})}function _U(e,{x:t=LR,...n}={}){return new mU(e,aU({...n,x:t}))}function vU(e,{y:t=LR,...n}={}){return new mU(e,iU({...n,y:t}))}function yU(e,t,n){vH(e,`text-anchor`,t.textAnchor),vH(e,`font-family`,t.fontFamily),vH(e,`font-size`,t.fontSize),vH(e,`font-style`,t.fontStyle),vH(e,`font-variant`,t.fontVariant===void 0?Hze(n):t.fontVariant),vH(e,`font-weight`,t.fontWeight)}function Hze(e){return e&&(Tz(e)||wz(e))?`tabular-nums`:void 0}var Uze=new Set([`inherit`,`initial`,`revert`,`unset`,`xx-small`,`x-small`,`small`,`medium`,`large`,`x-large`,`xx-large`,`xxx-large`,`larger`,`smaller`]);function Wze(e){return e==null||typeof e==`number`?[void 0,e]:typeof e==`string`?(e=e.trim().toLowerCase(),Uze.has(e)||/^[+-]?\d*\.?\d+(e[+-]?\d+)?(\w*|%)$/.test(e)?[void 0,e]:[e,void 0]):[e,void 0]}function Gze(e,t,n){let r=[],i,a=0;for(let[o,s,c]of Kze(e)){if(i===void 0&&(i=o),a>i&&n(e,i,s)>t&&(r.push(e.slice(i,a)+(e[a-1]===pU?`-`:``)),i=o),c){r.push(e.slice(i,s)),i=void 0;continue}a=s}return r}function*Kze(e){let t=0,n=0,r=e.length;for(;n<r;){let r=1;switch(e[n]){case pU:case`-`:++n,yield[t,n,!1],t=n;break;case` `:for(yield[t,n,!1];e[++n]===` `;);t=n;break;case`\r`:e[n+1]===` 129`&&++r;case` 130`:yield[t,n,!0],n+=r,t=n;break;default:++n;break}}yield[t,n,!0]}var bU={a:56,b:63,c:57,d:63,e:58,f:37,g:62,h:60,i:26,j:26,k:55,l:2
1306,m:88,n:60,o:60,p:62,q:62,r:39,s:54,t:38,u:60,v:55,w:79,x:54,y:55,z:55,A:69,B:67,C:73,D:74,E:61,F:58,G:76,H:75,I:28,J:55,K:67,L:58,M:89,N:75,O:78,P:65,Q:78,R:67,S:65,T:65,U:75,V:69,W:98,X:69,Y:67,Z:67,0:64,1:48,2:62,3:64,4:66,5:63,6:65,7:58,8:65,9:65," ":29,"!":32,'"':49,"'":31,"(":39,")":39,",":31,"-":48,".":31,"/":32,":":31,";":31,"?":52,"â":31,"â":31,"â":47,"â":47,"â¦":82};function xU(e,t=0,n=e.length){let r=0;for(let i=t;i<n;i=AU(e,i))r+=bU[e[i]]??(MU(e,i)?120:bU.e);return r}function SU(e,t=0,n=e.length){let r=0;for(let i=t;i<n;i=AU(e,i))r+=MU(e,i)?126:63;return r}function CU({monospace:e,lineWidth:t,textOverflow:n}){if(n!=null||t==1/0)return e=>e.split(/\r\n?|\n/g);let r=e?SU:xU,i=t*100;return e=>Gze(e,i,r)}function wU({monospace:e,lineWidth:t,textOverflow:n}){if(n==null||t==1/0)return e=>e;let r=e?SU:xU,i=t*100;switch(n){case`clip-start`:return e=>DU(e,i,r,``);case`clip-end`:return e=>EU(e,i,r,``);case`ellipsis-start`:return e=>DU(e,i,r,`â¦`);case`ellipsis-middle`:return e=>qze(e,i,r,`â¦`);case`ellipsis-end`:return e=>EU(e,i,r,`â¦`)}}function TU(e,t,n,r){let i=[],a=0;for(let o=0,s=0,c=e.length;o<c;o=s){s=AU(e,o);let c=n(e,o,s);if(a+c>t){for(a+=r;a>t&&o>0;)s=o,o=i.pop(),a-=n(e,o,s);return[o,t-a]}a+=c,i.push(o)}return[-1,0]}function EU(e,t,n,r){e=e.trim();let i=n(r),[a]=TU(e,t,n,i);return a<0?e:e.slice(0,a).trimEnd()+r}function qze(e,t,n,r){e=e.trim();let i=n(e);if(i<=t)return e;let a=n(r)/2,[o,s]=TU(e,t/2,n,a),[c]=TU(e,i-t/2-s+a,n,-a);return c<0?r:e.slice(0,o).trimEnd()+r+e.slice(AU(e,c)).trimStart()}function DU(e,t,n,r){e=e.trim();let i=n(e);if(i<=t)return e;let a=n(r),[o]=TU(e,i-t+a,n,-a);return o<0?r:r+e.slice(AU(e,o)).trimStart()}var OU=/[\p{Combining_Mark}\p{Emoji_Modifier}]+/uy,kU=/\p{Extended_Pictographic}/uy;function AU(e,t){return t+=Jze(e,t)?2:1,Xze(e,t)&&(t=OU.lastIndex),Yze(e,t)?AU(e,t+1):t}function jU(e,t){return e.charCodeAt(t)<128}function Jze(e,t){let n=e.charCodeAt(t);if(n>=55296&&n<56320){let n=e.charCodeAt(t+1);return n>=56320&&n<57344}return!1}function Yze(e,t){return e.charCodeAt(t)===8205}function Xze(e,t){return jU(e,t)?!1:(OU.lastIndex=t,OU.test(e))}function MU(e,t){return jU(e,t)?!1:(kU.lastIndex=t,kU.test(e))}var NU={ariaLabel:`vector`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,strokeLinejoin:`round`,strokeLinecap:`round`},PU=3.5,Zze=PU*5,FU={draw(e,t,n){let r=t*n/Zze;e.moveTo(0,0),e.lineTo(0,-t),e.moveTo(-r,r-t),e.lineTo(0,-t),e.lineTo(r,r-t)}},IU={draw(e,t,n){e.moveTo(-n,0),e.lineTo(0,-t),e.lineTo(n,0)}},Qze=new Map([[`arrow`,FU],[`spike`,IU]]);function $ze(e){return e&&typeof e.draw==`function`}function eBe(e){if($ze(e))return e;let t=Qze.get(`${e}`.toLowerCase());if(t)return t;throw Error(`invalid shape: ${e}`)}var LU=class extends TH{constructor(e,t={}){let{x:n,y:r,r:i=PU,length:a,rotate:o,shape:s=FU,anchor:c=`middle`,frameAnchor:l}=t,[u,d]=JR(a,12),[f,p]=JR(o,0);super(e,{x:{value:n,scale:`x`,optional:!0},y:{value:r,scale:`y`,optional:!0},length:{value:u,scale:`length`,optional:!0},rotate:{value:f,optional:!0}},t,NU),this.r=+i,this.length=d,this.rotate=p,this.shape=eBe(s),this.anchor=YR(c,`anchor`,[`start`,`middle`,`end`]),this.frameAnchor=jz(l)}render(e,t,n,r,i){let{x:a,y:o}=t,{x:s,y:c,length:l,rotate:u}=n,{length:d,rotate:f,anchor:p,shape:m,r:h}=this,[g,_]=wH(this,r);return tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,{x:s&&a,y:c&&o}).call(t=>t.selectAll().data(e).enter().append(`path`).call(gH,this).attr(`transform`,fU`translate(${s?e=>s[e]:g},${c?e=>c[e]:_})${u?e=>` rotate(${u[e]})`:f?` rotate(${f})`:``}${p===`start`?``:p===`end`?l?e=>` translate(0,${l[e]})`:` translate(0,${d})`:l?e=>` translate(0,${l[e]/2})`:` translate(0,${d/2})`}`).attr(`d`,l?e=>{let t=_E();return m.draw(t,l[e],h),t}:(()=>{let e=_E();return m.draw(e,d,h),e})()).call(uH,this,n)).node()}};function RU(e,t={}){let{x:n,y:r,...i}=t;return t.frameAnchor===void 0&&([n,r]=az(n,r)),new LU(e,{...i,x:n,y:r})}function zU(e,t={}){let{x:n=LR,...r}=t;return new LU(e,{...r,x:n})}function BU(e,t={}){let{y:n=LR,...r}=t;return new LU(e,{...r,y:n})}function tBe(e,t={}){let{shape:n=IU,stroke:r=NU.stroke,strokeWidth:i=1,fill:a=r,fillOpacity:o=.3,anchor:s=`start`,...c}=t;return RU(e,{...c,shape:n,stroke:r,strokeWidth:i,fill:a,fillOpacity:o,anchor:s})}function VU(e,t){return arguments.length<2&&!Sz(e)&&(t=e,e=null),t===void 0&&(t={}),[e,t]}function HU({anchor:e}={},t){return e===void 0?t[0]:YR(e,`anchor`,t)}function UU(e){return HU(e,[`left`,`right`])}function WU(e){return HU(e,[`right`,`left`])}function GU(e){return HU(e,[`bottom`,`top`])}function KU(e){return HU(e,[`top`,`bottom`])}function qU(){let[e,t]=VU(...arguments);return ZU(`y`,UU(t),e,t)}function JU(){let[e,t]=VU(...arguments);return ZU(`fy`,WU(t),e,t)}function YU(){let[e,t]=VU(...arguments);return QU(`x`,GU(t),e,t)}function XU(){let[e,t]=VU(...arguments);return QU(`fx`,KU(t),e,t)}function ZU(e,t,n,{color:r=`currentColor`,opacity:i=1,stroke:a=r,strokeOpacity:o=i,strokeWidth:s=1,fill:c=r,fillOpacity:l=i,textAnchor:u,textStroke:d,textStrokeOpacity:f,textStrokeWidth:p,tickSize:m=e===`y`?6:0,tickPadding:h,tickRotate:g,x:_,margin:v,marginTop:y=v===void 0?20:v,marginRight:b=v===void 0?t===`right`?40:0:v,marginBottom:x=v===void 0?20:v,marginLeft:S=v===void 0?t===`left`?40:0:v,label:C,labelAnchor:w,labelArrow:T,labelOffset:E,ariaLabel:D=`${e}-axis`,...O}){return m=BR(m),h=BR(h),g=BR(g),w!==void 0&&(w=YR(w,`labelAnchor`,[`center`,`top`,`bottom`])),T=pW(T),EH(m&&!Oz(a)?nBe(e,t,n,{stroke:a,strokeOpacity:o,strokeWidth:s,tickSize:m,tickPadding:h,tickRotate:g,x:_,ariaLabel:D,...O}):null,Oz(c)?null:iBe(e,t,n,{fill:c,fillOpacity:l,stroke:d,strokeOpacity:f,strokeWidth:p,textAnchor:u,tickSize:m,tickPadding:h,tickRotate:g,x:_,marginTop:y,marginRight:b,marginBottom:x,marginLeft:S,ariaLabel:D,...O}),!Oz(c)&&C!==null?gU([],oW({fill:c,fillOpacity:l,...O},function(n,r,i,a,o){let s=a[e],{marginTop:c,marginRight:l,marginBottom:u,marginLeft:d}=e===`y`&&o.inset||o,f=w??(s.bandwidth?`center`:`top`),p=E??(t===`right`?l:d)-3;return f===`center`?(this.textAnchor=void 0,this.lineAnchor=t===`right`?`bottom`:`top`,this.frameAnchor=t,this.rotate=-90):(this.textAnchor=t===`right`?`end`:`start`,this.lineAnchor=f,this.frameAnchor=`${f}-${t}`,this.rotate=0),this.dy=f===`top`?3-c:f===`bottom`?u-3:0,this.dx=t===`right`?p:-p,this.ariaLabel=`${D} label`,{facets:[[0]],channels:{text:{value:[fW(e,s,{anchor:t,label:C,labelAnchor:f,labelArrow:T})]}}}})):null)}function QU(e,t,n,{color:r=`currentColor`,opacity:i=1,stroke:a=r,strokeOpacity:o=i,strokeWidth:s=1,fill:c=r,fillOpacity:l=i,textAnchor:u,textStroke:d,textStrokeOpacity:f,textStrokeWidth:p,tickSize:m=e===`x`?6:0,tickPadding:h,tickRotate:g,y:_,margin:v,marginTop:y=v===void 0?t===`top`?30:0:v,marginRight:b=v===void 0?20:v,marginBottom:x=v===void 0?t===`bottom`?30:0:v,marginLeft:S=v===void 0?20:v,label:C,labelAnchor:w,labelArrow:T,labelOffset:E,ariaLabel:D=`${e}-axis`,...O}){return m=BR(m),h=BR(h),g=BR(g),w!==void 0&&(w=YR(w,`labelAnchor`,[`center`,`left`,`right`])),T=pW(T),EH(m&&!Oz(a)?rBe(e,t,n,{stroke:a,strokeOpacity:o,strokeWidth:s,tickSize:m,tickPadding:h,tickRotate:g,y:_,ariaLabel:D,...O}):null,Oz(c)?null:aBe(e,t,n,{fill:c,fillOpacity:l,stroke:d,strokeOpacity:f,strokeWidth:p,textAnchor:u,tickSize:m,tickPadding:h,tickRotate:g,y:_,marginTop:y,marginRight:b,marginBottom:x,marginLeft:S,ariaLabel:D,...O}),!Oz(c)&&C!==null?gU([],oW({fill:c,fillOpacity:l,...O},function(n,r,i,a,o){let s=a[e],{marginTop:c,marginRight:l,marginBottom:u,marginLeft:d}=e===`x`&&o.inset||o,f=w??(s.bandwidth?`center`:`right`),p=E??(t===`top`?c:u)-3;return f===`center`?(this.frameAnchor=t,this.textAnchor=void 0):(this.frameAnchor=`${t}-${f}`,this.textAnchor=f===`right`?`end`:`start`),this.lineAnchor=t,this.dy=t===`top`?-p:p,this.dx=f===`right`?l-3:f===`left`?3-d:0,this.ariaLabel=`${D} label`,{facets:[[0]],channels:{text:{value:[fW(e,s,{anchor:t,label:C,labelAnchor:f,labelArrow:T})]}}}})):null)}function nBe(e,t,n,{strokeWidth:r=1,strokeLinecap:i=null,strokeLinejoin:a=null,facetAnchor:o=t+(e===`y`?`-empty`:``),frameAnchor:s=t,tickSize:c,inset:l=0,insetLeft:u=l,insetRight:d=l,dx:f=0,y:p=e===`y`?void 0:null,ariaLabel:m,...h}){return sW(BU,e,n,{ariaLabel:`${m} tick`,ariaHidden:!0},{strokeWidth:r,strokeLinecap:i,strokeLinejoin:a,facetAnchor:o,frameAnchor:s,y:p,...h,dx:t===`left`?+f-sH+ +u:+f+sH-d,anchor:`start`,length:c,shape:t===`left`?lBe:uBe})}function rBe(e,t,n,{strokeWidth:r=1,strokeLinecap:i=null,strokeLinejoin:a=null,facetAnchor:o=t+(e===`x`?`-empty`:``),frameAnchor:s=t,tickSize:c,inset:l=0,insetTop:u=l,insetBottom:d=l,dy:f=0,x:p=e===`x`?void 0:null,ariaLabel:m,...h}){return sW(zU,e,n,{ariaLabel:`${m} tick`,ariaHidden:!0},{strokeWidth:r,strokeLinejoin:a,strokeLinecap:i,facetAnchor:o,frameAnchor:s,x:p,...h,dy:t===`bottom`?+f-sH-d:+f+sH+ +u,anchor:`start`,length:c,shape:t===`bottom`?sBe:cBe})}function iBe(e,t,n,{facetAnchor:r=t+(e===`y`?`-empty`:``),frameAnchor:i=t,tickSize:a,tickRotate:o=0,tickPadding:s=Math.max(3,9-a)+(Math.abs(o)>60?4*Math.cos(o*RH):0),text:c,textAnchor:l=Math.abs(o)>60?`middle`:t===`left`?`end`:`start`,lineAnchor:u=o>60?`top`:o<-60?`bottom`:`middle`,fontVariant:d,inset:f=0,insetLeft:p=f,insetRight:m=f,dx:h=0,ariaLabel:g,y:_=e===`y`?void 0:null,...v}
130){return sW(vU,e,n,{ariaLabel:`${g} tick label`},{facetAnchor:r,frameAnchor:i,text:c,textAnchor:l,lineAnchor:u,fontVariant:d,rotate:o,y:_,...v,dx:t===`left`?+h-a-s+ +p:+h+ +a+ +s-m},function(e,n,r,i,a){d===void 0&&(this.fontVariant=dW(e)),c===void 0&&(a.text=cW(e,n,r,i,t))})}function aBe(e,t,n,{facetAnchor:r=t+(e===`x`?`-empty`:``),frameAnchor:i=t,tickSize:a,tickRotate:o=0,tickPadding:s=Math.max(3,9-a)+(Math.abs(o)>=10?4*Math.cos(o*RH):0),text:c,textAnchor:l=Math.abs(o)>=10?o<0^t===`bottom`?`start`:`end`:`middle`,lineAnchor:u=Math.abs(o)>=10?`middle`:t===`bottom`?`top`:`bottom`,fontVariant:d,inset:f=0,insetTop:p=f,insetBottom:m=f,dy:h=0,x:g=e===`x`?void 0:null,ariaLabel:_,...v}){return sW(_U,e,n,{ariaLabel:`${_} tick label`},{facetAnchor:r,frameAnchor:i,text:c===void 0?null:c,textAnchor:l,lineAnchor:u,fontVariant:d,rotate:o,x:g,...v,dy:t===`bottom`?+h+ +a+ +s-m:+h-a-s+ +p},function(e,n,r,i,a){d===void 0&&(this.fontVariant=dW(e)),c===void 0&&(a.text=cW(e,n,r,i,t))})}function $U(){let[e,t]=VU(...arguments);return rW(`y`,UU(t),e,t)}function eW(){let[e,t]=VU(...arguments);return rW(`fy`,WU(t),e,t)}function tW(){let[e,t]=VU(...arguments);return iW(`x`,GU(t),e,t)}function nW(){let[e,t]=VU(...arguments);return iW(`fx`,KU(t),e,t)}function rW(e,t,n,{y:r=e===`y`?void 0:null,x:i=null,x1:a=t===`left`?i:null,x2:o=t===`right`?i:null,ariaLabel:s=`${e}-grid`,ariaHidden:c=!0,...l}){return sW(uU,e,n,{ariaLabel:s,ariaHidden:c},{y:r,x1:a,x2:o,...aW(l)})}function iW(e,t,n,{x:r=e===`x`?void 0:null,y:i=null,y1:a=t===`top`?i:null,y2:o=t===`bottom`?i:null,ariaLabel:s=`${e}-grid`,ariaHidden:c=!0,...l}){return sW(lU,e,n,{ariaLabel:s,ariaHidden:c},{x:r,y1:a,y2:o,...aW(l)})}function aW({color:e=`currentColor`,opacity:t=.1,stroke:n=e,strokeOpacity:r=t,strokeWidth:i=1,...a}){return{stroke:n,strokeOpacity:r,strokeWidth:i,...a}}function oW({fill:e,fillOpacity:t,fontFamily:n,fontSize:r,fontStyle:i,fontVariant:a,fontWeight:o,monospace:s,pointerEvents:c,shapeRendering:l,clip:u=!1},d){return[,e]=qR(e),[,t]=JR(t),{facet:`super`,x:null,y:null,fill:e,fillOpacity:t,fontFamily:n,fontSize:r,fontStyle:i,fontVariant:a,fontWeight:o,monospace:s,pointerEvents:c,shapeRendering:l,clip:u,initializer:d}}function sW(e,t,n,r,i,a){let o;function s(e,n,r,s,c,l){let u=e==null&&(t===`fx`||t===`fy`),{[t]:d}=s;if(!d)throw Error(`missing scale: ${t}`);let f=d.domain(),{interval:p,ticks:m,tickFormat:h,tickSpacing:g=t===`x`?80:35}=i;if(typeof m==`string`&&mW(d)&&(p=m,m=void 0),m===void 0&&(m=yz(p,d.type)??oBe(d,g)),e==null){if(Sz(m))e=ZR(m);else if(bz(m))e=uW(m,...Fg(f));else if(d.interval){let t=d.interval;if(d.ticks){let[n,r]=Fg(f),i=(r-n)/t[SR];t=BIe(t,i/m)??t,e=uW(t,n,r)}else{e=f;let n=e.length;t=BIe(t,n/m)??t,t!==d.interval&&(e=uW(t,...Fg(e)))}if(t===d.interval){let t=Math.round(e.length/m);t>1&&(e=e.filter((e,n)=>n%t===0))}}else e=d.ticks?d.ticks(m):f;if(!d.ticks&&e.length&&e!==f){let n=new Rg(f);e=e.filter(e=>n.has(e)),e.length||iV(`Warning: the ${t}-axis ticks appear to not align with the scale domain, resulting in no ticks. Try different ticks?`)}t===`y`||t===`x`?n=[cz(e)]:o[t]={scale:t,value:LR}}a?.call(this,d,e,m,h,o);let _=Object.fromEntries(Object.entries(o).map(([t,n])=>[t,{...n,value:MR(e,n.value)}]));return u&&(n=l.filterFacets(e,_)),{data:e,facets:n,channels:_}}let c=Kz(i).initializer,l=e(n,Kz({...i,initializer:s},c));return n==null?(o=l.channels,l.channels={}):o={},r!==void 0&&Object.assign(l,r),l.clip===void 0&&(l.clip=!1),l}function oBe(e,t){let[n,r]=Fg(e.range());return(r-n)/t}function cW(e,t,n,r,i){return{value:lW(e,t,n,r,i)}}function lW(e,t,n,r,i){return typeof r==`function`&&!(e.type===`log`&&e.tickFormat)?r:r===void 0&&t&&wz(t)?WIe(e.type,t,i)??oH:e.tickFormat?e.tickFormat(typeof n==`number`?n:null,r):typeof r==`string`&&e.domain().length>0?(wz(e.domain())?ub:gy)(r):r===void 0?oH:UR(r)}function uW(e,t,n){return e.range(t,e.offset(e.floor(n)))}var sBe={draw(e,t){e.moveTo(0,0),e.lineTo(0,t)}},cBe={draw(e,t){e.moveTo(0,0),e.lineTo(0,-t)}},lBe={draw(e,t){e.moveTo(0,0),e.lineTo(-t,0)}},uBe={draw(e,t){e.moveTo(0,0),e.lineTo(t,0)}};function dW(e){return e.bandwidth&&!e.interval?void 0:`tabular-nums`}function fW(e,t,{anchor:n,label:r=t.label,labelAnchor:i,labelArrow:a}={}){if(!(r==null||r.inferred&&mW(t)&&/^(date|time|year)$/i.test(r))){if(r=String(r),a===`auto`&&(a=(!t.bandwidth||t.interval)&&!/[ââââ]/.test(r)),!a)return r;if(a===!0){let n=hV(t);
130n&&(a=/x$/.test(e)||i===`center`?/x$/.test(e)===n<0?`left`:`right`:n<0?`up`:`down`)}switch(a){case`left`:return`â ${r}`;case`right`:return`${r} â`;case`up`:return n===`right`?`${r} â`:`â ${r}`;case`down`:return n===`right`?`${r} â`:`â ${r}`}return r}}function pW(e=`auto`){return Oz(e)?!1:typeof e==`boolean`?e:YR(e,`labelArrow`,[`auto`,`up`,`right`,`down`,`left`])}function mW(e){return wz(e.domain())}function hW(e,t){if(t==null)return t;let n=e(t);if(!n)throw Error(`scale not found: ${t}`);return n}function dBe(e,{opacity:t,...n}={}){if(!OV(e)&&!kV(e))throw Error(`swatches legend requires ordinal or threshold color scale (not ${e.type})`);return gW(e,n,(e,n,r,i)=>e.append(`svg`).attr(`width`,r).attr(`height`,i).attr(`fill`,n.scale).attr(`fill-opacity`,JR(t)[1]).append(`rect`).attr(`width`,`100%`).attr(`height`,`100%`))}function fBe(e,{fill:t=e.hint?.fill===void 0?`none`:e.hint.fill,fillOpacity:n=1,stroke:r=e.hint?.stroke===void 0?Oz(t)?`currentColor`:`none`:e.hint.stroke,strokeOpacity:i=1,strokeWidth:a=1.5,r:o=4.5,...s}={},c){let[l,u]=qR(t),[d,f]=qR(r),p=hW(c,l),m=hW(c,d),h=o*o*Math.PI;return n=JR(n)[1],i=JR(i)[1],a=JR(a)[1],gW(e,s,(t,r,o,s)=>t.append(`svg`).attr(`viewBox`,`-8 -8 16 16`).attr(`width`,o).attr(`height`,s).attr(`fill`,l===`color`?e=>p.scale(e):u).attr(`fill-opacity`,n).attr(`stroke`,d===`color`?e=>m.scale(e):f).attr(`stroke-opacity`,i).attr(`stroke-width`,a).append(`path`).attr(`d`,t=>{let n=_E();return e.scale(t).draw(n,h),n}))}function gW(e,t={},n){let{columns:r,tickFormat:i,fontVariant:a=LH(e),swatchSize:o=15,swatchWidth:s=o,swatchHeight:c=o,marginLeft:l=0,className:u,style:d,width:f}=t,p=eH(t);u=SH(u),i=lW(e.scale,e.domain,void 0,i);let m=tH(`div`,p).attr(`class`,`${u}-swatches ${u}-swatches-${r==null?`wrap`:`columns`}`),h;return r==null?(h=`:where(.${u}-swatches-wrap) { 131 display: flex; 132 align-items: center; 133 min-height: 33px; 134 flex-wrap: wrap; 135} 136:where(.${u}-swatches-wrap .${u}-swatch) { 137 display: inline-flex; 138 align-items: center; 139 margin-right: 1em; 140}`,m.selectAll().data(e.domain).enter().append(`span`).attr(`class`,`${u}-swatch`).call(n,e,s,c).append(function(){return this.ownerDocument.createTextNode(i.apply(this,arguments))})):(h=`:where(.${u}-swatches-columns .${u}-swatch) { 141 display: flex; 142 align-items: center; 143 break-inside: avoid; 144 padding-bottom: 1px; 145} 146:where(.${u}-swatches-columns .${u}-swatch::before) { 147 flex-shrink: 0; 148} 149:where(.${u}-swatches-columns .${u}-swatch-label) { 150 white-space: nowrap; 151 overflow: hidden; 152 text-overflow: ellipsis; 153}`,m.style(`columns`,r).selectAll().data(e.domain).enter().append(`div`).attr(`class`,`${u}-swatch`).call(n,e,s,c).call(e=>e.append(`div`).attr(`class`,`${u}-swatch-label`).attr(`title`,i).text(i))),m.call(e=>e.insert(`style`,`*`).text(`:where(.${u}-swatches) { 154 font-family: system-ui, sans-serif; 155 font-size: 10px; 156 margin-bottom: 0.5em; 157} 158:where(.${u}-swatch > svg) { 159 margin-right: 0.5em; 160 overflow: visible; 161} 162${h}`)).style(`margin-left`,l?`${+l}px`:null).style(`width`,f===void 0?null:`${+f}px`).style(`font-variant`,bH(a,`normal`)).call(CH,d).node()}var _W=new Map([[`symbol`,fBe],[`color`,yW],[`opacity`,hBe]]);function pBe(e={}){for(let[t,n]of _W){let r=e[t];if(nz(r)){let i=eH(e),a;if(t===`symbol`){let{fill:t,stroke:n=t===void 0&&nz(e.color)?`color`:void 0}=e;a={fill:t,stroke:n}}return n(SV(t,r,a),vW(i,r,e),t=>nz(e[t])?SV(t,e[t]):null)}}throw Error(`unknown legend type; no scale found`)}function mBe(e,t,n={}){return(r,i)=>{if(!_W.has(r))throw Error(`unknown legend type: ${r}`);if(r in e)return _W.get(r)(e[r],vW(t,n[r],i),t=>e[t])}}function vW({className:e,...t},{label:n,ticks:r,tickFormat:i}={},a){return CLe(a,{className:e,...t},{label:n,ticks:r,tickFormat:i})}function yW(e,{legend:t=!0,...n}){if(t===!0&&(t=e.type===`ordinal`?`swatches`:`ramp`),e.domain!==void 0)switch(`${t}`.toLowerCase()){case`swatches`:return dBe(e,n);case`ramp`:return Pze(e,n);default:throw Error(`unknown legend type: ${t}`)}}function hBe({type:e,interpolate:t,...n},{legend:r=!0,color:i=R_(0,0,0),...a}){if(!t)throw Error(`${e} opacity scales are not supported`);if(r===!0&&(r=`ramp`),`${r}`.toLowerCase()!==`ramp`)throw Error(`${r} opacity legends are not supported`);return yW({type:e,...n,interpolate:gBe(i)},{legend:r,...a})}function gBe(e){let{r:t,g:n,b:r}=R_(e)||R_(0,0,0);return e=>`rgba(${t},${n},${r},${e})`}function _Be(e,t,n){let r=[];for(let[i,a]of _W){let o=n[i];if(o?.legend&&i in e){let n=a(e[i],vW(t,e[i],o),t=>e[t]);n!=null&&r.push(n)}}return r}function bW(e={},t=`x`){return sLe(e)?e:{...e,[t]:LR}}function xW(e={},t=`y`){return cLe(e)?e:{...e,[t]:LR}}function SW(e,t){if(t.length===1)return{data:e,facets:t};let n=sz(e),r=new Uint8Array(n),i=0;for(let e of t)for(let t of e)r[t]&&++i,r[t]=1;if(i===0)return{data:e,facets:t};e=$R(e);let a=e[XIe]=new Uint32Array(n+i);t=t.map(e=>$R(e,Uint32Array));let o=n;r.fill(0);for(let n of t)for(let t=0,i=n.length;t<i;++t){let i=n[t];r[i]?(n[t]=o,e[o]=e[i],a[o]=i,++o):a[i]=i,r[i]=1}return{data:e,facets:t}}function CW(e={},t={}){arguments.length===1&&([e,t]=DW(e));let{y1:n,y:r=n,x:i,...a}=t,[o,s,c,l]=OW(r,i,`y`,`x`,e,a);return{...o,y1:n,y:s,x1:c,x2:l,x:gz(c,l)}}function vBe(e={},t={}){arguments.length===1&&([e,t]=DW(e));let{y1:n,y:r=n,x:i}=t,[a,o,s]=OW(r,i,`y`,`x`,e,t);return{...a,y1:n,y:o,x:s}}function yBe(e={},t={}){arguments.length===1&&([e,t]=DW(e));let{y1:n,y:r=n,x:i}=t,[a,o,,s]=OW(r,i,`y`,`x`,e,t);return{...a,y1:n,y:o,x:s}}function wW(e={},t={}){arguments.length===1&&([e,t]=DW(e));let{x1:n,x:r=n,y:i,...a}=t,[o,s,c,l]=OW(r,i,`x`,`y`,e,a);return{...o,x1:n,x:s,y1:c,y2:l,y:gz(c,l)}}function bBe(e={},t={}){arguments.length===1&&([e,t]=DW(e));let{x1:n,x:r=n,y:i}=t,[a,o,s]=OW(r,i,`x`,`y`,e,t);return{...a,x1:n,x:o,y:s}}function xBe(e={},t={}){arguments.length===1&&([e,t]=DW(e));let{x1:n,x:r=n,y:i}=t,[a,o,,s]=OW(r,i,`x`,`y`,e,t);return{...a,x1:n,x:o,y:s}}function TW({x:e,x1:t,x2:n,...r}={}){return r=OH(r,`y`),t===void 0&&n===void 0?CW({x:e,...r}):([t,n]=lLe(e,t,n),{...r,x1:t,x2:n})}function EW({y:e,y1:t,y2:n,...r}={}){return r=OH(r,`x`),t===void 0&&n===void 0?wW({y:e,...r}):([t,n]=lLe(e,t,n),{...r,y1:t,y2:n})}function DW(e){let{offset:t,order:n,reverse:r,...i}=e;return[{offset:t,order:n,reverse:r},i]}var SBe={length:!0};function OW(e,t=RR,n,r,{offset:i,order:a,reverse:o},s){if(t===null)throw Error(`stack requires ${r}`);let c=oz(s),[l,u]=mz(e),[d,f]=pz(t),[p,m]=pz(t);return d.hint=p.hint=SBe,i=CBe(i),a=EBe(a,i,r),[Gz(s,(r,s,l)=>{({data:r,facets:s}=SW(r,s));let d=e==null?void 0:u(_z(MR(r,e),l?.[n])),p=MR(r,t,Float64Array),h=MR(r,c),g=a&&a(r,d,p,h),_=sz(r),v=f(new Float64Array(_)),y=m(new Float64Array(_)),b=[];for(let e of s){let t=d?Array.from(Vg(e,e=>d[e]).values()):[e];if(g)for(let e of t)e.sort(g);for(let e of t){let t=0,n=0;o&&e.reverse();for(let r of e){let e=p[r];e<0?t=y[r]=(v[r]=t)+e:e>0?n=y[r]=(v[r]=n)+e:y[r]=v[r]=n}}b.push(t)}return i&&i(b,v,y,h),{data:r,facets:s}}),l,d,p]}function CBe(e){if(e!=null){if(typeof e==`function`)return e;switch(`${e}`.toLowerCase()){case`expand`:case`normalize`:return wBe;case`center`:case`silhouette`:return TBe;case`wiggle`:return AW}throw Error(`unknown offset: ${e}`)}}function kW(e,t){let n=0,r=0;for(let i of e){let e=t[i];e<n&&(n=e),e>r&&(r=e)}return[n,r]}function wBe(e,t,n){for(let r of e)for(let e of r){let[r,i]=kW(e,n);for(let a of e){let e=1/(i-r||1);t[a]=e*(t[a]-r),n[a]=e*(n[a]-r)}}}function TBe(e,t,n){for(let r of e){for(let e of r){let[r,i]=kW(e,n);for(let a of e){let e=(i+r)/2;t[a]-=e,n[a]-=e}}jW(r,t,n)}MW(e,t,n)}function AW(e,t,n,r){for(let i of e){let e=new Lg,a=0;for(let o of i){let i=-1,s=o.map(e=>Math.abs(n[e]-t[e])),c=o.map(a=>{i=r?r[a]:++i;let o=n[a]-t[a],s=e.has(i)?o-e.get(i):0;return e.set(i,o),s}),l=[0,...Tde(c)];for(let e of o)t[e]+=a,n[e]+=a;let u=h_(s);u&&(a-=h_(s,(e,t)=>(c[t]/2+l[t])*e)/u)}jW(i,t,n)}MW(e,t,n)}function jW(e,t,n){let r=r_(e,e=>r_(e,e=>t[e]));for(let i of e)for(let e of i)t[e]-=r,n[e]-=r}function MW(e,t,n){let r=e.length;if(r===1)return;let i=e.map(e=>e.flat()),a=i.map(e=>(r_(e,e=>t[e])+n_(e,e=>n[e]))/2),o=r_(a);for(let e=0;e<r;e++){let r=o-a[e];for(let a of i[e])t[a]+=r,n[a]+=r}}function EBe(e,t,n){if(e===void 0&&t===AW)return NW(iR);if(e!=null){if(typeof e==`string`){let t=e.startsWith(`-`),r=t?aR:iR;switch((t?e.slice(1):e).toLowerCase()){case`value`:case n:return DBe(r);case`z`:return OBe(r);case`sum`:return kBe(r);case`appearance`:return ABe(r);case`inside-out`:return NW(r)}return PW(eLe(e))}if(typeof e==`function`)return(e.length===1?PW:jBe)(e);if(jR(e))return MBe(e);throw Error(`invalid order: ${e}`)}}function DBe(e){return(t,n,r)=>(t,n)=>e(r[t],r[n])}function OBe(e){return(t,n,r,i)=>(t,n)=>e(i[t],i[n])}function kBe(e){return FW(e,(e,t,n,r)=>qg(cz(e),e=>h_(e,e=>n[e]),e=>r[e]))}function ABe(e){return FW(e,(e,t,n,r)=>qg(cz(e),e=>t[o_(e,e=>n[e])],e=>r[e]))}function NW(e){return FW(e,(e,t,n,r)=>{let i=cz(e),a=qg(i,e=>t[o_(e,e=>n[e])],e=>r[e]),o=Hg(i,e=>h_(e,e=>n[e]),e=>r[e]),s=[],c=[],l=0;for(let e of a)l<0?(l+=o.get(e),s.push(e)):(l-=o.get(e),c.push(e));return c.reverse().concat(s)})}function PW(e){return t=>{let n=MR(t,e);return(e,t)=>iR(n[e],n[t])}}function jBe(e){return t=>jR(t)?(n,r)=>e(t[n],t[r]):(n,r)=>e(t.get(n),t.get(r))}function MBe(e){return FW(iR,()=>e)}function FW(e,t){return(n,r,i,a)=>
162{if(!a)throw Error(`missing channel: z`);let o=new Lg(t(n,r,i,a).map((e,t)=>[e,t]));return(t,n)=>e(o.get(a[t]),o.get(a[n]))}}var NBe={ariaLabel:`rect`},IW=class extends TH{constructor(e,t={}){let{x1:n,y1:r,x2:i,y2:a}=t;super(e,{x1:{value:n,scale:`x`,type:n!=null&&i==null?`band`:void 0,optional:!0},y1:{value:r,scale:`y`,type:r!=null&&a==null?`band`:void 0,optional:!0},x2:{value:i,scale:`x`,optional:!0},y2:{value:a,scale:`y`,optional:!0}},t,NBe),LW(this,t),RW(this,t)}render(e,t,n,r,i){let{x:a,y:o}=t,{x1:s,y1:c,x2:l,y2:u}=n,{marginTop:d,marginRight:f,marginBottom:p,marginLeft:m,width:h,height:g}=r,{projection:_}=i,{insetTop:v,insetRight:y,insetBottom:b,insetLeft:x}=this,{rx:S,ry:C,rx1y1:w,rx1y2:T,rx2y1:E,rx2y2:D}=this;(s||l)&&!_&&AV(a)&&(s=l=null),(c||u)&&!_&&AV(o)&&(c=u=null);let O=a?.bandwidth?a.bandwidth():0,k=o?.bandwidth?o.bandwidth():0;return tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,{},0,0).call(t=>t.selectAll().data(e).enter().call(w||T||E||D?e=>e.append(`path`).call(gH,this).call(zW,s&&l?e=>s[e]+(l[e]<s[e]?-y:x):s?e=>s[e]+x:m+x,c&&u?e=>c[e]+(u[e]<c[e]?-b:v):c?e=>c[e]+v:d+v,s&&l?e=>l[e]-(l[e]<s[e]?-x:y):s?e=>s[e]+O-y:h-f-y,c&&u?e=>u[e]-(u[e]<c[e]?-v:b):c?e=>c[e]+k-b:g-p-b,this).call(uH,this,n):e=>e.append(`rect`).call(gH,this).attr(`x`,s?l?e=>Math.min(s[e],l[e])+x:e=>s[e]+x:m+x).attr(`y`,c?u?e=>Math.min(c[e],u[e])+v:e=>c[e]+v:d+v).attr(`width`,s?l?e=>Math.max(0,Math.abs(l[e]-s[e])+O-x-y):O-x-y:h-f-m-y-x).attr(`height`,c?u?e=>Math.max(0,Math.abs(c[e]-u[e])+k-v-b):k-v-b:g-d-p-v-b).call(vH,`rx`,S).call(vH,`ry`,C).call(uH,this,n))).node()}};function LW(e,{inset:t=0,insetTop:n=t,insetRight:r=t,insetBottom:i=t,insetLeft:a=t}={}){e.insetTop=BR(n),e.insetRight=BR(r),e.insetBottom=BR(i),e.insetLeft=BR(a)}function RW(e,{r:t,rx:n,ry:r,rx1:i=t,ry1:a=t,rx2:o=t,ry2:s=t,rx1y1:c=i===void 0?a===void 0?0:+a:+i,rx1y2:l=i===void 0?s===void 0?0:+s:+i,rx2y1:u=o===void 0?a===void 0?0:+a:+o,rx2y2:d=o===void 0?s===void 0?0:+s:+o}={}){c||l||u||d?(e.rx1y1=c,e.rx1y2=l,e.rx2y1=u,e.rx2y2=d):(e.rx=bH(n,`auto`),e.ry=bH(r,`auto`))}function zW(e,t,n,r,i,a){let{rx1y1:o,rx1y2:s,rx2y1:c,rx2y2:l}=a;typeof t!=`function`&&(t=UR(t)),typeof n!=`function`&&(n=UR(n)),typeof r!=`function`&&(r=UR(r)),typeof i!=`function`&&(i=UR(i));let u=Math.max(Math.abs(o+c),Math.abs(s+l)),d=Math.max(Math.abs(o+s),Math.abs(c+l));e.attr(`d`,e=>{let a=t(e),f=n(e),p=r(e),m=i(e),h=a>p,g=f>m,_=h?p:a,v=h?a:p,y=g?m:f,b=g?f:m,x=Math.min(1,(v-_)/u,(b-y)/d),S=x*(h?g?l:c:g?s:o),C=x*(h?g?s:o:g?l:c),w=x*(h?g?o:s:g?c:l),T=x*(h?g?c:l:g?o:s);return`M${_},${y+VW(S,T)}A${S},${S} 0 0 ${S<0?0:1} ${_+BW(S,T)},${y}H${v-BW(C,w)}A${C},${C} 0 0 ${C<0?0:1} ${v},${y+VW(C,w)}V${b-VW(w,C)}A${w},${w} 0 0 ${w<0?0:1} ${v-BW(w,C)},${b}H${_+BW(T,S)}A${T},${T} 0 0 ${T<0?0:1} ${_},${b-VW(T,S)}Z`})}function BW(e,t){return t<0?e:Math.abs(e)}function VW(e,t){return t<0?Math.abs(e):e}function HW(e,t){return new IW(e,eU(tU(t)))}function UW(e,t={}){return ez(t)||(t={...t,y:IR,x2:LR,interval:1}),new IW(e,TW(tU(bW(t))))}function WW(e,t={}){return ez(t)||(t={...t,x:IR,y2:LR,interval:1}),new IW(e,EW(eU(xW(t))))}var PBe={ariaLabel:`frame`,fill:`none`,stroke:`currentColor`,clip:!1},FBe={ariaLabel:`frame`,fill:null,stroke:`currentColor`,strokeLinecap:`square`,clip:!1},GW=class extends TH{constructor(e={}){let{anchor:t=null}=e;super(FR,void 0,e,t==null?PBe:FBe),this.anchor=aLe(t,`anchor`,[`top`,`right`,`bottom`,`left`]),LW(this,e),t||RW(this,e)}render(e,t,n,r,i){let{marginTop:a,marginRight:o,marginBottom:s,marginLeft:c,width:l,height:u}=r,{anchor:d,insetTop:f,insetRight:p,insetBottom:m,insetLeft:h}=this,{rx:g,ry:_,rx1y1:v,rx1y2:y,rx2y1:b,rx2y2:x}=this,S=c+h,C=l-o-p,w=a+f,T=u-s-m;return tH(d?`svg:line`:v||y||b||x?`svg:path`:`svg:rect`,i).datum(0).call(hH,this,r,i).call(gH,this).call(uH,this,n).call(yH,this,{}).call(d===`left`?e=>e.attr(`x1`,S).attr(`x2`,S).attr(`y1`,w).attr(`y2`,T):d===`right`?e=>e.attr(`x1`,C).attr(`x2`,C).attr(`y1`,w).attr(`y2`,T):d===`top`?e=>e.attr(`x1`,S).attr(`x2`,C).attr(`y1`,w).attr(`y2`,w):d===`bottom`?e=>e.attr(`x1`,S).attr(`x2`,C).attr(`y1`,T).attr(`y2`,T):v||y||b||x?e=>e.call(zW,S,w,C,T,this):e=>e.attr(`x`,S).attr(`y`,w).attr(`width`,C-S).attr(`height`,T-w).attr(`rx`,g).attr(`ry`,_)).node()}};function KW(e){return new GW(e)}
162var qW={ariaLabel:`tip`,fill:`var(--plot-background)`,stroke:`currentColor`},IBe=new Set([`geometry`,`href`,`src`,`ariaLabel`,`scales`]),JW=class extends TH{constructor(e,t={}){t.tip&&(t={...t,tip:!1}),t.title===void 0&&Sz(e)&&_Le(e)&&(t={...t,title:LR});let{x:n,y:r,x1:i,x2:a,y1:o,y2:s,anchor:c,preferredAnchor:l=`bottom`,monospace:u,fontFamily:d=u?`ui-monospace, monospace`:void 0,fontSize:f,fontStyle:p,fontVariant:m,fontWeight:h,lineHeight:g=1,lineWidth:_=20,frameAnchor:v,format:y,textAnchor:b=`start`,textOverflow:x,textPadding:S=8,title:C,pointerSize:w=12,pathFilter:T=`drop-shadow(0 3px 4px rgba(0,0,0,0.2))`}=t;super(e,{x:{value:i!=null&&a!=null?null:n,scale:`x`,optional:!0},y:{value:o!=null&&s!=null?null:r,scale:`y`,optional:!0},x1:{value:i,scale:`x`,optional:a==null},y1:{value:o,scale:`y`,optional:s==null},x2:{value:a,scale:`x`,optional:i==null},y2:{value:s,scale:`y`,optional:o==null},title:{value:C,optional:!0}},t,qW),this.anchor=Az(c,`anchor`),this.preferredAnchor=Az(l,`preferredAnchor`),this.frameAnchor=jz(v),this.textAnchor=bH(b,`middle`),this.textPadding=+S,this.pointerSize=+w,this.pathFilter=zR(T),this.lineHeight=+g,this.lineWidth=+_,this.textOverflow=hU(x),this.monospace=!!u,this.fontFamily=zR(d),this.fontSize=BR(f),this.fontStyle=zR(p),this.fontVariant=zR(m),this.fontWeight=zR(h);for(let e in qW)e in this.channels&&(this[e]=qW[e]);this.splitLines=CU(this),this.clipLine=wU(this),this.format=typeof y==`string`||typeof y==`function`?{title:y}:{...y}}render(e,t,n,r,i){let a=this,{x:o,y:s,fx:c,fy:l}=t,{ownerSVGElement:u,document:d}=i,{anchor:f,monospace:p,lineHeight:m,lineWidth:h}=this,{textPadding:g,pointerSize:_,pathFilter:v}=this,{marginTop:y,marginLeft:b}=r,{x1:x,y1:S,x2:C,y2:w,x:T=x??C,y:E=S??w}=n,D=c?c(e.fx)-b:0,O=l?l(e.fy)-y:0,[k,A]=wH(this,r),j=FH(n,k),M=IH(n,A),N=p?SU:xU,P=N(`â¦`),F,ee;`title`in n?(F=XW.call(this,{title:n.channels.title},t),ee=BBe):(F=XW.call(this,n.channels,t),ee=VBe);let te=tH(`svg:g`,i).call(hH,this,r,i).call(yU,this).call(yH,this,{x:T&&o,y:E&&s}).call(r=>r.selectAll().data(e).enter().append(`g`).attr(`transform`,e=>`translate(${Math.round(j(e))},${Math.round(M(e))})`).call(gH,this).call(e=>e.append(`path`).attr(`filter`,v)).call(r=>r.append(`text`).each(function(r){let i=Fx(this);this.setAttribute(`fill`,`currentColor`),this.setAttribute(`fill-opacity`,1),this.setAttribute(`stroke`,`none`);let o=ee.call(a,r,e,F,t,n);if(typeof o==`string`)for(let e of a.splitLines(o))ne(i,{value:a.clipLine(e)});else{let e=new Set;for(let t of o){let{label:n=``}=t;n&&e.has(n)||(e.add(n),ne(i,t))}}})));function ne(e,{label:t,value:n,color:r,opacity:i}){t??=``,n??=``;let a=r!=null||i!=null,o,s=h*100,[c]=TU(t,s,N,P);if(c>=0)t=t.slice(0,c).trimEnd()+`â¦`,o=n.trim(),n=``;else{(t||!n&&!a)&&(n=` `+n);let[e]=TU(n,s-N(t),N,P);e>=0&&(o=n.trim(),n=n.slice(0,e).trimEnd()+`â¦`)}let l=e.append(`tspan`).attr(`x`,0).attr(`dy`,`${m}em`).text(`â`);t&&l.append(`tspan`).attr(`font-weight`,`bold`).text(t),n&&l.append(()=>d.createTextNode(n)),a&&l.append(`tspan`).text(` â `).attr(`fill`,r).attr(`fill-opacity`,i).style(`user-select`,`none`),o&&l.append(`title`).text(o)}function I(){let{width:e,height:t}=r.facet??r;te.selectChildren().each(function(n){let{x:r,width:i,height:o}=this.getBBox();i=Math.round(i),o=Math.round(o);let s=f;if(s===void 0){let r=j(n)+D,c=M(n)+O,l=r+i+_+g*2<e,u=r-i-_-g*2>0,d=c+o+_+g*2<t,f=c-o-_-g*2>0;s=l&&u?d&&f?a.preferredAnchor:f?`bottom`:`top`:d&&f?l?`left`:`right`:(l||u)&&(d||f)?`${f?`bottom`:`top`}-${l?`left`:`right`}`:a.preferredAnchor}let c=this.firstChild,l=this.lastChild;if(c.setAttribute(`d`,zBe(s,_,g,i,o)),r)for(let e of l.childNodes)e.setAttribute(`x`,-r);l.setAttribute(`y`,`${+LBe(s,l.childNodes.length,m).toFixed(6)}em`),l.setAttribute(`transform`,`translate(${RBe(s,_,g,i,o)})`)}),te.attr(`visibility`,null)}return e.length&&(te.attr(`visibility`,`hidden`),u.isConnected?Promise.resolve().then(I):typeof requestAnimationFrame<`u`&&requestAnimationFrame(I)),te.node()}};function YW(e,{x:t,y:n,...r}={}){return r.frameAnchor===void 0&&([t,n]=az(t,n)),new JW(e,{...r,x:t,y:n})}
162function LBe(e,t,n){return/^top(?:-|$)/.test(e)?.94-n:-.29-t*n}function RBe(e,t,n,r,i){switch(e){case`middle`:return[-r/2,i/2];case`top-left`:return[n,t+n];case`top`:return[-r/2,t/2+n];case`top-right`:return[-r-n,t+n];case`right`:return[-t/2-r-n,i/2];case`bottom-left`:return[n,-t-n];case`bottom`:return[-r/2,-t/2-n];case`bottom-right`:return[-r-n,-t-n];case`left`:return[n+t/2,i/2]}}function zBe(e,t,n,r,i){let a=r+n*2,o=i+n*2;switch(e){case`middle`:return`M${-a/2},${-o/2}h${a}v${o}h${-a}z`;case`top-left`:return`M0,0l${t},${t}h${a-t}v${o}h${-a}z`;case`top`:return`M0,0l${t/2},${t/2}h${(a-t)/2}v${o}h${-a}v${-o}h${(a-t)/2}z`;case`top-right`:return`M0,0l${-t},${t}h${t-a}v${o}h${a}z`;case`right`:return`M0,0l${-t/2},${-t/2}v${t/2-o/2}h${-a}v${o}h${a}v${t/2-o/2}z`;case`bottom-left`:return`M0,0l${t},${-t}h${a-t}v${-o}h${-a}z`;case`bottom`:return`M0,0l${t/2},${-t/2}h${(a-t)/2}v${-o}h${-a}v${o}h${(a-t)/2}z`;case`bottom-right`:return`M0,0l${-t},${-t}h${t-a}v${-o}h${a}z`;case`left`:return`M0,0l${t/2},${-t/2}v${t/2-o/2}h${a}v${o}h${-a}v${t/2-o/2}z`}}function XW(e,t){let n={},r=this.format;r=ZW(r,e,`x`),r=ZW(r,e,`y`),this.format=r;for(let t in r){let i=r[t];if(!(i===null||i===!1))if(t===`fx`||t===`fy`)n[t]=!0;else{let r=NB(e,t);r&&(n[t]=r)}}for(let t in e){if(t in n||t in r||IBe.has(t)||(t===`x`||t===`y`)&&e.geometry)continue;let i=NB(e,t);if(i){if(i.scale==null&&i.defaultScale===`color`)continue;n[t]=i}}this.facet&&(t.fx&&!(`fx`in r)&&(n.fx=!0),t.fy&&!(`fy`in r)&&(n.fy=!0));for(let e in n){let r=this.format[e];if(typeof r==`string`){let i=n[e]?.value??t[e]?.domain()??[];this.format[e]=(wz(i)?ub:gy)(r)}else if(r===void 0||r===!0){let n=t[e];this.format[e]=n?.bandwidth?lW(n,n.domain()):oH}}return n}function ZW(e,t,n){if(!(n in e))return e;let r=`${n}1`,i=`${n}2`;if((r in e||!(r in t))&&(i in e||!(i in t)))return e;let a=Object.entries(e),o=e[n];return a.splice(a.findIndex(([e])=>e===n)+1,0,[r,o],[i,o]),Object.fromEntries(a)}function BBe(e,t,{title:n}){return this.format.title(n.value[e],e)}function*VBe(e,t,n,r,i){for(let a in n){if(a===`fx`||a===`fy`){yield{label:eG(r,n,a),value:this.format[a](t[a],e)};continue}if(a===`x1`&&`x2`in n||a===`y1`&&`y2`in n)continue;let o=n[a];if(a===`x2`&&`x1`in n)yield{label:$W(r,n,`x`),value:QW(this.format.x2,n.x1,o,e)};else if(a===`y2`&&`y1`in n)yield{label:$W(r,n,`y`),value:QW(this.format.y2,n.y1,o,e)};else{let t=o.value[e],s=o.scale;if(!rR(t)&&s==null)continue;yield{label:eG(r,n,a),value:this.format[a](t,e),color:s===`color`?i[a][e]:null,opacity:s===`opacity`?i[a][e]:null}}}}function QW(e,t,n,r){return n.hint?.length?`${e(n.value[r]-t.value[r],r)}`:`${e(t.value[r],r)}â${e(n.value[r],r)}`}function $W(e,t,n){let r=eG(e,t,`${n}1`,n),i=eG(e,t,`${n}2`,n);return r===i?r:`${r}â${i}`}function eG(e,t,n,r=n){let i=t[n],a=e[i?.scale??n];return String(a?.label??i?.label??r)}function tG(e={}){let{facet:t,style:n,title:r,subtitle:i,caption:a,ariaLabel:o,ariaDescription:s}=e,c=SH(e.className),l=e.marks===void 0?[]:rG(e.marks);l.push(...JBe(l));let u=KBe(t,e),d=new Map;for(let t of l){let n=cG(t,u,e);n&&d.set(t,n)}let f=new Map;u&&oG(f,[u],e),oG(f,d,e);let p=rG(YBe(l,f,e));for(let t of p){let n=cG(t,u,e);n&&d.set(t,n)}l.unshift(...p);let m=HRe(f,e);if(m!==void 0){let e=u?WV(m,u):void 0;for(let t of l){if(t.facet===null||t.facet===`super`)continue;let n=d.get(t);n!==void 0&&(n.facetsIndex=t.fx!=null||t.fy!=null?WV(m,n):e)}let t=new Set;for(let{facetsIndex:e}of d.values())e?.forEach((e,n)=>{e?.length>0&&t.add(n)});m.forEach(0<t.size&&t.size<m.length?(e,n)=>e.empty=!t.has(n):e=>e.empty=!1);for(let e of l)if(e.facet===`exclude`){let t=d.get(e);t!==void 0&&(t.facetsIndex=GRe(t.facetsIndex))}}for(let t of zz.keys())nz(e[t])&&t!==`fx`&&t!==`fy`&&f.set(t,[]);let h=new Map;for(let t of l){if(h.has(t))throw Error(`duplicate mark; each mark must be unique`);let{facetsIndex:n,channels:r}=d.get(t)??{},{data:i,facets:a,channels:o}=t.initialize(n,r,e);iG(o,e),h.set(t,{data:i,facets:a,channels:o})}let g=pV(oG(f,h,e),e),_=Mze(g,l,e);FRe(g,_);let v=mV(g),{fx:y,fy:b}=v,x=y||b?_V(g,_):_,S=y||b?nVe(v,_):_,C=eH(e),w=C.document,T=_x(`svg`).call(w.documentElement),E=T;C.ownerSVGElement=T,C.className=c,C.projection=eze(e,x),C.path=function(){return ST(this.projection??oze(v))},C.filterFacets=(e,t)=>
162WV(m,{channels:t,groups:PV(e,t)}),C.getMarkState=e=>{let t=h.get(e),n=d.get(e);return{...t,channels:{...t.channels,...n?.channels}}},C.dispatchValue=e=>{E.value!==e&&(E.value=e,E.dispatchEvent(new C.document.defaultView.Event(`input`,{bubbles:!0})))};let D=new Set;for(let[t,n]of h)if(t.initializer!=null){let r=t.facet===`super`?S:x,i=t.initializer(n.data,n.facets,n.channels,v,r,C);if(i.data!==void 0&&(n.data=i.data),i.facets!==void 0&&(n.facets=i.facets),i.channels!==void 0){let{fx:r,fy:a,...o}=i.channels;GBe(o),Object.assign(n.channels,o);for(let t of Object.values(o)){let{scale:n}=t;n!=null&&!ALe(zz.get(n))&&(aG(t,e),D.add(n))}(r!=null||a!=null)&&d.set(t,!0)}}if(D.size){let t=new Map;oG(t,h,e,e=>D.has(e)),oG(f,h,e,e=>D.has(e));let n=tVe(pV(t,e),g),{scales:r,...i}=mV(n);Object.assign(g,n),Object.assign(v,i),Object.assign(v.scales,r)}let O,k;m!==void 0&&(O={x:y?.domain(),y:b?.domain()},m=URe(m,O),k=WRe(y,b,_));for(let[e,t]of h)t.values=e.scale(t.channels,v,C);let{width:A,height:j}=_;Fx(T).attr(`class`,c).attr(`fill`,`currentColor`).attr(`font-family`,`system-ui, sans-serif`).attr(`font-size`,10).attr(`text-anchor`,`middle`).attr(`width`,A).attr(`height`,j).attr(`viewBox`,`0 0 ${A} ${j}`).attr(`aria-label`,o).attr(`aria-description`,s).call(e=>e.append(`style`).text(`:where(.${c}) { 163 --plot-background: white; 164 display: block; 165 height: auto; 166 height: intrinsic; 167 max-width: 100%; 168} 169:where(.${c} text), 170:where(.${c} tspan) { 171 white-space: pre; 172}`)).call(CH,n);for(let e of l){let{channels:t,values:n,facets:r}=h.get(e);if(m===void 0||e.facet===`super`){let i=null;if(r&&(i=r[0],i=e.filter(i,t,n),i.length===0))continue;let a=e.render(i,v,n,S,C);if(a==null)continue;T.appendChild(a)}else{let i;for(let a of m){if(!(e.facetAnchor?.(m,O,a)??!a.empty))continue;let o=null;if(r){let i=d.has(e);if(o=r[i?a.i:0],o=e.filter(o,t,n),o.length===0)continue;!i&&o===r[0]&&(o=dz(o)),o.fx=a.x,o.fy=a.y,o.fi=a.i}let s=e.render(o,v,n,x,C);if(s!=null){(i??=Fx(T).append(`g`)).append(()=>s).datum(a);for(let e of[`aria-label`,`aria-description`,`aria-hidden`,`transform`])s.hasAttribute(e)&&(i.attr(e,s.getAttribute(e)),s.removeAttribute(e))}}i?.selectChildren().each(k)}}let M=_Be(g,C,e),{figure:N=r!=null||i!=null||a!=null||M.length>0}=e;N&&(E=w.createElement(`figure`),E.className=`${c}-figure`,E.style.maxWidth=`initial`,r!=null&&E.append(nG(w,r,`h2`)),i!=null&&E.append(nG(w,i,`h3`)),E.append(...M,T),a!=null&&E.append(HBe(w,a)),`value`in T&&(E.value=T.value,delete T.value)),E.scale=VRe(v.scales),E.legend=mBe(g,C,e);let P=vRe();return P>0&&Fx(T).append(`text`).attr(`x`,A).attr(`y`,20).attr(`dy`,`-1em`).attr(`text-anchor`,`end`).attr(`font-family`,`initial`).text(`â ï¸`).append(`title`).text(`${P.toLocaleString(`en-US`)} warning${P===1?``:`s`}. Please check the console.`),E}function nG(e,t,n){if(t.ownerDocument)return t;let r=e.createElement(n);return r.append(t),r}function HBe(e,t){let n=e.createElement(`figcaption`);return n.append(t),n}function rG(e){return e.flat(1/0).filter(e=>e!=null).map(UBe)}function UBe(e){return typeof e.render==`function`?e:new WBe(e)}var WBe=class extends TH{constructor(e){if(typeof e!=`function`)throw TypeError(`invalid mark; missing render function`);super(),this.render=e}render(){}};function iG(e,t){for(let n in e)aG(e[n],t);return e}function aG(e,t){let{scale:n,transform:r=!0}=e;if(n==null||!r)return;let{type:i,percent:a,interval:o,transform:s=a?e=>e==null?NaN:e*100:dLe(o,i)}=t[n]??{};s!=null&&(e.value=QR(e.value,s),e.transform=!1)}function GBe(e){for(let t in e)OB(t,e[t])}function oG(e,t,n,r=tLe){for(let{channels:i}of t.values())for(let t in i){let a=i[t],{scale:o}=a;if(o!=null&&r(o))if(o===`projection`){if(!rze(n)){let t=n.x?.domain===void 0,r=n.y?.domain===void 0;if(t||r){let[n,i]=aze(a);t&&sG(e,`x`,n),r&&sG(e,`y`,i)}}}else sG(e,o,a)}return e}function sG(e,t,n){let r=e.get(t);r===void 0?e.set(t,[n]):r.push(n)}function KBe(e,t){if(e==null)return;let{x:n,y:r}=e;if(n==null&&r==null)return;let i=XR(e.data);if(i==null)throw Error(`missing facet data`);let a={};return n!=null&&(a.fx=TB(i,{value:n,scale:`fx`})),r!=null&&(a.fy=TB(i,{value:r,scale:`fy`})),iG(a,t),{channels:a,groups:PV(i,a),data:e.data}}function cG(e,t,n){if(e.facet===null||e.facet===`super`)return;let{fx:r,fy:i}=e;if(r!=null||i!=null){let t=XR(e.data??r??i);if(t===void 0)throw Error(`missing facet data in ${e.ariaLabel}`);if(t===null)return;let a={};return r!=null&&(a.fx=TB(t,{value:r,scale:`fx`})),i!=null&&(a.fy=TB(t,{value:i,scale:`fy`})),iG(a,n),{channels:a,groups:PV(t,a)}}if(t===void 0)return;let{channels:a,groups:o,data:s}=t;if(e.facet!==`auto`||e.data===s)return{channels:a,groups:o};s.length>0&&(o.size>1||o.size===1&&a.fx&&a.fy&&[...o][0][1].size>1)&&sz(XR(e.data))===sz(s)&&iV(`Warning: the ${e.ariaLabel} mark appears to use faceted data, but isnât faceted. The mark data has the same length as the facet data and the mark facet option is "auto", but the mark data and facet data are distinct. If this mark should be faceted, set the mark facet option to true; otherwise, suppress this warning by setting the mark facet option to fal
172se.`)}function qBe(e,t={}){return Kz({...t,x:null,y:null},(t,n,r,i,a,o)=>o.getMarkState(e))}function JBe(e){let t=[];for(let n of e){let e=n.tip;if(e){e===!0?e={}:typeof e==`string`&&(e={pointer:e});let{pointer:r,preferredAnchor:i}=e;r=/^x$/i.test(r)?NH:/^y$/i.test(r)?PH:MH,e=r(qBe(n,e)),e.title=null,i===void 0&&(e.preferredAnchor=r===PH?`left`:`bottom`);let a=YW(n.data,e);a.facet=n.facet,a.facetAnchor=n.facetAnchor,t.push(a)}}return t}function YBe(e,t,n){let{projection:r,x:i={},y:a={},fx:o={},fy:s={},axis:c,grid:l,facet:u={},facet:{axis:d=c,grid:f}=u,x:{axis:p=c,grid:m=p===null?null:l}=i,y:{axis:h=c,grid:g=h===null?null:l}=a,fx:{axis:_=d,grid:v=_===null?null:f}=o,fy:{axis:y=d,grid:b=y===null?null:f}=s}=n;(r||!nz(i)&&!fG(`x`,e))&&(p=m=null),(r||!nz(a)&&!fG(`y`,e))&&(h=g=null),t.has(`fx`)||(_=v=null),t.has(`fy`)||(y=b=null),p===void 0&&(p=!dG(e,`x`)),h===void 0&&(h=!dG(e,`y`)),_===void 0&&(_=!dG(e,`fx`)),y===void 0&&(y=!dG(e,`fy`)),p===!0&&(p=`bottom`),h===!0&&(h=`left`),_===!0&&(_=p===`top`||p===null?`bottom`:`top`),y===!0&&(y=h===`right`||h===null?`left`:`right`);let x=[];return uG(x,b,eW,s),lG(x,y,JU,`right`,`left`,u,s),uG(x,v,nW,o),lG(x,_,XU,`top`,`bottom`,u,o),uG(x,g,$U,a),lG(x,h,qU,`left`,`right`,n,a),uG(x,m,tW,i),lG(x,p,YU,`bottom`,`top`,n,i),x}function lG(e,t,n,r,i,a,o){if(!t)return;let s=XBe(t);o=ZBe(s?r:t,a,o);let{line:c}=o;(n===qU||n===YU)&&c&&!kz(c)&&e.push(KW(QBe(o))),e.push(n(o)),s&&e.push(n({...o,anchor:i,label:null}))}function uG(e,t,n,r){!t||kz(t)||e.push(n($Be(t,r)))}function XBe(e){return/^\s*both\s*$/i.test(e)}function ZBe(e,t,{line:n=t.line,ticks:r,tickSize:i,tickSpacing:a,tickPadding:o,tickFormat:s,tickRotate:c,fontVariant:l,ariaLabel:u,ariaDescription:d,label:f=t.label,labelAnchor:p,labelArrow:m=t.labelArrow,labelOffset:h}){return{anchor:e,line:n,ticks:r,tickSize:i,tickSpacing:a,tickPadding:o,tickFormat:s,tickRotate:c,fontVariant:l,ariaLabel:u,ariaDescription:d,label:f,labelAnchor:p,labelArrow:m,labelOffset:h}}function QBe(e){let{anchor:t,line:n}=e;return{anchor:t,facetAnchor:t+`-empty`,stroke:n===!0?void 0:n}}function $Be(e,{stroke:t=Dz(e)?e:void 0,ticks:n=eVe(e)?e:void 0,tickSpacing:r,ariaLabel:i,ariaDescription:a}){return{stroke:t,ticks:n,tickSpacing:r,ariaLabel:i,ariaDescription:a}}function eVe(e){switch(typeof e){case`number`:return!0;case`string`:return!Dz(e)}return Sz(e)||typeof e?.range==`function`}function dG(e,t){let n=`${t}-axis `;return e.some(e=>e.ariaLabel?.startsWith(n))}function fG(e,t){for(let n of t)for(let t in n.channels){let{scale:r}=n.channels[t];if(r===e||r===`projection`)return!0}return!1}function tVe(e,t){for(let n in e){let r=e[n],i=t[n];r.label===void 0&&i&&(r.label=i.label)}return e}function nVe({fx:e,fy:t},n){let{marginTop:r,marginRight:i,marginBottom:a,marginLeft:o,width:s,height:c}=gV(n),l=e&&pG(e),u=t&&pG(t);return{marginTop:t?u[0]:r,marginRight:e?s-l[1]:i,marginBottom:t?c-u[1]:a,marginLeft:e?l[0]:o,inset:{marginTop:n.marginTop,marginRight:n.marginRight,marginBottom:n.marginBottom,marginLeft:n.marginLeft},width:s,height:c}}function pG(e){let t=e.domain();if(t.length===0)return[0,e.bandwidth()];let n=e(t[0]),r=e(t[t.length-1]);return r<n&&([n,r]=[r,n]),[n,r+e.bandwidth()]}var rVe=new Map([[`basis`,Xwe],[`basis-closed`,Qwe],[`basis-open`,eTe],[`bundle`,nTe],[`bump-x`,Twe],[`bump-y`,Ewe],[`cardinal`,rTe],[`cardinal-closed`,iTe],[`cardinal-open`,aTe],[`catmull-rom`,sTe],[`catmull-rom-closed`,lTe],[`catmull-rom-open`,dTe],[`linear`,FE],[`linear-closed`,pTe],[`monotone-x`,yTe],[`monotone-y`,bTe],[`natural`,CTe],[`step`,wTe],[`step-after`,ETe],[`step-before`,TTe]]);function mG(e=FE,t){if(typeof e==`function`)return e;let n=rVe.get(`${e}`.toLowerCase());if(!n)throw Error(`unknown curve: ${e}`);if(t!==void 0){if(`beta`in n)return n.beta(t);if(`tension`in n)return n.tension(t);if(`alpha`in n)return n.alpha(t)}return n}function hG(e=gG,t){return typeof e!=`function`&&`${e}`.toLowerCase()===`auto`?gG:mG(e,t)}function gG(e){return FE(e)}function _G(e={y:`count`},t={}){[e,t]=wG(e,t);let{x:n,y:r}=t;return CG(TG(n,t,LR),null,null,r,e,JH(t))}function vG(e={x:`count`},t={}){[e,t]=wG(e,t);let{x:n,y:r}=t;return CG(null,TG(r,t,LR),n,null,e,YH(t))}function yG(e={fill:`count`},t={}){[e,t]=wG(e,t);let{x:n,y:r}=iVe(t);return CG(n,r,null,null,e,JH(YH(t)))}function bG(e,t,n={}){if(n?.interval==null)return n;let{reduce:r=xB}=n,i={filter:null};return n[t]!=null&&(i[t]=r),n[`${t}1`]!=null&&(i[`${t}1`]=r),n[`${t}2`]!=null&&(i[`${t}2`]=r),e(i,n)}function xG(e={}){return bG(_G,`y`,OH(e,`x`))}function SG(e={}){return bG(vG,`x`,OH(e,`y`))}function CG(e,t,n,r,{data:i=bB,filter:a=SB,sort:o,reverse:s,...c}={},l={}){e=EG(e),t=EG(t),c=aVe(c,l),i=AG(i,LR),o=o==null?void 0:OG(`sort`,o,l),a=a==null?void 0:kG(`filter`,a,l),n!=null&&oB(c,`x`,`x1`,`x2`)&&(n=null),r!=null&&oB(c,`y`,`y1`,`y2`)&&(r=null);let[u,d]=mz(e),[f,p]=mz(e),[m,h]=mz(t),[g,_]=mz(t),[v,y]=n==null?r==null?[]:[r,`y`]:[n,`x`],[b,x]=mz(v),{x:S,y:C,z:w,fill:T,stroke:E,x1:D,x2:O,y1:k,y2:A,domain:j,cumulative:M,thresholds:N,interval:P,...F}=l,[ee,te]=mz(w),[ne]=qR(T),[I]=qR(E),[re,ie]=mz(ne),[ae,oe]=mz(I);return{...`z`in l&&{z:ee||w},...`fill`in l&&{fill:re||T},...`stroke`in l&&{stroke:ae||E},...Gz(F,(n,r,l)=>{let u=_z(MR(n,v),l?.[y]),f=MR(n,w),m=MR(n,ne),g=MR(n,I),b=gB(c,{z:f,fill:m,stroke:g}),S=[],C=[],T=u&&x([]),E=f&&te([]),D=m&&ie([]),O=g&&oe([]),k=e&&d([]),A=e&&p([]),j=t&&h([]),M=t&&_([]),N=cVe(e,t,n),P=0;for(let e of c)e.initialize(n);o&&o.initialize(n),a&&a.initialize(n);for(let e of r){let t=[];for(let t of c)t.scope(`facet`,e);o&&o.scope(`facet`,e),a&&a.scope(`facet`,e);for(let[r,s]of uB(e,b))for(let[e,l]of uB(s,u))for(let[s,d]of N(l))if(b&&(d.z=r),!(a&&!a.reduce(s,d))){t.push(P++),C.push(i.reduceIndex(s,n,d)),u&&T.push(e),f&&E.push(b===f?r:f[(s.length>0?s:l)[0]]),m&&D.push(b===m?r:m[(s.length>0?s:l)[0]]),g&&O.push(b===g?r:g[(s.length>0?s:l)[0]]),k&&(k.push(d.x1),A.push(d.x2)),j&&(j.push(d.y1),M.push(d.y2));for(let e of c)e.reduce(s,d);o&&o.reduce(s,d)}S.push(t)}return _B(S,o,s),{data:C,facets:S}}),...!oB(c,`x`)&&(u?{x1:u,x2:f,x:gz(u,f)}:{x:S,x1:D,x2:O}),...!oB(c,`y`)&&(m?{y1:m,y2:g,y:gz(m,g)}:{y:C,y1:k,y2:A}),...b&&{[y]:b},...Object.fromEntries(c.map(({name:e,output:t})=>[e,t]))}}function wG({cumulative:e,domain:t,thresholds:n,interval:r,...i},a){return[i,{cumulative:e,domain:t,thresholds:n,interval:r,...a}]}function TG(e,{cumulative:t,domain:n,thresholds:r,interval:i},a){return e={...xz(e)},e.domain===void 0&&(e.domain=n),e.cumulative===void 0&&(e.cumulative=t),e.thresholds===void 0&&(e.thresholds=r),e.interval===void 0&&(e.interval=i),e.value===void 0&&(e.value=a),e.thresholds=DG(e.thresholds,e.interval),e}function iVe(e){let{x:t,y:n}=e;return t=TG(t,e),n=TG(n,e),[t.value,n.value]=az(t.value,n.value),{x:t,y:n}}function EG(e){if(e==null)return;let{value:t,cumulative:n,domain:r=Fg,thresholds:i}=e,a=e=>{let a=MR(e,t),o;if(wz(a)||sVe(i)){a=QR(a,iLe,Float64Array);let[e,t]=typeof r==`function`?r(a):r,n=typeof i==`function`&&!bz(i)?i(a,e,t):i;
172typeof n==`number`&&(n=upe(e,t,n)),bz(n)&&(r===Fg&&(e=n.floor(e),t=n.offset(n.floor(t))),n=n.range(e,n.offset(t))),o=n}else{a=GR(a);let[e,t]=typeof r==`function`?r(a):r,n=typeof i==`function`&&!bz(i)?i(a,e,t):i;if(typeof n==`number`)if(r===Fg){let r=Qg(e,t,n);if(isFinite(r))if(r>0){let i=Math.round(e/r),a=Math.round(t/r);i*r<=e||--i,a*r>t||++a;let o=a-i+1;n=new Float64Array(o);for(let e=0;e<o;++e)n[e]=(i+e)*r}else if(r<0){r=-r;let i=Math.round(e*r),a=Math.round(t*r);i/r<=e||--i,a/r>t||++a;let o=a-i+1;n=new Float64Array(o);for(let e=0;e<o;++e)n[e]=(i+e)/r}else n=[e];else n=[e]}else n=Zg(e,t,n);else bz(n)&&(r===Fg&&(e=n.floor(e),t=n.offset(n.floor(t))),n=n.range(e,n.offset(t)));o=n}let s=[];if(o.length===1)s.push([o[0],o[0]]);else for(let e=1;e<o.length;++e)s.push([o[e-1],o[e]]);return s.bin=(n<0?uVe:n>0?lVe:MG)(s,o,a),s};return a.label=hz(t),a}function DG(e,t,n=jG){if(e===void 0)return t===void 0?n:yz(t);if(typeof e==`string`){switch(e.toLowerCase()){case`freedman-diaconis`:return Pde;case`scott`:return c_;case`sturges`:return t_;case`auto`:return jG}return OR(e)}return e}function aVe(e,t){return sB(e,t,OG)}function OG(e,t,n){return cB(e,t,n,kG)}function kG(e,t,n){return lB(e,t,n,AG)}function AG(e,t){return dB(e,t,oVe)}function oVe(e){switch(`${e}`.toLowerCase()){case`x`:return dVe;case`x1`:return pVe;case`x2`:return mVe;case`y`:return fVe;case`y1`:return hVe;case`y2`:return gVe;case`z`:return wB}throw Error(`invalid bin reduce: ${e}`)}function jG(e,t,n){return Math.min(200,c_(e,t,n))}function sVe(e){return mLe(e)||Sz(e)&&wz(e)}function cVe(e,t,n){let r=e?.(n),i=t?.(n);return r&&i?function*(e){let t=r.bin(e);for(let[e,[a,o]]of r.entries()){let r=i.bin(t[e]);for(let[e,[t,s]]of i.entries())yield[r[e],{data:n,x1:a,y1:t,x2:o,y2:s}]}}:r?function*(e){let t=r.bin(e);for(let[e,[i,a]]of r.entries())yield[t[e],{data:n,x1:i,x2:a}]}:function*(e){let t=i.bin(e);for(let[e,[r,a]]of i.entries())yield[t[e],{data:n,y1:r,y2:a}]}}function MG(e,t,n){return t=GR(t),r=>{let i=e.map(()=>[]);for(let e of r)i[Eg(t,n[e])-1]?.push(e);return i}}function lVe(e,t,n){let r=MG(e,t,n);return e=>{let t=r(e);for(let e=1,n=t.length;e<n;++e){let n=t[e-1],r=t[e];for(let e of n)r.push(e)}return t}}function uVe(e,t,n){let r=MG(e,t,n);return e=>{let t=r(e);for(let e=t.length-2;e>=0;--e){let n=t[e+1],r=t[e];for(let e of n)r.push(e)}return t}}function NG(e,t){let n=(+e+ +t)/2;return e instanceof Date?new Date(n):n}var dVe={reduceIndex(e,t,{x1:n,x2:r}){return NG(n,r)}},fVe={reduceIndex(e,t,{y1:n,y2:r}){return NG(n,r)}},pVe={reduceIndex(e,t,{x1:n}){return n}},mVe={reduceIndex(e,t,{x2:n}){return n}},hVe={reduceIndex(e,t,{y1:n}){return n}},gVe={reduceIndex(e,t,{y2:n}){return n}},_Ve={ariaLabel:`area`,strokeWidth:1,strokeLinecap:`round`,strokeLinejoin:`round`,strokeMiterlimit:1},PG=class extends TH{constructor(e,t={}){let{x1:n,y1:r,x2:i,y2:a,z:o,curve:s,tension:c}=t;super(e,{x1:{value:n,scale:`x`},y1:{value:r,scale:`y`},x2:{value:i,scale:`x`,optional:!0},y2:{value:a,scale:`y`,optional:!0},z:{value:oz(t),optional:!0}},t,_Ve),this.z=o,this.curve=mG(s,c)}filter(e){return e}render(e,t,n,r,i){let{x1:a,y1:o,x2:s=a,y2:c=o}=n;return tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,t,0,0).call(t=>t.selectAll().data(pH(e,[a,o,s,c],this,n)).enter().append(`path`).call(gH,this).call(dH,this,n).attr(`d`,IE().curve(this.curve).defined(e=>e>=0).x0(e=>a[e]).y0(e=>o[e]).x1(e=>s[e]).y1(e=>c[e]))).node()}};function FG(e,t){return t===void 0?LG(e,{x:VR,y:HR}):new PG(e,t)}function IG(e,t){let{y:n=IR,...r}=SG(t);return new PG(e,TW(bW({...r,y1:n,y2:void 0},n===IR?`x2`:`x`)))}function LG(e,t){let{x:n=IR,...r}=xG(t);return new PG(e,EW(xW({...r,x1:n,x2:void 0},n===IR?`y2`:`y`)))}var vVe={ariaLabel:`link`,fill:`none`,stroke:`currentColor`,strokeMiterlimit:1},RG=class extends TH{constructor(e,t={}){let{x1:n,y1:r,x2:i,y2:a,curve:o,tension:s}=t;super(e,{x1:{value:n,scale:`x`},y1:{value:r,scale:`y`},x2:{value:i,scale:`x`,optional:!0},y2:{value:a,scale:`y`,optional:!0}},t,vVe),this.curve=hG(o,s),zH(this,t)}project(e,t,n){this.curve!==gG&&super.project(e,t,n)}render(e,t,n,r,i){let{x1:a,y1:o,x2:s=a,y2:c=o}=n,{curve:l}=this;return tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,t).call(t=>t.selectAll().data(e).enter().append(`path`).call(gH,this).attr(`d`,l===gG&&i.projection?yVe(i.path(),a,o,s,c):e=>{let t=_E(),n=l(t);return n.lineStart(),n.point(a[e],o[e]),n.point(s[e],c[e]),n.lineEnd(),t}).call(uH,this,n).call(WH,this,n,i)).node()}};function yVe(e,t,n,r,i){return t=GR(t),n=GR(n),r=GR(r),i=GR(i),a=>e({type:`LineString`,coordinates:[[t[a],n[a]],[r[a],i[a]]]})}function zG(e,{x:t,x1:n,x2:r,y:i,y1:a,y2:o,...s}={}){return[n,r]=BG(t,n,r),[a,o]=BG(i,a,o),new RG(e,{...s,x1:n,x2:r,y1:a,y2:o})}function BG(e,t,n){if(e===void 0){if(t===void 0){if(n!==void 0)return[n]}else if(n===void 0)return[t]}else if(t===void 0)return n===void 0?[e]:[e,n];else if(n===void 0)return[e,t];return[t,n]}var bVe={ariaLabel:`arrow`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeMiterlimit:1,strokeWidth:1.5},VG=class extends TH{constructor(e,t={}){let{x1:n,y1:r,x2:i,y2:a,bend:o=0,headAngle:s=60,headLength:c=8,inset:l=0,insetStart:u=l,insetEnd:d=l,sweep:f}=t;super(e,{x1:{value:n,scale:`x`},y1:{value:r,scale:`y`},x2:{value:i,scale:`x`,optional:!0},y2:{value:a,scale:`y`,optional:!0}},t,bVe),this.bend=o===!0?22.5:Math.max(-90,Math.min(90,o)),this.headAngle=+s,this.headLength=+c,this.insetStart=+u,this.insetEnd=+d,this.sweep=xVe(f)}render(e,t,n,r,i){let{x1:a,y1:o,x2:s=a,y2:c=o,SW:l}=n,{strokeWidth:u,bend:d,headAngle:f,headLength:p,insetStart:m,insetEnd:h}=this,g=l?e=>l[e]:UR(u===void 0?1:u),_=f*RH/2,v=p/1.5;return tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,t).call(t=>t.selectAll().data(e).enter().append(`path`).call(gH,this).attr(`d`,e=>{let t=a[e],n=o[e],r=s[e],i=c[e],l=Math.hypot(r-t,i-n);if(l<=m+h)return null;let u=Math.atan2(i-n,r-t),f=Math.min(v*g(e),l/3),p=this.sweep(t,n,r,i)*d*RH,y=Math.hypot(l/Math.tan(p),l)/2;if(m||h)if(y<1e5){let e=Math.sign(p),[a,o]=SVe([t,n],[r,i],y,e);if(m&&([t,n]=HG([a,o,y],[t,n,m],-e*Math.sign(m))),h){let[t,n]=HG([a,o,y],[r,i,h],e*Math.sign(h));u+=Math.atan2(n-o,t-a)-Math.atan2(i-o,r-a),r=t,i=n}}else{let e=r-t,a=i-n,o=Math.hypot(e,a);m&&(t+=e/o*m,n+=a/o*m),h&&(r-=e/o*h,i-=a/o*h)}let b=u+p,x=b+_,S=b-_,C=r-f*Math.cos(x),w=i-f*Math.sin(x),T=r-f*Math.cos(S),E=i-f*Math.sin(S),D=y<1e5?`A${y},${y} 0,0,${+(p>0)} `:`L`,O=f?`M${C},${w}L${r},${i}L${T},${E}`:``;return`M${t},${n}${D}${r},${i}${O}`}).call(uH,this,n)).node()}};function xVe(e=1){if(typeof e==`number`)return UR(Math.sign(e));if(typeof e==`function`)return(t,n,r,i)=>Math.sign(e(t,n,r,i));switch(YR(e,`sweep`,[`+x`,`-x`,`+y`,`-y`])){case`+x`:return(e,t,n)=>xg(e,n);case`-x`:return(e,t,n)=>Sg(e,n);case`+y`:return(e,t,n,r)=>xg(t,r);case`-y`:return(e,t,n,r)=>Sg(t,r)}}function SVe([e,t],[n,r],i,a){let o=n-e,s=r-t,c=Math.hypot(o,s),l=a*Math.sqrt(i*i-c*c/4)/c;return[(e+n)/2-s*l,(t+r)/2+o*l]}function HG([e,t,n],[r,i,a],o){let s=r-e,c=i-t,l=Math.hypot(s,c),u=(s*s+c*c-a*a+n*n)/(2*l),d=o*Math.sqrt(n*n-u*u);return[e+(s*u+c*d)/l,t+(c*u-s*d)/l]}function CVe(e,{x:t,x1:n,x2:r,y:i,y1:a,y2:o,...s}={}){return[n,r]=BG(t,n,r),[a,o]=BG(i,a,o),new VG(e,{...s,x1:n,x2:r,y1:a,y2:o})}var wVe={ariaLabel:`bar`},UG=class extends TH{constructor(e,t,n={},r=wVe){super(e,t,n,r),LW(this,n),RW(this,n)}render(e,t,n,r,i){let{rx:a,ry:o,rx1y1:s,rx1y2:c,rx2y1:l,rx2y2:u}=this,d=this._x(t,n,r),f=this._y(t,n,r),p=this._width(t,n,r),m=this._height(t,n,r);return tH(`svg:g`,i).call(hH,this,r,i).call(this._transform,this,t).call(t=>t.selectAll().data(e).enter().call(s||c||l||u?e=>e.append(`path`).call(gH,this).call(zW,d,f,WG(d,p),WG(f,m),this).call(uH,this,n):e=>e.append(`rect`).call(gH,this).attr(`x`,d).attr(`width`,p).attr(`y`,f).attr(`height`,m).call(vH,`rx`,a).call(vH,`ry`,o).call(uH,this,n))).node()}_x(e,{x:t},{marginLeft:n}){let{insetLeft:r}=this;return t?e=>t[e]+r:n+r}_y(e,{y:t},{marginTop:n}){let{insetTop:r}=this;return t?e=>t[e]+r:n+r}_width({x:e},{x:t},{marginRight:n,marginLeft:r,width:i}){let{insetLeft:a,insetRight:o}=this,s=t&&e?e.bandwidth():i-n-r;return Math.max(0,s-a-o)}_height({y:e},{y:t},{marginTop:n,marginBottom:r,height:i}){let{insetTop:a,insetBottom:o}=this,s=t&&e?e.bandwidth():i-n-r;return Math.max(0,s-a-o)}};function WG(e,t){return typeof e==`function`&&typeof t==`function`?n=>e(n)+t(n):typeof e==`function`?n=>e(n)+t:typeof t==`function`?n=>e+t(n):e+t}var GG=class extends UG{constructor(e,t={},n){let{x1:r,x2:i,y:a}=t;super(e,{x1:{value:r,scale:`x`},x2:{value:i,scale:`x`},y:{value:a,scale:`y`,type:`band`,optional:!0}},t,n)}_transform(e,t,{x:n}){e.call(yH,t,{x:n},0,0)}_x({x:e},{x1:t,x2:n},{marginLeft:r}){let{insetLeft:i}=this;return AV(e)?r+i:e=>Math.min(t[e],n[e])+i}_width({x:e},{x1:t,x2:n},{marginRight:r,marginLeft:i,width:a}){let{insetLeft:o,insetRight:s}=this;return AV(e)?a-r-i-o-s:e=>Math.max(0,Math.abs(n[e]-t[e])-o-s)}},KG=class extends UG{constructor(e,t={},n){let{x:r,y1:i,y2:a}=t;super(e,{y1:{value:i,scale:`y`},y2:{value:a,scale:`y`},x:{value:r,scale:`x`,type:`band`,optional:!0}},t,n)}_transform(e,t,{y:n}
172){e.call(yH,t,{y:n},0,0)}_y({y:e},{y1:t,y2:n},{marginTop:r}){let{insetTop:i}=this;return AV(e)?r+i:e=>Math.min(t[e],n[e])+i}_height({y:e},{y1:t,y2:n},{marginTop:r,marginBottom:i,height:a}){let{insetTop:o,insetBottom:s}=this;return AV(e)?a-r-i-o-s:e=>Math.max(0,Math.abs(n[e]-t[e])-o-s)}};function qG(e,t={}){return ez(t)||(t={...t,y:IR,x2:LR}),new GG(e,TW(nU(bW(t))))}function JG(e,t={}){return ez(t)||(t={...t,x:IR,y2:LR}),new KG(e,EW(rU(xW(t))))}var TVe={ariaLabel:`cell`},YG=class extends UG{constructor(e,{x:t,y:n,...r}={}){super(e,{x:{value:t,scale:`x`,type:`band`,optional:!0},y:{value:n,scale:`y`,type:`band`,optional:!0}},r,TVe)}_transform(e,t){e.call(yH,t,{},0,0)}};function XG(e,{x:t,y:n,...r}={}){return[t,n]=az(t,n),new YG(e,{...r,x:t,y:n})}function EVe(e,{x:t=IR,fill:n,stroke:r,...i}={}){return n===void 0&&qR(r)[0]===void 0&&(n=LR),new YG(e,{...i,x:t,fill:n,stroke:r})}function DVe(e,{y:t=IR,fill:n,stroke:r,...i}={}){return n===void 0&&qR(r)[0]===void 0&&(n=LR),new YG(e,{...i,y:t,fill:n,stroke:r})}var OVe={ariaLabel:`dot`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5};function ZG(e){return e.sort===void 0&&e.reverse===void 0?Qz({channel:`-r`},e):e}var QG=class extends TH{constructor(e,t={}){let{x:n,y:r,r:i,rotate:a,symbol:o=LE,frameAnchor:s}=t,[c,l]=JR(a,0),[u,d]=NLe(o),[f,p]=JR(i,u==null?3:4.5);super(e,{x:{value:n,scale:`x`,optional:!0},y:{value:r,scale:`y`,optional:!0},r:{value:f,scale:`r`,filter:cR,optional:!0},rotate:{value:c,optional:!0},symbol:{value:u,scale:`auto`,optional:!0}},ZG(t),OVe),this.r=p,this.rotate=l,this.symbol=d,this.frameAnchor=jz(s);let{channels:m}=this,{symbol:h}=m;if(h){let{fill:e,stroke:t}=m;h.hint={fill:e?e.value===h.value?`color`:`currentColor`:this.fill??`currentColor`,stroke:t?t.value===h.value?`color`:`currentColor`:this.stroke??`none`}}}render(e,t,n,r,i){let{x:a,y:o}=t,{x:s,y:c,r:l,rotate:u,symbol:d}=n,{r:f,rotate:p,symbol:m}=this,[h,g]=wH(this,r),_=m===LE,v=l?void 0:f*f*Math.PI;return lR(f)&&(e=[]),tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,{x:s&&a,y:c&&o}).call(t=>t.selectAll().data(e).enter().append(_?`circle`:`path`).call(gH,this).call(_?e=>{e.attr(`cx`,s?e=>s[e]:h).attr(`cy`,c?e=>c[e]:g).attr(`r`,l?e=>l[e]:f)}:e=>{e.attr(`transform`,fU`translate(${s?e=>s[e]:h},${c?e=>c[e]:g})${u?e=>` rotate(${u[e]})`:p?` rotate(${p})`:``}`).attr(`d`,l&&d?e=>{let t=_E();return d[e].draw(t,l[e]*l[e]*Math.PI),t}:l?e=>{let t=_E();return m.draw(t,l[e]*l[e]*Math.PI),t}:d?e=>{let t=_E();return d[e].draw(t,v),t}:(()=>{let e=_E();return m.draw(e,v),e})())}).call(uH,this,n)).node()}};function $G(e,{x:t,y:n,...r}={}){return r.frameAnchor===void 0&&([t,n]=az(t,n)),new QG(e,{...r,x:t,y:n})}function kVe(e,{x:t=LR,...n}={}){return new QG(e,aU({...n,x:t}))}function AVe(e,{y:t=LR,...n}={}){return new QG(e,iU({...n,y:t}))}function jVe(e,t){return $G(e,{...t,symbol:`circle`})}function MVe(e,t){return $G(e,{...t,symbol:`hexagon`})}var NVe={ariaLabel:`line`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`,strokeMiterlimit:1},eK=class extends TH{constructor(e,t={}){let{x:n,y:r,z:i,curve:a,tension:o}=t;super(e,{x:{value:n,scale:`x`},y:{value:r,scale:`y`},z:{value:oz(t),optional:!0}},t,NVe),this.z=i,this.curve=hG(a,o),zH(this,t)}filter(e){return e}project(e,t,n){this.curve!==gG&&super.project(e,t,n)}render(e,t,n,r,i){let{x:a,y:o}=n,{curve:s}=this;return tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,t).call(t=>t.selectAll().data(pH(e,[a,o],this,n)).enter().append(`path`).call(gH,this).call(dH,this,n).call(Rze,this,n,i).attr(`d`,s===gG&&i.projection?PVe(i.path(),a,o):Cwe().curve(s).defined(e=>e>=0).x(e=>a[e]).y(e=>o[e]))).node()}};function PVe(e,t,n){return t=GR(t),n=GR(n),r=>{let i=[],a=[i];for(let e of r)e===-1?(i=[],a.push(i)):i.push([t[e],n[e]]);return e({type:`MultiLineString`,coordinates:a})}}function tK(e,{x:t,y:n,...r}={}){return[t,n]=az(t,n),new eK(e,{...r,x:t,y:n})}function nK(e,{x:t=LR,y:n=IR,...r}={}){return new eK(e,SG({...r,x:t,y:n}))}function rK(e,{x:t=IR,y:n=LR,...r}={}){return new eK(e,xG({...r,x:t,y:n}))}function iK(e,t){t=IVe(t);let{x:n,y:r,color:i,size:a}=t,o=oK(e,n),s=oK(e,r),c=oK(e,i),l=oK(e,a),{fx:u,fy:d,x:{value:f,reduce:p,zero:m,...h},y:{value:g,reduce:_,zero:v,...y},color:{value:b,color:x,reduce:S},size:{value:C,reduce:w},mark:T}=t;
172if(p===void 0&&(p=_==null&&f==null&&C==null&&g!=null?`count`:null),_===void 0&&(_=p==null&&g==null&&C==null&&f!=null?`count`:null),w===void 0&&C==null&&S==null&&p==null&&_==null&&(f==null||Cz(o))&&(g==null||Cz(s))&&(w=`count`),m===void 0&&(m=cK(p)?!0:void 0),v===void 0&&(v=cK(_)?!0:void 0),f==null&&g==null)throw Error(`must specify x or y`);if(p!=null&&g==null)throw Error(`reducing x requires y`);if(_!=null&&f==null)throw Error(`reducing y requires x`);T===void 0&&(T=C!=null||w!=null?`dot`:cK(p)||cK(_)||S!=null?`bar`:f!=null&&g!=null?Cz(o)||Cz(s)||p==null&&_==null&&!aK(o)&&!aK(s)?`dot`:`line`:f!=null||g!=null?`rule`:null);let E,D,O;switch(T){case`dot`:O=$G,D=`stroke`;break;case`line`:O=o&&s||p!=null||_!=null?v||_!=null||o&&aK(o)?rK:m||p!=null||s&&aK(s)?nK:tK:o?nK:rK,D=`stroke`,uK(c)&&(E=null);break;case`area`:O=!(v||_!=null)&&(m||p!=null||s&&aK(s))?IG:LG,D=`fill`,uK(c)&&(E=null);break;case`rule`:O=o?lU:uU,D=`stroke`;break;case`bar`:O=p==null?_==null?S!=null||w!=null?o&&Cz(o)&&s&&Cz(s)?XG:o&&Cz(o)?JG:s&&Cz(s)?qG:HW:o&&Tz(o)&&!(s&&Tz(s))?qG:s&&Tz(s)&&!(o&&Tz(o))?JG:XG:Cz(o)?lK(_)&&s&&Cz(s)?XG:JG:WW:Cz(s)?lK(p)&&o&&Cz(o)?XG:qG:UW,D=`fill`;break;default:throw Error(`invalid mark: ${T}`)}let k={fx:u,fy:d,x:o??void 0,y:s??void 0,[D]:c??x,z:E,r:l??void 0,tip:!0},A,j={[D]:S??void 0,r:w??void 0};if(p!=null&&_!=null)throw Error(`cannot reduce both x and y`);return _==null?p==null?(S!=null||w!=null)&&(o&&s?A=Cz(o)&&Cz(s)?iB:Cz(o)?vG:Cz(s)?_G:yG:o?A=Cz(o)?nB:_G:s&&(A=Cz(s)?rB:vG)):(j.x=p,A=Cz(s)?rB:vG):(j.y=_,A=Cz(o)?nB:_G),(A===yG||A===_G)&&(k.x={value:o,...h}),(A===yG||A===vG)&&(k.y={value:s,...y}),m===void 0&&(m=o&&!(A===yG||A===_G)&&(O===qG||O===IG||O===UW||O===uU)),v===void 0&&(v=s&&!(A===yG||A===vG)&&(O===JG||O===LG||O===WW||O===lU)),{fx:u??null,fy:d??null,x:{value:f??null,reduce:p??null,zero:!!m,...h},y:{value:g??null,reduce:_??null,zero:!!v,...y},color:{value:b??null,reduce:S??null,...x!==void 0&&{color:x}},size:{value:C??null,reduce:w??null},mark:T,markImpl:fK[O],markOptions:k,transformImpl:fK[A],transformOptions:j,colorMode:D}}function FVe(e,t){let n=iK(e,t),{fx:r,fy:i,x:{zero:a},y:{zero:o},markOptions:s,transformOptions:c,colorMode:l}=n,u=dK[n.markImpl],d=dK[n.transformImpl],f=r!=null||i!=null?KW({strokeOpacity:.1}):null,p=[a?lU([0]):null,o?uU([0]):null],m=u(e,d?d(c,s):s);return l===`stroke`?EH(f,p,m):EH(f,m,p)}function aK(e){let t,n;for(let r of e){if(r==null)continue;if(t===void 0){t=r;continue}let e=Math.sign(xg(t,r));if(e){if(n!==void 0&&e!==n)return!1;t=r,n=e}}return!0}function IVe({x:e,y:t,color:n,size:r,fx:i,fy:a,mark:o}={}){return rz(e)||(e=sK(e)),rz(t)||(t=sK(t)),rz(n)||(n=Dz(n)?{color:n}:sK(n)),rz(r)||(r=sK(r)),rz(i)&&({value:i}=sK(i)),rz(a)&&({value:a}=sK(a)),o!=null&&(o=`${o}`.toLowerCase()),{x:e,y:t,color:n,size:r,fx:i,fy:a,mark:o}}function oK(e,t){let n=MR(e,t.value);return n&&(n.label=hz(t.value)),n}function sK(e){return LVe(e)?{reduce:e}:{value:e}}function cK(e){return/^(?:distinct|count|sum|proportion)$/i.test(e)}function lK(e){return/^(?:first|last|mode)$/i.test(e)}function LVe(e){if(e==null)return!1;if(typeof e.reduceIndex==`function`||typeof e.reduce==`function`&&tz(e)||/^p\d{2}$/i.test(e))return!0;switch(`${e}`.toLowerCase()){case`first`:case`last`:case`count`:case`distinct`:case`sum`:case`proportion`:case`proportion-facet`:case`deviation`:case`min`:case`min-index`:case`max`:case`max-index`:case`mean`:case`median`:case`variance`:case`mode`:return!0}return!1}function uK(e){return e?new Rg(e).size>e.length>>1:!1}var dK={dot:$G,line:tK,lineX:nK,lineY:rK,areaX:IG,areaY:LG,ruleX:lU,ruleY:uU,barX:qG,barY:JG,rect:HW,rectX:UW,rectY:WW,cell:XG,bin:yG,binX:_G,binY:vG,group:iB,groupX:nB,groupY:rB},fK=Object.fromEntries(Object.entries(dK).map(([e,t])=>[t,e]));function pK(e,t={}){let{x:n,x1:r,x2:i}=t;n===void 0&&r===void 0&&i===void 0&&(t={...t,x:n=LR});let a={};return n!=null&&(a.x=e),r!=null&&(a.x1=e),i!=null&&(a.x2=e),hK(a,t)}function mK(e,t={}){let{y:n,y1:r,y2:i}=t;n===void 0&&r===void 0&&i===void 0&&(t={...t,y:n=LR});let a={};return n!=null&&(a.y=e),r!=null&&(a.y1=e),i!=null&&(a.y2=e),hK(a,t)}function hK(e={},t={}){let n=oz(t),r=Object.entries(e).map(([e,n])=>{let r=uLe(e,t);if(r==null)throw Error(`missing channel: ${e}`);let[i,a]=pz(r);return{key:e,input:r,output:i,setOutput:a,map:RVe(n)}});return{...Gz(t,(e,t)=>{let i=MR(e,n),a=r.map(({input:t})=>MR(e,t)),o=r.map(({setOutput:t})=>t(Array(e.length)));for(let e of t)for(let t of i?Vg(e,e=>i[e]).values():[e])r.forEach(({map:e},n)=>e.mapIndex(t,a[n],o[n]));return{data:e,facets:t}}),...Object.fromEntries(r.map(({key:e,output:t})=>[e,t]))}}function RVe(e){if(e==null)throw Error(`missing map`);
172if(typeof e.mapIndex==`function`)return e;if(typeof e.map==`function`&&tz(e))return zVe(e);if(typeof e==`function`)return gK(uz(e));switch(`${e}`.toLowerCase()){case`cumsum`:return VVe;case`rank`:return gK((e,t)=>m_(e,e=>t[e]));case`quantile`:return gK((e,t)=>BVe(e,e=>t[e]))}throw Error(`invalid map: ${e}`)}function zVe(e){return console.warn(`deprecated map interface; implement mapIndex instead.`),{mapIndex:e.map.bind(e)}}function BVe(e,t){let n=Mg(e,t)-1;return m_(e,t).map(e=>e/n)}function gK(e){return{mapIndex(t,n,r){let i=e(t,n);if(i.length!==t.length)throw Error(`map function returned a mismatched length`);for(let e=0,n=t.length;e<n;++e)r[t[e]]=i[e]}}}var VVe={mapIndex(e,t,n){let r=0;for(let i of e)n[i]=r+=t[i]}};function HVe(e={},t){return arguments.length===1&&(t=e),pK(_K(e),t)}function UVe(e={},t){return arguments.length===1&&(t=e),mK(_K(e),t)}function _K(e={}){typeof e==`number`&&(e={k:e});let{k:t,reduce:n,shift:r,anchor:i,strict:a}=e;if(i===void 0&&r!==void 0&&(i=GVe(r),iV(`Warning: the shift option is deprecated; please use anchor "${i}" instead.`)),!((t=Math.floor(t))>0))throw Error(`invalid k: ${t}`);return KVe(n)(t,WVe(i,t),a)}function WVe(e=`middle`,t){switch(`${e}`.toLowerCase()){case`middle`:return t-1>>1;case`start`:return 0;case`end`:return t-1}throw Error(`invalid anchor: ${e}`)}function GVe(e){switch(`${e}`.toLowerCase()){case`centered`:return`middle`;case`leading`:return`start`;case`trailing`:return`end`}throw Error(`invalid shift: ${e}`)}function KVe(e=`mean`){if(typeof e==`string`){if(/^p\d{2}$/i.test(e))return vK(WR(e));switch(e.toLowerCase()){case`deviation`:return vK(Pg);case`max`:return yK((e,t)=>n_(e,e=>t[e]));case`mean`:return qVe;case`median`:return vK(u_);case`min`:return yK((e,t)=>r_(e,e=>t[e]));case`mode`:return yK((e,t)=>f_(e,e=>t[e]));case`sum`:return bK;case`variance`:return vK(Ng);case`difference`:return XVe;case`ratio`:return ZVe;case`first`:return QVe;case`last`:return $Ve}}if(typeof e!=`function`)throw Error(`invalid reduce: ${e}`);return yK(uz(e))}function vK(e){return(t,n,r)=>r?{mapIndex(r,i,a){let o=e=>i[e]==null?NaN:+i[e],s=0;for(let e=0;e<t-1;++e)isNaN(o(e))&&++s;for(let i=0,c=r.length-t+1;i<c;++i)isNaN(o(i+t-1))&&++s,a[r[i+n]]=s===0?e(dz(r,i,i+t),o):NaN,isNaN(o(i))&&--s}}:{mapIndex(r,i,a){let o=e=>i[e]==null?NaN:+i[e];for(let i=-n;i<0;++i)a[r[i+n]]=e(dz(r,0,i+t),o);for(let i=0,s=r.length-n;i<s;++i)a[r[i+n]]=e(dz(r,i,i+t),o)}}}function yK(e){return(t,n,r)=>r?{mapIndex(r,i,a){let o=0;for(let e=0;e<t-1;++e)o+=rR(i[r[e]]);for(let s=0,c=r.length-t+1;s<c;++s)o+=rR(i[r[s+t-1]]),o===t&&(a[r[s+n]]=e(dz(r,s,s+t),i)),o-=rR(i[r[s]])}}:{mapIndex(r,i,a){for(let o=-n;o<0;++o)a[r[o+n]]=e(dz(r,0,o+t),i);for(let o=0,s=r.length-n;o<s;++o)a[r[o+n]]=e(dz(r,o,o+t),i)}}}function bK(e,t,n){return n?{mapIndex(n,r,i){let a=0,o=0;for(let t=0;t<e-1;++t){let e=r[n[t]];e===null||isNaN(e)?++a:o+=+e}for(let s=0,c=n.length-e+1;s<c;++s){let c=r[n[s]],l=r[n[s+e-1]];l===null||isNaN(l)?++a:o+=+l,i[n[s+t]]=a===0?o:NaN,c===null||isNaN(c)?--a:o-=+c}}}:{mapIndex(n,r,i){let a=0,o=n.length;for(let i=0,s=Math.min(o,e-t-1);i<s;++i)a+=+r[n[i]]||0;for(let s=-t,c=o-t;s<c;++s)a+=+r[n[s+e-1]]||0,i[n[s+t]]=a,a-=+r[n[s]]||0}}}function qVe(e,t,n){if(n){let r=bK(e,t,n);return{mapIndex(n,i,a){r.mapIndex(n,i,a);for(let r=0,i=n.length-e+1;r<i;++r)a[n[r+t]]/=e}}}else return{mapIndex(n,r,i){let a=0,o=0,s=n.length;for(let i=0,c=Math.min(s,e-t-1);i<c;++i){let e=r[n[i]];e!==null&&!isNaN(e=+e)&&(a+=e,++o)}for(let c=-t,l=s-t;c<l;++c){let s=r[n[c+e-1]],l=r[n[c]];s!==null&&!isNaN(s=+s)&&(a+=s,++o),i[n[c+t]]=a/o,l!==null&&!isNaN(l=+l)&&(a-=l,--o)}}}}function JVe(e,t,n,r){for(let i=n+r;n<i;++n){let r=e[t[n]];if(rR(r))return r}}function YVe(e,t,n,r){for(let i=n+r-1;i>=n;--i){let n=e[t[i]];if(rR(n))return n}}function xK(e,t,n,r){for(let i=n+r;n<i;++n){let r=e[t[n]];if(r!==null&&!isNaN(r=+r))return r}}function SK(e,t,n,r){for(let i=n+r-1;i>=n;--i){let n=e[t[i]];if(n!==null&&!isNaN(n=+n))return n}}function XVe(e,t,n){return n?{mapIndex(n,r,i){for(let a=0,o=n.length-e;a<o;++a){let o=r[n[a]],s=r[n[a+e-1]];i[n[a+t]]=o===null||s===null?NaN:s-o}}}:{mapIndex(n,r,i){for(let a=-t,o=n.length-e+t+1;a<o;++a)i[n[a+t]]=SK(r,n,a,e)-xK(r,n,a,e)}}}function ZVe(e,t,n){return n?{mapIndex(n,r,i){for(let a=0,o=n.length-e;a<o;++a){let o=r[n[a]],s=r[n[a+e-1]];i[n[a+t]]=o===null||s===null?NaN:s/o}}}:{mapIndex(n,r,i){for(let a=-t,o=n.length-e+t+1;a<o;++a)i[n[a+t]]=SK(r,n,a,e)/xK(r,n,a,e)}}}function QVe(e,t,n){return n?{mapIndex(n,r,i){for(let a=0,o=n.length-e;a<o;++a)i[n[a+t]]=r[n[a]]}}:{mapIndex(n,r,i){for(let a=-t,o=n.length-e+t+1;a<o;++a)i[n[a+t]]=JVe(r,n,a,e)}}}function $Ve(e,t,n){return n?{mapIndex(n,r,i){for(let a=0,o=n.length-e;a<o;++a)i[n[a+t]]=r[n[a+e-1]]}}:{mapIndex(n,r,i){for(let a=-t,o=n.length-e+t+1;a<o;++a)i[n[a+t]]=YVe(r,n,a,e)}}}var CK={n:20,k:2,color:`currentColor`,opacity:.2,strict:!0,anchor:`end`};function eHe(e,{x:t=LR,y:n,k:r=CK.k,color:i=CK.color,opacity:a=CK.opacity,fill:o=i,fillOpacity:s=a,stroke:c=i,strokeOpacity:l,strokeWidth:u,...d}={}){return EH(Oz(o)?null:IG(e,hK({x1:wK({k:-r,...d}),x2:wK({k:r,...d})},{x1:t,x2:t,y:n,fill:o,fillOpacity:s,...d})),Oz(c)?null:nK(e,hK({x:wK(d)},{x:t,y:n,stroke:c,strokeOpacity:l,strokeWidth:u,...d})))}function tHe(e,{x:t,y:n=LR,k:r=CK.k,color:i=CK.color,opacity:a=CK.opacity,fill:o=i,fillOpacity:s=a,stroke:c=i,strokeOpacity:l,strokeWidth:u,...d}={}){return EH(Oz(o)?null:LG(e,hK({y1:wK({k:-r,...d}),y2:wK({k:r,...d})},{x:t,y1:n,y2:n,fill:o,fillOpacity:s,...d})),Oz(c)?null:rK(e,hK({y:wK(d)},{x:t,y:n,stroke:c,strokeOpacity:l,strokeWidth:u,...d})))}function wK({n:e=CK.n,k:t=0,strict:n=CK.strict,anchor:r=CK.anchor}={}){return _K({k:e,reduce:e=>l_(e)+t*(Pg(e)||0),strict:n,anchor:r})}var nHe={ariaLabel:`tick`,fill:null,stroke:`currentColor`},TK=class extends TH{constructor(e,t,n){super(e,t,n,nHe),zH(this,n)}render(e,t,n,r,i){return tH(`svg:g`,i).call(hH,this,r,i).call(this._transform,this,t).call(a=>a.selectAll().data(e).enter().append(`line`).call(gH,this).attr(`x1`,this._x1(t,n,r)).attr(`x2`,this._x2(t,n,r)).attr(`y1`,this._y1(t,n,r)).attr(`y2`,this._y2(t,n,r)).call(uH,this,n).call(WH,this,n,i)).node()}},EK=class extends TK{constructor(e,t={}){let{x:n,y:r,inset:i=0,insetTop:a=i,insetBottom:o=i}=t;super(e,{x:{value:n,scale:`x`},y:{value:r,scale:`y`,type:`band`,optional:!0}},t),this.insetTop=BR(a),this.insetBottom=BR(o)}_transform(e,t,{x:n}){e.call(yH,t,{x:n},sH,0)}_x1(e,{x:t}){return e=>t[e]}_x2(e,{x:t}){return e=>t[e]}_y1({y:e},{y:t},{marginTop:n}){let{insetTop:r}=this;return t&&e?e=>t[e]+r:n+r}_y2({y:e},{y:t},{height:n,marginBottom:r}){let{insetBottom:i}=this;return t&&e?n=>t[n]+e.bandwidth()-i:n-r-i}},DK=class extends TK{constructor(e,t={}){let{x:n,y:r,inset:i=0,insetRight:a=i,insetLeft:o=i}=t;super(e,{y:{value:r,scale:`y`},x:{value:n,scale:`x`,type:`band`,optional:!0}},t),this.insetRight=BR(a),this.insetLeft=BR(o)}_transform(e,t,{y:n}
172){e.call(yH,t,{y:n},0,sH)}_x1({x:e},{x:t},{marginLeft:n}){let{insetLeft:r}=this;return t&&e?e=>t[e]+r:n+r}_x2({x:e},{x:t},{width:n,marginRight:r}){let{insetRight:i}=this;return t&&e?n=>t[n]+e.bandwidth()-i:n-r-i}_y1(e,{y:t}){return e=>t[e]}_y2(e,{y:t}){return e=>t[e]}};function OK(e,{x:t=LR,...n}={}){return new EK(e,{...n,x:t})}function kK(e,{y:t=LR,...n}={}){return new DK(e,{...n,y:t})}function rHe(e,{x:t=LR,y:n=null,r,fill:i=`#ccc`,fillOpacity:a,stroke:o=`currentColor`,strokeOpacity:s,strokeWidth:c=2,sort:l,...u}={}){let d=n==null?tB:rB;return EH(uU(e,d({x1:jK,x2:MK},{x:t,y:n,stroke:o,strokeOpacity:s,...u})),qG(e,d({x1:`p25`,x2:`p75`},{x:t,y:n,fill:i,fillOpacity:a,...u})),OK(e,d({x:`p50`},{x:t,y:n,stroke:o,strokeOpacity:s,strokeWidth:c,sort:l,...u})),$G(e,hK({x:AK},{x:t,y:n,z:n,r,stroke:o,strokeOpacity:s,...u})))}function iHe(e,{y:t=LR,x:n=null,r,fill:i=`#ccc`,fillOpacity:a,stroke:o=`currentColor`,strokeOpacity:s,strokeWidth:c=2,sort:l,...u}={}){let d=n==null?tB:nB;return EH(lU(e,d({y1:jK,y2:MK},{x:n,y:t,stroke:o,strokeOpacity:s,...u})),JG(e,d({y1:`p25`,y2:`p75`},{x:n,y:t,fill:i,fillOpacity:a,...u})),kK(e,d({y:`p50`},{x:n,y:t,stroke:o,strokeOpacity:s,strokeWidth:c,sort:l,...u})),$G(e,hK({y:AK},{x:n,y:t,z:n,r,stroke:o,strokeOpacity:s,...u})))}function AK(e){let t=jK(e),n=MK(e);return e.map(e=>e<t||e>n?e:NaN)}function jK(e){let t=NK(e)*2.5-PK(e)*1.5;return r_(e,e=>e>=t?e:NaN)}function MK(e){let t=PK(e)*2.5-NK(e)*1.5;return n_(e,e=>e<=t?e:NaN)}function NK(e){return s_(e,.25)}function PK(e){return s_(e,.75)}var aHe={ariaLabel:`raster`,stroke:null,pixelSize:1};function FK(e,t){let n=+e;if(isNaN(n))throw Error(`invalid ${t}: ${e}`);return n}function IK(e,t){let n=Math.floor(e);if(isNaN(n))throw Error(`invalid ${t}: ${e}`);return n}var LK=class extends TH{constructor(e,t,n={},r){let{width:i,height:a,x:o,y:s,x1:c=o==null?0:void 0,y1:l=s==null?0:void 0,x2:u=o==null?i:void 0,y2:d=s==null?a:void 0,pixelSize:f=r.pixelSize,blur:p=0,interpolate:m}=n;if(i!=null&&(i=IK(i,`width`)),a!=null&&(a=IK(a,`height`)),c!=null&&(c=FK(c,`x1`)),l!=null&&(l=FK(l,`y1`)),u!=null&&(u=FK(u,`x2`)),d!=null&&(d=FK(d,`y2`)),o==null&&(c==null||u==null))throw Error(`missing x`);if(s==null&&(l==null||d==null))throw Error(`missing y`);e!=null&&i!=null&&a!=null&&(o===void 0&&c!=null&&u!=null&&(o=mHe(c,u,i,a)),s===void 0&&l!=null&&d!=null&&(s=hHe(l,d,i,a))),super(e,{x:{value:o,scale:`x`,optional:!0},y:{value:s,scale:`y`,optional:!0},x1:{value:c==null?null:[c],scale:`x`,optional:!0,filter:null},y1:{value:l==null?null:[l],scale:`y`,optional:!0,filter:null},x2:{value:u==null?null:[u],scale:`x`,optional:!0,filter:null},y2:{value:d==null?null:[d],scale:`y`,optional:!0,filter:null},...t},n,r),this.width=i,this.height=a,this.pixelSize=FK(f,`pixelSize`),this.blur=FK(p,`blur`),this.interpolate=o==null||s==null?null:sHe(m)}},RK=class extends LK{constructor(e,t={}){let{imageRendering:n}=t;if(e==null){let{fill:e,fillOpacity:n}=t;JR(n)[0]!==void 0&&(t=HK(`fillOpacity`,t)),qR(e)[0]!==void 0&&(t=HK(`fill`,t))}super(e,void 0,t,aHe),this.imageRendering=bH(n,`auto`)}scale(e,{color:t,...n},r){return super.scale(e,n,r)}render(e,t,n,r,i){let a=t[n.channels.fill?.scale]??(e=>e),{x:o,y:s}=n,{document:c}=i,[l,u,d,f]=BK(n,r,i),p=d-l,m=f-u,{pixelSize:h,width:g=Math.round(Math.abs(p)/h),height:_=Math.round(Math.abs(m)/h)}=this,v=g*_,{fill:y,fillOpacity:b}=n,x=0;if(this.interpolate){let t=g/p,n=_/m,r=QR(o,e=>(e-l)*t,Float64Array),i=QR(s,e=>(e-u)*n,Float64Array);y&&=this.interpolate(e,g,_,r,i,y),b&&=this.interpolate(e,g,_,r,i,b)}else this.data==null&&e&&(x=e.fi*v);let S=c.createElement(`canvas`);S.width=g,S.height=_;let C=S.getContext(`2d`),w=C.createImageData(g,_),T=w.data,{r:E,g:D,b:O}=R_(this.fill)??{r:0,g:0,b:0},k=(this.fillOpacity??1)*255;for(let e=0;e<v;++e){let t=e<<2;if(y){let n=a(y[e+x]);if(n==null){T[t+3]=0;continue}({r:E,g:D,b:O}=R_(n))}b&&(k=b[e+x]*255),T[t+0]=E,T[t+1]=D,T[t+2]=O,T[t+3]=k}return this.blur>0&&_de(w,this.blur),C.putImageData(w,0,0),tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,t).call(e=>e.append(`image`).attr(`transform`,`translate(${l},${u}) scale(${Math.sign(d-l)},${Math.sign(f-u)})`).attr(`width`,Math.abs(p)).attr(`height`,Math.abs(m)).attr(`preserveAspectRatio`,`none`).call(vH,`image-rendering`,this.imageRendering).call(gH,this).attr(`xlink:href`,S.toDataURL())).node()}};function zK(e,t,n){arguments.length<3&&(n=t,t=null);let{x:r,y:i,[e]:a,...o}=n;return r===void 0&&i===void 0&&gLe(t)&&(r=VR,i=HR,a===void 0&&(a=nLe)),[t,{...o,x:r,y:i,[e]:a}]}function oHe(){let[e,t]=zK(`fill`,...arguments);return new RK(e,e==null||t.fill!==void 0||t.fillOpacity!==void 0?t:{...t,fill:LR})}function BK({x1:e,y1:t,x2:n,y2:r},i,{projection:a}){let{width:o,height:s,marginTop:c,marginRight:l,marginBottom:u,marginLeft:d}=i;return[e&&a==null?e[0]:d,t&&a==null?t[0]:c,n&&a==null?n[0]:o-l,r&&a==null?r[0]:s-u]}function VK({x1:e,y1:t,x2:n,y2:r},i,a,o){let s={};return e&&(s.x1=e),t&&(s.y1=t),n&&(s.x2=n),r&&(s.y2=r),BK(DB(s,i),a,o)}function HK(e,t={}){let{[e]:n}=t;if(typeof n!=`function`)throw Error(`invalid ${e}: not a function`);return Kz({...t,[e]:void 0},function(r,i,a,o,s,c){let{x:l,y:u}=o;if(!l)throw Error(`missing scale: x`);if(!u)throw Error(`missing scale: y`);
172let[d,f,p,m]=VK(a,o,s,c),h=p-d,g=m-f,{pixelSize:_}=this,{width:v=Math.round(Math.abs(h)/_),height:y=Math.round(Math.abs(g)/_)}=t,b=Array(v*y*(i?i.length:1)),x=h/v,S=g/y,C=0;for(let e of i??[void 0])for(let t=.5;t<y;++t)for(let r=.5;r<v;++r,++C)b[C]=n(l.invert(d+r*x),u.invert(f+t*S),e);return{data:b,facets:i,channels:{[e]:{value:b,scale:`auto`}}}})}function sHe(e){if(typeof e==`function`)return e;if(e==null)return UK;switch(`${e}`.toLowerCase()){case`none`:return UK;case`nearest`:return KK;case`barycentric`:return WK();case`random-walk`:return qK()}throw Error(`invalid interpolate: ${e}`)}function UK(e,t,n,r,i,a){let o=Array(t*n);for(let s of e)r[s]<0||r[s]>=t||i[s]<0||i[s]>=n||(o[Math.floor(i[s])*t+Math.floor(r[s])]=a[s]);return o}function WK({random:e=vE(42)}={}){return(t,n,r,i,a,o)=>{let{points:s,triangles:c,hull:l}=iC.from(t,e=>i[e],e=>a[e]),u=new o.constructor(n*r).fill(NaN),d=new Uint8Array(n*r),f=pHe(o,e);for(let e=0;e<c.length;e+=3){let i=c[e],a=c[e+1],l=c[e+2],p=s[2*i],m=s[2*a],h=s[2*l],g=s[2*i+1],_=s[2*a+1],v=s[2*l+1],y=Math.min(p,m,h),b=Math.max(p,m,h),x=Math.min(g,_,v),S=Math.max(g,_,v),C=(_-v)*(p-h)+(g-v)*(h-m);if(!C)continue;let w=o[t[i]],T=o[t[a]],E=o[t[l]];for(let e=Math.floor(y);e<b;++e)for(let t=Math.floor(x);t<S;++t){if(e<0||e>=n||t<0||t>=r)continue;let i=e+.5,a=t+.5,o=Math.sign(C),s=(_-v)*(i-h)+(a-v)*(h-m);if(s*o<0)continue;let c=(v-g)*(i-h)+(a-v)*(p-h);if(c*o<0)continue;let l=C-(s+c);if(l*o<0)continue;let y=e+n*t;u[y]=f(w,s/C,T,c/C,E,l/C,e,t),d[y]=1}}return cHe(u,d,i,a,o,n,r,l,t,f),u}}function cHe(e,t,n,r,i,a,o,s,c,l){n=Float64Array.from(s,e=>n[c[e]]),r=Float64Array.from(s,e=>r[c[e]]),i=Array.from(s,e=>i[c[e]]);let u=n.length,d=Array.from({length:u},(e,t)=>uHe(t,n,r)),f=0;for(let s=0;s<o;++s){let o=s+.5;for(let c=0;c<a;++c){let p=c+a*s;if(!t[p]){let t=c+.5;for(let a=0;a<u;++a){let m=(u+f+(a%2?(a+1)/2:-a/2))%u;if(d[m](t,o)){let a=lHe(n.at(m-1),r.at(m-1),n[m],r[m],t,o);e[p]=l(i.at(m-1),a,i[m],1-a,i[m],0,c,s),f=m;break}}}}}}function lHe(e,t,n,r,i,a){let o=n-e,s=r-t,c=o*(n-i)+s*(r-a),l=o*(i-e)+s*(a-t);return c>0&&l>0?c/(c+l):+(c>l)}function GK(e,t,n,r){return e*r-n*t}function uHe(e,t,n){let r=t.length,i=t.at(e-2),a=n.at(e-2),o=t.at(e-1),s=n.at(e-1),c=t[e],l=n[e],u=t.at(e+1-r),d=n.at(e+1-r),f=o-c,p=s-l,m=i-o,h=a-s,g=c-u,_=l-d,v=Math.hypot(f,p),y=Math.hypot(m,h),b=Math.hypot(g,_);return(e,t)=>{let n=e-o,r=t-s,i=e-c,a=t-l;return GK(n,r,i,a)>-1e-6&&GK(n,r,f,p)*y-GK(n,r,m,h)*v>-1e-6&&GK(i,a,g,_)*v-GK(i,a,f,p)*b<=0}}function KK(e,t,n,r,i,a){let o=new a.constructor(t*n),s=iC.from(e,e=>r[e],e=>i[e]),c,l;for(let r=.5,i=0;r<n;++r){l=c;for(let n=.5;n<t;++n,++i)l=s.find(n,r,l),n===.5&&(c=l),o[i]=a[e[l]]}return o}function qK({random:e=vE(42),minDistance:t=.5,maxSteps:n=2}={}){return(r,i,a,o,s,c)=>{let l=new c.constructor(i*a),u=iC.from(r,e=>o[e],e=>s[e]),d,f,p;for(let m=.5,h=0;m<a;++m){f=d;for(let a=.5;a<i;++a,++h){let i=a,g=m;p=f=u.find(i,g,f),a===.5&&(d=f);let _,v=0;for(;(_=Math.hypot(o[r[p]]-i,s[r[p]]-g))>t&&v<n;){let t=e(a,m,v)*2*Math.PI;i+=Math.cos(t)*_,g+=Math.sin(t)*_,p=u.find(i,g,p),++v}l[h]=c[r[p]]}}return l}}function dHe(e,t,n,r,i,a){return t*e+r*n+a*i}function fHe(e){return(t,n,r,i,a,o,s,c)=>{let l=e(s,c);return l<n?t:l<n+i?r:a}}function pHe(e,t){return Tz(e)||wz(e)?dHe:fHe(t)}function mHe(e,t,n){return{transform(r){let i=r.length,a=new Float64Array(i),o=(t-e)/n,s=e+o/2;for(let e=0;e<i;++e)a[e]=e%n*o+s;return a}}}function hHe(e,t,n,r){return{transform(i){let a=i.length,o=new Float64Array(a),s=(t-e)/r,c=e+s/2;for(let e=0;e<a;++e)o[e]=Math.floor(e/n)%r*s+c;return o}}}var JK={ariaLabel:`contour`,fill:`none`,stroke:`currentColor`,strokeMiterlimit:1,pixelSize:2},YK=class extends LK{constructor(e,{smooth:t=!0,value:n,...r}={}){let i=lH({},r,JK);if(n===void 0){for(let e in i)if(i[e].value!=null){if(n!==void 0)throw Error(`ambiguous contour value`);n=r[e],r[e]=`value`}}if(n!=null){let e={transform:e=>e.map(e=>e.value),label:hz(n)};for(let t in i)r[t]===`value`&&(r[t]=e)}if(e==null){if(n==null)throw Error(`missing contour value`);r=HK(`value`,{value:n,...r}),n=null}else{let{interpolate:e}=r;n===void 0&&(n=LR),e===void 0&&(r.interpolate=`nearest`)}super(e,{value:{value:n,optional:!0}},gHe(r),JK);let a={geometry:{value:LR}};for(let e in this.channels){let t=this.channels[e],{scale:n}=t;
172n===`x`||n===`y`||e===`value`||(a[e]=t,delete this.channels[e])}this.contourChannels=a,this.smooth=!!t}filter(e,{x:t,y:n,value:r,...i},a){return super.filter(e,i,a)}render(e,t,n,r,i){let{geometry:a}=n,o=ST();return tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,t).call(t=>{t.selectAll().data(e).enter().append(`path`).call(gH,this).attr(`d`,e=>o(a[e])).call(uH,this,n)}).node()}};function gHe({thresholds:e,interval:t,...n}){return e=DG(e,t,t_),Kz(n,function(t,n,r,i,a,o){let[s,c,l,u]=VK(r,i,a,o),d=l-s,f=u-c,{pixelSize:p,width:m=Math.round(Math.abs(d)/p),height:h=Math.round(Math.abs(f)/p)}=this,g=m/d,_=h/f,v=r.value.value,y=[];if(this.interpolate){let{x:e,y:t}=$V(r,i,o),a=QR(e,e=>(e-s)*g,Float64Array),l=QR(t,e=>(e-c)*_,Float64Array),u=[r.x,r.y,r.value],d=[a,l,v];for(let e of n){let t=this.filter(e,u,d);y.push(this.interpolate(t,m,h,a,l,v))}}else if(n){let e=m*h,t=n.length;for(let n=0;n<t;++n)y.push(v.slice(n*e,n*e+e))}else y.push(v);if(this.blur>0)for(let e of y)Dg({data:e,width:m,height:h},this.blur);let b=_He(e,v,...yHe(y));if(b===null)throw Error(`unsupported thresholds: ${e}`);let{contour:x}=FS().size([m,h]).smooth(this.smooth),S=[],C=[];for(let e of y)C.push(p_(S.length,S.push(...QR(b,t=>x(e,t)))));for(let{coordinates:e}of S)for(let t of e)for(let e of t)for(let t of e)t[0]=t[0]/g+s,t[1]=t[1]/_+c;return{data:S,facets:C,channels:EB(this.contourChannels,S)}})}function _He(e,t,n,r){if(typeof e?.range==`function`)return e.range(e.floor(n),r);if(typeof e==`function`&&(e=e(t,n,r)),typeof e!=`number`)return ZR(e);let i=Zg(...e_(n,r,e),e);for(;i[i.length-1]>=r;)i.pop();for(;i[1]<n;)i.shift();return i}function vHe(){return new YK(...zK(`value`,...arguments))}function yHe(e){return[r_(e,e=>r_(e,XK)),n_(e,e=>n_(e,XK))]}function XK(e){return isFinite(e)?e:NaN}function bHe(e,t){return ZK(MH,e,t)}function xHe(e,t={}){return ZK(NH,e,t)}function SHe(e,t={}){return ZK(PH,e,t)}function ZK(e,t,n={}){let{x:r,y:i,maxRadius:a}=n,o=e({px:r,py:i,maxRadius:a}),s=[];r!=null&&s.push(lU(t,$K(`x`,{...o,inset:-6},n))),i!=null&&s.push(uU(t,$K(`y`,{...o,inset:-6},n))),r!=null&&s.push(gU(t,eq(`x`,{...o,dy:9,frameAnchor:`bottom`,lineAnchor:`top`},n))),i!=null&&s.push(gU(t,eq(`y`,{...o,dx:-9,frameAnchor:`left`,textAnchor:`end`},n)));for(let e of s)e.ariaLabel=`crosshair ${e.ariaLabel}`;return EH(...s)}function QK(e,{channels:t,...n},{facet:r,facetAnchor:i,fx:a,fy:o,[e]:s,channels:c,transform:l,initializer:u}){return{...n,facet:r,facetAnchor:i,fx:a,fy:o,[e]:s,channels:{...t,...c},transform:l,initializer:CHe(e,u)}}function CHe(e,t){return t==null?t:function(n,r,{x:i,y:a,px:o,py:s,...c},...l){let{channels:{x:u,y:d,...f}={},...p}=t.call(this,n,r,{...c,x:o,y:s},...l);return{channels:{...f,...u&&{px:u,...e===`x`&&{x:u}},...d&&{py:d,...e===`y`&&{y:d}}},...p}}}function $K(e,t,n){let{color:r=`currentColor`,opacity:i=.2,ruleStroke:a=r,ruleStrokeOpacity:o=i,ruleStrokeWidth:s}=n;return{...QK(e,t,n),stroke:a,strokeOpacity:o,strokeWidth:s}}function eq(e,t,n){let{color:r=`currentColor`,textFill:i=r,textFillOpacity:a,textStroke:o=`var(--plot-background)`,textStrokeOpacity:s,textStrokeWidth:c=5}=n;return{...QK(e,t,wHe(e,n)),fill:i,fillOpacity:a,stroke:o,strokeOpacity:s,strokeWidth:c}}function wHe(e,t){return Kz(t,(t,n,r)=>({channels:{text:{value:NB(r,e)?.value}}}))}var THe={ariaLabel:`delaunay link`,fill:`none`,stroke:`currentColor`,strokeMiterlimit:1},EHe={ariaLabel:`delaunay mesh`,fill:null,stroke:`currentColor`,strokeOpacity:.2},DHe={ariaLabel:`hull`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,strokeMiterlimit:1},OHe={ariaLabel:`voronoi`,fill:`none`,stroke:`currentColor`,strokeMiterlimit:1},kHe={ariaLabel:`voronoi mesh`,fill:null,stroke:`currentColor`,strokeOpacity:.2},AHe=class extends TH{constructor(e,t={}){let{x:n,y:r,z:i,curve:a,tension:o}=t;super(e,{x:{value:n,scale:`x`,optional:!0},y:{value:r,scale:`y`,optional:!0},z:{value:i,optional:!0}},t,THe),this.curve=mG(a,o),zH(this,t)}render(e,t,n,r,i){let{x:a,y:o}=t,{x:s,y:c,z:l}=n,{curve:u}=this,[d,f]=wH(this,r),p=s?e=>s[e]:UR(d),m=c?e=>c[e]:UR(f),h=this;function g(e){let t=-1,r=[],a={};for(let e in n)a[e]=[];let o=[],s=[],c=[],l=[];function d(i,u){i=e[i],u=e[u],r.push(++t),o[t]=p(i),c[t]=m(i),s[t]=p(u),l[t]=m(u);for(let e in n)a[e].push(n[e][u])}let{halfedges:f,hull:g,triangles:_}=iC.from(e,p,m);for(let e=0;e<f.length;++e){let t=f[e];t>e&&d(_[e],_[t])}for(let e=0;e<g.length;++e)d(g[e],g[(e+1)%g.length]);Fx(this).selectAll().data(r).enter().append(`path`).call(gH,h).attr(`d`,e=>{let t=_E(),n=u(t);return n.lineStart(),n.point(o[e],c[e]),n.point(s[e],l[e]),n.lineEnd(),t}).call(uH,h,a).call(WH,h,a,i)}return tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,{x:s&&a,y:c&&o}).call(l?t=>t.selectAll().data(Vg(e,e=>l[e]).values()).enter().append(`g`).each(g):t=>t.datum(e).each(g)).node()}},tq=class extends TH{constructor(e,t={},n,r=({z:e})=>e){let{x:i,y:a}=t;super(e,{x:{value:i,scale:`x`,optional:!0},y:{value:a,scale:`y`,optional:!0},z:{value:r(t),optional:!0}},t,n)}render(e,t,n,r,i){let{x:a,y:o}=t,{x:s,y:c,z:l}=n,[u,d]=wH(this,r),f=s?e=>s[e]:UR(u),p=c?e=>c[e]:UR(d),m=this;function h(e){let t=iC.from(e,f,p);Fx(this).append(`path`).datum(e[0]).call(gH,m).attr(`d`,m._render(t,r)).call(uH,m,n)}return tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,{x:s&&a,y:c&&o}).call(l?t=>t.selectAll().data(Vg(e,e=>l[e]).values()).enter().append(`g`).each(h):t=>t.datum(e).each(h)).node()}},jHe=class extends tq{constructor(e,t={}){super(e,t,EHe),this.fill=`none`}_render(e){return e.render()}},MHe=class extends tq{constructor(e,t={}){super(e,t,DHe,oz)}_render(e){return e.renderHull()}},NHe=class extends TH{constructor(e,t={}){let{x:n,y:r,z:i}=t;super(e,{x:{value:n,scale:`x`,optional:!0},y:{value:r,scale:`y`,optional:!0},z:{value:i,optional:!0}},Kz(t,function(e,t,n,r,i,a){let{x:o,y:s,z:c}=n;({x:o,y:s}=$V(n,r,a)),c=c?.value;let l=Array((o??s).length).fill(null),[u,d]=wH(this,i),f=o?e=>o[e]:UR(u),p=s?e=>s[e]:UR(d);for(let e of t){o&&(e=e.filter(e=>
172rR(f(e)))),s&&(e=e.filter(e=>rR(p(e))));for(let[,t]of uB(e,c)){let e=nq(iC.from(t,f,p),i);for(let n=0,r=t.length;n<r;++n)l[t[n]]=e.renderCell(n)}}return{data:e,facets:t,channels:{cells:{value:l}}}}),OHe)}render(e,t,n,r,i){let{x:a,y:o}=t,{x:s,y:c,cells:l}=n;return tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,{x:s&&a,y:c&&o}).call(t=>{t.selectAll().data(e).enter().append(`path`).call(gH,this).attr(`d`,e=>l[e]).call(uH,this,n)}).node()}},PHe=class extends tq{constructor(e,t){super(e,t,kHe),this.fill=`none`}_render(e,t){return nq(e,t).render()}};function nq(e,t){let{width:n,height:r,marginTop:i,marginRight:a,marginBottom:o,marginLeft:s}=t;return e.voronoi([s,i,n-a,r-o])}function rq(e,t,{x:n,y:r,...i}={}){return[n,r]=az(n,r),new e(t,{...i,x:n,y:r})}function FHe(e,t){return rq(AHe,e,t)}function IHe(e,t){return rq(jHe,e,t)}function LHe(e,t){return rq(MHe,e,t)}function RHe(e,{x:t,y:n,initializer:r,...i}={}){return rq(NHe,e,{...Gz({...i,x:t,y:n},SW),initializer:r})}function zHe(e,t){return rq(PHe,e,t)}var BHe={ariaLabel:`density`,fill:`none`,stroke:`currentColor`,strokeMiterlimit:1},iq=class extends TH{constructor(e,{x:t,y:n,z:r,weight:i,fill:a,stroke:o,...s}={}){let c=aq(a)&&(a=`currentColor`,!0),l=aq(o)&&(o=`currentColor`,!0);super(e,{x:{value:t,scale:`x`,optional:!0},y:{value:n,scale:`y`,optional:!0},z:{value:oz({z:r,fill:a,stroke:o}),optional:!0},weight:{value:i,optional:!0}},UHe({...s,fill:a,stroke:o},c,l),BHe),c&&(this.fill=void 0),l&&(this.stroke=void 0),this.z=r}filter(e){return e}render(e,t,n,r,i){let{contours:a}=n,o=ST();return tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,{}).call(t=>t.selectAll().data(e).enter().append(`path`).call(gH,this).call(uH,this,n).attr(`d`,e=>o(a[e]))).node()}};function VHe(e,{x:t,y:n,...r}={}){return[t,n]=az(t,n),new iq(e,{...r,x:t,y:n})}var HHe=new Set([`x`,`y`,`z`,`weight`]);function UHe(e,t,n){let{bandwidth:r,thresholds:i}=e;return r=r===void 0?20:+r,i=i===void 0?20:typeof i?.[Symbol.iterator]==`function`?GR(i):+i,Kz(e,function(e,a,o,s,c,l){let u=o.weight?GR(o.weight.value):null,d=o.z?.value,{z:f}=this,[p,m]=wH(this,c),{width:h,height:g}=c,{x:_,y:v}=$V(o,s,l),y=Object.fromEntries(Object.entries(o).filter(([e])=>!HHe.has(e)).map(([e,t])=>[e,{...t,value:[]}])),b=t&&[],x=n&&[],S=Ibe().x(_?e=>_[e]:p).y(v?e=>v[e]:m).weight(u?e=>u[e]:1).size([h,g]).bandwidth(r),C=[];for(let e of a){let t=[];C.push(t);for(let n of d?fH(e,d,f):[e]){let e=S.contours(n);t.push([n,e])}}let w=i;if(!(w instanceof AR)){let e=0;for(let t of C)for(let[,n]of t){let t=n.max;t>e&&(e=t)}w=Float64Array.from({length:i-1},(t,n)=>e*100*(n+1)/i)}let T=[],E=[];for(let e of C){let t=[];T.push(t);for(let[n,r]of e)for(let e of w){t.push(E.length),E.push(r(e/100)),b&&b.push(e),x&&x.push(e);for(let e in y)y[e].value.push(o[e].value[n[0]])}}return b&&b.push(0),x&&x.push(0),{data:e,facets:T,channels:{...y,...b&&{fill:{value:b,scale:`color`}},...x&&{stroke:{value:x,scale:`color`}},contours:{value:E}}}})}function aq(e){return/^density$/i.test(e)}function WHe(e,t){return oq(`x`,e,t)}function GHe(e,t){return oq(`y`,e,t)}function oq(e,t,{x1:n,x2:r,y1:i,y2:a,x:o=n===void 0&&r===void 0?e===`y`?IR:LR:void 0,y:s=i===void 0&&a===void 0?e===`x`?IR:LR:void 0,fill:c,positiveFill:l=`#3ca951`,negativeFill:u=`#4269d0`,fillOpacity:d=1,positiveFillOpacity:f=d,negativeFillOpacity:p=d,stroke:m,strokeOpacity:h,z:g=qR(m)[0],clip:_,tip:v,render:y,...b}={}){return[n,r]=sq(o,n,r),[i,a]=sq(s,i,a),n===r&&i===a&&(e===`y`?i=cq(0):n=cq(0)),{tip:v}=OH({tip:v},e===`y`?`x`:`y`),EH(Oz(l)?null:Object.assign(FG(t,{x1:n,x2:r,y1:i,y2:a,z:g,fill:l,fillOpacity:f,render:DH(y,lq(e,!0)),clip:_,...b}),{ariaLabel:`positive difference`}),Oz(u)?null:Object.assign(FG(t,{x1:n,x2:r,y1:i,y2:a,z:g,fill:u,fillOpacity:p,render:DH(y,lq(e,!1)),clip:_,...b}),{ariaLabel:`negative difference`}),tK(t,{x:r,y:a,z:g,stroke:m,strokeOpacity:h,tip:v,clip:!0,...b}))}function sq(e,t,n){return t===void 0&&n===void 0?t=n=cq(e):t===void 0?(n=cq(n),t=e===void 0?n:cq(e)):n===void 0?(t=cq(t),n=e===void 0?t:cq(e)):(t=cq(t),n=cq(n)),[t,n]}function cq(e){let t,{value:n,label:r=hz(n)}=xz(e);return{transform:e=>
172t||=MR(e,n),label:r}}function lq(e,t){let n=e===`x`?`y`:`x`,r=`${n}1`,i=`${n}2`,a=`${e}1`,o=`${e}2`;return(n,s,c,l,u,d)=>{let{[r]:f,[i]:p}=c,m=new Float32Array(f.length),h=new Float32Array(p.length),g=l[e===`y`?`height`:`width`];(t===hV(s[e])<0?m:h).fill(g);let _=d(n,s,{...c,[i]:f,[o]:h},l,u),v=d(n,s,{...c,[r]:p,[a]:m},l,u),y=_.querySelector(`g`)??_,b=v.querySelector(`g`)??v;for(let e=0;y.firstChild;e+=2){let t=cH(),n=tH(`svg:clipPath`,u).attr(`id`,t).node();n.appendChild(y.firstChild),b.childNodes[e].setAttribute(`clip-path`,`url(#${t})`),b.insertBefore(n,b.childNodes[e])}return v}}function uq({geometry:e=LR,...t}={}){let n=rH(t=>MR(t,e));return Kz({...t,x:null,y:null,geometry:{transform:n}},(e,t,r,i,a,o)=>{let s=n(e),c=s.length,l=new Float64Array(c),u=new Float64Array(c),{centroid:d}=o.path();for(let e=0;e<c;++e)[l[e],u[e]]=d(s[e]);return{data:e,facets:t,channels:{x:{value:l,scale:null,source:null},y:{value:u,scale:null,source:null}}}})}function KHe({geometry:e=LR,...t}={}){let n=rH(t=>MR(t,e)),r=rH(e=>MR(n(e),cxe));return{...t,x:{transform:e=>Float64Array.from(r(e),([e])=>e)},y:{transform:e=>Float64Array.from(r(e),([,e])=>e)},geometry:{transform:n}}}var qHe={ariaLabel:`geo`,fill:`none`,stroke:`currentColor`,strokeWidth:1,strokeLinecap:`round`,strokeLinejoin:`round`,strokeMiterlimit:1},dq=class extends TH{constructor(e,t={}){let[n,r]=JR(t.r,3);super(e,{x:{value:t.tip?t.x:null,scale:`x`,optional:!0},y:{value:t.tip?t.y:null,scale:`y`,optional:!0},r:{value:n,scale:`r`,filter:cR,optional:!0},geometry:{value:t.geometry,scale:`projection`}},ZG(t),qHe),this.r=r}render(e,t,n,r,i){let{geometry:a,r:o}=n,s=i.path(),{r:c}=this;return lR(c)?e=[]:c!==void 0&&s.pointRadius(c),tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,t).call(t=>{t.selectAll().data(e).enter().append(`path`).call(gH,this).attr(`d`,o?e=>s.pointRadius(o[e])(a[e]):e=>s(a[e])).call(uH,this,n)}).node()}};function fq(e,t={}){return t.tip&&t.x===void 0&&t.y===void 0?t=uq(t):t.geometry===void 0&&(t={...t,geometry:LR}),new dq(e,t)}function JHe({strokeWidth:e=1.5,...t}={}){return fq({type:`Sphere`},{strokeWidth:e,...t})}function YHe({strokeOpacity:e=.1,...t}={}){return fq(bxe(),{strokeOpacity:e,...t})}var pq=.5;function XHe(e={fill:`count`},{binWidth:t,...n}={}){let{z:r}=n;return t=t===void 0?20:BR(t),e=fB(e,n),oB(e,`fill`)&&(n.channels={...n.channels,fill:{value:[]}}),n.symbol===void 0&&(n.symbol=`hexagon`),n.r===void 0&&!oB(e,`r`)&&(n.r=t/2),Kz(n,(n,i,a,o,s,c)=>{let{x:l,y:u,z:d,fill:f,stroke:p,symbol:m}=a;if(l===void 0)throw Error(`missing channel: x`);if(u===void 0)throw Error(`missing channel: y`);({x:l,y:u}=$V(a,o,c)),d=d?d.value:MR(n,r),f=f?.value,p=p?.value,m=m?.value;let h=gB(e,{z:d,fill:f,stroke:p,symbol:m}),g=d&&[],_=f&&[],v=p&&[],y=m&&[],b=[],x=[],S=[],C=-1;for(let t of e)t.initialize(n);for(let r of i){let i=[];for(let t of e)t.scope(`facet`,r);for(let[a,o]of uB(r,h))for(let{index:r,extent:s}of ZHe(n,o,l,u,t)){i.push(++C),x.push(s.x),S.push(s.y),d&&g.push(h===d?a:d[r[0]]),f&&_.push(h===f?a:f[r[0]]),p&&v.push(h===p?a:p[r[0]]),m&&y.push(h===m?a:m[r[0]]);for(let t of e)t.reduce(r,s)}b.push(i)}let w=a.x.scale,T=a.y.scale;return{data:n,facets:b,channels:{x:{value:x,source:o[w]?{value:QR(x,o[w].invert),scale:w}:null},y:{value:S,source:o[T]?{value:QR(S,o[T].invert),scale:T}:null},...d&&{z:{value:g}},...f&&{fill:{value:_,scale:`auto`}},...p&&{stroke:{value:v,scale:`auto`}},...m&&{symbol:{value:y,scale:`auto`}},...Object.fromEntries(e.map(({name:e,output:n})=>[e,{scale:`auto`,label:n.label,radius:e===`r`?t/2:void 0,value:n.transform()}]))}}})}function ZHe(e,t,n,r,i){let a=1.5/Bz*i,o=new Map;for(let s of t){let t=n[s],c=r[s];if(isNaN(t)||isNaN(c))continue;let l=Math.round(c=(c-0)/a),u=Math.round(t=(t-pq)/i-(l&1)/2),d=c-l;if(Math.abs(d)*3>1){let e=t-u,n=u+(t<u?-1:1)/2,r=l+(c<l?-1:1),i=t-n,a=c-r;e*e+d*d>i*i+a*a&&(u=n+(l&1?1:-1)/2,l=r)}let f=`${u},${l}`,p=o.get(f);p===void 0&&(p={index:[],extent:{data:e,x:(u+(l&1)/2)*i+pq,y:l*a+0}},o.set(f,p)),p.index.push(s)}return o.values()}var QHe={ariaLabel:`hexgrid`,fill:`none`,stroke:`currentColor`,strokeOpacity:.1};function $He(e){return new mq(e)}var mq=class extends TH{constructor({binWidth:e=20,clip:t=!0,...n}={}){super(FR,void 0,{clip:t,...n},QHe),this.binWidth=BR(e)}render(e,t,n,r,i){let{binWidth:a}=this,{marginTop:o,marginRight:s,marginBottom:c,marginLeft:l,width:u,height:d}=r,f=l-pq,p=u-s-pq,m=o-0,h=d-c-0,g=a/2,_=g*Vz,v=_/2,y=g*2,b=_*1.5,x=Math.floor(f/y),S=Math.ceil(p/y),C=Math.floor((m+v)/b),w=Math.ceil((h-v)/b)+1,T=`m0,${hq(-_)}l${hq(g)},${hq(v)}v${hq(_)}l${hq(-g)},${hq(v)}`,E=T;for(let e=C;e<w;++e)for(let t=x;t<S;++t)E+=`M${hq(t*y+(e&1)*g)},${hq(e*b)}${T}`;return tH(`svg:g`,i).datum(0).call(hH,this,r,i).call(yH,this,{},sH+pq,sH+0).call(e=>e.append(`path`).call(gH,this).call(uH,this,n).attr(`d`,E)).node()}};function hq(e){return Math.round(e*1e3)/1e3}var eUe={ariaLabel:`image`,fill:null,stroke:null};function tUe(e){return/^\.*\//.test(e)}function nUe(e){return/^(blob|data|file|http|https):/i.test(e)}function rUe(e){return typeof e==`string`&&(tUe(e)||nUe(e))?[void 0,e]:[e,void 0]}var gq=class extends TH{constructor(e,t={}){let{x:n,y:r,r:i,width:a,height:o,rotate:s,src:c,preserveAspectRatio:l,crossOrigin:u,frameAnchor:d,imageRendering:f}=t;i??=void 0,i===void 0&&a===void 0&&o===void 0?a=o=16:a===void 0&&o!==void 0?a=o:o===void 0&&a!==void 0&&(o=a);let[p,m]=rUe(c),[h,g]=JR(i),[_,v]=JR(a,g===void 0?void 0:g*2),[y,b]=JR(o,g===void 0?void 0:g*2),[x,S]=JR(s,0);super(e,{x:{value:n,scale:`x`,optional:!0},y:{value:r,scale:`y`,optional:!0},r:{value:h,scale:`r`,filter:cR,optional:!0},width:{value:_,filter:cR,optional:!0},height:{value:y,filter:cR,optional:!0},rotate:{value:x,optional:!0},src:{value:p,optional:!0}},ZG(t),eUe),this.src=m,this.width=v,this.rotate=S,this.height=b,this.r=g,this.preserveAspectRatio=bH(l,`xMidYMid`),this.crossOrigin=zR(u),this.frameAnchor=jz(d),this.imageRendering=bH(f,`auto`)}render(e,t,n,r,i){let{x:a,y:o}=t,{x:s,y:c,width:l,height:u,r:d,rotate:f,src:p}=n,{r:m,width:h,height:g,rotate:_}=this,[v,y]=wH(this,r);return tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,{x:s&&a,y:c&&o}).call(t=>t.selectAll().data(e).enter().append(`image`).call(gH,this).attr(`x`,_q(s,l,d,v,h,m)).attr(`y`,_q(c,u,d,y,g,m)).attr(`width`,l?e=>l[e]:h===void 0?d?e=>d[e]*2:m*2:h).attr(`height`,u?e=>u[e]:g===void 0?d?e=>d[e]*2:m*2:g).attr(`transform`,f?e=>`rotate(${f[e]}
172)`:_?`rotate(${_})`:null).attr(`transform-origin`,f||_?fU`${s?e=>s[e]:v}px ${c?e=>c[e]:y}px`:null).call(vH,`href`,p?e=>p[e]:this.src).call(vH,`preserveAspectRatio`,this.preserveAspectRatio).call(vH,`crossorigin`,this.crossOrigin).call(vH,`image-rendering`,this.imageRendering).call(vH,`clip-path`,d?e=>`circle(${d[e]}px)`:m===void 0?null:`circle(${m}px)`).call(uH,this,n)).node()}};function _q(e,t,n,r,i,a){return t&&e?n=>e[n]-t[n]/2:t?e=>r-t[e]/2:e&&i!==void 0?t=>e[t]-i/2:i===void 0?n&&e?t=>e[t]-n[t]:n?e=>r-n[e]:e?t=>e[t]-a:r-a:r-i/2}function iUe(e,{x:t,y:n,...r}={}){return r.frameAnchor===void 0&&([t,n]=az(t,n)),new gq(e,{...r,x:t,y:n})}function aUe(e,t,n){var r=1e-8,i=t-1,a=n-1,o=0,s,c,l,u,d,f,p,m,h,g,_;if(e<=0)return 0;if(e>=1)return 1;for(t>=1&&n>=1?(l=e<.5?e:1-e,u=Math.sqrt(-2*Math.log(l)),p=(2.30753+u*.27061)/(1+u*(.99229+u*.04481))-u,e<.5&&(p=-p),m=(p*p-3)/6,h=2/(1/(2*t-1)+1/(2*n-1)),g=p*Math.sqrt(m+h)/h-(1/(2*n-1)-1/(2*t-1))*(m+5/6-2/(3*h)),p=t/(t+n*Math.exp(2*g))):(s=Math.log(t/(t+n)),c=Math.log(n/(t+n)),u=Math.exp(t*s)/t,d=Math.exp(n*c)/n,g=u+d,p=e<u/g?(t*g*e)**(1/t):1-(n*g*(1-e))**(1/n)),_=-yq(t)-yq(n)+yq(t+n);o<10;o++){if(p===0||p===1)return p;if(f=oUe(p,t,n)-e,u=Math.exp(i*Math.log(p)+a*Math.log(1-p)+_),d=f/u,p-=u=d/(1-.5*Math.min(1,d*(i/p-a/(1-p)))),p<=0&&(p=.5*(p+u)),p>=1&&(p=.5*(p+u+1)),Math.abs(u)<r*p&&o>0)break}return p}function oUe(e,t,n){var r=e===0||e===1?0:Math.exp(yq(t+n)-yq(t)-yq(n)+t*Math.log(e)+n*Math.log(1-e));return e<0||e>1?!1:e<(t+1)/(t+n+2)?r*vq(e,t,n)/t:1-r*vq(1-e,n,t)/n}function vq(e,t,n){var r=1e-30,i=1,a=t+n,o=t+1,s=t-1,c=1,l=1-a*e/o,u,d,f,p;for(Math.abs(l)<r&&(l=r),l=1/l,p=l;i<=100&&(u=2*i,d=i*(n-i)*e/((s+u)*(t+u)),l=1+d*l,Math.abs(l)<r&&(l=r),c=1+d/c,Math.abs(c)<r&&(c=r),l=1/l,p*=l*c,d=-(t+i)*(a+i)*e/((t+u)*(o+u)),l=1+d*l,Math.abs(l)<r&&(l=r),c=1+d/c,Math.abs(c)<r&&(c=r),l=1/l,f=l*c,p*=f,!(Math.abs(f-1)<3e-7));i++);return p}function yq(e){var t=0,n=[76.18009172947146,-86.5053203294167,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18],r=1.000000000190015,i,a,o=(a=i=e)+5.5;for(o-=(i+.5)*Math.log(o);t<6;t++)r+=n[t]/++a;return Math.log(2.506628274631*r/i)-o}function sUe(e,t){var n=aUe(2*Math.min(e,1-e),.5*t,.5);return n=Math.sqrt(t*(1-n)/n),e>.5?n:-n}var cUe={ariaLabel:`linear-regression`,fill:`currentColor`,fillOpacity:.1,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`,strokeMiterlimit:1},bq=class extends TH{constructor(e,t={}){let{x:n,y:r,z:i,ci:a=.95,precision:o=4}=t;if(super(e,{x:{value:n,scale:`x`},y:{value:r,scale:`y`},z:{value:oz(t),optional:!0}},t,cUe),this.z=i,this.ci=+a,this.precision=+o,!(0<=this.ci&&this.ci<1))throw Error(`invalid ci; not in [0, 1): ${a}`);if(!(this.precision>0))throw Error(`invalid precision: ${o}`)}render(e,t,n,r,i){let{x:a,y:o,z:s}=n,{ci:c}=this;return tH(`svg:g`,i).call(hH,this,r,i).call(yH,this,t).call(t=>t.selectAll().data(s?fH(e,s,this.z):[e]).enter().call(e=>e.append(`path`).attr(`fill`,`none`).call(gH,this).call(dH,this,{...n,fill:null,fillOpacity:null}).attr(`d`,e=>this._renderLine(e,a,o)).call(c&&!kz(this.fill)?e=>e.select(lUe).attr(`stroke`,`none`).call(gH,this).call(dH,this,{...n,stroke:null,strokeOpacity:null,strokeWidth:null}).attr(`d`,e=>this._renderBand(e,a,o)):()=>{}))).node()}};function lUe(){return this.parentNode.insertBefore(this.ownerDocument.createElementNS(hx.svg,`path`),this)}var uUe=class extends bq{constructor(e,t){super(e,t)}_renderBand(e,t,n){let{ci:r,precision:i}=this,[a,o]=Fg(e,e=>n[e]),s=xq(e,n,t),c=Sq(e,n,t,(1-r)/2,s);return IE().y(e=>e).x0(e=>c(e,-1)).x1(e=>c(e,1))(p_(a,o-i/2,i).concat(o))}_renderLine(e,t,n){let[r,i]=Fg(e,e=>n[e]),a=xq(e,n,t);return`M${a(r)},${r}L${a(i)},${i}`}},dUe=class extends bq{constructor(e,t){super(e,t)}_renderBand(e,t,n){let{ci:r,precision:i}=this,[a,o]=Fg(e,e=>t[e]),s=xq(e,t,n),c=Sq(e,t,n,(1-r)/2,s);return IE().x(e=>e).y0(e=>c(e,-1)).y1(e=>c(e,1))(p_(a,o-i/2,i).concat(o))}_renderLine(e,t,n){let[r,i]=Fg(e,e=>t[e]),a=xq(e,t,n);return`M${r},${a(r)}L${i},${a(i)}`}};function fUe(e,{y:t=IR,x:n=LR,stroke:r,fill:i=Oz(r)?`currentColor`:r,...a}={}){return new uUe(e,SG({...a,x:n,y:t,fill:i,stroke:r}))}function pUe(e,{x:t=IR,y:n=LR,stroke:r,fill:i=Oz(r)?`currentColor`:r,...a}={}){return new dUe(e,xG({...a,x:t,y:n,fill:i,stroke:r}))}function xq(e,t,n){let r=0,i=0,a=0,o=0;for(let s of e){let e=t[s],c=n[s];r+=e,i+=c,a+=e*c,o+=e*e}let s=e.length,c=(s*a-r*i)/(s*o-r*r),l=(i-c*r)/s;return e=>c*e+l}function Sq(e,t,n,r,i){let a=h_(e,e=>t[e])/e.length,o=0,s=0;for(let r of e)o+=(t[r]-a)**2,s+=(n[r]-i(t[r]))**2;let c=Math.sqrt(s/(e.length-2)),l=sUe(r,e.length-2);return(t,n)=>{let r=i(t),s=c*Math.sqrt(1/e.length+(t-a)**2/o);return r+n*l*s}}function Cq({path:e=LR,delimiter:t,frameAnchor:n,treeLayout:r=fE,treeSort:i,treeSeparation:a,treeAnchor:o,treeFilter:s,...c}={}){o=Tq(o),i=Eq(i),s!=null&&(s=Mq(s)),n===void 0&&(n=o.frameAnchor);let l=Oq(t),u=Wq(c,Mq),[d,f]=pz(),[p,m]=pz();return{x:d,y:p,frameAnchor:n,...Gz(c,(t,n)=>{let c=l(MR(t,e)),d=f([]),p=m([]),h=-1,g=[],_=[],v=LSe().path(e=>c[e]),y=jR(t)?e=>e.data=t[e.data]:e=>e.data=t.get(e.data),b=r();b.nodeSize&&b.nodeSize([1,1]),b.separation&&a!==void 0&&b.separation(a??RR);for(let e of u)e[Uq]=e[Vq]([]);for(let e of n){let t=[],n=v(e.filter(e=>c[e]!=null)).each(y);i!=null&&n.sort(i),b(n);for(let e of n.descendants())if(!(s!=null&&!s(e))){t.push(++h),g[h]=e.data,o.position(e,h,d,p);for(let t of u)t[Uq][h]=t[Hq](e)}_.push(t)}return{data:g,facets:_}}),...Object.fromEntries(u)}}function wq({path:e=LR,delimiter:t,curve:n=`bump-x`,stroke:r=`#555`,strokeWidth:i=1.5,strokeOpacity:a=.5,treeLayout:o=fE,treeSort:s,treeSeparation:c,treeAnchor:l,treeFilter:u,...d}={}){l=Tq(l),s=Eq(s),u!=null&&(u=Nq(u)),d={curve:n,stroke:r,strokeWidth:i,strokeOpacity:a,...d};let f=Oq(t),p=Wq(d,Nq),[m,h]=pz(),[g,_]=pz(),[v,y]=pz(),[b,x]=pz();return{x1:m,x2:g,y1:v,y2:b,...Gz(d,(t,n)=>{let r=f(MR(t,e)),i=h([]),a=_([]),d=y([]),m=x([]),g=-1,v=[],b=[],S=LSe().path(e=>r[e]),C=o();C.nodeSize&&C.nodeSize([1,1]),C.separation&&c!==void 0&&C.separation(c??RR);for(let e of p)e[Uq]=e[Vq]([]);for(let e of n){let n=[],o=S(e.filter(e=>r[e]!=null)).each(e=>e.data=t[e.data]);s!=null&&o.sort(s),C(o);for(let{source:e,target:t}of o.links())if(!(u!=null&&!u(t,e))){n.push(++g),v[g]=t.data,l.position(e,g,i,d),l.position(t,g,a,m);for(let n of p)n[Uq][g]=n[Hq](t,e)}b.push(n)}return{data:v,facets:b}}),...Object.fromEntries(p)}}function Tq(e=`left`){switch(`${e}`.trim().toLowerCase()){case`left`:return mUe;
172case`right`:return hUe}throw Error(`invalid tree anchor: ${e}`)}var mUe={frameAnchor:`left`,dx:6,position({x:e,y:t},n,r,i){r[n]=t,i[n]=-e}},hUe={frameAnchor:`right`,dx:-6,position({x:e,y:t},n,r,i){r[n]=-t,i[n]=-e}};function Eq(e){return e==null||typeof e==`function`?e:`${e}`.trim().toLowerCase().startsWith(`node:`)?Dq(Mq(e)):Dq(gUe(e))}function Dq(e){return(t,n)=>iR(e(t),e(n))}function gUe(e){return t=>t.data?.[e]}function Oq(e=`/`){if(e=`${e}`,e===`/`)return e=>e;if(e.length!==1)throw Error(`delimiter must be exactly one character`);let t=e.charCodeAt(0);return e=>e.map(e=>_Ue(e,t))}var kq=92,Aq=47;function _Ue(e,t){if(t===kq)throw Error(`delimiter cannot be backslash`);let n=!1;for(let r=0,i=e.length;r<i;++r){switch(e.charCodeAt(r)){case kq:if(!n){n=!0;continue}break;case t:n?(e=e.slice(0,r-1)+e.slice(r),--r,--i):e=e.slice(0,r)+`/`+e.slice(r+1);break;case Aq:n?(e=e.slice(0,r)+`\\\\`+e.slice(r),r+=2,i+=2):(e=e.slice(0,r)+`\\`+e.slice(r),++r,++i);break}n=!1}return e}function vUe(e){let t=!1;for(let n=0,r=e.length;n<r;++n){switch(e.charCodeAt(n)){case kq:if(!t){t=!0;continue}case Aq:t&&(e=e.slice(0,n-1)+e.slice(n),--n,--r);break}t=!1}return e}function jq(e){return tz(e)&&typeof e.node==`function`}function yUe(e){return tz(e)&&typeof e.link==`function`}function Mq(e){if(jq(e))return e.node;if(e=`${e}`.trim().toLowerCase(),e.startsWith(`node:`)){switch(e){case`node:name`:return Fq;case`node:path`:return Pq;case`node:internal`:return Rq;case`node:external`:return zq;case`node:depth`:return Iq;case`node:height`:return Lq}throw Error(`invalid node value: ${e}`)}}function Nq(e){if(jq(e))return e.node;if(yUe(e))return e.link;if(e=`${e}`.trim().toLowerCase(),!(!e.startsWith(`node:`)&&!e.startsWith(`parent:`))){switch(e){case`parent:name`:return Bq(Fq);case`parent:path`:return Bq(Pq);case`parent:depth`:return Bq(Iq);case`parent:height`:return Bq(Lq);case`node:name`:return Fq;case`node:path`:return Pq;case`node:internal`:return Rq;case`node:external`:return zq;case`node:depth`:return Iq;case`node:height`:return Lq}throw Error(`invalid link value: ${e}`)}}function Pq(e){return e.id}function Fq(e){return bUe(e.id)}function Iq(e){return e.depth}function Lq(e){return e.height}function Rq(e){return!!e.children}function zq(e){return!e.children}function Bq(e){return(t,n)=>n==null?void 0:e(n)}function bUe(e){let t=e.length;for(;--t>0&&!xUe(e,t););return vUe(e.slice(t+1))}function xUe(e,t){if(e[t]===`/`){let n=0;for(;t>0&&e[--t]===`\\`;)++n;
172if(!(n&1))return!0}return!1}var Vq=2,Hq=3,Uq=4;function Wq(e,t){let n=[];for(let r in e){let i=e[r],a=t(i);a!==void 0&&n.push([r,...pz(i),a])}return n}function Gq(e,{fill:t,stroke:n,strokeWidth:r,strokeOpacity:i,strokeLinejoin:a,strokeLinecap:o,strokeMiterlimit:s,strokeDasharray:c,strokeDashoffset:l,marker:u,markerStart:d=u,markerEnd:f=u,dot:p=Oz(d)&&Oz(f),text:m=`node:name`,textStroke:h=`var(--plot-background)`,title:g=`node:path`,dx:_,dy:v,textAnchor:y,treeLayout:b=fE,textLayout:x=b===fE||b===rE?`mirrored`:`normal`,tip:S,...C}={}){if(_===void 0&&(_=Tq(C.treeAnchor).dx),y!==void 0)throw Error(`textAnchor is not a configurable tree option`);x=YR(x,`textLayout`,[`mirrored`,`normal`]);function w(n){return gU(e,Cq({treeLayout:b,text:m,fill:t===void 0?`currentColor`:t,stroke:h,dx:_,dy:v,title:g,...n,...C}))}return EH(zG(e,wq({treeLayout:b,markerStart:d,markerEnd:f,stroke:n===void 0?t===void 0?`node:internal`:t:n,strokeWidth:r,strokeOpacity:i,strokeLinejoin:a,strokeLinecap:o,strokeMiterlimit:s,strokeDasharray:c,strokeDashoffset:l,...C})),p?$G(e,Cq({treeLayout:b,fill:t===void 0?`node:internal`:t,title:g,tip:S,...C})):null,m==null?null:x===`mirrored`?[w({textAnchor:`start`,treeFilter:`node:external`}),w({textAnchor:`end`,treeFilter:`node:internal`,dx:-_})]:w())}function SUe(e,t){return Gq(e,{...t,treeLayout:rE})}var Kq={ariaLabel:`waffle`},qq=class extends GG{constructor(e,{unit:t=1,gap:n=1,round:r,multiple:i,...a}={}){super(e,Yq(`x`,a),Kq),this.unit=Math.max(0,t),this.gap=+n,this.round=Qq(r),this.multiple=$q(i)}},Jq=class extends KG{constructor(e,{unit:t=1,gap:n=1,round:r,multiple:i,...a}={}){super(e,Yq(`y`,a),Kq),this.unit=Math.max(0,t),this.gap=+n,this.round=Qq(r),this.multiple=$q(i)}};function Yq(e,t){let n=e===`y`?`x`:`y`,r=`${e}1`,i=`${e}2`;return Kz(CUe(t),function(t,a,o,s,c){let{round:l,unit:u}=this,d=o[r].value,f=o[i].value,p=DB({...n in o&&{[n]:o[n]},[r]:o[r],[i]:o[i]},s),m=this[e===`y`?`_width`:`_height`](s,p,c),h=this[e===`y`?`_x`:`_y`](s,p,c),g=u*EUe(s.scales[e]),{multiple:_=Math.max(1,Math.floor(Math.sqrt(m/g)))}=this,v=Math.min(m/_,g*_),y=g*_,b=(m-_*v)/2,x=typeof h==`function`?e=>h(e)+b:h+b,S=s[e](0),C=e===`y`?([e,t])=>[e*v,-t*y]:([e,t])=>[t*y,e*v],w=typeof x==`function`?e=>x(e)-m/2:()=>x,[T,E]=e===`y`?[0,1]:[1,0],D=f.length,O=Array(D),k=new Float64Array(D),A=new Float64Array(D);for(let e=0;e<D;++e){O[e]=Xq(l(d[e]/u),l(f[e]/u),_).map(C);let t=O[e].pop();k[e]=t[T]+w(e),A[e]=t[E]+S}return{channels:{polygon:{value:O,source:null,filter:null},[`c${n}`]:{value:[v,x],source:null,filter:null},[`c${e}`]:{value:[y,S],source:null,filter:null},[n]:{value:k,scale:null,source:null},[r]:{value:A,scale:null,source:o[r]},[i]:{value:A,scale:null,source:o[i]}}}})}function CUe({render:e,...t}){return{...t,render:DH(e,function(e,t,n,r,i){let{gap:a,rx:o,ry:s}=this,{channels:c,ariaLabel:l,href:u,title:d,...f}=n,{document:p}=i,m=c.polygon.value,[h,g]=c.cx.value,[_,v]=c.cy.value,y=_ze(),b=p.createElementNS(hx.svg,`pattern`);b.setAttribute(`width`,h),b.setAttribute(`height`,_),b.setAttribute(`patternUnits`,`userSpaceOnUse`);let x=b.appendChild(p.createElementNS(hx.svg,`rect`));return x.setAttribute(`x`,a/2),x.setAttribute(`y`,a/2),x.setAttribute(`width`,h-a),x.setAttribute(`height`,_-a),o!=null&&x.setAttribute(`rx`,o),s!=null&&x.setAttribute(`ry`,s),tH(`svg:g`,i).call(hH,this,r,i).call(this._transform,this,t).call(t=>t.selectAll().data(e).enter().append(()=>b.cloneNode(!0)).attr(`id`,e=>`${y}-${e}`).select(`rect`).call(gH,this).call(uH,this,f)).call(t=>t.selectAll().data(e).enter().append(`path`).attr(`transform`,fU`translate(${g},${v})`).attr(`d`,e=>`M${m[e].join(`L`)}Z`).attr(`fill`,e=>`url(#${y}-${e})`).attr(`stroke`,this.stroke==null?null:`none`).call(uH,this,{ariaLabel:l,href:u,title:d})).node()})}}function Xq(e,t,n){if(t<e)return Xq(t,e,n);if(e<0)return wUe(e,t,n,Math.ceil(-Math.min(e,t)/n));let r=Math.floor(e%n),i=Math.ceil(e%n),a=Math.floor(t%n),o=Math.ceil(t%n),s=Math.floor(e/n),c=Math.ceil(e/n),l=Math.floor(t/n),u=Math.ceil(t/n),d=[];return u>c&&d.push([0,c]),d.push([r,c],[r,s+e%1],[i,s+e%1]),e%n>n-1||(d.push([i,s]),l>s&&d.push([n,s])),l>
172s&&d.push([n,l]),d.push([o,l],[o,l+t%1],[a,l+t%1]),t%n<1||(d.push([a,u]),u>c&&d.push([0,u])),d.push(TUe(e,t,n)),d}function wUe(e,t,n,r){return Xq(e+r*n,t+r*n,n).map(([e,t])=>[e,t-r])}function TUe(e,t,n){let r=Math.floor(t/n)-Math.floor(e/n);return r===0?Zq(e,t,n):r===1?Math.floor(t%n)>Math.ceil(e%n)?[(Math.floor(t%n)+Math.ceil(e%n))/2,Math.floor(t/n)]:t%n>n-e%n?Zq(t-t%n,t,n):Zq(e,n*Math.ceil(e/n),n):[n/2,(Math.round(e/n)+Math.round(t/n))/2]}function Zq(e,t,n){let r=Math.floor(t)-Math.floor(e);return r===0?[Math.floor(e%n)+.5,Math.floor(e/n)+(e+t)/2%1]:r===1?t%1-e%1>.5?[Math.ceil(e%n),Math.floor(t/n)+(e%1+t%1)/2]:t%1>1-e%1?[Math.floor(t%n)+.5,Math.floor(t/n)+t%1/2]:[Math.floor(e%n)+.5,Math.floor(e/n)+(1+e%1)/2]:[Math.ceil(e%n)+Math.ceil(Math.floor(t)-Math.ceil(e))/2,Math.floor(e/n)+(t>=1+e?.5:(e+t)/2%1)]}function Qq(e){if(e===void 0||e===!1)return Number;if(e===!0)return Math.round;if(typeof e!=`function`)throw Error(`invalid round: ${e}`);return e}function $q(e){return e===void 0?void 0:Math.max(1,Math.floor(e))}function EUe({domain:e,range:t}){return eJ(t)/eJ(e)}function eJ(e){let[t,n]=Fg(e);return n-t}function DUe(e,{tip:t,...n}={}){return ez(n)||(n={...n,y:IR,x2:LR}),new qq(e,{tip:tJ(t),...TW(nU(bW(n)))})}function OUe(e,{tip:t,...n}={}){return ez(n)||(n={...n,x:IR,y2:LR}),new Jq(e,{tip:tJ(t),...EW(rU(xW(n)))})}function tJ(e){return e===!0?{maxRadius:1/0}:tz(e)&&e.maxRadius===void 0?{...e,maxRadius:1/0}:void 0}var kUe=o(((e,t)=>{function n(e,t,n,r,i){for(var a=i+1;r<=i;){var o=r+i>>>1,s=e[o];(n===void 0?s-t:n(s,t))>=0?(a=o,i=o-1):r=o+1}return a}function r(e,t,n,r,i){for(var a=i+1;r<=i;){var o=r+i>>>1,s=e[o];(n===void 0?s-t:n(s,t))>0?(a=o,i=o-1):r=o+1}return a}function i(e,t,n,r,i){for(var a=r-1;r<=i;){var o=r+i>>>1,s=e[o];(n===void 0?s-t:n(s,t))<0?(a=o,r=o+1):i=o-1}return a}function a(e,t,n,r,i){for(var a=r-1;r<=i;){var o=r+i>>>1,s=e[o];(n===void 0?s-t:n(s,t))<=0?(a=o,r=o+1):i=o-1}return a}function o(e,t,n,r,i){for(;r<=i;){var a=r+i>>>1,o=e[a],s=n===void 0?o-t:n(o,t);if(s===0)return a;s<=0?r=a+1:i=a-1}return-1}function s(e,t,n,r,i,a){return typeof n==`function`?a(e,t,n,r===void 0?0:r|0,i===void 0?e.length-1:i|0):a(e,t,void 0,n===void 0?0:n|0,r===void 0?e.length-1:r|0)}t.exports={ge:function(e,t,r,i,a){return s(e,t,r,i,a,n)},gt:function(e,t,n,i,a){return s(e,t,n,i,a,r)},lt:function(e,t,n,r,a){return s(e,t,n,r,a,i)},le:function(e,t,n,r,i){return s(e,t,n,r,i,a)},eq:function(e,t,n,r,i){return s(e,t,n,r,i,o)}}})),AUe=l(o(((e,t)=>{var n=kUe(),r=0,i=1,a=2;t.exports=x;function o(e,t,n,r,i){this.mid=e,this.left=t,this.right=n,this.leftPoints=r,this.rightPoints=i,this.count=(t?t.count:0)+(n?n.count:0)+r.length}var s=o.prototype;function c(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function l(e,t){var n=v(t);e.mid=n.mid,e.left=n.left,e.right=n.right,e.leftPoints=n.leftPoints,e.rightPoints=n.rightPoints,e.count=n.count}function u(e,t){var n=e.intervals([]);n.push(t),l(e,n)}function d(e,t){var n=e.intervals([]),a=n.indexOf(t);return a<0?r:(n.splice(a,1),l(e,n),i)}s.intervals=function(e){return e.push.apply(e,this.leftPoints),this.left&&this.left.intervals(e),this.right&&this.right.intervals(e),e},s.insert=function(e){var t=this.count-this.leftPoints.length;if(this.count+=1,e[1]<this.mid)this.left?4*(this.left.count+1)>3*(t+1)?u(this,e):this.left.insert(e):this.left=v([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?u(this,e):this.right.insert(e):this.right=v([e]);else{var r=n.ge(this.leftPoints,e,g),i=n.ge(this.rightPoints,e,_);this.leftPoints.splice(r,0,e),this.rightPoints.splice(i,0,e)}},s.remove=function(e){var t=this.count-this.leftPoints;if(e[1]<this.mid){if(!this.left)return r;if(4*(this.right?this.right.count:0)>3*(t-1))return d(this,e);var o=this.left.remove(e);return o===a?(this.left=null,--this.count,i):(o===i&&--this.count,o)}else if(e[0]>this.mid){if(!this.right)return r;if(4*(this.left?this.left.count:0)>3*(t-1))return d(this,e);var o=this.right.remove(e);return o===a?(this.right=null,--this.count,i):(o===i&&--this.count,o)}else{if(this.count===1)return this.leftPoints[0]===e?a:r;if(this.leftPoints.length===1&&this.leftPoints[0]===e){if(this.left&&this.right){for(var s=this,l=this.left;l.right;)s=l,l=l.right;if(s===this)l.right=this.right;else{var u=this.left,o=this.right;s.count-=l.count,s.right=l.left,l.left=u,l.right=o}c(this,l),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?c(this,this.left):c(this,this.right);return i}for(var u=n.ge(this.leftPoints,e,g);u<this.leftPoints.length&&this.leftPoints[u][0]===e[0];++u)if(this.leftPoints[u]===e){--this.count,this.leftPoints.splice(u,1);for(var o=n.ge(this.rightPoints,e,_);o<this.rightPoints.length&&this.rightPoints[o][1]===e[1];++o)if(this.rightPoints[o]===e)return this.rightPoints.splice(o,1),i}return r}};function f(e,t,n){for(var r=0;r<e.length&&e[r][0]<=t;++r){var i=n(e[r]);if(i)return i}}function p(e,t,n){for(var r=e.length-1;r>=0&&e[r][1]>=t;--r){var i=n(e[r]);if(i)return i}}function m(e,t){for(var n=0;n<e.length;++n){var r=t(e[n]);if(r)return r}}s.queryPoint=function(e,t){if(e<this.mid){if(this.left){var n=this.left.queryPoint(e,t);if(n)return n}return f(this.leftPoints,e,t)}else if(e>this.mid){if(this.right){var n=this.right.queryPoint(e,t);if(n)return n}return p(this.rightPoints,e,t)}else return m(this.leftPoints,t)},s.queryInterval=function(e,t,n){if(e<this.mid&&this.left){var r=this.left.queryInterval(e,t,n);if(r)return r}if(t>this.mid&&this.right){var r=this.right.queryInterval(e,t,n);if(r)return r}return t<this.mid?f(this.leftPoints,t,n):e>this.mid?p(this.rightPoints,e,n):m(this.leftPoints,n)};function h(e,t){return e-t}function g(e,t){return e[0]-t[0]||e[1]-t[1]}function _(e,t){return e[1]-t[1]||e[0]-t[0]}function v(e){if(e.length===0)return null;for(var t=[],n=0;n<e.length;++n)t.push(e[n][0],e[n][1]);t.sort(h);for(var r=t[t.length>>1],i=[],a=[],s=[],n=0;n<e.length;++n){var c=e[n];c[1]<r?i.push(c):r<c[0]?a.push(c):s.push(c)}var l=s,u=s.slice();return l.sort(g),u.sort(_),new o(r,v(i),v(a),l,u)}function y(e){this.root=e}var b=y.prototype;b.insert=function(e){this.root?this.root.insert(e):this.root=new o(e[0],null,null,[e],[e])},b.remove=function(e){if(this.root){var t=this.root.remove(e);return t===a&&(this.root=null),t!==r}return!1},b.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},b.queryInterval=function(e,t,n){if(e<=t&&this.root)return this.root.queryInterval(e,t,n)},Object.defineProperty(b,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function x(e){return!e||e.length===0?new y(null):new y(v(e))}}))(),1),jUe=({marginLeft:e})=>[1,e],MUe=({width:e,marginRight:t})=>[-1,e-t],NUe=({width:e,marginLeft:t,marginRight:n})=>[0,(t+e-n)/2],PUe=({marginTop:e})=>[1,e],FUe=({height:e,marginBottom:t})=>[-1,e-t],IUe=({height:e,marginTop:t,marginBottom:n})=>[0,(t+e-n)/2];function nJ(e){return typeof e==`string`?{anchor:e}:e}function LUe(e={},t={}){arguments.length===1&&([e,t]=rJ(e));let{anchor:n=`left`,padding:r=1,r:i=t.r}=nJ(e);switch(`${n}`.toLowerCase()){case`left`:n=jUe;break;case`right`:n=MUe;break;case`middle`:n=NUe;break;default:throw Error(`unknown dodge anchor: ${n}`)}return iJ(`x`,`y`,n,BR(r),i,t)}function RUe(e={},t={}){arguments.length===1&&([e,t]=rJ(e));let{anchor:n=`bottom`,padding:r=1,r:i=t.r}=nJ(e);switch(`${n}`.toLowerCase()){case`top`:n=PUe;break;case`bottom`:n=FUe;break;case`middle`:n=IUe;break;default:throw Error(`unknown dodge anchor: ${n}`)}return iJ(`y`,`x`,n,BR(r),i,t)}function rJ(e){let{anchor:t,padding:n,...r}=e,{r:i}=r;
172return[{anchor:t,padding:n,r:i},r]}function iJ(e,t,n,r,i,a){if(i!=null&&typeof i!=`number`){let{channels:e,sort:t,reverse:n}=a;e=Mz(e),e?.r===void 0&&(a={...a,channels:{...e,r:{value:i,scale:`r`}}}),t===void 0&&n===void 0&&(a.sort={channel:`-r`})}return Kz(a,function(a,o,s,c,l,u){let{[t]:d,r:f}=s;if(!s[t])throw Error(`missing channel: ${t}`);({[t]:d}=$V(s,c,u));let p=f?void 0:i===void 0?this.r===void 0?3:this.r:BR(i);f&&=MR(f.value,c[f.scale]||LR,Float64Array);let[m,h]=n(l),g=m?BUe:zUe,_=new Float64Array(d.length),v=f?e=>f[e]:()=>p;for(let e of o){let t=(0,AUe.default)();e=e.filter(f?e=>sR(d[e])&&cR(f[e]):e=>sR(d[e]));let n=new Float64Array(2*e.length+2);for(let i of e){let e=v(i),a=m?e+r:0,o=d[i]-e,s=d[i]+e,c=2;t.queryInterval(o-r,s+r,([,,e])=>{let t=_[e]-a,o=d[i]-d[e],s=r+(f?f[i]+f[e]:2*p),l=Math.sqrt(s*s-o*o);n[c++]=t-l,n[c++]=t+l});let l=n.slice(0,c);m&&(l=l.filter(e=>e>=0));out:for(let e of l.sort(g)){for(let t=0;t<c;t+=2)if(n[t]+1e-6<e&&e<n[t+1]-1e-6)continue out;_[i]=e+a;break}t.insert([o,s,i])}}m||=1;for(let e of o)for(let t of e)_[t]=_[t]*m+h;return{data:a,facets:o,channels:{[e]:{value:_,source:null},[t]:{value:d,source:s[t]},...f&&{r:{value:f,source:s.r}}}}})}function zUe(e,t){return Math.abs(e)-Math.abs(t)}function BUe(e,t){return e-t}function VUe(e,t){return arguments.length===1&&({basis:e,...t}=e),pK(aJ(e),t)}function HUe(e,t){return arguments.length===1&&({basis:e,...t}=e),mK(aJ(e),t)}function aJ(e){if(e===void 0)return cJ;if(typeof e==`function`)return oJ(uz(e));if(/^p\d{2}$/i.test(e))return sJ(WR(e));switch(`${e}`.toLowerCase()){case`deviation`:return GUe;case`first`:return cJ;case`last`:return WUe;case`max`:return KUe;case`mean`:return qUe;case`median`:return JUe;case`min`:return YUe;case`sum`:return XUe;case`extent`:return UUe}throw Error(`invalid basis: ${e}`)}function oJ(e){return{mapIndex(t,n,r){let i=+e(t,n);for(let e of t)r[e]=n[e]===null?NaN:n[e]/i}}}function sJ(e){return oJ((t,n)=>e(t,e=>n[e]))}var UUe={mapIndex(e,t,n){let[r,i]=Fg(e,e=>t[e]),a=i-r;for(let i of e)n[i]=t[i]===null?NaN:(t[i]-r)/a}},cJ=oJ((e,t)=>{for(let n=0;n<e.length;++n){let r=t[e[n]];if(rR(r))return r}}),WUe=oJ((e,t)=>{for(let n=e.length-1;n>=0;--n){let r=t[e[n]];if(rR(r))return r}}),GUe={mapIndex(e,t,n){let r=l_(e,e=>t[e]),i=Pg(e,e=>t[e]);for(let a of e)n[a]=t[a]===null?NaN:i?(t[a]-r)/i:0}},KUe=sJ(n_),qUe=sJ(l_),JUe=sJ(u_),YUe=sJ(r_),XUe=sJ(h_);function ZUe(e,t){return lJ(`x`,e,t)}function QUe(e,t){return lJ(`y`,e,t)}function lJ(e,t,n={}){let r,i=1;if(typeof t==`number`)i=t,r=(e,t)=>+e+t;else{if(typeof t==`string`){let e=t.startsWith(`-`)?-1:1;[t,i]=ER(t.replace(/^[+-]/,``)),i*=e}t=vz(t),r=(e,n)=>t.offset(e,n)}let a=`${e}1`,o=`${e}2`,s=hK({[a]:e=>e.map(e=>r(e,i)),[o]:e=>e},n),c=s[o].transform;return s[o].transform=()=>{let e=c(),[t,n]=Fg(e);return e.domain=i<0?[t,r(n,i)]:[r(t,i),n],e},s}function $Ue(e,t={}){if(typeof e==`string`)switch(e.toLowerCase()){case`first`:return uJ(t);case`last`:return dJ(t)}if(typeof e==`function`)return vJ(null,e,t);let n,r;for(n in e){if(r!==void 0)throw Error(`ambiguous selector; multiple inputs`);r=eWe(e[n])}if(r===void 0)throw Error(`invalid selector: ${e}`);return vJ(n,r,t)}function eWe(e){if(typeof e==`function`)return e;switch(`${e}`.toLowerCase()){case`min`:return gJ;case`max`:return _J}throw Error(`unknown selector: ${e}`)}function uJ(e){return vJ(null,tWe,e)}function dJ(e){return vJ(null,nWe,e)}function fJ(e){return vJ(`x`,gJ,e)}function pJ(e){return vJ(`y`,gJ,e)}function mJ(e){return vJ(`x`,_J,e)}function hJ(e){return vJ(`y`,_J,e)}function*tWe(e){yield e[0]}function*nWe(e){yield e[e.length-1]}function*gJ(e,t){yield Rde(e,e=>t[e])}function*_J(e,t){yield o_(e,e=>t[e])}function vJ(e,t,n){if(e!=null){if(n[e]==null)throw Error(`missing channel: ${e}`);e=n[e]}let r=oz(n);return Gz(n,(n,i)=>{let a=MR(n,r),o=MR(n,e),s=[];for(let e of i){let n=[];for(let r of a?Vg(e,e=>a[e]).values():[e])for(let e of t(r,o))n.push(e);s.push(n)}return{data:n,facets:s}})}var rWe=s({Area:()=>PG,Arrow:()=>VG,BarX:()=>GG,BarY:()=>KG,Cell:()=>YG,Contour:()=>YK,Density:()=>iq,Dot:()=>QG,Frame:()=>GW,Geo:()=>dq,Hexgrid:()=>mq,Image:()=>gq,Line:()=>eK,Link:()=>RG,Mark:()=>TH,Raster:()=>RK,Rect:()=>IW,RuleX:()=>sU,RuleY:()=>cU,Text:()=>mU,TickX:()=>EK,TickY:()=>DK,Tip:()=>JW,Vector:()=>LU,WaffleX:()=>qq,WaffleY:()=>Jq,area:()=>FG,areaX:()=>IG,areaY:()=>LG,arrow:()=>CVe,auto:()=>FVe,autoSpec:()=>iK,axisFx:()=>XU,axisFy:()=>JU,axisX:()=>YU,axisY:()=>qU,barX:()=>qG,barY:()=>JG,bin:()=>yG,binX:()=>_G,binY:()=>vG,bollinger:()=>wK,bollingerX:()=>eHe,bollingerY:()=>tHe,boxX:()=>rHe,boxY:()=>iHe,cell:()=>XG,cellX:()=>EVe,cellY:()=>DVe,centroid:()=>uq,circle:()=>jVe,cluster:()=>SUe,column:()=>pz,contour:()=>vHe,crosshair:()=>bHe,crosshairX:()=>xHe,crosshairY:()=>SHe,delaunayLink:()=>FHe,delaunayMesh:()=>IHe,density:()=>VHe,differenceX:()=>WHe,differenceY:()=>GHe,dodgeX:()=>LUe,dodgeY:()=>RUe,dot:()=>$G,dotX:()=>kVe,dotY:()=>AVe,filter:()=>PLe,find:()=>YLe,formatIsoDate:()=>aH,formatMonth:()=>fze,formatNumber:()=>iH,formatWeekday:()=>pze,frame:()=>KW,geo:()=>fq,geoCentroid:()=>KHe,graticule:()=>YHe,gridFx:()=>nW,gridFy:()=>eW,gridX:()=>tW,gridY:()=>$U,group:()=>iB,groupX:()=>nB,groupY:()=>rB,groupZ:()=>tB,hexagon:()=>MVe,hexbin:()=>XHe,hexgrid:()=>$He,hull:()=>LHe,identity:()=>LR,image:()=>iUe,indexOf:()=>IR,initializer:()=>Kz,interpolateNearest:()=>KK,interpolateNone:()=>UK,interpolatorBarycentric:()=>WK,interpolatorRandomWalk:()=>qK,legend:()=>pBe,line:()=>tK,lineX:()=>nK,lineY:()=>rK,linearRegressionX:()=>fUe,linearRegressionY:()=>pUe,link:()=>zG,map:()=>hK,mapX:()=>pK,mapY:()=>mK,marks:()=>EH,normalize:()=>aJ,normalizeX:()=>VUe,normalizeY:()=>HUe,numberInterval:()=>fLe,plot:()=>tG,pointer:()=>MH,pointerX:()=>NH,pointerY:()=>PH,raster:()=>oHe,rect:()=>HW,rectX:()=>UW,rectY:()=>WW,reverse:()=>FLe,ruleX:()=>lU,ruleY:()=>uU,scale:()=>MV,select:()=>$Ue,selectFirst:()=>uJ,selectLast:()=>dJ,selectMaxX:()=>mJ,selectMaxY:()=>hJ,selectMinX:()=>fJ,selectMinY:()=>pJ,shiftX:()=>ZUe,shiftY:()=>QUe,shuffle:()=>ILe,sort:()=>Qz,sphere:()=>JHe,spike:()=>tBe,stackX:()=>CW,stackX1:()=>vBe,stackX2:()=>yBe,stackY:()=>wW,stackY1:()=>bBe,stackY2:()=>xBe,text:()=>gU,textX:()=>_U,textY:()=>vU,tickX:()=>OK,tickY:()=>kK,timeInterval:()=>DR,tip:()=>YW,transform:()=>Gz,tree:()=>Gq,treeLink:()=>wq,treeNode:()=>Cq,utcInterval:()=>OR,valueof:()=>MR,vector:()=>RU,vectorX:()=>zU,vectorY:()=>BU,voronoi:()=>RHe,voronoiMesh:()=>zHe,waffleX:()=>DUe,waffleY:()=>OUe,window:()=>_K,windowX:()=>HVe,windowY:()=>UVe});TH.prototype.plot=function({marks:e=[],...t}={}){return tG({...t,marks:[...e,this]})};var iWe=new Map([[`style`,`style`],[`width`,`width`],[`height`,`height`],[`margin`,`margin`],[`marginLeft`,`marginLeft`],[`marginRight`,`marginRight`],[`marginTop`,`marginTop`],[`marginBottom`,`marginBottom`],[`align`,`align`],[`aspectRatio`,`aspectRatio`],[`axis`,`axis`],[`inset`,`inset`],[`grid`,`grid`],[`label`,`label`],[`padding`,`padding`],[`xScale`,`x.type`],[`xDomain`,`x.domain`],[`xRange`,`x.range`],[`xNice`,`x.nice`],[`xInset`,`x.inset`],[`xInsetLeft`,`x.insetLeft`],[`xInsetRight`,`x.insetRight`],[`xClamp`,`x.clamp`],[`xRound`,`x.round`],[`xAlign`,`x.align`],[`xPadding`,`x.padding`],[`xPaddingInner`,`x.paddingInner`],[`xPaddingOuter`,`x.paddingOuter`],[`xAxis`,`x.axis`],[`xTicks`,`x.ticks`],[`xTickSize`,`x.tickSize`],[`xTickSpacing`,`x.tickSpacing`],[`xTickPadding`,`x.tickPadding`],[`xTickFormat`,`x.tickFormat`],[`xTickRotate`,`x.tickRotate`],[`xGrid`,`x.grid`],[`xLine`,`x.line`],[`xLabel`,`x.label`],[`xLabelAnchor`,`x.labelAnchor`],[`xLabelArrow`,`x.labelArrow`],[`xLabelOffset`,`x.labelOffset`],[`xFontVariant`,`x.fontVariant`],[`xAriaLabel`,`x.ariaLabel`],[`xAriaDescription`,`x.ariaDescription`],[`xPercent`,`x.percent`],[`xReverse`,`x.reverse`],[`xZero`,`x.zero`],[`xBase`,`x.base`],[`xExponent`,`x.exponent`],[`xConstant`,`x.constant`],[`yScale`,`y.type`],[`yDomain`,`y.domain`],[`yRange`,`y.range`],[`yNice`,`y.nice`],[`yInset`,`y.inset`],[`yInsetTop`,`y.insetTop`],[`yInsetBottom`,`y.insetBottom`],[`yClamp`,`y.clamp`],[`yRound`,`y.round`],[`yAlign`,`y.align`],[`yPadding`,`y.padding`],[`yPaddingInner`,`y.paddingInner`],[`yPaddingOuter`,`y.paddingOuter`],[`yAxis`,`y.axis`],[`yTicks`,`y.ticks`],[`yTickSize`,`y.tickSize`],[`yTickSpacing`,`y.tickSpacing`],[`yTickPadding`,`y.tickPadding`],[`yTickFormat`,`y.tick
172Format`],[`yTickRotate`,`y.tickRotate`],[`yGrid`,`y.grid`],[`yLine`,`y.line`],[`yLabel`,`y.label`],[`yLabelAnchor`,`y.labelAnchor`],[`yLabelArrow`,`y.labelArrow`],[`yLabelOffset`,`y.labelOffset`],[`yFontVariant`,`y.fontVariant`],[`yAriaLabel`,`y.ariaLabel`],[`yAriaDescription`,`y.ariaDescription`],[`yPercent`,`y.percent`],[`yReverse`,`y.reverse`],[`yZero`,`y.zero`],[`yBase`,`y.base`],[`yExponent`,`y.exponent`],[`yConstant`,`y.constant`],[`facetMargin`,`facet.margin`],[`facetMarginTop`,`facet.marginTop`],[`facetMarginBottom`,`facet.marginBottom`],[`facetMarginLeft`,`facet.marginLeft`],[`facetMarginRight`,`facet.marginRight`],[`facetGrid`,`facet.grid`],[`facetLabel`,`facet.label`],[`fxDomain`,`fx.domain`],[`fxRange`,`fx.range`],[`fxInset`,`fx.inset`],[`fxInsetLeft`,`fx.insetLeft`],[`fxInsetRight`,`fx.insetRight`],[`fxRound`,`fx.round`],[`fxAlign`,`fx.align`],[`fxPadding`,`fx.padding`],[`fxPaddingInner`,`fx.paddingInner`],[`fxPaddingOuter`,`fx.paddingOuter`],[`fxAxis`,`fx.axis`],[`fxTicks`,`fx.ticks`],[`fxTickSize`,`fx.tickSize`],[`fxTickSpacing`,`fx.tickSpacing`],[`fxTickPadding`,`fx.tickPadding`],[`fxTickFormat`,`fx.tickFormat`],[`fxTickRotate`,`fx.tickRotate`],[`fxGrid`,`fx.grid`],[`fxLine`,`fx.line`],[`fxLabel`,`fx.label`],[`fxLabelAnchor`,`fx.labelAnchor`],[`fxLabelOffset`,`fx.labelOffset`],[`fxFontVariant`,`fx.fontVariant`],[`fxAriaLabel`,`fx.ariaLabel`],[`fxAriaDescription`,`fx.ariaDescription`],[`fxReverse`,`fx.reverse`],[`fyDomain`,`fy.domain`],[`fyRange`,`fy.range`],[`fyInset`,`fy,inset`],[`fyInsetTop`,`fy.insetTop`],[`fyInsetBottom`,`fy.insetBottom`],[`fyRound`,`fy.round`],[`fyAlign`,`fy.align`],[`fyPadding`,`fy.padding`],[`fyPaddingInner`,`fy.paddingInner`],[`fyPaddingOuter`,`fy.paddingOuter`],[`fyAxis`,`fy.axis`],[`fyTicks`,`fy.ticks`],[`fyTickSize`,`fy.tickSize`],[`fyTickSpacing`,`fy.tickSpacing`],[`fyTickPadding`,`fy.tickPadding`],[`fyTickFormat`,`fy.tickFormat`],[`fyTickRotate`,`fy.tickRotate`],[`fyGrid`,`fy.grid`],[`fyLine`,`fy.line`],[`fyLabel`,`fy.label`],[`fyLabelAnchor`,`fy.labelAnchor`],[`fyLabelOffset`,`fy.labelOffset`],[`fyFontVariant`,`fy.fontVariant`],[`fyAri
172aLabel`,`fy.ariaLabel`],[`fyAriaDescription`,`fy.ariaDescription`],[`fyReverse`,`fy.reverse`],[`colorScale`,`color.type`],[`colorDomain`,`color.domain`],[`colorRange`,`color.range`],[`colorClamp`,`color.clamp`],[`colorN`,`color.n`],[`colorNice`,`color.nice`],[`colorScheme`,`color.scheme`],[`colorInterpolate`,`color.interpolate`],[`colorPivot`,`color.pivot`],[`colorSymmetric`,`color.symmetric`],[`colorLabel`,`color.label`],[`colorPercent`,`color.percent`],[`colorReverse`,`color.reverse`],[`colorZero`,`color.zero`],[`colorTickFormat`,`color.tickFormat`],[`colorBase`,`color.base`],[`colorExponent`,`color.exponent`],[`colorConstant`,`color.constant`],[`opacityScale`,`opacity.type`],[`opacityDomain`,`opacity.domain`],[`opacityRange`,`opacity.range`],[`opacityClamp`,`opacity.clamp`],[`opacityNice`,`opacity.nice`],[`opacityLabel`,`opacity.label`],[`opacityPercent`,`opacity.percent`],[`opacityReverse`,`opacity.reverse`],[`opacityZero`,`opacity.zero`],[`opacityTickFormat`,`opacity.tickFormat`],[`opacityBase`,`opacity.base`],[`opacityExponent`,`opacity.exponent`],[`opacityConstant`,`opacity.constant`],[`symbolScale`,`symbol.type`],[`symbolDomain`,`symbol.domain`],[`symbolRange`,`symbol.range`],[`rScale`,`r.type`],[`rDomain`,`r.domain`],[`rRange`,`r.range`],[`rClamp`,`r.clamp`],[`rNice`,`r.nice`],[`rLabel`,`r.label`],[`rPercent`,`r.percent`],[`rZero`,`r.zero`],[`rBase`,`r.base`],[`rExponent`,`r.exponent`],[`rConstant`,`r.constant`],[`lengthScale`,`length.type`],[`lengthDomain`,`length.domain`],[`lengthRange`,`length.range`],[`lengthClamp`,`length.clamp`],[`lengthNice`,`length.nice`],[`lengthPercent`,`length.percent`],[`lengthZero`,`length.zero`],[`lengthBase`,`length.base`],[`lengthExponent`,`length.exponent`],[`lengthConstant`,`length.constant`],[`projectionType`,`projection.type`],[`projectionParallels`,`projection.parallels`],[`projectionPrecision`,`projection.precision`],[`projectionRotate`,`projection.rotate`],[`projectionDomain`,`projection.domain`],[`projectionInset`,`projection.inset`],[`projectionInsetLeft`,`projection.insetLeft`],[`projectionInsetRight`,`projection.insetRight`],[`projectionInsetTop`,`projection.insetTop`],[`projectionInsetBottom`,`projection.insetBottom`],[`projectionClip`,`projection.clip`]]);function aWe(e,t,n){for(let r=0;r<t.length;++r){let i=t[r];r===t.length-1?e[i]=n:e=e[i]||(e[i]={})}}function oWe(e,t,n){for(let r in e){let i=iWe.get(r);if(i==null)throw Error(`Unrecognized plot attribute: ${r}`);let a=e[r];typeof a==`symbol`?n.push(r):a!==void 0&&aWe(t,i.split(`.`),a)}}var sWe=new Set([`frame`,`hexgrid`,`sphere`,`graticule`]),cWe=new Map([[`first`,uJ],[`last`,dJ],[`maxX`,mJ],[`maxY`,hJ],[`minX`,fJ],[`minY`,pJ],[`nearest`,MH],[`nearestX`,NH],[`nearestXY`,PH]]);async function lWe(e){let t={marks:[]},n=[],{attributes:r,marks:i}=e;oWe(r,t,n);let a=[];for(let e of i)for(let{type:n,data:r,options:i}of e.plotSpecs()){let{select:o,...s}=i,c=cWe.get(o)?.(s)??s,l=sWe.has(n)?[c]:[r,c];t.marks.push(rWe[n](...l)),e.index>-1&&a.push(e.index)}dWe(t,e);let o=tG(t);pWe(o,a),uWe(e,o,r,n);for(let t of e.interactors)await t.init(o);return o}function uWe(e,t,n,r){r.forEach(r=>{let i=n[r];if(i===tR){if(!r.endsWith(`Domain`))throw Error(`Unsupported fixed attribute: ${r}`);let i=r.slice(0,-6),a=t.scale(i);a?.domain&&e.setAttribute(r,n[`${i}Reverse`]?a.domain.slice().reverse():a.domain)}else throw Error(`Unrecognized symbol: ${i}`)})}function dWe(e,t){let{marks:n}=t;yJ(`x`,e,n),yJ(`y`,e,n),yJ(`fx`,e,n),yJ(`fy`,e,n)}function yJ(e,t,n){let r=t[e]||{};if(r.axis===null||r.label!==void 0)return;let i=n.map(t=>t.channelField(e)?.field);if(i.every(e=>e==null))return;let a;for(let e=0;e<i.length;++e){let t=bJ(i[e]);t!==void 0&&(a===void 0?a=t:a!==t&&(a=void 0))}a!==void 0&&(t[e]={...r,label:a})}function bJ(e){if(e){switch(e.type){case`COLUMN_REF`:case`CUSTOM`:return e.column;case`CAST`:return bJ(e.expr);case`FUNCTION`:if(e.name===`make_date`)return`date`;break}return fWe(e)}}function fWe(e){let t=`${e}`.replaceAll(`"`,``).replaceAll(`(*)`,`()`);return t.endsWith(`()`)?t.slice(0,-2):t}function pWe(e,t){let n=-1;for(let r of e.children){let e=r.getAttribute(`aria-label`)||``;
172r.nodeName===`style`||e.includes(`-axis`)||e.includes(`-grid`)||e===`frame`||e===`hexgrid`||r.setAttribute(`data-index`,t[++n])}}var xJ=new Set([`frame`,`axisX`,`axisY`,`axisFx`,`axisFy`,`gridX`,`gridY`,`gridFx`,`gridFy`,`hexgrid`]),mWe={width:640,marginLeft:40,marginRight:20,marginTop:20,marginBottom:30},hWe=class{constructor(e){this.attributes={...mWe},this.listeners=null,this.interactors=[],this.legends=[],this.marks=[],this.markset=null,this.params=new Map,this.synch=new yIe,this.element=e||document.createElement(`div`),this.element.setAttribute(`class`,`plot`),this.element.style.display=`flex`,Object.assign(this.element,{value:this})}margins(){return{left:this.getAttribute(`marginLeft`),top:this.getAttribute(`marginTop`),bottom:this.getAttribute(`marginBottom`),right:this.getAttribute(`marginRight`)}}innerWidth(){let{left:e,right:t}=this.margins();return this.getAttribute(`width`)-e-t}innerHeight(e=400){let{top:t,bottom:n}=this.margins(),r=this.getAttribute(`height`);return r??(r=gWe(this,t,n)||e,this.setAttribute(`height`,r,{silent:!0})),r-t-n}pending(e){this.synch.pending(e)}update(e){return this.synch.ready(e)&&!this.pendingRender&&(this.pendingRender=!0,requestAnimationFrame(()=>this.render())),this.synch.promise}async render(){this.pendingRender=!1;let e=await lWe(this),t=this.legends.flatMap(({legend:t,include:n})=>{let r=t.init(e);return n?r:[]});this.element.replaceChildren(e,...t),this.synch.resolve()}getAttribute(e){return this.attributes[e]}setAttribute(e,t,n){return Qj(this.attributes[e],t)?(t===void 0?delete this.attributes[e]:this.attributes[e]=t,n?.silent||this.listeners?.get(e)?.forEach(n=>n(e,t)),!0):!1}addAttributeListener(e,t){let n=this.listeners||=new Map;return n.has(e)||n.set(e,new Set),n.get(e).add(t),this}removeAttributeListener(e,t){return this.listeners?.get(e)?.delete(t)}addParams(e,t){let{params:n}=this;for(let r of t)n.has(r)?n.get(r).push(e):(n.set(r,[e]),r.addEventListener(`value`,()=>Promise.allSettled(n.get(r).map(e=>e.initialize()))))}addMark(e){let t=xJ.has(e.type)?-1:this.marks.reduce((e,t)=>e+ +!xJ.has(t.type),0);return e.setPlot(this,t),this.marks.push(e),this.markset=null,this}get markSet(){return this.markset||=new Set(this.marks)}addInteractor(e){return this.interactors.push(e),this}addLegend(e,t=!0){e.setPlot(this),this.legends.push({legend:e,include:t})}};function gWe(e,t,n){let r=e.getAttribute(`aspectRatio`);if(r==null)return;let i=e.getAttribute(`xDomain`),a=e.getAttribute(`yDomain`);if(!i||!a)return;let o=Math.abs(i[1]-i[0]);return Math.abs(a[1]-a[0])*e.innerWidth()/(r*o)+t+n}function SJ(e){return typeof e==`string`?(e=e.toLowerCase().trim(),e===`none`||e===`currentcolor`||e.startsWith(`url(`)&&e.endsWith(`)`)||e.startsWith(`var(`)&&e.endsWith(`)`)||P_(e)!==null):!1}var _We=new Set(`offset.order.reverse.sort.label.anchor.curve.tension.marker.markerStart.markerMid.markerEnd.textAnchor.lineAnchor.lineHeight.textOverflow.monospace.fontFamily.fontSize.fontStyle.fontVariant.fontWeight.frameAnchor.strokeLinejoin.strokeLinecap.strokeMiterlimit.strokeDasharray.strokeDashoffset.mixBlendMode.shapeRendering.imageRendering.preserveAspectRatio.interpolate.crossOrigin.paintOrder.pointerEvents.target.select`.split(`.`));function vWe(e){return _We.has(e)}var yWe=new Set([`asterisk`,`circle`,`cross`,`diamond`,`diamond2`,`hexagon`,`plus`,`square`,`square2`,`star`,`times`,`triangle`,`triangle2`,`wye`]);function bWe(e){return yWe.has(`${e}`.toLowerCase())}var CJ=e=>e===`stroke`||e===`fill`,xWe=e=>/opacity$/i.test(e),SWe=e=>e===`symbol`,CWe=(e,t)=>e!==`sort`&&e!==`tip`&&t!=null&&!Array.isArray(t),wJ=(e,t)=>({channel:e,field:t,as:qO(t)&&!XO(t)?t.column:e}),TJ=(e,t)=>({channel:e,value:t}),EJ=e=>Array.isArray(e),DJ=class extends iD{constructor(e,t,n,r={}){super(t?.options?.filterBy),this.type=e,this.reqs=r,this.source=t;let i=this.channels=[],a=this.detail=new Set,o=this.params=new Set;EJ(t)?this.data=$L(t):$j(t?.table)&&o.add(t.table);let s=(e,t)=>{let n=typeof t;if(e===`channels`)for(let e in t)a.add(e),s(e,t[e]);else if(n===`function`&&t[MIe]){let n=t(this,e);for(let e in n)s(e,n[e])}else if(n===`string`)vWe(e)||CJ(e)&&SJ(t)||SWe(e)&&bWe(t)?i.push(TJ(e,t)):i.push(wJ(e,tk(t)));else if(ek(t)){let n=TJ(e,t.value);i.push(n),t.addEventListener(`value`,e=>(n.value=e,this.update()))}
172else YD(t)?(vj(t).forEach(e=>o.add(e)),i.push(wJ(e,t))):n===`object`&&CWe(e,t)?i.push(wJ(e,t)):t!==void 0&&i.push(TJ(e,t))};for(let e in n)s(e,n[e])}setPlot(e,t){this.plot=e,this.index=t,e.addParams(this,this.params),this.source?.table&&this.queryPending()}sourceTable(){let e=this.source?.table;return e?$j(e)?e.value:e:null}hasOwnData(){return this.source==null||EJ(this.source)}hasFieldInfo(){return!!this._fieldInfo}channel(e){return this.channels.find(t=>t.channel===e)}channelField(e,{exact:t=!1}={}){let n=t?this.channel(e):this.channels.find(t=>t.channel.startsWith(e));return n?.field?n:null}async prepare(){if(this.hasOwnData())return null;let{channels:e,reqs:t}=this,n=new Map;for(let{channel:r,field:i}of e){if(!i)continue;let e=i.stats?.stats||[],a=i.stats?.column??i,o=n.get(a)??n.set(a,new Set).get(a);e.forEach(e=>o.add(e)),t[r]?.forEach(e=>o.add(e))}let r=this.sourceTable(),i=await DIe(this.coordinator,Array.from(n,([e,t])=>({table:r,column:e,stats:Array.from(t)}))),a=Object.fromEntries(i.map(e=>[e.column,e]));for(let e of this.channels){let{field:t}=e;t&&Object.assign(e,a[t.stats?.column??t])}this._fieldInfo=!0}query(e=[]){return this.hasOwnData()?null:TWe(this.channels,this.sourceTable()).where(e)}queryPending(){return this.plot.pending(this),this}queryResult(e){return this.data=$L(e),this}update(){return this.plot.update(this)}plotSpecs(){let{type:e,data:t,detail:n,channels:r}=this;return EWe(e,n,r,t)}};function wWe(e,t){let n=t?.[e.as]??e.as;return Object.hasOwn(e,`value`)?e.value:CJ(e.channel)?{value:n,scale:`color`}:xWe(e.channel)?{value:n,scale:`opacity`}:n}function TWe(e,t,n=[]){let r=Uk.from({source:t}),i=new Set,a=!1;for(let t of e){let{channel:e,field:o,as:s}=t;if(!n.includes(e)){if(e===`orderby`)r.orderby(t.value??o);else if(o){if(hj(o))a=!0;else{if(i.has(s))continue;i.add(s)}r.select({[s]:o})}}}return a&&r.groupby(Array.from(i)),r}function EWe(e,t,n,r,i={}){let{numRows:a,values:o,columns:s}=r??{},c={};for(let e of n){let n=t.has(e.channel)?c:i;n[e.channel]=wWe(e,s)}return t.size&&(i.channels=c),[{type:e,data:o??(r?{length:a}:null),options:i}]}function OJ(e,t){let{plot:n}=e,r=n.getAttribute(`${t}Scale`);if(!r){let{type:n}=e.channelField(t);r=n===`date`?`time`:`linear`}let i={type:r};switch(r){case`log`:i.base=n.getAttribute(`${t}Base`)??10;break;case`pow`:i.exponent=n.getAttribute(`${t}Exponent`)??1;break;case`symlog`:i.constant=n.getAttribute(`${t}Constant`)??1;break}return Pj(i)}function kJ(e,t,n,r,i=1,a){let{field:o}=e.channelField(t);a??=o;let{type:s,apply:c,sqlApply:l}=OJ(e,t),u=!!e.plot.getAttribute(`${t}Reverse`),[d,f]=r.map(e=>c(e)),p=l(a),m=s===`time`||s===`utc`?p:a;return[PAe(p,d,f,n-i,u),m]}var DWe={x:[`min`,`max`]},OWe={y:[`min`,`max`]},kWe={...DWe,...OWe};function AJ(e,t,n,r,i){let{plot:a}=e,o=a.getAttribute(r),s=a.getAttribute(i);if(Array.isArray(o)&&!o[nR])return o;{let{column:i,min:c,max:l}=e.channelField(n),u=jJ(t,i)||(s?yy().domain([c,l]).nice().domain():[c,l]);return o!==tR&&(u[nR]=!0),a.setAttribute(r,u,{silent:!0}),u}}function AWe(e,t){return AJ(e,t,`x`,`xDomain`,`xNice`)}function jWe(e,t){return AJ(e,t,`y`,`yDomain`,`yNice`)}function jJ(e,t){if(!e)return;let n,r,i=`${t}`;return[e].flat().forEach(e=>pj(e,e=>{if(e instanceof xk&&`${e.expr}`===i){let t=(e.extent??[]).map(e=>e?.value??e);(n==null||t[0]<n)&&(n=t[0]),(r==null||t[1]>r)&&(r=t[1])}})),n!=null&&r!=null&&n!==r?[n,r]:void 0}var MWe=class extends DJ{constructor(e,t,n){let r=e.endsWith(`X`)?`y`:e.endsWith(`Y`)?`x`:null;super(e,t,n,r?{[r]:[`count`,`min`,`max`]}:void 0),this.dim=r}query(e=[]){let{plot:t,dim:n,source:r}=this,i=r.options?.optimize,a=super.query(e);if(!n)return a;let o=n===`x`?`y`:`x`,s=this.channelField(o,{exact:!0})?.as,{field:c,as:l,type:u,count:d,min:f,max:p}=this.channelField(n),m=u===`date`||u===`number`,h=n===`x`?t.innerWidth():t.innerHeight(),g=Math.ceil(h*(globalThis.devicePixelRatio||1));if(i??=d/g>10,i&&m&&s){let[t,r]=jJ(e,c)||[f,p],[i]=kJ(this,n,g,[t,r],1,l);return cje(a,i,l,s,a._select.map(e=>e.alias).filter(e=>e!==l&&e!==s))}else return a.orderby(l)}};function NWe(e,t=[]){return new t.constructor(e)}function PWe(e,t,n,r,i,a,o){if(!n?.length)return{numRows:0,columns:{}};let s=n.length,c=e*t,l=i.map(e=>r[e]),u={},d=[],f=new Int32Array(s);if(a?.length){let e=a.map(e=>r[e]),t={};for(let n=0;n<s;++n){let r=e.map(e=>e[n]);f[n]=t[r]??=d.push(r)-1}for(let e=0;e<a.length;++e)u[a[e]]=d.map(t=>t[e])}else d.push([]);if(o){let r=n.map(t=>t%e),a=n.map(t=>Math.floor(t/e)),c=d.map(()=>[]);for(let e=0;e<s;++e)c[f[e]].push(e);
172i.forEach((n,i)=>{let s=l[i];u[n]=d.map((n,i)=>o(c[i],e,t,r,a,s))})}else i.forEach((e,t)=>{let r=l[t],i=u[e]=d.map(()=>NWe(c,r));for(let e=0;e<s;++e)i[f[e]][n[e]]=r[e]});return{numRows:d.length,columns:u}}function MJ(e){let t=1/0,n=-1/0;return e.forEach(e=>{let r=e.length;for(let i=0;i<r;++i){let r=e[i];r<t&&(t=r),r>n&&(n=r)}}),Number.isFinite(t)&&Number.isFinite(n)?[t,n]:[0,1]}function FWe(e){let t=new Rg;return e.forEach(e=>{let n=e.length;for(let r=0;r<n;++r)t.add(e[r])}),Array.from(t).sort(xg)}function NJ(e,t){return $j(e)?(e.addEventListener(`value`,t),e.value):e}function PJ(e,t=!1){let n=new Float64Array(5),r=new Float64Array(4);IWe(n,r,e);let i=Float64Array.of(0,r[1]-n[1]*r[0],r[2]-n[2]*r[0],r[3]-n[3]*r[0],-n[4]*r[0]),a=1+n[1]+n[2]+n[3]+n[4];return{sigma:e,negative:t,a:n,b_causal:r,b_anticausal:i,sum_causal:(r[0]+r[1]+r[2]+r[3])/a,sum_anticausal:(i[1]+i[2]+i[3]+i[4])/a}}function IWe(e,t,n){let r=Float64Array.of(.84,1.8675,.84,-1.8675,-.34015,-.1299,-.34015,.1299),i=Math.exp(-1.783/n),a=Math.exp(-1.723/n),o=.6318/n,s=1.997/n,c=Float64Array.of(-i*Math.cos(o),i*Math.sin(o),-i*Math.cos(-o),i*Math.sin(-o),-a*Math.cos(s),a*Math.sin(s),-a*Math.cos(-s),a*Math.sin(-s)),l=n*2.5066282746310007,u=Float64Array.of(r[0],r[1],0,0,0,0,0,0),d=Float64Array.of(1,0,c[0],c[1],0,0,0,0,0,0),f,p;for(p=2;p<8;p+=2){for(u[p]=c[p]*u[p-2]-c[p+1]*u[p-1],u[p+1]=c[p]*u[p-1]+c[p+1]*u[p-2],f=p-2;f>0;f-=2)u[f]+=c[p]*u[f-2]-c[p+1]*u[f-1],u[f+1]+=c[p]*u[f-1]+c[p+1]*u[f-2];for(f=0;f<=p;f+=2)u[f]+=r[p]*d[f]-r[p+1]*d[f+1],u[f+1]+=r[p]*d[f+1]+r[p+1]*d[f];for(d[p+2]=c[p]*d[p]-c[p+1]*d[p+1],d[p+3]=c[p]*d[p+1]+c[p+1]*d[p],f=p;f>0;f-=2)d[f]+=c[p]*d[f-2]-c[p+1]*d[f-1],d[f+1]+=c[p]*d[f-1]+c[p+1]*d[f-2]}for(p=0;p<4;++p)f=p<<1,t[p]=u[f]/l,e[p+1]=d[f+2]}function LWe(e,t,n,[r,i]){let a=new Float64Array(Math.max(r,i)),o=new Float64Array(Math.max(r,i)),s=new Float64Array(5),c=new Float64Array(n.length);for(let t=0,l=0;t<i;++t,l+=r){let t=c.subarray(l);FJ(e,n.subarray(l),r,1,a,o,s,t)}for(let e=0;e<r;++e){let n=c.subarray(e);FJ(t,n,i,r,a,o,s,n)}return c}function FJ(e,t,n,r=1,i=new Float64Array(n),a=new Float64Array(n),o=new Float64Array(5),s=i,c=RWe){let l=r*2,u=r*3,d=r*4,f=r*n,p,m;for(c(i,t,n,r,e.b_causal,3,e.a,4,e.sum_causal,o,e.sigma),m=4,p=d;m<n;++m,p+=r)i[m]=e.b_causal[0]*t[p]+e.b_causal[1]*t[p-r]+e.b_causal[2]*t[p-l]+e.b_causal[3]*t[p-u]-e.a[1]*i[m-1]-e.a[2]*i[m-2]-e.a[3]*i[m-3]-e.a[4]*i[m-4];for(c(a,t,n,-r,e.b_anticausal,4,e.a,4,e.sum_anticausal,o,e.sigma),m=4,p=f-r*5;m<n;++m,p-=r)a[m]=e.b_anticausal[1]*t[p+r]+e.b_anticausal[2]*t[p+l]+e.b_anticausal[3]*t[p+u]+e.b_anticausal[4]*t[p+d]-e.a[1]*a[m-1]-e.a[2]*a[m-2]-e.a[3]*a[m-3]-e.a[4]*a[m-4];if(e.negative)for(m=0,p=0;m<n;++m,p+=r)s[p]=i[m]+a[n-m-1];else for(m=0,p=0;m<n;++m,p+=r)s[p]=Math.max(0,i[m]+a[n-m-1]);return s}function RWe(e,t,n,r,i,a,o,s,c,l,u,d=.5){let f=Math.abs(r)*n,p=r<0?f+r:0,m,h,g;for(h=0;h<=s;++h)for(l[h]=h<=a?i[h]:0,g=1;g<=s&&g<=h;++g)l[h]-=o[g]*l[h-g];for(g=0;g<s;++g)for(e[g]=0,h=1;h<=g;++h)m=p+r*h,m>=0&&m<f&&(e[g]+=l[g-h]*t[m]);let _=t[p],v=Math.ceil(u*10);for(h=0;h<v;++h){for(g=0;g<s;++g)e[g]+=l[g]*_;if(c-=Math.abs(l[0]),c<=d)break;for(l[s]=h+s<=a?i[h+s]:0,g=1;g<=s;++g)l[s]-=o[g]*l[s-g];for(g=0;g<s;++g)l[g]=l[g+1]}}var IJ=`density`,zWe=class extends DJ{constructor(e,t,n){let{bandwidth:r=0,interpolate:i=`none`,pixelSize:a=1,pad:o=1,width:s,height:c,...l}=n,u=BWe(l);super(e,t,l,kWe),this.densityMap=u,this.bandwidth=NJ(r,e=>(this.bandwidth=e,this.grids?this.convolve().update():null)),this.interpolate=NJ(i,e=>(this.interpolate=e,this.requestUpdate())),this.pixelSize=NJ(a,e=>(this.pixelSize=e,this.requestUpdate())),this.pad=NJ(o,e=>(this.pad=e,this.requestUpdate())),this.width=NJ(s,e=>(this.width=e,this.requestUpdate())),this.height=NJ(c,e=>(this.height=e,this.requestUpdate()))}setPlot(e,t){let n=()=>{this.hasFieldInfo()&&this.requestUpdate()};e.addAttributeListener(`xDomain`,n),e.addAttributeListener(`yDomain`,n),super.setPlot(e,t)}get filterStable(){let e=this.plot.getAttribute(`xDomain`),t=this.plot.getAttribute(`yDomain`);return e&&t&&!e[nR]&&!t[nR]}
172query(e=[]){let{interpolate:t,pad:n,channels:r,densityMap:i}=this,[a,o]=this.extentX=AWe(this,e),[s,c]=this.extentY=jWe(this,e),[l,u]=this.bins=this.binDimensions(),[d,f]=kJ(this,`x`,l,[a,o],n),[p,m]=kJ(this,`y`,u,[s,c],n),h=n?[qA(f,[+a,+o]),qA(m,[+s,+c])]:[GA(+a,f),UA(f,+o),GA(+s,m),UA(m,+c)],g=Uk.from(this.sourceTable()).where(e.concat(h)),_=this.groupby=[],v={};for(let e of r)if(Object.hasOwn(e,`field`)){let{as:t,channel:n,field:r}=e;hj(r)?(v[n]=r,i[n]=!0):n===`weight`?v[IJ]=oA(r):n!==`x`&&n!==`y`&&(g.select({[t]:r}),_.push(t))}let y=this.aggr=Object.keys(v);if(v.density&&y.length>1)throw Error(`Weight option can not be used with custom aggregates.`);if(y.length||(y.push(IJ),v[IJ]=eA()),t===`linear`){if(y.length>1)throw Error(`Linear binning not applicable to multiple aggregates.`);if(!v.density)throw Error(`Linear binning not applicable to custom aggregates.`);let e=_j(v[IJ])[0];return rje(g,d,p,e,l,_)}else return FAe(g,d,p,v,l,_)}binDimensions(){let{plot:e,pixelSize:t,width:n,height:r}=this;return[n??Math.round(e.innerWidth()/t),r??Math.round(e.innerHeight()/t)]}queryResult(e){let[t,n]=this.bins,r=VWe(this.interpolate),{columns:i}=$L(e);return this.grids0=PWe(t,n,i.index,i,this.aggr,this.groupby,r),this.convolve()}convolve(){let{aggr:e,bandwidth:t,bins:n,grids0:r,plot:i}=this;if(this.grids=r,t>0&&r.numRows>0){let a=e.length===1?e[0]:e.includes(`density`)?IJ:null;if(!a)return console.warn(`No compatible grid found for smoothing.`),this;let o=r.columns[a],s=i.innerWidth(),c=i.innerHeight(),[l,u]=n,d=o.some(e=>e.some(e=>e<0)),f=PJ(t*(l-1)/s,d),p=PJ(t*(u-1)/c,d);this.grids={numRows:r.numRows,columns:{...r.columns,[a]:o.map(e=>LWe(f,p,e,n))}}}return this}};function BWe(e){let t={};for(let n in e)e[n]===`density`&&(delete e[n],t[n]=!0);return t}function VWe(e=`none`){if(typeof e==`function`)return e;switch(e.toLowerCase()){case`none`:case`linear`:return;case`nearest`:return KK;case`barycentric`:return WK();case`random-walk`:return qK()}throw Error(`invalid interpolate: ${e}`)}function LJ(e){return Array.from({length:e},(e,t)=>t)}function HWe(e,t){let n=t.reduce((e,t,n)=>(e[t]=n,e),{}),r=LJ(e.length);return r.sort((t,r)=>n[e[t]]-n[e[r]]),r}function UWe(e,t){if(typeof document<`u`){let n=document.createElement(`canvas`);return n.setAttribute(`width`,e),n.setAttribute(`height`,t),n}throw Error(`Can not create a canvas instance.`)}function WWe(e=1){let t=255*e|0;return(e,n,r)=>{for(let i=0,a=0;i<r;++i)for(let r=0;r<n;++r,a+=4)e[a+3]=t}}function GWe(e){let{apply:t}=e;return(e,n,r,i)=>{for(let a=0,o=0;a<r;++a)for(let s=0,c=(r-a-1)*n;s<n;++s,o+=4)e[o+3]=255*t(i[s+c])|0}}function KWe(e={}){let{r:t=0,g:n=0,b:r=0,opacity:i=1}=typeof e==`string`?R_(e):e,a=new Uint8ClampedArray([t,n,r,255*i|0]);return(e,t,n)=>{for(let r=0,i=0;r<n;++r)for(let n=0;n<t;++n,i+=4)e[i+0]=a[0],e[i+1]=a[1],e[i+2]=a[2],e[i+3]=a[3]}}function qWe(e){let{domain:t,range:n}=e,r=Object.create(null),i=new Uint8ClampedArray(4*t.length),a=t.length-1,o=n.length;for(let e=0;e<=a;++e){let a=n[e%o],{r:s,g:c,b:l,opacity:u=1}=typeof a==`string`?R_(a):a,d=e<<2;i[d+0]=s,i[d+1]=c,i[d+2]=l,i[d+3]=255*u|0,r[t[e]]=d}return(e,t,n,a)=>{if(a.map)for(let o=0,s=0;o<n;++o)for(let c=0,l=(n-o-1)*t;c<t;++c,s+=4){let t=r[a[c+l]];e[s+0]=i[t+0],e[s+1]=i[t+1],e[s+2]=i[t+2],e[s+3]=i[t+3]}else{let o=r[a];for(let r=0,a=0;r<n;++r)for(let n=0;n<t;++n,a+=4)e[a+0]=i[o+0],e[a+1]=i[o+1],e[a+2]=i[o+2],e[a+3]=i[o+3]}}}function JWe(e,t,n){let{interpolate:r}=t,i=new Uint8ClampedArray(4*e),a=e-1;for(let e=0;e<=a;++e){let t=r(e/a),{r:n,g:o,b:s,opacity:c=1}=typeof t==`string`?R_(t):t,l=e<<2;i[l+0]=n,i[l+1]=o,i[l+2]=s,i[l+3]=255*c|0}return(e,t,r,o)=>{for(let s=0,c=0;s<r;++s)for(let l=0,u=(r-s-1)*t;l<t;++l,c+=4){let t=a*n(o[l+u])<<2;e[c+0]=i[t+0],e[c+1]=i[t+1],e[c+2]=i[t+2],e[c+3]=i[t+3]}}}var YWe=class extends zWe{constructor(e,t){super(`image`,e,t),this.image=null}setPlot(e,t){e.addAttributeListener(`schemeColor`,()=>{this.hasFieldInfo()&&this.rasterize()}),super.setPlot(e,t)}convolve(){return super.convolve().rasterize()}rasterize(){let{bins:e,grids:t}=this,[n,r]=e,{numRows:i,columns:a}=t,{canvas:o,ctx:s,img:c}
172=eGe(this,n,r),{alpha:l,alphaProp:u,color:d,colorProp:f}=XWe(this),p=a[u]??[],m=a[f]??[],h=i>1&&f&&this.groupby?.includes(f)?HWe(m,this.plot.getAttribute(`colorDomain`)):LJ(i);return this.data={numRows:i,columns:{src:Array.from({length:i},(e,t)=>(d?.(c.data,n,r,m[h[t]]),l?.(c.data,n,r,p[h[t]]),s.putImageData(c,0,0),o.toDataURL()))}},this}plotSpecs(){let{type:e,plot:t,data:{numRows:n,columns:r}}=this,i={src:r.src,width:t.innerWidth(),height:t.innerHeight(),preserveAspectRatio:`none`,imageRendering:this.channel(`imageRendering`)?.value,frameAnchor:`middle`};return[{type:e,data:{length:n},options:i}]}};function XWe(e){let{aggr:t,densityMap:n,groupby:r,plot:i}=e,a=t.includes(IJ),o=t.includes(`fillOpacity`),s=e.channel(`fill`),c=e.channel(`fillOpacity`);if(t.length>2||a&&o)throw Error(`Invalid raster encodings. Try dropping an aggregate?`);if(r.includes(c?.as))throw Error(`Raster fillOpacity must be an aggregate or constant.`);let l=n.fill||t.includes(`fill`)?`grid`:r.includes(s?.as)?`group`:SJ(s?.value)?s.value:a&&i.getAttribute(`colorScheme`)?`grid`:void 0,u=n.fillOpacity||t.includes(`fillOpacity`)?`grid`:typeof c?.value==`number`?c.value:a&&l!==`grid`?`grid`:void 0;if(l!==`grid`&&u!==`grid`)throw Error(`Raster mark missing density values.`);let d=s?.as??(l===`grid`?`density`:null),f=c?.as??(u===`grid`?`density`:null),p=l!==`grid`&&l!==`group`?KWe(l):QWe(e,d);return{alphaProp:f,colorProp:d,alpha:u===`grid`?ZWe(e,f):WWe(u),color:p}}function ZWe(e,t){let{plot:n,grids:r}=e,i=n.getAttribute(`opacityDomain`),a=i===tR,o=i?.[nR],s=!a&&!o&&i||MJ(r.columns[t]);return(a||o||!i)&&(a||(s[nR]=!0),n.setAttribute(`opacityDomain`,s)),GWe(MV({opacity:{type:n.getAttribute(`opacityScale`),domain:s,range:n.getAttribute(`opacityRange`),clamp:n.getAttribute(`opacityClamp`),nice:n.getAttribute(`opacityNice`),reverse:n.getAttribute(`opacityReverse`),zero:n.getAttribute(`opacityZero`),base:n.getAttribute(`opacityBase`),exponent:n.getAttribute(`opacityExponent`),constant:n.getAttribute(`opacityConstant`)}}))}function QWe(e,t){let{plot:n,grids:r}=e,i=r.columns[t]??[],a=!i[0]?.map,o=a||Array.isArray(i[0]),s=n.getAttribute(`colorDomain`),c=s===tR,l=s?.[nR],u=!c&&!l&&s||(a?i.slice().sort(xg):o?FWe(i):MJ(i));(c||l||!s)&&(c||(u[nR]=!0),n.setAttribute(`colorDomain`,u));let d=MV({color:{type:n.getAttribute(`colorScale`),domain:u,range:n.getAttribute(`colorRange`),clamp:n.getAttribute(`colorClamp`),n:n.getAttribute(`colorN`),nice:n.getAttribute(`colorNice`),reverse:n.getAttribute(`colorReverse`),scheme:n.getAttribute(`colorScheme`),interpolate:n.getAttribute(`colorInterpolate`),pivot:n.getAttribute(`colorPivot`),symmetric:n.getAttribute(`colorSymmetric`),zero:n.getAttribute(`colorZero`),base:n.getAttribute(`colorBase`),exponent:n.getAttribute(`colorExponent`),constant:n.getAttribute(`colorConstant`)}});return o?qWe(d):JWe(1024,d,MV({x:{type:$We(d.type),domain:d.domain,reverse:d.reverse,range:[0,1],clamp:d.clamp,base:d.base,exponent:d.exponent,constant:d.constant}}).apply)}function $We(e){return e.endsWith(`symlog`)?`symlog`:e.endsWith(`log`)?`log`:e.endsWith(`pow`)?`pow`:e.endsWith(`sqrt`)?`sqrt`:e===`diverging`?`linear`:e}function eGe(e,t,n){if(!e.image||e.image.w!==t||e.image.h!==n){let r=UWe(t,n),i=r.getContext(`2d`,{willReadFrequently:!0});e.image={canvas:r,ctx:i,img:i.getImageData(0,0,t,n),w:t,h:n}}return e.image}function RJ(e){e.tagName===`a`&&(e=e.children[0]);let t=e.__data__;return Array.isArray(t)?t[0]:t}function tGe(e){let t=e.toLowerCase(),n=e.length,r=``;for(let i=0;i<n;++i)r+=(e[i]===t[i]?``:`-`)+t[i];return r}function zJ(e){let t={};for(let n in e)t[tGe(n)]=e[n];return t}function nGe(e){let{channels:t}=e,n=new Set,r=!1,i=!1;for(let e of t){let{channel:t,field:a,as:o}=e;if(t===`orderby`)r=!0;else if(a)if(hj(a))i=!0;else{if(n.has(o))continue;n.add(o)}}return!r&&i&&n.size&&e.channels.push({channel:`orderby`,value:Array.from(n)}),e}var rGe=class{constructor(e,{selection:t,channels:n={}}){this.mark=nGe(e),this.selection=t;let r=Object.entries(zJ(n));this.channels=r.length?r:[[`opacity`,.2]],this.selection.addEventListener(`value`,nD(()=>this.update()))}init(e){this.svg=e;let t=this.values=[],n=`g[data-index="${this.mark.index}"]`,r=`${n} > *:not(g), ${n} > g > *`,i=this.nodes=e.querySelectorAll(r),{channels:a}=this;for(let e=0;e<i.length;++e){let n=i[e];t.push(a.map(e=>n.getAttribute(e[0])))}return this.update()}
172async update(){let{svg:e,nodes:t,channels:n,values:r,mark:i,selection:a}=this;if(!e)return;let o=await iGe(i,a);for(let e=0;e<t.length;++e){let i=t[e],a=r[e],s=o(RJ(i));for(let e=0;e<n.length;++e){let[t,r]=n[e];i.setAttribute(t,s?a[e]:r)}}}};async function iGe(e,t){let n=t?.predicate(e);if(!n||n.length===0)return()=>!0;let r=e.filterBy?.predicate(e,!0),i={__:NA(n)},a=e.query(r);(a.queries||[a]).forEach(e=>{e._groupby.length?e.select(i):e.setSelect(i)});let o=await e.coordinator.query(a),s=o.getChild?.(`__`);return o.numRows||o.length?s?(e=>s.at(e)):(e=>o[e].__):(()=>!1)}function aGe(){let e=this,t=e.getScreenCTM,n;e.getScreenCTM=()=>e.isConnected?n=t.call(e):n}function BJ(e){let t=e.on,n=!0;function r(e){n=!1,e(),n=!0}return e.reset=(...t)=>{r(()=>e.clear(...t))},e.moveSilent=(...t)=>{r(()=>e.move(...t))},e.on=(...e)=>{if(e.length>1&&e[1]){let t=e[1];e[1]=(...e)=>n&&t(...e)}return t(...e)},e}function oGe(){return BJ(Cbe())}function sGe(){return BJ(xbe())}function cGe(){return BJ(Sbe())}function VJ(e,t,n,r,i){let a=Fx(t??e).append(`g`).attr(`class`,i),o=e.scale(`fx`),s=e.scale(`fy`);if(o||s){let e=o?.domain.map(e=>o.apply(e)-n),t=s?.domain.map(e=>s.apply(e)-r);if(e&&t)for(let n=0;n<e.length;++n)for(let r=0;r<t.length;++r)a.append(`g`).attr(`transform`,`translate(${e[n]}, ${t[r]})`);else if(e)for(let t=0;t<e.length;++t)a.append(`g`).attr(`transform`,`translate(${e[t]}, 0})`);else if(t)for(let e=0;e<t.length;++e)a.append(`g`).attr(`transform`,`translate(0, ${t[e]})`);a=a.selectAll(`g`)}return a.each(aGe)}var HJ=1e-12;function UJ(e,t){return e===t||e&&t&&Math.abs(e[0]-t[0])<HJ&&Math.abs(e[1]-t[1])<HJ||!1}function lGe(e){if(YD(e)){if(e.type===`COLUMN_REF`)return e.column;if(e.type===`AGGREGATE`)return e.args[0]??e;if(e.type===`CUSTOM`&&`column`in e)return e.column}return e}function WJ(e,t){return lGe(e.channelField(t)?.field)}function GJ(e,t,n=1){return t.invert(n*Math.floor(e/n))}var uGe=class{constructor(e,{channel:t,selection:n,field:r=void 0,pixelSize:i=1,peers:a=!0,brush:o}){this.mark=e,this.channel=t,this.pixelSize=i||1,this.selection=n,this.peers=a,this.field=r||WJ(e,t),this.style=o&&zJ(o),this.brush=t===`y`?cGe():sGe(),this.brush.on(`brush end`,({selection:e})=>this.publish(e))}reset(){this.value=void 0,this.g&&this.brush.reset(this.g)}activate(){this.selection.activate(this.clause(this.value||[0,1]))}publish(e){let t;e&&(t=e.map(e=>GJ(e,this.scale,this.pixelSize)).sort((e,t)=>e-t)),UJ(t,this.value)||(this.value=t,this.g.call(this.brush.moveSilent,e),this.selection.update(this.clause(t)))}clause(e){let{mark:t,pixelSize:n,field:r,scale:i}=this;return dIe(r,e,{source:this,clients:this.peers?t.plot.markSet:new Set().add(t),scale:i,pixelSize:n})}init(e,t){let{brush:n,channel:r,style:i}=this;this.scale=e.scale(r);let a=this.value?.map(this.scale.apply).sort(xg),o=e.scale(`x`).range,s=e.scale(`y`).range;if(n.extent([[r_(o),r_(s)],[n_(o),n_(s)]]),this.g=VJ(e,t,r_(o),r_(s),`interval-${r}`).call(n).call(n.moveSilent,a),i){let e=this.g.selectAll(`rect.selection`);for(let t in i)e.attr(t,i[t])}e.addEventListener(`pointerenter`,e=>{e.buttons||this.activate()})}},dGe=class{constructor(e,{selection:t,xfield:n,yfield:r,pixelSize:i=1,peers:a=!0,brush:o}){this.mark=e,this.pixelSize=i||1,this.selection=t,this.peers=a,this.xfield=n||WJ(e,`x`),this.yfield=r||WJ(e,`y`),this.style=o&&zJ(o),this.brush=oGe(),this.brush.on(`brush end`,({selection:e})=>this.publish(e))}reset(){this.value=void 0,this.g&&this.brush.reset(this.g)}activate(){this.selection.activate(this.clause(this.value||[[0,1],[0,1]]))}publish(e){let{value:t,pixelSize:n,xscale:r,yscale:i}=this,a,o;if(e){let[t,s]=e;a=[t[0],s[0]].map(e=>GJ(e,r,n)).sort(xg),o=[t[1],s[1]].map(e=>GJ(e,i,n)).sort(xg)}(!UJ(a,t?.[0])||!UJ(o,t?.[1]))&&(this.value=e?[a,o]:void 0,this.g.call(this.brush.moveSilent,e),this.selection.update(this.clause(this.value)))}clause(e){let{mark:t,pixelSize:n,xfield:r,yfield:i,xscale:a,yscale:o}=this;return fIe([r,i],e,{source:this,clients:this.peers?t.plot.markSet:new Set().add(t),scales:[a,o],pixelSize:n})}init(e){let{brush:t,style:n,value:r}=this,i=this.xscale=e.scale(`x`),a=this.yscale=e.scale(`y`),o=i.range,s=a.range;if(t.extent([[r_(o),r_(s)],[n_(o),n_(s)]]),this.g=VJ(e,null,r_(o),r_(s),`interval-xy`).call(t),n){let e=this.g.selectAll(`rect.selection`);for(let t in n)e.attr(t,n[t])}if(r){let[e,n]=r[0].map(i.apply).sort(xg),[o,s]=r[1].map(a.apply).sort(xg);this.g.call(t.moveSilent,[[e,o],[n,s]])}e.addEventListener(`pointerenter`,e=>{e.buttons||this.activate()})}};function fGe(e,t){return e==null||t==null?e!=null||t!=null:e.length!==t.length||e.some((e,n)=>KJ(e,t[n]))}function KJ(e,t){let n=e.length;if(t.length!==n)return!0;for(let r=0;r<n;++r)if(e[r]!==t[r])return!0;return!1}var pGe=class{constructor(e,{selection:t,channels:n,peers:r=!0}){this.mark=e,this.value=null,this.selection=t,this.peers=r;let i=this.fields=[],a=this.as=[];
172n.forEach(t=>{let n=t===`color`?[`color`,`fill`,`stroke`]:t===`x`?[`x`,`x1`,`x2`]:t===`y`?[`y`,`y1`,`y2`]:[t];for(let t=0;t<n.length;++t){let r=e.channelField(n[t],{exact:!0});if(r){i.push(r.field?.basis||r.field),a.push(r.as);return}}throw Error(`Missing channel: ${t}`)})}clause(e){let{fields:t,mark:n}=this;return QL(t,e,{source:this,clients:this.peers?n.plot.markSet:new Set().add(n)})}init(e,t,n){let{mark:r,as:i,selection:a}=this,{data:{columns:o={}}={}}=r;n??=e=>i.map(t=>o[t][RJ(e)]),t??=`[data-index="${r.index}"]`;let s=Array.from(e.querySelectorAll(t));e.addEventListener(`pointerdown`,e=>{let t=a.single?a.value:this.value,r=e.target,i=null;if(mGe(s,r)){let a=n(r);(e.shiftKey||e.metaKey)&&t?.length?(i=t.filter(e=>KJ(e,a)),i.length===t.length&&i.push(a)):i=t?.length===1&&!KJ(t[0],a)?null:[a]}this.value=i,fGe(t,i)&&a.update(this.clause(i))}),e.addEventListener(`pointerenter`,e=>{e.buttons||this.activate()})}activate(){this.selection.activate(this.clause([this.fields.map(()=>0)]))}};function mGe(e,t){return e.some(e=>e.contains(t))}var hGe=new Set([`rectY-x`,`rectX-y`,`rect-x`,`rect-y`,`ruleY-x`,`ruleX-y`]);function gGe(e,t){return hGe.has(`${e.type}-${t}`)}function qJ(e,t={}){let n=(n,r)=>gGe(n,r)?{[`${r}1`]:JJ(n,r,e,t),[`${r}2`]:JJ(n,r,e,{...t,offset:1})}:{[r]:JJ(n,r,e,t)};return n[MIe]=!0,n}function JJ(e,t,n,r){return new vGe(n,e,t,r)}function _Ge(e,t){let n=e.plot.getAttribute(`${t}Scale`);return n===`utc`||n===`time`}var vGe=class extends ZD{constructor(e,t,n,r){super(`CUSTOM`),this.column=e,this.mark=t,this.channel=n,this.options=r}get stats(){return{column:this.column,stats:[`min`,`max`]}}toString(e=Zk){let{mark:t,channel:n,column:r,options:i}=this,{type:a,min:o,max:s}=t.channelField(n),c=i.interval||a===`date`||_Ge(t,n)?KAe(r,[o,s],i):tje(r,[o,s],i,OJ(t,n));return e.toString(c)}},yGe=class extends iD{constructor(e,t,n=`input`){super(e),this.element=t||document.createElement(`div`),n&&this.element.setAttribute(`class`,n),Object.defineProperty(this.element,"value",{value:this})}activate(){}},bGe=e=>e&&typeof e==`object`&&!Array.isArray(e),xGe=class extends yGe{constructor({element:e,filterBy:t,as:n,from:r,column:i,label:a=i,format:o=e=>e,options:s,value:c,field:l=i,listMatch:u}={}){super(t,e),this.from=r,this.column=i,this.format=o,this.field=l,this.listMatch=u;let d=this.selection=n,f=document.createElement(`label`);if(f.innerText=a||i,this.element.appendChild(f),this.select=document.createElement(`select`),this.element.appendChild(this.select),s&&(this.data=s.map(e=>bGe(e)?e:{value:e}),this.selectedValue(c===void 0?``:c),this.update()),d){let e=!tM(d);c!=null&&(!e||d.value===void 0)&&this.publish(c),this.select.addEventListener(`input`,()=>{this.publish(this.selectedValue()??null)}),e?this.selection.addEventListener(`value`,e=>{e!==this.select.value&&this.selectedValue(e)}):(this.select.addEventListener(`pointerenter`,e=>{e.buttons||this.activate()}),this.select.addEventListener(`focus`,()=>this.activate()))}}selectedValue(e){if(arguments.length===0){let e=this.select.selectedIndex;return this.data[e].value}else{let t=this.data?.findIndex(t=>t.value===e);t>=0?this.select.selectedIndex=t:this.select.value=String(e)}}reset(){this.select.selectedIndex=this.from?0:-1}activate(){tM(this.selection)&&this.selection.activate(ZL(this.field,0,{source:this}))}publish(e){let{selection:t,field:n,listMatch:r}=this;if(tM(t)){e===``&&(e=void 0);let i=r?_Ie(n,e,{source:this,listMatch:r}):ZL(n,e,{source:this});t.update(i)}else $j(t)&&t.update(e)}query(e=[]){let{from:t,column:n,listMatch:r}=this;return t?Uk.from(t).select({value:r?sj(n):n}).distinct().where(e).orderby(n):null}queryResult(e){return this.data=[{value:``,label:`All`},...e],this}update(){let{data:e,format:t,select:n,selection:r}=this;n.replaceChildren();for(let{value:n,label:r}of e){let e=document.createElement(`option`);e.setAttribute(`value`,n),e.innerText=r??t(n),this.select.appendChild(e)}if(r){let e=tM(r)?r.valueFor(this):r.value;this.selectedValue(e===void 0?``:e)}return this}},SGe=XJ(e=>{let t=YJ(e);return e=>e==null?``:typeof e==`number`?t(e):e instanceof Date?CGe(e):`${e}`}),YJ=XJ(e=>t=>
172t===0?`0`:t.toLocaleString(e));SGe(),YJ();function CGe(e){return wGe(e,`Invalid Date`)}function XJ(e){let t=null,n;return(r=`en`)=>r===t?n:n=e(t=r)}function wGe(e,t){if(e instanceof Date||(e=new Date(+e)),isNaN(+e))return typeof t==`function`?t(e):t;let n=e.getUTCHours(),r=e.getUTCMinutes(),i=e.getUTCSeconds(),a=e.getUTCMilliseconds();return`${TGe(e.getUTCFullYear())}-${ZJ(e.getUTCMonth()+1,2)}-${ZJ(e.getUTCDate(),2)}${n||r||i||a?`T${ZJ(n,2)}:${ZJ(r,2)}${i||a?`:${ZJ(i,2)}${a?`.${ZJ(a,3)}`:``}`:``}Z`:``}`}function TGe(e){return e<0?`-${ZJ(-e,6)}`:e>9999?`+${ZJ(e,6)}`:ZJ(e,4)}function ZJ(e,t){return`${e}`.padStart(t,`0`)}function QJ(e,...t){let n=e?.context?.coordinator??Yj();for(let e of t)n.connect(e)}function EGe(e,t,n){let r=new t(n);return QJ(e,r),r.element}function $J(e){return EGe(this,xGe,e)}function eY({direction:e=`vertical`,wrap:t=!1},n){let r=document.createElement(`div`);return r.style.display=`flex`,r.style.flexDirection=e===`vertical`?`column`:`row`,r.style.flexWrap=t?t===!0?`wrap`:t:`nowrap`,r.style.justifyContent=`flex-start`,r.style.alignItems=`flex-start`,n.forEach(e=>r.appendChild(e)),Object.assign(r,{value:{element:r}}),r}function tY(...e){return eY({direction:`vertical`},e.flat())}function DGe(...e){return eY({direction:`horizontal`},e.flat())}function nY({dim:e=`width`,size:t=10}){let n=document.createElement(`span`);return n.style.display=`inline-block`,n.style[e]=Number.isNaN(+t)?t:`${t}px`,Object.assign(n,{value:{element:n}})}function OGe(e){return nY({dim:`height`,size:e})}function kGe(e){return nY({dim:`width`,size:e})}new class extends Map{request(e,t){if(this.has(e))t(this.get(e));else{let n=this.waiting||=new Map,r=n.get(e)||[];n.set(e,r.concat(t))}}set(e,t){this.has(e)&&console.warn(`Overwriting named plot "${e}".`);let{waiting:n}=this;return n?.has(e)&&(n.get(e).forEach(e=>e(t)),n.delete(e)),super.set(e,t)}clear(){return this.waiting?.clear(),super.clear()}};function AGe(e,t,n){$j(n)?(n.addEventListener(`value`,n=>{e.setAttribute(t,n),e.update()}),n.value!==void 0&&e.setAttribute(t,n.value)):e.setAttribute(t,n)}function jGe(e,t){return n=>{AGe(n,e,t)}}var rY=e=>t=>jGe(e,t),iY=rY(`width`),aY=rY(`height`),oY=rY(`marginLeft`),sY=rY(`marginRight`),cY=rY(`marginTop`),lY=rY(`marginBottom`),MGe=rY(`aspectRatio`),uY=rY(`xDomain`),dY=rY(`xAxis`),NGe=rY(`xTickSize`),PGe=rY(`xTickFormat`),fY=rY(`xLabel`),pY=rY(`yScale`),mY=rY(`yDomain`),hY=rY(`yAxis`),gY=rY(`yGrid`),_Y=rY(`yLabel`),FGe=rY(`fxPaddingInner`),IGe=rY(`fxLabel`),LGe=rY(`colorScale`),vY=rY(`colorScheme`),yY=rY(`colorLabel`);function bY(e,t=void 0){return{table:e,options:t}}var RGe=new Set([`frame`,`axisX`,`axisY`,`axisFx`,`axisFy`,`gridX`,`gridY`,`gridFx`,`gridFy`,`hexgrid`,`graticule`,`sphere`]);function xY(e,t,n={}){return arguments.length===2&&!Array.isArray(t)&&(n=t,t=RGe.has(e)?null:[{}]),zGe(e.startsWith(`area`)||e.startsWith(`line`)?MWe:DJ,e,t,n)}function zGe(e,t,n,r){return i=>{i.addMark(new e(t,n,r))}}function BGe(e,t,n){return r=>{r.addMark(new e(t,n))}}var VGe=(...e)=>xY(`lineY`,...e),SY=(...e)=>xY(`barX`,...e),CY=(...e)=>xY(`barY`,...e),HGe=(...e)=>xY(`cell`,...e),UGe=(...e)=>xY(`rectX`,...e),wY=(...e)=>xY(`rectY`,...e),TY=(...e)=>xY(`dot`,...e),WGe=(...e)=>xY(`text`,...e),EY=(...e)=>BGe(YWe,...e),GGe=(...e)=>xY(`delaunayMesh`,...e);function DY(e,t){return n=>{let r=n.marks[n.marks.length-1];n.addInteractor(new e(r,t))}}function OY({by:e,...t}){return DY(rGe,{selection:e,channels:t})}function kY({as:e,...t}){return DY(uGe,{...t,selection:e,channel:`x`})}function KGe({as:e,...t}){return DY(dGe,{...t,selection:e})}function AY({as:e,...t}){return DY(pGe,{...t,selection:e})}function jY(e){return AY({...e,channels:[`x`]})}function qGe(e){return AY({...e,channels:[`y`]})}function MY(...e){let t=new hWe;return e.flat().forEach(e=>e(t)),QJ(this,...t.marks),t.update(),t.element}var JGe=({data:e,width:t=1e3,height:n=600,onNodeClick:r,metric:i=`duration`})=>{let a={top:20,right:20,bottom:20,left:20},o=t-a.left-a.right,s=n-a.top-a.bottom,c=ug(`#fff`,`#1A202C`),l=ug(`#1A202C`,`#F7FAFC`),u=(0,_.useMemo)(()=>{let t=iE(e).sum(e=>{let t=e.attributes?.[i];return typeof t==`number`&&t>0?t:1}).sort((e,t)=>
172(t.value||0)-(e.value||0));return MSe().size([o,s]).padding(1)(t)},[e,o,s,i]),d=ug(!1,!0),f=(0,_.useMemo)(()=>{let e=0;return u.each(t=>{t.depth>e&&(e=t.depth)}),e},[u]),p=e=>{let t=f>0?e.depth/f:0;return TE(.2+(d?1-t:t)*.7)},{tooltipData:m,tooltipLeft:h,tooltipTop:g,showTooltip:v,hideTooltip:y}=Wb(),{containerRef:b,containerBounds:x,TooltipInPortal:S}=ox({scroll:!0,detectBounds:!0}),C=()=>{let e=[],t=0;return u.each(n=>{if(n.x1-n.x0<1||n.y1-n.y0<1)return;let i=n.data,a=n.x1-n.x0,o=n.y1-n.y0,s=a>50&&o>15;e.push((0,B.jsxs)(bg,{children:[(0,B.jsx)(`rect`,{x:n.x0,y:n.y0,width:a,height:o,fill:p(n),stroke:c,strokeWidth:1,style:{cursor:r?`pointer`:`default`},onClick:()=>{r&&r({...i,...i.attributes,depth:n.depth,value:n.value})},onMouseMove:e=>{v({tooltipData:{node:n},tooltipLeft:e.clientX-x.left,tooltipTop:e.clientY-x.top})},onMouseLeave:y}),s&&(0,B.jsx)(`text`,{x:n.x0+a/2,y:n.y0+o/2,fill:l,fontSize:Math.min(12,o/2),textAnchor:`middle`,dominantBaseline:`middle`,style:{pointerEvents:`none`,userSelect:`none`,fontWeight:n.depth===0?`bold`:`normal`},children:w(i.name,a/7)})]},`node-${t++}`))}),e},w=(e,t)=>e.length<=t?e:e.substring(0,t-3)+`...`,T=(e,t)=>e==null?`N/A`:t===`duration`?`${e.toFixed(3)}s`:t===`tokens`?e.toLocaleString():e.toString();return(0,B.jsxs)(V,{style:{width:`100%`,maxWidth:t,margin:`0 auto`},position:`relative`,children:[(0,B.jsx)(`svg`,{width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`,viewBox:`0 0 ${t} ${n}`,style:{userSelect:`none`},ref:b,children:(0,B.jsx)(bg,{left:a.left,top:a.top,children:C()})}),m&&(0,B.jsx)(S,{left:h,top:g,style:{position:`absolute`,backgroundColor:`var(--tooltip-bg, white)`,color:`var(--tooltip-text, #333)`,padding:`12px`,borderRadius:`4px`,boxShadow:`0 2px 8px rgba(0,0,0,0.15)`,fontSize:`12px`,pointerEvents:`none`,maxWidth:`300px`},children:(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`strong`,{style:{fontSize:`14px`},children:m.node.data.name}),(0,B.jsx)(`br`,{}),(0,B.jsxs)(`span`,{style:{color:`#666`},children:[`Layer: `,m.node.data.layer]}),(0,B.jsx)(`br`,{}),m.node.data.attributes?.duration!==void 0&&(0,B.jsxs)(B.Fragment,{children:[`Duration:`,` `,T(m.node.data.attributes.duration,`duration`),(0,B.jsx)(`br`,{})]}),m.node.data.attributes?.tokens!==void 0&&m.node.data.attributes.tokens>0&&(0,B.jsxs)(B.Fragment,{children:[`Tokens:`,` `,T(m.node.data.attributes.tokens,`tokens`),(0,B.jsx)(`br`,{})]}),m.node.data.attributes?.react_phase&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`span`,{style:{display:`inline-block`,marginTop:`4px`,padding:`2px 6px`,borderRadius:`3px`,backgroundColor:p(m.node),color:`white`,fontSize:`11px`},children:m.node.data.attributes.react_phase}),(0,B.jsx)(`br`,{})]}),m.node.data.attributes?.span_count!==void 0&&(0,B.jsxs)(B.Fragment,{children:[`Spans: `,m.node.data.attributes.span_count,(0,B.jsx)(`br`,{})]})]})})]})},NY=({data:e,width:t=800,height:n=400,metric:r=`duration`})=>{let i={top:20,right:120,bottom:60,left:60},a=t-i.left-i.right,o=n-i.top-i.bottom,s=ug(`#E2E8F0`,`#2D3748`),c=ug(`#4A5568`,`#A0AEC0`),l=(0,_.useMemo)(()=>{let t=new Set;return e.forEach(e=>{Object.keys(e.by_type).forEach(e=>t.add(e))}),Array.from(t)},[e]),u=ug(`#6b8dd6`,`#2f4a9e`),d=ug(`#efb118`,`#c98e0d`),f=ug(`#ff725c`,`#d94e3a`),p=ug(`#6cc5b0`,`#4d9a88`),m=ug(`#3ca951`,`#2d7d3c`),h=hb().domain(l).range([u,d,f,p,m]),g=e.length>0?e[0].bucket_start:0,v=e.length>0?e[e.length-1].bucket_end:g+100,y=mb().domain([0,v-g]).range([0,a]).nice(),b=(0,_.useMemo)(()=>Math.max(...e.map(e=>Object.values(e.by_type).reduce((e,t)=>e+t,0))),[e]),x=mb().domain([0,b]).range([o,0]).nice(),{tooltipData:S,tooltipLeft:C,tooltipTop:w,showTooltip:T,hideTooltip:E}=Wb(),{containerRef:D,containerBounds:O,TooltipInPortal:k}=ox({scroll:!0,detectBounds:!0});return(0,B.jsxs)(V,{style:{width:`100%`,maxWidth:t,margin:`0 auto`},position:`relative`,children:[(0,B.jsx)(`svg`,{width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`,viewBox:`0 0 ${t} ${n}`,style:{userSelect:`none`},ref:D,children:(0,B.jsxs)(bg,{left:i.left,top:i.top,children:[x.ticks(5).map(e=>(0,B.jsx)(`line`,{x1:0,y1:x(e),x2:a,y2:x(e),stroke:s,strokeWidth:1,strokeDasharray:`2,2`},`y-grid-${e}`)),(()=>{let t=e.length>0?e[0].bucket_start:0,n=e.length>1?e[1].bucket_start-e[0].bucket_start:10;return e.map((e,r)=>{let i=e.bucket_start-t,a=y(i+n)-y(i),s=0;
172return(0,B.jsx)(bg,{left:y(i),children:Object.entries(e.by_type).map(([e,t],n)=>{let i=o-x(t),c=(0,B.jsx)(vb,{x:0,y:x(t)-s,width:a,height:i,fill:h(e),onMouseMove:n=>{T({tooltipData:{type:e,value:t},tooltipLeft:n.clientX-O.left,tooltipTop:n.clientY-O.top})},onMouseLeave:E},`bar-${r}-${n}`);return s+=i,c})},`bucket-${r}`)})})(),(0,B.jsx)(zb,{scale:y,top:o,stroke:c,tickStroke:c,tickFormat:e=>{let t=Math.floor(e);return`${Math.floor(t/60)}:${(t%60).toString().padStart(2,`0`)}`},tickLabelProps:()=>({fill:c,fontSize:10,textAnchor:`middle`}),label:`Time (MM:SS)`,labelProps:{fontSize:12,fill:c,textAnchor:`middle`}}),(0,B.jsx)(Age,{scale:x,stroke:c,tickStroke:c,tickLabelProps:()=>({fill:c,fontSize:10,textAnchor:`end`,dx:`-0.5em`}),label:r===`duration`?`Duration (s)`:`Span Count`,labelProps:{fontSize:12,fill:c,textAnchor:`middle`}}),(0,B.jsx)(bg,{left:a+20,top:0,children:l.map((e,t)=>(0,B.jsxs)(bg,{top:t*20,children:[(0,B.jsx)(`rect`,{width:12,height:12,fill:h(e)}),(0,B.jsx)(`text`,{x:16,y:10,fontSize:11,fill:c,style:{userSelect:`none`},children:e})]},`legend-${t}`))})]})}),S&&(0,B.jsx)(k,{left:C,top:w,style:{position:`absolute`,backgroundColor:`var(--tooltip-bg, white)`,color:`var(--tooltip-text, #333)`,padding:`8px`,borderRadius:`4px`,boxShadow:`0 2px 4px rgba(0,0,0,0.1)`,fontSize:`12px`,pointerEvents:`none`},children:(0,B.jsxs)(`div`,{children:[`Type: `,S.type,(0,B.jsx)(`br`,{}),r===`duration`?`Duration: ${S.value.toFixed(3)}s`:`Count: ${S.value}`]})})]})},PY=()=>{let[e,t]=(0,_.useState)(null),[n,r]=(0,_.useState)(!0),[i,a]=(0,_.useState)(null);return(0,_.useEffect)(()=>{(async()=>{try{r(!0),a(null);let[e,n]=await Promise.all([fetch(`/data/trace-data.json`).then(e=>e.json()),fetch(`/data/trace-icicle.json`).then(e=>e.json())]);t({metrics:e.metrics,hierarchy:e.hierarchy,react:{},buckets:e.buckets,icicle:n})}catch(e){console.error(`Error loading trace data:`,e),a(`Failed to load trace data`)}finally{r(!1)}})()},[]),{data:e,loading:n,error:i}};function YGe(){let{data:e,loading:t,error:n}=PY();return t?(0,B.jsx)(U,{children:`Loading...`}):n||!e?null:(0,B.jsxs)(Ph,{columns:{base:2,md:3},gap:4,my:6,children:[(0,B.jsxs)(Bh,{children:[(0,B.jsx)(Vh,{children:`Elapsed Time`}),(0,B.jsxs)(Hh,{children:[e.metrics.total_duration.toFixed(2),`s`]})]}),(0,B.jsxs)(Bh,{children:[(0,B.jsx)(Vh,{children:`Total Spans`}),(0,B.jsx)(Hh,{children:e.metrics.total_spans})]}),(0,B.jsxs)(Bh,{children:[(0,B.jsx)(Vh,{children:`LLM Calls`}),(0,B.jsx)(Hh,{children:e.metrics.llm_call_count})]}),(0,B.jsxs)(Bh,{children:[(0,B.jsx)(Vh,{children:`Total Tokens`}),(0,B.jsx)(Hh,{children:e.metrics.total_tokens.toLocaleString()})]}),(0,B.jsxs)(Bh,{children:[(0,B.jsx)(Vh,{children:`Avg Step Duration`}),(0,B.jsxs)(Hh,{children:[e.metrics.avg_step_duration.toFixed(2),`s`]})]}),(0,B.jsxs)(Bh,{children:[(0,B.jsx)(Vh,{children:`Max Depth`}),(0,B.jsx)(Hh,{children:e.metrics.max_nesting_depth})]})]})}function XGe(){let{data:e,loading:t}=PY();return t||!e?null:(0,B.jsx)(NY,{data:e.buckets.aggregated})}function ZGe(){let{data:e,loading:t}=PY();return t||!e?null:(0,B.jsx)(NY,{data:e.buckets.span_counts,metric:`count`})}function QGe(){let{data:e,loading:t}=PY(),[n,r]=(0,_.useState)(null);return t||!e?null:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(MTe,{data:e.buckets.individual,onItemClick:e=>r({...e})}),(0,B.jsx)(tD,{data:n,onClose:()=>r(null)})]})}function $Ge(){let{data:e,loading:t}=PY(),[n,r]=(0,_.useState)(null);return t||!e?null:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(JGe,{data:e.icicle,onNodeClick:r}),(0,B.jsx)(tD,{data:n,onClose:()=>r(null)})]})}function FY(e){let t={em:`em`,h1:`h1`,h2:`h2`,h3:`h3`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,strong:`strong`,ul:`ul`,...e.components};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(t.h1,{id:`visualizing-traces-in-ml-agent-systems`,children:`Visualizing Traces in ML Agent Systems`}),` 173`,(0,B.jsx)(t.p,{children:`Agentic Systems are becoming more common. From ChatGPT's Agent mode to Perplexity's Comet browser, it looks like we are entering a new era of augmented web tools. Designing such experiences as a web developer has been compelling to my creative side. However, the analytical side calls for structured ways to measure success of these experiences. This led me to observability, OpenTelemetry, and traces.`}),` 174`,(0,B.jsx)(t.p,{children:`Observability of an application behavior involves metrics, logs, traces, and profiles (footnote: events are also considered as the fourth facet). Instrumentation of these four facets can help us understand complex application behavior. In this space, OpenTelemetry provides an industry standard for observability. Starting with conventions for structuring and naming the parts of the facets, to SDKs to develop them into an application, and services to collect the four facets.`}),` 175`,(0,B.jsx)(t.h2,{id:`parts-of-ml-observability`,children:`Parts of ML Observability`}),` 176`,(0,B.jsx)(t.p,{children:`Now, observability in the ML space can offer a lot to Agentic applications:`}),` 177`,(0,B.jsxs)(t.ul,{children:[` 178`,(0,B.jsx)(t.li,{children:`Metrics help us quantitatively measure and track performance. Such as the duration of an MCP tool call or identifying service failures caused by an external resource.`}),` 179`,(0,B.jsx)(t.li,{children:`Profiles track the resource use at the granular level of code blocks to catch the bottlenecks including, a slow container for the headless browser or an almost-full vector database.`}),`
180`,(0,B.jsx)(t.li,{children:`Logs form a well-known foundational item to track any application behavior.`}),` 181`,(0,B.jsx)(t.li,{children:`Finally, the traces. They are a powerful abstraction for tracking operations across a complex system. I will dive into them in the rest of this article.`}),` 182`]}),` 183`,(0,B.jsx)(t.h2,{id:`what-are-traces`,children:`What Are Traces?`}),` 184`,(0,B.jsx)(t.p,{children:`Applications are made up of operations that are executed across the many underlying services. Tracking these operations, often distributed, can help connect them and figure out the overall behaviors. Traces are designed to do exactly that. A trace starts with an origin that defines a trace ID along with an operational context such as the user profile or application settings. You can attach this trace ID to a "span" of the application (i.e., to the logs coming out the span of a code block). A collector service provided by OpenTelemetry can stitch these spans into a trace using the common trace ID.`}),` 185`,(0,B.jsx)(t.p,{children:`Traces`}),` 186`,(0,B.jsx)(t.h2,{id:`the-dataset-swebench-agent-traces`,children:`The Dataset: SWEbench Agent Traces`}),` 187`,(0,B.jsx)(t.p,{children:`[Brief description of the SWEbench dataset and what traces we're analyzing]`}),` 188`,(0,B.jsx)(YGe,{}),` 189`,(0,B.jsx)(t.p,{children:`[Analysis of basic metrics: elapsed time, span count, LLM calls, tokens, etc.]`}),` 190`,(0,B.jsx)(t.h2,{id:`activity-over-time`,children:`Activity Over Time`}),` 191`,(0,B.jsx)(XGe,{}),` 192`,(0,B.jsx)(t.p,{children:`[Explanation of the stacked bar chart showing span types over time buckets]`}),` 193`,(0,B.jsx)(t.p,{children:`[Discussion of activity patterns and what they reveal about agent behavior]`}),` 194`,(0,B.jsx)(t.h2,{id:`span-activity-patterns`,children:`Span Activity Patterns`}),` 195`,(0,B.jsx)(ZGe,{}),` 196`,(0,B.jsx)(t.p,{children:`[Analysis of span count patterns and activity rhythms]`}),` 197`,(0,B.jsx)(t.h2,{id:`individual-span-timeline`,children:`Individual Span Timeline`}),` 198`,(0,B.jsx)(QGe,{}),` 199`,(0,B.jsx)(t.p,{children:`[Discussion of the Gantt chart and what we learn from granular timing]`}),` 200`,(0,B.jsx)(t.p,{children:`[Analysis of parallelism, sequential execution, and optimization opportunities]`}),` 201`,(0,B.jsx)(t.h2,{id:`the-hidden-hierarchy`,children:`The Hidden Hierarchy`}),` 202`,(0,B.jsx)($Ge,{}),` 203`,(0,B.jsx)(t.p,{children:`[Introduction to the hierarchical icicle visualization]`}),` 204`,(0,B.jsx)(t.h3,{id:`the-seven-layers`,children:`The Seven Layers`}),` 205`,(0,B.jsxs)(t.p,{children:[(0,B.jsx)(t.strong,{children:`Layer 0: Root`}),` - [Description]`]}),` 206`,(0,B.jsxs)(t.p,{children:[(0,B.jsx)(t.strong,{children:`Layer 1: Execution Phases`}),` - [Description]`]}),` 207`,(0,B.jsxs)(t.p,{children:[(0,B.jsx)(t.strong,{children:`Layer 2: Span Types`}),` - [Description]`]}),` 208`,(0,B.jsxs)(t.p,{children:[(0,B.jsx)(t.strong,{children:`Layer 3: Individual Spans`}),` - [Description]`]}),` 209`,(0,B.jsxs)(t.p,{children:[(0,B.jsx)(t.strong,{children:`Layer 4: ReAct Components`}),` - [Description]`]}),` 210`,(0,B.jsxs)(t.p,{children:[(0,B.jsx)(t.strong,{children:`Layers 5-6: Detailed Breakdown`}),` - [Description]`]}),` 211`,(0,B.jsx)(t.h2,{id:`the-react-pattern-revealed`,children:`The ReAct Pattern Revealed`}),` 212`,(0,B.jsx)(t.p,{children:`[The big reveal: these traces follow the ReAct (Reasoning + Acting) pattern]`}),` 213`,(0,B.jsx)(t.h3,{id:`what-is-react`,children:`What is ReAct?`}),` 214`,(0,B.jsx)(t.p,{children:`[Explanation of the ReAct pattern: Thought â Action â Observation cycles]`}),` 215`,(0,B.jsx)(t.h3,{id:`visualizing-react-in-action`,children:`Visualizing ReAct in Action`}),` 216`,(0,B.jsx)(t.p,{children:`[How the icicle chart reveals ReAct components and cycles]`}),` 217`,(0,B.jsx)(t.p,{children:`[Analysis of the rhythm and timing of ReAct patterns]`}),` 218`,(0,B.jsx)(t.h2,{id:`key-insights`,children:`Key Insights`}),` 219`,(0,B.jsxs)(t.ol,{children:[` 220`,(0,B.jsxs)(t.li,{children:[` 221`,(0,B.jsxs)(t.p,{children:[(0,B.jsx)(t.strong,{children:`Temporal Patterns Matter`}),`: [Insight]`]}),` 222`]}),` 223`,(0,B.jsxs)(t.li,{children:[` 224`,(0,B.jsxs)(t.p,{children:[(0,B.jsx)(t.strong,{children:`LLM Calls Dominate`}),`: [Insight]`]}),` 225`]}),` 226`,(0,B.jsxs)(t.li,{children:[` 227`,(0,B.jsxs)(t.p,{children:[(0,B.jsx)(t.strong,{children:`ReAct is Everywhere`}),`: [Insight]`]}),` 228`]}),` 229`,(0,B.jsxs)(t.li,{children:[` 230`,(0,B.jsxs)(t.p,{children:[(0,B.jsx)(t.strong,{children:`Hierarchy Reveals Structure`}),`: [Insight]`]}),` 231`]}),` 232`,(0,B.jsxs)(t.li,{children:[` 233`,(0,B.jsxs)(t.p,{children:[(0,B.jsx)(t.strong,{children:`Observability Enables Optimization`}),`: [Insight]`]}),` 234`]}),` 235`]}),` 236`,(0,B.jsx)(t.h2,{id:`conclusion`,children:`Conclusion`}),` 237`,(0,B.jsx)(t.p,{children:`[Summary of insights gained and the power of trace visualization for ML agents]`}),` 238`,(0,B.jsx)(t.hr,{}),` 239`,(0,B.jsx)(t.p,{children:(0,B.jsx)(t.em,{children:`Technical note: Visualizations built with React, visx, and D3. Data preprocessed from OpenTelemetry traces using Python. All charts are interactive - hover for details, click to inspect.`})})]})}function eKe(e={}){let{wrapper:t}=e.components||{};return t?(0,B.jsx)(t,{...e,children:(0,B.jsx)(FY,{...e})}):FY(e)}var tKe={"understanding-embeddings":jTe,"visualizing-agent-traces":eKe},nKe=e=>({h1:t=>(0,B.jsx)(Ll,{as:`h1`,size:`2xl`,mb:8,color:e,...t}),h2:e=>(0,B.jsx)(Ll,{as:`h2`,size:`lg`,mb:2,mt:8,color:`accentSubtle`,...e}
239),h3:e=>(0,B.jsx)(Ll,{as:`h3`,size:`md`,mb:2,mt:8,color:`accentSubtle`,...e}),p:e=>(0,B.jsx)(U,{mb:4,lineHeight:`tall`,fontSize:`md`,...e}),a:e=>(0,B.jsx)(Eh,{color:`blue.500`,...e}),code:e=>e.className?.includes(`language-`)?(0,B.jsx)(V,{as:`pre`,...e}):(0,B.jsx)(V,{as:`pre`,p:1,borderRadius:`md`,...e}),pre:e=>(0,B.jsx)(gh,{borderRadius:`md`,overflowX:`auto`,mb:4,whiteSpace:`pre-wrap`,wordBreak:`break-word`,maxW:`100%`,...e}),ul:e=>(0,B.jsx)(V,{as:`ul`,mb:4,ml:6,css:{listStyleType:`disc`},...e}),ol:e=>(0,B.jsx)(V,{as:`ol`,mb:4,ml:6,css:{listStyleType:`decimal`},...e}),li:e=>(0,B.jsx)(V,{as:`li`,mb:2,...e})}),rKe=()=>{let{slug:e}=ct(),t=nKe(ug(dg.light,dg.dark)),n=tKe[e];return n?(0,B.jsx)(gg,{children:(0,B.jsx)(vh,{maxW:`72ch`,pb:4,children:(0,B.jsx)(V,{as:`article`,className:`mdx-content`,children:(0,B.jsx)(n,{components:t})})})}):(0,B.jsx)(gg,{children:(0,B.jsx)(vh,{maxW:`72ch`,py:8,children:(0,B.jsx)(U,{children:`Blog post not found`})})})};function iKe(e){return(0,B.jsx)(Zue,{attribute:`class`,disableTransitionOnChange:!0,...e})}var aKe=Lae(wce,sde);function oKe(e){return(0,B.jsx)(ca,{value:aKe,children:(0,B.jsx)(iKe,{...e})})}var IY=Object.assign(({children:e,leftWidth:t=`320px`,rightWidth:n=`1fr`,gap:r=6,...i})=>{let[a,o]=_.Children.toArray(e);return(0,B.jsxs)(Fa,{templateColumns:{base:`1fr`,md:`${t} ${n}`},gap:r,minHeight:{base:`auto`,md:`calc(100vh - 100px)`},mx:`auto`,w:`fit-content`,...i,children:[a,o]})},{LeftPanel:({children:e,...t})=>(0,B.jsx)(V,{position:{base:`static`,md:`sticky`},top:{base:`auto`,md:0},height:{base:`auto`,md:`fit-content`},alignSelf:{base:`stretch`,md:`start`},...t,children:e}),RightPanel:({children:e,...t})=>(0,B.jsx)(V,{...t,children:e})}),sKe=[{title:`Visualize Recursive Flows`,abstract:`San(key)â¿ is a custom visualization for recursive flows: a sankey that unfolds the chain of tool calls behind every agent run. Slide n to reveal more of the chain, click a layer to expand it, and compare traces across agent datasets, all in-browser.`,link:`/sankeyn`,image:{dark:`sankeyn-dark.png`,light:`sankeyn-light.png`},type:`Interactive Demo`,date:{month:`May`,year:2026},featured:!0,tags:[`Interactive Demo`,`Agents`,`Sankey`,`DuckDB`]},{title:`Understand Agent Trajectories`,abstract:`Inspect agent run trajectories across datasets and models. A step-icicle reveals the most-traveled paths, an outcome sankey traces entry actions through dominant tools to outcomes, and a virtualized table cross-filters with both. Real trajectories from Qwen2.5-32B-Instruct and DeepSWE Kimi-K2 backed by DuckDB-WASM and AnyTable.`,link:`/trajectory-atlas`,image:{dark:`trajectory-atlas-dark.png`,light:`trajectory-atlas-light.png`},type:`Interactive Demo`,date:{month:`April`,year:2026},featured:!0,tags:[`Interactive Demo`,`Agents`,`DuckDB`,`Mosaic`]},{title:`Analyze Data with Agents`,abstract:`Monitor and interact with a parallel-agent system that explores datasets through coordinated sensemaking loops. Upload a CSV, watch threads investigate questions via SQL and LLM calls, and respond to stuck agents.`,link:`/latent-insights`,image:{dark:`latent-insights-dark.png`,light:`latent-insights-light.png`},type:`Framework`,date:{month:`March`,year:2026},featured:!0,tags:[`Python Framework`,`Agents`,`Human-in-the-Loop`]},{title:`AnyTable`,abstract:`A headless, virtualized React table for large datasets. DuckDB-WASM powers in-browser querying with Mosaic coordination, so tables stay visualization-friendly and composable without a monolithic config surface.`,link:`https://karthikbadam.github.io/any_table/`,image:{dark:`anytable-dark.png`,light:`anytable-light.png`},type:`Framework`,date:{month:`February`,year:2026},featured:!0,tags:[`TypeScript Framework`,`React`,`DuckDB`,`Mosaic`]},{title:`Interpret Language Model Activations`,abstract:`Interpretability of activations in SmolLM3-3B. Explore attention, contribution, hidden state, MLP metrics, and layer norms through heatmaps. Select prompts, switch metrics, and inspect token- and layer-level details to understand how the model processes text.`,link:`/transformer`,image:{dark:`transformer-viz-dark.png`,light:`transformer-viz-light.png`},type:`Interactive Demo`,date:{month:`January`,year:2026},featured:!0,tags:[`Interactive Demo`,`ML`,`Interpretability`,`Transformer`]},{title:`Navigate the Gaia Star Catalog`,abstract:`Visualization of over 1 million stars from ESA's Gaia mission. Brush regions on the sky map to explore star cluster
239s, view distributions of magnitude and parallax, and hover to see detailed information with links to SIMBAD and Gaia@AIP.`,link:`/star-catalog`,image:{dark:`gaia-catalog-dark.png`,light:`gaia-catalog-light.png`},type:`Interactive Demo`,date:{month:`December`,year:2025},featured:!0,tags:[`Interactive Demo`,`Astronomy`,`Gaia`,`Visualization`]},{title:`Visualize ML Traces from SWE-Bench`,abstract:`An interactive visualization of trace data from ML agents using OpenTelemetry, revealing performance patterns and the ReAct reasoning framework. Explore the traces and detailed spans to understand how agents think and act.`,link:`/swe-bench`,image:{dark:`swe-bench-traces-dark.png`,light:`swe-bench-traces-light.png`},type:`Interactive Demo`,date:{month:`November`,year:2025},featured:!0,tags:[`Interactive Demo`,`OpenTelemetry`,`Agents`,`Traces`]},{title:`Explore Astronomy Concepts`,abstract:`Custom visualization that renders hierarchical datasets as elegantly-arranged circular nodes in a radial layout. Explore the Unified Astronomy Thesaurus with this custom-designed visualization featuring packed circles, collision resolution, and navigation.`,link:`/packed-radial-tree`,image:{dark:`packed-radial-tree-dark.png`,light:`packed-radial-tree-light.png`},type:`Interactive Demo`,date:{month:`May`,year:2025},featured:!0,tags:[`Interactive Demo`,`Hierarchy`,`Radial Visualization`]},{title:`Understand Embeddings Through Epic Fantasy`,abstract:`A journey through the world of embeddings, illustrated with epic fantasy literature and interactive visualizations. Learn how embeddings transform text into numerical vectors that capture meaning and relationships, using examples from The Wheel of Time, Mistborn, and other fantasy series.`,link:`/blog/understanding-embeddings`,image:{dark:`understanding-embeddings-dark.png`,light:`understanding-embeddings-light.png`},type:`Blog Post`,date:{month:`April`,year:2025}},{title:`Vistrates: A Versatile Tool for Data Analytics in the World of On-Device Intelligence`,abstract:`Introducing a platform for many activities in data exploration between multiple users on heterogeneous devices. Vistrates is web-based and collaborative by nature, thus supporting data analysis anywhere, anytime, and by anyone.`,link:`http://hcil.umd.edu/vistrates/`,video:`https://www.youtube.com/watch?v=nMmiWBJoJUc`,image:`vistrates.png`,type:`Blog Post`,date:{month:`October`,year:2018}},{title:`Elastic Documents: Reading Data-Rich Documents with Generated Visualizations`,abstract:`Linking text and tables through contextual visualizations in data-rich documents improves reading comprehension. Our user evaluations have shown the power of this new approach in summarization and comprehension of data-rich documents.`,link:`http://hcil.umd.edu/document-reading-with-visual-aids/`,video:`https://vimeo.com/289784966`,name:`elasticdocs`,type:`Blog Post`,date:{month:`October`,year:2018}},{title:`Using Smartwatches and Large Displays Together for Data Analysis`,abstract:`New conceptual framework developed at University of Maryland and Technische Universität Dresden helps utilize multiple devices together for visual data analysis.`,link:`http://hcil.umd.edu/when-david-meets-goliath-using-smartwatches-and-large-displays-together-for-data-analysis/`,video:`https://www.youtube.com/watch?v=DYSvA_Hn39o`,name:`DG`,type:`Blog Post`,date:{month:`April`,year:2018}},{title:`TimeFork: Exploring Multiple Futures in the Stock Market with Generative Models`,abstract:`A new tool called TimeFork uses interactive graphics and state-of-the-art statistical models to allow traders to investigate multiple parallel universes for predicting the stock market.`,link:`http://hcil.umd.edu/back-to-the-future-exploring-multiple-futures-in-the-stock-market/`,video:`https://www.youtube.com/watch?v=nUfSqqbaD5k`,image:`timefork.png`,type:`Blog Post`,date:{month:`May`,year:2016}}],LY=14;function RY({href:e,label:t,children:n,...r}){return(0,B.jsxs)(Eh,{href:e,display:`inline-flex`,alignItems:`center`,flexShrink:0,borderRadius:`full`,bg:`accentBackground`,color:`accent`,maxW:6,h:6,overflow:`hidden`,whiteSpace:`nowrap`,transition:`max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease`,_hover:{maxW:`9rem`},...r,children:[(0,B.jsx)(V,{w:6,h:6,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,children:n}),(0,B.jsx)(U,{as:`span`,fontSize:`xs`,fontWeight:`medium`,pr:2,lineHeight:1,children:t})]})}var cKe=()=>{let e=sKe.filter(e=>e.featured===!0);return(0,B.jsx)(gg,{children:(0,B.jsx)(vh,{maxW:`container.xl`,children:(0,B.jsxs)(IY,{leftWi
239dth:`310px`,rightWidth:`1fr`,gap:{base:10,md:`100px`},children:[(0,B.jsxs)(IY.LeftPanel,{gap:6,children:[(0,B.jsx)(_h,{position:`relative`,mt:{base:6,md:`60px`},mb:4,children:(0,B.jsx)(V,{position:`relative`,borderRadius:`full`,width:`140px`,overflow:`hidden`,border:`1px solid`,borderColor:`gray.border`,bgColor:`accentBackground`,children:(0,B.jsx)(wh,{src:`profile.png`,alt:`Karthik Badam`,borderRadius:`full`,width:`100%`,height:`100%`,objectFit:`cover`,position:`relative`,zIndex:1,transition:`transform 0.3s`,_hover:{transform:`scale(1.05)`}})})}),(0,B.jsxs)(_h,{gap:2,mt:4,children:[(0,B.jsx)(Ll,{fontWeight:`semibold`,size:`2xl`,color:`accent`,children:`Karthik Badam`}),(0,B.jsxs)(U,{fontSize:`sm`,color:`gray.fg`,lineHeight:`tall`,children:[(0,B.jsx)(U,{as:`span`,color:`accent`,fontWeight:`semibold`,children:`Staff Software Engineer`}),` `,`building custom data tooling for autonomous systems at Zoox. Received a Ph.D. in Computer Science from the University of Maryland, College Park. Published novel research in HCI, Data Visualization, and Machine Learning.`]}),(0,B.jsxs)(Ch,{gap:2,pt:2,align:`center`,children:[(0,B.jsx)(RY,{href:`mailto:[email protected]`,label:`Email`,"aria-label":`Email`,children:(0,B.jsx)(Bue,{size:LY,strokeWidth:2})}),(0,B.jsx)(RY,{href:`https://linkedin.com/in/karthikbadam`,label:`LinkedIn`,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`LinkedIn`,children:(0,B.jsx)(Vue,{size:LY,strokeWidth:2})}),(0,B.jsx)(RY,{href:`https://github.com/karthikbadam`,label:`GitHub`,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`GitHub`,children:(0,B.jsx)(rg,{size:LY,strokeWidth:2})})]})]})]}),(0,B.jsx)(IY.RightPanel,{py:4,children:(0,B.jsxs)(_h,{gap:2,maxW:{base:`100%`,lg:`80ch`},mb:{base:10,md:12},children:[(0,B.jsx)(Ll,{color:`accent`,fontWeight:`semibold`,fontSize:`xl`,children:`Featured Explorations`}),e.length>0&&(0,B.jsx)(Fa,{templateColumns:{base:`1fr`,md:e.length===1?`1fr`:`1fr 1fr`},gap:4,children:e.map((e,t)=>(0,B.jsx)(lKe,{post:e},t))}),(0,B.jsx)(Tn,{to:`/explorations`,style:{alignSelf:`flex-start`},children:(0,B.jsx)(ph,{mt:2,size:`sm`,variant:`outline`,color:`accent`,borderColor:`accent`,_hover:{bg:`accentSubtle`,color:`gray.contrast`},children:`See more`})})]})})]})})})},lKe=({post:e})=>{let t=ug(e.image&&typeof e.image==`object`?e.image.light:void 0,e.image&&typeof e.image==`object`?e.image.dark:void 0),n=e&&typeof e.image==`object`?t:e&&typeof e.image==`string`?e.image:void 0;return(0,B.jsx)(V,{children:e.link.startsWith(`http`)?(0,B.jsx)(Eh,{href:e.link,_hover:{textDecoration:`none`},children:(0,B.jsx)(zY,{post:e,image:n})}):(0,B.jsx)(Tn,{to:e.link,style:{textDecoration:`none`},children:(0,B.jsx)(zY,{post:e,image:n})})})},zY=({post:e,image:t})=>(0,B.jsxs)(_h,{borderWidth:`1.5px`,borderColor:`gray.muted`,borderRadius:`xl`,_hover:{transform:`translateY(-4px)`,shadow:`xl`,shadowColor:`gray.muted`},transition:`all 0.3s`,h:`100%`,overflow:`hidden`,p:4,gap:4,children:[(0,B.jsx)(wh,{src:`/images/${t}`,alt:e.title,objectFit:`cover`,width:`100%`,height:`200px`}),(0,B.jsxs)(_h,{gap:2,flex:`1`,children:[(0,B.jsxs)(Ll,{size:`sm`,fontWeight:`medium`,css:{wordBreak:`break-word`},children:[e.title,e.date&&(0,B.jsxs)(U,{as:`span`,fontWeight:`normal`,color:`fg.muted`,fontSize:`xs`,children:[` `,`⢠`,e.date.month,` `,e.date.year]})]}),(0,B.jsx)(U,{fontSize:`xs`,lineClamp:3,color:`fg.muted`,children:e.abstract}),e.tags&&e.tags.length>0&&(0,B.jsx)(Ch,{gap:1.5,flexWrap:`wrap`,pt:1,children:e.tags.map((e,t)=>(0,B.jsx)(lue,{size:`sm`,variant:`subtle`,children:(0,B.jsx)(uue,{children:e})},`${e}-${t}`))})]})]}),uKe=()=>(0,B.jsx)(gg,{children:(0,B.jsx)(vh,{maxW:`72ch`,py:4,children:(0,B.jsxs)(Gh,{gap:4,align:`stretch`,children:[(0,B.jsx)(Ll,{color:`accent`,children:`About Me`}),(0,B.jsxs)(V,{children:[(0,B.jsx)(U,{fontSize:`md`,mb:4,children:`Full-stack engineer building tools for metrics reporting, exploratory data analysis, LLM evaluation, ML training, and autonomous systems. Passionate about crafting intuitive interfaces that make sense of complex data.`}),(0,B.jsxs)(U,{fontSize:`md`,mb:4,children:[`Get in touch:`,` `,(0,B.jsx)(Eh,{href:`mailto:[email protected]`,color:`accent`,variant:`underline`,children:`[email protected]`})]})]}),(0,B.jsxs)(V,{children:[(0,B.jsx)(Ll,{size:`lg`,mb:4,color:`accentSubtle`,children:`Experience`}),(0,B.jsx)(Ph,{columns:{base:1,md:2},gap:4,children:[{title:`Staff Software Engineer`,company:`Zoox`,period:`2026 - Present`,description:`Building custom data tooling for autonomous systems.`},{title:`Staff Full Stack Engineer`,company:`Apple`,period:`2019 - 2026`,description:`Created interactive ML tools to augment datasets that feed Apple Intelligence model training.`},{title:`Ph.D. in Computer Science`,company:`University of Maryland`,period:`2014 - 2019`,description:`Research focused on interactive data visualization and human-computer interaction.`}].map((e,t)=>(0,B.jsxs)(_h,{p:4,borderWidth:`1px`,borderRadius:`lg`,children:[(0,B.jsx)(Ll,{size:`md`,color:`accent`,children:e.title}),(0,B.jsxs)(xh,{gap:2,children:[(0,B.jsx)(U,{fontWeight:`medium`,children:e.company}),(0,B.jsx)(Nh,{orientation:`vertical`}),(0,B.jsx)(U,{color:`gray.fg`,children:e.period})]}),(0,B.jsx)(U,{mt:2,fontSize:`sm`,children:e.description})]},t))})]})]})})}),dKe={posts:[{title:`San(key)â¿: Visualize Recursive Flows`,abstract:`A custom visualization for recursive flows: a sankey that unfolds the chain of tool calls behind every agent run. Slide n to reveal more of the chain, click a layer to expand it, and compare traces across agent datasets, all in-browser.`,link:`/sankeyn`,type:`Interactive Demo`,date:`May 2026`},{title:`Understand Agent Trajectories`,abstract:`Inspect agent run trajectories across datasets and models. A step-icicle reveals the most-traveled paths, an outcome sankey traces entry actions through dominant tools to outcomes, and a virtualized table cross-filters with both. Real trajectories from Qwen2.5-32B-Instruct and DeepSWE Kimi-K2 backed by DuckDB-WASM and AnyTable.`,link:`/trajectory-atlas`,type:`Interactive Demo`,date:`April 2026`},{title:`Latent Insights: Analyze Data with Agents`,abstract:`Monitor and interact with a parallel-agent system that explores datasets through coordinated sensemaking loops. Upload a CSV, watch threads investigate questions via SQL and LLM calls, and respond to stuck agents.`,link:`/latent-insights`,github:`https://github.com/karthikbadam/latent-insights-service`,type:`Framework`,date:`March 2026`},{title:`AnyTable`,abstract:`A headless, virtualized React table for large datasets. DuckDB-WASM powers in-browser querying with Mosaic coordination, so tables stay visualization-friendly and composable without a monolithic config surface.`,link:`https://karthikbadam.github.io/any_table/`,github:`https://github.com/karthikbadam/any_table`,type:`Framework`,date:`February 2026`},{title:`Interpret Language Model Activations`,abstract:`Interpretability of activations in SmolLM3-3B. Explore attention, contribution, hidden state, MLP metrics, and layer norms through heatmaps. Select prompts, switch metrics, and inspect token- and layer-level details to understand how the model processes text.`,link:`/transformer`,type:`Interactive Demo`,date:`January 2026`},{title:`Navigate the Gaia Star Catalog`,abstract:`Visualization of over 1 million stars from ESA's Gaia mission. Brush regions on the sky map to explore star cluster
239s, view distributions of magnitude and parallax, and hover to see detailed information with links to SIMBAD and Gaia@AIP.`,link:`/star-catalog`,type:`Interactive Demo`,date:`December 2025`},{title:`Gravitational Lensing Simulation`,abstract:`Simulation of gravitational lensing using the thin-lens point-mass approximation. Add and remove lenses to observe how mass bends light, creating caustics and distorting the source plane grid.`,link:`/gravitational-lensing`,type:`Interactive Demo`,date:`November 2025`},{title:`Visualize ML Traces from SWE-Bench`,abstract:`An interactive visualization of trace data from ML agents using OpenTelemetry, revealing performance patterns and the ReAct reasoning framework. Explore the traces and detailed spans to understand how agents think and act.`,link:`/swe-bench`,type:`Interactive Demo`,date:`November 2025`},{title:`Explore Astronomy Concepts with a Packed Radial Tree`,abstract:`Custom visualization that renders hierarchical datasets as elegantly-arranged circular nodes in a radial layout. Explore the Unified Astronomy Thesaurus with this custom-designed visualization featuring packed circles, collision resolution, and navigation.`,link:`/packed-radial-tree`,type:`Interactive Demo`,date:`May 2025`},{title:`Understanding Embeddings Through Epic Fantasy`,abstract:`A journey through the world of embeddings, illustrated with epic fantasy literature and interactive visualizations. Learn how embeddings transform text into numerical vectors that capture meaning and relationships, using examples from The Wheel of Time, Mistborn, and other fantasy series.`,link:`/blog/understanding-embeddings`,type:`Blog Post`,date:`April 2025`},{title:`Vistrates: A Versatile Tool for Data Analytics in the World of On-Device Intelligence`,abstract:`Introducing a platform for many activities in data exploration between multiple users on heterogeneous devices. Vistrates is web-based and collaborative by nature, thus supporting data analysis anywhere, anytime, and by anyone.`,link:`http://hcil.umd.edu/vistrates/`,video:`https://www.youtube.com/watch?v=nMmiWBJoJUc`,name:`vistrates`,type:`Blog Post`,date:`Oct 22, 2018`},{title:`Elastic Documents: Reading Data-Rich Documents with Generated Visualizations`,abstract:`Linking text and tables through contextual visualizations in data-rich documents improves reading comprehension. Our user evaluations have shown the power of this new approach in summarization and comprehension of data-rich documents.`,link:`http://hcil.umd.edu/document-reading-with-visual-aids/`,video:`https://vimeo.com/289784966`,name:`elasticdocs`,type:`Blog Post`,date:`Oct 21, 2018`},{title:`When David Meets Goliath: Using Smartwatches and Large Displays Together for Data Analysis`,abstract:`New conceptual framework developed at University of Maryland and Technische Universität Dresden helps utilize multiple devices together for visual data analysis.`,link:`http://hcil.umd.edu/when-david-meets-goliath-using-smartwatches-and-large-displays-together-for-data-analysis/`,video:`https://www.youtube.com/watch?v=DYSvA_Hn39o`,name:`DG`,type:`Blog Post`,date:`April 18, 2018`},{title:`Understanding Data by Having Computers and Humans Work Together`,abstract:`Introducing a new tool called DataSite for proactive visual exploration using insight-based recommendations to help analysts easily get started with data analysis.`,link:`http://hcil.umd.edu/posts/understanding-data-by-having-computers-and-humans-work-together/`,name:`datasite`,type:`Blog Post`,date:`March 9, 2018`},{title:`Bridging Physical and Digital Worlds: When Your Body Is Your Tool, Data Becomes Accessible`,abstract:`New interaction models developed at University of Maryland and University of Manitoba utilize body and hand movement to perform data analysis on large wall-sized displays.`,link:`http://hcil.umd.edu/bridging-physical-and-digital-worlds/`,video:`https://www.youtube.com/watch?v=xd7G_q8nocc`,name:`proxemiclens`,type:`Blog Post`,date:`Oct 23, 2016`},{title:`TimeFork: Exploring Multiple Futures in the Stock Market with Generative Models`,abstract:`A new tool called TimeFork uses interactive graphics and state-of-the-art statistical models to allow traders to investigate multiple parallel universes for predicting the stock market.`,link:`http://hcil.umd.edu/back-to-the-future-exploring-multiple-futures-in-the-stock-market/`,video:`https://www.youtube.com/watch?v=nUfSqqbaD5k`,name:`timefork`,type:`Blog Post`,date:`May 12, 2016`}]},BY={size:`sm`,variant:`outline`,color:`accent`,borderColor:`accent`,_hover:{bg:`accentSubtle`,color:`gray.contrast`}};function VY(e,t){if(t)return t;if(e.startsWith(`mailto:`))return`Visit`;
239if(e.startsWith(`http`)){try{if(new URL(e).hostname===`karthikbadam.github.io`)return`Live Demo`}catch{}return`Visit`}return`Live Demo`}function fKe(e){return!!e&&!e.startsWith(`http`)&&!e.startsWith(`mailto:`)}var pKe=()=>{let{posts:e}=dKe;return(0,B.jsx)(gg,{children:(0,B.jsx)(vh,{maxW:`100ch`,py:4,children:(0,B.jsxs)(Gh,{gap:4,align:`stretch`,children:[(0,B.jsx)(Ll,{color:`accent`,children:`Explorations`}),e.map((e,t)=>(0,B.jsxs)(V,{p:4,borderWidth:`1px`,borderRadius:`lg`,fontSize:`sm`,children:[(0,B.jsx)(Ll,{size:`md`,color:`accent`,children:e.title}),(0,B.jsx)(U,{color:`gray.fg`,mt:2,children:e.date}),(0,B.jsx)(U,{mt:2,children:e.abstract}),(0,B.jsxs)(Ch,{mt:2,gap:4,flexWrap:`wrap`,children:[fKe(e.link)?(0,B.jsx)(Tn,{to:e.link,children:(0,B.jsx)(ph,{...BY,children:VY(e.link,e.linkLabel)})}):(0,B.jsx)(Eh,{href:e.link,target:`_blank`,rel:`noopener noreferrer`,children:(0,B.jsx)(ph,{...BY,children:VY(e.link,e.linkLabel)})}),e.github&&(0,B.jsx)(Eh,{href:e.github,target:`_blank`,rel:`noopener noreferrer`,children:(0,B.jsx)(ph,{...BY,children:`GitHub Source`})}),e.video&&(0,B.jsx)(Eh,{href:e.video,target:`_blank`,rel:`noopener noreferrer`,children:(0,B.jsx)(ph,{...BY,children:`Watch Video`})})]})]},t))]})})})},HY=JSON.parse(`[{"authors":["Anna Vilanova","Marco Angelini","Sriram Karthik Badam","Jean-Daniel Fekete"],"title":"Uncertainty and Quality for Progressive Data Analysis","venue":"Progressive Data Analysis: Roadmap and Research Agenda (Chapter 6)","year":"2024","type":"Book Chapter","pdf":"/files/PDAV-Book-Web.pdf","video":"","name":"uncertainty-progressive-analysis","keywords":["Progressive Analysis","Uncertainty","Data Quality","Visual Analytics"]},{"authors":["Weihang Wang","Sriram Karthik Badam","Niklas Elmqvist"],"title":"Topology-Aware Space Distortion for Structured Visualization Spaces","venue":"Information Visualization Journal","year":"2022","type":"Journal","pdf":"/files/zoomhalo.pdf","video":"","name":"topology-distortion","keywords":["Visualization","Space Distortion","Topology"]},{"authors":["Sriram Karthik Badam","Senthil K. Chandrasegaran","Niklas Elmqvist"],"title":"Integrating Annotations Into Multidimensional Visual Dashboards","venue":"Information Visualization Journal","year":"2022","type":"Journal","pdf":"/files/facetnotes.pdf","video":"","name":"annotations-dashboards","keywords":["Visual Analytics","Dashboards","Annotations","Multidimensional Data"]},{"authors":["Sriram Karthik Badam","Niklas Elmqvist"],"title":"Effects of Screen-Responsive Visualization on Data Comprehension","venue":"Information Visualization Journal","year":"2021","type":"Journal","pdf":"/files/touchinsight.pdf","video":"","name":"screen-responsive-effects","keywords":["Responsive Visualization","Data Comprehension","Mobile Visualization","Screen Size"]},{"authors":["Ninger Zhou","Lorraine G. Kisselburgh","Senthil K. Chandrasegaran","Sriram Karthik Badam","Niklas Elmqvist","Karthik Ramani"],"title":"Using Social Interaction Trace Data and Context to Predict Collaboration Quality and Creative Fluency in Collaborative Design Learning Environments","venue":"International Journal of Human-Computer Studies","year":"2020","type":"Journal","pdf":"/files/social-interaction-traces.pdf","video":"","name":"social-interaction-prediction","keywords":["Collaboration","Design Learning","Social Interaction","Machine Learning","Creative Fluency"]},{"authors":["Sriram Karthik Badam","Andreas Mathisen","Roman Rädle","Clemens Klokmose","Niklas Elmqvist"],"title":"Vistrates: A Component Model for Ubiquitous Analytics","venue":"IEEE Transactions on Visualization and Computer Graphics (TVCG) (Presented at IEEE VIS)","year":"2019","type":"Journal","pdf":"/files/vistrates.pdf","video":"https://www.youtube.com/watch?v=nMmiWBJoJUc","name":"vistrates","keywords":["Visual Analytics","Cross-Device Analytics","Ubiquitous Analytics"]},{"authors":["Sriram Karthik Badam","Zhicheng Liu","Niklas Elmqvist"],"title":"Elastic Documents: Coupling Text and Tables through Contextual Visualizations for Enhanced Document Reading","venue":"IEEE Transactions on Visualization and Computer Graphics (TVCG) (Presented at IEEE VIS)","year":"2019","type":"Journal","video":"","pdf":"/files/elastic-documents.pdf","name":"elasticdocs","keywords":["Document reading"]},{"authors":["Zhe Cui","Sriram Karthik Badam","Adil Yalcin","Niklas Elmqvist"],"title":"DataSite: Proactive Visual Data Exploration with Computation of Insight-based Recommendations","venue":"Information Visualization Journal","year":"2019","type":"Journal","video":"","pdf":"/files/datasite.pdf","name":"datasite","keywords":["Exploratory analysis","proactive visualization"]},{"authors":["Sriram Karthik Badam","Roman Rädle","Clemens N. Klokmose","Niklas Elmqvist"],"title":"Towards a Unified Visualization Platform for Ubiquitous Analytics","venue":"Data Visualization on Mobile Devices at ACM CHI","year":"2018","type":"Workshop","pdf":"/files/unified.pdf","video":"","name":"unified","keywords":["Visual analytics","collaboration","cross-device","Multimodal interaction"]},{"authors":["Sriram Karthik Badam","Arjun Srinivasan","Niklas Elmqvist","John Stasko"],"title":"Affordances of Input Mod
239alities for Visual Data Exploration in Immersive Environments","venue":"Immersive Analytics Workshop at IEEE VIS","year":"2017","type":"Workshop","pdf":"/files/mixing-modalities.pdf","video":"","name":"mixing-modalities","keywords":["Multimodal interaction","Responsive Visualization","Large Displays","Smartwatches","Touch","Speech","Multi-Display Environments"]},{"authors":["Sriram Karthik Badam","Niklas Elmqvist"],"title":"Design Considerations for Mid-Air Interaction With Holographic Projections","venue":"Mid-Air Haptics and Displays Workshop at ACM CHI","year":"2016","type":"Workshop","pdf":"/files/mid-air.pdf","video":"","name":"mid-air","keywords":["Multimodal interaction","Mid-air interaction","Holograms"]},{"authors":["Zhe Cui","Shivalik Sen","Sriram Karthik Badam","Niklas Elmqvist"],"title":"VisHive: Supporting Web-Based Visualization Through Ad-Hoc Computational Clusters of Mobile Devices","venue":"Information Visualization Journal","year":"2018","type":"Journal","video":"","pdf":"/files/vishive.pdf","name":"vishive","keywords":["Web Visualization","Adhoc Clusters","SVG","Canvas","Scalability"]},{"authors":["Sriram Karthik Badam","Tom Horak","Niklas Elmqvist","Raimund Dachselt"],"equal":"true","title":"Combining Smartwatches With a Large Vertical Display for Visual Data Exploration","venue":"ACM Human Factors in Computing Systems (CHI)","year":"2018","type":"Conference","pdf":"/files/nui-visualization.pdf","video":"https://youtu.be/DYSvA_Hn39o","award":"Honorable Mention (TOP 4%)","name":"DG","keywords":["Visual Analytics","Cross-Device Analytics","Responsive Visualization","Large Displays","Smartwatches","Cross-Device Interaction","Multi-Display Environments","Visualization"]},{"authors":["Sriram Karthik Badam","Niklas Elmqvist"],"title":"Visfer: Camera-Based Visual Data Transfer for Cross-Device Visualization","venue":"Information Visualization Journal","year":"2017","type":"Journal","pdf":"/files/visfer.pdf","video":"https://youtu.be/KG1YqwlePGA","name":"visfer","keywords":["Visual Analytics","Cross-Device Analytics","Responsive Visualization","Visual Transfer","QR codes","Web-Based"]},{"authors":["Sriram Karthik Badam","Niklas Elmqvist","Jean-Daniel Fekete"],"title":"Steering the Craft: UI Elements and Visualizations for Supporting Progressive Visual Analytics","venue":"Computer Graphics Forum","year":"2017","type":"Journal","pdf":"/files/InsightsFeed.pdf","video":"https://www.youtube.com/watch?v=GVhNR5dyccE","name":"progressive","keywords":["Visual Analytics","Progressive Analytics","Visual Exploration","Twitter Analysis","User Study","Web-Based"]},{"authors":["Senthil Chandrasegaran","Sriram Karthik Badam","Lorraine Kisselburgh","Karthik Ramani","Niklas Elmqvist"],"title":"Integrating Visual Analytics Support for Grounded Theory Practice in Qualitative Text Analysis","venue":"Computer Graphics Forum","year":"2017","type":"Journal","pdf":"/files/gthelper.pdf","video":"https://www.dropbox.com/s/pjeyosgfbgrfeis/EuroVis_submission_307.mp4?dl=0","name":"gthelper","keywords":["Grounded Theory","Design","User Study","Visual Analytics","HCI"]},{"authors":["Sriram Karthik Badam","Zehua Zeng","Emily Wall","Alex Endert","Niklas Elmqvist"],"title":"Supporting Team-First Visual Analytics Through Group Activity Representations","venue":"Graphics Interface","year":"2017","type":"Conference","pdf":"/files/group-awareness.pdf","video":"https://www.youtube.com/watch?v=jb20SzgYhbA","name":"ga","keywords":["Visual Analytics","Collaboration","Group Awareness","Sensemaking","User Study"]},{"authors":["Senthil Chandrasegaran","Sriram Karthik Badam","Ninger Zhou","Zhenpeng Zhao","Lorraine Kisselburgh","Kylie Peppler","Niklas Elmqvist","Karthik Ramani"],"title":"Merge Sketches for Creative Design Exploration: An Evaluation of Physical and Cognitive Operations","venue":"Graphics Interface","year":"2017","type":"Conference","pdf":"/files/merge-study.pdf","video":"","name":"merge","keywords":["User Study","Merge","Sketching","Cross-Device Interaction","Multi-Display Environments","Design","Handheld Devices"]},{"authors":["Sriram Karthik Badam","Fereshteh Amini","Niklas Elmqvist","Pourang Irani"],"title":"Supporting Visual Exploration for Multiple Users in Large Display Environments","venue":"IEEE Visual Analytics Science and Technology (VAST)","year":"2016","type":"Conference","pdf":"/files/multi-user.pdf","video":"https://www.youtube.com/watch?v=xd7G_q8nocc","name":"proxemiclens","keywords":["Proxemics","Gestures","Visual Exploration","Collaboration","Sensemaking","User Study","Large Displays","Visualization","Visual Analytics","HCI"]},{"authors":["Sriram Karthik Badam","Jieqiong Zhao","Shivalik Sen","Niklas Elmqvist","David Ebert"],"title":"TimeFork: Interactive Prediction of Time Series","venue":"ACM Human Factors in Computing Systems (CHI)","year":"2016","type":"Conference","pdf":"/files/timefork.pdf","video":"https://www.youtube.com/watch?v=nUfSqqbaD5k","name":"timefork","keywords":["Visual Analytics","Visual Prediction","Time Series","User Study","Temporal Forecasting","Mixed-Initative","Web-Based"]},{"authors":["Sriram Karthik Badam","Niklas Elmqvist"],"title":"PolyChrome: A Cross-Device Framework for Collaborative Web Visualization","venue":"ACM Interactive Tabletops and Surfaces (ITS), now known as ISS","year":"2014","type":"Conference","pdf":"/files/polychrome.pdf","video":"https://www.youtube.com/watch?v=0izPWZs7jHU","name":"polychrome","keywords":["Co-browsing","Cross-Device Interaction","Multi-Display Environments","Visualization","Web-Based","Framework","Handheld Devices"]},{"authors":["Senthil Chandrasegaran","Sriram Karthik Badam","Zhenpeng Zhao","Niklas Elmqvist","Lorraine Kisselburgh","Karthik Ramani"],"title":"Collaborative Sketching with skWiki: A Case Study","venue":"ASME IDETC/CIE","year":"2014","type":"Conference","pdf":"/files/skWiki_case_study.pdf","video":"https://www.youtube.com/watch?v=zHG_53Hv9hA","name":"skwikistudy","keywords":["User Study","Sketching","Collaboration","Case Study","Design","Creativity","HCI"]},{"authors":["Sriram Karthik Badam","Senthil Chandrasegaran","Niklas Elmqvist","Karthik Ramani"],"equal":"true","title":"Tracing and Sketching Performance using Blunt-Tipped Styli on Direct-Touch Tablets","venue":" ACM Advanced Visual Interfaces (AVI)","year":"2014","type":"Conference","pdf":"/files/sketch-media.pdf","video":"https://www.dropbox.com/s/uff5290s5rx4lei/sketch-media-avi.mov?dl=0","name":"sketchmedia","keywords":["Sketching","Evaluation","Pen","Paper","User Study","HCI","Handheld Devices"]},{"authors":["Zhenpeng Zhao","Sriram Karthik Badam","Senthil Chandrasegaran","Deok Gun Park","Niklas Elmqvist","Lorraine Kisselburgh","Karthik Ramani"],"title":"skWiki: A Multimedia
239Sketching System for Collaborative Creativity","venue":"ACM Human Factors in Computing Systems (CHI)","year":"2014","type":"Conference","pdf":"/files/skwiki.pdf","video":"https://www.youtube.com/watch?v=zHG_53Hv9hA","name":"skwiki","keywords":["User Study","Sketching","Cross-Device Interaction","Multi-Display Environments","Collaboration","Design","History","Wiki","Web-Based","Handheld Devices"]},{"authors":["Senthil Chandrasegaran","Sriram Karthik Badam","Lorraine Kisselburgh","Kyle Peppler","Niklas Elmqvist","Karthik Ramani"],"title":"VizScribe: A Visual Analytics Approach to Understand Designer Behavior","venue":"International Journal of Human-Computer Studies (IJHCS)","year":"2017","type":"Journal","pdf":"/files/vizscribe.pdf","video":"https://vimeo.com/169905057","name":"vizscribe","keywords":["Protocol Analysis","Design","User Study","Visual Analytics","HCI"]},{"authors":["Sriram Karthik Badam","Eli Fisher","Niklas Elmqvist"],"title":"Munin: A Peer-to-Peer Middleware for Ubiquitous Analytics and Visualization Spaces","venue":"IEEE Transactions on Visualization & Computer Graphics (TVCG)","year":"2015","type":"Journal","pdf":"/files/munin.pdf","video":"https://www.youtube.com/watch?v=ZKIXSdUm6-s","name":"munin","keywords":["Multi-Display Environments","Cross-Device Interaction","Visualization","Framework","Handheld Devices"]},{"authors":["Jonathan C. Roberts","Panagiotis D. Ritsos","Sriram Karthik Badam","Dominique Brodbeck","Jessie Kennedy","Niklas Elmqvist"],"title":"Visualization beyond the Desktop---The Next Big Thing","venue":" IEEE Computer Graphics & Applications (CG&A)","year":"2014","type":"Journal","pdf":"/files/beyond-desktop.pdf","video":"https://www.youtube.com/watch?v=0izPWZs7jHU","name":"beyondDesktopVis","keywords":["Immersion","Visualization","Multi-Display Environments","Cross-Device Interaction","Multimodal","Multi-Sensory","Handheld Devices"]},{"authors":["Eli Fisher","Sriram Karthik Badam","Niklas Elmqvist"],"venue":"International Journal of Human-Computer Studies (IJHCS)","title":"Designing Peer-to-Peer Distributed User Interfaces: Case Studies on Building Distributed Applications","year":"2014","type":"Journal","pdf":"/files/dui-design.pdf","video":"","name":"dui","keywords":["Distributed User Interfaces","Case Study","Design","Framework"]}]`),mKe=()=>{let[e,t]=(0,_.useState)(`all`),[n,r]=(0,_.useState)(`all`),i=[`all`,...Array.from(new Set(HY.map(e=>e.type)))],a=[`all`,...Array.from(new Set(HY.map(e=>e.year)))].sort((e,t)=>t.localeCompare(e)),o=HY.filter(t=>{let r=e===`all`||t.type===e,i=n===`all`||t.year===n;return r&&i}).reduce((e,t)=>{let n=t.type;return e[n]||(e[n]=[]),e[n].push(t),e},{}),s=e=>{t(e.currentTarget.value)},c=e=>{r(e.currentTarget.value)},l=e=>e.map((t,n)=>(0,B.jsxs)(`span`,{children:[t===`Sriram Karthik Badam`?(0,B.jsx)(U,{as:`span`,color:`accent`,fontWeight:`medium`,children:t}):t,n<e.length-1&&`, `]},n));return(0,B.jsx)(gg,{children:(0,B.jsx)(vh,{maxW:`100ch`,py:4,children:(0,B.jsxs)(Gh,{gap:4,align:`stretch`,children:[(0,B.jsx)(Ll,{color:`accent`,children:`Publications`}),(0,B.jsxs)(xh,{gap:4,wrap:`wrap`,children:[(0,B.jsxs)(Ah,{flex:`1`,children:[(0,B.jsx)(jh,{value:e,onChange:s,children:i.map(e=>(0,B.jsx)(`option`,{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))}),(0,B.jsx)(Mh,{})]}),(0,B.jsxs)(Ah,{flex:`1`,children:[(0,B.jsx)(jh,{value:n,onChange:c,children:a.map(e=>(0,B.jsx)(`option`,{value:e,children:e===`all`?`All Years`:e},e))}),(0,B.jsx)(Mh,{})]})]}),Object.entries(o).map(([e,t])=>(0,B.jsxs)(V,{fontSize:`sm`,children:[(0,B.jsx)(Ll,{size:`md`,mb:2,color:`accentSubtle`,children:e.charAt(0).toUpperCase()+e.slice(1)}),t.map((e,t)=>(0,B.jsx)(V,{p:4,borderWidth:`1px`,borderRadius:`lg`,borderColor:`gray.muted`,mb:2,children:(0,B.jsxs)(xh,{justify:`space-between`,gap:4,children:[(0,B.jsxs)(_h,{gap:2,children:[(0,B.jsx)(Ll,{size:`md`,color:`accent`,children:e.title}),(0,B.jsx)(xh,{children:(0,B.jsx)(U,{children:l(e.authors)})}),(0,B.jsxs)(xh,{gap:2,wrap:`wrap`,children:[(0,B.jsx)(U,{children:e.venue}),e.award&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Nh,{orientation:`vertical`}),(0,B.jsx)(U,{color:`purple.fg`,children:e.award})]}),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Nh,{orientation:`vertical`}),(0,B.jsx)(U,{children:e.year})]})]}),e.keywords&&e.keywords.length>0&&(0,B.jsx)(xh,{gap:2,wrap:`wrap`,children:e.keywords.map((e,t)=>(0,B.jsx)(lue,{fontSize:`sm`,children:(0,B.jsx)(uue,{children:e})},t))})]}),(0,B.jsxs)(_h,{children:[e.pdf&&(0,B.jsx)(Eh,{href:e.pdf,target:`_blank`,rel:`noopener noreferrer`,children:(0,B.jsx)(ph,{size:`sm`,minW:`70px`,variant:`outline`,color:`accent`,borderColor:`accent`,_hover:{bg:`accentSubtle`,color:`gray.contrast`},children:`PDF`})}),e.video&&(0,B.jsx)(Eh,{href:e.video,target:`_blank`,rel:`noopener noreferrer`,children:(0,B.jsx)(ph,{size:`sm`,variant:`outline`,minW:`70px`,color:`accent`,borderColor:`accent`,_hover:{bg:`accentSubtle`,color:`gray.contrast`},children:`Video`})})]})]})},t))]},e))]})})})};function UY(e){return`init`in e}function WY(e){return typeof e.write==`function`}function hKe(e){return!!e.onMount}function GY(e){return`v`in e||`e`in e}function KY(e){if(`e`in e)throw e.e;return e.v}function qY(e){return typeof e?.then==`function`}function JY(e,t,n){if(!n.p.has(e)){n.p.add(e);let r=()=>n.p.delete(e);t.then(r,r)}}
vendor: 6,162 bytes, line 239
239function YY(e,t,n){let r=n.get(e)?.t,i=t.p;if(!r?.size)return i;if(!i.size)return r;let a=new Set(r);for(let e of i)a.add(e);return a}function gKe(e){return!!e.INTERNAL_onInit}var _Ke=(e,t,n,...r)=>n.read(...r),vKe=(e,t,n,...r)=>n.write(...r),yKe=(e,t,n)=>n.INTERNAL_onInit(t),bKe=(e,t,n,r)=>n.onMount?.call(n,r),xKe=(e,t,n)=>{var r;let i=e[0],a=i.get(n);if(!a){let o=e[6],s=e[9];a={d:new Map,p:new Set,n:0},i.set(n,a),(r=o.i)==null||r.call(o,n),gKe(n)&&s(e,t,n)}return a},SKe=(e,t)=>{let n=e[1],r=e[3],i=e[4],a=e[5],o=e[6],s=e[13];if(!o.f&&!r.size&&!i.size&&!a.size)return;let c=[],l=e=>{try{e()}catch(e){c.push(e)}};do{o.f&&l(o.f);let c=new Set;for(let e of r){let t=n.get(e)?.l;if(t)for(let e of t)c.add(e)}r.clear();for(let e of a)c.add(e);a.clear();for(let e of i)c.add(e);i.clear();for(let e of c)l(e);r.size&&s(e,t)}while(r.size||a.size||i.size);if(c.length)throw AggregateError(c)},CKe=(e,t)=>{let n=e[1],r=e[2],i=e[3],a=e[11],o=e[14],s=e[17];if(!i.size)return;let c=[],l=[],u=new WeakSet,d=new WeakSet,f=[],p=[];for(let n of i)f.push(n),p.push(a(e,t,n));for(;f.length;){let i=f.length-1,o=f[i],s=p[i];if(d.has(o)){f.pop(),p.pop();continue}if(u.has(o)){r.get(o)===s.n&&(c.push(o),l.push(s)),d.add(o),f.pop(),p.pop();continue}u.add(o);for(let r of YY(o,s,n))u.has(r)||(f.push(r),p.push(a(e,t,r)))}for(let n=c.length-1;n>=0;--n){let a=c[n],u=l[n],d=!1;for(let e of u.d.keys())if(e!==a&&i.has(e)){d=!0;break}d&&(r.set(a,u.n),o(e,t,a),s(e,t,a)),r.delete(a)}},wKe=(e,t,n)=>{var r,i;let a=e[1],o=e[2],s=e[3],c=e[6],l=e[7],u=e[11],d=e[12],f=e[13],p=e[14],m=e[16],h=e[17],g=e[20],_=e[26],v=e[28],y=u(e,t,n),b=v[0];if(GY(y)){if(a.has(n)&&o.get(n)!==y.n||y.m===b)return y.m=b,y;let r=!1;for(let[n,i]of y.d)if(p(e,t,n).n!==i){r=!0;break}if(!r)return y.m=b,y}let x=!0,S=new Set(y.d.keys()),C=()=>{for(let e of S)y.d.delete(e)},w=()=>{if(a.has(n)){let r=!s.size;h(e,t,n),r&&(f(e,t),d(e,t))}},T=r=>{var i;if(r===n){let n=u(e,t,r);if(!GY(n))if(UY(r))g(e,t,r,r.init);else throw Error(`no atom init`);return KY(n)}let o=p(e,t,r);try{return KY(o)}finally{S.delete(r),y.d.set(r,o.n),qY(y.v)&&JY(n,y.v,o),a.has(n)&&((i=a.get(r))==null||i.t.add(n)),x||w()}},E,D,O={get signal(){return E||=new AbortController,E.signal},get setSelf(){return!D&&WY(n)&&(D=(...r)=>{if(!x)try{return m(e,t,n,r)}finally{f(e,t),d(e,t)}}),D}},k=y.n,A=o.get(n)===k;try{let i=l(e,t,n,T,O);if(g(e,t,n,i),qY(i)){_(e,t,i,()=>E?.abort());let n=()=>{C(),w()};i.then(n,n)}else C();return(r=c.r)==null||r.call(c,n),y.m=b,y}catch(e){return delete y.v,y.e=e,++y.n,y.m=b,y}finally{x=!1,y.n!==k&&A&&(o.set(n,y.n),s.add(n),(i=c.c)==null||i.call(c,n))}},TKe=(e,t,n)=>{let r=e[1],i=e[2],a=e[11],o=[n];for(;o.length;){let n=o.pop(),s=a(e,t,n);for(let c of YY(n,s,r)){let n=a(e,t,c);i.get(c)!==n.n&&(i.set(c,n.n),o.push(c))}}},EKe=(e,t,n,r)=>{let i=e[3],a=e[6],o=e[8],s=e[11],c=e[12],l=e[13],u=e[14],d=e[15],f=e[16],p=e[17],m=e[20],h=e[28],g=!0,_=n=>KY(u(e,t,n)),v=(r,...o)=>{var u;let _=s(e,t,r);try{if(r===n){if(!UY(r))throw Error(`atom not writable`);let n=_.n,s=o[0];m(e,t,r,s),p(e,t,r),n!==_.n&&(++h[0],i.add(r),d(e,t,r),(u=a.c)==null||u.call(a,r));return}else return f(e,t,r,o)}finally{g||(l(e,t),c(e,t))}};try{return o(e,t,n,_,v,...r)}finally{g=!1}},DKe=(e,t,n)=>{var r;let i=e[1],a=e[3],o=e[6],s=e[11],c=e[15],l=e[18],u=e[19],d=s(e,t,n),f=i.get(n);if(f&&d.d.size>0){for(let[i,u]of d.d)if(!f.d.has(i)){let d=s(e,t,i);l(e,t,i).t.add(n),f.d.add(i),u!==d.n&&(a.add(i),c(e,t,i),(r=o.c)==null||r.call(o,i))}for(let r of f.d)d.d.has(r)||(f.d.delete(r),u(e,t,r)?.t.delete(n))}},OKe=(e,t,n)=>{var r;let i=e[1],a=e[4],o=e[6],s=e[10],c=e[11],l=e[12],u=e[13],d=e[14],f=e[16],p=e[18],m=c(e,t,n),h=i.get(n);if(!h){d(e,t,n);for(let r of m.d.keys())p(e,t,r).t.add(n);h={l:new Set,d:new Set(m.d.keys()),t:new Set},i.set(n,h),WY(n)&&hKe(n)&&a.add(()=>{let r=!0,i=(...i)=>{try{return f(e,t,n,i)}finally{r||(u(e,t),l(e,t))}};try{let a=s(e,t,n,i);a&&(h.u=()=>{r=!0;try{a()}finally{r=!1}})}finally{r=!1}}),(r=o.m)==null||r.call(o,n)}return h},kKe=(e,t,n)=>{var r;let i=e[1],a=e[5],o=e[6],s=e[11],c=e[19],l=s(e,t,n),u=i.get(n);if(!u||u.l.size)return u;let d=!1;for(let e of u.t)if(i.get(e)?.d.has(n)){d=!0;break}if(!d){u.u&&a.add(u.u),u=void 0,i.delete(n);for(let r of l.d.keys())c(e,t,r)?.t.delete(n);(r=o.u)==null||r.call(o,n);return}return u},AKe=(e,t,n,r)=>{let i=e[11],a=e[27],o=i(e,t,n),s=`v`in o,c=o.v;if(qY(r))for(let a of o.d.keys())JY(n,r,i(e,t,a));o.v=r,delete o.e,(!s||!Object.is(c,o.v))&&(++o.n,qY(c)&&a(e,t,c))},jKe=(e,t,n)=>{let r=e[14];return KY(r(e,t,n))},MKe=(e,t,n,...r)=>{let i=e[3],a=e[12],o=e[13],s=e[16],c=i.size;try{return s(e,t,n,r)}finally{i.size!==c&&(o(e,t),a(e,t))}},NKe=(e,t,n,r)=>{let i=e[12],a=e[18],o=e[19],s=a(e,t,n).l;return s.add(r),i(e,t),()=>{s.delete(r),o(e,t,n),i(e,t)}},PKe=(e,t,n,r)=>{let i=e[25],a=i.get(n);if(!a){a=new Set,i.set(n,a);let e=()=>i.delete(n);n.then(e,e)}a.add(r)},FKe=(e,t,n)=>{e[25].get(n)?.forEach(e=>e())},XY=new WeakMap;function IKe(e){let t=XY.get(e),n=t[24];return n?n(t,e):t}function LKe(...e){let t={get(e){return r(n,t,e)},set(e,...r){return i(n,t,e,...r)},sub(e,r){return a(n,t,e,r)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},_Ke,vKe,yKe,bKe,xKe,SKe,CKe,wKe,TKe,EKe,DKe,OKe,kKe,AKe,jKe,MKe,NKe,void 0,new WeakMap,PKe,FKe,[0]].map((t,n)=>e[n]||t);XY.set(t,Object.freeze(n));let r=n[21],i=n[22],a=n[23];return t}var RKe=0;function J(e,t){let n=`atom${++RKe}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=zKe,r.write=BKe),t&&(r.write=t),r}function zKe(e){return e(this)}function BKe(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}var ZY;function QY(){return ZY?ZY():LKe()}var $Y;function VKe(){return $Y||=QY(),$Y}var eX=(0,_.createContext)(void 0);function tX(e){let t=(0,_.useContext)(eX);return e?.store||t||VKe()}function nX({children:e,store:t}){let n=(0,_.useRef)(null);return t?(0,_.createElement)(eX.Provider,{value:t},e):(n.current===null&&(n.current=QY()),(0,_.createElement)(eX.Provider,{value:n.current},e))}var rX=e=>typeof e?.then==`function`,iX=e=>{e.status||(e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}))},HKe=_.default.use||(e=>
239{if(e.status===`pending`)throw e;if(e.status===`fulfilled`)return e.value;throw e.status===`rejected`?e.reason:(iX(e),e)}),aX=new WeakMap,oX=(e,t,n)=>{let r=IKe(e),i=r[26],a=aX.get(t);return a||(a=new Promise((o,s)=>{let c=t,l=e=>t=>{c===e&&o(t)},u=e=>t=>{c===e&&s(t)},d=()=>{try{let t=n();rX(t)?(aX.set(t,a),c=t,t.then(l(t),u(t)),i(r,e,t,d)):o(t)}catch(e){s(e)}};t.then(l(t),u(t)),i(r,e,t,d)}),aX.set(t,a)),a};function Y(e,t){let{delay:n,unstable_promiseStatus:r=!_.default.use}=t||{},i=tX(t),[[a,o,s],c]=(0,_.useReducer)(t=>{let n=i.get(e);return Object.is(t[0],n)&&t[1]===i&&t[2]===e?t:[n,i,e]},void 0,()=>[i.get(e),i,e]),l=a;if((o!==i||s!==e)&&(c(),l=i.get(e)),(0,_.useEffect)(()=>{let t=i.sub(e,()=>{if(r)try{let t=i.get(e);rX(t)&&iX(oX(i,t,()=>i.get(e)))}catch{}if(typeof n==`number`){console.warn(`[DEPRECATED] delay option is deprecated and will be removed in v3. 240 241Migration guide: 242 243Create a custom hook like the following. 244 245function useAtomValueWithDelay<Value>( 246 atom: Atom<Value>, 247 options: { delay: number }, 248): Value { 249 const { delay } = options 250 const store = useStore(options) 251 const [value, setValue] = useState(() => store.get(atom)) 252 useEffect(() => { 253 const unsub = store.sub(atom, () => { 254 setTimeout(() => setValue(store.get(atom)), delay) 255 }) 256 return unsub 257 }, [store, atom, delay]) 258 return value 259} 260`),setTimeout(c,n);return}c()});return c(),t},[i,e,n,r]),(0,_.useDebugValue)(l),rX(l)){let t=oX(i,l,()=>i.get(e));return r&&iX(t),HKe(t)}return l}function sX(e,t){let n=tX(t);return(0,_.useCallback)((...t)=>n.set(e,...t),[n,e])}function cX(e,t){return[Y(e,t),sX(e,t)]}var lX=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function uX(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var dX={exports:{}},fX={},pX;function UKe(){if(pX)return fX;pX=1;var e=_.default,t=Symbol.for(`react.element`),n=Symbol.for(`react.fragment`),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(e,n,o){var s,c={},l=null,u=null;for(s in o!==void 0&&(l=``+o),n.key!==void 0&&(l=``+n.key),n.ref!==void 0&&(u=n.ref),n)r.call(n,s)&&!a.hasOwnProperty(s)&&(c[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps,n)c[s]===void 0&&(c[s]=n[s]);return{$$typeof:t,type:e,key:l,ref:u,props:c,_owner:i.current}}return fX.Fragment=n,fX.jsx=o,fX.jsxs=o,fX}dX.exports=UKe();var mX=dX.exports,hX={exports:{}},gX,_X;function WKe(){return _X?gX:(_X=1,gX=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`,gX)}var vX,yX;function GKe(){if(yX)return vX;yX=1;var e=WKe();function t(){}function n(){}return n.resetWarningCache=t,vX=function(){function r(t,n,r,i,a,o){if(o!==e){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},vX}hX.exports=GKe()();var KKe=hX.exports,bX=uX(KKe),xX={exports:{}};(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(e){if(typeof e==`string`||typeof e==`number`)return e;if(typeof e!=`object`)return``;if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes(`[native code]`))return e.toString();var r=``;for(var a in e)t.call(e,a)&&e[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(xX);var qKe=xX.exports,SX=uX(qKe),JKe=[`top`,`left`,`transform`,`className`,`children`,`innerRef`];function CX(){return CX=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},CX.apply(this,arguments)}function YKe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function wX(e){var t=e.top,n=t===void 0?0:t,r=e.left,i=r===void 0?0:r,a=e.transform,o=e.className,s=e.children,c=e.innerRef,l=YKe(e,JKe);return _.createElement(`g`,CX({ref:c,className:SX(`visx-group`,o),transform:a||`translate(`+i+`, `+n+`)`},l),s)}
260wX.propTypes={top:bX.number,left:bX.number,transform:bX.string,className:bX.string,children:bX.node,innerRef:bX.oneOfType([bX.string,bX.func,bX.object])};var XKe=[`tooltipOpen`];function ZKe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function TX(){return TX=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},TX.apply(this,arguments)}function QKe(e){var t=(0,_.useState)(TX({tooltipOpen:!1},e)),n=t[0],r=t[1],i=(0,_.useCallback)(function(e){return r(typeof e==`function`?function(t){t.tooltipOpen;var n=ZKe(t,XKe);return TX({},e(n),{tooltipOpen:!0})}:{tooltipOpen:!0,tooltipLeft:e.tooltipLeft,tooltipTop:e.tooltipTop,tooltipData:e.tooltipData})},[r]),a=(0,_.useCallback)(function(){return r({tooltipOpen:!1,tooltipLeft:void 0,tooltipTop:void 0,tooltipData:void 0})},[r]);return{tooltipOpen:n.tooltipOpen,tooltipLeft:n.tooltipLeft,tooltipTop:n.tooltipTop,tooltipData:n.tooltipData,updateTooltip:r,showTooltip:i,hideTooltip:a}}function EX(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function $Ke({debounce:e,scroll:t,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){let i=n||(typeof window>`u`?class{}:window.ResizeObserver);if(!i)throw Error(`This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills`);let[a,o]=(0,_.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),s=(0,_.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),c=e?typeof e==`number`?e:e.scroll:null,l=e?typeof e==`number`?e:e.resize:null,u=(0,_.useRef)(!1);(0,_.useEffect)(()=>(u.current=!0,()=>void(u.current=!1)));let[d,f,p]=(0,_.useMemo)(()=>{let e=()=>{if(!s.current.element)return;let{left:e,top:t,width:n,height:i,bottom:a,right:c,x:l,y:d}=s.current.element.getBoundingClientRect(),f={left:e,top:t,width:n,height:i,bottom:a,right:c,x:l,y:d};s.current.element instanceof HTMLElement&&r&&(f.height=s.current.element.offsetHeight,f.width=s.current.element.offsetWidth),Object.freeze(f),u.current&&!rqe(s.current.lastBounds,f)&&o(s.current.lastBounds=f)};return[e,l?EX(e,l):e,c?EX(e,c):e]},[o,r,c,l]);function m(){s.current.scrollContainers&&(s.current.scrollContainers.forEach(e=>e.removeEventListener(`scroll`,p,!0)),s.current.scrollContainers=null),s.current.resizeObserver&&(s.current.resizeObserver.disconnect(),s.current.resizeObserver=null),s.current.orientationHandler&&(`orientation`in screen&&`removeEventListener`in screen.orientation?screen.orientation.removeEventListener(`change`,s.current.orientationHandler):`onorientationchange`in window&&window.removeEventListener(`orientationchange`,s.current.orientationHandler))}function h(){s.current.element&&(s.current.resizeObserver=new i(p),s.current.resizeObserver.observe(s.current.element),t&&s.current.scrollContainers&&s.current.scrollContainers.forEach(e=>e.addEventListener(`scroll`,p,{capture:!0,passive:!0})),s.current.orientationHandler=()=>{p()},`orientation`in screen&&`addEventListener`in screen.orientation?screen.orientation.addEventListener(`change`,s.current.orientationHandler):`onorientationchange`in window&&window.addEventListener(`orientationchange`,s.current.orientationHandler))}return tqe(p,!!t),eqe(f),(0,_.useEffect)(()=>{m(),h()},[t,p,f]),(0,_.useEffect)(()=>m,[]),[e=>{!e||e===s.current.element||(m(),s.current.element=e,s.current.scrollContainers=DX(e),h())},a,d]}function eqe(e){(0,_.useEffect)(()=>{let t=e;return window.addEventListener(`resize`,t),()=>void window.removeEventListener(`resize`,t)},[e])}function tqe(e,t){(0,_.useEffect)(()=>{if(t){let t=e;return window.addEventListener(`scroll`,t,{capture:!0,passive:!0}),()=>void window.removeEventListener(`scroll`,t,!0)}},[e,t])}function DX(e){let t=[];if(!e||e===document.body)return t;let{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(e);return[n,r,i].some(e=>e===`auto`||e===`scroll`)&&t.push(e),[...t,...DX(e.parentElement)]}var nqe=[`x`,`y`,`top`,`bottom`,`left`,`right`,`width`,`height`],rqe=(e,t)=>
260nqe.every(n=>e[n]===t[n]);function iqe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,OX(e,t)}function OX(e,t){return OX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},OX(e,t)}var kX=function(e){iqe(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.componentWillUnmount=function(){this.node&&document.body&&(document.body.removeChild(this.node),delete this.node)},n.render=function(){return!this.node&&typeof document<`u`&&(this.node=document.createElement(`div`),this.props.zIndex!=null&&(this.node.style.zIndex=``+this.props.zIndex),document.body.append(this.node)),this.node?v.createPortal(this.props.children,this.node):null},t}(_.PureComponent);kX.propTypes={zIndex:bX.oneOfType([bX.number,bX.string])};var aqe=[`className`,`top`,`left`,`offsetLeft`,`offsetTop`,`style`,`children`,`unstyled`,`applyPositionStyle`];function AX(){return AX=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},AX.apply(this,arguments)}function oqe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var jX={position:`absolute`,backgroundColor:`white`,color:`#666666`,padding:`.3rem .5rem`,borderRadius:`3px`,fontSize:`14px`,boxShadow:`0 1px 2px rgba(33,33,33,0.2)`,lineHeight:`1em`,pointerEvents:`none`},MX=_.forwardRef(function(e,t){var n=e.className,r=e.top,i=e.left,a=e.offsetLeft,o=a===void 0?10:a,s=e.offsetTop,c=s===void 0?10:s,l=e.style,u=l===void 0?jX:l,d=e.children,f=e.unstyled,p=f===void 0?!1:f,m=e.applyPositionStyle,h=m===void 0?!1:m,g=oqe(e,aqe);return _.createElement(`div`,AX({ref:t,className:SX(`visx-tooltip`,n),style:AX({top:r==null||c==null?r:r+c,left:i==null||o==null?i:i+o},h&&{position:`absolute`},!p&&u)},g),d)});MX.propTypes={children:bX.node,className:bX.string,left:bX.number,offsetLeft:bX.number,offsetTop:bX.number,top:bX.number,applyPositionStyle:bX.bool,unstyled:bX.bool},MX.displayName=`Tooltip`;function NX(){return NX=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},NX.apply(this,arguments)}function sqe(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function cqe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,PX(e,t)}function PX(e,t){return PX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},PX(e,t)}var FX={top:0,right:0,bottom:0,left:0,width:0,height:0};function lqe(e){var t;return t=function(t){cqe(n,t);function n(e){var n;return n=t.call(this,e)||this,n.state={rect:void 0,parentRect:void 0},n.nodeRef=_.createRef(),n.getRects=n.getRects.bind(sqe(n)),n}var r=n.prototype;return r.componentDidMount=function(){var e,t=this;this.node=(e=this.nodeRef)!=null&&e.current?this.nodeRef.current:v.findDOMNode(this),this.setState(function(){return t.getRects()})},r.getRects=function(){if(!this.node)return this.state;var e=this.node,t=e.parentNode;return{rect:e.getBoundingClientRect?e.getBoundingClientRect():FX,parentRect:t!=null&&t.getBoundingClientRect?t.getBoundingClientRect():FX}},r.render=function(){return _.createElement(e,NX({nodeRef:this.nodeRef,getRects:this.getRects},this.state,this.props))},n}(_.PureComponent),t.displayName=`withBoundingRects(`+(e.displayName||``)+`)`,t}var IX=(0,_.createContext)({isFlippedVertically:!1,isFlippedHorizontally:!1}),uqe=IX.Provider;IX.Consumer;var dqe=[`children`,`getRects`,`left`,`offsetLeft`,`offsetTop`,`parentRect`,`rect`,`style`,`top`,`unstyled`,`nodeRef`];function LX(){return LX=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},LX.apply(this,arguments)}function fqe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function RX(e){var t=e.children;e.getRects;var n=e.left,r=n===void 0?0:n,i=e.offsetLeft,a=i===void 0?10:i,o=e.offsetTop,s=o===void 0?10:o,c=e.parentRect,l=e.rect,u=e.style,d=u===void 0?jX:u,f=e.top,p=f===void 0?0:f,m=e.unstyled,h=m===void 0?!1:m,g=e.nodeRef,v=fqe(e,dqe),y,b=!1,x=!1;if(l&&c){var S=r,C=p;if(c.width){var w=S+a+l.width-c.width,T=l.width-S-a;b=w>0&&w>T}else{var E=S+a+l.width-window.innerWidth,D=l.width-S-a;b=E>0&&E>D}if(c.height){var O=C+s+l.height-c.height,k=l.height-C-s;x=O>0&&O>k}else x=C+s+l.height>window.innerHeight;S=b?S-l.width-a:S+a,C=x?C-l.height-s:C+s,S=Math.round(S),C=Math.round(C),y=`translate(`+S+`px, `+C+`px)`}return _.createElement(MX,LX({ref:g,style:LX({left:0,top:0,transform:y},!h&&d)},v),_.createElement(uqe,{value:{isFlippedVertically:!x,isFlippedHorizontally:!b}},t))}RX.propTypes={nodeRef:bX.oneOfType([bX.string,bX.func,bX.object])};var pqe=lqe(RX),mqe=[`detectBounds`,`zIndex`],hqe=[`left`,`top`,`detectBounds`,`zIndex`];function zX(){return zX=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},zX.apply(this,arguments)}function BX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function gqe(e){var t=e===void 0?{}:e,n=t.detectBounds,r=n===void 0?!0:n,i=t.zIndex,a=$Ke(BX(t,mqe)),o=a[0],s=a[1],c=a[2],l=(0,_.useState)(!1),u=l[0],d=l[1];return(0,_.useEffect)(function(){d(!1)},[]),{containerRef:o,containerBounds:s,forceRefreshBounds:c,TooltipInPortal:(0,_.useMemo)(function(){return function(e){var t=e.left,n=t===void 0?0:t,a=e.top,o=a===void 0?0:a,c=e.detectBounds,l=e.zIndex,d=BX(e,hqe),f=c??r,p=l??i,m=f?pqe:MX,h=u?0:window.scrollX,g=u?0:window.scrollY,v=n+(s.left||0)+h,y=o+(s.top||0)+g;return _.createElement(kX,{zIndex:p},_.createElement(m,zX({left:v,top:y},d)))}},[r,i,s.left,s.top,u])}}function VX(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function _qe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function HX(e){let t,n,r;e.length===2?(t=e===VX||e===_qe?e:vqe,n=e,r=e):(t=VX,n=(t,n)=>VX(e(t),n),r=(t,n)=>e(t)-n);
260function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function vqe(){return 0}function UX(e){return e===null?NaN:+e}var WX=HX(VX).right;HX(UX).center;function GX(e,t){let n,r;for(let t of e)t!=null&&(n===void 0?t>=t&&(n=r=t):(n>t&&(n=t),r<t&&(r=t)));return[n,r]}var KX=class extends Map{constructor(e,t=xqe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(qX(this,e))}has(e){return super.has(qX(this,e))}set(e,t){return super.set(yqe(this,e),t)}delete(e){return super.delete(bqe(this,e))}};function qX({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function yqe({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function bqe({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function xqe(e){return typeof e==`object`&&e?e.valueOf():e}var Sqe=Math.sqrt(50),Cqe=Math.sqrt(10),wqe=Math.sqrt(2);function JX(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=Sqe?10:a>=Cqe?5:a>=wqe?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?JX(e,t,n*2):[s,c,l]}function Tqe(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?JX(t,e,n):JX(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function YX(e,t,n){return t=+t,e=+e,n=+n,JX(e,t,n)[2]}function Eqe(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?YX(t,e,n):YX(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Dqe(e,t,n=UX){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function Oqe(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}var kqe={value:()=>{}};function XX(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new ZX(n)}function ZX(e){this._=e}function Aqe(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}ZX.prototype=XX.prototype={constructor:ZX,on:function(e,t){var n=this._,r=Aqe(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=jqe(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=QX(n[i],e.name,t);else if(t==null)for(i in n)n[i]=QX(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ZX(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function jqe(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function QX(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=kqe,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var $X=`http://www.w3.org/1999/xhtml`,eZ={svg:`http://www.w3.org/2000/svg`,xhtml:$X,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function tZ(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),eZ.hasOwnProperty(t)?{space:eZ[t],local:e}:e}function Mqe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===$X&&t.documentElement.namespaceURI===$X?t.createElement(e):t.createElementNS(n,e)}}function Nqe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function nZ(e){var t=tZ(e);return(t.local?Nqe:Mqe)(t)}function Pqe(){}function rZ(e){return e==null?Pqe:function(){return this.querySelector(e)}}function Fqe(e){typeof e!=`function`&&(e=rZ(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new vZ(r,this._parents)}function Iqe(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Lqe(){return[]}function iZ(e){return e==null?Lqe:function(){return this.querySelectorAll(e)}}function Rqe(e){return function(){return Iqe(e.apply(this,arguments))}}function zqe(e){e=typeof e==`function`?Rqe(e):iZ(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new vZ(r,i)}function aZ(e){return function(){return this.matches(e)}}function oZ(e){return function(t){return t.matches(e)}}var Bqe=Array.prototype.find;function Vqe(e){return function(){return Bqe.call(this.children,e)}}function Hqe(){return this.firstElementChild}function Uqe(e){return this.select(e==null?Hqe:Vqe(typeof e==`function`?e:oZ(e)))}var Wqe=Array.prototype.filter;function Gqe(){return Array.from(this.children)}function Kqe(e){return function(){return Wqe.call(this.children,e)}}function qqe(e){return this.selectAll(e==null?Gqe:Kqe(typeof e==`function`?e:oZ(e)))}function Jqe(e){typeof e!=`function`&&(e=aZ(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new vZ(r,this._parents)}function sZ(e){return Array(e.length)}function Yqe(){return new vZ(this._enter||this._groups.map(sZ),this._parents)}function cZ(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}cZ.prototype={constructor:cZ,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Xqe(e){return function(){return e}}function Zqe(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new cZ(e,a[o]);for(;o<c;
vendor: 10,265 bytes, line 260
260++o)(s=t[o])&&(i[o]=s)}function Qqe(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new cZ(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function $qe(e){return e.__data__}function eJe(e,t){if(!arguments.length)return Array.from(this,$qe);var n=t?Qqe:Zqe,r=this._parents,i=this._groups;typeof e!=`function`&&(e=Xqe(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=tJe(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new vZ(o,r),o._enter=s,o._exit=c,o}function tJe(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function nJe(){return new vZ(this._exit||this._groups.map(sZ),this._parents)}function rJe(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function iJe(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new vZ(s,this._parents)}function aJe(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function oJe(e){e||=sJe;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new vZ(i,this._parents).order()}function sJe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function cJe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function lJe(){return Array.from(this)}function uJe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function dJe(){let e=0;for(let t of this)++e;return e}function fJe(){return!this.node()}function pJe(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function mJe(e){return function(){this.removeAttribute(e)}}function hJe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function gJe(e,t){return function(){this.setAttribute(e,t)}}function _Je(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function vJe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function yJe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function bJe(e,t){var n=tZ(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?hJe:mJe:typeof t==`function`?n.local?yJe:vJe:n.local?_Je:gJe)(n,t))}function lZ(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function xJe(e){return function(){this.style.removeProperty(e)}}function SJe(e,t,n){return function(){this.style.setProperty(e,t,n)}}function CJe(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function wJe(e,t,n){return arguments.length>1?this.each((t==null?xJe:typeof t==`function`?CJe:SJe)(e,t,n??``)):uZ(this.node(),e)}function uZ(e,t){return e.style.getPropertyValue(t)||lZ(e).getComputedStyle(e,null).getPropertyValue(t)}function TJe(e){return function(){delete this[e]}}function EJe(e,t){return function(){this[e]=t}}function DJe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function OJe(e,t){return arguments.length>1?this.each((t==null?TJe:typeof t==`function`?DJe:EJe)(e,t)):this.node()[e]}function dZ(e){return e.trim().split(/^|\s+/)}function fZ(e){return e.classList||new pZ(e)}function pZ(e){this._node=e,this._names=dZ(e.getAttribute(`class`)||``)}pZ.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function mZ(e,t){for(var n=fZ(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function hZ(e,t){for(var n=fZ(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function kJe(e){return function(){mZ(this,e)}}function AJe(e){return function(){hZ(this,e)}}function jJe(e,t){return function(){(t.apply(this,arguments)?mZ:hZ)(this,e)}}function MJe(e,t){var n=dZ(e+``);if(arguments.length<2){for(var r=fZ(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?jJe:t?kJe:AJe)(n,t))}function NJe(){this.textContent=``}function PJe(e){return function(){this.textContent=e}}function FJe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function IJe(e){return arguments.length?this.each(e==null?NJe:(typeof e==`function`?FJe:PJe)(e)):this.node().textContent}function LJe(){this.innerHTML=``}function RJe(e){return function(){this.innerHTML=e}}function zJe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function BJe(e){return arguments.length?this.each(e==null?LJe:(typeof e==`function`?zJe:RJe)(e)):this.node().innerHTML}function VJe(){this.nextSibling&&this.parentNode.appendChild(this)}function HJe(){return this.each(VJe)}function UJe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function WJe(){return this.each(UJe)}function GJe(e){var t=typeof e==`function`?e:nZ(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function KJe(){return null}function qJe(e,t){var n=typeof e==`function`?e:nZ(e),r=t==null?KJe:typeof t==`function`?t:rZ(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function JJe(){var e=this.parentNode;e&&e.removeChild(this)}function YJe(){return this.each(JJe)}function XJe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ZJe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function QJe(e){return this.select(e?ZJe:XJe)}function $Je(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function eYe(e){return function(t){e.call(this,t,this.__data__)}}function tYe(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function nYe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function rYe(e,t,n){return function(){var r=this.__on,i,a=eYe(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function iYe(e,t,n){var r=tYe(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?rYe:nYe,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function gZ(e,t,n){var r=lZ(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function aYe(e,t){return function(){return gZ(this,e,t)}}function oYe(e,t){return function(){return gZ(this,e,t.apply(this,arguments))}}function sYe(e,t){return this.each((typeof t==`function`?oYe:aYe)(e,t))}function*cYe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var _Z=[null];function vZ(e,t){this._groups=e,this._parents=t}function yZ(){return new vZ([[document.documentElement]],_Z)}function lYe(){return this}vZ.prototype=yZ.prototype={constructor:vZ,select:Fqe,selectAll:zqe,selectChild:Uqe,selectChildren:qqe,filter:Jqe,data:eJe,enter:Yqe,exit:nJe,join:rJe,merge:iJe,selection:lYe,order:aJe,sort:oJe,call:cJe,nodes:lJe,node:uJe,size:dJe,empty:fJe,each:pJe,attr:bJe,style:wJe,property:OJe,classed:MJe,text:IJe,html:BJe,raise:HJe,lower:WJe,append:GJe,insert:qJe,remove:YJe,clone:QJe,datum:$Je,on:iYe,dispatch:sYe,[Symbol.iterator]:cYe};function bZ(e){return typeof e==`string`?new vZ([[document.querySelector(e)]],[document.documentElement]):new vZ([[e]],_Z)}function uYe(e){let t;for(;t=e.sourceEvent;)e=t;return e}function xZ(e,t){if(e=uYe(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var SZ={capture:!0,passive:!1};function CZ(e){e.preventDefault(),e.stopImmediatePropagation()}function dYe(e){var t=e.document.documentElement,n=bZ(e).on(`dragstart.drag`,CZ,SZ);`onselectstart`in t?n.on(`selectstart.drag`,CZ,SZ):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function fYe(e,t){var n=e.document.documentElement,r=bZ(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,CZ,SZ),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}
vendor: 7,145 bytes, line 260
260function wZ(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function TZ(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function EZ(){}var DZ=.7,OZ=1/DZ,kZ=`\\s*([+-]?\\d+)\\s*`,AZ=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,jZ=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,pYe=/^#([0-9a-f]{3,8})$/,mYe=RegExp(`^rgb\\(${kZ},${kZ},${kZ}\\)$`),hYe=RegExp(`^rgb\\(${jZ},${jZ},${jZ}\\)$`),gYe=RegExp(`^rgba\\(${kZ},${kZ},${kZ},${AZ}\\)$`),_Ye=RegExp(`^rgba\\(${jZ},${jZ},${jZ},${AZ}\\)$`),vYe=RegExp(`^hsl\\(${AZ},${jZ},${jZ}\\)$`),yYe=RegExp(`^hsla\\(${AZ},${jZ},${jZ},${AZ}\\)$`),MZ={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};wZ(EZ,FZ,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:NZ,formatHex:NZ,formatHex8:bYe,formatHsl:xYe,formatRgb:PZ,toString:PZ});function NZ(){return this.rgb().formatHex()}function bYe(){return this.rgb().formatHex8()}function xYe(){return KZ(this).formatHsl()}function PZ(){return this.rgb().formatRgb()}function FZ(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=pYe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?IZ(t):n===3?new zZ(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?LZ(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?LZ(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=mYe.exec(e))?new zZ(t[1],t[2],t[3],1):(t=hYe.exec(e))?new zZ(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=gYe.exec(e))?LZ(t[1],t[2],t[3],t[4]):(t=_Ye.exec(e))?LZ(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=vYe.exec(e))?GZ(t[1],t[2]/100,t[3]/100,1):(t=yYe.exec(e))?GZ(t[1],t[2]/100,t[3]/100,t[4]):MZ.hasOwnProperty(e)?IZ(MZ[e]):e===`transparent`?new zZ(NaN,NaN,NaN,0):null}function IZ(e){return new zZ(e>>16&255,e>>8&255,e&255,1)}function LZ(e,t,n,r){return r<=0&&(e=t=n=NaN),new zZ(e,t,n,r)}function SYe(e){return e instanceof EZ||(e=FZ(e)),e?(e=e.rgb(),new zZ(e.r,e.g,e.b,e.opacity)):new zZ}function RZ(e,t,n,r){return arguments.length===1?SYe(e):new zZ(e,t,n,r??1)}function zZ(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}wZ(zZ,RZ,TZ(EZ,{brighter(e){return e=e==null?OZ:OZ**+e,new zZ(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?DZ:DZ**+e,new zZ(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new zZ(UZ(this.r),UZ(this.g),UZ(this.b),HZ(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:BZ,formatHex:BZ,formatHex8:CYe,formatRgb:VZ,toString:VZ}));function BZ(){return`#${WZ(this.r)}${WZ(this.g)}${WZ(this.b)}`}function CYe(){return`#${WZ(this.r)}${WZ(this.g)}${WZ(this.b)}${WZ((isNaN(this.opacity)?1:this.opacity)*255)}`}function VZ(){let e=HZ(this.opacity);return`${e===1?`rgb(`:`rgba(`}${UZ(this.r)}, ${UZ(this.g)}, ${UZ(this.b)}${e===1?`)`:`, ${e})`}`}function HZ(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function UZ(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function WZ(e){return e=UZ(e),(e<16?`0`:``)+e.toString(16)}function GZ(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new qZ(e,t,n,r)}function KZ(e){if(e instanceof qZ)return new qZ(e.h,e.s,e.l,e.opacity);if(e instanceof EZ||(e=FZ(e)),!e)return new qZ;if(e instanceof qZ)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new qZ(o,s,c,e.opacity)}function wYe(e,t,n,r){return arguments.length===1?KZ(e):new qZ(e,t,n,r??1)}function qZ(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}wZ(qZ,wYe,TZ(EZ,{brighter(e){return e=e==null?OZ:OZ**+e,new qZ(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?DZ:DZ**+e,new qZ(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new zZ(XZ(e>=240?e-240:e+120,i,r),XZ(e,i,r),XZ(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new qZ(JZ(this.h),YZ(this.s),YZ(this.l),HZ(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=HZ(this.opacity);return`${e===1?`hsl(`:`hsla(`}${JZ(this.h)}, ${YZ(this.s)*100}%, ${YZ(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function JZ(e){return e=(e||0)%360,e<0?e+360:e}function YZ(e){return Math.max(0,Math.min(1,e||0))}
260function XZ(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function TYe(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function EYe(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return TYe((n-r/t)*t,o,i,a,s)}}var ZZ=e=>()=>e;function DYe(e,t){return function(n){return e+n*t}}function OYe(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function kYe(e){return(e=+e)==1?QZ:function(t,n){return n-t?OYe(t,n,e):ZZ(isNaN(t)?n:t)}}function QZ(e,t){var n=t-e;return n?DYe(e,n):ZZ(isNaN(e)?t:e)}var $Z=function e(t){var n=kYe(t);function r(e,t){var r=n((e=RZ(e)).r,(t=RZ(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=QZ(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r}(1);function AYe(e){return function(t){var n=t.length,r=Array(n),i=Array(n),a=Array(n),o,s;for(o=0;o<n;++o)s=RZ(t[o]),r[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return r=e(r),i=e(i),a=e(a),s.opacity=1,function(e){return s.r=r(e),s.g=i(e),s.b=a(e),s+``}}}var jYe=AYe(EYe);function MYe(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function NYe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function PYe(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=iQ(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function FYe(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function eQ(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function IYe(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=iQ(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var tQ=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nQ=new RegExp(tQ.source,`g`);function LYe(e){return function(){return e}}function RYe(e){return function(t){return e(t)+``}}function rQ(e,t){var n=tQ.lastIndex=nQ.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=tQ.exec(e))&&(i=nQ.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:eQ(r,i)})),n=nQ.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?RYe(c[0].x):LYe(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function iQ(e,t){var n=typeof t,r;return t==null||n===`boolean`?ZZ(t):(n===`number`?eQ:n===`string`?(r=FZ(t))?(t=r,$Z):rQ:t instanceof FZ?$Z:t instanceof Date?FYe:NYe(t)?MYe:Array.isArray(t)?PYe:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?IYe:eQ)(e,t)}function aQ(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var oQ=180/Math.PI,sQ={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function cQ(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*oQ,skewX:Math.atan(c)*oQ,scaleX:o,scaleY:s}}var lQ;function zYe(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?sQ:cQ(t.a,t.b,t.c,t.d,t.e,t.f)}function BYe(e){return e==null||(lQ||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),lQ.setAttribute(`transform`,e),!(e=lQ.transform.baseVal.consolidate()))?sQ:(e=e.matrix,cQ(e.a,e.b,e.c,e.d,e.e,e.f))}function uQ(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:eQ(e,i)},{i:c-2,x:eQ(r,a)})}else (i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:eQ(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:eQ(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:eQ(e,n)},{i:s-2,x:eQ(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var VYe=uQ(zYe,`px, `,`px)`,`deg)`),HYe=uQ(BYe,`, `,`)`,`)`),UYe=1e-12;function dQ(e){return((e=Math.exp(e))+1/e)/2}function WYe(e){return((e=Math.exp(e))-1/e)/2}function GYe(e){return((e=Math.exp(2*e))-1)/(e+1)}var KYe=function e(t,n,r){function i(e,i){var a=e[0],o=e[1],s=e[2],c=i[0],l=i[1],u=i[2],d=c-a,f=l
260-o,p=d*d+f*f,m,h;if(p<UYe)h=Math.log(u/s)/t,m=function(e){return[a+e*d,o+e*f,s*Math.exp(t*e*h)]};else{var g=Math.sqrt(p),_=(u*u-s*s+r*p)/(2*s*n*g),v=(u*u-s*s-r*p)/(2*u*n*g),y=Math.log(Math.sqrt(_*_+1)-_);h=(Math.log(Math.sqrt(v*v+1)-v)-y)/t,m=function(e){var r=e*h,i=dQ(y),c=s/(n*g)*(i*GYe(t*r+y)-WYe(y));return[a+c*d,o+c*f,s*i/dQ(t*r+y)]}}return m.duration=h*1e3*t/Math.SQRT2,m}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i}(Math.SQRT2,2,4);function qYe(e,t){t===void 0&&(t=e,e=iQ);for(var n=0,r=t.length-1,i=t[0],a=Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}var fQ=0,pQ=0,mQ=0,hQ=1e3,gQ,_Q,vQ=0,yQ=0,bQ=0,xQ=typeof performance==`object`&&performance.now?performance:Date,SQ=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function CQ(){return yQ||=(SQ(JYe),xQ.now()+bQ)}function JYe(){yQ=0}function wQ(){this._call=this._time=this._next=null}wQ.prototype=TQ.prototype={constructor:wQ,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?CQ():+n)+(t==null?0:+t),!this._next&&_Q!==this&&(_Q?_Q._next=this:gQ=this,_Q=this),this._call=e,this._time=n,DQ()},stop:function(){this._call&&(this._call=null,this._time=1/0,DQ())}};function TQ(e,t,n){var r=new wQ;return r.restart(e,t,n),r}function YYe(){CQ(),++fQ;for(var e=gQ,t;e;)(t=yQ-e._time)>=0&&e._call.call(void 0,t),e=e._next;--fQ}function EQ(){yQ=(vQ=xQ.now())+bQ,fQ=pQ=0;try{YYe()}finally{fQ=0,ZYe(),yQ=0}}function XYe(){var e=xQ.now(),t=e-vQ;t>hQ&&(bQ-=t,vQ=e)}function ZYe(){for(var e,t=gQ,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:gQ=n);_Q=e,DQ(r)}function DQ(e){fQ||(pQ&&=clearTimeout(pQ),e-yQ>24?(e<1/0&&(pQ=setTimeout(EQ,e-xQ.now()-bQ)),mQ&&=clearInterval(mQ)):(mQ||=(vQ=xQ.now(),setInterval(XYe,hQ)),fQ=1,SQ(EQ)))}function OQ(e,t,n){var r=new wQ;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var QYe=XX(`start`,`end`,`cancel`,`interrupt`),$Ye=[],kQ=0,AQ=1,jQ=2,MQ=3,NQ=4,PQ=5,FQ=6;function IQ(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;eXe(e,n,{name:t,index:r,group:i,on:QYe,tween:$Ye,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:kQ})}function LQ(e,t){var n=zQ(e,t);if(n.state>kQ)throw Error(`too late; already scheduled`);return n}function RQ(e,t){var n=zQ(e,t);if(n.state>MQ)throw Error(`too late; already running`);return n}function zQ(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function eXe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=TQ(a,0,n.time);function a(e){n.state=AQ,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==AQ)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===MQ)return OQ(o);f.state===NQ?(f.state=FQ,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=FQ,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(OQ(function(){n.state===MQ&&(n.state=NQ,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=jQ,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===jQ){for(n.state=MQ,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=PQ,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===PQ&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=FQ,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function BQ(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>jQ&&r.state<PQ,r.state=FQ,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function tXe(e){return this.each(function(){BQ(this,e)})}function nXe(e,t){var n,r;return function(){var i=RQ(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function rXe(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=RQ(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function iXe(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=zQ(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?nXe:rXe)(n,e,t))}
vendor: 4,123 bytes, line 260
260function VQ(e,t,n){var r=e._id;return e.each(function(){var e=RQ(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return zQ(e,r).value[t]}}function HQ(e,t){var n;return(typeof t==`number`?eQ:t instanceof FZ?$Z:(n=FZ(t))?(t=n,$Z):rQ)(e,t)}function aXe(e){return function(){this.removeAttribute(e)}}function oXe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function sXe(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function cXe(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function lXe(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function uXe(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function dXe(e,t){var n=tZ(e),r=n===`transform`?HYe:HQ;return this.attrTween(e,typeof t==`function`?(n.local?uXe:lXe)(n,r,VQ(this,`attr.`+e,t)):t==null?(n.local?oXe:aXe)(n):(n.local?cXe:sXe)(n,r,t))}function fXe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function pXe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function mXe(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&pXe(e,i)),n}return i._value=t,i}function hXe(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&fXe(e,i)),n}return i._value=t,i}function gXe(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=tZ(e);return this.tween(n,(r.local?mXe:hXe)(r,t))}function _Xe(e,t){return function(){LQ(this,e).delay=+t.apply(this,arguments)}}function vXe(e,t){return t=+t,function(){LQ(this,e).delay=t}}function yXe(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?_Xe:vXe)(t,e)):zQ(this.node(),t).delay}function bXe(e,t){return function(){RQ(this,e).duration=+t.apply(this,arguments)}}function xXe(e,t){return t=+t,function(){RQ(this,e).duration=t}}function SXe(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?bXe:xXe)(t,e)):zQ(this.node(),t).duration}function CXe(e,t){if(typeof t!=`function`)throw Error();return function(){RQ(this,e).ease=t}}function wXe(e){var t=this._id;return arguments.length?this.each(CXe(t,e)):zQ(this.node(),t).ease}function TXe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();RQ(this,e).ease=n}}function EXe(e){if(typeof e!=`function`)throw Error();return this.each(TXe(this._id,e))}function DXe(e){typeof e!=`function`&&(e=aZ(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new WQ(r,this._parents,this._name,this._id)}function OXe(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new WQ(o,this._parents,this._name,this._id)}function kXe(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function AXe(e,t,n){var r,i,a=kXe(t)?LQ:RQ;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function jXe(e,t){var n=this._id;return arguments.length<2?zQ(this.node(),n).on.on(e):this.each(AXe(n,e,t))}function MXe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function NXe(){return this.on(`end.remove`,MXe(this._id))}function PXe(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=rZ(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;
260++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,IQ(l[f],t,n,f,l,zQ(u,n)));return new WQ(a,this._parents,t,n)}function FXe(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=iZ(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=zQ(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&IQ(p,t,n,h,f,m);a.push(f),o.push(u)}return new WQ(a,o,t,n)}var IXe=yZ.prototype.constructor;function LXe(){return new IXe(this._groups,this._parents)}function RXe(e,t){var n,r,i;return function(){var a=uZ(this,e),o=(this.style.removeProperty(e),uZ(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function UQ(e){return function(){this.style.removeProperty(e)}}function zXe(e,t,n){var r,i=n+``,a;return function(){var o=uZ(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function BXe(e,t,n){var r,i,a;return function(){var o=uZ(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),uZ(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function VXe(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=RQ(this,e),l=c.on,u=c.value[a]==null?s||=UQ(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function HXe(e,t,n){var r=(e+=``)==`transform`?VYe:HQ;return t==null?this.styleTween(e,RXe(e,r)).on(`end.style.`+e,UQ(e)):typeof t==`function`?this.styleTween(e,BXe(e,r,VQ(this,`style.`+e,t))).each(VXe(this._id,e)):this.styleTween(e,zXe(e,r,t),n).on(`end.style.`+e,null)}function UXe(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function WXe(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&UXe(e,a,n)),r}return a._value=t,a}function GXe(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,WXe(e,t,n??``))}function KXe(e){return function(){this.textContent=e}}function qXe(e){return function(){var t=e(this);this.textContent=t??``}}function JXe(e){return this.tween(`text`,typeof e==`function`?qXe(VQ(this,`text`,e)):KXe(e==null?``:e+``))}function YXe(e){return function(t){this.textContent=e.call(this,t)}}function XXe(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&YXe(r)),t}return r._value=e,r}function ZXe(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,XXe(e))}function QXe(){for(var e=this._name,t=this._id,n=GQ(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=zQ(c,t);IQ(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new WQ(r,this._parents,e,n)}function $Xe(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=RQ(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var eZe=0;function WQ(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function GQ(){return++eZe}var KQ=yZ.prototype;WQ.prototype={constructor:WQ,select:PXe,selectAll:FXe,selectChild:KQ.selectChild,selectChildren:KQ.selectChildren,filter:DXe,merge:OXe,selection:LXe,transition:QXe,call:KQ.call,nodes:KQ.nodes,node:KQ.node,size:KQ.size,empty:KQ.empty,each:KQ.each,on:jXe,attr:dXe,attrTween:gXe,style:HXe,styleTween:GXe,text:JXe,textTween:ZXe,remove:NXe,tween:iXe,delay:yXe,duration:SXe,ease:wXe,easeVarying:EXe,end:$Xe,[Symbol.iterator]:KQ[Symbol.iterator]};function tZe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var nZe={time:null,delay:0,duration:250,ease:tZe};function rZe(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function iZe(e){var t,n;e instanceof WQ?(t=e._id,e=e._name):(t=GQ(),(n=nZe).time=CQ(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&IQ(c,e,t,l,o,n||rZe(c,t));return new WQ(r,this._parents,e,t)}yZ.prototype.interrupt=tXe,yZ.prototype.transition=iZe;function aZe(e,t){var n,r=1;e??=0,t??=0;function i(){var i,a=n.length,o,s=0,c=0;for(i=0;i<a;++i)o=n[i],s+=o.x,c+=o.y;for(s=(s/a-e)*r,c=(c/a-t)*r,i=0;i<a;++i)o=n[i],o.x-=s,o.y-=c}return i.initialize=function(e){n=e},i.x=function(t){return arguments.length?(e=+t,i):e},i.y=function(e){return arguments.length?(t=+e,i):t},i.strength=function(e){return arguments.length?(r=+e,i):r},i}function oZe(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return qQ(this.cover(t,n),t,n,e)}function qQ(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a=e._root,o={data:r},s=e._x0,c=e._y0,l=e._x1,u=e._y1,d,f,p,m,h,g,_,v;if(!a)return e._root=o,e;
vendor: 4,563 bytes, line 260
260for(;a.length;)if((h=t>=(d=(s+l)/2))?s=d:l=d,(g=n>=(f=(c+u)/2))?c=f:u=f,i=a,!(a=a[_=g<<1|h]))return i[_]=o,e;if(p=+e._x.call(null,a.data),m=+e._y.call(null,a.data),t===p&&n===m)return o.next=a,i?i[_]=o:e._root=o,e;do i=i?i[_]=[,,,,]:e._root=[,,,,],(h=t>=(d=(s+l)/2))?s=d:l=d,(g=n>=(f=(c+u)/2))?c=f:u=f;while((_=g<<1|h)==(v=(m>=f)<<1|p>=d));return i[v]=a,i[_]=o,e}function sZe(e){var t,n,r=e.length,i,a,o=Array(r),s=Array(r),c=1/0,l=1/0,u=-1/0,d=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(a=+this._y.call(null,t))||(o[n]=i,s[n]=a,i<c&&(c=i),i>u&&(u=i),a<l&&(l=a),a>d&&(d=a));if(c>u||l>d)return this;for(this.cover(c,l).cover(u,d),n=0;n<r;++n)qQ(this,o[n],s[n],e[n]);return this}function cZe(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var o=i-n||1,s=this._root,c,l;n>e||e>=i||r>t||t>=a;)switch(l=(t<r)<<1|e<n,c=[,,,,],c[l]=s,s=c,o*=2,l){case 0:i=n+o,a=r+o;break;case 1:n=i-o,a=r+o;break;case 2:i=n+o,r=a-o;break;case 3:n=i-o,r=a-o;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function lZe(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function uZe(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function JQ(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function dZe(e,t,n){var r,i=this._x0,a=this._y0,o,s,c,l,u=this._x1,d=this._y1,f=[],p=this._root,m,h;for(p&&f.push(new JQ(p,i,a,u,d)),n==null?n=1/0:(i=e-n,a=t-n,u=e+n,d=t+n,n*=n);m=f.pop();)if(!(!(p=m.node)||(o=m.x0)>u||(s=m.y0)>d||(c=m.x1)<i||(l=m.y1)<a))if(p.length){var g=(o+c)/2,_=(s+l)/2;f.push(new JQ(p[3],g,_,c,l),new JQ(p[2],o,_,g,l),new JQ(p[1],g,s,c,_),new JQ(p[0],o,s,g,_)),(h=(t>=_)<<1|e>=g)&&(m=f[f.length-1],f[f.length-1]=f[f.length-1-h],f[f.length-1-h]=m)}else{var v=e-+this._x.call(null,p.data),y=t-+this._y.call(null,p.data),b=v*v+y*y;if(b<n){var x=Math.sqrt(n=b);i=e-x,a=t-x,u=e+x,d=t+x,r=p.data}}return r}function fZe(e){if(isNaN(u=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e)))return this;var t,n=this._root,r,i,a,o=this._x0,s=this._y0,c=this._x1,l=this._y1,u,d,f,p,m,h,g,_;if(!n)return this;if(n.length)for(;;){if((m=u>=(f=(o+c)/2))?o=f:c=f,(h=d>=(p=(s+l)/2))?s=p:l=p,t=n,!(n=n[g=h<<1|m]))return this;if(!n.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(r=t,_=g)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):t?(a?t[g]=a:delete t[g],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[_]=n:this._root=n),this):(this._root=a,this)}function pZe(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function mZe(){return this._root}function hZe(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function gZe(e){var t=[],n,r=this._root,i,a,o,s,c;for(r&&t.push(new JQ(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,a=n.x0,o=n.y0,s=n.x1,c=n.y1)&&r.length){var l=(a+s)/2,u=(o+c)/2;(i=r[3])&&t.push(new JQ(i,l,u,s,c)),(i=r[2])&&t.push(new JQ(i,a,u,l,c)),(i=r[1])&&t.push(new JQ(i,l,o,s,u)),(i=r[0])&&t.push(new JQ(i,a,o,l,u))}return this}function _Ze(e){var t=[],n=[],r;for(this._root&&t.push(new JQ(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var a,o=r.x0,s=r.y0,c=r.x1,l=r.y1,u=(o+c)/2,d=(s+l)/2;(a=i[0])&&t.push(new JQ(a,o,s,u,d)),(a=i[1])&&t.push(new JQ(a,u,s,c,d)),(a=i[2])&&t.push(new JQ(a,o,d,u,l)),(a=i[3])&&t.push(new JQ(a,u,d,c,l))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function vZe(e){return e[0]}function yZe(e){return arguments.length?(this._x=e,this):this._x}function bZe(e){return e[1]}function xZe(e){return arguments.length?(this._y=e,this):this._y}function YQ(e,t,n){var r=new XQ(t??vZe,n??bZe,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function XQ(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function ZQ(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var QQ=YQ.prototype=XQ.prototype;QQ.copy=function(){var e=new XQ(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=ZQ(t),e;for(n=[{source:t,target:e._root=[,,,,]}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=[,,,,]}):t.target[i]=ZQ(r));return e}
260,QQ.add=oZe,QQ.addAll=sZe,QQ.cover=cZe,QQ.data=lZe,QQ.extent=uZe,QQ.find=dZe,QQ.remove=fZe,QQ.removeAll=pZe,QQ.root=mZe,QQ.size=hZe,QQ.visit=gZe,QQ.visitAfter=_Ze,QQ.x=yZe,QQ.y=xZe;function $Q(e){return function(){return e}}function e$(e){return(e()-.5)*1e-6}function SZe(e){return e.x+e.vx}function CZe(e){return e.y+e.vy}function t$(e){var t,n,r,i=1,a=1;typeof e!=`function`&&(e=$Q(e==null?1:+e));function o(){for(var e,o=t.length,c,l,u,d,f,p,m=0;m<a;++m)for(c=YQ(t,SZe,CZe).visitAfter(s),e=0;e<o;++e)l=t[e],f=n[l.index],p=f*f,u=l.x+l.vx,d=l.y+l.vy,c.visit(h);function h(e,t,n,a,o){var s=e.data,c=e.r,m=f+c;if(s){if(s.index>l.index){var h=u-s.x-s.vx,g=d-s.y-s.vy,_=h*h+g*g;_<m*m&&(h===0&&(h=e$(r),_+=h*h),g===0&&(g=e$(r),_+=g*g),_=(m-(_=Math.sqrt(_)))/_*i,l.vx+=(h*=_)*(m=(c*=c)/(p+c)),l.vy+=(g*=_)*m,s.vx-=h*(m=1-m),s.vy-=g*m)}return}return t>u+m||a<u-m||n>d+m||o<d-m}}function s(e){if(e.data)return e.r=n[e.data.index];for(var t=e.r=0;t<4;++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function c(){if(t){var r,i=t.length,a;for(n=Array(i),r=0;r<i;++r)a=t[r],n[a.index]=+e(a,r,t)}}return o.initialize=function(e,n){t=e,r=n,c()},o.iterations=function(e){return arguments.length?(a=+e,o):a},o.strength=function(e){return arguments.length?(i=+e,o):i},o.radius=function(t){return arguments.length?(e=typeof t==`function`?t:$Q(+t),c(),o):e},o}var wZe=1664525,TZe=1013904223,n$=4294967296;function EZe(){let e=1;return()=>(e=(wZe*e+TZe)%n$)/n$}var DZe=10,OZe=Math.PI*(3-Math.sqrt(5));function r$(e){var t,n=1,r=.001,i=1-r**(1/300),a=0,o=.6,s=new Map,c=TQ(d),l=XX(`tick`,`end`),u=EZe();e??=[];function d(){f(),l.call(`tick`,t),n<r&&(c.stop(),l.call(`end`,t))}function f(r){var c,l=e.length,u;r===void 0&&(r=1);for(var d=0;d<r;++d)for(n+=(a-n)*i,s.forEach(function(e){e(n)}),c=0;c<l;++c)u=e[c],u.fx==null?u.x+=u.vx*=o:(u.x=u.fx,u.vx=0),u.fy==null?u.y+=u.vy*=o:(u.y=u.fy,u.vy=0);return t}function p(){for(var t=0,n=e.length,r;t<n;++t){if(r=e[t],r.index=t,r.fx!=null&&(r.x=r.fx),r.fy!=null&&(r.y=r.fy),isNaN(r.x)||isNaN(r.y)){var i=DZe*Math.sqrt(.5+t),a=t*OZe;r.x=i*Math.cos(a),r.y=i*Math.sin(a)}(isNaN(r.vx)||isNaN(r.vy))&&(r.vx=r.vy=0)}}function m(t){return t.initialize&&t.initialize(e,u),t}return p(),t={tick:f,restart:function(){return c.restart(d),t},stop:function(){return c.stop(),t},nodes:function(n){return arguments.length?(e=n,p(),s.forEach(m),t):e},alpha:function(e){return arguments.length?(n=+e,t):n},alphaMin:function(e){return arguments.length?(r=+e,t):r},alphaDecay:function(e){return arguments.length?(i=+e,t):+i},alphaTarget:function(e){return arguments.length?(a=+e,t):a},velocityDecay:function(e){return arguments.length?(o=1-e,t):1-o},randomSource:function(e){return arguments.length?(u=e,s.forEach(m),t):u},force:function(e,n){return arguments.length>1?(n==null?s.delete(e):s.set(e,m(n)),t):s.get(e)},find:function(t,n,r){var i=0,a=e.length,o,s,c,l,u;for(r==null?r=1/0:r*=r,i=0;i<a;++i)l=e[i],o=t-l.x,s=n-l.y,c=o*o+s*s,c<r&&(u=l,r=c);return u},on:function(e,n){return arguments.length>1?(l.on(e,n),t):l.on(e)}}}function kZe(e){var t=$Q(.1),n,r,i;typeof e!=`function`&&(e=$Q(e==null?0:+e));function a(e){for(var t=0,a=n.length,o;t<a;++t)o=n[t],o.vx+=(i[t]-o.x)*r[t]*e}function o(){if(n){var a,o=n.length;for(r=Array(o),i=Array(o),a=0;a<o;++a)r[a]=isNaN(i[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return a.initialize=function(e){n=e,o()},a.strength=function(e){return arguments.length?(t=typeof e==`function`?e:$Q(+e),o(),a):t},a.x=function(t){return arguments.length?(e=typeof t==`function`?t:$Q(+t),o(),a):e},a}function AZe(e){var t=$Q(.1),n,r,i;typeof e!=`function`&&(e=$Q(e==null?0:+e));function a(e){for(var t=0,a=n.length,o;t<a;++t)o=n[t],o.vy+=(i[t]-o.y)*r[t]*e}function o(){if(n){var a,o=n.length;for(r=Array(o),i=Array(o),a=0;a<o;++a)r[a]=isNaN(i[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return a.initialize=function(e){n=e,o()},a.strength=function(e){return arguments.length?(t=typeof e==`function`?e:$Q(+e),o(),a):t},a.y=function(t){return arguments.length?(e=typeof t==`function`?t:$Q(+t),o(),a):e},a}function jZe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function i$(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function a$(e){return e=i$(Math.abs(e)),e?e[1]:NaN}function MZe(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function NZe(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var PZe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o$(e){if(!(t=PZe.exec(e)))throw Error(`invalid format: `+e);var t;return new s$({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}o$.prototype=s$.prototype;function s$(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}s$.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function FZe(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var c$;function IZe(e,t){var n=i$(e,t);if(!n)return e+``;var r=n[0],i=n[1],a=i-(c$=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+i$(e,Math.max(0,t+a-1))[0]}function l$(e,t){var n=i$(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var u$={"%":(e,t)=>
vendor: 4,872 bytes, line 260
260(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:jZe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>l$(e*100,t),r:l$,s:IZe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function d$(e){return e}var f$=Array.prototype.map,p$=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function LZe(e){var t=e.grouping===void 0||e.thousands===void 0?d$:MZe(f$.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?d$:NZe(f$.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`â`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e){e=o$(e);var l=e.fill,u=e.align,d=e.sign,f=e.symbol,p=e.zero,m=e.width,h=e.comma,g=e.precision,_=e.trim,v=e.type;v===`n`?(h=!0,v=`g`):u$[v]||(g===void 0&&(g=12),_=!0,v=`g`),(p||l===`0`&&u===`=`)&&(p=!0,l=`0`,u=`=`);var y=f===`$`?n:f===`#`&&/[boxX]/.test(v)?`0`+v.toLowerCase():``,b=f===`$`?r:/[%p]/.test(v)?o:``,x=u$[v],S=/[defgprs%]/.test(v);g=g===void 0?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function C(e){var n=y,r=b,o,f,C;if(v===`c`)r=x(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),g),_&&(e=FZe(e)),w&&+e==0&&d!==`+`&&(w=!1),n=(w?d===`(`?d:s:d===`-`||d===`(`?``:d)+n,r=(v===`s`?p$[8+c$/3]:``)+r+(w&&d===`(`?`)`:``),S){for(o=-1,f=e.length;++o<f;)if(C=e.charCodeAt(o),48>C||C>57){r=(C===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}h&&!p&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<m?Array(m-T+1).join(l):``;switch(h&&p&&(e=t(E+e,E.length?m-r.length:1/0),E=``),u){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r;break}return a(e)}return C.toString=function(){return e+``},C}function u(e,t){var n=l((e=o$(e),e.type=`f`,e)),r=Math.max(-8,Math.min(8,Math.floor(a$(t)/3)))*3,i=10**-r,a=p$[8+r/3];return function(e){return n(i*e)+a}}return{format:l,formatPrefix:u}}var m$,h$,g$;RZe({thousands:`,`,grouping:[3],currency:[`$`,``]});function RZe(e){return m$=LZe(e),h$=m$.format,g$=m$.formatPrefix,m$}function zZe(e){return Math.max(0,-a$(Math.abs(e)))}function BZe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(a$(t)/3)))*3-a$(Math.abs(e)))}function VZe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,a$(t)-a$(e))+1}function HZe(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function UZe(){return this.eachAfter(HZe)}function WZe(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function GZe(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function KZe(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function qZe(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function JZe(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function YZe(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function XZe(e){for(var t=this,n=ZZe(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function ZZe(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function QZe(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function $Ze(){return Array.from(this)}function eQe(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function tQe(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*nQe(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function _$(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=aQe)):t===void 0&&(t=iQe);for(var n=new v$(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new v$(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(sQe)}function rQe(){return _$(this).eachBefore(oQe)}function iQe(e){return e.children}function aQe(e){return Array.isArray(e)?e[1]:null}function oQe(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function sQe(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function v$(e){this.data=e,this.depth=this.height=0,this.parent=null}v$.prototype=_$.prototype={constructor:v$,count:UZe,each:WZe,eachAfter:KZe,eachBefore:GZe,find:qZe,sum:JZe,sort:YZe,path:XZe,ancestors:QZe,desce
260ndants:$Ze,leaves:eQe,links:tQe,copy:rQe,[Symbol.iterator]:nQe};function y$(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function b$(e,t){switch(arguments.length){case 0:break;case 1:typeof e==`function`?this.interpolator(e):this.range(e);break;default:this.domain(e),typeof t==`function`?this.interpolator(t):this.range(t);break}return this}var x$=Symbol(`implicit`);function S$(){var e=new KX,t=[],n=[],r=x$;function i(i){let a=e.get(i);if(a===void 0){if(r!==x$)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new KX;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return S$(t,n).unknown(r)},y$.apply(i,arguments),i}function cQe(e){return function(){return e}}function lQe(e){return+e}var C$=[0,1];function w$(e){return e}function T$(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:cQe(isNaN(t)?NaN:.5)}function uQe(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function dQe(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=T$(i,r),a=n(o,a)):(r=T$(r,i),a=n(a,o)),function(e){return a(r(e))}}function fQe(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=T$(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=WX(e,t,1,r)-1;return a[n](i[n](t))}}function pQe(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function mQe(){var e=C$,t=C$,n=iQ,r,i,a,o=w$,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==w$&&(o=uQe(e[0],e[n-1])),s=n>2?fQe:dQe,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),eQ))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,lQe),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=aQ,u()},d.clamp=function(e){return arguments.length?(o=e?!0:w$,u()):o!==w$},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function hQe(e,t,n,r){var i=Eqe(e,t,n),a;switch(r=o$(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=BZe(i,o))&&(r.precision=a),g$(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=VZe(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=zZe(i))&&(r.precision=a-(r.type===`%`)*2);break}return h$(r)}function E$(e){var t=e.domain;return e.ticks=function(e){var n=t();return Tqe(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return hQe(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=YX(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function D$(e){return function(t){return t<0?-((-t)**+e):t**+e}}function gQe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function _Qe(e){return e<0?-e*e:e*e}function vQe(e){var t=e(w$,w$),n=1;function r(){return n===1?e(w$,w$):n===.5?e(gQe,_Qe):e(D$(n),D$(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},E$(t)}function O$(){var e=vQe(mQe());return e.copy=function(){return pQe(e,O$()).exponent(e.exponent())},y$.apply(e,arguments),e}function yQe(){return O$.apply(null,arguments).exponent(.5)}function k$(){var e=[],t=[],n=[],r;function i(){var r=0,i=Math.max(1,t.length);for(n=Array(i-1);++r<i;)n[r-1]=Dqe(e,r/i);return a}function a(e){return e==null||isNaN(e=+e)?r:t[WX(n,e)]}return a.invertExtent=function(r){var i=t.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:e[0],i<n.length?n[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(VX),i()},a.range=function(e){return arguments.length?(t=Array.from(e),i()):t.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return k$().domain(e).range(t).unknown(r)},y$.apply(a,arguments)}
260function bQe(){var e=0,t=1,n,r,i,a,o=w$,s=!1,c;function l(e){return e==null||isNaN(e=+e)?c:o(i===0?.5:(e=(a(e)-n)*i,s?Math.max(0,Math.min(1,e)):e))}l.domain=function(o){return arguments.length?([e,t]=o,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(e){return arguments.length?(s=!!e,l):s},l.interpolator=function(e){return arguments.length?(o=e,l):o};function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,o=e(n,r),l):[o(0),o(1)]}}return l.range=u(iQ),l.rangeRound=u(aQ),l.unknown=function(e){return arguments.length?(c=e,l):c},function(o){return a=o,n=o(e),r=o(t),i=n===r?0:1/(r-n),l}}function A$(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function j$(){var e=E$(bQe()(w$));return e.copy=function(){return A$(e,j$())},b$.apply(e,arguments)}function xQe(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,l=w$,u,d=!1,f;function p(e){return isNaN(e=+e)?f:(e=.5+((e=+u(e))-a)*(r*e<r*a?s:c),l(d?Math.max(0,Math.min(1,e)):e))}p.domain=function(l){return arguments.length?([e,t,n]=l,i=u(e=+e),a=u(t=+t),o=u(n=+n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p):[e,t,n]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(l=e,p):l};function m(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,l=qYe(e,[n,r,i]),p):[l(0),l(.5),l(1)]}}return p.range=m(iQ),p.rangeRound=m(aQ),p.unknown=function(e){return arguments.length?(f=e,p):f},function(l){return u=l,i=l(e),a=l(t),o=l(n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p}}function M$(){var e=E$(xQe()(w$));return e.copy=function(){return A$(e,M$())},b$.apply(e,arguments)}function N$(e){for(var t=e.length/6|0,n=Array(t),r=0;r<t;)n[r]=`#`+e.slice(r*6,++r*6);return n}var P$=e=>jYe(e[e.length-1]),SQe=P$([,,,`ef8a62f7f7f767a9cf`,`ca0020f4a58292c5de0571b0`,`ca0020f4a582f7f7f792c5de0571b0`,`b2182bef8a62fddbc7d1e5f067a9cf2166ac`,`b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac`,`b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac`,`b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac`,`67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061`,`67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061`].map(N$)),F$=P$([,,,`deebf79ecae13182bd`,`eff3ffbdd7e76baed62171b5`,`eff3ffbdd7e76baed63182bd08519c`,`eff3ffc6dbef9ecae16baed63182bd08519c`,`eff3ffc6dbef9ecae16baed64292c62171b5084594`,`f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594`,`f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b`].map(N$));function I$(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}var CQe=I$(N$(`44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e62
2601fbe723fde725`));I$(N$(`00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf`)),I$(N$(`00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4`)),I$(N$(`0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921`));var L$=e=>()=>e;function wQe(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function R$(e,t,n){this.k=e,this.x=t,this.y=n}R$.prototype={constructor:R$,scale:function(e){return e===1?this:new R$(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new R$(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var z$=new R$(1,0,0);R$.prototype;function B$(e){e.stopImmediatePropagation()}function V$(e){e.preventDefault(),e.stopImmediatePropagation()}function TQe(e){return(!e.ctrlKey||e.type===`wheel`)&&!e.button}function EQe(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute(`viewBox`)?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function H$(){return this.__zoom||z$}function DQe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?
vendor: 4,485 bytes, line 260
2601:.002)*(e.ctrlKey?10:1)}function OQe(){return navigator.maxTouchPoints||`ontouchstart`in this}function kQe(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function AQe(){var e=TQe,t=EQe,n=kQe,r=DQe,i=OQe,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,c=KYe,l=XX(`start`,`zoom`,`end`),u,d,f,p=500,m=150,h=0,g=10;function _(e){e.property(`__zoom`,H$).on(`wheel.zoom`,w,{passive:!1}).on(`mousedown.zoom`,T).on(`dblclick.zoom`,E).filter(i).on(`touchstart.zoom`,D).on(`touchmove.zoom`,O).on(`touchend.zoom touchcancel.zoom`,k).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}_.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property(`__zoom`,H$),e===i?i.interrupt().each(function(){S(this,arguments).event(r).start().zoom(null,typeof t==`function`?t.apply(this,arguments):t).end()}):x(e,t,n,r)},_.scaleBy=function(e,t,n,r){_.scaleTo(e,function(){return this.__zoom.k*(typeof t==`function`?t.apply(this,arguments):t)},n,r)},_.scaleTo=function(e,r,i,a){_.transform(e,function(){var e=t.apply(this,arguments),a=this.__zoom,s=i==null?b(e):typeof i==`function`?i.apply(this,arguments):i,c=a.invert(s),l=typeof r==`function`?r.apply(this,arguments):r;return n(y(v(a,l),s,c),e,o)},i,a)},_.translateBy=function(e,r,i,a){_.transform(e,function(){return n(this.__zoom.translate(typeof r==`function`?r.apply(this,arguments):r,typeof i==`function`?i.apply(this,arguments):i),t.apply(this,arguments),o)},null,a)},_.translateTo=function(e,r,i,a,s){_.transform(e,function(){var e=t.apply(this,arguments),s=this.__zoom,c=a==null?b(e):typeof a==`function`?a.apply(this,arguments):a;return n(z$.translate(c[0],c[1]).scale(s.k).translate(typeof r==`function`?-r.apply(this,arguments):-r,typeof i==`function`?-i.apply(this,arguments):-i),e,o)},a,s)};function v(e,t){return t=Math.max(a[0],Math.min(a[1],t)),t===e.k?e:new R$(t,e.x,e.y)}function y(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new R$(e.k,r,i)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,n,r,i){e.on(`start.zoom`,function(){S(this,arguments).event(i).start()}).on(`interrupt.zoom end.zoom`,function(){S(this,arguments).event(i).end()}).tween(`zoom`,function(){var e=this,a=arguments,o=S(e,a).event(i),s=t.apply(e,a),l=r==null?b(s):typeof r==`function`?r.apply(e,a):r,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),d=e.__zoom,f=typeof n==`function`?n.apply(e,a):n,p=c(d.invert(l).concat(u/d.k),f.invert(l).concat(u/f.k));return function(e){if(e===1)e=f;else{var t=p(e),n=u/t[2];e=new R$(n,l[0]-t[0]*n,l[1]-t[1]*n)}o.zoom(null,e)}})}function S(e,t,n){return!n&&e.__zooming||new C(e,t)}function C(e,n){this.that=e,this.args=n,this.active=0,this.sourceEvent=null,this.extent=t.apply(e,n),this.taps=0}C.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit(`start`)),this},zoom:function(e,t){return this.mouse&&e!==`mouse`&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&e!==`touch`&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&e!==`touch`&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit(`zoom`),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit(`end`)),this},emit:function(e){var t=bZ(this.that).datum();l.call(e,this.that,new wQe(e,{sourceEvent:this.sourceEvent,target:_,transform:this.that.__zoom,dispatch:l}),t)}};function w(t,...i){if(!e.apply(this,arguments))return;var s=S(this,i).event(t),c=this.__zoom,l=Math.max(a[0],Math.min(a[1],c.k*2**r.apply(this,arguments))),u=xZ(t);if(s.wheel)(s.mouse[0][0]!==u[0]||s.mouse[0][1]!==u[1])&&(s.mouse[1]=c.invert(s.mouse[0]=u)),clearTimeout(s.wheel);else{if(c.k===l)return;s.mouse=[u,c.invert(u)],BQ(this),s.start()}V$(t),s.wheel=setTimeout(d,m),s.zoom(`mouse`,n(y(v(c,l),s.mouse[0],s.mouse[1]),s.extent,o));function d(){s.wheel=null,s.end()}}function T(t,...r){if(f||!e.apply(this,arguments))return;var i=t.currentTarget,a=S(this,r,!0).event(t),s=bZ(t.view).on(`mousemove.zoom`,d,!0).on(`mouseup.zoom`,p,!0),c=xZ(t,i),l=t.clientX,u=t.clientY;dYe(t.view),B$(t),a.mouse=[c,this.__zoom.invert(c)],BQ(this),a.start();function d(e){if(V$(e),!a.moved){var t=e.clientX-l,r=e.clientY-u;a.moved=t*t+r*r>h}a.event(e).zoom(`mouse`,n(y(a.that.__zoom,a.mouse[0]=xZ(e,i),a.mouse[1]),a.extent,o))}
260function p(e){s.on(`mousemove.zoom mouseup.zoom`,null),fYe(e.view,a.moved),V$(e),a.event(e).end()}}function E(r,...i){if(e.apply(this,arguments)){var a=this.__zoom,c=xZ(r.changedTouches?r.changedTouches[0]:r,this),l=a.invert(c),u=a.k*(r.shiftKey?.5:2),d=n(y(v(a,u),c,l),t.apply(this,i),o);V$(r),s>0?bZ(this).transition().duration(s).call(x,d,c,r):bZ(this).call(_.transform,d,c,r)}}function D(t,...n){if(e.apply(this,arguments)){var r=t.touches,i=r.length,a=S(this,n,t.changedTouches.length===i).event(t),o,s,c,l;for(B$(t),s=0;s<i;++s)c=r[s],l=xZ(c,this),l=[l,this.__zoom.invert(l),c.identifier],a.touch0?!a.touch1&&a.touch0[2]!==l[2]&&(a.touch1=l,a.taps=0):(a.touch0=l,o=!0,a.taps=1+!!u);u&&=clearTimeout(u),o&&(a.taps<2&&(d=l[0],u=setTimeout(function(){u=null},p)),BQ(this),a.start())}}function O(e,...t){if(this.__zooming){var r=S(this,t).event(e),i=e.changedTouches,a=i.length,s,c,l,u;for(V$(e),s=0;s<a;++s)c=i[s],l=xZ(c,this),r.touch0&&r.touch0[2]===c.identifier?r.touch0[0]=l:r.touch1&&r.touch1[2]===c.identifier&&(r.touch1[0]=l);if(c=r.that.__zoom,r.touch1){var d=r.touch0[0],f=r.touch0[1],p=r.touch1[0],m=r.touch1[1],h=(h=p[0]-d[0])*h+(h=p[1]-d[1])*h,g=(g=m[0]-f[0])*g+(g=m[1]-f[1])*g;c=v(c,Math.sqrt(h/g)),l=[(d[0]+p[0])/2,(d[1]+p[1])/2],u=[(f[0]+m[0])/2,(f[1]+m[1])/2]}else if(r.touch0)l=r.touch0[0],u=r.touch0[1];else return;r.zoom(`touch`,n(y(c,l,u),r.extent,o))}}function k(e,...t){if(this.__zooming){var n=S(this,t).event(e),r=e.changedTouches,i=r.length,a,o;for(B$(e),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),a=0;a<i;++a)o=r[a],n.touch0&&n.touch0[2]===o.identifier?delete n.touch0:n.touch1&&n.touch1[2]===o.identifier&&delete n.touch1;if(n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else if(n.end(),n.taps===2&&(o=xZ(o,this),Math.hypot(d[0]-o[0],d[1]-o[1])<g)){var s=bZ(this).on(`dblclick.zoom`);s&&s.apply(this,arguments)}}}return _.wheelDelta=function(e){return arguments.length?(r=typeof e==`function`?e:L$(+e),_):r},_.filter=function(t){return arguments.length?(e=typeof t==`function`?t:L$(!!t),_):e},_.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:L$(!!e),_):i},_.extent=function(e){return arguments.length?(t=typeof e==`function`?e:L$([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),_):t},_.scaleExtent=function(e){return arguments.length?(a[0]=+e[0],a[1]=+e[1],_):[a[0],a[1]]},_.translateExtent=function(e){return arguments.length?(o[0][0]=+e[0][0],o[1][0]=+e[1][0],o[0][1]=+e[0][1],o[1][1]=+e[1][1],_):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},_.constrain=function(e){return arguments.length?(n=e,_):n},_.duration=function(e){return arguments.length?(s=+e,_):s},_.interpolate=function(e){return arguments.length?(c=e,_):c},_.on=function(){var e=l.on.apply(l,arguments);return e===l?_:e},_.clickDistance=function(e){return arguments.length?(h=(e=+e)*e,_):Math.sqrt(h)},_.tapDistance=function(e){return arguments.length?(g=+e,_):g},_}var U$={maxDepth:2,isInterleaved:!0,isPacked:!0,isCollisionResolved:!0,sizeColumn:`subtreeSize`,sizeRange:[2,50],colorScale:`sequential`,polarity:1,numBins:4,showLabels:!0,showTooltips:!0,strokeWidth:1,strokeColor:`#2b6cb0`,radiusExponent:1,colorMode:`light`};function jQe(e,t){let n=e.copy();return n.each(e=>{if(e.depth>=t){let t=e.children?.filter(e=>e.descendants().length===1);t&&t.length>0?e.children=t:e.children=void 0}}),n}function MQe(e,t){let n=e.filter(e=>e.data.subtreeSize>1),r=e.filter(e=>e.data.subtreeSize<=1);if(n.length===0)return r;let i=n.map(e=>e.data[t]),a=k$().domain(i).range(Oqe(5)),o=Array.from({length:5},()=>[]);n.forEach(e=>{o[a(e.data.subtreeSize)].push(e)}),o.forEach(e=>{e.sort((e,t)=>t.data.subtreeSize-e.data.subtreeSize)});let s=[],c=!0;for(;c;){c=!1;for(let e=0;e<5;e++)o[e].length>0&&(s.push(o[e].shift()),c=!0)}return[...s,...r]}function W$(e,t,n,r=`subtreeSize`){if(e.data.angle=(t+n)/2,e.children){let i=e.data[r]||1,a=t;e.children.forEach(e=>{let o=e.data[r]||1,s=(n-t)*o/i,c=a+s;W$(e,a,c,r),a+=s})}}function NQe(e,t,n=`subtreeSize`){let r=new Map;e.forEach(e=>{let t=e.depth;r.has(t)||r.set(t,[]),r.get(t).push(e)}),r.forEach((e,r)=>{if(e.length<2)return;let i=e.filter(e=>e.descendants().length>1);if(i.length<2)return;let a=i.map(e=>({node:e,x:e.x,y:e.y}));
260r$(i).force(`collision`,t$().radius(e=>t(e.data[n])+10).strength(1)).force(`x`,kZe(e=>{let t=a.find(t=>t.node===e);return t?t.x:e.x}).strength(.1)).force(`y`,AZe(e=>{let t=a.find(t=>t.node===e);return t?t.y:e.y}).strength(.1)).alphaDecay(.01).stop().tick(100)})}function PQe(e,t,n=`subtreeSize`){if(!e.children)return;let r=e.children.filter(e=>e.descendants().length===1);if(r.length===0)return;let i=t(e.data[n]);r.forEach((a,o)=>{let s=i+t(a.data[n]),c=2*Math.PI*o/r.length;a.x=e.x+s*Math.cos(c),a.y=e.y+s*Math.sin(c)}),r.length>1&&r$([e,...r]).force(`center`,aZe(e.x,e.y)).force(`collision`,t$().radius(e=>t(e.data[n]))).stop().tick(1)}function FQe(e){return e.ancestors().slice(1).reverse()}function G$(e,t){let n=t.data.id,r=null;return e.each(e=>{e.data.id===n&&(r=e)}),r}var IQe=J(null),K$=J(U$),q$=J(void 0),J$=J(e=>{let t=e(q$);if(!t)return[];let n=[],r=t.parent;for(;r;)n.push(r),r=r.parent;return n}),Y$=J(e=>{let t=e(q$);return t?t.descendants().slice(1):[]}),X$=J(e=>{let t=e(q$),n=e(J$),r=e(Y$);if(!t)return new Set;let i=new Set;return i.add(t.data.id),n.forEach(e=>i.add(e.data.id)),r.forEach(e=>i.add(e.data.id)),i}),Z$=J(z$),Q$=J(null);J(null);var $$=J(null),e1=J(e=>{let t=e(Q$),n=e($$),r=e(K$);return t?jQe(n||t,r.maxDepth):null});J(e=>{let t=e(IQe);if(!t)return null;let n=_$(t);return n.each(e=>{e.data.subtreeSize=e.descendants().length,e.data.leafCount=e.leaves().length,e.data.internalCount=e.descendants().filter(e=>e.children).length}),n});var LQe=J(e=>{let t=e(Q$),n=e(e1);if(!t||!n||t.data.id===n.data.id)return[];let r=G$(t,n);return r?FQe(r):[]}),RQe=J(e=>{let t=e(e1),n=e(K$);if(!t)return null;let r=t;n.isInterleaved&&r.children&&(r.children=MQe(r.children,n.sizeColumn)),W$(r,0,2*Math.PI,n.sizeColumn);let i=r.descendants().map(e=>e.data[n.sizeColumn]||e.data.subtreeSize),a=yQe().domain(GX(i)).range(n.sizeRange).clamp(!0),o=O$().exponent(n.radiusExponent||1).domain([0,n.maxDepth]).range([0,300]);
260return r.descendants().forEach(e=>{e.y=o(e.depth);let t=e.y,n=(e.data.angle||0)-Math.PI/2;e.x=t*Math.cos(n),e.y=t*Math.sin(n)}),n.isCollisionResolved&&NQe(r.descendants(),a,n.sizeColumn),n.isPacked&&r.descendants().forEach(e=>{PQe(e,a,n.sizeColumn)}),{root:r,sizeScale:a,nodes:r.descendants(),links:r.links()}}),zQe=J(null,(e,t,n)=>{let r=_$(n);r.each(e=>{e.data.subtreeSize=e.descendants().length,e.data.leafCount=e.leaves().length,e.data.internalCount=e.descendants().filter(e=>e.children).length}),t(Q$,r),t($$,null),t(Z$,z$),t(q$,void 0)}),BQe=({data:e,options:t})=>{let n=sX(K$),r=sX(zQe);return _.useMemo(()=>{n(t)},[t,n]),_.useMemo(()=>{e&&r(e)},[e,r]),null},VQe=({data:e,options:t,children:n})=>mX.jsxs(mX.Fragment,{children:[mX.jsx(BQe,{data:e,options:t}),n]}),HQe={background:`#ffffff`,text:`#1e293b`,textSecondary:`#64748b`,stroke:`#2b6cb0`,strokeSecondary:`#cbd5e1`,nodeDefault:`#3182ce`,nodeLeaf:`#ffffff`,nodeSelected:`#1e40af`,nodeSelectedStroke:`#222222`,labelBackground:`#ffffff`,labelBackgroundOpacity:.8,linkOpacity:.2,breadcrumbText:`#0066cc`,breadcrumbTextSecondary:`#666666`,breadcrumbHover:`#f0f8ff`,tooltipBackground:`#ffffff`,tooltipText:`#1e293b`,tooltipBorder:`#e2e8f0`},UQe={background:`#0f172a`,text:`#f1f5f9`,textSecondary:`#94a3b8`,stroke:`#60a5fa`,strokeSecondary:`#475569`,nodeDefault:`#3b82f6`,nodeLeaf:`#1e293b`,nodeSelected:`#2563eb`,nodeSelectedStroke:`#f1f5f9`,labelBackground:`#1e293b`,labelBackgroundOpacity:.9,linkOpacity:.3,breadcrumbText:`#60a5fa`,breadcrumbTextSecondary:`#94a3b8`,breadcrumbHover:`#1e3a8a`,tooltipBackground:`#1e293b`,tooltipText:`#f1f5f9`,tooltipBorder:`#475569`},t1=(e=`light`)=>e===`dark`?UQe:HQe,WQe=(e,t=15)=>{if(e.length<=t)return e;let n=Math.floor((t-5)/2),r=e.slice(-t),i=-1;for(let e=r.length-1;e>=0;e--)if(r[e]===`-`||r[e]===`.`||r[e]===` `){i=e;break}let a=i>=0?r.slice(i):r;return`${e.slice(0,n)}.....${a}`},GQe=({ancestors:e,currentRoot:t,onBreadcrumbClick:n,options:r})=>{let i=[...e,t],a=t1(r?.colorMode);return i.length<=1?mX.jsx(`div`,{style:{padding:`8px 12px`,borderRadius:`6px`,fontSize:`14px`,color:a.textSecondary,zIndex:10},children:`How to use: Click a node to select or double-click to drill down`}):mX.jsxs(`div`,{style:{padding:`8px 12px`,borderRadius:`6px`,fontSize:`14px`,display:`flex`,alignItems:`center`,flexWrap:`wrap`,gap:`4px`,zIndex:10},children:[mX.jsx(`span`,{style:{fontWeight:`600`,color:a.textSecondary,marginRight:`8px`},children:`Path:`}),i.map((e,t)=>mX.jsxs(_.Fragment,{children:[t>0&&mX.jsx(`span`,{style:{color:a.textSecondary,margin:`0 4px`},children:`âº`}),mX.jsx(`button`,{onClick:()=>n(e),style:{background:`none`,border:`none`,color:t===i.length-1?a.text:a.breadcrumbText,cursor:t===i.length-1?`default`:`pointer`,textDecoration:`none`,padding:`2px 4px`,borderRadius:`3px`,fontSize:`inherit`,fontWeight:t===i.length-1?`600`:`normal`},onMouseEnter:e=>{t<i.length-1&&(e.currentTarget.style.backgroundColor=a.breadcrumbHover)},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`transparent`},disabled:t===i.length-1,children:WQe(e.data.id)})]},e.data.id))]})},KQe=n1;function n1(e,t,n){e instanceof RegExp&&(e=r1(e,n)),t instanceof RegExp&&(t=r1(t,n));var r=i1(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function r1(e,t){var n=t.match(e);return n?n[0]:null}n1.range=i1;function i1(e,t,n){var r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){for(r=[],a=n.length;u>=0&&!s;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),l]:(i=r.pop(),i<a&&(a=i,o=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(s=[a,o])}return s}var qQe=a1;function a1(e,t,n){e instanceof RegExp&&(e=o1(e,n)),t instanceof RegExp&&(t=o1(t,n));var r=s1(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function o1(e,t){var n=t.match(e);return n?n[0]:null}a1.range=s1;function s1(e,t,n){var r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),l]:(i=r.pop(),i<a&&(a=i,o=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(s=[a,o])}return s}var JQe=qQe,YQe=c1;function c1(e,t,n){var r=e;return XQe(e,t).reduce(function(e,i){return e.replace(i.functionIdentifier+`(`+i.matches.body+`)`,ZQe(i.matches.body,i.functionIdentifier,n,r,t))},e)}function XQe(e,t){var n=[],r=typeof t==`string`?RegExp(`\\b(`+t+`)\\(`):t;do{var i=r.exec(e);if(!i)return n;if(i[1]===void 0)throw Error(`Missing the first couple of parenthesis to get the function identifier in `+t);var a=i[1],o=i.index,s=JQe(`(`,`)`,e.substring(o));if(!s||s.start!==i[0].length-1)throw SyntaxError(a+`(): missing closing ')' in the value '`+e+`'`);n.push({matches:s,functionIdentifier:a}),e=s.post}while(r.test(e));return n}function ZQe(e,t,n,r,i){return n(c1(e,i,n),t,r)}var l1=function(e){this.value=e};l1.math={isDegree:!0,acos:function(e){return l1.math.isDegree?180/Math.PI*Math.acos(e):Math.acos(e)},add:function(e,t){return e+t},asin:function(e){return l1.math.isDegree?180/Math.PI*Math.asin(e):Math.asin(e)},atan:function(e){return l1.math.isDegree?180/Math.PI*Math.atan(e):Math.atan(e)},acosh:function(e){return Math.log(e+Math.sqrt(e*e-1))},asinh:function(e){return Math.log(e+Math.sqrt(e*e+1))},atanh:function(e){return Math.log((1+e)/(1-e))},C:function(e,t){var n=1,r=e-t,i=t;i<r&&(i=r,r=t);for(var a=i+1;a<=e;a++)n*=a;return n/l1.math.fact(r)},changeSign:function(e){return-e},cos:function(e){return l1.math.isDegree&&(e=l1.math.toRadian(e)),Math.cos(e)},cosh:function(e){return(Math.E**+e+Math.E**(-1*e))/2},div:function(e,t){return e/t},fact:function(e){if(e%1!=0)return`NaN`;for(var t=1,n=2;n<=e;n++)t*=n;return t},inverse:function(e){return 1/e},log:function(e){return Math.log(e)/Math.log(10)},mod:function(e,t){return e%t},mul:function(e,t){return e*t},P:function(e,t){for(var n=1,r=Math.floor(e)-Math.floor(t)+1;r<=Math.floor(e);r++)n*=r;return n},Pi:function(e,t,n){for(var r=1,i=e;i<=t;i++)r*=Number(n.postfixEval({n:i}));return r},pow10x:function(e){for(var t=1;e--;)t*=10;return t},sigma:function(e,t,n){for(var r=0,i=e;i<=t;i++)r+=Number(n.postfixEval({n:i}));return r},sin:function(e){return l1.math.isDegree&&(e=l1.math.toRadian(e)),Math.sin(e)},sinh:function(e){return(Math.E**+e-Math.E**(-1*e))/2},sub:function(e,t){return e-t},tan:function(e){return l1.math.isDegree&&(e=l1.math.toRadian(e)),Math.tan(e)},tanh:function(e){return l1.sinha(e)/l1.cosha(e)},toRadian:function(e){return e*Math.PI/180},and:function(e,t){return e&t}},l1.Exception=function(e){this.message=e};var u1=l1;function d1(e,t){for(var n=0;n<e.length;n++)e[n]+=t;return e}for(var f1=[{token:`sin`,show:`sin`,type:0,value:u1.math.sin},{token:`cos`,show:`cos`,type:0,value:u1.math.cos}
260,{token:`tan`,show:`tan`,type:0,value:u1.math.tan},{token:`pi`,show:`π`,type:3,value:`PI`},{token:`(`,show:`(`,type:4,value:`(`},{token:`)`,show:`)`,type:5,value:`)`},{token:`P`,show:`P`,type:10,value:u1.math.P},{token:`C`,show:`C`,type:10,value:u1.math.C},{token:` `,show:` `,type:14,value:` `.anchor},{token:`asin`,show:`asin`,type:0,value:u1.math.asin},{token:`acos`,show:`acos`,type:0,value:u1.math.acos},{token:`atan`,show:`atan`,type:0,value:u1.math.atan},{token:`7`,show:`7`,type:1,value:`7`},{token:`8`,show:`8`,type:1,value:`8`},{token:`9`,show:`9`,type:1,value:`9`},{token:`int`,show:`Int`,type:0,value:Math.floor},{token:`cosh`,show:`cosh`,type:0,value:u1.math.cosh},{token:`acosh`,show:`acosh`,type:0,value:u1.math.acosh},{token:`ln`,show:` ln`,type:0,value:Math.log},{token:`^`,show:`^`,type:10,value:Math.pow},{token:`root`,show:`root`,type:0,value:Math.sqrt},{token:`4`,show:`4`,type:1,value:`4`},{token:`5`,show:`5`,type:1,value:`5`},{token:`6`,show:`6`,type:1,value:`6`},{token:`/`,show:`÷`,type:2,value:u1.math.div},{token:`!`,show:`!`,type:7,value:u1.math.fact},{token:`tanh`,show:`tanh`,type:0,value:u1.math.tanh},{token:`atanh`,show:`atanh`,type:0,value:u1.math.atanh},{token:`Mod`,show:` Mod `,type:2,value:u1.math.mod},{token:`1`,show:`1`,type:1,value:`1`},{token:`2`,show:`2`,type:1,value:`2`},{token:`3`,show:`3`,type:1,value:`3`},{token:`*`,show:`×`,type:2,value:u1.math.mul},{token:`sinh`,show:`sinh`,type:0,value:u1.math.sinh},{token:`asinh`,show:`asinh`,type:0,value:u1.math.asinh},{token:`e`,show:`e`,type:3,value:`E`},{token:`log`,show:` log`,type:0,value:u1.math.log},{token:`0`,show:`0`,type:1,value:`0`},{token:`.`,show:`.`,type:6,value:`.`},{token:`+`,show:`+`,type:9,value:u1.math.add},{token:`-`,show:`-`,type:9,value:u1.math.sub},{token:`,`,show:`,`,type:11,value:`,`},{token:`Sigma`,show:`Σ`,type:12,value:u1.math.sigma},{token:`n`,show:`n`,type:13,value:`n`},{token:`Pi`,show:`Π`,type:12,value:u1.math.Pi},{token:`pow`,show:`pow`,type:8,value:Math.pow,numberOfArguments:2},{token:`&`,show:`&`,type:9,value:u1.math.and}],p1={0:11,1:0,2:3,3:0,4:0,5:0,6:0,7:11,8:11,9:1,10:10,11:0,12:11,13:0,14:-1,15:11},m1=0;m1<f1.length;m1++)f1[m1].precedence=p1[f1[m1].type];var h1={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,9:!0,12:!0,13:!0,14:!0,15:!0},g1={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0,13:!0,15:!0},QQe={0:!0,3:!0,4:!0,8:!0,12:!0,13:!0,15:!0},_1={},v1={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,12:!0,13:!0,15:!0},$Qe={1:!0},y1=[[],`123789456+-*/()^!PCe0.,n &`.split(``),[`pi`,`ln`,`Pi`],[`sin`,`cos`,`tan`,`Del`,`int`,`Mod`,`log`,`pow`],[`asin`,`acos`,`atan`,`cosh`,`root`,`tanh`,`sinh`],[`acosh`,`atanh`,`asinh`,`Sigma`]];function e$e(e,t,n,r){for(var i=0;i<r;i++)if(e[n+i]!==t[i])return!1;return!0}u1.tokenTypes={FUNCTION_WITH_ONE_ARG:0,NUMBER:1,BINARY_OPERATOR_HIGH_PRECENDENCE:2,CONSTANT:3,OPENING_PARENTHESIS:4,CLOSING_PARENTHESIS:5,DECIMAL:6,POSTFIX_FUNCTION_WITH_ONE_ARG:7,FUNCTION_WITH_N_ARGS:8,BINARY_OPERATOR_LOW_PRECENDENCE:9,BINARY_OPERATOR_PERMUTATION:10,COMMA:11,EVALUATED_FUNCTION:12,EVALUATED_FUNCTION_PARAMETER:13,SPACE:14},u1.addToken=function(e){for(var t=0;t<e.length;t++){var n=e[t].token.length,r=-1;e[t].type===u1.tokenTypes.FUNCTION_WITH_N_ARGS&&e[t].numberOfArguments===void 0&&(e[t].numberOfArguments=2),y1[n]=y1[n]||[];for(var i=0;i<y1[n].length;i++)if(e[t].token===y1[n][i]){r=b1(y1[n][i],f1);break}r===-1?(f1.push(e[t]),e[t].precedence=p1[e[t].type],y1.length<=e[t].token.length&&(y1[e[t].token.length]=[]),y1[e[t].token.length].push(e[t].token)):(f1[r]=e[t],e[t].precedence=p1[e[t].type])}};function b1(e,t){for(var n=0;n<t.length;n++)if(t[n].token===e)return n;return-1}function t$e(e){for(var t=[],n=e.length,r,i,a,o=0;o<n;o++)if(!(o<n-1&&e[o]===` `&&e[o+1]===` `)){for(r=``,i=e.length-o>y1.length-2?y1.length-1:e.length-o;i>0;i--)if(y1[i]!==void 0)for(a=0;a<y1[i].length;a++)e$e(e,y1[i][a],o,i)&&(r=y1[i][a],a=y1[i].length,i=0);if(o+=r.length-1,r===``)throw new u1.Exception(`Can't understand after `+e.slice(o));t.push(f1[b1(r,f1)])}return t}var n$e={value:u1.math.changeSign,type:0,pre:21,show:`-`},x1={value:`)`,show:`)`,type:5,pre:0},S1={value:`(`,type:4,pre:0,show:`(`};u1.lex=function(e,t){var n=[S1],r=[],i=e,a=h1,o=0,s=_1,c=``,l;typeof t<`u`&&u1.addToken(t);var u={},d=t$e(i);for(l=0;l<d.length;l++){var f=d[l];if(f.type===14){if(l>0&&l<d.length-1&&d[l+1].type===1&&(d[l-1].type===1||d[l-1].type===6))throw new u1.Exception(`Unexpected Space`);continue}var p=f.token,m=f.type,h=f.value,g=f.precedence,_=f.show,v=n[n.length-1],y;for(y=r.length;y--&&r[y]===0;)if([0,2,3,4,5,9,11,12,13].indexOf(m)!==-1){if(a[m]!==!0)throw new u1.Exception(p+` is not allowed after `+c);n.push(x1),a=g1,s=v1,r.pop()}if(a[m]!==!0)throw new u1.Exception(p+` is not allowed after `+c);if(s[m]===!0&&(m=2,h=u1.math.mul,_=`×`,g=3,--l),u={value:h,type:m,pre:g,show:_,numberOfArguments:f.numberOfArguments},m===0)a=h1,s=_1,d1(r,2),n.push(u),d[l+1].type!==4&&(n.push(S1),r.push(2));else if(m===1)v.type===1?(v.value+=h,d1(r,1)):n.push(u),a=g1,s=QQe;else if(m===2)a=h1,s=_1,d1(r,2),n.push(u);else if(m===3)n.push(u),a=g1,s=v1;else if(m===4)d1(r,1),o++,a=h1,s=_1,n.push(u);else if(m===5){if(!o)throw new u1.Exception(`Closing parenthesis are more than opening one, wait What!!!`);o--,a=g1,s=v1,n.push(u),d1(r,1)}else if(m===6){if(v.hasDec)throw new u1.Exception(`Two decimals are not allowed in one number`);v.type!==1&&(v={value:0,type:1,pre:0},n.push(v)),a=$Qe,d1(r,1),s=_1,v.value+=h,v.hasDec=!0}else m===7&&(a=g1,s=v1,d1(r,1),n.push(u));m===8?(a=h1,s=_1,d1(r,f.numberOfArguments+2),n.push(u),d[l+1].type!==4&&(n.push(S1),r.push(f.numberOfArguments+2))):m===9?(v.type===9?v.value===u1.math.add?(v.value=h,v.show=_,d1(r,1)):v.value===u1.math.sub&&_===`-`&&(v.value=u1.math.add,v.show=`+`,d1(r,1)):v.type!==5&&v.type!==7&&v.type!==1&&v.type!==3&&v.type!==13?p===`-`&&(a=h1,s=_1,d1(r,2).push(2),n.push(n$e),n.push(S1)):(n.push(u),d1(r,2)),a=h1,s=_1):m===10?(a=h1,s=_1,d1(r,2),n.push(u)):m===11?(a=h1,s=_1,n.push(u)):m===12?(a=h1,s=_1,d1(r,6),n.push(u),d[l+1].type!==4&&(n.push(S1),r.push(6))):m===13&&(a=g1,s=v1,n.push(u)),d1(r,-1),c=p}for(y=r.length;y--;)n.push(x1);if(a[5]!==!0)throw new u1.Exception(`complete the expression`);for(;o--;)n.push(x1);return n.push(x1),new u1(n)};var C1=u1;C1.prototype.toPostfix=function(){for(var e=[],t,n,r,i,a,o=[{value:`(`,type:4,pre:0}],s=this.value,c=1;c<s.length;c++)if(s[c].type===1||s[c].type===3||s[c].type===13)s[c].type===1&&(s[c].value=Number(s[c].value)),e.push(s[c]);else if(s[c].type===4)o.push(s[c]);else if(s[c].type===5)for(;(n=o.pop()).type!==4;)e.push(n);else if(s[c].type===11){for(;(n=o.pop()).type!==4;)e.push(n);o.push(n)}else{t=s[c],i=t.pre,a=o[o.length-1],r=a.pre;var l=a.value==`Math.pow`&&t.value==`Math.pow`;if(i>r)o.push(t);else{for(;r>=i&&!l||l&&i<r;)n=o.pop(),a=o[o.length-1],e.push(n),r=a.pre,l=t.value==`Math.pow`&&a.value==`Math.pow`;o.push(t)}}return new C1(e)};var w1=C1;w1.prototype.postfixEval=function(e){e||={},e.PI=Math.PI,e.E=Math.E;for(var t=[],n,r,i,a=this.value,o=typeof e.n<`u`,s=0;s<a.length;
260s++)if(a[s].type===1)t.push({value:a[s].value,type:1});else if(a[s].type===3)t.push({value:e[a[s].value],type:1});else if(a[s].type===0)typeof t[t.length-1].type>`u`?t[t.length-1].value.push(a[s]):t[t.length-1].value=a[s].value(t[t.length-1].value);else if(a[s].type===7)typeof t[t.length-1].type>`u`?t[t.length-1].value.push(a[s]):t[t.length-1].value=a[s].value(t[t.length-1].value);else if(a[s].type===8){for(var c=[],l=0;l<a[s].numberOfArguments;l++)c.push(t.pop().value);t.push({type:1,value:a[s].value.apply(a[s],c.reverse())})}else a[s].type===10?(n=t.pop(),r=t.pop(),typeof r.type>`u`?(r.value=r.concat(n),r.value.push(a[s]),t.push(r)):typeof n.type>`u`?(n.unshift(r),n.push(a[s]),t.push(n)):t.push({type:1,value:a[s].value(r.value,n.value)})):a[s].type===2||a[s].type===9?(n=t.pop(),r=t.pop(),typeof r.type>`u`?(r=r.concat(n),r.push(a[s]),t.push(r)):typeof n.type>`u`?(n.unshift(r),n.push(a[s]),t.push(n)):t.push({type:1,value:a[s].value(r.value,n.value)})):a[s].type===12?(n=t.pop(),typeof n.type<`u`&&(n=[n]),r=t.pop(),i=t.pop(),t.push({type:1,value:a[s].value(i.value,r.value,new w1(n))})):a[s].type===13&&(o?t.push({value:e[a[s].value],type:3}):t.push([a[s]]));if(t.length>1)throw new w1.Exception(`Uncaught Syntax error`);return t[0].value>0x38d7ea4c68000?`Infinity`:parseFloat(t[0].value.toFixed(15))},w1.eval=function(e,t,n){return typeof t>`u`?this.lex(e).toPostfix().postfixEval():typeof n>`u`?typeof t.length<`u`?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t):this.lex(e,t).toPostfix().postfixEval(n)};var T1=w1;T1.prototype.formulaEval=function(){for(var e,t,n,r=[],i=this.value,a=0;a<i.length;a++)i[a].type===1||i[a].type===3?r.push({value:i[a].type===3?i[a].show:i[a].value,type:1}):i[a].type===13?r.push({value:i[a].show,type:1}):i[a].type===0?r[r.length-1]={value:i[a].show+(i[a].show==`-`?``:`(`)+r[r.length-1].value+(i[a].show==`-`?``:`)`),type:0}:i[a].type===7?r[r.length-1]={value:(r[r.length-1].type==1?``:`(`)+r[r.length-1].value+(r[r.length-1].type==1?``:`)`)+i[a].show,type:7}:i[a].type===10?(e=r.pop(),t=r.pop(),i[a].show===`P`||i[a].show===`C`?r.push({value:`<sup>`+t.value+`</sup>`+i[a].show+`<sub>`+e.value+`</sub>`,type:10}):r.push({value:(t.type==1?``:`(`)+t.value+(t.type==1?``:`)`)+`<sup>`+e.value+`</sup>`,type:1})):i[a].type===2||i[a].type===9?(e=r.pop(),t=r.pop(),r.push({value:(t.type==1?``:`(`)+t.value+(t.type==1?``:`)`)+i[a].show+(e.type==1?``:`(`)+e.value+(e.type==1?``:`)`),type:i[a].type})):i[a].type===12&&(e=r.pop(),t=r.pop(),n=r.pop(),r.push({value:i[a].show+`(`+n.value+`,`+t.value+`,`+e.value+`)`,type:12}));return r[0].value};var r$e=T1,i$e=KQe,a$e=YQe,o$e=r$e,s$e=100,c$e=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,E1,l$e=u$e;function u$e(e,t){E1=0,t=10**(t===void 0?5:t),e=e.replace(/\n+/g,` `);function n(e,n,i){if(E1++>s$e)throw E1=0,Error(`Call stack overflow for `+i);if(e===``)throw Error(n+`(): '`+i+`' must contain a non-whitespace string`);e=r(e,i);var a=d$e(e);if(a.length>1||e.indexOf(`var(`)>-1)return n+`(`+e+`)`;var o=a[0]||``;o===`%`&&(e=e.replace(/\b[0-9\.]+%/g,function(e){return parseFloat(e.slice(0,-1))*.01}));var s=e.replace(new RegExp(o,`gi`),``),c;try{c=o$e.eval(s)}catch{return n+`(`+e+`)`}return o===`%`&&(c*=100),(n.length||o===`%`)&&(c=Math.round(c*t)/t),c+=o,c}function r(e,t){e=e.replace(/((?:\-[a-z]+\-)?calc)/g,``);for(var r=``,i=e,a;a=c$e.exec(i);){a[0].index>0&&(r+=i.substring(0,a[0].index));var o=i$e(`(`,`)`,i.substring([0].index));if(o.body===``)throw Error(`'`+e+`' must contain a non-whitespace string`);var s=n(o.body,``,t);r+=o.pre+s,i=o.post}return r+i}return a$e(e,/((?:\-[a-z]+\-)?calc)\(/,n)}function d$e(e){for(var t=[],n=[],r=/[\.0-9]([%a-z]+)/gi,i=r.exec(e);i;)!i||!i[1]||(n.indexOf(i[1].toLowerCase())===-1&&(t.push(i[1]),n.push(i[1].toLowerCase())),i=r.exec(e));return t}var f$e=uX(l$e),p$e=typeof lX==`object`&&lX&&lX.Object===Object&&lX,m$e=typeof self==`object`&&self&&self.Object===Object&&self,D1=p$e||m$e||Function(`return this`)(),O1=D1.Symbol,k1=O1,A1=Object.prototype,h$e=A1.hasOwnProperty,g$e=A1.toString,j1=k1?k1.toStringTag:void 0;function _$e(e){var t=h$e.call(e,j1),n=e[j1];try{e[j1]=void 0;var r=!0}catch{}var i=g$e.call(e);return r&&(t?e[j1]=n:delete e[j1]),i}var v$e=_$e,y$e=Object.prototype.toString;function b$e(e){return y$e.call(e)}var x$e=b$e,M1=O1,S$e=v$e,C$e=x$e,w$e=`[object Null]`,T$e=`[object Undef
260ined]`,N1=M1?M1.toStringTag:void 0;function E$e(e){return e==null?e===void 0?T$e:w$e:N1&&N1 in Object(e)?S$e(e):C$e(e)}var D$e=E$e;function O$e(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var P1=O$e,k$e=D$e,A$e=P1,j$e=`[object AsyncFunction]`,M$e=`[object Function]`,N$e=`[object GeneratorFunction]`,P$e=`[object Proxy]`;function F$e(e){if(!A$e(e))return!1;var t=k$e(e);return t==M$e||t==N$e||t==j$e||t==P$e}var I$e=F$e,F1=D1[`__core-js_shared__`],I1=function(){var e=/[^.]+$/.exec(F1&&F1.keys&&F1.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function L$e(e){return!!I1&&I1 in e}var R$e=L$e,z$e=Function.prototype.toString;function B$e(e){if(e!=null){try{return z$e.call(e)}catch{}try{return e+``}catch{}}return``}var V$e=B$e,H$e=I$e,U$e=R$e,W$e=P1,G$e=V$e,K$e=/[\\^$.*+?()[\]{}|]/g,q$e=/^\[object .+?Constructor\]$/,J$e=Function.prototype,Y$e=Object.prototype,X$e=J$e.toString,Z$e=Y$e.hasOwnProperty,Q$e=RegExp(`^`+X$e.call(Z$e).replace(K$e,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function $$e(e){return!W$e(e)||U$e(e)?!1:(H$e(e)?Q$e:q$e).test(G$e(e))}var e1e=$$e;function t1e(e,t){return e?.[t]}var n1e=t1e,r1e=e1e,i1e=n1e;function a1e(e,t){var n=i1e(e,t);return r1e(n)?n:void 0}var L1=a1e,R1=L1(Object,`create`),z1=R1;function o1e(){this.__data__=z1?z1(null):{},this.size=0}var s1e=o1e;function c1e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var l1e=c1e,u1e=R1,d1e=`__lodash_hash_undefined__`,f1e=Object.prototype.hasOwnProperty;function p1e(e){var t=this.__data__;if(u1e){var n=t[e];return n===d1e?void 0:n}return f1e.call(t,e)?t[e]:void 0}var m1e=p1e,h1e=R1,g1e=Object.prototype.hasOwnProperty;function _1e(e){var t=this.__data__;return h1e?t[e]!==void 0:g1e.call(t,e)}var v1e=_1e,y1e=R1,b1e=`__lodash_hash_undefined__`;function x1e(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=y1e&&t===void 0?b1e:t,this}var S1e=x1e,C1e=s1e,w1e=l1e,T1e=m1e,E1e=v1e,D1e=S1e;function B1(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}B1.prototype.clear=C1e,B1.prototype.delete=w1e,B1.prototype.get=T1e,B1.prototype.has=E1e,B1.prototype.set=D1e;var O1e=B1;function k1e(){this.__data__=[],this.size=0}var A1e=k1e;function j1e(e,t){return e===t||e!==e&&t!==t}var M1e=j1e;function N1e(e,t){for(var n=e.length;n--;)if(M1e(e[n][0],t))return n;return-1}var V1=N1e,P1e=V1,F1e=Array.prototype.splice;function I1e(e){var t=this.__data__,n=P1e(t,e);return n<0?!1:(n==t.length-1?t.pop():F1e.call(t,n,1),--this.size,!0)}var L1e=I1e,R1e=V1;function z1e(e){var t=this.__data__,n=R1e(t,e);return n<0?void 0:t[n][1]}var B1e=z1e,V1e=V1;function H1e(e){return V1e(this.__data__,e)>-1}var U1e=H1e,W1e=V1;function G1e(e,t){var n=this.__data__,r=W1e(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var K1e=G1e,q1e=A1e,J1e=L1e,Y1e=B1e,X1e=U1e,Z1e=K1e;function H1(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}H1.prototype.clear=q1e,H1.prototype.delete=J1e,H1.prototype.get=Y1e,H1.prototype.has=X1e,H1.prototype.set=Z1e;var Q1e=H1,$1e=L1(D1,`Map`),U1=O1e,e0e=Q1e,t0e=$1e;function n0e(){this.size=0,this.__data__={hash:new U1,map:new(t0e||e0e),string:new U1}}var r0e=n0e;function i0e(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}var a0e=i0e;function o0e(e,t){var n=e.__data__;return a0e(t)?n[typeof t==`string`?`string`:`hash`]:n.map}var W1=o0e,s0e=W1;function c0e(e){var t=s0e(this,e).delete(e);return this.size-=+!!t,t}var l0e=c0e,u0e=W1;function d0e(e){return u0e(this,e).get(e)}var f0e=d0e,p0e=W1;function m0e(e){return p0e(this,e).has(e)}var h0e=m0e,g0e=W1;function _0e(e,t){var n=g0e(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var v0e=_0e,y0e=r0e,b0e=l0e,x0e=f0e,S0e=h0e,C0e=v0e;function G1(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}G1.prototype.clear=y0e,G1.prototype.delete=b0e,G1.prototype.get=x0e,G1.prototype.has=S0e,G1.prototype.set=C0e;var K1=G1,w0e=`Expected a function`;function q1(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(w0e);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(q1.Cache||K1),n}q1.Cache=K1;var T0e=uX(q1),J1=`__react_svg_text_measurement_id`;function E0e(e,t){try{var n=document.getElementById(J1);if(!n){var r=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);r.setAttribute(`aria-hidden`,`true`),r.style.width=`0`,r.style.height=`0`,r.style.position=`absolute`,r.style.top=`-100%`,r.style.left=`-100%`,n=document.createElementNS(`http://www.w3.org/2000/svg`,`text`),n.setAttribute(`id`,J1),r.appendChild(n),document.body.appendChild(r)}return Object.assign(n.style,t),n.textContent=e,n.getComputedTextLength()}catch{return null}}var Y1=T0e(E0e,function(e,t){return e+`_`+JSON.stringify(t)}),D0e=[`verticalAnchor`,`scaleToFit`,`angle`,`width`,`lineHeight`,`capHeight`,`children`,`style`];function O0e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function X1(e){return typeof e==`number`}function Z1(e){return typeof e==`number`&&Number.isFinite(e)||typeof e==`string`}function k0e(e){var t=e.verticalAnchor,n=t===void 0?`end`:t,r=e.scaleToFit,i=r===void 0?!1:r,a=e.angle,o=e.width,s=e.lineHeight,c=s===void 0?`
2601em`:s,l=e.capHeight,u=l===void 0?`0.71em`:l,d=e.children,f=e.style,p=O0e(e,D0e),m=p.x,h=m===void 0?0:m,g=p.y,v=g===void 0?0:g,y=!Z1(h)||!Z1(v),b=(0,_.useMemo)(function(){return{wordsWithWidth:(d==null?[]:d.toString().split(/(?:(?!\u00A0+)\s+)/)).map(function(e){return{word:e,wordWidth:Y1(e,f)||0}}),spaceWidth:Y1(`\xA0`,f)||0}},[d,f]),x=b.wordsWithWidth,S=b.spaceWidth,C=(0,_.useMemo)(function(){return y?[]:o||i?x.reduce(function(e,t){var n=t.word,r=t.wordWidth,a=e[e.length-1];if(a&&(o==null||i||(a.width||0)+r+S<o))a.words.push(n),a.width=a.width||0,a.width+=r+S;else{var s={words:[n],width:r};e.push(s)}return e},[]):[{words:d==null?[]:d.toString().split(/(?:(?!\u00A0+)\s+)/)}]},[y,o,i,d,x,S]);return{wordsByLines:C,startDy:(0,_.useMemo)(function(){return y?``:f$e(n===`start`?`calc(`+u+`)`:n===`middle`?`calc(`+(C.length-1)/2+` * -`+c+` + (`+u+` / 2))`:`calc(`+(C.length-1)+` * -`+c+`)`)},[y,n,u,C.length,c]),transform:(0,_.useMemo)(function(){var e=[];if(y)return``;if(X1(h)&&X1(v)&&X1(o)&&i&&C.length>0){var t=C[0].width||1,n=i===`shrink-only`?Math.min(o/t,1):o/t,r=n,s=h-n*h,c=v-r*v;e.push(`matrix(`+n+`, 0, 0, `+r+`, `+s+`, `+c+`)`)}return a&&e.push(`rotate(`+a+`, `+h+`, `+v+`)`),e.length>0?e.join(` `):``},[y,h,v,o,i,C,a])}}var A0e=[`dx`,`dy`,`textAnchor`,`innerRef`,`innerTextRef`,`verticalAnchor`,`angle`,`lineHeight`,`scaleToFit`,`capHeight`,`width`];function Q1(){return Q1=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},Q1.apply(this,arguments)}function j0e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var M0e={overflow:`visible`};function N0e(e){var t=e.dx,n=t===void 0?0:t,r=e.dy,i=r===void 0?0:r,a=e.textAnchor,o=a===void 0?`start`:a,s=e.innerRef,c=e.innerTextRef;e.verticalAnchor,e.angle;var l=e.lineHeight,u=l===void 0?`1em`:l;e.scaleToFit,e.capHeight,e.width;var d=j0e(e,A0e),f=d.x,p=f===void 0?0:f,m=d.fontSize,h=k0e(e),g=h.wordsByLines,v=h.startDy,y=h.transform;return _.createElement(`svg`,{ref:s,x:n,y:i,fontSize:m,style:M0e},g.length>0?_.createElement(`text`,Q1({ref:c,transform:y},d,{textAnchor:o}),g.map(function(e,t){return _.createElement(`tspan`,{key:t,x:p,dy:t===0?v:u},e.words.join(` `))})):null)}var P0e=({nodes:e,transform:t,sizeScale:n,options:r})=>{let[i,a]=(0,_.useState)(0),o=(0,_.useRef)({}),s=t1(r?.colorMode),c=Y(q$),l=Y(J$),u=Y(Y$),d=(0,_.useCallback)(()=>{e.forEach(e=>{let t=o.current[e.data.id];t&&t.getBBox&&(e.data.bbox=t.getBBox())})},[e,t.k]);(0,_.useEffect)(()=>{d(),a(e=>e+1)},[e,d,c]);let f=e.filter(e=>{let r=l.map(e=>e.data.id).includes(e.data.id),i=c?.data.id===e.data.id,a=u.map(e=>e.data.id).includes(e.data.id),o=n(e.data.subtreeSize||1)>14/t.k,s=n(e.data.subtreeSize||1)>12/t.k;return(e?.parent)?.data.id===c?.data.id&&!e.children?!1:r||c&&i||a&&s||!c&&o});return mX.jsx(wX,{children:f.map((e,n)=>mX.jsxs(wX,{className:`text`,transform:`translate(${t.apply([e.x,e.y])})`,style:{pointerEvents:`none`},children:[e.data.bbox&&mX.jsx(`rect`,{x:e.data.bbox.x-5,y:e.data.bbox.y-5,width:e.data.bbox.width+10,height:e.data.bbox.height+10,fill:s.labelBackground,opacity:s.labelBackgroundOpacity,rx:`3`,ry:`3`,stroke:s.strokeSecondary,strokeWidth:.5}),mX.jsx(N0e,{fontSize:`0.9em`,width:80,textAnchor:`start`,fill:s.text,innerTextRef:t=>o.current[e.data.id]=t,children:e.data.label||e.data.id})]},`text-${n}`))},i)},F0e=({links:e,transform:t,stroke:n,strokeWidth:r=1.5,strokeOpacity:i,selectedNode:a,highlightedNodeIds:o,options:s})=>{let c=t1(s.colorMode),l=n||c.strokeSecondary,u=i||c.linkOpacity,d=e=>!a||!o?u:o.has(e.source.data.id)&&o.has(e.target.data.id)?u*2:u*.3;return mX.jsx(`g`,{className:`tree-links`,children:e.map((e,n)=>{let i=t.applyX(e.source.x),a=t.applyY(e.source.y),o=t.applyX(e.target.x),s=t.applyY(e.target.y);return mX.jsx(`line`,{x1:i,y1:a,x2:o,y2:s,stroke:l,strokeWidth:r,strokeOpacity:d(e),fill:`none`,style:{pointerEvents:`none`,transition:`stroke-opacity 0.2s ease`}},`link-${n}-${e.source.data.id}-${e.target.data.id}`)})})};function $1(e){let t={id:e.id,subtreeSize:1,label:e.label,value:e.value,color:e.color,children:e.children?.map($1),metrics:{}};return Object.keys(e).forEach(n=>{[`id`,`label`,`value`,`color`,`children`].includes(n)||t.metrics&&(t.metrics[n]=e[n])}),I0e(t),t}function I0e(e){let t=_$(e);t.each(e=>{e.data.subtreeSize=e.descendants().length,e.data.leafCount=e.leaves().length,e.data.internalCount=e.descendants().filter(e=>e.children).length}),e0(t,0,2*Math.PI)}function e0(e,t,n){if(e.data.angle=(t+n)/2,e.children){let r=e.data.subtreeSize,i=t;
260e.children.forEach(e=>{let a=e.data.subtreeSize,o=(n-t)*a/r;e0(e,i,i+Math.min(o,Math.PI/2)),i+=o})}}var L0e=(e,t=.3)=>{try{let n=FZ(e);return n?n.darker(t).toString():e}catch{return e}};function R0e(){return $1({id:`life`,label:`Life Sciences`,value:100,children:[{id:`biology`,label:`Biology`,value:50,children:[{id:`molecular-bio`,label:`Molecular Biology`,value:25,children:[{id:`genetics`,label:`Genetics`,value:8},{id:`genomics`,label:`Genomics`,value:7},{id:`proteomics`,label:`Proteomics`,value:6},{id:`biochemistry`,label:`Biochemistry`,value:7},{id:`cell-biology`,label:`Cell Biology`,value:5},{id:`molecular-genetics`,label:`Molecular Genetics`,value:4},{id:`structural-biology`,label:`Structural Biology`,value:3},{id:`systems-biology`,label:`Systems Biology`,value:4}]},{id:`ecology`,label:`Ecology`,value:20,children:[{id:`marine-ecology`,label:`Marine Ecology`,value:6},{id:`forest-ecology`,label:`Forest Ecology`,value:5},{id:`urban-ecology`,label:`Urban Ecology`,value:4},{id:`conservation-biology`,label:`Conservation Biology`,value:5},{id:`population-ecology`,label:`Population Ecology`,value:4},{id:`community-ecology`,label:`Community Ecology`,value:3},{id:`ecosystem-ecology`,label:`Ecosystem Ecology`,value:4},{id:`behavioral-ecology`,label:`Behavioral Ecology`,value:3},{id:`landscape-ecology`,label:`Landscape Ecology`,value:2}]},{id:`botany`,label:`Botany`,value:15,children:[{id:`plant-physiology`,label:`Plant Physiology`,value:4},{id:`plant-taxonomy`,label:`Plant Taxonomy`,value:3},{id:`plant-pathology`,label:`Plant Pathology`,value:3},{id:`horticulture`,label:`Horticulture`,value:3},{id:`agronomy`,label:`Agronomy`,value:4},{id:`forestry`,label:`Forestry`,value:3},{id:`mycology`,label:`Mycology`,value:2},{id:`bryology`,label:`Bryology`,value:1},{id:`phycology`,label:`Phycology`,value:2}]},{id:`zoology`,label:`Zoology`,value:18,children:[{id:`ornithology`,label:`Ornithology`,value:3},{id:`entomology`,label:`Entomology`,value:4},{id:`mammalogy`,label:`Mammalogy`,value:3},{id:`herpetology`,label:`Herpetology`,value:2},{id:`ichthyology`,label:`Ichthyology`,value:3},{id:`invertebrate-zoology`,label:`Invertebrate Zoology`,value:3},{id:`primatology`,label:`Primatology`,value:2},{id:`marine-zoology`,label:`Marine Zoology`,value:2},{id:`parasitology`,label:`Parasitology`,value:2}]},{id:`microbiology`,label:`Microbiology`,value:12,children:[{id:`bacteriology`,label:`Bacteriology`,value:3},{id:`virology`,label:`Virology`,value:4},{id:`immunology`,label:`Immunology`,value:4},{id:`mycobiology`,label:`Mycobiology`,value:2},{id:`environmental-microbiology`,label:`Environmental Microbiology`,value:3},{id:`industrial-microbiology`,label:`Industrial Microbiology`,value:2}]}]},{id:`medicine`,label:`Medicine`,value:35,children:[{id:`internal-medicine`,label:`Internal Medicine`,value:15,children:[{id:`cardiology`,label:`Cardiology`,value:4},{id:`gastroenterology`,label:`Gastroenterology`,value:3},{id:`endocrinology`,label:`Endocrinology`,value:3},{id:`nephrology`,label:`Nephrology`,value:2},{id:`pulmonology`,label:`Pulmonology`,value:3},{id:`rheumatology`,label:`Rheumatology`,value:2},{id:`hematology`,label:`Hematology`,value:3},{id:`oncology`,label:`Oncology`,value:4},{id:`infectious-diseases`,label:`Infectious Diseases`,value:3}]},{id:`surgery`,label:`Surgery`,value:12,children:[{id:`neurosurgery`,label:`Neurosurgery`,value:3},{id:`cardiac-surgery`,label:`Cardiac Surgery`,value:3},{id:`orthopedic-surgery`,label:`Orthopedic Surgery`,value:4},{id:`plastic-surgery`,label:`Plastic Surgery`,value:2},{id:`general-surgery`,label:`General Surgery`,value:3},{id:`vascular-surgery`,label:`Vascular Surgery`,value:2},{id:`transplant-surgery`,label:`Transplant Surgery`,value:2}]},{id:`pediatrics`,label:`Pediatrics`,value:10,children:[{id:`neonatology`,label:`Neonatology`,value:3},{id:`pediatric-oncology`,label:`Pediatric Oncology`,value:3},{id:`developmental-pediatrics`,label:`Developmental Pediatrics`,value:2},{id:`pediatric-cardiology`,label:`Pediatric Cardiology`,value:2},{id:`pediatric-neurology`,label:`Pediatric Neurology`,value:2},{id:`pediatric-surgery`,label:`Pediatric Surgery`,value:2}]},{id:`psychiatry`,label:`Psychiatry`,value:8,children:[{id:`clinical-psychiatry`,label:`Clinical Psychiatry`,value:3},{id:`child-psychiatry`,label:`Child Psychiatry`,value:2}
260,{id:`neuropsychiatry`,label:`Neuropsychiatry`,value:2},{id:`addiction-psychiatry`,label:`Addiction Psychiatry`,value:2},{id:`geriatric-psychiatry`,label:`Geriatric Psychiatry`,value:1}]}]},{id:`biotechnology`,label:`Biotechnology`,value:30,children:[{id:`genetic-engineering`,label:`Genetic Engineering`,value:12,children:[{id:`crispr`,label:`CRISPR Technology`,value:4},{id:`gene-therapy`,label:`Gene Therapy`,value:4},{id:`synthetic-biology`,label:`Synthetic Biology`,value:3},{id:`gene-editing`,label:`Gene Editing`,value:3},{id:`transgenic-organisms`,label:`Transgenic Organisms`,value:3},{id:`recombinant-dna`,label:`Recombinant DNA`,value:2},{id:`protein-engineering`,label:`Protein Engineering`,value:2}]},{id:`bioinformatics`,label:`Bioinformatics`,value:10,children:[{id:`computational-genomics`,label:`Computational Genomics`,value:3},{id:`structural-bioinformatics`,label:`Structural Bioinformatics`,value:3},{id:`phylogenetics`,label:`Phylogenetics`,value:2},{id:`metagenomics`,label:`Metagenomics`,value:2},{id:`transcriptomics`,label:`Transcriptomics`,value:2},{id:`biostatistics`,label:`Biostatistics`,value:2},{id:`machine-learning-bio`,label:`Machine Learning in Biology`,value:3}]},{id:`pharmaceutical`,label:`Pharmaceutical Biotechnology`,value:12,children:[{id:`drug-discovery`,label:`Drug Discovery`,value:4},{id:`clinical-trials`,label:`Clinical Trials`,value:3},{id:`pharmacology`,label:`Pharmacology`,value:3},{id:`pharmacogenomics`,label:`Pharmacogenomics`,value:3},{id:`drug-delivery`,label:`Drug Delivery Systems`,value:2},{id:`personalized-medicine`,label:`Personalized Medicine`,value:3},{id:`biomarkers`,label:`Biomarkers`,value:2},{id:`therapeutic-proteins`,label:`Therapeutic Proteins`,value:2}]},{id:`industrial-biotech`,label:`Industrial Biotechnology`,value:8,children:[{id:`biofuels`,label:`Biofuels`,value:3},{id:`biomaterials`,label:`Biomaterials`,value:2},{id:`biorefinery`,label:`Biorefinery`,value:2},{id:`enzyme-engineering`,label:`Enzyme Engineering`,value:2},{id:`fermentation`,label:`Fermentation Technology`,value:2},{id:`bioplastics`,label:`Bioplastics`,value:1}]}]},{id:`neuroscience`,label:`Neuroscience`,value:25,children:[{id:`cognitive-neuroscience`,label:`Cognitive Neuroscience`,value:8,children:[{id:`memory-research`,label:`Memory Research`,value:2},{id:`attention-research`,label:`Attention Research`,value:2},{id:`language-neuroscience`,label:`Language Neuroscience`,value:2},{id:`decision-making`,label:`Decision Making`,value:2},{id:`consciousness-studies`,label:`Consciousness Studies`,value:1}]},{id:`computational-neuroscience`,label:`Computational Neuroscience`,value:7,children:[{id:`neural-networks`,label:`Neural Networks`,value:3},{id:`brain-modeling`,label:`Brain Modeling`,value:2},{id:`neural-simulation`,label:`Neural Simulation`,value:2},{id:`connectomics`,label:`Connectomics`,value:2}]},{id:`neurobiology`,label:`Neurobiology`,value:10,children:[{id:`synaptic-transmission`,label:`Synaptic Transmission`,value:3},{id:`neuroplasticity`,label:`Neuroplasticity`,value:3},{id:`neurodevelopment`,label:`Neurodevelopment`,value:2},{id:`neurodegeneration`,label:`Neurodegeneration`,value:3},{id:`glial-biology`,label:`Glial Biology`,value:2},{id:`ion-channels`,label:`Ion Channels`,value:1}]}]},{id:`environmental-science`,label:`Environmental Science`,value:20,children:[{id:`climate-science`,label:`Climate Science`,value:8,children:[{id:`climatology`,label:`Climatology`,value:3},{id:`paleoclimatology`,label:`Paleoclimatology`,value:2},{id:`atmospheric-science`,label:`Atmospheric Science`,value:3},{id:`oceanography`,label:`Oceanography`,value:2},{id:`glaciology`,label:`Glaciology`,value:1}]},{id:`environmental-chemistry`,label:`Environmental Chemistry`,value:6,children:[{id:`pollution-chemistry`,label:`Pollution Chemistry`,value:2},{id:`geochemistry`,label:`Geochemistry`,value:2},{id:`toxicology`,label:`Environmental Toxicology`,value:2},{id:`remediation`,label:`Environmental Remediation`,value:1}]},{id:`sustainability-science`,label:`Sustainability Science`,value:6,children:[{id:`renewable-energy`,label:`Renewable Energy`,value:2},{id:`sustainable-agriculture`,label:`Sustainable Agriculture`,value:2},{id:`circular-economy`,label:`Circular Economy`,value:1},{id:`green-technology`,label:`Green Technology`,value:2}]}]}]})}var z0e=({nodes:e,sizeScale:t,transform:n,selectedNode:r,options:i,onNodeClick:a,onNodeDoubleClick:o,onShowTooltip:s,onHideTooltip:c})=>{let l=Y(X$),u=t1(i.colorMode),d=_.useMemo(()=>
260{if(!i.colorBy)return null;let t=e.map(e=>{let t=e.data[i.colorBy];return typeof t==`number`?t:0}).filter(e=>e!==void 0);if(t.length===0)return null;let n=GX(t),r=Math.max(...n.map(e=>Math.abs(e)));switch(i.colorScale){case`sequential`:return j$(F$).domain(n);case`diverging`:return M$(SQe).domain([-r,0,r]);case`binary`:return S$().domain([0,1]).range([`#2ecc71`,`#e74c3c`]);case`directional`:return j$(F$).domain(n);default:return j$(CQe).domain(n)}},[e,i.colorBy,i.colorScale]),f=e=>{if(e.data.color)return e.data.color;if(d&&i.colorBy){let t=e.data[i.colorBy];return d(typeof t==`number`?t:0)}return e.data.subtreeSize===1?u.nodeLeaf:u.nodeDefault},p=e=>!r||l.has(e.data.id)?1:.3,m=e=>{if(r&&e.data.id===r.data.id)return u.nodeSelectedStroke;let t=f(e);return t===u.nodeLeaf?u.stroke:L0e(t)},h=e=>r&&e.data.id===r.data.id?3:i.strokeWidth||1,g=_.useCallback((e,t)=>{t.stopPropagation(),a(e)},[a]),v=_.useCallback((e,t)=>{s(e,t)},[s]),y=_.useCallback(()=>{c()},[c]),b=_.useMemo(()=>{if(e.length===0)return[];let n=Math.max(...e.map(e=>e.depth));if(n<=1)return[];let r=new Map;e.forEach(e=>{let n=Math.sqrt((e.x||0)**2+(e.y||0)**2)+t(e.data[i.sizeColumn]||e.data.subtreeSize),a=r.get(e.depth)||0;r.set(e.depth,Math.max(a,n))});let a=[];for(let e=1;e<=n;e++){let t=r.get(e);t&&t>0&&a.push({depth:e,radius:t*1.1})}return a},[e,t,i.sizeColumn]);return mX.jsxs(wX,{children:[b.map(e=>mX.jsx(`circle`,{cx:n.applyX(0),cy:n.applyY(0),r:e.radius*n.k,fill:`none`,stroke:`rgba(148, 163, 184, 0.4)`,strokeWidth:1,opacity:.5,style:{pointerEvents:`none`,filter:`blur(0.5px)`}},`concentric-${e.depth}`)),e.map(e=>{let a=`node-${e.data.id.replace(/[^a-zA-Z0-9]/g,`-`)}`,s=t(e.data[i.sizeColumn]||e.data.subtreeSize),c=n.applyX(e.x),l=n.applyY(e.y);return mX.jsxs(wX,{transform:`translate(${c}, ${l})`,onClick:t=>g(e,t),onDoubleClick:t=>{o(e),t.stopPropagation()},onMouseOver:t=>v(e,t),onMouseLeave:y,children:[mX.jsx(`circle`,{r:s,fill:f(e),stroke:m(e),strokeWidth:h(e),opacity:p(e),style:{transition:`all 0.2s ease`,filter:r&&e.data.id===r.data.id?`drop-shadow(0 0 8px rgba(0,0,0,0.3))`:void 0}}),r&&e.data.id===r.data.id&&mX.jsx(`circle`,{r:s-1,fill:`none`,stroke:`rgba(255, 255, 255, 0.5)`,strokeWidth:1,style:{pointerEvents:`none`}})]},a)})]})},B0e=({TooltipComponent:e,node:t,left:n,top:r,renderContent:i})=>mX.jsx(e,{left:n,top:r,children:i?i(t):(e=>mX.jsxs(`div`,{style:{backgroundColor:`white`,color:`black`,borderRadius:`6px`,padding:`4px 8px`,fontSize:`14px`},children:[mX.jsx(`div`,{style:{fontWeight:`bold`,marginBottom:`4px`},children:e.label||e.id}),mX.jsxs(`div`,{children:[mX.jsxs(`div`,{children:[`Subtree size: `,e.subtreeSize]}),e.leafCount!==void 0&&mX.jsxs(`div`,{children:[`Leaf nodes: `,e.leafCount]}),e.internalCount!==void 0&&mX.jsxs(`div`,{children:[`Internal nodes: `,e.internalCount]}),e.value!==void 0&&mX.jsxs(`div`,{children:[`Value: `,e.value]})]})]}))(t)}),V0e=(0,_.forwardRef)(({width:e,height:t,onTransformChange:n,children:r,scaleExtent:i=[1,8]},a)=>{let o=(0,_.useRef)(null);return(0,_.useEffect)(()=>{if(a&&o.current)if(typeof a==`function`)a(o.current);else{let e=a;e.current=o.current}},[a]),(0,_.useEffect)(()=>{if(!o.current)return;let e=bZ(o.current),t=AQe().filter(e=>e.type===`dblclick`?!1:e.type===`wheel`||e.type===`mousedown`||e.type===`touchstart`).scaleExtent(i).on(`zoom`,e=>{n(e.transform)});return e.call(t),e.on(`wheel`,e=>{e.preventDefault(),e.stopPropagation()}),()=>{e.on(`wheel`,null),e.on(`zoom`,null)}},[n,i]),mX.jsx(`svg`,{width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`,viewBox:`0 0 ${e} ${t}`,style:{userSelect:`none`},children:mX.jsxs(wX,{top:t/2,left:e/2,innerRef:o,children:[mX.jsx(`rect`,{transform:`translate(${-e},${-t})`,width:e*2,height:t*2,fill:`transparent`}),r]})})}),H0e=({width:e=800,height:t=800,onNodeSelect:n,onNodeDrillDown:r,renderTooltip:i,mergedOptions:a})=>{let[o,s]=cX(q$),[c,l]=cX(Z$),u=Y(Q$),d=Y(e1),f=Y(LQe),p=Y(X$),m=sX($$),h=Y(K$),g=Y(RQe),{containerRef:v,containerBounds:y,TooltipInPortal:b}=gqe({scroll:!0,detectBounds:!0});_.useEffect(()=>{n&&n(o?.data)},[o,n]);let x=_.useCallback(e=>{s(e===o?void 0:e)},[o,s]),S=_.useCallback(e=>{if(!u||!d||(l(z$),e.data.id===d.data.id||e.data.subtreeSize===1))return;let t=G$(u,e);t&&(m(t),s(void 0),r&&r(e.data))},[u,d,h.maxDepth,m,s,l,r]),C=_.useCallback(e=>{if(!u)return;l(z$);let t=G$(u,e);t&&m(t),s(void 0)},[u,h.maxDepth,m,s,l]),{showTooltip:w,hideTooltip:T,tooltipData:E,tooltipLeft:D,tooltipTop:O}=QKe(),k=(0,_.useMemo)(()=>(e,t)=>{w({tooltipLeft:t.clientX-y.left,tooltipTop:t.clientY-y.top,tooltipData:e.data})},[w,y]),A=_.useCallback(()=>{T()},[T]),j=_.useCallback(e=>{l(e)},[l]);if(!g||!d)return mX.jsx(`div`,{style:{width:e,height:t,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#666`,fontSize:`14px`},children:`Loading tree layout...`});let{sizeScale:M,links:N,nodes:P}=g;return mX.jsxs(mX.Fragment,{children:[u&&d&&mX.jsx(GQe,{ancestors:f,currentRoot:d,onBreadcrumbClick:C,options:a}),mX.jsx(V0e,{width:e,height:t,ref:v,onTransformChange:j,children:mX.jsxs(wX,{children:[mX.jsx(F0e,{links:N,transform:c,stroke:a.strokeColor,strokeWidth:a.strokeWidth,selectedNode:o,highlightedNodeIds:p,options:a}),mX.jsx(z0e,{nodes:P,sizeScale:M,transform:c,selectedNode:o,options:a,onNodeClick:x,onNodeDoubleClick:S,onShowTooltip:k,onHideTooltip:A,containerBounds:y}),a.showLabels&&mX.jsx(P0e,{nodes:P,transform:c,sizeScale:M,options:a})]})}),E&&D&&O&&a.showTooltips&&mX.jsx(B0e,{TooltipComponent:b,node:E,left:D,top:O,renderContent:i,options:a})]})},U0e=({data:e,options:t={},...n})=>{let r=(0,_.useMemo)(()=>({...U$,...t}),[t]);return mX.jsx(VQe,{data:e,options:r,children:mX.jsx(H0e,{mergedOptions:r,...n})})},W0e=async()=>{let e=(await(await fetch(`/data/UAT.csv`)).text()).split(` 261`).slice(1),t={id:`root`,label:`Unified Astronomy Thesaurus`,children:[],value:1,subtreeSize:1},n=new Map;
261n.set(`root`,t),e.forEach(e=>{if(!e.trim())return;let r=e.split(`,`).map(e=>e.trim()).filter(e=>e);if(r.length===0)return;let i=t,a=``;r.forEach((e,t)=>{if(a=a?`${a}/${e}`:e,!n.has(a)){let r={id:a,label:e,children:[],value:1,subtreeSize:1,metrics:{depth:t+1}};n.set(a,r),i.children=i.children||[],i.children.push(r)}i=n.get(a)})});let r=e=>{if(!e.children||e.children.length===0)return e.value=1,e.subtreeSize=1,1;let t=e.children.reduce((e,t)=>e+r(t),0);return e.value=t,e.subtreeSize=t,t};return r(t),t},G0e=()=>{let[e,t]=(0,_.useState)(void 0),[n,r]=(0,_.useState)(!0),[i,a]=(0,_.useState)(null);return(0,_.useEffect)(()=>{(async()=>{try{r(!0),a(null),t(await W0e())}catch(e){console.error(`Error loading UAT data:`,e),a(`Failed to load UAT data. Using sample data instead.`),t(R0e())}finally{r(!1)}})()},[]),{data:e,loading:n,error:i}},K0e={maxDepth:2,isInterleaved:!0,isPacked:!0,isCollisionResolved:!0,sizeColumn:`subtreeSize`,showLabels:!0,showTooltips:!0,sizeRange:[3,50]},t0=e=>`https://www.google.com/search?q=${encodeURIComponent(e)}`,q0e=(e,t=10)=>{if(!e.children)return[];let n=[],r=e=>{e.children&&e.children.forEach(e=>{n.push(e),r(e)})};return r(e),n.slice(0,t)},J0e=(e,t=20)=>e?.children?e.children.slice(0,t):[],Y0e=()=>(0,B.jsxs)(V,{children:[(0,B.jsx)(Ll,{as:`h1`,size:`lg`,color:`accent`,mb:2,children:`Explore Astronomy Concepts with a Packed Radial Tree`}),(0,B.jsx)(U,{fontSize:`sm`,color:`gray.focusRing`,mb:4,children:`Custom-designed visualization by Karthik Badam, May 26, 2025.`}),(0,B.jsx)(U,{fontSize:`sm`,color:`gray.fg`,children:`Explore and learn astronomy concepts from the Unified Astronomy Thesaurus (UAT) using this visualization. Each circle is a concept in the thesaurus. Pick a circle to reveal the concepts within the broader area. Double click to see the hierarchy under a specific concept.`})]}),X0e=({selectedNode:e,descendants:t})=>(0,B.jsxs)(V,{children:[(0,B.jsx)(Ll,{as:`h2`,size:`md`,mb:1,color:`accentSubtle`,children:`Selected Concept`}),(0,B.jsxs)(Gh,{gap:4,align:`stretch`,children:[(0,B.jsxs)(Ch,{wrap:`wrap`,gap:8,children:[(0,B.jsxs)(V,{children:[(0,B.jsx)(U,{fontSize:`xs`,fontWeight:`semibold`,mb:1,color:`gray.focusRing`,children:`NAME`}),(0,B.jsxs)(Eh,{href:e.label&&t0(e.label),target:`_blank`,rel:`noopener noreferrer`,children:[(0,B.jsxs)(U,{fontSize:`sm`,mr:1,children:[e.label,` `]}),(0,B.jsx)(ig,{})]})]}),e.metrics?.depth&&(0,B.jsxs)(V,{children:[(0,B.jsx)(U,{fontSize:`xs`,fontWeight:`semibold`,mb:1,color:`gray.focusRing`,children:`DEPTH`}),(0,B.jsx)(dh,{colorScheme:`blue`,size:`sm`,children:e.metrics.depth})]}),(0,B.jsxs)(V,{children:[(0,B.jsx)(U,{fontSize:`xs`,fontWeight:`semibold`,mb:1,color:`gray.focusRing`,children:`CHILDREN`}),(0,B.jsx)(dh,{colorScheme:`green`,size:`sm`,children:e.children?.length||0})]})]}),t.length>0&&(0,B.jsxs)(V,{children:[(0,B.jsxs)(U,{fontSize:`xs`,fontWeight:`semibold`,mb:2,color:`gray.focusRing`,children:[`DESCENDANT CONCEPTS (`,t.length,`)`]}),(0,B.jsx)(Kh,{children:t.map(e=>(0,B.jsx)(qh,{children:(0,B.jsx)(Eh,{href:e.label&&t0(e.label),target:`_blank`,rel:`noopener noreferrer`,children:(0,B.jsxs)(ph,{size:`sm`,variant:`outline`,children:[e.label,(0,B.jsx)(ig,{})]})})},e.id))})]})]})]}),Z0e=({topLevelNodes:e})=>(0,B.jsxs)(V,{children:[(0,B.jsx)(Ll,{as:`h2`,size:`md`,mb:1,color:`accentSubtle`,children:`Top-level Concepts`}),(0,B.jsx)(Kh,{gap:2,children:e.map(e=>(0,B.jsx)(qh,{children:(0,B.jsx)(Eh,{href:e.label&&t0(e.label),target:`_blank`,rel:`noopener noreferrer`,children:(0,B.jsxs)(ph,{size:`sm`,variant:`outline`,children:[e.label,(0,B.jsx)(ig,{})]})})},e.id))})]}),Q0e=()=>(0,B.jsxs)(V,{children:[(0,B.jsx)(Ll,{as:`h2`,size:`md`,mb:1,color:`accentSubtle`,children:`Interaction Guide`}),(0,B.jsxs)(Ale,{fontSize:`sm`,ml:4,gap:1,children:[(0,B.jsxs)(Dh,{children:[(0,B.jsx)(U,{as:`span`,fontWeight:`semibold`,children:`Click`}),` `,`any node to select. Click again to unselect.`]}),(0,B.jsxs)(Dh,{children:[(0,B.jsx)(U,{as:`span`,fontWeight:`semibold`,children:`Double-Click`}),` `,`any node to zoom into the sub-hierarchy. Use the navigation buttons on top left to return to root.`]}),(0,B.jsxs)(Dh,{children:[(0,B.jsx)(U,{as:`span`,fontWeight:`semibold`,children:`Hover`}),` `,`for detailed tooltips.`]}),(0,B.jsxs)(Dh,{children:[(0,B.jsx)(U,{as:`span`,fontWeight:`semibold`,children:`Zoom`}),` `,`with mouse wheel or trackpad.`]}),(0,B.jsxs)(Dh,{children:[(0,B.jsx)(U,{as:`span`,fontWeight:`semibold`,children:`Pan`}),` `,`by dragging the background.`]})]})]}),$0e=()=>(0,B.jsxs)(V,{children:[(0,B.jsx)(Ll,{as:`h2`,size:`md`,mb:2,color:`accentSubtle`,children:`About the Dataset`}),(0,B.jsx)(U,{fontSize:`sm`,color:`gray.fg`,children:`Unified Astronomy Thesaurus (UAT) is a controlled vocabulary of astronomical terms developed by the American Astronomical Society. This graph visualizes that hierarchy so you can study how thous
261ands of concepts relate across 11 levels of depth, from broad processes to specific phenomena.`})]}),e2e=()=>(0,B.jsxs)(V,{children:[(0,B.jsx)(Ll,{as:`h3`,size:`md`,mb:2,color:`accentSubtle`,children:`How It Works`}),(0,B.jsxs)(Gh,{gap:1,align:`stretch`,children:[(0,B.jsxs)(U,{fontSize:`sm`,color:`gray.fg`,children:[(0,B.jsx)(`strong`,{children:`Circle Size:`}),` Represents the number of descendant concepts`]}),(0,B.jsxs)(U,{fontSize:`sm`,color:`gray.fg`,children:[(0,B.jsx)(`strong`,{children:`Radial Layout:`}),` Parent-child relationships shown through positioning`]}),(0,B.jsxs)(U,{fontSize:`sm`,color:`gray.fg`,children:[(0,B.jsx)(`strong`,{children:`Color Encoding:`}),` Visual distinction between concept categories`]})]})]}),t2e=()=>(0,B.jsx)(gg,{children:(0,B.jsx)(V,{minH:`50vh`,display:`flex`,alignItems:`center`,justifyContent:`center`,children:(0,B.jsxs)(Gh,{gap:4,children:[(0,B.jsx)(Ll,{color:`accent`,children:`Loading UAT Dataset...`}),(0,B.jsx)(U,{color:`gray.fg`,children:`Parsing hierarchical astronomy taxonomy data`})]})})}),n2e=({error:e})=>(0,B.jsx)(gg,{children:(0,B.jsx)(V,{minH:`50vh`,display:`flex`,alignItems:`center`,justifyContent:`center`,children:(0,B.jsxs)(Gh,{gap:4,children:[(0,B.jsx)(Ll,{color:`red.500`,children:`Error Loading Data`}),(0,B.jsx)(U,{color:`gray.fg`,children:e})]})})});function r2e(){let[e,t]=(0,_.useState)(void 0),{data:n,loading:r,error:i}=G0e(),{colorMode:a}=lg(),o=(0,_.useMemo)(()=>({...K0e,colorMode:a}),[a]),s=(0,_.useCallback)(e=>{t(t=>{if(t?.id!==e?.id)return e})},[]),c=(0,_.useMemo)(()=>e?q0e(e):[],[e]),l=(0,_.useMemo)(()=>J0e(n),[n]);return r?(0,B.jsx)(t2e,{}):i?(0,B.jsx)(n2e,{error:i}):(0,B.jsx)(gg,{children:(0,B.jsxs)(IY,{leftWidth:`3fr`,rightWidth:`2fr`,px:8,gap:6,maxW:`100em`,children:[(0,B.jsx)(IY.LeftPanel,{h:{base:`68vh`,md:`calc(100vh - 200px)`},children:n&&(0,B.jsx)(U0e,{data:n,onNodeSelect:s,options:o})}),(0,B.jsx)(IY.RightPanel,{py:2,children:(0,B.jsxs)(_h,{gap:6,maxW:`72ch`,px:{base:0,md:10},children:[(0,B.jsx)(Y0e,{}),e?(0,B.jsx)(X0e,{selectedNode:e,descendants:c}):(0,B.jsx)(Z0e,{topLevelNodes:l}),(0,B.jsx)(Q0e,{}),(0,B.jsx)($0e,{}),(0,B.jsx)(e2e,{})]})})]})})}var n0=[{key:`initializing`,label:`Initializing DuckDB`},{key:`loading-parquet`,label:`Loading parquet file`},{key:`creating-tables`,label:`Creating tables`},{key:`updating-tables`,label:`Updating tables`},{key:`ready`,label:`Ready`}];function r0({state:e,title:t}){if(e.status===`ready`)return null;let n=n0.findIndex(t=>t.key===e.status.split(`-`)[0]||t.key===e.status),r=(e.status===`creating-tables`||e.status===`updating-tables`)&&`query`in e?e.query:null;return(0,B.jsxs)(V,{p:6,borderRadius:`lg`,maxW:`600px`,mx:`auto`,mt:10,children:[(0,B.jsx)(U,{fontSize:`lg`,fontWeight:`bold`,mb:4,children:t}),(0,B.jsx)(Gh,{align:`stretch`,gap:2,children:n0.map((t,r)=>(0,B.jsxs)(Ch,{gap:4,children:[r<n?(0,B.jsx)(dh,{colorPalette:`green`,size:`sm`,children:`â`}):r===n?(0,B.jsx)(fh,{size:`sm`}):(0,B.jsx)(dh,{colorPalette:`gray`,size:`sm`,children:`â`}),(0,B.jsxs)(U,{fontSize:`sm`,color:r<=n?`inherit`:`fg.muted`,fontWeight:r===n?`bold`:`normal`,children:[t.label,e.status===`creating-tables`&&r===n&&(0,B.jsxs)(U,{as:`span`,color:`blue.500`,ml:2,children:[`(`,e.table,`)`]}),e.status===`updating-tables`&&r===n&&(0,B.jsxs)(U,{as:`span`,color:`blue.500`,ml:2,children:[`(`,e.message,`)`]})]})]},t.key))}),r&&(0,B.jsx)(V,{mt:4,p:2,bg:`bg.subtle`,borderRadius:`md`,overflow:`auto`,children:(0,B.jsx)(U,{fontSize:`xs`,fontFamily:`mono`,whiteSpace:`pre-wrap`,color:`fg.muted`,children:r.trim()})}),e.status===`error`&&(0,B.jsx)(V,{mt:4,p:2,bg:`red.subtle`,borderRadius:`md`,children:(0,B.jsxs)(U,{color:`red.fg`,fontSize:`sm`,children:[`Error: `,e.message]})})]})}var i2e={mvp:{mainModule:`/assets/duckdb-mvp-C5CQ5aRn.wasm`,mainWorker:`/assets/duckdb-browser-mvp.worker-BKx4C_H5.js`},eh:{mainModule:`/assets/duckdb-eh-CAt5YSMB.wasm`,mainWorker:`/assets/duckdb-browser-eh.worker-CG8LKDAY.js`}};async function i0(){let e=await oIe(i2e),t=new Worker(e.mainWorker),n=new UFe(new PFe,t);return await n.instantiate(e.mainModule,e.pthreadWorker),n}var a0=J({status:`idle`}),o0=J(null),s0=J(null),c0=J(null),l0=J(new Set),u0=J(e=>e(a0).status===`ready`);J(e=>e(c0)!==null);var d0=J(null,async(e,t,n)=>{let r=e(l0);r.has(n.name)||(await Yj().exec(`CREATE VIEW IF NOT EXISTS ${n.name} AS ${n.sql}`),t(l0,new Set(r).add(n.name)))}),a2e=J(null,e=>{e(s0)?.update({source:null,clients:new Set})}),f0=J(null,async(e,t)=>{if(!e(o0))try{t(a0,{status:`initializing`});let e=window.innerWidth<768?5:50,n=XL({duckdb:await i0()}),r=new Xj(n,{cache:!1,preagg:{enabled:!1}});Yj(r).databaseConnector(n),t(o0,r),t(a0,{status:`loading-parquet`,message:`Loading SWE-bench traces...`});let i=`${window.location.origin}/data/swe_bench.parquet`;await r.exec(`INSTALL httpfs; LOAD httpfs;`),await r.exec(`SET threads = 1;`),await r.exec(`SET memory_limit = '4GB';`),await r.exec(`
262 CREATE TEMPORARY TABLE IF NOT EXISTS raw AS 263 SELECT * FROM read_parquet('${i}') 264 `);let a=` 265 CREATE TABLE IF NOT EXISTS trace_metrics AS 266 WITH parsed AS ( 267 SELECT 268 json_extract_string(trace, '$.trace_id') as trace_id, 269 json_extract_string(labels, '$.category') as error_category, 270 json_extract(trace, '$.spans') as spans_json 271 FROM raw 272 ) 273 SELECT 274 trace_id, 275 error_category, 276 json_array_length(spans_json) as span_count, 277 ROW_NUMBER() OVER (ORDER BY trace_id) as trace_index 278 FROM parsed 279 `;t(a0,{status:`creating-tables`,table:`trace_metrics`,query:a}),await r.exec(a);let o=` 280 CREATE TEMPORARY TABLE IF NOT EXISTS top_spans AS 281 SELECT 282 json_extract_string(trace, '$.trace_id') as trace_id, 283 UNNEST(from_json(json_extract(trace, '$.spans'), '["JSON"]')) as span_json, 284 0 as depth 285 FROM raw 286 limit ${e} 287 `;t(a0,{status:`creating-tables`,table:`top_spans`,query:o}),await r.exec(o);let s=` 288 CREATE TEMPORARY TABLE IF NOT EXISTS flattened_spans AS 289 WITH RECURSIVE flattened AS ( 290 SELECT trace_id, span_json, depth FROM top_spans 291 UNION ALL 292 SELECT 293 f.trace_id, 294 UNNEST(from_json(json_extract(f.span_json, '$.child_spans'), '["JSON"]')) as span_json, 295 f.depth + 1 296 FROM flattened f 297 WHERE json_extract(f.span_json, '$.child_spans') IS NOT NULL 298 AND json_array_length(json_extract(f.span_json, '$.child_spans')) > 0 299 AND f.depth < 3 300 ) 301 SELECT * FROM flattened 302 `;t(a0,{status:`creating-tables`,table:`flattened_spans`,query:s}),await r.exec(s);let c=` 303 CREATE TABLE IF NOT EXISTS spans AS 304 SELECT 305 trace_id, 306 json_extract_string(span_json, '$.span_id') as span_id, 307 json_extract_string(span_json, '$.parent_span_id') as parent_id, 308 json_extract_string(span_json, '$.span_name') as name, 309 json_extract_string(span_json, '$.span_attributes') as span_attributes, 310 COALESCE( 311 json_extract_string(span_json, '$."span_attributes"."openinference.span.kind"'), 312 'INTERNAL' 313 ) as type, 314 json_extract_string(span_json, '$.timestamp') as timestamp_str, 315 json_extract_string(span_json, '$.duration') as duration_str, 316 COALESCE( 317 TRY_CAST(json_extract(span_json, '$."span_attributes"."llm.token_count.total"') AS INTEGER), 318 0 319 ) as tokens, 320 depth, 321 ROW_NUMBER() OVER (PARTITION BY trace_id ORDER BY json_extract_string(span_json, '$.timestamp')) as span_index 322 FROM flattened_spans 323 `;t(a0,{status:`updating-tables`,message:`extracting values from spans`,query:c}),await r.exec(c);let l=` 324 UPDATE spans SET duration = 325 CASE 326 WHEN duration_str IS NULL OR duration_str = '' THEN 0.0 327 WHEN duration_str LIKE 'PT%' THEN 328 COALESCE(TRY_CAST(regexp_extract(duration_str, 'PT(?:\\d+H)?(?:\\d+M)?([\\d.]+)S', 1) AS DOUBLE), 0.0) + 329 COALESCE(TRY_CAST(regexp_extract(duration_str, 'PT(?:\\d+H)?(\\d+)M', 1) AS DOUBLE) * 60, 0.0) + 330 COALESCE(TRY_CAST(regexp_extract(duration_str, 'PT(\\d+)H', 1) AS DOUBLE) * 3600, 0.0) 331 ELSE TRY_CAST(duration_str AS DOUBLE) / 1000000.0 332 END 333 `;t(a0,{status:`updating-tables`,message:`adding duration column to spans`,query:l}),await r.exec(`ALTER TABLE spans ADD COLUMN IF NOT EXISTS duration DOUBLE`),await r.exec(l);let u=` 334 WITH trace_starts AS ( 335 SELECT trace_id, MIN(epoch(TRY_CAST(timestamp_str AS TIMESTAMP))) as min_start 336 FROM spans GROUP BY trace_id 337 ) 338 UPDATE spans SET start_time = 339 epoch(TRY_CAST(timestamp_str AS TIMESTAMP)) - 340 (SELECT min_start FROM trace_starts WHERE trace_starts.trace_id = spans.trace_id) 341 `;t(a0,{status:`updating-tables`,message:`adding start_time column to spans`,query:u}),await r.exec(`ALTER TABLE spans ADD COLUMN IF NOT EXISTS start_time DOUBLE`),await r.exec(u);let d=` 342 CREATE OR REPLACE TABLE trace_metrics AS 343 SELECT 344 t.trace_id, 345 t.error_category, 346 COALESCE(s.span_count, 0) as span_count, 347 t.trace_index, 348 COALESCE(s.total_duration, 0) as total_duration, 349 COALESCE(s.llm_count, 0) as llm_count, 350 COALESCE(s.total_tokens, 0) as total_tokens 351 FROM trace_metrics t 352 LEFT JOIN ( 353 SELECT 354 trace_id, 355 COUNT(*) as span_count, 356 SUM(duration) as total_duration, 357 COUNT(*) FILTER (WHERE type = 'LLM') as llm_count, 358 SUM(tokens) as total_tokens 359 FROM spans GROUP BY trace_id 360 ) s ON t.trace_id = s.trace_id 361 WHERE total_duration > 0 362 `;t(a0,{status:`updating-tables`,message:`updating trace_metrics`,query:d}),await r.exec(d),t(a0,{status:`updating-tables`,message:`dropping temporary tables`}),await r.exec(`DROP TABLE IF EXISTS raw`),await r.exec(`DROP TABLE IF EXISTS top_spans`),await r.exec(`DROP TABLE IF EXISTS flattened_spans`);let f=rM.single();f.addEventListener(`value`,()=>{let e=f.clauses;if(e&&e.length>0&&e[0].value){let n=e[0].value;t(c0,Array.isArray(n)?n[0]:n)}else t(c0,null)}),t(s0,f),t(a0,{status:`ready`})}catch(e){console.error(`Failed to initialize SWE-Bench context:`,e),t(a0,{status:`error`,message:e instanceof Error?e.message:`Unknown error`})}});f0.onMount=e=>{e()};
362function p0({title:e,subtitle:t,setup:n,build:r,dependencies:i=[],isReady:a,loadingText:o=`Loading...`,gridArea:s,containerCss:c}){let l=(0,_.useRef)(null),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)({width:0,height:0});(0,_.useEffect)(()=>{let e=l.current;if(!e)return;let t=new ResizeObserver(e=>{let t=e[0];if(t){let{width:e,height:n}=t.contentRect;p(t=>t.width!==e||t.height!==n?{width:1.5*e,height:1.5*n}:t)}});return t.observe(e),()=>t.disconnect()},[]);let m=(0,_.useCallback)(async()=>{if(!(!a||!l.current)&&!(f.width===0||f.height===0)){d(!0);try{let e=r(n?await n():void 0,f);e&&l.current&&(l.current.innerHTML=``,l.current.appendChild(e))}catch(t){console.error(`Failed to render chart "${e}":`,t)}finally{d(!1)}}},[a,n,r,e,f]);return(0,_.useEffect)(()=>{m()},[m,...i]),(0,_.useEffect)(()=>()=>{l.current&&(l.current.innerHTML=``)},[]),a?(0,B.jsxs)(V,{gridArea:s,bg:`bg`,borderRadius:`lg`,p:2,position:`relative`,h:`100%`,display:`flex`,flexDirection:`column`,border:`1px solid`,borderColor:`gray.subtle`,overflow:`hidden`,children:[(0,B.jsxs)(U,{fontSize:`xs`,fontWeight:`semibold`,color:`accentSubtle`,mb:1,children:[e,t&&(0,B.jsxs)(U,{as:`span`,fontWeight:`normal`,color:`fg.muted`,ml:1,children:[`⢠`,t]}),u&&(0,B.jsx)(fh,{size:`xs`,ml:2})]}),(0,B.jsx)(V,{ref:l,flex:`1`,borderRadius:`md`,h:`100%`,minH:{base:`350px`,md:`100px`},css:c,overflow:`auto`})]}):(0,B.jsx)(V,{gridArea:s,bg:`bg.subtle`,borderRadius:`lg`,p:4,children:(0,B.jsx)(U,{fontSize:`sm`,color:`fg.muted`,children:o})})}function o2e(){let e=Y(u0),t=Y(s0),n=Y(c0),r=(0,_.useCallback)((e,{width:n,height:r})=>MY(CY(bY(`spans`,{filterBy:t}),{x:`type`,y:oA(`duration`),fill:`type`,tip:!0}),fY(`Span Type`),_Y(`Duration (s)`),yY(`Span Type`),oY(50),sY(10),cY(25),lY(40),iY(n),aY(r)),[t]);return(0,B.jsx)(p0,{title:`Duration by Span Type`,subtitle:n?`(filtered)`:`(all traces)`,build:r,dependencies:[t],isReady:e&&!!t})}function s2e(){let e=Y(u0),t=Y(s0),n=Y(c0),r=sX(d0),i=(0,_.useCallback)(async()=>{await r({name:`spans_llm_tokens`,sql:` 363 SELECT *, SUBSTRING(trace_id, 1, 8) as trace_label 364 FROM spans WHERE type = 'LLM' AND tokens > 0 AND start_time IS NOT NULL 365 `})},[r]),a=(0,_.useCallback)((e,{width:n,height:r})=>MY(VGe(bY(`spans_llm_tokens`,{filterBy:t}),{x:`start_time`,y:`tokens`,strokeWidth:1.5,curve:`monotone-x`,z:`trace_id`}),TY(bY(`spans_llm_tokens`,{filterBy:t}),{x:`start_time`,y:`tokens`,z:`trace_id`,r:3,tip:!0}),fY(`Time (s)`),_Y(`Tokens`),oY(80),sY(10),cY(25),lY(40),iY(n),aY(r)),[t]);return(0,B.jsx)(p0,{title:`LLM Tokens`,subtitle:n?`(filtered)`:`(by trace)`,setup:i,build:a,dependencies:[t,n],isReady:e&&!!t})}function c2e(){let e=Y(u0),t=Y(s0),n=Y(c0),r=sX(d0),i=(0,_.useCallback)(async()=>{await r({name:`spans_duration_time`,sql:` 366 SELECT * FROM spans WHERE depth > 0 AND start_time IS NOT NULL AND duration > 0 367 `})},[r]),a=(0,_.useCallback)((e,{width:n,height:r})=>MY(TY(bY(`spans_duration_time`,{filterBy:t}),{x:`start_time`,y:`duration`,fill:`type`,r:3,tip:{format:{x:e=>`${e.toFixed(2)}s`,y:e=>`${e.toFixed(3)}s`,fill:!0,trace_id:!0,span_id:!0,name:!0}},z:`trace_id`}),jY({as:t}),OY({by:t}),fY(`Time (s)`),_Y(`Duration (s)`),yY(`Span Type`),pY(`log`),oY(50),sY(10),cY(25),lY(40),iY(n),aY(r)),[t]);return(0,B.jsx)(p0,{title:`Span Duration Over Time`,subtitle:n?`(filtered)`:`(all traces)`,setup:i,build:a,dependencies:[t,n],isReady:e&&!!t})}function l2e(){let e=Y(u0),t=Y(c0),n=sX(d0),[r,i]=(0,_.useState)(0),[a,o]=(0,_.useState)(null),[s,c]=(0,_.useState)(null),l=(0,_.useMemo)(()=>rM.single(),[]);(0,_.useEffect)(()=>{c(null)},[t]),(0,_.useEffect)(()=>{let e=async()=>{let e=l?.clauses;if(!e?.length||e[0].value===void 0||!a){c(null);return}try{let t=e[0].value,n=await Yj().query(` 368 SELECT * FROM ${a} WHERE start_time = ${t[0]} LIMIT 1 369 `);if(n?.numRows>0){let e=n.get(0),t={};for(let r of n.schema.fields)t[r.name]=e[r.name];c(t)}}catch(e){console.error(`Failed to query selected span:`,e)}};return l.addEventListener(`value`,e),()=>l.removeEventListener(`value`,e)},[l,a]);let u=(0,_.useCallback)(async()=>{let e=Yj(),r=`start_time IS NOT NULL AND duration > 0`;if(t){let a=await e.query(` 370 SELECT COUNT(*) as cnt FROM spans WHERE trace_id = '${t}' AND ${r} 371 `),s=Number(a?.get?.(0)?.cnt||0);i(s);let c=`gantt_${t.slice(0,8)}`;return await n({name:c,sql:` 372 SELECT *, start_time + duration as end_time, 373 ROW_NUMBER() OVER (ORDER BY start_time, depth) - 1 as row_index 374 FROM spans WHERE trace_id = '${t}' AND ${r} 375 `}),o(c),{viewName:c,spanCount:s}}else{let t=await e.query(` 376 SELECT COUNT(*) as total_spans FROM spans WHERE ${r} 377 `),a=Number(t?.get?.(0)?.total_spans||0);return i(a),await n({name:`gantt_agg`,sql:` 378 SELECT *, start_time + duration as end_time, 379 ROW_NUMBER() OVER (PARTITION BY trace_id ORDER BY start_time) - 1 as row_index 380 FROM spans WHERE ${r} 381 `}),o(`gantt_agg`),{viewName:`gantt_agg`,spanCount:a}}},[t,n]),d=(0,_.useCallback)(({viewName:e,spanCount:t},{width:n,height:r})=>{let i=e===`gantt_agg`,a=Math.max(r,Math.min(t*4,500));
381return MY(UGe(bY(e),{x1:`start_time`,x2:`end_time`,y:`row_index`,fill:`type`,z:`span_id`,fillOpacity:i?.5:.9,tip:!!i}),jY({as:l}),OY({by:l}),fY(`Time (s)`),yY(`Span Type`),hY(null),oY(10),sY(10),cY(15),lY(40),iY(n),aY(a))},[l]);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(p0,{title:`Span Timeline`,subtitle:`${r.toLocaleString()} spans ${s?``:`⢠Click a span to review its content`}`,setup:u,build:d,dependencies:[t],isReady:e}),(0,B.jsx)(tD,{data:s,title:`Span Details`,onClose:()=>c(null)},t)]})}function u2e(){let e=Y(u0),t=Y(c0),[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(!0);return(0,_.useEffect)(()=>{e&&(async()=>{a(!0);try{let e=Yj(),n=t?await e.query(` 382 SELECT 1 as trace_count, span_count as total_spans, llm_count, total_tokens, total_duration 383 FROM trace_metrics WHERE trace_id = '${t}' 384 `):await e.query(` 385 SELECT 386 (SELECT COUNT(*) FROM trace_metrics) as trace_count, 387 (SELECT COUNT(*) FROM spans) as total_spans, 388 SUM(llm_count) as llm_count, 389 SUM(total_tokens) as total_tokens, 390 AVG(total_duration) as avg_duration, 391 SUM(total_duration) as total_duration 392 FROM trace_metrics 393 `);if(n?.numRows>0){let e=n.get(0);r({traceCount:Number(e.trace_count)||0,totalSpans:Number(e.total_spans)||0,llmCalls:Number(e.llm_count)||0,totalTokens:Number(e.total_tokens)||0,avgDuration:Number(e.avg_duration||e.total_duration)||0,totalDuration:Number(e.total_duration)||0})}}catch(e){console.error(`Failed to fetch stats:`,e)}finally{a(!1)}})()},[e,t]),!e||i||!n?(0,B.jsx)(V,{p:4,children:(0,B.jsx)(U,{fontSize:`sm`,color:`gray.500`,children:`Loading stats...`})}):(0,B.jsx)(V,{py:2,children:(0,B.jsx)(xh,{gap:10,wrap:`wrap`,children:[{label:`Traces`,value:n.traceCount},{label:`Spans`,value:n.totalSpans.toLocaleString()},{label:`LLM Calls`,value:n.llmCalls.toLocaleString()},{label:`Tokens`,value:n.totalTokens.toLocaleString()},{label:t?`Duration`:`Avg Duration`,value:`${n.avgDuration.toFixed(1)}s`},{label:`Total Duration`,value:`${n.totalDuration.toFixed(1)}s`}].map((e,t)=>(0,B.jsx)(xh,{align:`center`,children:(0,B.jsxs)(Bh,{size:`sm`,children:[(0,B.jsx)(Vh,{fontSize:`xs`,fontWeight:`medium`,color:`accentSubtle`,children:e.label}),(0,B.jsx)(Hh,{fontSize:`md`,fontWeight:`semibold`,children:e.value})]})},t))})})}function d2e(){let e=Y(u0),t=Y(s0),n=Y(c0),r=sX(a2e),i=sX(d0),a=(0,_.useCallback)(async()=>{await i({name:`trace_selector_view`,sql:` 394 SELECT *, 395 SUBSTRING(trace_id, 1, 10) as trace_label, 396 ROUND(total_duration, 1) || 's' as duration_label 397 FROM trace_metrics ORDER BY total_duration DESC 398 `})},[i]),o=(0,_.useCallback)((e,{width:n,height:r})=>MY(WGe(bY(`trace_selector_view`),{x:`total_duration`,y:`trace_id`,text:`duration_label`,dx:4,fontSize:9,textAnchor:`start`}),SY(bY(`trace_selector_view`),{x:`total_duration`,y:`trace_id`,fill:`steelblue`,sort:{y:`-x`}}),qGe({as:t,channels:[`y`]}),OY({by:t}),fY(`Duration (s)`),_Y(null),hY(null),oY(5),sY(60),cY(0),lY(50),iY(n),aY(r)),[t]);return(0,B.jsx)(p0,{title:`Traces`,subtitle:n?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(U,{as:`span`,fontSize:`xs`,children:[`Selected: `,n.slice(0,10),`...`]}),(0,B.jsx)(U,{ml:2,as:`span`,color:`blue.solid`,cursor:`pointer`,onClick:()=>r(),_hover:{textDecoration:`underline`},children:`clear`})]}):(0,B.jsx)(U,{as:`span`,color:`fg.muted`,fontSize:`xs`,children:`Pick a trace to explore`}),setup:a,build:o,dependencies:[t],isReady:e&&!!t,gridArea:`selector`})}function f2e(){Y(f0);let e=Y(a0),[t,n]=(0,_.useState)(!1);return e.status===`ready`?(0,B.jsxs)(V,{h:{base:`auto`,md:`100%`},overflow:`hidden`,display:`flex`,flexDirection:`column`,bg:`bg.muted`,pb:2,children:[(0,B.jsxs)(vh,{maxW:`85ch`,px:4,py:4,mx:`auto`,children:[(0,B.jsxs)(V,{mb:2,children:[(0,B.jsx)(Ll,{as:`h1`,size:`lg`,color:`accent`,mb:1,children:`Visualizing ML Traces from SWE-Bench`}),(0,B.jsxs)(Ch,{gap:2,alignItems:`baseline`,flexWrap:`wrap`,children:[(0,B.jsx)(U,{fontSize:`sm`,color:`fg.muted`,children:`Traces are a powerful abstraction for tracking operations across complex agentic systems.`}),(0,B.jsxs)(Xce,{children:[(0,B.jsx)(Zce,{asChild:!0,children:(0,B.jsx)(Eh,{fontSize:`sm`,color:`accent`,cursor:`pointer`,whiteSpace:`nowrap`,children:`Read more`})}),(0,B.jsxs)(mp,{children:[(0,B.jsx)(nle,{}),(0,B.jsx)(Qce,{children:(0,B.jsxs)($ce,{maxW:`600px`,children:[(0,B.jsx)(ile,{children:(0,B.jsx)(ele,{color:`accent`,children:`About the Trace Visualizations`})}),(0,B.jsx)(rle,{pb:6,children:(0,B.jsxs)(Gh,{gap:4,align:`stretch`,children:[(0,B.jsx)(U,{fontSize:`sm`,color:`gray.fg`,children:`Agentic Systems are becoming more common. From ChatGPT's Agent mode to Perplexity's Comet browser, we are entering a new era of augmented web tools. In such a world, we need structured ways to measure success of these experiences through observability, OpenTelemetry, and traces.`}),(0,B.jsx)(U,{fontSize:`sm`,color:`gray.fg`,children:`A trace starts with an origin that defines a trace ID along with an operational context. You can attach this trace ID to a "
398span" of the application (i.e., to the logs coming out the span of a code block). A collector service can stitch these spans into a trace using the common trace ID.`}),(0,B.jsxs)(U,{fontSize:`sm`,color:`gray.fg`,children:[`This page explores agent traces from a`,` `,(0,B.jsx)(Eh,{href:`https://huggingface.co/datasets/PatronusAI/TRAIL`,target:`_blank`,children:`SWE-Bench evaluation dataset`}),`, revealing performance patterns and the`,` `,(0,B.jsx)(Eh,{href:`https://arxiv.org/abs/2210.03629`,target:`_blank`,children:`ReAct`}),` `,`(Reasoning + Acting) framework and key failures faced by`,` `,(0,B.jsx)(Eh,{href:`https://www.anthropic.com/news/claude-3-7-sonnet`,target:`_blank`,children:`Claude Sonnet 3.7`}),`.`]}),(0,B.jsxs)(U,{fontSize:`sm`,color:`gray.fg`,children:[`Made with`,` `,(0,B.jsx)(Eh,{href:`https://idl.uw.edu/mosaic/`,target:`_blank`,children:`UW's Mosaic Chart library.`})]})]})}),(0,B.jsx)(tle,{})]})})]})]})]})]}),(0,B.jsx)(u2e,{})]}),(0,B.jsxs)(Fa,{templateAreas:{base:`"toggle" "selector" "charts" "details"`,md:`"selector charts" "selector details"`},templateColumns:{base:`1fr`,md:`1fr 3fr`},templateRows:{base:`auto auto 1fr 1fr`,md:`1fr 2fr`},gap:2,flex:1,px:4,overflow:`hidden`,children:[(0,B.jsx)(Sh,{area:`toggle`,display:{base:`block`,md:`none`},children:(0,B.jsx)(ph,{size:`sm`,variant:`outline`,width:`100%`,onClick:()=>n(!t),children:t?`Hide Traces`:`Select Trace`})}),(0,B.jsx)(Sh,{area:`selector`,overflow:`auto`,display:{base:t?`block`:`none`,md:`block`},children:(0,B.jsx)(d2e,{})}),(0,B.jsx)(Sh,{area:`charts`,overflow:`auto`,children:(0,B.jsxs)(Fa,{templateColumns:{base:`1fr`,sm:`1fr 1fr`},gap:2,h:`100%`,children:[(0,B.jsx)(o2e,{}),(0,B.jsx)(c2e,{})]})}),(0,B.jsx)(Sh,{area:`details`,overflow:`auto`,children:(0,B.jsxs)(Fa,{templateColumns:{base:`1fr`,sm:`1fr 1fr`},gap:2,h:`100%`,children:[(0,B.jsx)(s2e,{}),(0,B.jsx)(l2e,{})]})})]})]}):(0,B.jsx)(r0,{state:e,title:`Loading SWE-Bench Traces`})}function p2e(){return(0,B.jsx)(gg,{children:(0,B.jsx)(nX,{children:(0,B.jsx)(f2e,{})})})}var m0=J({status:`idle`}),h0=J(null),g0=J(!1),_0=J(e=>e(m0).status===`ready`),v0=` 399 CREATE OR REPLACE TABLE lensed_grid AS 400 WITH offsets AS ( 401 SELECT g.ix, g.iy, g.theta_x, g.theta_y, 402 SUM(l.e * l.e * (g.theta_x - l.cx) / NULLIF(POW(g.theta_x - l.cx, 2) + POW(g.theta_y - l.cy, 2), 0)) AS dx, 403 SUM(l.e * l.e * (g.theta_y - l.cy) / NULLIF(POW(g.theta_x - l.cx, 2) + POW(g.theta_y - l.cy, 2), 0)) AS dy 404 FROM source_grid g LEFT JOIN lenses l ON TRUE 405 GROUP BY g.ix, g.iy, g.theta_x, g.theta_y 406 ) 407 SELECT ix, iy, theta_x, theta_y, 408 theta_x - COALESCE(dx, 0) AS beta_x, 409 theta_y - COALESCE(dy, 0) AS beta_y 410 FROM offsets 411`,y0=J(null,async(e,t,n={})=>{let r=e(h0);if(r){t(g0,!0);try{n.isInitial&&t(m0,{status:`creating-tables`,table:`lensed_grid`,query:v0}),await r.exec(v0),n.isInitial&&t(m0,{status:`ready`})}catch(e){console.error(`Failed to compute lensing:`,e),t(m0,{status:`error`,message:e instanceof Error?e.message:`Unknown error`})}finally{t(g0,!1)}}}),m2e=J(null,async(e,t,n)=>{let r=e(h0);if(r){t(g0,!0);try{await r.exec(` 412 INSERT INTO lenses (lens_id, cx, cy, e) 413 SELECT COALESCE(MAX(lens_id), 0) + 1, ${n.cx}, ${n.cy}, ${n.e} FROM lenses 414 `),await t(y0)}finally{t(g0,!1)}}}),h2e=J(null,async(e,t)=>{let n=e(h0);if(n){t(g0,!0);try{await n.exec(`DELETE FROM lenses WHERE lens_id = (SELECT MAX(lens_id) FROM lenses)`),await t(y0)}finally{t(g0,!1)}}}),b0=J(null,async(e,t)=>{if(!e(h0))try{t(m0,{status:`initializing`});let e=XL({duckdb:await i0()}),n=new Xj(e,{cache:!1,preagg:{enabled:!1}});Yj(n).databaseConnector(e),t(h0,n);let r=` 415 CREATE TABLE IF NOT EXISTS source_grid AS 416 SELECT 417 x.range AS ix, 418 y.range AS iy, 419 -1.0 + 2.0 * x.range / 1999.0 AS theta_x, 420 -1.0 + 2.0 * y.range / 1999.0 AS theta_y 421 FROM range(2000) x, range(2000) y 422 `;t(m0,{status:`creating-tables`,table:`source_grid`,query:r}),await n.exec(r);let i=` 423 CREATE TABLE IF NOT EXISTS lenses ( 424 lens_id INTEGER PRIMARY KEY, 425 cx DOUBLE, 426 cy DOUBLE, 427 e DOUBLE 428 ); 429 INSERT INTO lenses VALUES 430 (1, -0.5, 0.3, 0.12), 431 (2, 0.4, 0.5, 0.08), 432 (3, -0.2, -0.4, 0.15), 433 (4, 0.6, -0.3, 0.10), 434 (5, 0.0, 0.0, 0.18), 435 (6, -0.6, -0.2, 0.07),
436 (7, 0.3, 0.2, 0.11), 437 (8, -0.1, 0.6, 0.09), 438 (9, 0.5, -0.6, 0.14), 439 (10, -0.4, 0.0, 0.06), 440 (11, 0.2, -0.5, 0.13), 441 (12, -0.3, -0.7, 0.05); 442 `;t(m0,{status:`creating-tables`,table:`lenses`,query:i}),await n.exec(i),await t(y0,{isInitial:!0})}catch(e){console.error(`Failed to initialize Gravitational Lensing context:`,e),t(m0,{status:`error`,message:e instanceof Error?e.message:`Unknown error`})}});b0.onMount=e=>{e()};function g2e(){let e=Y(_0),t=Y(g0),n=sX(m2e),r=sX(h2e),i=(0,_.useCallback)((e,{width:t,height:n})=>MY(TY(bY(`lenses`),{x:`cx`,y:`cy`,r:ej`e * 80`,fill:`orange`,tip:!0}),uY([-1,1]),mY([-1,1]),hY(null),dY(null),iY(t),aY(n),oY(0),sY(0),cY(0),lY(0)),[]);return(0,B.jsxs)(V,{bg:`bg`,borderRadius:`lg`,h:`100%`,display:`flex`,flexDirection:`column`,border:`1px solid`,borderColor:`gray.subtle`,children:[(0,B.jsx)(V,{flex:`1`,children:(0,B.jsx)(p0,{title:`Lens Editor`,build:i,dependencies:[t],isReady:e})}),(0,B.jsxs)(Gh,{gap:2,mt:2,align:`stretch`,p:2,children:[(0,B.jsxs)(Ch,{gap:2,children:[(0,B.jsx)(ph,{size:`xs`,colorPalette:`blue`,onClick:()=>{n({cx:(Math.random()-.5)*1.5,cy:(Math.random()-.5)*1.5,e:.1+Math.random()*.2})},disabled:t,flex:1,children:`Add Lens`}),(0,B.jsx)(ph,{size:`xs`,variant:`outline`,onClick:()=>r(),disabled:t,flex:1,children:`Remove Last`})]}),(0,B.jsx)(U,{fontSize:`xs`,color:`fg.muted`,textAlign:`center`,children:`Marker size indicates Einstein radius (e)`})]})]})}function _2e(){let e=Y(g0),t=Y(_0),{colorMode:n}=lg();return(0,B.jsx)(p0,{title:`Lensed Grid`,subtitle:`2000 x 2000 points`,build:(0,_.useCallback)((e,{width:t,height:r})=>{let i=eM.value(0),a=eM.value(1),o=ej`(SELECT * FROM lensed_grid WHERE ix % 10 = 0 AND iy % 10 = 0)`;return tY(DGe($J({label:`View: `,options:[{value:0,label:`Theta plane (original)`},{value:1,label:`Beta plane (lensed)`}],as:a}),kGe(10),$J({label:`Delaunay Mesh: `,options:[{value:0,label:`Hide`},{value:.2,label:`Show`}],as:i})),OGe(10),MY(GGe(bY(o),{x:ej`CASE WHEN ${a} = 1 THEN beta_x ELSE theta_x END`,y:ej`CASE WHEN ${a} = 1 THEN beta_y ELSE theta_y END`,strokeOpacity:i,strokeWidth:.5}),EY(bY(`lensed_grid`),{x:ej`CASE WHEN ${a} = 1 THEN beta_x ELSE theta_x END`,y:ej`CASE WHEN ${a} = 1 THEN beta_y ELSE theta_y END`,bandwidth:0,pixelSize:1,fill:n===`dark`?`#60a5fa`:`#2563eb`}),TY(bY(`lenses`),{x:`cx`,y:`cy`,r:ej`e * 80`,fill:`orange`,tip:!0}),uY([-1,1]),mY([-1,1]),dY(null),hY(null),MGe(1),oY(0),sY(0),cY(0),lY(0),iY(t),aY(r-60)))},[n]),dependencies:[e,n],isReady:t})}function v2e(){Y(b0);let e=Y(m0);return e.status===`ready`?(0,B.jsxs)(V,{h:{base:`auto`,md:`100%`},overflow:`hidden`,display:`flex`,flexDirection:`column`,bg:`bg.muted`,p:2,children:[(0,B.jsx)(vh,{maxW:`85ch`,py:4,mx:`auto`,children:(0,B.jsxs)(V,{mb:2,children:[(0,B.jsx)(Ll,{as:`h1`,size:`lg`,color:`accent`,mb:1,children:`Gravitational Lensing Simulation`}),(0,B.jsx)(U,{fontSize:`sm`,color:`fg.muted`,children:`Interactive visualization of gravitational lensing using the thin-lens point-mass approximation. Edit lens positions and observe the warped grid.`})]})}),(0,B.jsxs)(V,{flex:1,px:4,overflow:{base:`auto`,md:`hidden`},display:`flex`,flexDirection:{base:`column`,md:`row`},gap:4,children:[(0,B.jsx)(V,{flex:1,minW:0,display:`flex`,flexDirection:`column`,gap:4,children:(0,B.jsx)(V,{aspectRatio:{md:`4/3`},children:(0,B.jsx)(g2e,{})})}),(0,B.jsx)(V,{flex:2,minW:0,h:{base:`85vh`,md:`auto`},borderRadius:`md`,overflow:`hidden`,children:(0,B.jsx)(_2e,{})})]})]}):(0,B.jsx)(r0,{state:e,title:`Loading Gravitational Lenses`})}function y2e(){return(0,B.jsx)(gg,{children:(0,B.jsx)(nX,{children:(0,B.jsx)(v2e,{})})})}var b2e=`gaia-b9cbe033-a5bf-401e-ba85-65d6768f2444.parquet`,x0=J({status:`idle`}),S0=J(null),C0=J(null),w0=J(null),T0=J(e=>e(x0).status===`ready`),E0=J(null,async(e,t)=>{if(!e(S0))try{t(x0,{status:`initializing`});let e=XL({duckdb:await i0()}),n=new Xj(e,{cache:!1,preagg:{enabled:!1}});Yj(n).databaseConnector(e),t(S0,n);let r=`${window.location.origin}${window.location.pathname.replace(/\/$/,``)}/data/${b2e}`;t(x0,{status:`loading-parquet`,message:`Gaia star catalog`}),await n.exec(`INSTALL httpfs; LOAD httpfs;`),await n.exec(`SET threads = 1;`),await n.exec(`SET memory_limit = '4GB';`);let i=`
443 CREATE TABLE IF NOT EXISTS gaia AS 444 SELECT 445 CASE WHEN l > 180 THEN l - 360 ELSE l END AS u, 446 b AS v, 447 * 448 FROM '${r}' 449 WHERE phot_g_mean_mag IS NOT NULL 450 LIMIT 5000000`,a=` 451 CREATE OR REPLACE VIEW gaia_gal AS 452 SELECT 453 CAST(source_id AS VARCHAR) AS source_id, 454 u, v, 455 parallax, 456 phot_g_mean_mag, 457 bp_rp, 458 (1000.0 / parallax) AS r_pc, 459 cos(b*pi()/180.0) * cos(l*pi()/180.0) AS ux, 460 cos(b*pi()/180.0) * sin(l*pi()/180.0) AS uy, 461 sin(b*pi()/180.0) AS uz 462 FROM gaia 463 WHERE phot_g_mean_mag IS NOT NULL 464 AND l IS NOT NULL AND b IS NOT NULL 465 AND parallax IS NOT NULL 466 AND parallax > 0.5`;t(x0,{status:`creating-tables`,table:`gaia_gal`,query:a}),await n.exec(i),await n.exec(a),t(C0,rM.crossfilter()),t(w0,rM.single()),t(x0,{status:`ready`})}catch(e){console.error(`Failed to initialize Gaia context:`,e),t(x0,{status:`error`,message:e instanceof Error?e.message:`Unknown error loading star catalog`})}});E0.onMount=e=>{e()};function x2e(){let e=Y(C0),t=Y(T0);return(0,B.jsx)(p0,{title:`Sky Map`,subtitle:`Select a region in the sky map to explore in 3D`,build:(0,_.useCallback)((t,{width:n,height:r})=>MY(EY(bY(`gaia`,{filterBy:e}),{x:`u`,y:`v`,fill:`density`,bandwidth:0,pixelSize:1}),KGe({as:e}),LGe(`sqrt`),vY(`Cividis`),dY(null),hY(null),oY(0),sY(0),cY(0),lY(0),iY(n),aY(r)),[e]),dependencies:[e],isReady:t&&!!e})}function S2e(){let e=Y(C0),t=Y(T0);return(0,B.jsx)(p0,{title:`Distributions`,subtitle:`Select a range of values`,build:(0,_.useCallback)((t,{width:n,height:r})=>{if(!e)return null;let i=n,a=Math.floor(r/2);return tY(MY(wY(bY(`gaia`,{filterBy:e}),{x:qJ(`phot_g_mean_mag`),y:eA(),fill:`steelblue`,inset:.5}),kY({as:e}),uY(tR),gY(!0),fY(`Magnitude`),iY(i),aY(a),oY(100),lY(50),cY(30)),MY(wY(bY(`gaia`,{filterBy:e}),{x:qJ(`parallax`),y:eA(),fill:`steelblue`,inset:.5}),kY({as:e}),uY(tR),gY(!0),fY(`Parallax (mas)`),pY(`sqrt`),iY(i),aY(a),oY(100),lY(50),cY(30)))},[e]),dependencies:[e],isReady:t&&!!e})}var D0={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},O0={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},k0=1e3,A0=1001,j0=1002,M0=1003,C2e=1004,w2e=1005,N0=1006,T2e=1007,P0=1008,F0=1009,E2e=1010,D2e=1011,I0=1012,O2e=1013,L0=1014,R0=1015,z0=1016,B0=1017,V0=1018,H0=1020,k2e=35902,A2e=35899,j2e=1021,M2e=1022,U0=1023,W0=1026,G0=1027,N2e=1028,K0=1029,q0=1030,J0=1031,Y0=1033,P2e=33776,F2e=33777,I2e=33778,L2e=33779,R2e=35840,z2e=35841,B2e=35842,V2e=35843,H2e=36196,U2e=37492,W2e=37496,G2e=37488,K2e=37489,q2e=37490,J2e=37491,Y2e=37808,X2e=37809,Z2e=37810,Q2e=37811,$2e=37812,e4e=37813,t4e=37814,n4e=37815,r4e=37816,i4e=37817,a4e=37818,o4e=37819,s4e=37820,c4e=37821,l4e=36492,u4e=36494,d4e=36495,f4e=36283,p4e=36284,m4e=36285,h4e=36286,X0=2300,Z0=2301,Q0=2302,$0=2303,e2=2400,t2=2401,n2=2402,g4e=3200,r2=`srgb`,i2=`srgb-linear`,a2=`linear`,o2=`srgb`,s2=7680,c2=35044,l2=2e3;function _4e(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}function v4e(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function u2(e){return document.createElementNS(`http://www.w3.org/1999/xhtml`,e)}function y4e(){let e=u2(`canvas`);return e.style.display=`block`,e}var d2={},f2=null;function p2(...e){let t=`THREE.`+e.shift();f2?f2(`log`,t,...e):console.log(t,...e)}function m2(e){let t=e[0];if(typeof t==`string`&&t.startsWith(`TSL:`)){let t=e[1];t&&t.isStackTrace?e[0]+=` `+t.getLocation():e[1]=`Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.`}return e}function h2(...e){e=m2(e);let t=`THREE.`+e.shift();if(f2)f2(`warn`,t,...e);else{let n=e[0];n&&n.isStackTrace?console.warn(n.getError(t)):console.warn(t,...e)}}function g2(...e){e=m2(e);let t=`THREE.`+e.shift();if(f2)f2(`error`,t,...e);else{let n=e[0];n&&n.isStackTrace?console.error(n.getError(t)):console.error(t,...e)}}function _2(...e){let t=e.join(` `);t in d2||(d2[t]=!0,h2(...e))}function b4e(e,t,n){return new Promise(function(r,i){function a(){switch(e.clientWaitSync(t,e.SYNC_FLUSH_COMMANDS_BIT,0)){case e.WAIT_FAILED:i();break;case e.TIMEOUT_EXPIRED:setTimeout(a,n);break;default:r()}}setTimeout(a,n)})}var x4e={0:1,2:6,4:7,3:5,1:0,6:2,7:4,5:3},v2=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let r=n[e];if(r!==void 0){let e=r.indexOf(t);e!==-1&&r.splice(e,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let n=t[e.type];if(n!==void 0){e.target=this;let t=n.slice(0);for(let n=0,r=t.length;n<r;n++)t[n].call(this,e);e.target=null}}},y2=`00.01.02.03.04.05.06.07.08.09.0a.0b.0c.0d.0e.0f.10.11.12.13.14.15.16.17.18.19.1a.1b.1c.1d.1e.1f.20.21.22.23.24.25.26.27.28.29.2a.2b.2c.2d.2e.2f.30.31.32.33.34.35.36.37.38.39.3a.3b.3c.3d.3e.3f.40.41.42.43.44.45.46.47.48.49.4a.4b.4c.4d.4e.4f.50.51.52.53.54.55.56.57.58.59.5a.5b.5c.5d.5e.5f.60.61.62.63.64.65.66.67.68.69.6a.6b.6c.6d.6e.6f.70.71.72.73.74.75.76.77.78.79.7a.7b.7c.7d.7e.7f.80.81.82.83.84.85.86.87.88.89.8a.8b.8c.8d.8e.8f.90.91.92.93.94.95.96.97.98.99.9a.9b.9c.9d.9e.9f.a0.a1.a2.a3.a4.a5.a6.a7.a8.a9.aa.ab.ac.ad.ae.af.b0.b1.b2.b3.b4.b5.b6.b7.b8.b9.ba.bb.bc.bd.be.bf.c0.c1.c2.c3.c4.c5.c6.c7.c8.c9.ca.cb.cc.
466cd.ce.cf.d0.d1.d2.d3.d4.d5.d6.d7.d8.d9.da.db.dc.dd.de.df.e0.e1.e2.e3.e4.e5.e6.e7.e8.e9.ea.eb.ec.ed.ee.ef.f0.f1.f2.f3.f4.f5.f6.f7.f8.f9.fa.fb.fc.fd.fe.ff`.split(`.`),b2=1234567,x2=Math.PI/180,S2=180/Math.PI;function C2(){let e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0,r=Math.random()*4294967295|0;return(y2[e&255]+y2[e>>8&255]+y2[e>>16&255]+y2[e>>24&255]+`-`+y2[t&255]+y2[t>>8&255]+`-`+y2[t>>16&15|64]+y2[t>>24&255]+`-`+y2[n&63|128]+y2[n>>8&255]+`-`+y2[n>>16&255]+y2[n>>24&255]+y2[r&255]+y2[r>>8&255]+y2[r>>16&255]+y2[r>>24&255]).toLowerCase()}function w2(e,t,n){return Math.max(t,Math.min(n,e))}function T2(e,t){return(e%t+t)%t}function S4e(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)}function C4e(e,t,n){return e===t?0:(n-e)/(t-e)}function E2(e,t,n){return(1-n)*e+n*t}function w4e(e,t,n,r){return E2(e,t,1-Math.exp(-n*r))}function T4e(e,t=1){return t-Math.abs(T2(e,t*2)-t)}function E4e(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t),e*e*(3-2*e))}function D4e(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t),e*e*e*(e*(e*6-15)+10))}function O4e(e,t){return e+Math.floor(Math.random()*(t-e+1))}function k4e(e,t){return e+Math.random()*(t-e)}function A4e(e){return e*(.5-Math.random())}function j4e(e){e!==void 0&&(b2=e);let t=b2+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function M4e(e){return e*x2}function N4e(e){return e*S2}function P4e(e){return(e&e-1)==0&&e!==0}function F4e(e){return 2**Math.ceil(Math.log(e)/Math.LN2)}function I4e(e){return 2**Math.floor(Math.log(e)/Math.LN2)}function L4e(e,t,n,r,i){let a=Math.cos,o=Math.sin,s=a(n/2),c=o(n/2),l=a((t+r)/2),u=o((t+r)/2),d=a((t-r)/2),f=o((t-r)/2),p=a((r-t)/2),m=o((r-t)/2);switch(i){case`XYX`:e.set(s*u,c*d,c*f,s*l);break;case`YZY`:e.set(c*f,s*u,c*d,s*l);break;case`ZXZ`:e.set(c*d,c*f,s*u,s*l);break;case`XZX`:e.set(s*u,c*m,c*p,s*l);break;case`YXY`:e.set(c*p,s*u,c*m,s*l);break;case`ZYZ`:e.set(c*m,c*p,s*u,s*l);break;default:h2(`MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: `+i)}}function D2(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw Error(`Invalid component type.`)}}function O2(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(e*4294967295);case Uint16Array:return Math.round(e*65535);case Uint8Array:return Math.round(e*255);case Int32Array:return Math.round(e*2147483647);case Int16Array:return Math.round(e*32767);case Int8Array:return Math.round(e*127);default:throw Error(`Invalid component type.`)}}var R4e={DEG2RAD:x2,RAD2DEG:S2,generateUUID:C2,clamp:w2,euclideanModulo:T2,mapLinear:S4e,inverseLerp:C4e,lerp:E2,damp:w4e,pingpong:T4e,smoothstep:E4e,smootherstep:D4e,randInt:O4e,randFloat:k4e,randFloatSpread:A4e,seededRandom:j4e,degToRad:M4e,radToDeg:N4e,isPowerOfTwo:P4e,ceilPowerOfTwo:F4e,floorPowerOfTwo:I4e,setQuaternionFromProperEuler:L4e,normalize:O2,denormalize:D2},k2=class e{static{e.prototype.isVector2=!0}constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw Error(`index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw Error(`index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}
vendor: 5,077 bytes, line 466
466applyMatrix3(e){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=w2(this.x,e.x,t.x),this.y=w2(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=w2(this.x,e,t),this.y=w2(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(w2(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(w2(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},A2=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,i,a,o){let s=n[r+0],c=n[r+1],l=n[r+2],u=n[r+3],d=i[a+0],f=i[a+1],p=i[a+2],m=i[a+3];if(u!==m||s!==d||c!==f||l!==p){let e=s*d+c*f+l*p+u*m;e<0&&(d=-d,f=-f,p=-p,m=-m,e=-e);let t=1-o;if(e<.9995){let n=Math.acos(e),r=Math.sin(n);t=Math.sin(t*n)/r,o=Math.sin(o*n)/r,s=s*t+d*o,c=c*t+f*o,l=l*t+p*o,u=u*t+m*o}else{s=s*t+d*o,c=c*t+f*o,l=l*t+p*o,u=u*t+m*o;let e=1/Math.sqrt(s*s+c*c+l*l+u*u);s*=e,c*=e,l*=e,u*=e}}e[t]=s,e[t+1]=c,e[t+2]=l,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,a){let o=n[r],s=n[r+1],c=n[r+2],l=n[r+3],u=i[a],d=i[a+1],f=i[a+2],p=i[a+3];return e[t]=o*p+l*u+s*f-c*d,e[t+1]=s*p+l*d+c*u-o*f,e[t+2]=c*p+l*f+o*d-s*u,e[t+3]=l*p-o*u-s*d-c*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let n=e._x,r=e._y,i=e._z,a=e._order,o=Math.cos,s=Math.sin,c=o(n/2),l=o(r/2),u=o(i/2),d=s(n/2),f=s(r/2),p=s(i/2);switch(a){case`XYZ`:this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case`YXZ`:this._x=d*l*u+c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case`ZXY`:this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u-d*f*p;break;case`ZYX`:this._x=d*l*u-c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u+d*f*p;break;case`YZX`:this._x=d*l*u+c*f*p,this._y=c*f*u+d*l*p,this._z=c*l*p-d*f*u,this._w=c*l*u-d*f*p;break;case`XZY`:this._x=d*l*u-c*f*p,this._y=c*f*u-d*l*p,this._z=c*l*p+d*f*u,this._w=c*l*u+d*f*p;break;default:h2(`Quaternion: .setFromEuler() encountered an unknown order: `+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],o=t[5],s=t[9],c=t[2],l=t[6],u=t[10],d=n+o+u;if(d>0){let e=.5/Math.sqrt(d+1);this._w=.25/e,this._x=(l-s)*e,this._y=(i-c)*e,this._z=(a-r)*e}else if(n>o&&n>u){let e=2*Math.sqrt(1+n-o-u);this._w=(l-s)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+c)/e}else if(o>u){let e=2*Math.sqrt(1+o-n-u);this._w=(i-c)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(s+l)/e}else{let e=2*Math.sqrt(1+u-n-o);this._w=(a-r)/e,this._x=(i+c)/e,this._y=(s+l)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>
vendor: 4,445 bytes, line 466
466Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(w2(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x*=e,this._y*=e,this._z*=e,this._w*=e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,c=t._z,l=t._w;return this._x=n*l+a*o+r*c-i*s,this._y=r*l+a*s+i*o-n*c,this._z=i*l+a*c+n*s-r*o,this._w=a*l-n*o-r*s-i*c,this._onChangeCallback(),this}slerp(e,t){let n=e._x,r=e._y,i=e._z,a=e._w,o=this.dot(e);o<0&&(n=-n,r=-r,i=-i,a=-a,o=-o);let s=1-t;if(o<.9995){let e=Math.acos(o),c=Math.sin(e);s=Math.sin(s*e)/c,t=Math.sin(t*e)/c,this._x=this._x*s+n*t,this._y=this._y*s+r*t,this._z=this._z*s+i*t,this._w=this._w*s+a*t,this._onChangeCallback()}else this._x=this._x*s+n*t,this._y=this._y*s+r*t,this._z=this._z*s+i*t,this._w=this._w*s+a*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),i=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),i*Math.sin(t),i*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},X=class e{static{e.prototype.isVector3=!0}constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw Error(`index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error(`index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(z4e.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(z4e.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}
vendor: 4,446 bytes, line 466
466applyQuaternion(e){let t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,c=2*(a*r-o*n),l=2*(o*t-i*r),u=2*(i*n-a*t);return this.x=t+s*c+a*u-o*l,this.y=n+s*l+o*c-i*u,this.z=r+s*u+i*l-a*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=w2(this.x,e.x,t.x),this.y=w2(this.y,e.y,t.y),this.z=w2(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=w2(this.x,e,t),this.y=w2(this.y,e,t),this.z=w2(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(w2(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return j2.copy(this).projectOnVector(e),this.sub(j2)}reflect(e){return this.sub(j2.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(w2(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}
vendor: 6,427 bytes, line 466
466,j2=new X,z4e=new A2,M2=class e{static{e.prototype.isMatrix3=!0}constructor(e,t,n,r,i,a,o,s,c){this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,r,i,a,o,s,c)}set(e,t,n,r,i,a,o,s,c){let l=this.elements;return l[0]=e,l[1]=r,l[2]=o,l[3]=t,l[4]=i,l[5]=s,l[6]=n,l[7]=a,l[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[3],s=n[6],c=n[1],l=n[4],u=n[7],d=n[2],f=n[5],p=n[8],m=r[0],h=r[3],g=r[6],_=r[1],v=r[4],y=r[7],b=r[2],x=r[5],S=r[8];return i[0]=a*m+o*_+s*b,i[3]=a*h+o*v+s*x,i[6]=a*g+o*y+s*S,i[1]=c*m+l*_+u*b,i[4]=c*h+l*v+u*x,i[7]=c*g+l*y+u*S,i[2]=d*m+f*_+p*b,i[5]=d*h+f*v+p*x,i[8]=d*g+f*y+p*S,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8];return t*a*l-t*o*c-n*i*l+n*o*s+r*i*c-r*a*s}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=l*a-o*c,d=o*s-l*i,f=c*i-a*s,p=t*u+n*d+r*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let m=1/p;return e[0]=u*m,e[1]=(r*c-l*n)*m,e[2]=(o*n-r*a)*m,e[3]=d*m,e[4]=(l*t-r*s)*m,e[5]=(r*i-o*t)*m,e[6]=f*m,e[7]=(n*s-c*t)*m,e[8]=(a*t-n*i)*m,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,a,o){let s=Math.cos(i),c=Math.sin(i);return this.set(n*s,n*c,-n*(s*a+c*o)+a+e,-r*c,r*s,-r*(-c*a+s*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(N2.makeScale(e,t)),this}rotate(e){return this.premultiply(N2.makeRotation(-e)),this}translate(e,t){return this.premultiply(N2.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}},N2=new M2,B4e=new M2().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),V4e=new M2().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function H4e(){let e={enabled:!0,workingColorSpace:i2,spaces:{},convert:function(e,t,n){return this.enabled===!1||t===n||!t||!n?e:(this.spaces[t].transfer===`srgb`&&(e.r=F2(e.r),e.g=F2(e.g),e.b=F2(e.b)),this.spaces[t].primaries!==this.spaces[n].primaries&&(e.applyMatrix3(this.spaces[t].toXYZ),e.applyMatrix3(this.spaces[n].fromXYZ)),this.spaces[n].transfer===`srgb`&&(e.r=I2(e.r),e.g=I2(e.g),e.b=I2(e.b)),e)},workingToColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},colorSpaceToWorking:function(e,t){return this.convert(e,t,this.workingColorSpace)},getPrimaries:function(e){return this.spaces[e].primaries},getTransfer:function(e){return e===``?a2:this.spaces[e].transfer},getToneMappingMode:function(e){return this.spaces[e].outputColorSpaceConfig.toneMappingMode||`standard`},getLuminanceCoefficients:function(e,t=this.workingColorSpace){return e.fromArray(this.spaces[t].luminanceCoefficients)},define:function(e){Object.assign(this.spaces,e)},_getMatrix:function(e,t,n){return e.copy(this.spaces[t].toXYZ).multiply(this.spaces[n].fromXYZ)},_getDrawingBufferColorSpace:function(e){return this.spaces[e].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(e=this.workingColorSpace){return this.spaces[e].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(t,n){return _2(`ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace().`),e.workingToColorSpace(t,n)},toWorkingColorSpace:function(t,n){return _2(`ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking().`),e.colorSpaceToWorking(t,n)}},t=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],r=[.3127,.329];return e.define({[i2]:{primaries:t,whitePoint:r,transfer:a2,toXYZ:B4e,fromXYZ:V4e,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:r2},outputColorSpaceConfig:{drawingBufferColorSpace:r2}},[r2]:{primaries:t,whitePoint:r,transfer:o2,toXYZ:B4e,fromXYZ:V4e,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:r2}}}),e}var P2=H4e();function F2(e){return e<.04045?e*.0773993808:(e*.9478672986+.0521327014)**2.4}function I2(e){return e<.0031308?e*12.92:1.055*e**.41666-.055}var L2,U4e=class{static getDataURL(e,t=`image/png`){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>`u`)return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{L2===void 0&&(L2=u2(`canvas`)),L2.width=e.width,L2.height=e.height;let t=L2.getContext(`2d`);e instanceof ImageData?t.putImageData(e,0,0):t.drawImage(e,0,0,e.width,e.height),n=L2}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&e instanceof ImageBitmap){let t=u2(`canvas`);t.width=e.width,t.height=e.height;let n=t.getContext(`2d`);n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e<i.length;e++)i[e]=F2(i[e]/255)*255;return n.putImageData(r,0,0),t}else if(e.data){let t=e.data.slice(0);for(let e=0;e<t.length;e++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[e]=Math.floor(F2(t[e]/255
vendor: 4,505 bytes, line 466
466)*255):t[e]=F2(t[e]);return{data:t,width:e.width,height:e.height}}else return h2(`ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.`),e}},W4e=0,R2=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:W4e++}),this.uuid=C2(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){let t=this.data;return typeof HTMLVideoElement<`u`&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<`u`&&t instanceof VideoFrame?e.set(t.displayWidth,t.displayHeight,0):t===null?e.set(0,0,0):e.set(t.width,t.height,t.depth||0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){let t=e===void 0||typeof e==`string`;if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];let n={uuid:this.uuid,url:``},r=this.data;if(r!==null){let e;if(Array.isArray(r)){e=[];for(let t=0,n=r.length;t<n;t++)r[t].isDataTexture?e.push(z2(r[t].image)):e.push(z2(r[t]))}else e=z2(r);n.url=e}return t||(e.images[this.uuid]=n),n}};function z2(e){return typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&e instanceof ImageBitmap?U4e.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(h2(`Texture: Unable to serialize Texture.`),{})}var G4e=0,B2=new X,V2=class e extends v2{constructor(t=e.DEFAULT_IMAGE,n=e.DEFAULT_MAPPING,r=A0,i=A0,a=N0,o=P0,s=U0,c=F0,l=e.DEFAULT_ANISOTROPY,u=``){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:G4e++}),this.uuid=C2(),this.name=``,this.source=new R2(t),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=i,this.magFilter=a,this.minFilter=o,this.anisotropy=l,this.format=s,this.internalFormat=null,this.type=c,this.offset=new k2(0,0),this.repeat=new k2(1,1),this.center=new k2(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new M2,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0,this.normalized=!1}get width(){return this.source.getSize(B2).x}get height(){return this.source.getSize(B2).y}get depth(){return this.source.getSize(B2).z}get image(){return this.source.data}set image(e){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.normalized=e.normalized,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(let t in e){let n=e[t];if(n===void 0){h2(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){h2(`Texture.setValues(): property '${t}' does not exist.`);continue}r&&n&&r.isVector2&&n.isVector2||r&&n&&r.isVector3&&n.isVector3||r&&n&&r.isMatrix3&&n.isMatrix3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e==`string`;if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];let n={metadata:{version:4.7,type:`Texture`,generator:`Texture.toJSON`},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.t
vendor: 4,924 bytes, line 466
466ype,normalized:this.normalized,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:`dispose`})}transformUv(e){if(this.mapping!==300)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case k0:e.x-=Math.floor(e.x);break;case A0:e.x=e.x<0?0:1;break;case j0:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x-=Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case k0:e.y-=Math.floor(e.y);break;case A0:e.y=e.y<0?0:1;break;case j0:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y-=Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}};V2.DEFAULT_IMAGE=null,V2.DEFAULT_MAPPING=300,V2.DEFAULT_ANISOTROPY=1;var H2=class e{static{e.prototype.isVector4=!0}constructor(e=0,t=0,n=0,r=1){this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw Error(`index is out of range: `+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error(`index is out of range: `+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w===void 0?1:e.w,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i,a=.01,o=.1,s=e.elements,c=s[0],l=s[4],u=s[8],d=s[1],f=s[5],p=s[9],m=s[2],h=s[6],g=s[10];if(Math.abs(l-d)<a&&Math.abs(u-m)<a&&Math.abs(p-h)<a){if(Math.abs(l+d)<o&&Math.abs(u+m)<o&&Math.abs(p+h)<o&&Math.abs(c+f+g-3)<o)return this.set(1,0,0,0),this;t=Math.PI;let e=(c+1)/2,s=(f+1)/2,_=(g+1)/2,v=(l+d)/4,y=(u+m)/4,b=(p+h)/4;return e>s&&e>_?e<a?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=v/n,i=y/n):s>_?s<a?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(s),n=v/r,i=b/r):_<a?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(_),n=y/i,r=b/i),this.set(n,r,i,t),this}let _=Math.sqrt((h-p)*(h-p)+(u-m)*(u-m)+(d-l)*(d-l));return Math.abs(_)<.001&&(_=1),this.x=(h-p)/_,this.y=(u-m)/_,this.z=(d-l)/_,this.w=Math.acos((c+f+g-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=w2(this.x,e.x,t.x),this.y=w2(this.y,e.y,t.y),this.z=w2(this.z,e.z,t.z),this.w=w2(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=w2(this.x,e,t),this.y=w2(this.y,e,t),this.z=w2(this.z,e,t),this.w=w2(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(w2(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}
vendor: 13,126 bytes, line 466
466round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},K4e=class extends v2{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:N0,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new H2(0,0,e,t),this.scissorTest=!1,this.viewport=new H2(0,0,e,t),this.textures=[];let r=new V2({width:e,height:t,depth:n.depth}),i=n.count;for(let e=0;e<i;e++)this.textures[e]=r.clone(),this.textures[e].isRenderTargetTexture=!0,this.textures[e].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){let t={minFilter:N0,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let e=0;e<this.textures.length;e++)this.textures[e].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,i=this.textures.length;r<i;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=n,this.textures[r].isData3DTexture!==!0&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let n=Object.assign({},e.textures[t].image);this.textures[t].source=new R2(n)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this.multiview=e.multiview,this}dispose(){this.dispatchEvent({type:`dispose`})}},U2=class extends K4e{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},q4e=class extends V2{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=M0,this.minFilter=M0,this.wrapR=A0,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}},J4e=class extends V2{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=M0,this.minFilter=M0,this.wrapR=A0,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}},W2=class e{static{e.prototype.isMatrix4=!0}constructor(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h)}set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){let g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=a,g[9]=o,g[13]=s,g[2]=c,g[6]=l,g[10]=u,g[14]=d,g[3]=f,g[7]=p,g[11]=m,g[15]=h,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new e().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this)}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();let t=this.elements,n=e.elements,r=1/G2.setFromMatrixColumn(e,0).length(),i=1/G2.setFromMatrixColumn(e,1).length(),a=1/G2.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),o=Math.sin(n),s=Math.cos(r),c=Math.sin(r),l=Math.cos(i),u=Math.sin(i);if(e.order===`XYZ`){let e=a*l,n=a*u,r=o*l,i=o*u;t[0]=s*l,t[4]=-s*u,t[8]=c,t[1]=n+r*c,t[5]=e-i*c,t[9]=-o*s,t[2]=i-e*c,t[6]=r+n*c,t[10]=a*s}else if(e.order===`YXZ`){let e=s*l,n=s*u,r=c*l,i=c*u;t[0]=e+i*o,t[4]=r*o-n,t[8]=a*c,t[1]=a*u,t[5]=a*l,t[9]=-o,t[2]=n*o-r,t[6]=i+e*o,t[10]=a*s}else if(e.order===`ZXY`){let e=s*l,n=s*u,r=c*l,i=c*u;t[0]=e-i*o,t[4]=-a*u,t[8]=r+n*o,t[1]=n+r*o,t[5]=a*l,t[9]=i-e*o,t[2]=-a*c,t[6]=o,t[10]=a*s}else if(e.order===`ZYX`){let e=a*l,n=a*u,r=o*l,i=o*u;t[0]=s*l,t[4]=r*c-n,t[8]=e*c+i,t[1]=s*u,t[5]=i*c+e,t[9]=n*c-r,t[2]=-c,t[6]=o*s,t[10]=a*s}else if(e.order===`YZX`){let e=a*s,n=a*c,r=o*s,i=o*c;t[0]=s*l,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=a*l,t[9]=-o*l,t[2]=-c*l,t[6]=n*u+r,t[10]=e-i*u}else if(e.order===`XZY`){let e=a*s,n=a*c,r=o*s,i=o*c;t[0]=s*l,t[4]=-u,t[8]=c*l,t[1]=e*u+i,t[5]=a*l,t[9]=n*u-r,t[2]=r*u-n,t[6]=o*l,t[10]=i*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Y4e,e,X4e)}lookAt(e,t,n){let r=this.elements;return Y2.subVectors(e,t),Y2.lengthSq()===0&&(Y2.z=1),Y2.normalize(),q2.crossVectors(n,Y2),q2.lengthSq()===0&&(Math.abs(n.z)===1?Y2.x+=1e-4:Y2.z+=1e-4,Y2.normalize(),q2.crossVectors(n,Y2)),q2.normalize(),J2.crossVectors(Y2,q2),r[0]=q2.x,r[4]=J2.x,r[8]=Y2.x,r[1]=q2.y,r[5]=J2.y,r[9]=Y2.y,r[2]=q2.z,r[6]=J2.z,r[10]=Y2.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[4],s=n[8],c=n[12],l=n[1],u=n[5],d=n[9],f=n[13],p=n[2],m=n[6],h=n[10],g=n[14],_=n[3],v=n[7],y=n[11],b=n[15],x=r[0],S=r[4],C=r[8],w=r[12],T=r[1],E=r[5],D=r[9],O=r[13],k=r[2],A=r[6],j=r[10],M=r[14],N=r[3],P=r[7],F=r[11],ee=r[15];return i[0]=a*x+o*T+s*k+c*N,i[4]=a*S+o*E+s*A+c*P,i[8]=a*C+o*D+s*j+c*F,i[12]=a*w+o*O+s*M+c*ee,i[1]=l*x+u*T+d*k+f*N,i[5]=l*S+u*E+d*A+f*P,i[9]=l*C+u*D+d*j+f*F,i[13]=l*w+u*O+d*M+f*ee,i[2]=p*x+m*T+h*k+g*N,i[6]=p*S+m*E+h*A+g*P,i[10]=p*C+m*D+h*j+g*F,i[14]=p*w+m*O+h*M+g*ee,i[3]=_*x+v*T+y*k+b*N,i[7]=_*S+v*E+y*A+b*P,i[11]=_*C+v*D+y*j+b*F,i[15]=_*w+v*O+y*M+b*ee,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],o=e[5],s=e[9],c=e[13],l=e[2],u=e[6],d=e[10],f=e[14],p=e[3],m=e[7],h=e[11],g=e[15],_=s*f-c*d,v=o*f-c*u,y=o*d-s*u,b=a*f-c*l,x=a*d-s*l,S=a*u-o*l;return t*(m*_-h*v+g*y)-n*(p*_-h*b+g*x)+r*(p*v-m*b+g*S)-i*(p*y-m*x+h*S)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=e[9],d=e[10],f=e[11],p=e[12],m=e[13],h=e[14],g=e[15],_=t*o-n*a,v=t*s-r*a,y=t*c-i*a,b=n*s-r*o,x=n*c-i*o,S=r*c-i*s,C=l*m-u*p,w=l*h-d*p,T=l*g-f*p,E=u*h-d*m,D=u*g-f*m,O=d*g-f*h,k=_*O-v*D+y*E+b*T-x*w+S*C;if(k===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let A=1/k;return e[0]=(o*O-s*D+c*E)*A,e[1]=(r*D-n*O-i*E)*A,e[2]=(m*S-h*x+g*b)*A,e[3]=(d*x-u*S-f*b)*A,e[4]=(s*T-a*O-c*w)*A,e[5]=(t*O-r*T+i*w)*A,e[6]=(h*y-p*S-g*v)*A,e[7]=(l*S-d*y+f*v)*A,e[8]=(a*D-o*T+c*C)*A,e[9]=(n*T-t*D-i*C)*A,e[10]=(p*x-m*y+g*_)*A,e[11]=(u*y-l*x-f*_)*A,e[12]=(o*w-a*E-s*C)*A,e[13]=(t*E-n*w+r*C)*A,e[14]=(m*v-p*b-h*_)*A,e[15]=(l*b-u*v+d*_)*A,this}scale(e){let t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,o=e.y,s=e.z,c=i*a,l=i*o;return this.set(c*a+n,c*o-r*s,c*s+r*o,0,c*o+r*s,l*o+n,l*s-r*a,0,c*s-r*o,l*s+r*a,i*s*s+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,i=t._x,a=t._y,o=t._z,s=t._w,c=i+i,l=a+a,u=o+o,d=i*c,f=i*l,p=i*u,m=a*l,h=a*u,g=o*u,_=s*c,v=s*l,y=s*u,b=n.x,x=n.y,S=n.z;return r[0]=(1-(m+g))*b,r[1]=(f+y)*b,r[2]=(p-v)*b,r[3]=0,r[4]=(f-y)*x,r[5]=(1-(d+g))*x,r[6]=(h+_)*x,r[7]=0,r[8]=(p+v)*S,r[9]=(h-_)*S,r[10]=(1-(d+m))*S,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements;e.x=r[12],e.y=r[13],e.z=r[14];let i=this.determinant();if(i===0)return n.set(1,1,1),t.identity(),this;let a=G2.set(r[0],r[1],r[2]).length(),o=G2.set(r[4],r[5],r[6]).length(),s=G2.set(r[8],r[9],r[10]).length();i<0&&(a=-a),K2.copy(this);let c=1/a,l=1/o,u=1/s;return K2.elements[0]*=c,K2.elements[1]*=c,K2.elements[2]*=c,K2.elements[4]*=l,K2.elements[5]*=l,K2.elements[6]*=l,K2.elements[8]*=u,K2.elements[9]*=u,K2.elements[10]*=u,t.setFromRotationMatrix(K2),n.x=a,n.y=o,n.z=s,this}makePerspective(e,t,n,r,i,a,o=l2,s=!1){let c=this.elements,l=2*i/(t-e),u=2*i/(n-r),d=(t+e)/(t-e),f=(n+r)/(n-r),p,m;if(s)p=i/(a-i),m=a*i/(a-i);else if(o===2e3)p=-(a+i)/(a-i),m=-2*a*i/(a-i);else if(o===2001)p=-a/(a-i),m=-a*i/(a-i);else throw Error(`THREE.Matrix4.makePerspective(): Invalid coordinate system: `+o);return c[0]=l,c[4]=0,c[8]=d,c[12]=0,c[1]=0,c[5]=u,c[9]=f,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=m,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}
vendor: 5,591 bytes, line 466
466makeOrthographic(e,t,n,r,i,a,o=l2,s=!1){let c=this.elements,l=2/(t-e),u=2/(n-r),d=-(t+e)/(t-e),f=-(n+r)/(n-r),p,m;if(s)p=1/(a-i),m=a/(a-i);else if(o===2e3)p=-2/(a-i),m=-(a+i)/(a-i);else if(o===2001)p=-1/(a-i),m=-i/(a-i);else throw Error(`THREE.Matrix4.makeOrthographic(): Invalid coordinate system: `+o);return c[0]=l,c[4]=0,c[8]=0,c[12]=d,c[1]=0,c[5]=u,c[9]=0,c[13]=f,c[2]=0,c[6]=0,c[10]=p,c[14]=m,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}},G2=new X,K2=new W2,Y4e=new X(0,0,0),X4e=new X(1,1,1),q2=new X,J2=new X,Y2=new X,Z4e=new W2,Q4e=new A2,X2=class e{constructor(t=0,n=0,r=0,i=e.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,this._z=r,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){let r=e.elements,i=r[0],a=r[4],o=r[8],s=r[1],c=r[5],l=r[9],u=r[2],d=r[6],f=r[10];switch(t){case`XYZ`:this._y=Math.asin(w2(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-l,f),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(d,c),this._z=0);break;case`YXZ`:this._x=Math.asin(-w2(l,-1,1)),Math.abs(l)<.9999999?(this._y=Math.atan2(o,f),this._z=Math.atan2(s,c)):(this._y=Math.atan2(-u,i),this._z=0);break;case`ZXY`:this._x=Math.asin(w2(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,f),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(s,i));break;case`ZYX`:this._y=Math.asin(-w2(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,f),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-a,c));break;case`YZX`:this._z=Math.asin(w2(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-l,c),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(o,f));break;case`XZY`:this._z=Math.asin(-w2(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(o,i)):(this._x=Math.atan2(-l,f),this._y=0);break;default:h2(`Euler: .setFromRotationMatrix() encountered an unknown order: `+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Z4e.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Z4e,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Q4e.setFromEuler(this),this.setFromQuaternion(Q4e,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};X2.DEFAULT_ORDER=`XYZ`;var Z2=class{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!=0}},$4e=0,e3e=new X,Q2=new A2,$2=new W2,e4=new X,t4=new X,t3e=new X,n3e=new A2,r3e=new X(1,0,0),i3e=new X(0,1,0),a3e=new X(0,0,1),o3e={type:`added`},s3e={type:`removed`},n4={type:`childadded`,child:null},r4={type:`childremoved`,child:null},i4=class e extends v2{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:$4e++}),this.uuid=C2(),this.name=``,this.type=`Object3D`,this.parent=null,this.children=[],this.up=e.DEFAULT_UP.clone();let t=new X,n=new X2,r=new A2,i=new X(1,1,1);function a(){r.setFromEuler(n,!1)}function o(){n.setFromQuaternion(r,void 0,!1)}n._onChange(a),r._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new W2},normalMatrix:{value:new M2}}),this.matrix=new W2,this.matrixWorld=new W2,this.matrixAutoUpdate=e.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=e.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Z2,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.static=!1,this.userData={},this.pivot=null}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}
vendor: 4,412 bytes, line 466
466setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Q2.setFromAxisAngle(e,t),this.quaternion.multiply(Q2),this}rotateOnWorldAxis(e,t){return Q2.setFromAxisAngle(e,t),this.quaternion.premultiply(Q2),this}rotateX(e){return this.rotateOnAxis(r3e,e)}rotateY(e){return this.rotateOnAxis(i3e,e)}rotateZ(e){return this.rotateOnAxis(a3e,e)}translateOnAxis(e,t){return e3e.copy(e).applyQuaternion(this.quaternion),this.position.add(e3e.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(r3e,e)}translateY(e){return this.translateOnAxis(i3e,e)}translateZ(e){return this.translateOnAxis(a3e,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4($2.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?e4.copy(e):e4.set(e,t,n);let r=this.parent;this.updateWorldMatrix(!0,!1),t4.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?$2.lookAt(t4,e4,this.up):$2.lookAt(e4,t4,this.up),this.quaternion.setFromRotationMatrix($2),r&&($2.extractRotation(r.matrixWorld),Q2.setFromRotationMatrix($2),this.quaternion.premultiply(Q2.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?(g2(`Object3D.add: object can't be added as a child of itself.`,e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(o3e),n4.child=e,this.dispatchEvent(n4),n4.child=null):g2(`Object3D.add: object not an instance of THREE.Object3D.`,e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}let t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(s3e),r4.child=e,this.dispatchEvent(r4),r4.child=null),this}removeFromParent(){let e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),$2.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),$2.multiply(e.parent.matrixWorld)),e.applyMatrix4($2),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(o3e),n4.child=e,this.dispatchEvent(n4),n4.child=null,this}getObjectById(e){return this.getObjectByProperty(`id`,e)}getObjectByName(e){return this.getObjectByProperty(`name`,e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,r=this.children.length;n<r;n++){let r=this.children[n].getObjectByProperty(e,t);if(r!==void 0)return r}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);let r=this.children;for(let i=0,a=r.length;i<a;i++)r[i].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(t4,e,t3e),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(t4,n3e,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);let t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);let t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);let t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){let t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);let e=this.pivot;if(e!==null){let t=e.x,n=e.y,r=e.z,i=this.matrix.elements;i[12]+=t-i[0]*t-i[4]*n-i[8]*r,i[13]+=n-i[1]*t-i[5]*n-i[9]*r,i[14]+=r-i[2]*t-i[6]*n-i[10]*r}this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);let t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){let n=this.parent;if(e===!0&&n!==null&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix
vendor: 17,883 bytes, line 466
466):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){let e=this.children;for(let t=0,n=e.length;t<n;t++)e[t].updateWorldMatrix(!1,!0)}}toJSON(e){let t=e===void 0||typeof e==`string`,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:`Object`,generator:`Object3D.toJSON`});let r={};r.uuid=this.uuid,r.type=this.type,this.name!==``&&(r.name=this.name),this.castShadow===!0&&(r.castShadow=!0),this.receiveShadow===!0&&(r.receiveShadow=!0),this.visible===!1&&(r.visible=!1),this.frustumCulled===!1&&(r.frustumCulled=!1),this.renderOrder!==0&&(r.renderOrder=this.renderOrder),this.static!==!1&&(r.static=this.static),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.pivot!==null&&(r.pivot=this.pivot.toArray()),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.morphTargetDictionary!==void 0&&(r.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(r.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(r.type=`InstancedMesh`,r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type=`BatchedMesh`,r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(e=>({...e,boundingBox:e.boundingBox?e.boundingBox.toJSON():void 0,boundingSphere:e.boundingSphere?e.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(e=>({...e})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(e),r.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(r.boundingBox=this.boundingBox.toJSON()));function i(t,n){return t[n.uuid]===void 0&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);let t=this.geometry.parameters;if(t!==void 0&&t.shapes!==void 0){let n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;t++){let r=n[t];i(e.shapes,r)}else i(e.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let t=[];for(let n=0,r=this.material.length;n<r;n++)t.push(i(e.materials,this.material[n]));r.material=t}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(let t=0;t<this.children.length;t++)r.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let t=0;t<this.animations.length;t++){let n=this.animations[t];r.animations.push(i(e.animations,n))}}if(t){let t=a(e.geometries),r=a(e.materials),i=a(e.textures),o=a(e.images),s=a(e.shapes),c=a(e.skeletons),l=a(e.animations),u=a(e.nodes);t.length>0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),o.length>0&&(n.images=o),s.length>0&&(n.shapes=s),c.length>0&&(n.skeletons=c),l.length>0&&(n.animations=l),u.length>0&&(n.nodes=u)}return n.object=r,n;function a(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.pivot=e.pivot===null?null:e.pivot.clone(),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.static=e.static,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let t=0;t<e.children.length;t++){let n=e.children[t];this.add(n.clone())}return this}};i4.DEFAULT_UP=new X(0,1,0),i4.DEFAULT_MATRIX_AUTO_UPDATE=!0,i4.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;var a4=class extends i4{constructor(){super(),this.isGroup=!0,this.type=`Group`}},c3e={type:`move`},o4=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new a4,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new a4,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new X,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new X),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new a4,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new X,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new X,this._grip.eventsEnabled=!1),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){let t=this._hand;if(t)for(let n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:`connected`,data:e}),this}disconnect(e){return this.dispatchEvent({type:`disconnected`,data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,a=null,o=this._targetRay,s=this._grip,c=this._hand;if(e&&t.session.visibilityState!==`visible-blurred`){if(c&&e.hand){a=!0;for(let r of e.hand.values()){let e=t.getJointPose(r,n),i=this._getHandJoint(c,r);e!==null&&(i.matrix.fromArray(e.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.matrixWorldNeedsUpdate=!0,i.jointRadius=e.radius),i.visible=e!==null}let r=c.joints[`index-finger-tip`],i=c.joints[`thumb-tip`],o=r.position.distanceTo(i.position);c.inputState.pinching&&o>.025?(c.inputState.pinching=!1,this.dispatchEvent({type:`pinchend`,handedness:e.handedness,target:this})):!c.inputState.pinching&&o<=.015&&(c.inputState.pinching=!0,this.dispatchEvent({type:`pinchstart`,handedness:e.handedness,target:this}))}else s!==null&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),i!==null&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1,s.eventsEnabled&&s.dispatchEvent({type:`gripUpdated`,data:e,target:this})));o!==null&&(r=t.getPose(e.targetRaySpace,n),r===null&&i!==null&&(r=i),r!==null&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(c3e)))}return o!==null&&(o.visible=r!==null),s!==null&&(s.visible=i!==null),c!==null&&(c.visible=a!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){let n=new a4;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}},l3e={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},s4={h:0,s:0,l:0},c4={h:0,s:0,l:0};function l4(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*6*(2/3-n):e}var u4=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let t=e;t&&t.isColor?this.copy(t):typeof t==`number`?this.setHex(t):typeof t==`string`&&this.setStyle(t)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=r2){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,P2.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=P2.workingColorSpace){return this.r=e,this.g=t,this.b=n,P2.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=P2.workingColorSpace){if(e=T2(e,1),t=w2(t,0,1),n=w2(n,0,1),t===0)this.r=this.g=this.b=n;else{let r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=l4(i,r,e+1/3),this.g=l4(i,r,e),this.b=l4(i,r,e-1/3)}return P2.colorSpaceToWorking(this,r),this}setStyle(e,t=r2){function n(t){t!==void 0&&parseFloat(t)<1&&h2(`Color: Alpha component of `+e+` will be ignored.`)}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let i,a=r[1],o=r[2];switch(a){case`rgb`:case`rgba`:if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,t);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,t);break;case`hsl`:case`hsla`:if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,t);break;default:h2(`Color: Unknown color model `+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let n=r[1],i=n.length;if(i===3)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(i===6)return this.setHex(parseInt(n,16),t);h2(`Color: Invalid hex color `+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=r2){let n=l3e[e.toLowerCase()];return n===void 0?h2(`Color: Unknown color `+e):this.setHex(n,t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=F2(e.r),this.g=F2(e.g),this.b=F2(e.b),this}copyLinearToSRGB(e){return this.r=I2(e.r),this.g=I2(e.g),this.b=I2(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=r2){return P2.workingToColorSpace(d4.copy(this),e),Math.round(w2(d4.r*255,0,255))*65536+Math.round(w2(d4.g*255,0,255))*256+Math.round(w2(d4.b*255,0,255))}getHexString(e=r2){return(`000000`+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=P2.workingColorSpace){P2.workingToColorSpace(d4.copy(this),t);let n=d4.r,r=d4.g,i=d4.b,a=Math.max(n,r,i),o=Math.min(n,r,i),s,c,l=(o+a)/2;if(o===a)s=0,c=0;else{let e=a-o;switch(c=l<=.5?e/(a+o):e/(2-a-o),a){case n:s=(r-i)/e+(r<i?6:0);break;case r:s=(i-n)/e+2;break;case i:s=(n-r)/e+4;break}s/=6}return e.h=s,e.s=c,e.l=l,e}getRGB(e,t=P2.workingColorSpace){return P2.workingToColorSpace(d4.copy(this),t),e.r=d4.r,e.g=d4.g,e.b=d4.b,e}getStyle(e=r2){P2.workingToColorSpace(d4.copy(this),e);let t=d4.r,n=d4.g,r=d4.b;return e===`srgb`?`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(r*255)})`:`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`}offsetHSL(e,t,n){return this.getHSL(s4),this.setHSL(s4.h+e,s4.s+t,s4.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(s4),e.getHSL(c4);let n=E2(s4.h,c4.h,t),r=E2(s4.s,c4.s,t),i=E2(s4.l,c4.l,t);return this.setHSL(n,r,i),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,n=this.g,r=this.b,i=e.elements;return this.r=i[0]*t+i[3]*n+i[6]*r,this.g=i[1]*t+i[4]*n+i[7]*r,this.b=i[2]*t+i[5]*n+i[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},d4=new u4;u4.NAMES=l3e;var u3e=class extends i4{constructor(){super(),this.isScene=!0,this.type=`Scene`,this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new X2,this.environmentIntensity=1,this.environmentRotation=new X2,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`observe`,{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}
vendor: 5,046 bytes, line 466
466,f4=new X,p4=new X,m4=new X,h4=new X,g4=new X,_4=new X,d3e=new X,v4=new X,y4=new X,b4=new X,x4=new H2,S4=new H2,C4=new H2,w4=class e{constructor(e=new X,t=new X,n=new X){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),f4.subVectors(e,t),r.cross(f4);let i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){f4.subVectors(r,t),p4.subVectors(n,t),m4.subVectors(e,t);let a=f4.dot(f4),o=f4.dot(p4),s=f4.dot(m4),c=p4.dot(p4),l=p4.dot(m4),u=a*c-o*o;if(u===0)return i.set(0,0,0),null;let d=1/u,f=(c*s-o*l)*d,p=(a*l-o*s)*d;return i.set(1-f-p,p,f)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,h4)===null?!1:h4.x>=0&&h4.y>=0&&h4.x+h4.y<=1}static getInterpolation(e,t,n,r,i,a,o,s){return this.getBarycoord(e,t,n,r,h4)===null?(s.x=0,s.y=0,`z`in s&&(s.z=0),`w`in s&&(s.w=0),null):(s.setScalar(0),s.addScaledVector(i,h4.x),s.addScaledVector(a,h4.y),s.addScaledVector(o,h4.z),s)}static getInterpolatedAttribute(e,t,n,r,i,a){return x4.setScalar(0),S4.setScalar(0),C4.setScalar(0),x4.fromBufferAttribute(e,t),S4.fromBufferAttribute(e,n),C4.fromBufferAttribute(e,r),a.setScalar(0),a.addScaledVector(x4,i.x),a.addScaledVector(S4,i.y),a.addScaledVector(C4,i.z),a}static isFrontFacing(e,t,n,r){return f4.subVectors(n,t),p4.subVectors(e,t),f4.cross(p4).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return f4.subVectors(this.c,this.b),p4.subVectors(this.a,this.b),f4.cross(p4).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return e.getNormal(this.a,this.b,this.c,t)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,n){return e.getBarycoord(t,this.a,this.b,this.c,n)}getInterpolation(t,n,r,i,a){return e.getInterpolation(t,this.a,this.b,this.c,n,r,i,a)}containsPoint(t){return e.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return e.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,r=this.b,i=this.c,a,o;g4.subVectors(r,n),_4.subVectors(i,n),v4.subVectors(e,n);let s=g4.dot(v4),c=_4.dot(v4);if(s<=0&&c<=0)return t.copy(n);y4.subVectors(e,r);let l=g4.dot(y4),u=_4.dot(y4);if(l>=0&&u<=l)return t.copy(r);let d=s*u-l*c;if(d<=0&&s>=0&&l<=0)return a=s/(s-l),t.copy(n).addScaledVector(g4,a);b4.subVectors(e,i);let f=g4.dot(b4),p=_4.dot(b4);if(p>=0&&f<=p)return t.copy(i);let m=f*c-s*p;if(m<=0&&c>=0&&p<=0)return o=c/(c-p),t.copy(n).addScaledVector(_4,o);let h=l*p-f*u;if(h<=0&&u-l>=0&&f-p>=0)return d3e.subVectors(i,r),o=(u-l)/(u-l+(f-p)),t.copy(r).addScaledVector(d3e,o);let g=1/(h+m+d);return a=m*g,o=d*g,t.copy(n).addScaledVector(g4,a).addScaledVector(_4,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},T4=class{constructor(e=new X(1/0,1/0,1/0),t=new X(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(D4.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(D4.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=D4.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let n=e.geometry;if(n!==void 0){let r=n.getAttribute(`position`);if(t===!0&&r!==void 0&&e.isInstancedMesh!==!0)for(let t=0,n=r.count;t<n;t++)e.isMesh===!0?e.getVertexPosition(t,D4):D4.fromBufferAttribute(r,t),D4.applyMatrix4(e.matrixWorld),this.expandByPoint(D4);else e.boundingBox===void 0?(n.boundingBox===null&&n.computeBoundingBox(),O4.copy(n.boundingBox)):(e.boundingBox===null&&e.computeBoundingBox(),O4.copy(e.boundingBox)),O4.applyM
vendor: 4,179 bytes, line 466
466atrix4(e.matrixWorld),this.union(O4)}let r=e.children;for(let e=0,n=r.length;e<n;e++)this.expandByObject(r[e],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,D4),D4.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(F4),I4.subVectors(this.max,F4),k4.subVectors(e.a,F4),A4.subVectors(e.b,F4),j4.subVectors(e.c,F4),M4.subVectors(A4,k4),N4.subVectors(j4,A4),P4.subVectors(k4,j4);let t=[0,-M4.z,M4.y,0,-N4.z,N4.y,0,-P4.z,P4.y,M4.z,0,-M4.x,N4.z,0,-N4.x,P4.z,0,-P4.x,-M4.y,M4.x,0,-N4.y,N4.x,0,-P4.y,P4.x,0];return!z4(t,k4,A4,j4,I4)||(t=[1,0,0,0,1,0,0,0,1],!z4(t,k4,A4,j4,I4))?!1:(L4.crossVectors(M4,N4),t=[L4.x,L4.y,L4.z],z4(t,k4,A4,j4,I4))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,D4).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(D4).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(E4[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),E4[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),E4[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),E4[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),E4[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),E4[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),E4[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),E4[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(E4),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},E4=[new X,new X,new X,new X,new X,new X,new X,new X],D4=new X,O4=new T4,k4=new X,A4=new X,j4=new X,M4=new X,N4=new X,P4=new X,F4=new X,I4=new X,L4=new X,R4=new X;function z4(e,t,n,r,i){for(let a=0,o=e.length-3;a<=o;a+=3){R4.fromArray(e,a);let o=i.x*Math.abs(R4.x)+i.y*Math.abs(R4.y)+i.z*Math.abs(R4.z),s=t.dot(R4),c=n.dot(R4),l=r.dot(R4);if(Math.max(-Math.max(s,c,l),Math.min(s,c,l))>o)return!1}return!0}var B4=new X,V4=new k2,f3e=0,H4=class extends v2{constructor(e,t,n=!1){if(super(),Array.isArray(e))throw TypeError(`THREE.BufferAttribute: array should be a Typed Array.`);this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:f3e++}),this.name=``,this.array=e,this.itemSize=t,this.count=e===void 0?0:e.length/t,this.normalized=n,this.usage=c2,this.updateRanges=[],this.gpuType=R0,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;
vendor: 4,170 bytes, line 466
466for(let r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)V4.fromBufferAttribute(this,t),V4.applyMatrix3(e),this.setXY(t,V4.x,V4.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)B4.fromBufferAttribute(this,t),B4.applyMatrix3(e),this.setXYZ(t,B4.x,B4.y,B4.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)B4.fromBufferAttribute(this,t),B4.applyMatrix4(e),this.setXYZ(t,B4.x,B4.y,B4.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)B4.fromBufferAttribute(this,t),B4.applyNormalMatrix(e),this.setXYZ(t,B4.x,B4.y,B4.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)B4.fromBufferAttribute(this,t),B4.transformDirection(e),this.setXYZ(t,B4.x,B4.y,B4.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=D2(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=O2(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=D2(t,this.array)),t}setX(e,t){return this.normalized&&(t=O2(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=D2(t,this.array)),t}setY(e,t){return this.normalized&&(t=O2(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=D2(t,this.array)),t}setZ(e,t){return this.normalized&&(t=O2(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=D2(t,this.array)),t}setW(e,t){return this.normalized&&(t=O2(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=O2(t,this.array),n=O2(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=O2(t,this.array),n=O2(n,this.array),r=O2(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=O2(t,this.array),n=O2(n,this.array),r=O2(r,this.array),i=O2(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==``&&(e.name=this.name),this.usage!==35044&&(e.usage=this.usage),e}dispose(){this.dispatchEvent({type:`dispose`})}},p3e=class extends H4{constructor(e,t,n){super(new Uint16Array(e),t,n)}},m3e=class extends H4{constructor(e,t,n){super(new Uint32Array(e),t,n)}},U4=class extends H4{constructor(e,t,n){super(new Float32Array(e),t,n)}},h3e=new T4,W4=new X,G4=new X,K4=class{constructor(e=new X,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;t===void 0?h3e.setFromPoints(e).getCenter(n):n.copy(t);let r=0;for(let t=0,i=e.length;t<i;t++)r=Math.max(r,n.distanceToSquared(e[t]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){let t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){let n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}
vendor: 12,704 bytes, line 466
466applyMatrix4(e){return this.center.applyMatrix4(e),this.radius*=e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;W4.subVectors(e,this.center);let t=W4.lengthSq();if(t>this.radius*this.radius){let e=Math.sqrt(t),n=(e-this.radius)*.5;this.center.addScaledVector(W4,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(G4.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(W4.copy(e.center).add(G4)),this.expandByPoint(W4.copy(e.center).sub(G4))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},g3e=0,q4=new W2,J4=new i4,Y4=new X,X4=new T4,Z4=new T4,Q4=new X,$4=class e extends v2{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:g3e++}),this.uuid=C2(),this.name=``,this.type=`BufferGeometry`,this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(_4e(e)?m3e:p3e)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let t=new M2().getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}let r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return q4.makeRotationFromQuaternion(e),this.applyMatrix4(q4),this}rotateX(e){return q4.makeRotationX(e),this.applyMatrix4(q4),this}rotateY(e){return q4.makeRotationY(e),this.applyMatrix4(q4),this}rotateZ(e){return q4.makeRotationZ(e),this.applyMatrix4(q4),this}translate(e,t,n){return q4.makeTranslation(e,t,n),this.applyMatrix4(q4),this}scale(e,t,n){return q4.makeScale(e,t,n),this.applyMatrix4(q4),this}lookAt(e){return J4.lookAt(e),J4.updateMatrix(),this.applyMatrix4(J4.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Y4).negate(),this.translate(Y4.x,Y4.y,Y4.z),this}setFromPoints(e){let t=this.getAttribute(`position`);if(t===void 0){let t=[];for(let n=0,r=e.length;n<r;n++){let r=e[n];t.push(r.x,r.y,r.z||0)}this.setAttribute(`position`,new U4(t,3))}else{let n=Math.min(e.length,t.count);for(let r=0;r<n;r++){let n=e[r];t.setXYZ(r,n.x,n.y,n.z||0)}e.length>t.count&&h2(`BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry.`),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new T4);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){g2(`BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.`,this),this.boundingBox.set(new X(-1/0,-1/0,-1/0),new X(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){let n=t[e];X4.setFromBufferAttribute(n),this.morphTargetsRelative?(Q4.addVectors(this.boundingBox.min,X4.min),this.boundingBox.expandByPoint(Q4),Q4.addVectors(this.boundingBox.max,X4.max),this.boundingBox.expandByPoint(Q4)):(this.boundingBox.expandByPoint(X4.min),this.boundingBox.expandByPoint(X4.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&g2(`BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.`,this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new K4);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){g2(`BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.`,this),this.boundingSphere.set(new X,1/0);return}if(e){let n=this.boundingSphere.center;if(X4.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){let n=t[e];Z4.setFromBufferAttribute(n),this.morphTargetsRelative?(Q4.addVectors(X4.min,Z4.min),X4.expandByPoint(Q4),Q4.addVectors(X4.max,Z4.max),X4.expandByPoint(Q4)):(X4.expandByPoint(Z4.min),X4.expandByPoint(Z4.max))}X4.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)Q4.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(Q4));if(t)for(let i=0,a=t.length;i<a;i++){let a=t[i],o=this.morphTargetsRelative;for(let t=0,i=a.count;t<i;t++)Q4.fromBufferAttribute(a,t),o&&(Y4.fromBufferAttribute(e,t),Q4.add(Y4)),r=Math.max(r,n.distanceToSquared(Q4))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&g2(`BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.`,this)}}computeTangents(){let e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){g2(`BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)`);return}let n=t.position,r=t.normal,i=t.uv;this.hasAttribute(`tangent`)===!1&&this.setAttribute(`tangent`,new H4(new Float32Array(4*n.count),4));let a=this.getAttribute(`tangent`),o=[],s=[];for(let e=0;e<n.count;e++)o[e]=new X,s[e]=new X;let c=new X,l=new X,u=new X,d=new k2,f=new k2,p=new k2,m=new X,h=new X;function g(e,t,r){c.fromBufferAttribute(n,e),l.fromBufferAttribute(n,t),u.fromBufferAttribute(n,r),d.fromBufferAttribute(i,e),f.fromBufferAttribute(i,t),p.fromBufferAttribute(i,r),l.sub(c),u.sub(c),f.sub(d),p.sub(d);let a=1/(f.x*p.y-p.x*f.y);isFinite(a)&&(m.copy(l).multiplyScalar(p.y).addScaledVector(u,-f.y).multiplyScalar(a),h.copy(u).multiplyScalar(f.x).addScaledVector(l,-p.x).multiplyScalar(a),o[e].add(m),o[t].add(m),o[r].add(m),s[e].add(h),s[t].add(h),s[r].add(h))}let _=this.groups;_.length===0&&(_=[{start:0,count:e.count}]);for(let t=0,n=_.length;t<n;++t){let n=_[t],r=n.start,i=n.count;for(let t=r,n=r+i;t<n;t+=3)g(e.getX(t+0),e.getX(t+1),e.getX(t+2))}let v=new X,y=new X,b=new X,x=new X;function S(e){b.fromBufferAttribute(r,e),x.copy(b);let t=o[e];v.copy(t),v.sub(b.multiplyScalar(b.dot(t))).normalize(),y.crossVectors(x,t);let n=y.dot(s[e])<0?-1:1;a.setXYZW(e,v.x,v.y,v.z,n)}for(let t=0,n=_.length;t<n;++t){let n=_[t],r=n.start,i=n.count;for(let t=r,n=r+i;t<n;t+=3)S(e.getX(t+0)),S(e.getX(t+1)),S(e.getX(t+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute(`position`);if(t!==void 0){let n=this.getAttribute(`normal`);if(n===void 0)n=new H4(new Float32Array(t.count*3),3),this.setAttribute(`normal`,n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);let r=new X,i=new X,a=new X,o=new X,s=new X,c=new X,l=new X,u=new X;if(e)for(let d=0,f=e.count;d<f;d+=3){let f=e.getX(d+0),p=e.getX(d+1),m=e.getX(d+2);r.fromBufferAttribute(t,f),i.fromBufferAttribute(t,p),a.fromBufferAttribute(t,m),l.subVectors(a,i),u.subVectors(r,i),l.cross(u),o.fromBufferAttribute(n,f),s.fromBufferAttribute(n,p),c.fromBufferAttribute(n,m),o.add(l),s.add(l),c.add(l),n.setXYZ(f,o.x,o.y,o.z),n.setXYZ(p,s.x,s.y,s.z),n.setXYZ(m,c.x,c.y,c.z)}else for(let e=0,o=t.count;e<o;e+=3)r.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),a.fromBufferAttribute(t,e+2),l.subVectors(a,i),u.subVectors(r,i),l.cross(u),n.setXYZ(e+0,l.x,l.y,l.z),n.setXYZ(e+1,l.x,l.y,l.z),n.setXYZ(e+2,l.x,l.y,l.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)Q4.fromBufferAttribute(e,t),Q4.normalize(),e.setXYZ(t,Q4.x,Q4.y,Q4.z)}toNonIndexed(){function t(e,t){let n=e.array,r=e.itemSize,i=e.normalized,a=new n.constructor(t.length*r),o=0,s=0;for(let i=0,c=t.length;i<c;i++){o=e.isInterleavedBufferAttribute?t[i]*e.data.stride+e.offset:t[i]*r;for(let e=0;e<r;e++)a[s++]=n[o++]}return new H4(a,r,i)}if(this.index===null)return h2(`BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.`),this;let n=new e,r=this.index.array,i=this.attributes;for(let e in i){let a=i[e],o=t(a,r);n.setAttribute(e,o)}let a=this.morphAttributes;for(let e in a){let i=[],o=a[e];for(let e=0,n=o.length;e<n;e++){let n=o[e],a=t(n,r);i.push(a)}n.morphAttributes[e]=i}n.morphTargetsRelative=this.morphTargetsRelative;let o=this.groups;for(let e=0,t=o.length;e<t;e++){let t=o[e];n.addGroup(t.start,t.count,t.materialIndex)}return n}toJSON(){let e={metadata:{version:4.7,type:`BufferGeometry`,generator:`BufferGeometry.toJSON`}};if(e.uuid=this.uuid,e.type=this.type,this.name!==``&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){let t=this.parameters;for(let n in t)t[n]!==void 0&&(e[n]=t[n]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let t in n){let r=n[t];e.data.attributes[t]=r.toJSON(e.data)}let r={},i=!1;for(let t in this.morphAttributes){let n=this.morphAttributes[t],a=[];for(let t=0,r=n.length;t<r;t++){let r=n[t];a.push(r.toJSON(e.data))}a.length>0&&(r[t]=a,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));let o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;n!==null&&this.setIndex(n.clone());let r=e.attributes;for(let e in r){let n=r[e];this.setAttribute(e,n.clone(t))}let i=e.morphAttributes;for(let e in i){let n=[],r=i[e];for(let e=0,i=r.length;e<i;e++)n.push(r[e].clone(t));this.morphAttributes[e]=n}this.morphTargetsRelative=e.morphTargetsRelative;let a=e.groups;for(let e=0,t=a.length;e<t;e++){let t=a[e];this.addGroup(t.start,t.count,t.materialIndex)}let o=e.boundingBox;o!==null&&(this.boundingBox=o.clone());let s=e.boundingSphere;return s!==null&&(this.boundingSphere=s.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:`dispose`})}},_3e=class{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e===void 0?0:e.length/t,this.usage=c2,this.updateRanges=[],this.version=0,this.uuid=C2()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=C2()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);let t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=C2()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}},e3=new X,v3e=class e{constructor(e,t,n,r=!1){this.isInterleavedBufferAttribute=!0,this.name=``,this.data=e,this.itemSize=t,this.offset=n,this.normalized=r}
vendor: 5,057 bytes, line 466
466get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)e3.fromBufferAttribute(this,t),e3.applyMatrix4(e),this.setXYZ(t,e3.x,e3.y,e3.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)e3.fromBufferAttribute(this,t),e3.applyNormalMatrix(e),this.setXYZ(t,e3.x,e3.y,e3.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)e3.fromBufferAttribute(this,t),e3.transformDirection(e),this.setXYZ(t,e3.x,e3.y,e3.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=D2(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=O2(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=O2(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=O2(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=O2(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=O2(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=D2(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=D2(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=D2(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=D2(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=O2(t,this.array),n=O2(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=O2(t,this.array),n=O2(n,this.array),r=O2(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=O2(t,this.array),n=O2(n,this.array),r=O2(r,this.array),i=O2(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this}clone(t){if(t===void 0){p2(`InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.`);let e=[];for(let t=0;t<this.count;t++){let n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new H4(new this.array.constructor(e),this.itemSize,this.normalized)}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.clone(t)),new e(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){p2(`InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.`);let e=[];for(let t=0;t<this.count;t++){let n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}},y3e=0,t3=class extends v2{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:y3e++}),this.uuid=C2(),this.name=``,this.type=`Material`,this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new u4(0,0,0),this.blendAlpha=0,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=s2,this.stencilZFail=s2,this.stencilZPass=s2,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let n=e[t];if(n===void 0){h2(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){h2
vendor: 10,041 bytes, line 466
466(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e==`string`;t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:`Material`,generator:`Material.toJSON`}};n.uuid=this.uuid,n.type=this.type,this.name!==``&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==1&&(n.blending=this.blending),this.side!==0&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==204&&(n.blendSrc=this.blendSrc),this.blendDst!==205&&(n.blendDst=this.blendDst),this.blendEquation!==100&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==3&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==519&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==7680&&(n.stencilFail=this.stencilFail),this.stencilZFail!==7680&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==7680&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!==`round`&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!==`round`&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function r(e){let t=[];for(let n in e){let r=e[n];delete r.metadata,t.push(r)}return t}if(t){let t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(t!==null){let e=t.length;n=Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:`dispose`})}set needsUpdate(e){e===!0&&this.version++}},
vendor: 3,473 bytes, line 466
466b3e=class extends t3{constructor(e){super(),this.isSpriteMaterial=!0,this.type=`SpriteMaterial`,this.color=new u4(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}},n3,r3=new X,i3=new X,a3=new X,o3=new k2,s3=new k2,x3e=new W2,c3=new X,l3=new X,u3=new X,S3e=new k2,d3=new k2,C3e=new k2,w3e=class extends i4{constructor(e=new b3e){if(super(),this.isSprite=!0,this.type=`Sprite`,n3===void 0){n3=new $4;let e=new _3e(new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),5);n3.setIndex([0,1,2,0,2,3]),n3.setAttribute(`position`,new v3e(e,3,0,!1)),n3.setAttribute(`uv`,new v3e(e,2,3,!1))}this.geometry=n3,this.material=e,this.center=new k2(.5,.5),this.count=1}raycast(e,t){e.camera===null&&g2(`Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.`),i3.setFromMatrixScale(this.matrixWorld),x3e.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),a3.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&i3.multiplyScalar(-a3.z);let n=this.material.rotation,r,i;n!==0&&(i=Math.cos(n),r=Math.sin(n));let a=this.center;f3(c3.set(-.5,-.5,0),a3,a,i3,r,i),f3(l3.set(.5,-.5,0),a3,a,i3,r,i),f3(u3.set(.5,.5,0),a3,a,i3,r,i),S3e.set(0,0),d3.set(1,0),C3e.set(1,1);let o=e.ray.intersectTriangle(c3,l3,u3,!1,r3);if(o===null&&(f3(l3.set(-.5,.5,0),a3,a,i3,r,i),d3.set(0,1),o=e.ray.intersectTriangle(c3,u3,l3,!1,r3),o===null))return;let s=e.ray.origin.distanceTo(r3);s<e.near||s>e.far||t.push({distance:s,point:r3.clone(),uv:w4.getInterpolation(r3,c3,l3,u3,S3e,d3,C3e,new k2),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}};function f3(e,t,n,r,i,a){o3.subVectors(e,n).addScalar(.5).multiply(r),i===void 0?s3.copy(o3):(s3.x=a*o3.x-i*o3.y,s3.y=i*o3.x+a*o3.y),e.copy(t),e.x+=s3.x,e.y+=s3.y,e.applyMatrix4(x3e)}var p3=new X,m3=new X,h3=new X,g3=new X,_3=new X,v3=new X,y3=new X,b3=class{constructor(e=new X,t=new X(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,p3)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=p3.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(p3.copy(this.origin).addScaledVector(this.direction,t),p3.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){m3.copy(e).add(t).multiplyScalar(.5),h3.copy(t).sub(e).normalize(),g3.copy(this.origin).sub(m3);let i=e.distanceTo(t)*.5,a=-this.direction.dot(h3),o=g3.dot(this.direction),s=-g3.dot(h3),c=g3.lengthSq(),l=Math.abs(1-a*a),u,d,f,p;if(l>0)if(u=a*s-o,d=a*o-s,p=i*l,u>=0)if(d>=-p)if(d<=p){let e=1/l;u*=e,d*=e,f=u*(u+a*d+2*o)+d*(a*u+d+2*s)+c}
vendor: 4,962 bytes, line 466
466else d=i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;else d=-i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;else d<=-p?(u=Math.max(0,-(-a*i+o)),d=u>0?-i:Math.min(Math.max(-i,-s),i),f=-u*u+d*(d+2*s)+c):d<=p?(u=0,d=Math.min(Math.max(-i,-s),i),f=d*(d+2*s)+c):(u=Math.max(0,-(a*i+o)),d=u>0?i:Math.min(Math.max(-i,-s),i),f=-u*u+d*(d+2*s)+c);else d=a>0?-i:i,u=Math.max(0,-(a*d+o)),f=-u*u+d*(d+2*s)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(m3).addScaledVector(h3,d),f}intersectSphere(e,t){p3.subVectors(e.center,this.origin);let n=p3.dot(this.direction),r=p3.dot(p3)-n*n,i=e.radius*e.radius;if(r>i)return null;let a=Math.sqrt(i-r),o=n-a,s=n+a;return s<0?null:o<0?this.at(s,t):this.at(o,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,a,o,s,c=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,d=this.origin;return c>=0?(n=(e.min.x-d.x)*c,r=(e.max.x-d.x)*c):(n=(e.max.x-d.x)*c,r=(e.min.x-d.x)*c),l>=0?(i=(e.min.y-d.y)*l,a=(e.max.y-d.y)*l):(i=(e.max.y-d.y)*l,a=(e.min.y-d.y)*l),n>a||i>r||((i>n||isNaN(n))&&(n=i),(a<r||isNaN(r))&&(r=a),u>=0?(o=(e.min.z-d.z)*u,s=(e.max.z-d.z)*u):(o=(e.max.z-d.z)*u,s=(e.min.z-d.z)*u),n>s||o>r)||((o>n||n!==n)&&(n=o),(s<r||r!==r)&&(r=s),r<0)?null:this.at(n>=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,p3)!==null}intersectTriangle(e,t,n,r,i){_3.subVectors(t,e),v3.subVectors(n,e),y3.crossVectors(_3,v3);let a=this.direction.dot(y3),o;if(a>0){if(r)return null;o=1}else if(a<0)o=-1,a=-a;else return null;g3.subVectors(this.origin,e);let s=o*this.direction.dot(v3.crossVectors(g3,v3));if(s<0)return null;let c=o*this.direction.dot(_3.cross(g3));if(c<0||s+c>a)return null;let l=-o*g3.dot(y3);return l<0?null:this.at(l/a,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},T3e=class extends t3{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type=`MeshBasicMaterial`,this.color=new u4(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new X2,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap=`round`,this.wireframeLinejoin=`round`,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}},E3e=new W2,x3=new b3,S3=new K4,D3e=new X,C3=new X,w3=new X,T3=new X,E3=new X,D3=new X,O3e=new X,O3=new X,k3=class extends i4{constructor(e=new $4,t=new T3e){super(),this.isMesh=!0,this.type=`Mesh`,this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){let n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){let t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}getVertexPosition(e,t){let n=this.geometry,r=n.attributes.position,i=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(r,e);let o=this.morphTargetInfluences;if(i&&o){D3.set(0,0,0);for(let n=0,r=i.length;n<r;n++){let r=o[n],s=i[n];r!==0&&(E3.fromBufferAttribute(s,e),a?D3.addScaledVector(E3,r):D3.addScaledVector(E3.sub(t),r))}t.add(D3)}return t}raycast(e,t){let n=this.geometry,r=this.material,i=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),S3.copy(n.boundingSphere),S3.applyM
vendor: 4,262 bytes, line 466
466atrix4(i),x3.copy(e.ray).recast(e.near),!(S3.containsPoint(x3.origin)===!1&&(x3.intersectSphere(S3,D3e)===null||x3.origin.distanceToSquared(D3e)>(e.far-e.near)**2))&&(E3e.copy(i).invert(),x3.copy(e.ray).applyMatrix4(E3e),!(n.boundingBox!==null&&x3.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,x3)))}_computeIntersections(e,t,n){let r,i=this.geometry,a=this.material,o=i.index,s=i.attributes.position,c=i.attributes.uv,l=i.attributes.uv1,u=i.attributes.normal,d=i.groups,f=i.drawRange;if(o!==null)if(Array.isArray(a))for(let i=0,s=d.length;i<s;i++){let s=d[i],p=a[s.materialIndex],m=Math.max(s.start,f.start),h=Math.min(o.count,Math.min(s.start+s.count,f.start+f.count));for(let i=m,a=h;i<a;i+=3){let a=o.getX(i),d=o.getX(i+1),f=o.getX(i+2);r=A3(this,p,e,n,c,l,u,a,d,f),r&&(r.faceIndex=Math.floor(i/3),r.face.materialIndex=s.materialIndex,t.push(r))}}else{let i=Math.max(0,f.start),s=Math.min(o.count,f.start+f.count);for(let d=i,f=s;d<f;d+=3){let i=o.getX(d),s=o.getX(d+1),f=o.getX(d+2);r=A3(this,a,e,n,c,l,u,i,s,f),r&&(r.faceIndex=Math.floor(d/3),t.push(r))}}else if(s!==void 0)if(Array.isArray(a))for(let i=0,o=d.length;i<o;i++){let o=d[i],p=a[o.materialIndex],m=Math.max(o.start,f.start),h=Math.min(s.count,Math.min(o.start+o.count,f.start+f.count));for(let i=m,a=h;i<a;i+=3){let a=i,s=i+1,d=i+2;r=A3(this,p,e,n,c,l,u,a,s,d),r&&(r.faceIndex=Math.floor(i/3),r.face.materialIndex=o.materialIndex,t.push(r))}}else{let i=Math.max(0,f.start),o=Math.min(s.count,f.start+f.count);for(let s=i,d=o;s<d;s+=3){let i=s,o=s+1,d=s+2;r=A3(this,a,e,n,c,l,u,i,o,d),r&&(r.faceIndex=Math.floor(s/3),t.push(r))}}}};function k3e(e,t,n,r,i,a,o,s){let c;if(c=t.side===1?r.intersectTriangle(o,a,i,!0,s):r.intersectTriangle(i,a,o,t.side===0,s),c===null)return null;O3.copy(s),O3.applyMatrix4(e.matrixWorld);let l=n.ray.origin.distanceTo(O3);return l<n.near||l>n.far?null:{distance:l,point:O3.clone(),object:e}}function A3(e,t,n,r,i,a,o,s,c,l){e.getVertexPosition(s,C3),e.getVertexPosition(c,w3),e.getVertexPosition(l,T3);let u=k3e(e,t,n,r,C3,w3,T3,O3e);if(u){let e=new X;w4.getBarycoord(O3e,C3,w3,T3,e),i&&(u.uv=w4.getInterpolatedAttribute(i,s,c,l,e,new k2)),a&&(u.uv1=w4.getInterpolatedAttribute(a,s,c,l,e,new k2)),o&&(u.normal=w4.getInterpolatedAttribute(o,s,c,l,e,new X),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));let t={a:s,b:c,c:l,normal:new X,materialIndex:0};w4.getNormal(C3,w3,T3,t.normal),u.face=t,u.barycoord=e}return u}var A3e=class extends V2{constructor(e=null,t=1,n=1,r,i,a,o,s,c=M0,l=M0,u,d){super(null,a,o,s,c,l,r,i,u,d),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}},j3=new X,j3e=new X,M3e=new M2,M3=class{constructor(e=new X(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){let r=j3.subVectors(n,t).cross(j3e.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){let e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t,n=!0){let r=e.delta(j3),i=this.normal.dot(r);if(i===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;let a=-(e.start.dot(this.normal)+this.constant)/i;return n===!0&&(a<0||a>1)?null:t.copy(e.start).addScaledVector(r,a)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let n=t||M3e.getNormalMatrix(e),r=this.coplanarPoint(j3).applyMatrix4(e),i=this.normal.applyM
vendor: 8,572 bytes, line 466
466atrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}},N3=new K4,N3e=new k2(.5,.5),P3=new X,P3e=class{constructor(e=new M3,t=new M3,n=new M3,r=new M3,i=new M3,a=new M3){this.planes=[e,t,n,r,i,a]}set(e,t,n,r,i,a){let o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(i),o[5].copy(a),this}copy(e){let t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=l2,n=!1){let r=this.planes,i=e.elements,a=i[0],o=i[1],s=i[2],c=i[3],l=i[4],u=i[5],d=i[6],f=i[7],p=i[8],m=i[9],h=i[10],g=i[11],_=i[12],v=i[13],y=i[14],b=i[15];if(r[0].setComponents(c-a,f-l,g-p,b-_).normalize(),r[1].setComponents(c+a,f+l,g+p,b+_).normalize(),r[2].setComponents(c+o,f+u,g+m,b+v).normalize(),r[3].setComponents(c-o,f-u,g-m,b-v).normalize(),n)r[4].setComponents(s,d,h,y).normalize(),r[5].setComponents(c-s,f-d,g-h,b-y).normalize();else if(r[4].setComponents(c-s,f-d,g-h,b-y).normalize(),t===2e3)r[5].setComponents(c+s,f+d,g+h,b+y).normalize();else if(t===2001)r[5].setComponents(s,d,h,y).normalize();else throw Error(`THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: `+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),N3.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),N3.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(N3)}intersectsSprite(e){return N3.center.set(0,0,0),N3.radius=.7071067811865476+N3e.distanceTo(e.center),N3.applyMatrix4(e.matrixWorld),this.intersectsSphere(N3)}intersectsSphere(e){let t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(n)<r)return!1;return!0}intersectsBox(e){let t=this.planes;for(let n=0;n<6;n++){let r=t[n];if(P3.x=r.normal.x>0?e.max.x:e.min.x,P3.y=r.normal.y>0?e.max.y:e.min.y,P3.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(P3)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}},F3e=class extends t3{constructor(e){super(),this.isPointsMaterial=!0,this.type=`PointsMaterial`,this.color=new u4(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}},I3e=new W2,F3=new b3,I3=new K4,L3=new X,L3e=class extends i4{constructor(e=new $4,t=new F3e){super(),this.isPoints=!0,this.type=`Points`,this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){let n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold,a=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),I3.copy(n.boundingSphere),I3.applyMatrix4(r),I3.radius+=i,e.ray.intersectsSphere(I3)===!1)return;I3e.copy(r).invert(),F3.copy(e.ray).applyMatrix4(I3e);let o=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=o*o,c=n.index,l=n.attributes.position;if(c!==null){let n=Math.max(0,a.start),i=Math.min(c.count,a.start+a.count);for(let a=n,o=i;a<o;a++){let n=c.getX(a);L3.fromBufferAttribute(l,n),R3e(L3,n,s,r,e,t,this)}}else{let n=Math.max(0,a.start),i=Math.min(l.count,a.start+a.count);for(let a=n,o=i;a<o;a++)L3.fromBufferAttribute(l,a),R3e(L3,a,s,r,e,t,this)}}updateMorphTargets(){let e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){let n=e[t[0]];if(n!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){let t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}};function R3e(e,t,n,r,i,a,o){let s=F3.distanceSqToPoint(e);if(s<n){let n=new X;F3.closestPointToPoint(e,n),n.applyMatrix4(r);let c=i.ray.origin.distanceTo(n);if(c<i.near||c>i.far)return;a.push({distance:c,distanceToRay:Math.sqrt(s),point:n,index:t,face:null,faceIndex:null,barycoord:null,object:o})}}var z3e=class extends V2{constructor(e=[],t=301,n,r,i,a,o,s,c,l){super(e,t,n,r,i,a,o,s,c,l),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}},B3e=class extends V2{constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r,i,a,o,s,c),this.isCanvasTexture=!0,this.needsUpdate=!0}},R3=class extends V2{constructor(e,t,n=L0,r,i,a,o=M0,s=M0,c,l=W0,u=1){if(l!==1026&&l!==1027)throw Error(`DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat`);super({width:e,height:t,depth:u},r,i,a,o,s,l,n,c),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new R2(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){let t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}},V3e=class extends R3{constructor(e,t=L0,n=301,r,i,a=M0,o=M0,s,c=W0){let l={width:e,height:e,depth:1},u=[l,l,l,l,l,l];super(e,e,t,n,r,i,a,o,s,c),this.image=u,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}},H3e=class extends V2{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}},z3=class e extends $4{constructor(e=1,t=1,n=1,r=1,i=1,a=1){super(),this.type=`BoxGeometry`,this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};let o=this;r=Math.floor(r),i=Math.floor(i),a=Math.floor(a);let s=[],c=[],l=[],u=[],d=0,f=0;p(`z`,`y`,`x`,-1,-1,n,t,e,a,i,0),p(`z`,`y`,`x`,1,-1,n,t,-e,a,i,1),p(`x`,`z`,`y`,1,1,e,n,t,r,a,2),p(`x`,`z`,`y`,1,-1,e,n,-t,r,a,3),p(`x`,`y`,`z`,1,-1,e,t,n,r,i,4),p(`x`,`y`,`z`,-1,-1,e,t,-n,r,i,5),this.setIndex(s),this.setAttribute(`position`,new U4(c,3)),this.setAttribute(`normal`,new U4(l,3)),this.setAttribute(`uv`,new U4(u,2));function p(e,t,n,r,i,a,p,m,h,g,_){let v=a/h,y=p/g,b=a/2,x=p/2,S=m/2,C=h+1,w=g+1,T=0,E=0,D=new X;for(let a=0;a<w;a++){let o=a*y-x;for(let s=0;s<C;s++)D[e]=(s*v-b)*r,D[t]=o*i,D[n]=S,c.push(D.x,D.y,D.z),D[e]=0,D[t]=0,D[n]=m>0?1:-1,l.push(D.x,D.y,D.z),u.push(s/h),u.push(1-a/g),T+=1}for(let e=0;e<g;e++)for(let t=0;t<h;t++){let n=d+t+C*e,r=d+t+C*(e+1),i=d+(t+1)+C*(e+1),a=d+(t+1)+C*e;s.push(n,r,a),s.push(r,i,a),E+=6}o.addGroup(f,E,_),f+=E,d+=T}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(t){return new e(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}},U3e=class e extends $4{constructor(e=1,t=1,n=1,r=1){super(),this.type=`PlaneGeometry`,this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};let i=e/2,a=t/2,o=Math.floor(n),s=Math.floor(r),c=o+1,l=s+1,u=e/o,d=t/s,f=[],p=[],m=[],h=[];for(let e=0;e<l;e++){let t=e*d-a;for(let n=0;n<c;n++){let r=n*u-i;p.push(r,-t,0),m.push(0,0,1),h.push(n/o),h.push(1-e/s)}}for(let e=0;e<s;e++)for(let t=0;t<o;t++){let n=t+c*e,r=t+c*(e+1),i=t+1+c*(e+1),a=t+1+c*e;f.push(n,r,a),f.push(r,i,a)}this.setIndex(f),this.setAttribute(`position`,new U4(p,3)),this.setAttribute(`normal`,new U4(m,3)),this.setAttribute(`uv`,new U4(h,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(t){return new e(t.width,t.height,t.widthSegments,t.heightSegments)}};function B3(e){let t={};for(let n in e){t[n]={};for(let r in e[n]){let i=e[n][r];if(W3e(i))i.isRenderTargetTexture?(h2(`UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms().`),t[n][r]=null):t[n][r]=i.clone();else if(Array.isArray(i))if(W3e(i[0])){let e=[];for(let t=0,n=i.length;t<n;t++)e[t]=i[t].clone();t[n][r]=e}else t[n][r]=i.slice();else t[n][r]=i}}return t}function V3(e){let t={};for(let n=0;n<e.length;n++){let r=B3(e[n]);for(let e in r)t[e]=r[e]}return t}function W3e(e){return e&&(e.isColor||e.isMatrix3||e.isMatrix4||e.isVector2||e.isVector3||e.isVector4||e.isTexture||e.isQuaternion)}function G3e(e){let t=[];for(let n=0;n<e.length;n++)t.push(e[n].clone());return t}function K3e(e){let t=e.getRenderTarget();return t===null?e.outputColorSpace:t.isXRRenderTarget===!0?t.texture.colorSpace:P2.w
vendor: 6,475 bytes, lines 466-470
466orkingColorSpace}var q3e={clone:B3,merge:V3},J3e=`void main() { 467 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 468}`,Y3e=`void main() { 469 gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 ); 470}`,H3=class extends t3{constructor(e){super(),this.isShaderMaterial=!0,this.type=`ShaderMaterial`,this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=J3e,this.fragmentShader=Y3e,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=B3(e.uniforms),this.uniformsGroups=G3e(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this.defaultAttributeValues=Object.assign({},e.defaultAttributeValues),this.index0AttributeName=e.index0AttributeName,this.uniformsNeedUpdate=e.uniformsNeedUpdate,this}toJSON(e){let t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(let n in this.uniforms){let r=this.uniforms[n].value;r&&r.isTexture?t.uniforms[n]={type:`t`,value:r.toJSON(e).uuid}:r&&r.isColor?t.uniforms[n]={type:`c`,value:r.getHex()}:r&&r.isVector2?t.uniforms[n]={type:`v2`,value:r.toArray()}:r&&r.isVector3?t.uniforms[n]={type:`v3`,value:r.toArray()}:r&&r.isVector4?t.uniforms[n]={type:`v4`,value:r.toArray()}:r&&r.isMatrix3?t.uniforms[n]={type:`m3`,value:r.toArray()}:r&&r.isMatrix4?t.uniforms[n]={type:`m4`,value:r.toArray()}:t.uniforms[n]={value:r}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;let n={};for(let e in this.extensions)this.extensions[e]===!0&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}},X3e=class extends H3{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type=`RawShaderMaterial`}},Z3e=class extends t3{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type=`MeshDepthMaterial`,this.depthPacking=g4e,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}},Q3e=class extends t3{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type=`MeshDistanceMaterial`,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}};function U3(e,t){return!e||e.constructor===t?e:typeof t.BYTES_PER_ELEMENT==`number`?new t(e):Array.prototype.slice.call(e)}var W3=class{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=r===void 0?new t.constructor(n):r,this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){let t=this.parameterPositions,n=this._cachedIndex,r=t[n],i=t[n-1];validate_interval:{seek:{let a;linear_scan:{forward_scan:if(!(e<r)){for(let a=n+2;;){if(r===void 0){if(e<i)break forward_scan;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(i=r,r=t[++n],e<r)break seek}a=t.length;break linear_scan}if(!(e>=i)){let o=t[1];e<o&&(n=2,i=o);for(let a=n-2;;){if(i===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===a)break;if(r=i,i=t[--n-1],e>=i)break seek}a=n,n=0;break linear_scan}break validate_interval}for(;n<a;){let r=n+a>>>1;e<t[r]?a=r:n=r+1}if(r=t[n],i=t[n-1],i===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(r===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){let t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r;for(let e=0;e!==r;++e)t[e]=n[i+e];return t}interpolate_(){throw Error(`call to abstract method`)}intervalChanged_(){}},$3e=class extends W3{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:e2,endingEnd:e2}}intervalChanged_(e,t,n){let r=this.parameterPositions,i=e-2,a=e+1,o=r[i],s=r[a];if(o===void 0)switch(this.getSettings_().endingStart){case t2:i=e,o=2*t-n;break;case n2:i=r.length-2,o=t+r[i]-r[i+1];break;default:i=e,o=n}if(s===void 0)switch(this.getSettings_().endingEnd){case t2:a=e,s=2*n-t;break;case n2:a=1,s=n+r[1]-r[0];break;default:a=e-1,s=t}let c=(n-t)*.5,l=this.valueSize;this._weightPrev=c/(t-o),this._weightNext=c/(s-n),this._offsetPrev=i*l,this._offsetNext=a*l}interpolate_(e,t,n,r){let i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,c=s-o,l=this._offsetPrev,u=this._offsetNext,d=this._weightPrev,f=this._weightNext,p=(n-t)/(r-t),m=p*p,h=m*p,g=-d*h+2*d*m-d*p,_=(1+d)*h+(-1.5-2*d)*m+(-.5+d)*p+1,v=(-1-f)*h+(1.5+f)*m+.5*p,y=f*h-f*m;for(let e=0;e!==o;++e)i[e]=g*a[l+e]+_*a[c+e]+v*a[s+e]+y*a[u+e];return i}},e6e=class extends W3{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){let i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,c=s-o,l=(n-t)/(r-t),u=1-l;for(let e=0;e!==o;++e)i[e]=a[c+e]*u+a[s+e]*l;return i}},t6e=class extends W3{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}},n6e=class extends W3{interpolate_(e,t,n,r){let i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,c=s-o,l=this.settings||this.DefaultSettings_,u=l.inTangents,d=l.outTangents;if(!u||!d){let e=(n-t)/(r-t),l=1-e;for(let t=0;t!==o;++t)i[t]=a[c+t]*l+a[s+t]*e;return i}let f=o*2,p=e-1;for(let l=0;l!==o;
vendor: 9,007 bytes, line 470
470++l){let o=a[c+l],m=a[s+l],h=p*f+l*2,g=d[h],_=d[h+1],v=e*f+l*2,y=u[v],b=u[v+1],x=(n-t)/(r-t),S,C,w,T,E;for(let e=0;e<8;e++){S=x*x,C=S*x,w=1-x,T=w*w,E=T*w;let e=E*t+3*T*x*g+3*w*S*y+C*r-n;if(Math.abs(e)<1e-10)break;let i=3*T*(g-t)+6*w*x*(y-g)+3*S*(r-y);if(Math.abs(i)<1e-10)break;x-=e/i,x=Math.max(0,Math.min(1,x))}i[l]=E*o+3*T*x*_+3*w*S*b+C*m}return i}},G3=class{constructor(e,t,n,r){if(e===void 0)throw Error(`THREE.KeyframeTrack: track name is undefined`);if(t===void 0||t.length===0)throw Error(`THREE.KeyframeTrack: no keyframes in track named `+e);this.name=e,this.times=U3(t,this.TimeBufferType),this.values=U3(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){let t=e.constructor,n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:U3(e.times,Array),values:U3(e.values,Array)};let t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new t6e(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new e6e(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new $3e(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodBezier(e){let t=new n6e(this.times,this.values,this.getValueSize(),e);return this.settings&&(t.settings=this.settings),t}setInterpolation(e){let t;switch(e){case X0:t=this.InterpolantFactoryMethodDiscrete;break;case Z0:t=this.InterpolantFactoryMethodLinear;break;case Q0:t=this.InterpolantFactoryMethodSmooth;break;case $0:t=this.InterpolantFactoryMethodBezier;break}if(t===void 0){let t=`unsupported interpolation for `+this.ValueTypeName+` keyframe track named `+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(t);return h2(`KeyframeTrack:`,t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return X0;case this.InterpolantFactoryMethodLinear:return Z0;case this.InterpolantFactoryMethodSmooth:return Q0;case this.InterpolantFactoryMethodBezier:return $0}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){let t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(e!==1){let t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){let n=this.times,r=n.length,i=0,a=r-1;for(;i!==r&&n[i]<e;)++i;for(;a!==-1&&n[a]>t;)--a;if(++a,i!==0||a!==r){i>=a&&(a=Math.max(a,1),i=a-1);let e=this.getValueSize();this.times=n.slice(i,a),this.values=this.values.slice(i*e,a*e)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(g2(`KeyframeTrack: Invalid value size in track.`,this),e=!1);let n=this.times,r=this.values,i=n.length;i===0&&(g2(`KeyframeTrack: Track is empty.`,this),e=!1);let a=null;for(let t=0;t!==i;t++){let r=n[t];if(typeof r==`number`&&isNaN(r)){g2(`KeyframeTrack: Time is not a valid number.`,this,t,r),e=!1;break}if(a!==null&&a>r){g2(`KeyframeTrack: Out of order keys.`,this,t,r,a),e=!1;break}a=r}if(r!==void 0&&v4e(r))for(let t=0,n=r.length;t!==n;++t){let n=r[t];if(isNaN(n)){g2(`KeyframeTrack: Value is not a valid number.`,this,t,n),e=!1;break}}return e}optimize(){let e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===Q0,i=e.length-1,a=1;for(let o=1;o<i;++o){let i=!1,s=e[o];if(s!==e[o+1]&&(o!==1||s!==e[0]))if(r)i=!0;else{let e=o*n,r=e-n,a=e+n;for(let o=0;o!==n;++o){let n=t[e+o];if(n!==t[r+o]||n!==t[a+o]){i=!0;break}}}if(i){if(o!==a){e[a]=e[o];let r=o*n,i=a*n;for(let e=0;e!==n;++e)t[i+e]=t[r+e]}++a}}if(i>0){e[a]=e[i];for(let e=i*n,r=a*n,o=0;o!==n;++o)t[r+o]=t[e+o];++a}return a===e.length?(this.times=e,this.values=t):(this.times=e.slice(0,a),this.values=t.slice(0,a*n)),this}clone(){let e=this.times.slice(),t=this.values.slice(),n=this.constructor,r=new n(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}};G3.prototype.ValueTypeName=``,G3.prototype.TimeBufferType=Float32Array,G3.prototype.ValueBufferType=Float32Array,G3.prototype.DefaultInterpolation=Z0;var K3=class extends G3{constructor(e,t,n){super(e,t,n)}};K3.prototype.ValueTypeName=`bool`,K3.prototype.ValueBufferType=Array,K3.prototype.DefaultInterpolation=X0,K3.prototype.InterpolantFactoryMethodLinear=void 0,K3.prototype.InterpolantFactoryMethodSmooth=void 0;var r6e=class extends G3{constructor(e,t,n,r){super(e,t,n,r)}};r6e.prototype.ValueTypeName=`color`;var i6e=class extends G3{constructor(e,t,n,r){super(e,t,n,r)}};i6e.prototype.ValueTypeName=`number`;var a6e=class extends W3{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){let i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=(n-t)/(r-t),c=e*o;for(let e=c+o;c!==e;c+=4)A2.slerpFlat(i,0,a,c-o,a,c,s);return i}},o6e=class extends G3{constructor(e,t,n,r){super(e,t,n,r)}InterpolantFactoryMethodLinear(e){return new a6e(this.times,this.values,this.getValueSize(),e)}};o6e.prototype.ValueTypeName=`quaternion`,o6e.prototype.InterpolantFactoryMethodSmooth=void 0;var q3=class extends G3{constructor(e,t,n){super(e,t,n)}};q3.prototype.ValueTypeName=`string`,q3.prototype.ValueBufferType=Array,q3.prototype.DefaultInterpolation=X0,q3.prototype.InterpolantFactoryMethodLinear=void 0,q3.prototype.InterpolantFactoryMethodSmooth=void 0;var s6e=class extends G3{constructor(e,t,n,r){super(e,t,n,r)}};s6e.prototype.ValueTypeName=`vector`;var c6e=new class{constructor(e,t,n){let r=this,i=!1,a=0,o=0,s,c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this._abortController=null,this.itemStart=function(e){o++,i===!1&&r.onStart!==void 0&&r.onStart(e,a,o),i=!0},this.itemEnd=function(e){a++,r.onProgress!==void 0&&r.onProgress(e,a,o),a===o&&(i=!1,r.onLoad!==void 0&&r.onLoad())},this.itemError=function(e){r.onError!==void 0&&r.onError(e)},this.resolveURL=function(e){return s?s(e):e},this.setURLModifier=function(e){return s=e,this},this.addHandler=function(e,t){return c.push(e,t),this},this.removeHandler=function(e){let t=c.indexOf(e);return t!==-1&&c.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=c.length;t<n;t+=2){let n=c[t],r=c[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return r}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||=new AbortController,this._abortController}},l6e=class{constructor(e){this.manager=e===void 0?c6e:e,this.crossOrigin=`anonymous`,this.withCredentials=!1,this.path=``,this.resourcePath=``,this.requestHeader={},typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`observe`,{detail:this}))}load(){}loadAsync(e,t){let n=this;return new Promise(function(r,i){n.load(e,r,t,i)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}abort(){return this}};l6e.DEFAULT_MATERIAL_NAME=`__DEFAULT`;var J3=new X,Y3=new A2,X3=new X,u6e=class extends i4{constructor(){super(),this.isCamera=!0,this.type=`Camera`,this.matrixWorldInverse=new W2,this.projectionMatrix=new W2,this.projectionMatrixInverse=new W2,this.coordinateSystem=l2,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorld.decompose(J3,Y3,X3),X3.x===1&&X3.y===1&&X3.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(J3,Y3,X3.set(1,1,1)).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorld.decompose(J3,Y3,X3),X3.x===1&&X3.y===1&&X3.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(J3,Y3,X3.set(1,1,1)).invert()}clone(){return new this.constructor().copy(this)}},Z3=new X,d6e=new k2,f6e=new k2,Q3=class extends u6e{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type=`PerspectiveCamera`,this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=S2*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(x2*.5*this.fov);return .5*this.getFilmHeight()/e}
vendor: 8,888 bytes, line 470
470getEffectiveFOV(){return S2*2*Math.atan(Math.tan(x2*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){Z3.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Z3.x,Z3.y).multiplyScalar(-e/Z3.z),Z3.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Z3.x,Z3.y).multiplyScalar(-e/Z3.z)}getViewSize(e,t){return this.getViewBounds(e,d6e,f6e),t.subVectors(f6e,d6e)}setViewOffset(e,t,n,r,i,a){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(x2*.5*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r,a=this.view;if(this.view!==null&&this.view.enabled){let e=a.fullWidth,o=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/o,r*=a.width/e,n*=a.height/o}let o=this.filmOffset;o!==0&&(i+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}},p6e=class extends u6e{constructor(e=-1,t=1,n=1,r=-1,i=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type=`OrthographicCamera`,this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,a){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,i=n-e,a=n+e,o=r+t,s=r-t;if(this.view!==null&&this.view.enabled){let e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,a=i+e*this.view.width,o-=t*this.view.offsetY,s=o-t*this.view.height}this.projectionMatrix.makeOrthographic(i,a,o,s,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}},$3=-90,e6=1,m6e=class extends i4{constructor(e,t,n){super(),this.type=`CubeCamera`,this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;let r=new Q3($3,e6,e,t);r.layers=this.layers,this.add(r);let i=new Q3($3,e6,e,t);i.layers=this.layers,this.add(i);let a=new Q3($3,e6,e,t);a.layers=this.layers,this.add(a);let o=new Q3($3,e6,e,t);o.layers=this.layers,this.add(o);let s=new Q3($3,e6,e,t);s.layers=this.layers,this.add(s);let c=new Q3($3,e6,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){let e=this.coordinateSystem,t=this.children.concat(),[n,r,i,a,o,s]=t;for(let e of t)this.remove(e);if(e===2e3)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),s.up.set(0,1,0),s.lookAt(0,0,-1);else if(e===2001)n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),s.up.set(0,-1,0),s.lookAt(0,0,-1);else throw Error(`THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: `+e);for(let e of t)this.add(e),e.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();let{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());let[i,a,o,s,c,l]=this.children,u=e.getRenderTarget(),d=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;let m=n.texture.generateMipmaps;n.texture.generateMipmaps=!1;let h=!1;h=e.isWebGLRenderer===!0?e.state.buffers.depth.getReversed():e.reversedDepthBuffer,e.setRenderTarget(n,0,r),h&&e.autoClear===!1&&e.clearDepth(),e.render(t,i),e.setRenderTarget(n,1,r),h&&e.autoClear===!1&&e.clearDepth(),e.render(t,a),e.setRenderTarget(n,2,r),h&&e.autoClear===!1&&e.clearDepth(),e.render(t,o),e.setRenderTarget(n,3,r),h&&e.autoClear===!1&&e.clearDepth(),e.render(t,s),e.setRenderTarget(n,4,r),h&&e.autoClear===!1&&e.clearDepth(),e.render(t,c),n.texture.generateMipmaps=m,e.setRenderTarget(n,5,r),h&&e.autoClear===!1&&e.clearDepth(),e.render(t,l),e.setRenderTarget(u,d,f),e.xr.enabled=p,n.texture.needsPMREMUpdate=!0}},h6e=class extends Q3{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}},g6e=`\\[\\]\\.:\\/`,_6e=RegExp(`[\\[\\]\\.:\\/]`,`g`),t6=`[^\\[\\]\\.:\\/]`,v6e=`[^`+g6e.replace(`\\.`,``)+`]`,y6e=`((?:WC+[\\/:])*)`.replace(`WC`,t6),b6e=`(WCOD+)?`.replace(`WCOD`,v6e),x6e=`(?:\\.(WC+)(?:\\[(.+)\\])?)?`.replace(`WC`,t6),S6e=`\\.(WC+)(?:\\[(.+)\\])?`.replace(`WC`,t6),C6e=RegExp(`^`+y6e+b6e+x6e+S6e+`$`),w6e=[`material`,`materials`,`bones`,`map`],T6e=class{constructor(e,t,n){let r=n||n6.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();let n=this._targetGroup.nCachedObjects_,r=this._bindings[n];r!==void 0&&r.getValue(e,t)}setValue(e,t){let n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},n6=class e{constructor(t,n,r){this.path=n,this.parsedPath=r||e.parseTrackName(n),this.node=e.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,n,r){return t&&t.isAnimationObjectGroup?new e.Composite(t,n,r):new e(t,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,`_`).replace(_6e,``)}static parseTrackName(e){let t=C6e.exec(e);if(t===null)throw Error(`PropertyBinding: Cannot parse trackName: `+e);let n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(`.`);if(r!==void 0&&r!==-1){let e=n.nodeName.substring(r+1);w6e.indexOf(e)!==-1&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(n.propertyName===null||n.propertyName.length===0)throw Error(`PropertyBinding: can not parse propertyName from trackName: `+e);return n}static findNode(e,t){if(t===void 0||t===``||t===`.`||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){let n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){let n=function(e){for(let r=0;r<e.length;r++){let i=e[r];if(i.name===t||i.uuid===t)return i;let a=n(i.children);if(a)return a}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){let n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)e[t++]=n[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){let n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){let n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}
vendor: 4,150 bytes, line 470
470_setValue_array_setMatrixWorldNeedsUpdate(e,t){let n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let t=this.node,n=this.parsedPath,r=n.objectName,i=n.propertyName,a=n.propertyIndex;if(t||(t=e.findNode(this.rootNode,n.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t){h2(`PropertyBinding: No target node found for track: `+this.path+`.`);return}if(r){let e=n.objectIndex;switch(r){case`materials`:if(!t.material){g2(`PropertyBinding: Can not bind to material as node does not have a material.`,this);return}if(!t.material.materials){g2(`PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.`,this);return}t=t.material.materials;break;case`bones`:if(!t.skeleton){g2(`PropertyBinding: Can not bind to bones as node does not have a skeleton.`,this);return}t=t.skeleton.bones;for(let n=0;n<t.length;n++)if(t[n].name===e){e=n;break}break;case`map`:if(`map`in t){t=t.map;break}if(!t.material){g2(`PropertyBinding: Can not bind to material as node does not have a material.`,this);return}if(!t.material.map){g2(`PropertyBinding: Can not bind to material.map as node.material does not have a map.`,this);return}t=t.material.map;break;default:if(t[r]===void 0){g2(`PropertyBinding: Can not bind to objectName of node undefined.`,this);return}t=t[r]}if(e!==void 0){if(t[e]===void 0){g2(`PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.`,this,t);return}t=t[e]}}let o=t[i];if(o===void 0){let e=n.nodeName;g2(`PropertyBinding: Trying to update property for track: `+e+`.`+i+` but it wasn't found.`,t);return}let s=this.Versioning.None;this.targetObject=t,t.isMaterial===!0?s=this.Versioning.NeedsUpdate:t.isObject3D===!0&&(s=this.Versioning.MatrixWorldNeedsUpdate);let c=this.BindingType.Direct;if(a!==void 0){if(i===`morphTargetInfluences`){if(!t.geometry){g2(`PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.`,this);return}if(!t.geometry.morphAttributes){g2(`PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.`,this);return}t.morphTargetDictionary[a]!==void 0&&(a=t.morphTargetDictionary[a])}c=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=a}else o.fromArray!==void 0&&o.toArray!==void 0?(c=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(c=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=i;this.getValue=this.GetterByBindingType[c],this.setValue=this.SetterByBindingTypeAndVersioning[c][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}};n6.Composite=T6e,n6.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},n6.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},n6.prototype.GetterByBindingType=[n6.prototype._getValue_direct,n6.prototype._getValue_array,n6.prototype._getValue_arrayElement,n6.prototype._getValue_toArray],n6.prototype.SetterByBindingTypeAndVersioning=[[n6.prototype._setValue_direct,n6.prototype._setValue_direct_setNeedsUpdate,n6.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[n6.prototype._setValue_array,n6.prototype._setValue_array_setNeedsUpdate,n6.prototype._setValue_array_setMatr
470ixWorldNeedsUpdate],[n6.prototype._setValue_arrayElement,n6.prototype._setValue_arrayElement_setNeedsUpdate,n6.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[n6.prototype._setValue_fromArray,n6.prototype._setValue_fromArray_setNeedsUpdate,n6.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];var E6e=new W2,D6e=class{constructor(e,t,n=0,r=1/0){this.ray=new b3(e,t),this.near=n,this.far=r,this.camera=null,this.layers=new Z2,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):g2(`Raycaster: Unsupported camera type: `+t.type)}setFromXRController(e){return E6e.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(E6e),this}intersectObject(e,t=!0,n=[]){return r6(e,this,n,t),n.sort(O6e),n}intersectObjects(e,t=!0,n=[]){for(let r=0,i=e.length;r<i;r++)r6(e[r],this,n,t);return n.sort(O6e),n}};function O6e(e,t){return e.distance-t.distance}function r6(e,t,n,r){let i=!0;if(e.layers.test(t.layers)&&e.raycast(t,n)===!1&&(i=!1),i===!0&&r===!0){let r=e.children;for(let e=0,i=r.length;e<i;e++)r6(r[e],t,n,!0)}}var k6e=class{constructor(e=1,t=0,n=0){this.radius=e,this.phi=t,this.theta=n}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){let e=1e-6;return this.phi=w2(this.phi,e,Math.PI-e),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(w2(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}};(class e{static{e.prototype.isMatrix2=!0}constructor(e,t,n,r){this.elements=[1,0,0,1],e!==void 0&&this.set(e,t,n,r)}identity(){return this.set(1,0,0,1),this}fromArray(e,t=0){for(let n=0;n<4;n++)this.elements[n]=e[n+t];return this}set(e,t,n,r){let i=this.elements;return i[0]=e,i[2]=t,i[1]=n,i[3]=r,this}});var A6e=class extends v2{constructor(e,t=null){super(),this.object=e,this.domElement=t,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(e){if(e===void 0){h2(`Controls: connect() now requires an element.`);return}this.domElement!==null&&this.disconnect(),this.domElement=e}disconnect(){}dispose(){}update(){}};function j6e(e,t,n,r){let i=M6e(r);switch(n){case j2e:return e*t;case N2e:return e*t/i.components*i.byteLength;case K0:return e*t/i.components*i.byteLength;case q0:return e*t*2/i.components*i.byteLength;case J0:return e*t*2/i.components*i.byteLength;case M2e:return e*t*3/i.components*i.byteLength;case U0:return e*t*4/i.components*i.byteLength;case Y0:return e*t*4/i.components*i.byteLength;case P2e:case F2e:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case I2e:case L2e:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case z2e:case V2e:return Math.max(e,16)*Math.max(t,8)/4;case R2e:case B2e:return Math.max(e,8)*Math.max(t,8)/2;case H2e:case U2e:case G2e:case K2e:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case W2e:case q2e:case J2e:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case Y2e:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case X2e:return Math.floor((e+4)/5)*Math.floor((t+3)/4)*16;case Z2e:return Math.floor((e+4)/5)*Math.floor((t+4)/5)*16;case Q2e:return Math.floor((e+5)/6)*Math.floor((t+4)/5)*16;case $2e:return Math.floor((e+5)/6)*Math.floor((t+5)/6)*16;case e4e:return Math.floor((e+7)/8)*Math.floor((t+4)/5)*16;case t4e:return Math.floor((e+7)/8)*Math.floor((t+5)/6)*16;case n4e:return Math.floor((e+7)/8)*Math.floor((t+7)/8)*16;case r4e:return Math.floor((e+9)/10)*Math.floor((t+4)/5)*16;case i4e:return Math.floor((e+9)/10)*Math.floor((t+5)/6)*16;case a4e:return Math.floor((e+9)/10)*Math.floor((t+7)/8)*16;case o4e:return Math.floor((e+9)/10)*Math.floor((t+9)/10)*16;case s4e:return Math.floor((e+11)/12)*Math.floor((t+9)/10)*16;case c4e:return Math.floor((e+11)/12)*Math.floor((t+11)/12)*16;case l4e:case u4e:case d4e:return Math.ceil(e/4)*Math.ceil(t/4)*16;case f4e:case p4e:return Math.ceil(e/4)*Math.ceil(t/4)*8;case m4e:case h4e:return Math.ceil(e/4)*Math.ceil(t/4)*16}throw Error(`Unable to determine texture byte length for ${n} format.`)}function M6e(e){switch(e){case F0:case E2e:return{byteLength:1,components:1};case I0:case D2e:case z0:return{byteLength:2,components:1};case B0:case V0:return{byteLength:2,components:4};case L0:case O2e:case R0:return{byteLength:4,components:1};case k2e:case A2e:return{byteLength:4,components:3}}throw Error(`Unknown texture type ${e}.`)}typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`register`,{detail:{revision:`184`}})),typeof window<`u`&&(window.__THREE__?h2(`WARNING: Multiple instances of Three.js being imported.`):window.__THREE__=`184`);function N6e(){let e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),r=e.requestAnimationFrame(i)}return{start:function(){t!==!0&&n!==null&&e!==null&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e!==null&&e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function P6e(e){let t=new WeakMap;function n(t,n){let r=t.array,i=t.usage,a=r.byteLength,o=e.createBuffer();e.bindBuffer(n,o),e.bufferData(n,r,i),t.onUploadCallback();let s;if(r instanceof Float32Array)s=e.FLOAT;else if(typeof Float16Array<`u`&&r instanceof Float16Array)s=e.HALF_FLOAT;else if(r instanceof Uint16Array)s=t.isFloat16BufferAttribute?e.HALF_FLOAT:e.UNSIGNED_SHORT;else if(r instanceof Int16Array)s=e.SHORT;else if(r instanceof Uint32Array)s=e.UNSIGNED_INT;else if(r instanceof Int32Array)s=e.INT;else if(r instanceof Int8Array)s=e.BYTE;else if(r instanceof Uint8Array)s=e.UNSIGNED_BYTE;else if(r instanceof Uint8ClampedArray)s=e.UNSIGNED_BYTE;else throw Error(`THREE.WebGLAttributes: Unsupported buffer data format: `+r);return{buffer:o,type:s,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version,size:a}}function r(t,n,r){let i=n.array,a=n.updateRanges;if(e.bindBuffer(r,t),a.length===0)e.bufferSubData(r,0,i);else{a.sort((e,t)=>
vendor: 4,843 bytes, lines 470-568
470e.start-t.start);let t=0;for(let e=1;e<a.length;e++){let n=a[t],r=a[e];r.start<=n.start+n.count+1?n.count=Math.max(n.count,r.start+r.count-n.start):(++t,a[t]=r)}a.length=t+1;for(let t=0,n=a.length;t<n;t++){let n=a[t];e.bufferSubData(r,n.start*i.BYTES_PER_ELEMENT,i,n.start,n.count)}n.clearUpdateRanges()}n.onUploadCallback()}function i(e){return e.isInterleavedBufferAttribute&&(e=e.data),t.get(e)}function a(n){n.isInterleavedBufferAttribute&&(n=n.data);let r=t.get(n);r&&(e.deleteBuffer(r.buffer),t.delete(n))}function o(e,i){if(e.isInterleavedBufferAttribute&&(e=e.data),e.isGLBufferAttribute){let n=t.get(e);(!n||n.version<e.version)&&t.set(e,{buffer:e.buffer,type:e.type,bytesPerElement:e.elementSize,version:e.version});return}let a=t.get(e);if(a===void 0)t.set(e,n(e,i));else if(a.version<e.version){if(a.size!==e.array.byteLength)throw Error(`THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.`);r(a.buffer,e,i),a.version=e.version}}return{get:i,remove:a,update:o}}var i6={alphahash_fragment:`#ifdef USE_ALPHAHASH 471 if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard; 472#endif`,alphahash_pars_fragment:`#ifdef USE_ALPHAHASH 473 const float ALPHA_HASH_SCALE = 0.05; 474 float hash2D( vec2 value ) { 475 return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) ); 476 } 477 float hash3D( vec3 value ) { 478 return hash2D( vec2( hash2D( value.xy ), value.z ) ); 479 } 480 float getAlphaHashThreshold( vec3 position ) { 481 float maxDeriv = max( 482 length( dFdx( position.xyz ) ), 483 length( dFdy( position.xyz ) ) 484 ); 485 float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv ); 486 vec2 pixScales = vec2( 487 exp2( floor( log2( pixScale ) ) ), 488 exp2( ceil( log2( pixScale ) ) ) 489 ); 490 vec2 alpha = vec2( 491 hash3D( floor( pixScales.x * position.xyz ) ), 492 hash3D( floor( pixScales.y * position.xyz ) ) 493 ); 494 float lerpFactor = fract( log2( pixScale ) ); 495 float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y; 496 float a = min( lerpFactor, 1.0 - lerpFactor ); 497 vec3 cases = vec3( 498 x * x / ( 2.0 * a * ( 1.0 - a ) ), 499 ( x - 0.5 * a ) / ( 1.0 - a ), 500 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) ) 501 ); 502 float threshold = ( x < ( 1.0 - a ) ) 503 ? ( ( x < a ) ? cases.x : cases.y ) 504 : cases.z; 505 return clamp( threshold , 1.0e-6, 1.0 ); 506 } 507#endif`,alphamap_fragment:`#ifdef USE_ALPHAMAP 508 diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g; 509#endif`,alphamap_pars_fragment:`#ifdef USE_ALPHAMAP 510 uniform sampler2D alphaMap; 511#endif`,alphatest_fragment:`#ifdef USE_ALPHATEST 512 #ifdef ALPHA_TO_COVERAGE 513 diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a ); 514 if ( diffuseColor.a == 0.0 ) discard; 515 #else 516 if ( diffuseColor.a < alphaTest ) discard; 517 #endif 518#endif`,alphatest_pars_fragment:`#ifdef USE_ALPHATEST 519 uniform float alphaTest; 520#endif`,aomap_fragment:`#ifdef USE_AOMAP 521 float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0; 522 reflectedLight.indirectDiffuse *= ambientOcclusion; 523 #if defined( USE_CLEARCOAT ) 524 clearcoatSpecularIndirect *= ambientOcclusion; 525 #endif 526 #if defined( USE_SHEEN ) 527 sheenSpecularIndirect *= ambientOcclusion; 528 #endif 529 #if defined( USE_ENVMAP ) && defined( STANDARD ) 530 float dotNV = saturate( dot( geometryNormal, geometryViewDir ) ); 531 reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness ); 532 #endif 533#endif`,aomap_pars_fragment:`#ifdef USE_AOMAP 534 uniform sampler2D aoMap; 535 uniform float aoMapIntensity; 536#endif`,batching_pars_vertex:`#ifdef USE_BATCHING 537 #if ! defined( GL_ANGLE_multi_draw ) 538 #define gl_DrawID _gl_DrawID 539 uniform int _gl_DrawID; 540 #endif 541 uniform highp sampler2D batchingTexture; 542 uniform highp usampler2D batchingIdTexture; 543 mat4 getBatchingMatrix( const in float i ) { 544 int size = textureSize( batchingTexture, 0 ).x; 545 int j = int( i ) * 4; 546 int x = j % size; 547 int y = j / size; 548 vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 ); 549 vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 ); 550 vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 ); 551 vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 ); 552 return mat4( v1, v2, v3, v4 ); 553 } 554 float getIndirectIndex( const in int i ) { 555 int size = textureSize( batchingIdTexture, 0 ).x; 556 int x = i % size; 557 int y = i / size; 558 return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r ); 559 } 560#endif 561#ifdef USE_BATCHING_COLOR 562 uniform sampler2D batchingColorTexture; 563 vec4 getBatchingColor( const in float i ) { 564 int size = textureSize( batchingColorTexture, 0 ).x; 565 int j = int( i ); 566 int x = j % size; 567 int y = j / size; 568 return texelFetch( batchingColorTexture, ivec2( x, y ), 0 )
vendor: 6,787 bytes, lines 568-729
568; 569 } 570#endif`,batching_vertex:`#ifdef USE_BATCHING 571 mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) ); 572#endif`,begin_vertex:`vec3 transformed = vec3( position ); 573#ifdef USE_ALPHAHASH 574 vPosition = vec3( position ); 575#endif`,beginnormal_vertex:`vec3 objectNormal = vec3( normal ); 576#ifdef USE_TANGENT 577 vec3 objectTangent = vec3( tangent.xyz ); 578#endif`,bsdfs:`float G_BlinnPhong_Implicit( ) { 579 return 0.25; 580} 581float D_BlinnPhong( const in float shininess, const in float dotNH ) { 582 return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); 583} 584vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { 585 vec3 halfDir = normalize( lightDir + viewDir ); 586 float dotNH = saturate( dot( normal, halfDir ) ); 587 float dotVH = saturate( dot( viewDir, halfDir ) ); 588 vec3 F = F_Schlick( specularColor, 1.0, dotVH ); 589 float G = G_BlinnPhong_Implicit( ); 590 float D = D_BlinnPhong( shininess, dotNH ); 591 return F * ( G * D ); 592} // validated`,iridescence_fragment:`#ifdef USE_IRIDESCENCE 593 const mat3 XYZ_TO_REC709 = mat3( 594 3.2404542, -0.9692660, 0.0556434, 595 -1.5371385, 1.8760108, -0.2040259, 596 -0.4985314, 0.0415560, 1.0572252 597 ); 598 vec3 Fresnel0ToIor( vec3 fresnel0 ) { 599 vec3 sqrtF0 = sqrt( fresnel0 ); 600 return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 ); 601 } 602 vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) { 603 return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) ); 604 } 605 float IorToFresnel0( float transmittedIor, float incidentIor ) { 606 return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor )); 607 } 608 vec3 evalSensitivity( float OPD, vec3 shift ) { 609 float phase = 2.0 * PI * OPD * 1.0e-9; 610 vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 ); 611 vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 ); 612 vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 ); 613 vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var ); 614 xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) ); 615 xyz /= 1.0685e-7; 616 vec3 rgb = XYZ_TO_REC709 * xyz; 617 return rgb; 618 } 619 vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) { 620 vec3 I; 621 float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); 622 float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); 623 float cosTheta2Sq = 1.0 - sinTheta2Sq; 624 if ( cosTheta2Sq < 0.0 ) { 625 return vec3( 1.0 ); 626 } 627 float cosTheta2 = sqrt( cosTheta2Sq ); 628 float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); 629 float R12 = F_Schlick( R0, 1.0, cosTheta1 ); 630 float T121 = 1.0 - R12; 631 float phi12 = 0.0; 632 if ( iridescenceIOR < outsideIOR ) phi12 = PI; 633 float phi21 = PI - phi12; 634 vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); 635 vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); 636 vec3 phi23 = vec3( 0.0 ); 637 if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; 638 if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; 639 if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; 640 float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; 641 vec3 phi = vec3( phi21 ) + phi23; 642 vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); 643 vec3 r123 = sqrt( R123 ); 644 vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); 645 vec3 C0 = R12 + Rs; 646 I = C0; 647 vec3 Cm = Rs - T121; 648 for ( int m = 1; m <= 2; ++ m ) { 649 Cm *= r123; 650 vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi ); 651 I += Cm * Sm; 652 } 653 return max( I, vec3( 0.0 ) ); 654 } 655#endif`,bumpmap_pars_fragment:`#ifdef USE_BUMPMAP 656 uniform sampler2D bumpMap; 657 uniform float bumpScale; 658 vec2 dHdxy_fwd() { 659 vec2 dSTdx = dFdx( vBumpMapUv ); 660 vec2 dSTdy = dFdy( vBumpMapUv ); 661 float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x; 662 float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll; 663 float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll; 664 return vec2( dBx, dBy ); 665 } 666 vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { 667 vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) ); 668 vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) ); 669 vec3 vN = surf_norm; 670 vec3 R1 = cross( vSigmaY, vN ); 671 vec3 R2 = cross( vN, vSigmaX ); 672 float fDet = dot( vSigmaX, R1 ) * faceDirection; 673 vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); 674 return normalize( abs( fDet ) * surf_norm - vGrad ); 675 } 676#endif`,clipping_planes_fragment:`#if NUM_CLIPPING_PLANES > 0 677 vec4 plane; 678 #ifdef ALPHA_TO_COVERAGE 679 float distanceToPlane, distanceGradient; 680 float clipOpacity = 1.0; 681 #pragma unroll_loop_start 682 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 683 plane = clippingPlanes[ i ]; 684 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 685 distanceGradient = fwidth( distanceToPlane ) / 2.0; 686 clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 687 if ( clipOpacity == 0.0 ) discard; 688 } 689 #pragma unroll_loop_end 690 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 691 float unionClipOpacity = 1.0; 692 #pragma unroll_loop_start 693 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 694 plane = clippingPlanes[ i ]; 695 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 696 distanceGradient = fwidth( distanceToPlane ) / 2.0; 697 unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 698 } 699 #pragma unroll_loop_end 700 clipOpacity *= 1.0 - unionClipOpacity; 701 #endif 702 diffuseColor.a *= clipOpacity; 703 if ( diffuseColor.a == 0.0 ) discard; 704 #else 705 #pragma unroll_loop_start 706 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 707 plane = clippingPlanes[ i ]; 708 if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; 709 } 710 #pragma unroll_loop_end 711 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 712 bool clipped = true; 713 #pragma unroll_loop_start 714 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 715 plane = clippingPlanes[ i ]; 716 clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; 717 } 718 #pragma unroll_loop_end 719 if ( clipped ) discard; 720 #endif 721 #endif 722#endif`,clipping_planes_pars_fragment:`#if NUM_CLIPPING_PLANES > 0 723 varying vec3 vClipPosition; 724 uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; 725#endif`,clipping_planes_pars_vertex:`#if NUM_CLIPPING_PLANES > 0 726 varying vec3 vClipPosition; 727#endif`,clipping_planes_vertex:`#if NUM_CLIPPING_PLANES > 0 728 vClipPosition = - mvPosition.xyz; 729#endif`,color_fragment:`#if defined( USE_COLOR
729 ) || defined( USE_COLOR_ALPHA ) 730 diffuseColor *= vColor; 731#endif`,color_pars_fragment:`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) 732 varying vec4 vColor; 733#endif`,color_pars_vertex:`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 734 varying vec4 vColor; 735#endif`,color_vertex:`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 736 vColor = vec4( 1.0 ); 737#endif 738#ifdef USE_COLOR_ALPHA 739 vColor *= color; 740#elif defined( USE_COLOR ) 741 vColor.rgb *= color; 742#endif 743#ifdef USE_INSTANCING_COLOR 744 vColor.rgb *= instanceColor.rgb; 745#endif 746#ifdef USE_BATCHING_COLOR 747 vColor *= getBatchingColor( getIndirectIndex( gl_DrawID ) ); 748#endif`,common:`#define PI 3.141592653589793 749#define PI2 6.283185307179586 750#define PI_HALF 1.5707963267948966 751#define RECIPROCAL_PI 0.3183098861837907 752#define RECIPROCAL_PI2 0.15915494309189535 753#define EPSILON 1e-6 754#ifndef saturate 755#define saturate( a ) clamp( a, 0.0, 1.0 ) 756#endif 757#define whiteComplement( a ) ( 1.0 - saturate( a ) ) 758float pow2( const in float x ) { return x*x; } 759vec3 pow2( const in vec3 x ) { return x*x; } 760float pow3( const in float x ) { return x*x*x; } 761float pow4( const in float x ) { float x2 = x*x; return x2*x2; } 762float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } 763float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } 764highp float rand( const in vec2 uv ) { 765 const highp float a = 12.9898, b = 78.233, c = 43758.5453; 766 highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); 767 return fract( sin( sn ) * c ); 768} 769#ifdef HIGH_PRECISION 770 float precisionSafeLength( vec3 v ) { return length( v ); } 771#else 772 float precisionSafeLength( vec3 v ) { 773 float maxComponent = max3( abs( v ) ); 774 return length( v / maxComponent ) * maxComponent; 775 } 776#endif 777struct IncidentLight { 778 vec3 color; 779 vec3 direction; 780 bool visible; 781}; 782struct ReflectedLight { 783 vec3 directDiffuse; 784 vec3 directSpecular; 785 vec3 indirectDiffuse; 786 vec3 indirectSpecular; 787}; 788#ifdef USE_ALPHAHASH 789 varying vec3 vPosition; 790#endif 791vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 792 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 793} 794vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { 795 return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz )
vendor: 7,098 bytes, lines 795-977
795; 796} 797bool isPerspectiveMatrix( mat4 m ) { 798 return m[ 2 ][ 3 ] == - 1.0; 799} 800vec2 equirectUv( in vec3 dir ) { 801 float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; 802 float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; 803 return vec2( u, v ); 804} 805vec3 BRDF_Lambert( const in vec3 diffuseColor ) { 806 return RECIPROCAL_PI * diffuseColor; 807} 808vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { 809 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 810 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 811} 812float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { 813 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 814 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 815} // validated`,cube_uv_reflection_fragment:`#ifdef ENVMAP_TYPE_CUBE_UV 816 #define cubeUV_minMipLevel 4.0 817 #define cubeUV_minTileSize 16.0 818 float getFace( vec3 direction ) { 819 vec3 absDirection = abs( direction ); 820 float face = - 1.0; 821 if ( absDirection.x > absDirection.z ) { 822 if ( absDirection.x > absDirection.y ) 823 face = direction.x > 0.0 ? 0.0 : 3.0; 824 else 825 face = direction.y > 0.0 ? 1.0 : 4.0; 826 } else { 827 if ( absDirection.z > absDirection.y ) 828 face = direction.z > 0.0 ? 2.0 : 5.0; 829 else 830 face = direction.y > 0.0 ? 1.0 : 4.0; 831 } 832 return face; 833 } 834 vec2 getUV( vec3 direction, float face ) { 835 vec2 uv; 836 if ( face == 0.0 ) { 837 uv = vec2( direction.z, direction.y ) / abs( direction.x ); 838 } else if ( face == 1.0 ) { 839 uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); 840 } else if ( face == 2.0 ) { 841 uv = vec2( - direction.x, direction.y ) / abs( direction.z ); 842 } else if ( face == 3.0 ) { 843 uv = vec2( - direction.z, direction.y ) / abs( direction.x ); 844 } else if ( face == 4.0 ) { 845 uv = vec2( - direction.x, direction.z ) / abs( direction.y ); 846 } else { 847 uv = vec2( direction.x, direction.y ) / abs( direction.z ); 848 } 849 return 0.5 * ( uv + 1.0 ); 850 } 851 vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { 852 float face = getFace( direction ); 853 float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); 854 mipInt = max( mipInt, cubeUV_minMipLevel ); 855 float faceSize = exp2( mipInt ); 856 highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; 857 if ( face > 2.0 ) { 858 uv.y += faceSize; 859 face -= 3.0; 860 } 861 uv.x += face * faceSize; 862 uv.x += filterInt * 3.0 * cubeUV_minTileSize; 863 uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); 864 uv.x *= CUBEUV_TEXEL_WIDTH; 865 uv.y *= CUBEUV_TEXEL_HEIGHT; 866 #ifdef texture2DGradEXT 867 return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; 868 #else 869 return texture2D( envMap, uv ).rgb; 870 #endif 871 } 872 #define cubeUV_r0 1.0 873 #define cubeUV_m0 - 2.0 874 #define cubeUV_r1 0.8 875 #define cubeUV_m1 - 1.0 876 #define cubeUV_r4 0.4 877 #define cubeUV_m4 2.0 878 #define cubeUV_r5 0.305 879 #define cubeUV_m5 3.0 880 #define cubeUV_r6 0.21 881 #define cubeUV_m6 4.0 882 float roughnessToMip( float roughness ) { 883 float mip = 0.0; 884 if ( roughness >= cubeUV_r1 ) { 885 mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; 886 } else if ( roughness >= cubeUV_r4 ) { 887 mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; 888 } else if ( roughness >= cubeUV_r5 ) { 889 mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; 890 } else if ( roughness >= cubeUV_r6 ) { 891 mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; 892 } else { 893 mip = - 2.0 * log2( 1.16 * roughness ); } 894 return mip; 895 } 896 vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { 897 float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); 898 float mipF = fract( mip ); 899 float mipInt = floor( mip ); 900 vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); 901 if ( mipF == 0.0 ) { 902 return vec4( color0, 1.0 ); 903 } else { 904 vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); 905 return vec4( mix( color0, color1, mipF ), 1.0 ); 906 } 907 } 908#endif`,defaultnormal_vertex:`vec3 transformedNormal = objectNormal; 909#ifdef USE_TANGENT 910 vec3 transformedTangent = objectTangent; 911#endif 912#ifdef USE_BATCHING 913 mat3 bm = mat3( batchingMatrix ); 914 transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); 915 transformedNormal = bm * transformedNormal; 916 #ifdef USE_TANGENT 917 transformedTangent = bm * transformedTangent; 918 #endif 919#endif 920#ifdef USE_INSTANCING 921 mat3 im = mat3( instanceMatrix ); 922 transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); 923 transformedNormal = im * transformedNormal; 924 #ifdef USE_TANGENT 925 transformedTangent = im * transformedTangent; 926 #endif 927#endif 928transformedNormal = normalMatrix * transformedNormal; 929#ifdef FLIP_SIDED 930 transformedNormal = - transformedNormal; 931#endif 932#ifdef USE_TANGENT 933 transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; 934 #ifdef FLIP_SIDED 935 transformedTangent = - transformedTangent; 936 #endif 937#endif`,displacementmap_pars_vertex:`#ifdef USE_DISPLACEMENTMAP 938 uniform sampler2D displacementMap; 939 uniform float displacementScale; 940 uniform float displacementBias; 941#endif`,displacementmap_vertex:`#ifdef USE_DISPLACEMENTMAP 942 transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); 943#endif`,emissivemap_fragment:`#ifdef USE_EMISSIVEMAP 944 vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); 945 #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE 946 emissiveColor = sRGBTransferEOTF( emissiveColor ); 947 #endif 948 totalEmissiveRadiance *= emissiveColor.rgb; 949#endif`,emissivemap_pars_fragment:`#ifdef USE_EMISSIVEMAP 950 uniform sampler2D emissiveMap; 951#endif`,colorspace_fragment:`gl_FragColor = linearToOutputTexel( gl_FragColor );`,colorspace_pars_fragment:`vec4 LinearTransferOETF( in vec4 value ) { 952 return value; 953} 954vec4 sRGBTransferEOTF( in vec4 value ) { 955 return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a ); 956} 957vec4 sRGBTransferOETF( in vec4 value ) { 958 return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); 959}`,envmap_fragment:`#ifdef USE_ENVMAP 960 #ifdef ENV_WORLDPOS 961 vec3 cameraToFrag; 962 if ( isOrthographic ) { 963 cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 964 } else { 965 cameraToFrag = normalize( vWorldPosition - cameraPosition ); 966 } 967 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 968 #ifdef ENVMAP_MODE_REFLECTION 969 vec3 reflectVec = reflect( cameraToFrag, worldNormal ); 970 #else 971 vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); 972 #endif 973 #else 974 vec3 reflectVec = vReflect; 975 #endif 976 #ifdef ENVMAP_TYPE_CUBE 977 vec4 envColor = textureCube( envMap, envMapRotation *
977reflectVec ); 978 #ifdef ENVMAP_BLENDING_MULTIPLY 979 outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); 980 #elif defined( ENVMAP_BLENDING_MIX ) 981 outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); 982 #elif defined( ENVMAP_BLENDING_ADD ) 983 outgoingLight += envColor.xyz * specularStrength * reflectivity; 984 #endif 985 #endif 986#endif`,envmap_common_pars_fragment:`#ifdef USE_ENVMAP 987 uniform float envMapIntensity; 988 uniform mat3 envMapRotation; 989 #ifdef ENVMAP_TYPE_CUBE 990 uniform samplerCube envMap; 991 #else 992 uniform sampler2D envMap; 993 #endif 994#endif`,envmap_pars_fragment:`#ifdef USE_ENVMAP 995 uniform float reflectivity; 996 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 997 #define ENV_WORLDPOS 998 #endif 999 #ifdef ENV_WORLDPOS 1000 varying vec3 vWorldPosition; 1001 uniform float refractionRatio; 1002 #else 1003 varying vec3 vReflect; 1004 #endif 1005#endif`,envmap_pars_vertex:`#ifdef USE_ENVMAP 1006 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 1007 #define ENV_WORLDPOS 1008 #endif 1009 #ifdef ENV_WORLDPOS 1010 1011 varying vec3 vWorldPosition; 1012 #else 1013 varying vec3 vReflect; 1014 uniform float refractionRatio; 1015 #endif 1016#endif`,envmap_physical_pars_fragment:`#ifdef USE_ENVMAP 1017 vec3 getIBLIrradiance( const in vec3 normal ) { 1018 #ifdef ENVMAP_TYPE_CUBE_UV 1019 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 1020 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); 1021 return PI * envMapColor.rgb * envMapIntensity; 1022 #else 1023 return vec3( 0.0 ); 1024 #endif 1025 } 1026 vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { 1027 #ifdef ENVMAP_TYPE_CUBE_UV 1028 vec3 reflectVec = reflect( - viewDir, normal ); 1029 reflectVec = normalize( mix( reflectVec, normal, pow4( roughness )
vendor: 8,183 bytes, lines 1029-1233
1029) ); 1030 reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); 1031 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); 1032 return envMapColor.rgb * envMapIntensity; 1033 #else 1034 return vec3( 0.0 ); 1035 #endif 1036 } 1037 #ifdef USE_ANISOTROPY 1038 vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { 1039 #ifdef ENVMAP_TYPE_CUBE_UV 1040 vec3 bentNormal = cross( bitangent, viewDir ); 1041 bentNormal = normalize( cross( bentNormal, bitangent ) ); 1042 bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); 1043 return getIBLRadiance( viewDir, bentNormal, roughness ); 1044 #else 1045 return vec3( 0.0 ); 1046 #endif 1047 } 1048 #endif 1049#endif`,envmap_vertex:`#ifdef USE_ENVMAP 1050 #ifdef ENV_WORLDPOS 1051 vWorldPosition = worldPosition.xyz; 1052 #else 1053 vec3 cameraToVertex; 1054 if ( isOrthographic ) { 1055 cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 1056 } else { 1057 cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); 1058 } 1059 vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 1060 #ifdef ENVMAP_MODE_REFLECTION 1061 vReflect = reflect( cameraToVertex, worldNormal ); 1062 #else 1063 vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); 1064 #endif 1065 #endif 1066#endif`,fog_vertex:`#ifdef USE_FOG 1067 vFogDepth = - mvPosition.z; 1068#endif`,fog_pars_vertex:`#ifdef USE_FOG 1069 varying float vFogDepth; 1070#endif`,fog_fragment:`#ifdef USE_FOG 1071 #ifdef FOG_EXP2 1072 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); 1073 #else 1074 float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); 1075 #endif 1076 gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); 1077#endif`,fog_pars_fragment:`#ifdef USE_FOG 1078 uniform vec3 fogColor; 1079 varying float vFogDepth; 1080 #ifdef FOG_EXP2 1081 uniform float fogDensity; 1082 #else 1083 uniform float fogNear; 1084 uniform float fogFar; 1085 #endif 1086#endif`,gradientmap_pars_fragment:`#ifdef USE_GRADIENTMAP 1087 uniform sampler2D gradientMap; 1088#endif 1089vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { 1090 float dotNL = dot( normal, lightDirection ); 1091 vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); 1092 #ifdef USE_GRADIENTMAP 1093 return vec3( texture2D( gradientMap, coord ).r ); 1094 #else 1095 vec2 fw = fwidth( coord ) * 0.5; 1096 return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); 1097 #endif 1098}`,lightmap_pars_fragment:`#ifdef USE_LIGHTMAP 1099 uniform sampler2D lightMap; 1100 uniform float lightMapIntensity; 1101#endif`,lights_lambert_fragment:`LambertMaterial material; 1102material.diffuseColor = diffuseColor.rgb; 1103material.specularStrength = specularStrength;`,lights_lambert_pars_fragment:`varying vec3 vViewPosition; 1104struct LambertMaterial { 1105 vec3 diffuseColor; 1106 float specularStrength; 1107}; 1108void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { 1109 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 1110 vec3 irradiance = dotNL * directLight.color; 1111 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1112} 1113void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { 1114 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1115} 1116#define RE_Direct RE_Direct_Lambert 1117#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,lights_pars_begin:`uniform bool receiveShadow; 1118uniform vec3 ambientLightColor; 1119#if defined( USE_LIGHT_PROBES ) 1120 uniform vec3 lightProbe[ 9 ]; 1121#endif 1122vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { 1123 float x = normal.x, y = normal.y, z = normal.z; 1124 vec3 result = shCoefficients[ 0 ] * 0.886227; 1125 result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; 1126 result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; 1127 result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; 1128 result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; 1129 result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; 1130 result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); 1131 result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; 1132 result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); 1133 return result; 1134} 1135vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { 1136 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 1137 vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); 1138 return irradiance; 1139} 1140vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { 1141 vec3 irradiance = ambientLightColor; 1142 return irradiance; 1143} 1144float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { 1145 float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); 1146 if ( cutoffDistance > 0.0 ) { 1147 distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); 1148 } 1149 return distanceFalloff; 1150} 1151float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { 1152 return smoothstep( coneCosine, penumbraCosine, angleCosine ); 1153} 1154#if NUM_DIR_LIGHTS > 0 1155 struct DirectionalLight { 1156 vec3 direction; 1157 vec3 color; 1158 }; 1159 uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; 1160 void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { 1161 light.color = directionalLight.color; 1162 light.direction = directionalLight.direction; 1163 light.visible = true; 1164 } 1165#endif 1166#if NUM_POINT_LIGHTS > 0 1167 struct PointLight { 1168 vec3 position; 1169 vec3 color; 1170 float distance; 1171 float decay; 1172 }; 1173 uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; 1174 void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { 1175 vec3 lVector = pointLight.position - geometryPosition; 1176 light.direction = normalize( lVector ); 1177 float lightDistance = length( lVector ); 1178 light.color = pointLight.color; 1179 light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); 1180 light.visible = ( light.color != vec3( 0.0 ) ); 1181 } 1182#endif 1183#if NUM_SPOT_LIGHTS > 0 1184 struct SpotLight { 1185 vec3 position; 1186 vec3 direction; 1187 vec3 color; 1188 float distance; 1189 float decay; 1190 float coneCos; 1191 float penumbraCos; 1192 }; 1193 uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; 1194 void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { 1195 vec3 lVector = spotLight.position - geometryPosition; 1196 light.direction = normalize( lVector ); 1197 float angleCos = dot( light.direction, spotLight.direction ); 1198 float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); 1199 if ( spotAttenuation > 0.0 ) { 1200 float lightDistance = length( lVector ); 1201 light.color = spotLight.color * spotAttenuation; 1202 light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); 1203 light.visible = ( light.color != vec3( 0.0 ) ); 1204 } else { 1205 light.color = vec3( 0.0 ); 1206 light.visible = false; 1207 } 1208 } 1209#endif 1210#if NUM_RECT_AREA_LIGHTS > 0 1211 struct RectAreaLight { 1212 vec3 color; 1213 vec3 position; 1214 vec3 halfWidth; 1215 vec3 halfHeight; 1216 }; 1217 uniform sampler2D ltc_1; uniform sampler2D ltc_2; 1218 uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; 1219#endif 1220#if NUM_HEMI_LIGHTS > 0 1221 struct HemisphereLight { 1222 vec3 direction; 1223 vec3 skyColor; 1224 vec3 groundColor; 1225 }; 1226 uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; 1227 vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { 1228 float dotNL = dot( normal, hemiLight.direction ); 1229 float hemiDiffuseWeight = 0.5 * dotNL + 0.5; 1230 vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); 1231 return irradiance; 1232 } 1233#endif
1233 1234#include <lightprobes_pars_fragment>`,lights_toon_fragment:`ToonMaterial material; 1235material.diffuseColor = diffuseColor.rgb;`,lights_toon_pars_fragment:`varying vec3 vViewPosition; 1236struct ToonMaterial { 1237 vec3 diffuseColor; 1238}; 1239void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { 1240 vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; 1241 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1242} 1243void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { 1244 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1245} 1246#define RE_Direct RE_Direct_Toon 1247#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,lights_phong_fragment:`BlinnPhongMaterial material; 1248material.diffuseColor = diffuseColor.rgb; 1249material.specularColor = specular; 1250material.specularShininess = shininess; 1251material.specularStrength = specularStrength;`,lights_phong_pars_fragment:`varying vec3 vViewPosition; 1252struct BlinnPhongMaterial { 1253 vec3 diffuseColor; 1254 vec3 specularColor; 1255 float specularShininess; 1256 float specularStrength; 1257}; 1258void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { 1259 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 1260 vec3 irradiance = dotNL * directLight.color; 1261 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1262 reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; 1263} 1264void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { 1265 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 1266} 1267#define RE_Direct RE_Direct_BlinnPhong 1268#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,lights_physical_fragment:`PhysicalMaterial material; 1269material.diffuseColor = diffuseColor.rgb; 1270material.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor ); 1271material.metalness = metalnessFactor; 1272vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); 1273float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); 1274material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; 1275material.roughness = min( material.roughness, 1.0 ); 1276#ifdef IOR 1277 material.ior = ior; 1278 #ifdef USE_SPECULAR 1279 float specularIntensityFactor = specularIntensity; 1280 vec3 specularColorFactor = specularColor; 1281 #ifdef USE_SPECULAR_COLORMAP 1282 specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; 1283 #endif 1284 #ifdef USE_SPECULAR_INTENSITYMAP 1285 specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; 1286 #endif 1287 material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); 1288 #else 1289 float specularIntensityFactor = 1.0; 1290 vec3 specularColorFactor = vec3( 1.0 ); 1291 material.specularF90 = 1.0; 1292 #endif 1293 material.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor; 1294 material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor ); 1295#else 1296 material.specularColor = vec3( 0.04 ); 1297 material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor ); 1298 material.specularF90 = 1.0; 1299#endif 1300#ifdef USE_CLEARCOAT 1301 material.clearcoat = clearcoat; 1302 material.clearcoatRoughness = clearcoatRoughness; 1303 material.clearcoatF0 = vec3( 0.04 ); 1304 material.clearcoatF90 = 1.0; 1305 #ifdef USE_CLEARCOATMAP 1306 material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; 1307 #endif 1308 #ifdef USE_CLEARCOAT_ROUGHNESSMAP 1309 material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; 1310 #endif 1311 material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); 1312 material.clearcoatRoughness += geometryRoughness; 1313 material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); 1314#endif 1315#ifdef USE_DISPERSION
1316 material.dispersion = dispersion; 1317#endif 1318#ifdef USE_IRIDESCENCE 1319 material.iridescence = iridescence; 1320 material.iridescenceIOR = iridescenceIOR; 1321 #ifdef USE_IRIDESCENCEMAP 1322 material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; 1323 #endif 1324 #ifdef USE_IRIDESCENCE_THICKNESSMAP 1325 material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; 1326 #else 1327 material.iridescenceThickness = iridescenceThicknessMaximum; 1328 #endif 1329#endif 1330#ifdef USE_SHEEN 1331 material.sheenColor = sheenColor; 1332 #ifdef USE_SHEEN_COLORMAP 1333 material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; 1334 #endif 1335 material.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 ); 1336 #ifdef USE_SHEEN_ROUGHNESSMAP 1337 material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; 1338 #endif 1339#endif 1340#ifdef USE_ANISOTROPY 1341 #ifdef USE_ANISOTROPYMAP 1342 mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); 1343 vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; 1344 vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; 1345 #else 1346 vec2 anisotropyV = anisotropyVector; 1347 #endif 1348 material.anisotropy = length( anisotropyV ); 1349 if( material.anisotropy == 0.0 ) { 1350 anisotropyV = vec2( 1.0, 0.0 ); 1351 } else { 1352 anisotropyV /= material.anisotropy; 1353 material.anisotropy = saturate( material.anisotropy ); 1354 } 1355 material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); 1356 material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; 1357 material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; 1358#endif`,lights_physical_pars_fragment:`uniform sampler2D dfgLUT; 1359struct PhysicalMaterial { 1360 vec3 diffuseColor; 1361 vec3 diffuseContribution; 1362 vec3 specularColor; 1363 vec3 specularColorBlended; 1364 float roughness; 1365 float metalness; 1366 float specularF90; 1367 float dispersion; 1368 #ifdef USE_CLEARCOAT 1369 float clearcoat; 1370 float clearcoatRoughness; 1371 vec3 clearcoatF0; 1372 float clearcoatF90; 1373 #endif 1374 #ifdef USE_IRIDESCENCE 1375 float iridescence; 1376 float iridescenceIOR; 1377 float iridescenceThickness; 1378 vec3 iridescenceFresnel; 1379 vec3 iridescenceF0; 1380 vec3 iridescenceFresnelDielectric; 1381 vec3 iridescenceFresnelMetallic; 1382 #endif 1383 #ifdef USE_SHEEN 1384 vec3 sheenColor; 1385 float sheenRoughness; 1386 #endif 1387 #ifdef IOR 1388 float ior; 1389 #endif 1390 #ifdef USE_TRANSMISSION 1391 float transmission; 1392 float transmissionAlpha; 1393 float thickness; 1394 float attenuationDistance; 1395 vec3 attenuationColor; 1396 #endif 1397 #ifdef USE_ANISOTROPY 1398 float anisotropy; 1399 float alphaT; 1400 vec3 anisotropyT; 1401 vec3 anisotropyB; 1402 #endif 1403}; 1404vec3 clearcoatSpecularDirect = vec3( 0.0 ); 1405vec3 clearcoatSpecularIndirect = vec3( 0.0 ); 1406vec3 sheenSpecularDirect = vec3( 0.0 ); 1407vec3 sheenSpecularIndirect = vec3(0.0 ); 1408vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { 1409 float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); 1410 float x2 = x * x; 1411 float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); 1412 return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); 1413} 1414float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { 1415 float a2 = pow2( alpha ); 1416 float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); 1417 float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); 1418 return 0.5 / max( gv + gl, EPSILON ); 1419} 1420float D_GGX( const in float alpha, const in float dotNH ) { 1421 float a2 = pow2( alpha ); 1422 float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; 1423 return RECIPROCAL_PI * a2 / pow2( denom ); 1424} 1425#ifdef USE_ANISOTROPY 1426 float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { 1427 float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); 1428 float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); 1429 return 0.5 / max( gv + gl, EPSILON )
vendor: 3,169 bytes, lines 1429-1504
1429; 1430 } 1431 float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { 1432 float a2 = alphaT * alphaB; 1433 highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); 1434 highp float v2 = dot( v, v ); 1435 float w2 = a2 / v2; 1436 return RECIPROCAL_PI * a2 * pow2 ( w2 ); 1437 } 1438#endif 1439#ifdef USE_CLEARCOAT 1440 vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { 1441 vec3 f0 = material.clearcoatF0; 1442 float f90 = material.clearcoatF90; 1443 float roughness = material.clearcoatRoughness; 1444 float alpha = pow2( roughness ); 1445 vec3 halfDir = normalize( lightDir + viewDir ); 1446 float dotNL = saturate( dot( normal, lightDir ) ); 1447 float dotNV = saturate( dot( normal, viewDir ) ); 1448 float dotNH = saturate( dot( normal, halfDir ) ); 1449 float dotVH = saturate( dot( viewDir, halfDir ) ); 1450 vec3 F = F_Schlick( f0, f90, dotVH ); 1451 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1452 float D = D_GGX( alpha, dotNH ); 1453 return F * ( V * D ); 1454 } 1455#endif 1456vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { 1457 vec3 f0 = material.specularColorBlended; 1458 float f90 = material.specularF90; 1459 float roughness = material.roughness; 1460 float alpha = pow2( roughness ); 1461 vec3 halfDir = normalize( lightDir + viewDir ); 1462 float dotNL = saturate( dot( normal, lightDir ) ); 1463 float dotNV = saturate( dot( normal, viewDir ) ); 1464 float dotNH = saturate( dot( normal, halfDir ) ); 1465 float dotVH = saturate( dot( viewDir, halfDir ) ); 1466 vec3 F = F_Schlick( f0, f90, dotVH ); 1467 #ifdef USE_IRIDESCENCE 1468 F = mix( F, material.iridescenceFresnel, material.iridescence ); 1469 #endif 1470 #ifdef USE_ANISOTROPY 1471 float dotTL = dot( material.anisotropyT, lightDir ); 1472 float dotTV = dot( material.anisotropyT, viewDir ); 1473 float dotTH = dot( material.anisotropyT, halfDir ); 1474 float dotBL = dot( material.anisotropyB, lightDir ); 1475 float dotBV = dot( material.anisotropyB, viewDir ); 1476 float dotBH = dot( material.anisotropyB, halfDir ); 1477 float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); 1478 float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); 1479 #else 1480 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1481 float D = D_GGX( alpha, dotNH ); 1482 #endif 1483 return F * ( V * D ); 1484} 1485vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { 1486 const float LUT_SIZE = 64.0; 1487 const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; 1488 const float LUT_BIAS = 0.5 / LUT_SIZE; 1489 float dotNV = saturate( dot( N, V ) ); 1490 vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); 1491 uv = uv * LUT_SCALE + LUT_BIAS; 1492 return uv; 1493} 1494float LTC_ClippedSphereFormFactor( const in vec3 f ) { 1495 float l = length( f ); 1496 return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); 1497} 1498vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { 1499 float x = dot( v1, v2 ); 1500 float y = abs( x ); 1501 float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; 1502 float b = 3.4175940 + ( 4.1616724 + y ) * y; 1503 float v = a / b; 1504 float theta_sintheta = ( x >
vendor: 4,203 bytes, lines 1504-1588
1504 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; 1505 return cross( v1, v2 ) * theta_sintheta; 1506} 1507vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { 1508 vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; 1509 vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; 1510 vec3 lightNormal = cross( v1, v2 ); 1511 if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); 1512 vec3 T1, T2; 1513 T1 = normalize( V - N * dot( V, N ) ); 1514 T2 = - cross( N, T1 ); 1515 mat3 mat = mInv * transpose( mat3( T1, T2, N ) ); 1516 vec3 coords[ 4 ]; 1517 coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); 1518 coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); 1519 coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); 1520 coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); 1521 coords[ 0 ] = normalize( coords[ 0 ] ); 1522 coords[ 1 ] = normalize( coords[ 1 ] ); 1523 coords[ 2 ] = normalize( coords[ 2 ] ); 1524 coords[ 3 ] = normalize( coords[ 3 ] ); 1525 vec3 vectorFormFactor = vec3( 0.0 ); 1526 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); 1527 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); 1528 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); 1529 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); 1530 float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); 1531 return vec3( result ); 1532} 1533#if defined( USE_SHEEN ) 1534float D_Charlie( float roughness, float dotNH ) { 1535 float alpha = pow2( roughness ); 1536 float invAlpha = 1.0 / alpha; 1537 float cos2h = dotNH * dotNH; 1538 float sin2h = max( 1.0 - cos2h, 0.0078125 ); 1539 return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); 1540} 1541float V_Neubelt( float dotNV, float dotNL ) { 1542 return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); 1543} 1544vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { 1545 vec3 halfDir = normalize( lightDir + viewDir ); 1546 float dotNL = saturate( dot( normal, lightDir ) ); 1547 float dotNV = saturate( dot( normal, viewDir ) ); 1548 float dotNH = saturate( dot( normal, halfDir ) ); 1549 float D = D_Charlie( sheenRoughness, dotNH ); 1550 float V = V_Neubelt( dotNV, dotNL ); 1551 return sheenColor * ( D * V ); 1552} 1553#endif 1554float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { 1555 float dotNV = saturate( dot( normal, viewDir ) ); 1556 float r2 = roughness * roughness; 1557 float rInv = 1.0 / ( roughness + 0.1 ); 1558 float a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv; 1559 float b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv; 1560 float DG = exp( a * dotNV + b ); 1561 return saturate( DG ); 1562} 1563vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { 1564 float dotNV = saturate( dot( normal, viewDir ) ); 1565 vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg; 1566 return specularColor * fab.x + specularF90 * fab.y; 1567} 1568#ifdef USE_IRIDESCENCE 1569void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { 1570#else 1571void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { 1572#endif 1573 float dotNV = saturate( dot( normal, viewDir ) ); 1574 vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg; 1575 #ifdef USE_IRIDESCENCE 1576 vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); 1577 #else 1578 vec3 Fr = specularColor; 1579 #endif 1580 vec3 FssEss = Fr * fab.x + specularF90 * fab.y; 1581 float Ess = fab.x + fab.y; 1582 float Ems = 1.0 - Ess; 1583 vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); 1584 singleScatter += FssEss; 1585 multiScatter += Fms * Ems; 1586} 1587vec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { 1588 vec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material );
vendor: 6,009 bytes, lines 1589-1687
1589 float dotNL = saturate( dot( normal, lightDir ) ); 1590 float dotNV = saturate( dot( normal, viewDir ) ); 1591 vec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg; 1592 vec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg; 1593 vec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y; 1594 vec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y; 1595 float Ess_V = dfgV.x + dfgV.y; 1596 float Ess_L = dfgL.x + dfgL.y; 1597 float Ems_V = 1.0 - Ess_V; 1598 float Ems_L = 1.0 - Ess_L; 1599 vec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619; 1600 vec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON ); 1601 float compensationFactor = Ems_V * Ems_L; 1602 vec3 multiScatter = Fms * compensationFactor; 1603 return singleScatter + multiScatter; 1604} 1605#if NUM_RECT_AREA_LIGHTS > 0 1606 void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { 1607 vec3 normal = geometryNormal; 1608 vec3 viewDir = geometryViewDir; 1609 vec3 position = geometryPosition; 1610 vec3 lightPos = rectAreaLight.position; 1611 vec3 halfWidth = rectAreaLight.halfWidth; 1612 vec3 halfHeight = rectAreaLight.halfHeight; 1613 vec3 lightColor = rectAreaLight.color; 1614 float roughness = material.roughness; 1615 vec3 rectCoords[ 4 ]; 1616 rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; 1617 rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; 1618 rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; 1619 vec2 uv = LTC_Uv( normal, viewDir, roughness ); 1620 vec4 t1 = texture2D( ltc_1, uv ); 1621 vec4 t2 = texture2D( ltc_2, uv ); 1622 mat3 mInv = mat3( 1623 vec3( t1.x, 0, t1.y ), 1624 vec3( 0, 1, 0 ), 1625 vec3( t1.z, 0, t1.w ) 1626 ); 1627 vec3 fresnel = ( material.specularColorBlended * t2.x + ( material.specularF90 - material.specularColorBlended ) * t2.y ); 1628 reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); 1629 reflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); 1630 #ifdef USE_CLEARCOAT 1631 vec3 Ncc = geometryClearcoatNormal; 1632 vec2 uvClearcoat = LTC_Uv( Ncc, viewDir, material.clearcoatRoughness ); 1633 vec4 t1Clearcoat = texture2D( ltc_1, uvClearcoat ); 1634 vec4 t2Clearcoat = texture2D( ltc_2, uvClearcoat ); 1635 mat3 mInvClearcoat = mat3( 1636 vec3( t1Clearcoat.x, 0, t1Clearcoat.y ), 1637 vec3( 0, 1, 0 ), 1638 vec3( t1Clearcoat.z, 0, t1Clearcoat.w ) 1639 ); 1640 vec3 fresnelClearcoat = material.clearcoatF0 * t2Clearcoat.x + ( material.clearcoatF90 - material.clearcoatF0 ) * t2Clearcoat.y; 1641 clearcoatSpecularDirect += lightColor * fresnelClearcoat * LTC_Evaluate( Ncc, viewDir, position, mInvClearcoat, rectCoords ); 1642 #endif 1643 } 1644#endif 1645void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { 1646 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 1647 vec3 irradiance = dotNL * directLight.color; 1648 #ifdef USE_CLEARCOAT 1649 float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); 1650 vec3 ccIrradiance = dotNLcc * directLight.color; 1651 clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); 1652 #endif 1653 #ifdef USE_SHEEN 1654 1655 sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); 1656 1657 float sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1658 float sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness ); 1659 1660 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL ); 1661 1662 irradiance *= sheenEnergyComp; 1663 1664 #endif 1665 reflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material ); 1666 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution ); 1667} 1668void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { 1669 vec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution ); 1670 #ifdef USE_SHEEN 1671 float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1672 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo; 1673 diffuse *= sheenEnergyComp; 1674 #endif 1675 reflectedLight.indirectDiffuse += diffuse; 1676} 1677void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { 1678 #ifdef USE_CLEARCOAT 1679 clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); 1680 #endif 1681 #ifdef USE_SHEEN 1682 sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI; 1683 #endif 1684 vec3 singleScatteringDielectric = vec3( 0.0 ); 1685 vec3 multiScatteringDielectric = vec3( 0.0 ); 1686 vec3 singleScatteringMetallic = vec3( 0.0 ); 1687 vec3 multiScatteringMetallic = vec3( 0.0 );
vendor: 8,137 bytes, lines 1688-1830
1688 #ifdef USE_IRIDESCENCE 1689 computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric ); 1690 computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic ); 1691 #else 1692 computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric ); 1693 computeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic ); 1694 #endif 1695 vec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness ); 1696 vec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness ); 1697 vec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric; 1698 vec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric ); 1699 vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; 1700 vec3 indirectSpecular = radiance * singleScattering; 1701 indirectSpecular += multiScattering * cosineWeightedIrradiance; 1702 vec3 indirectDiffuse = diffuse * cosineWeightedIrradiance; 1703 #ifdef USE_SHEEN 1704 float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1705 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo; 1706 indirectSpecular *= sheenEnergyComp; 1707 indirectDiffuse *= sheenEnergyComp; 1708 #endif 1709 reflectedLight.indirectSpecular += indirectSpecular; 1710 reflectedLight.indirectDiffuse += indirectDiffuse; 1711} 1712#define RE_Direct RE_Direct_Physical 1713#define RE_Direct_RectArea RE_Direct_RectArea_Physical 1714#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical 1715#define RE_IndirectSpecular RE_IndirectSpecular_Physical 1716float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { 1717 return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); 1718}`,lights_fragment_begin:` 1719vec3 geometryPosition = - vViewPosition; 1720vec3 geometryNormal = normal; 1721vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); 1722vec3 geometryClearcoatNormal = vec3( 0.0 ); 1723#ifdef USE_CLEARCOAT 1724 geometryClearcoatNormal = clearcoatNormal; 1725#endif 1726#ifdef USE_IRIDESCENCE 1727 float dotNVi = saturate( dot( normal, geometryViewDir ) ); 1728 if ( material.iridescenceThickness == 0.0 ) { 1729 material.iridescence = 0.0; 1730 } else { 1731 material.iridescence = saturate( material.iridescence ); 1732 } 1733 if ( material.iridescence > 0.0 ) { 1734 material.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); 1735 material.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor ); 1736 material.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness ); 1737 material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); 1738 } 1739#endif 1740IncidentLight directLight; 1741#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) 1742 PointLight pointLight; 1743 #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 1744 PointLightShadow pointLightShadow; 1745 #endif 1746 #pragma unroll_loop_start 1747 for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { 1748 pointLight = pointLights[ i ]; 1749 getPointLightInfo( pointLight, geometryPosition, directLight ); 1750 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) ) 1751 pointLightShadow = pointLightShadows[ i ]; 1752 directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; 1753 #endif 1754 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1755 } 1756 #pragma unroll_loop_end 1757#endif 1758#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) 1759 SpotLight spotLight; 1760 vec4 spotColor; 1761 vec3 spotLightCoord; 1762 bool inSpotLightMap; 1763 #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 1764 SpotLightShadow spotLightShadow; 1765 #endif 1766 #pragma unroll_loop_start 1767 for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { 1768 spotLight = spotLights[ i ]; 1769 getSpotLightInfo( spotLight, geometryPosition, directLight ); 1770 #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1771 #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX 1772 #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1773 #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS 1774 #else 1775 #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1776 #endif 1777 #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) 1778 spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; 1779 inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); 1780 spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); 1781 directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; 1782 #endif 1783 #undef SPOT_LIGHT_MAP_INDEX 1784 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1785 spotLightShadow = spotLightShadows[ i ]; 1786 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 1787 #endif 1788 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1789 } 1790 #pragma unroll_loop_end 1791#endif 1792#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) 1793 DirectionalLight directionalLight; 1794 #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 1795 DirectionalLightShadow directionalLightShadow; 1796 #endif 1797 #pragma unroll_loop_start 1798 for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { 1799 directionalLight = directionalLights[ i ]; 1800 getDirectionalLightInfo( directionalLight, directLight ); 1801 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) 1802 directionalLightShadow = directionalLightShadows[ i ]; 1803 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 1804 #endif 1805 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1806 } 1807 #pragma unroll_loop_end 1808#endif 1809#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) 1810 RectAreaLight rectAreaLight; 1811 #pragma unroll_loop_start 1812 for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { 1813 rectAreaLight = rectAreaLights[ i ]; 1814 RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1815 } 1816 #pragma unroll_loop_end 1817#endif 1818#if defined( RE_IndirectDiffuse ) 1819 vec3 iblIrradiance = vec3( 0.0 ); 1820 vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); 1821 #if defined( USE_LIGHT_PROBES ) 1822 irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); 1823 #endif 1824 #if ( NUM_HEMI_LIGHTS > 0 ) 1825 #pragma unroll_loop_start 1826 for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { 1827 irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); 1828 } 1829 #pragma unroll_loop_end 1830 #endif
1831 #ifdef USE_LIGHT_PROBES_GRID 1832 vec3 probeWorldPos = ( ( vec4( geometryPosition, 1.0 ) - viewMatrix[ 3 ] ) * viewMatrix ).xyz; 1833 vec3 probeWorldNormal = inverseTransformDirection( geometryNormal, viewMatrix ); 1834 irradiance += getLightProbeGridIrradiance( probeWorldPos, probeWorldNormal ); 1835 #endif 1836#endif 1837#if defined( RE_IndirectSpecular ) 1838 vec3 radiance = vec3( 0.0 ); 1839 vec3 clearcoatRadiance = vec3( 0.0 ); 1840#endif`,lights_fragment_maps:`#if defined( RE_IndirectDiffuse ) 1841 #ifdef USE_LIGHTMAP 1842 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 1843 vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; 1844 irradiance += lightMapIrradiance; 1845 #endif 1846 #if defined( USE_ENVMAP ) && defined( ENVMAP_TYPE_CUBE_UV ) 1847 #if defined( STANDARD ) || defined( LAMBERT ) || defined( PHONG ) 1848 iblIrradiance += getIBLIrradiance( geometryNormal ); 1849 #endif 1850 #endif 1851#endif 1852#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) 1853 #ifdef USE_ANISOTROPY 1854 radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); 1855 #else 1856 radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); 1857 #endif 1858 #ifdef USE_CLEARCOAT 1859 clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); 1860 #endif 1861#endif`,lights_fragment_end:`#if defined( RE_IndirectDiffuse ) 1862 #if defined( LAMBERT ) || defined( PHONG ) 1863 irradiance += iblIrradiance; 1864 #endif 1865 RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1866#endif 1867#if defined( RE_IndirectSpecular ) 1868 RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1869#endif`,lightprobes_pars_fragment:`#ifdef USE_LIGHT_PROBES_GRID 1870uniform highp sampler3D probesSH; 1871uniform vec3 probesMin; 1872uniform vec3 probesMax; 1873uniform vec3 probesResolution; 1874vec3 getLightProbeGridIrradiance( vec3 worldPos, vec3 worldNormal ) { 1875 vec3 res = probesResolution; 1876 vec3 gridRange = probesMax - probesMin; 1877 vec3 resMinusOne = res - 1.0; 1878 vec3 probeSpacing = gridRange / resMinusOne; 1879 vec3 samplePos = worldPos + worldNormal * probeSpacing * 0.5; 1880 vec3 uvw = clamp( ( samplePos - probesMin ) / gridRange, 0.0, 1.0 ); 1881 uvw = uvw * resMinusOne / res + 0.5 / res; 1882 float nz = res.z; 1883 float paddedSlices = nz + 2.0; 1884 float atlasDepth = 7.0 * paddedSlices; 1885 float uvZBase = uvw.z * nz + 1.0; 1886 vec4 s0 = texture( probesSH, vec3( uvw.xy, ( uvZBase ) / atlasDepth ) ); 1887 vec4 s1 = texture( probesSH, vec3( uvw.xy, ( uvZBase + paddedSlices ) / atlasDepth ) ); 1888 vec4 s2 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 2.0 * paddedSlices ) / atlasDepth ) ); 1889 vec4 s3 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 3.0 * paddedSlices ) / atlasDepth ) ); 1890 vec4 s4 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 4.0 * paddedSlices ) / atlasDepth ) ); 1891 vec4 s5 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 5.0 * paddedSlices ) / atlasDepth ) ); 1892 vec4 s6 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 6.0 * paddedSlices ) / atlasDepth ) ); 1893 vec3 c0 = s0.xyz; 1894 vec3 c1 = vec3( s0.w, s1.xy ); 1895 vec3 c2 = vec3( s1.zw, s2.x ); 1896 vec3 c3 = s2.yzw; 1897 vec3 c4 = s3.xyz; 1898 vec3 c5 = vec3( s3.w, s4.xy ); 1899 vec3 c6 = vec3( s4.zw, s5.x ); 1900 vec3 c7 = s5.yzw; 1901 vec3 c8 = s6.xyz; 1902 float x = worldNormal.x, y = worldNormal.y, z = worldNormal.z; 1903 vec3 result = c0 * 0.886227; 1904 result += c1 * 2.0 * 0.511664 * y; 1905 result += c2 * 2.0 * 0.511664 * z; 1906 result += c3 * 2.0 * 0.511664 * x; 1907 result += c4 * 2.0 * 0.429043 * x * y; 1908 result += c5 * 2.0 * 0.429043 * y * z; 1909 result += c6 * ( 0.743125 * z * z - 0.247708 ); 1910 result += c7 * 2.0 * 0.429043 * x * z; 1911 result += c8 * 0.429043 * ( x * x - y * y ); 1912 return max( result, vec3( 0.0 ) ); 1913} 1914#endif`,logdepthbuf_fragment:`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) 1915 gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; 1916#endif`,logdepthbuf_pars_fragment:`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) 1917 uniform float logDepthBufFC; 1918 varying float vFragDepth; 1919 varying float vIsPerspective; 1920#endif`,logdepthbuf_pars_vertex:`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER 1921 varying float vFragDepth; 1922 varying float vIsPerspective; 1923#endif`,logdepthbuf_vertex:`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER 1924 vFragDepth = 1.0 + gl_Position.w; 1925 vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); 1926#endif`,map_fragment:`#ifdef USE_MAP 1927 vec4 sampledDiffuseColor = texture2D( map, vMapUv ); 1928 #ifdef DECODE_VIDEO_TEXTURE 1929 sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); 1930 #endif 1931 diffuseColor *= sampledDiffuseColor; 1932#endif`,map_pars_fragment:`#ifdef USE_MAP 1933 uniform sampler2D map; 1934#endif`,map_particle_fragment:`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1935 #if defined( USE_POINTS_UV ) 1936 vec2 uv = vUv; 1937 #else 1938 vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; 1939 #endif 1940#endif 1941#ifdef USE_MAP 1942 diffuseColor *= texture2D( map, uv ); 1943#endif 1944#ifdef USE_ALPHAMAP 1945 diffuseColor.a *= texture2D( alphaMap, uv ).g; 1946#endif`,map_particle_pars_fragment:`#if defined( USE_POINTS_UV ) 1947 varying vec2 vUv; 1948#else 1949 #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1950 uniform mat3 uvTransform; 1951 #endif 1952#endif 1953#ifdef USE_MAP 1954 uniform sampler2D map; 1955#endif 1956#ifdef USE_ALPHAMAP 1957 uniform sampler2D alphaMap; 1958#endif`,metalnessmap_fragment:`float metalnessFactor = metalness; 1959#ifdef USE_METALNESSMAP 1960 vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); 1961 metalnessFactor *= texelMetalness.b; 1962#endif`,metalnessmap_pars_fragment:`#ifdef USE_METALNESSMAP 1963 uniform sampler2D metalnessMap; 1964#endif`,morphinstance_vertex:`#ifdef USE_INSTANCING_MORPH 1965 float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1966 float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; 1967 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1968 morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; 1969 } 1970#endif`,morphcolor_vertex:`#if defined( USE_MORPHCOLORS ) 1971 vColor *= morphTargetBaseInfluence; 1972 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1973 #if defined( USE_COLOR_ALPHA ) 1974 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; 1975 #elif defined( USE_COLOR ) 1976 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; 1977 #endif 1978 } 1979#endif`,morphnormal_vertex:`#ifdef USE_MORPHNORMALS 1980 objectNormal *= morphTargetBaseInfluence; 1981 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1982 if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; 1983 } 1984#endif`,morphtarget_pars_vertex:`#ifdef USE_MORPHTARGETS 1985 #ifndef USE_INSTANCING_MORPH 1986 uniform float morphTargetBaseInfluence; 1987 uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1988 #endif 1989 uniform sampler2DArray morphTargetsTexture; 1990 uniform ivec2 morphTargetsTextureSize; 1991 vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { 1992 int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; 1993 int y = texelIndex / morphTargetsTextureSize.x; 1994 int x = texelIndex - y * morphTargetsTextureSize.x; 1995 ivec3 morphUV = ivec3( x, y, morphTargetIndex ); 1996 return texelFetch( morphTargetsTexture, morphUV, 0 ); 1997 } 1998#endif`,morphtarget_vertex:`#ifdef USE_MORPHTARGETS 1999 transformed *= morphTargetBaseInfluence; 2000 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 2001 if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; 2002 } 2003#endif`,normal_fragment_begin:`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; 2004#ifdef FLAT_SHADED 2005 vec3 fdx = dFdx( vViewPosition ); 2006 vec3 fdy = dFdy( vViewPosition ); 2007 vec3 normal = normalize( cross( fdx, fdy ) ); 2008#else 2009 vec3 normal = normalize( vNormal ); 2010 #ifdef DOUBLE_SIDED 2011 normal *= faceDirection; 2012 #endif 2013#endif 2014#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) 2015 #ifdef USE_TANGENT 2016 mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 2017 #else 2018 mat3 tbn = getTangentFrame( - vViewPosition, normal, 2019 #if defined( USE_NORMALMAP ) 2020 vNormalMapUv 2021 #elif defined( USE_CLEARCOAT_NORMALMAP ) 2022 vClearcoatNormalMapUv 2023 #else 2024 vUv 2025 #endif 2026 ); 2027 #endif 2028 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 2029 tbn[0] *= faceDirection; 2030 tbn[1] *= faceDirection; 2031 #endif 2032#endif 2033#ifdef USE_CLEARCOAT_NORMALMAP 2034 #ifdef USE_TANGENT 2035 mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 2036 #else 2037 mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); 2038 #endif 2039 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 2040 tbn2[0] *= faceDirection; 2041 tbn2[1] *= faceDirection; 2042 #endif 2043#endif 2044vec3 nonPerturbedNormal = normal;`,normal_fragment_maps:`#ifdef USE_NORMALMAP_OBJECTSPACE 2045 normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 2046 #ifdef FLIP_SIDED 2047 normal = - normal; 2048 #endif 2049 #ifdef DOUBLE_SIDED 2050 normal = normal * faceDirection; 2051 #endif 2052 normal = normalize( normalMatrix * normal ); 2053#elif defined( USE_NORMALMAP_TANGENTSPACE ) 2054 vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 2055 #if defined( USE_PACKED_NORMALMAP ) 2056 mapN = vec3( mapN.xy, sqrt( saturate( 1.0 - dot( mapN.xy, mapN.xy ) ) ) ); 2057 #endif
vendor: 4,891 bytes, lines 2057-2190
2057 2058 mapN.xy *= normalScale; 2059 normal = normalize( tbn * mapN ); 2060#elif defined( USE_BUMPMAP ) 2061 normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); 2062#endif`,normal_pars_fragment:`#ifndef FLAT_SHADED 2063 varying vec3 vNormal; 2064 #ifdef USE_TANGENT 2065 varying vec3 vTangent; 2066 varying vec3 vBitangent; 2067 #endif 2068#endif`,normal_pars_vertex:`#ifndef FLAT_SHADED 2069 varying vec3 vNormal; 2070 #ifdef USE_TANGENT 2071 varying vec3 vTangent; 2072 varying vec3 vBitangent; 2073 #endif 2074#endif`,normal_vertex:`#ifndef FLAT_SHADED 2075 vNormal = normalize( transformedNormal ); 2076 #ifdef USE_TANGENT 2077 vTangent = normalize( transformedTangent ); 2078 vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); 2079 #endif 2080#endif`,normalmap_pars_fragment:`#ifdef USE_NORMALMAP 2081 uniform sampler2D normalMap; 2082 uniform vec2 normalScale; 2083#endif 2084#ifdef USE_NORMALMAP_OBJECTSPACE 2085 uniform mat3 normalMatrix; 2086#endif 2087#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) 2088 mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { 2089 vec3 q0 = dFdx( eye_pos.xyz ); 2090 vec3 q1 = dFdy( eye_pos.xyz ); 2091 vec2 st0 = dFdx( uv.st ); 2092 vec2 st1 = dFdy( uv.st ); 2093 vec3 N = surf_norm; 2094 vec3 q1perp = cross( q1, N ); 2095 vec3 q0perp = cross( N, q0 ); 2096 vec3 T = q1perp * st0.x + q0perp * st1.x; 2097 vec3 B = q1perp * st0.y + q0perp * st1.y; 2098 float det = max( dot( T, T ), dot( B, B ) ); 2099 float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); 2100 return mat3( T * scale, B * scale, N ); 2101 } 2102#endif`,clearcoat_normal_fragment_begin:`#ifdef USE_CLEARCOAT 2103 vec3 clearcoatNormal = nonPerturbedNormal; 2104#endif`,clearcoat_normal_fragment_maps:`#ifdef USE_CLEARCOAT_NORMALMAP 2105 vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; 2106 clearcoatMapN.xy *= clearcoatNormalScale; 2107 clearcoatNormal = normalize( tbn2 * clearcoatMapN ); 2108#endif`,clearcoat_pars_fragment:`#ifdef USE_CLEARCOATMAP 2109 uniform sampler2D clearcoatMap; 2110#endif 2111#ifdef USE_CLEARCOAT_NORMALMAP 2112 uniform sampler2D clearcoatNormalMap; 2113 uniform vec2 clearcoatNormalScale; 2114#endif 2115#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2116 uniform sampler2D clearcoatRoughnessMap; 2117#endif`,iridescence_pars_fragment:`#ifdef USE_IRIDESCENCEMAP 2118 uniform sampler2D iridescenceMap; 2119#endif 2120#ifdef USE_IRIDESCENCE_THICKNESSMAP 2121 uniform sampler2D iridescenceThicknessMap; 2122#endif`,opaque_fragment:`#ifdef OPAQUE 2123diffuseColor.a = 1.0; 2124#endif 2125#ifdef USE_TRANSMISSION 2126diffuseColor.a *= material.transmissionAlpha; 2127#endif 2128gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,packing:`vec3 packNormalToRGB( const in vec3 normal ) { 2129 return normalize( normal ) * 0.5 + 0.5; 2130} 2131vec3 unpackRGBToNormal( const in vec3 rgb ) { 2132 return 2.0 * rgb.xyz - 1.0; 2133} 2134const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.; 2135const float Inv255 = 1. / 255.; 2136const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 ); 2137const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g ); 2138const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b ); 2139const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a ); 2140vec4 packDepthToRGBA( const in float v ) { 2141 if( v <= 0.0 ) 2142 return vec4( 0., 0., 0., 0. ); 2143 if( v >= 1.0 ) 2144 return vec4( 1., 1., 1., 1. ); 2145 float vuf; 2146 float af = modf( v * PackFactors.a, vuf ); 2147 float bf = modf( vuf * ShiftRight8, vuf ); 2148 float gf = modf( vuf * ShiftRight8, vuf ); 2149 return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af ); 2150} 2151vec3 packDepthToRGB( const in float v ) { 2152 if( v <= 0.0 ) 2153 return vec3( 0., 0., 0. ); 2154 if( v >= 1.0 ) 2155 return vec3( 1., 1., 1. ); 2156 float vuf; 2157 float bf = modf( v * PackFactors.b, vuf ); 2158 float gf = modf( vuf * ShiftRight8, vuf ); 2159 return vec3( vuf * Inv255, gf * PackUpscale, bf ); 2160} 2161vec2 packDepthToRG( const in float v ) { 2162 if( v <= 0.0 ) 2163 return vec2( 0., 0. ); 2164 if( v >= 1.0 ) 2165 return vec2( 1., 1. ); 2166 float vuf; 2167 float gf = modf( v * 256., vuf ); 2168 return vec2( vuf * Inv255, gf ); 2169} 2170float unpackRGBAToDepth( const in vec4 v ) { 2171 return dot( v, UnpackFactors4 ); 2172} 2173float unpackRGBToDepth( const in vec3 v ) { 2174 return dot( v, UnpackFactors3 ); 2175} 2176float unpackRGToDepth( const in vec2 v ) { 2177 return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g; 2178} 2179vec4 pack2HalfToRGBA( const in vec2 v ) { 2180 vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); 2181 return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); 2182} 2183vec2 unpackRGBATo2Half( const in vec4 v ) { 2184 return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); 2185} 2186float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { 2187 return ( viewZ + near ) / ( near - far ); 2188} 2189float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { 2190
2190#ifdef USE_REVERSED_DEPTH_BUFFER 2191 2192 return depth * ( far - near ) - far; 2193 #else 2194 return depth * ( near - far ) - near; 2195 #endif 2196} 2197float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { 2198 return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); 2199} 2200float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { 2201 2202 #ifdef USE_REVERSED_DEPTH_BUFFER 2203 return ( near * far ) / ( ( near - far ) * depth - near ); 2204 #else 2205 return ( near * far ) / ( ( far - near ) * depth - far ); 2206 #endif 2207}`,premultiplied_alpha_fragment:`#ifdef PREMULTIPLIED_ALPHA 2208 gl_FragColor.rgb *= gl_FragColor.a; 2209#endif`,project_vertex:`vec4 mvPosition = vec4( transformed, 1.0 ); 2210#ifdef USE_BATCHING 2211 mvPosition = batchingMatrix * mvPosition; 2212#endif 2213#ifdef USE_INSTANCING 2214 mvPosition = instanceMatrix * mvPosition; 2215#endif 2216mvPosition = modelViewMatrix * mvPosition; 2217gl_Position = projectionMatrix * mvPosition;`,dithering_fragment:`#ifdef DITHERING 2218 gl_FragColor.rgb = dithering( gl_FragColor.rgb ); 2219#endif`,dithering_pars_fragment:`#ifdef DITHERING 2220 vec3 dithering( vec3 color ) { 2221 float grid_position = rand( gl_FragCoord.xy ); 2222 vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); 2223 dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); 2224 return color + dither_shift_RGB; 2225 } 2226#endif`,roughnessmap_fragment:`float roughnessFactor = roughness; 2227#ifdef USE_ROUGHNESSMAP 2228 vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); 2229 roughnessFactor *= texelRoughness.g; 2230#endif`,roughnessmap_pars_fragment:`#ifdef USE_ROUGHNESSMAP 2231 uniform sampler2D roughnessMap; 2232#endif`,shadowmap_pars_fragment:`#if NUM_SPOT_LIGHT_COORDS > 0 2233 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 2234#endif 2235#if NUM_SPOT_LIGHT_MAPS > 0 2236 uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; 2237#endif 2238#ifdef USE_SHADOWMAP 2239 #if NUM_DIR_LIGHT_SHADOWS > 0 2240 #if defined( SHADOWMAP_TYPE_PCF ) 2241 uniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; 2242 #else 2243 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; 2244 #endif 2245 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 2246 struct DirectionalLightShadow { 2247 float shadowIntensity; 2248 float shadowBias; 2249 float shadowNormalBias; 2250 float shadowRadius; 2251 vec2 shadowMapSize; 2252 }; 2253 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 2254 #endif 2255 #if NUM_SPOT_LIGHT_SHADOWS > 0 2256 #if defined( SHADOWMAP_TYPE_PCF ) 2257 uniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; 2258 #else 2259 uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; 2260 #endif 2261 struct SpotLightShadow { 2262 float shadowIntensity; 2263 float shadowBias; 2264 float shadowNormalBias; 2265 float shadowRadius; 2266 vec2 shadowMapSize; 2267 }; 2268 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 2269 #endif 2270 #if NUM_POINT_LIGHT_SHADOWS > 0 2271 #if defined( SHADOWMAP_TYPE_PCF ) 2272 uniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; 2273 #elif defined( SHADOWMAP_TYPE_BASIC ) 2274 uniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; 2275 #endif 2276 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 2277 struct PointLightShadow { 2278 float shadowIntensity; 2279 float shadowBias; 2280 float shadowNormalBias; 2281 float shadowRadius; 2282 vec2 shadowMapSize; 2283 float shadowCameraNear; 2284 float shadowCameraFar; 2285 }; 2286 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 2287 #endif 2288 #if defined( SHADOWMAP_TYPE_PCF ) 2289 float interleavedGradientNoise( vec2 position ) { 2290 return fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) ); 2291 } 2292 vec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) { 2293 const float goldenAngle = 2.399963229728653; 2294 float r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) ); 2295 float theta = float( sampleIndex ) * goldenAngle + phi; 2296 return vec2( cos( theta ), sin( theta ) ) * r; 2297 } 2298 #endif 2299 #if defined( SHADOWMAP_TYPE_PCF ) 2300 float getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 2301 float shadow = 1.0; 2302 shadowCoord.xyz /= shadowCoord.w; 2303 shadowCoord.z += shadowBias; 2304 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 2305 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 2306 if ( frustumTest ) { 2307 vec2 texelSize = vec2( 1.0 ) / shadowMapSize; 2308 float radius = shadowRadius * texelSize.x; 2309 float phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2; 2310 shadow = ( 2311 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) + 2312 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) + 2313 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) + 2314 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) + 2315 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) ) 2316 ) * 0.2; 2317 } 2318 return mix( 1.0, shadow, shadowIntensity ); 2319 } 2320 #elif defined( SHADOWMAP_TYPE_VSM ) 2321 float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 2322 float shadow = 1.0; 2323 shadowCoord.xyz /= shadowCoord.w; 2324 #ifdef USE_REVERSED_DEPTH_BUFFER 2325 shadowCoord.z -= shadowBias; 2326 #else 2327 shadowCoord.z += shadowBias; 2328 #endif 2329 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 2330 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 2331 if ( frustumTest ) { 2332 vec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg; 2333 float mean = distribution.x; 2334 float variance = distribution.y * distribution.y; 2335 #ifdef USE_REVERSED_DEPTH_BUFFER 2336 float hard_shadow = step( mean, shadowCoord.z ); 2337 #else 2338 float hard_shadow = step( shadowCoord.z, mean ); 2339 #endif 2340 2341 if ( hard_shadow == 1.0 ) { 2342 shadow = 1.0; 2343 } else { 2344 variance = max( variance, 0.0000001 ); 2345 float d = shadowCoord.z - mean; 2346 float p_max = variance / ( variance + d * d ); 2347 p_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 ); 2348 shadow = max( hard_shadow, p_max ); 2349 } 2350 } 2351 return mix( 1.0, shadow, shadowIntensity ); 2352 } 2353 #else 2354 float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 2355 float shadow = 1.0; 2356 shadowCoord.xyz /= shadowCoord.w; 2357 #ifdef USE_REVERSED_DEPTH_BUFFER 2358 shadowCoord.z -= shadowBias; 2359 #else 2360 shadowCoord.z += shadowBias; 2361 #endif 2362 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 2363 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 2364 if ( frustumTest ) { 2365 float depth = texture2D( shadowMap, shadowCoord.xy ).r; 2366 #ifdef USE_REVERSED_DEPTH_BUFFER 2367 shadow = step( depth, shadowCoord.z ); 2368 #else 2369 shadow = step( shadowCoord.z, depth ); 2370 #endif 2371 } 2372 return mix( 1.0, shadow, shadowIntensity ); 2373 } 2374 #endif 2375 #if NUM_POINT_LIGHT_SHADOWS > 0 2376 #if defined( SHADOWMAP_TYPE_PCF ) 2377 float getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { 2378 float shadow = 1.0; 2379 vec3 lightToPosition = shadowCoord.xyz; 2380 vec3 bd3D = normalize( lightToPosition ); 2381 vec3 absVec = abs( lightToPosition ); 2382 float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z ); 2383 if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) { 2384 #ifdef USE_REVERSED_DEPTH_BUFFER 2385 float dp = ( shadowCameraNear * ( shadowCameraFar - viewSpaceZ ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );
2386 dp -= shadowBias; 2387 #else 2388 float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); 2389 dp += shadowBias; 2390 #endif 2391 float texelSize = shadowRadius / shadowMapSize.x; 2392 vec3 absDir = abs( bd3D ); 2393 vec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 ); 2394 tangent = normalize( cross( bd3D, tangent ) ); 2395 vec3 bitangent = cross( bd3D, tangent ); 2396 float phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2; 2397 vec2 sample0 = vogelDiskSample( 0, 5, phi ); 2398 vec2 sample1 = vogelDiskSample( 1, 5, phi ); 2399 vec2 sample2 = vogelDiskSample( 2, 5, phi ); 2400 vec2 sample3 = vogelDiskSample( 3, 5, phi ); 2401 vec2 sample4 = vogelDiskSample( 4, 5, phi ); 2402 shadow = ( 2403 texture( shadowMap, vec4( bd3D + ( tangent * sample0.x + bitangent * sample0.y ) * texelSize, dp ) ) + 2404 texture( shadowMap, vec4( bd3D + ( tangent * sample1.x + bitangent * sample1.y ) * texelSize, dp ) ) + 2405 texture( shadowMap, vec4( bd3D + ( tangent * sample2.x + bitangent * sample2.y ) * texelSize, dp ) ) + 2406 texture( shadowMap, vec4( bd3D + ( tangent * sample3.x + bitangent * sample3.y ) * texelSize, dp ) ) + 2407 texture( shadowMap, vec4( bd3D + ( tangent * sample4.x + bitangent * sample4.y ) * texelSize, dp ) ) 2408 ) * 0.2; 2409 } 2410 return mix( 1.0, shadow, shadowIntensity ); 2411 } 2412 #elif defined( SHADOWMAP_TYPE_BASIC ) 2413 float getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { 2414 float shadow = 1.0; 2415 vec3 lightToPosition = shadowCoord.xyz; 2416 vec3 absVec = abs( lightToPosition ); 2417 float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z ); 2418 if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) { 2419 float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); 2420 dp += shadowBias; 2421 vec3 bd3D = normalize( lightToPosition ); 2422 float depth = textureCube( shadowMap, bd3D ).r; 2423 #ifdef USE_REVERSED_DEPTH_BUFFER 2424 depth = 1.0 - depth; 2425 #endif 2426 shadow = step( dp, depth ); 2427 } 2428 return mix( 1.0, shadow, shadowIntensity ); 2429 } 2430 #endif 2431 #endif 2432#endif`,shadowmap_pars_vertex:`#if NUM_SPOT_LIGHT_COORDS > 0 2433 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; 2434 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 2435#endif 2436#ifdef USE_SHADOWMAP 2437 #if NUM_DIR_LIGHT_SHADOWS > 0 2438 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; 2439 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 2440 struct DirectionalLightShadow { 2441 float shadowIntensity; 2442 float shadowBias; 2443 float shadowNormalBias; 2444 float shadowRadius; 2445 vec2 shadowMapSize; 2446 }; 2447 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 2448 #endif 2449 #if NUM_SPOT_LIGHT_SHADOWS > 0 2450 struct SpotLightShadow { 2451 float shadowIntensity; 2452 float shadowBias; 2453 float shadowNormalBias; 2454 float shadowRadius; 2455 vec2 shadowMapSize; 2456 }; 2457 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 2458 #endif 2459 #if NUM_POINT_LIGHT_SHADOWS > 0 2460 uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; 2461 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 2462 struct PointLightShadow { 2463 float shadowIntensity; 2464 float shadowBias; 2465 float shadowNormalBias; 2466 float shadowRadius; 2467 vec2 shadowMapSize; 2468 float shadowCameraNear; 2469 float shadowCameraFar; 2470 }; 2471 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 2472 #endif 2473#endif`,shadowmap_vertex:`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) 2474 #ifdef HAS_NORMAL 2475 vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 2476 #else 2477 vec3 shadowWorldNormal = vec3( 0.0 ); 2478 #endif
vendor: 15,483 bytes, lines 2478-2840
2478 2479 vec4 shadowWorldPosition; 2480#endif 2481#if defined( USE_SHADOWMAP ) 2482 #if NUM_DIR_LIGHT_SHADOWS > 0 2483 #pragma unroll_loop_start 2484 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 2485 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); 2486 vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; 2487 } 2488 #pragma unroll_loop_end 2489 #endif 2490 #if NUM_POINT_LIGHT_SHADOWS > 0 2491 #pragma unroll_loop_start 2492 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 2493 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); 2494 vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; 2495 } 2496 #pragma unroll_loop_end 2497 #endif 2498#endif 2499#if NUM_SPOT_LIGHT_COORDS > 0 2500 #pragma unroll_loop_start 2501 for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { 2502 shadowWorldPosition = worldPosition; 2503 #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 2504 shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; 2505 #endif 2506 vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; 2507 } 2508 #pragma unroll_loop_end 2509#endif`,shadowmask_pars_fragment:`float getShadowMask() { 2510 float shadow = 1.0; 2511 #ifdef USE_SHADOWMAP 2512 #if NUM_DIR_LIGHT_SHADOWS > 0 2513 DirectionalLightShadow directionalLight; 2514 #pragma unroll_loop_start 2515 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 2516 directionalLight = directionalLightShadows[ i ]; 2517 shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 2518 } 2519 #pragma unroll_loop_end 2520 #endif 2521 #if NUM_SPOT_LIGHT_SHADOWS > 0 2522 SpotLightShadow spotLight; 2523 #pragma unroll_loop_start 2524 for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { 2525 spotLight = spotLightShadows[ i ]; 2526 shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 2527 } 2528 #pragma unroll_loop_end 2529 #endif 2530 #if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) ) 2531 PointLightShadow pointLight; 2532 #pragma unroll_loop_start 2533 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 2534 pointLight = pointLightShadows[ i ]; 2535 shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; 2536 } 2537 #pragma unroll_loop_end 2538 #endif 2539 #endif 2540 return shadow; 2541}`,skinbase_vertex:`#ifdef USE_SKINNING 2542 mat4 boneMatX = getBoneMatrix( skinIndex.x ); 2543 mat4 boneMatY = getBoneMatrix( skinIndex.y ); 2544 mat4 boneMatZ = getBoneMatrix( skinIndex.z ); 2545 mat4 boneMatW = getBoneMatrix( skinIndex.w ); 2546#endif`,skinning_pars_vertex:`#ifdef USE_SKINNING 2547 uniform mat4 bindMatrix; 2548 uniform mat4 bindMatrixInverse; 2549 uniform highp sampler2D boneTexture; 2550 mat4 getBoneMatrix( const in float i ) { 2551 int size = textureSize( boneTexture, 0 ).x; 2552 int j = int( i ) * 4; 2553 int x = j % size; 2554 int y = j / size; 2555 vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); 2556 vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); 2557 vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); 2558 vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); 2559 return mat4( v1, v2, v3, v4 ); 2560 } 2561#endif`,skinning_vertex:`#ifdef USE_SKINNING 2562 vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); 2563 vec4 skinned = vec4( 0.0 ); 2564 skinned += boneMatX * skinVertex * skinWeight.x; 2565 skinned += boneMatY * skinVertex * skinWeight.y; 2566 skinned += boneMatZ * skinVertex * skinWeight.z; 2567 skinned += boneMatW * skinVertex * skinWeight.w; 2568 transformed = ( bindMatrixInverse * skinned ).xyz; 2569#endif`,skinnormal_vertex:`#ifdef USE_SKINNING 2570 mat4 skinMatrix = mat4( 0.0 ); 2571 skinMatrix += skinWeight.x * boneMatX; 2572 skinMatrix += skinWeight.y * boneMatY; 2573 skinMatrix += skinWeight.z * boneMatZ; 2574 skinMatrix += skinWeight.w * boneMatW; 2575 skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; 2576 objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; 2577 #ifdef USE_TANGENT 2578 objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; 2579 #endif 2580#endif`,specularmap_fragment:`float specularStrength; 2581#ifdef USE_SPECULARMAP 2582 vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); 2583 specularStrength = texelSpecular.r; 2584#else 2585 specularStrength = 1.0; 2586#endif`,specularmap_pars_fragment:`#ifdef USE_SPECULARMAP 2587 uniform sampler2D specularMap; 2588#endif`,tonemapping_fragment:`#if defined( TONE_MAPPING ) 2589 gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); 2590#endif`,tonemapping_pars_fragment:`#ifndef saturate 2591#define saturate( a ) clamp( a, 0.0, 1.0 ) 2592#endif 2593uniform float toneMappingExposure; 2594vec3 LinearToneMapping( vec3 color ) { 2595 return saturate( toneMappingExposure * color ); 2596} 2597vec3 ReinhardToneMapping( vec3 color ) { 2598 color *= toneMappingExposure; 2599 return saturate( color / ( vec3( 1.0 ) + color ) ); 2600} 2601vec3 CineonToneMapping( vec3 color ) { 2602 color *= toneMappingExposure; 2603 color = max( vec3( 0.0 ), color - 0.004 ); 2604 return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); 2605} 2606vec3 RRTAndODTFit( vec3 v ) { 2607 vec3 a = v * ( v + 0.0245786 ) - 0.000090537; 2608 vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; 2609 return a / b; 2610} 2611vec3 ACESFilmicToneMapping( vec3 color ) { 2612 const mat3 ACESInputMat = mat3( 2613 vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), 2614 vec3( 0.04823, 0.01566, 0.83777 ) 2615 ); 2616 const mat3 ACESOutputMat = mat3( 2617 vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), 2618 vec3( -0.07367, -0.00605, 1.07602 ) 2619 ); 2620 color *= toneMappingExposure / 0.6; 2621 color = ACESInputMat * color; 2622 color = RRTAndODTFit( color ); 2623 color = ACESOutputMat * color; 2624 return saturate( color ); 2625} 2626const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( 2627 vec3( 1.6605, - 0.1246, - 0.0182 ), 2628 vec3( - 0.5876, 1.1329, - 0.1006 ), 2629 vec3( - 0.0728, - 0.0083, 1.1187 ) 2630); 2631const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( 2632 vec3( 0.6274, 0.0691, 0.0164 ), 2633 vec3( 0.3293, 0.9195, 0.0880 ), 2634 vec3( 0.0433, 0.0113, 0.8956 ) 2635); 2636vec3 agxDefaultContrastApprox( vec3 x ) { 2637 vec3 x2 = x * x; 2638 vec3 x4 = x2 * x2; 2639 return + 15.5 * x4 * x2 2640 - 40.14 * x4 * x 2641 + 31.96 * x4 2642 - 6.868 * x2 * x 2643 + 0.4298 * x2 2644 + 0.1191 * x 2645 - 0.00232; 2646} 2647vec3 AgXToneMapping( vec3 color ) { 2648 const mat3 AgXInsetMatrix = mat3( 2649 vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), 2650 vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), 2651 vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) 2652 ); 2653 const mat3 AgXOutsetMatrix = mat3( 2654 vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), 2655 vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), 2656 vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) 2657 ); 2658 const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; 2659 color *= toneMappingExposure; 2660 color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; 2661 color = AgXInsetMatrix * color; 2662 color = max( color, 1e-10 ); color = log2( color ); 2663 color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); 2664 color = clamp( color, 0.0, 1.0 ); 2665 color = agxDefaultContrastApprox( color ); 2666 color = AgXOutsetMatrix * color; 2667 color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); 2668 color = LINEAR_REC2020_TO_LINEAR_SRGB * color; 2669 color = clamp( color, 0.0, 1.0 ); 2670 return color; 2671} 2672vec3 NeutralToneMapping( vec3 color ) { 2673 const float StartCompression = 0.8 - 0.04; 2674 const float Desaturation = 0.15; 2675 color *= toneMappingExposure; 2676 float x = min( color.r, min( color.g, color.b ) ); 2677 float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; 2678 color -= offset; 2679 float peak = max( color.r, max( color.g, color.b ) ); 2680 if ( peak < StartCompression ) return color; 2681 float d = 1. - StartCompression; 2682 float newPeak = 1. - d * d / ( peak + d - StartCompression ); 2683 color *= newPeak / peak; 2684 float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); 2685 return mix( color, vec3( newPeak ), g ); 2686} 2687vec3 CustomToneMapping( vec3 color ) { return color; }`,transmission_fragment:`#ifdef USE_TRANSMISSION 2688 material.transmission = transmission; 2689 material.transmissionAlpha = 1.0; 2690 material.thickness = thickness; 2691 material.attenuationDistance = attenuationDistance; 2692 material.attenuationColor = attenuationColor; 2693 #ifdef USE_TRANSMISSIONMAP 2694 material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; 2695 #endif 2696 #ifdef USE_THICKNESSMAP 2697 material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; 2698 #endif 2699 vec3 pos = vWorldPosition; 2700 vec3 v = normalize( cameraPosition - pos ); 2701 vec3 n = inverseTransformDirection( normal, viewMatrix ); 2702 vec4 transmitted = getIBLVolumeRefraction( 2703 n, v, material.roughness, material.diffuseContribution, material.specularColorBlended, material.specularF90, 2704 pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, 2705 material.attenuationColor, material.attenuationDistance ); 2706 material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); 2707 totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); 2708#endif`,transmission_pars_fragment:`#ifdef USE_TRANSMISSION 2709 uniform float transmission; 2710 uniform float thickness; 2711 uniform float attenuationDistance; 2712 uniform vec3 attenuationColor; 2713 #ifdef USE_TRANSMISSIONMAP 2714 uniform sampler2D transmissionMap; 2715 #endif 2716 #ifdef USE_THICKNESSMAP 2717 uniform sampler2D thicknessMap; 2718 #endif 2719 uniform vec2 transmissionSamplerSize; 2720 uniform sampler2D transmissionSamplerMap; 2721 uniform mat4 modelMatrix; 2722 uniform mat4 projectionMatrix; 2723 varying vec3 vWorldPosition; 2724 float w0( float a ) { 2725 return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); 2726 } 2727 float w1( float a ) { 2728 return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); 2729 } 2730 float w2( float a ){ 2731 return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); 2732 } 2733 float w3( float a ) { 2734 return ( 1.0 / 6.0 ) * ( a * a * a ); 2735 } 2736 float g0( float a ) { 2737 return w0( a ) + w1( a ); 2738 } 2739 float g1( float a ) { 2740 return w2( a ) + w3( a ); 2741 } 2742 float h0( float a ) { 2743 return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); 2744 } 2745 float h1( float a ) { 2746 return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); 2747 } 2748 vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { 2749 uv = uv * texelSize.zw + 0.5; 2750 vec2 iuv = floor( uv ); 2751 vec2 fuv = fract( uv ); 2752 float g0x = g0( fuv.x ); 2753 float g1x = g1( fuv.x ); 2754 float h0x = h0( fuv.x ); 2755 float h1x = h1( fuv.x ); 2756 float h0y = h0( fuv.y ); 2757 float h1y = h1( fuv.y ); 2758 vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2759 vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2760 vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2761 vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2762 return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + 2763 g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); 2764 } 2765 vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { 2766 vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); 2767 vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); 2768 vec2 fLodSizeInv = 1.0 / fLodSize; 2769 vec2 cLodSizeInv = 1.0 / cLodSize; 2770 vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); 2771 vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); 2772 return mix( fSample, cSample, fract( lod ) ); 2773 } 2774 vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { 2775 vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); 2776 vec3 modelScale; 2777 modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); 2778 modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); 2779 modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); 2780 return normalize( refractionVector ) * thickness * modelScale; 2781 } 2782 float applyIorToRoughness( const in float roughness, const in float ior ) { 2783 return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); 2784 } 2785 vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { 2786 float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); 2787 return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); 2788 } 2789 vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { 2790 if ( isinf( attenuationDistance ) ) { 2791 return vec3( 1.0 ); 2792 } else { 2793 vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; 2794 vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; 2795 } 2796 } 2797 vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, 2798 const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, 2799 const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, 2800 const in vec3 attenuationColor, const in float attenuationDistance ) { 2801 vec4 transmittedLight; 2802 vec3 transmittance; 2803 #ifdef USE_DISPERSION 2804 float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; 2805 vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); 2806 for ( int i = 0; i < 3; i ++ ) { 2807 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); 2808 vec3 refractedRayExit = position + transmissionRay; 2809 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2810 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2811 refractionCoords += 1.0; 2812 refractionCoords /= 2.0; 2813 vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); 2814 transmittedLight[ i ] = transmissionSample[ i ]; 2815 transmittedLight.a += transmissionSample.a; 2816 transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; 2817 } 2818 transmittedLight.a /= 3.0; 2819 #else 2820 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); 2821 vec3 refractedRayExit = position + transmissionRay; 2822 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2823 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2824 refractionCoords += 1.0; 2825 refractionCoords /= 2.0; 2826 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); 2827 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); 2828 #endif 2829 vec3 attenuatedColor = transmittance * transmittedLight.rgb; 2830 vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); 2831 float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; 2832 return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); 2833 } 2834#endif`,uv_pars_fragment:`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2835 varying vec2 vUv; 2836#endif 2837#ifdef USE_MAP 2838 varying vec2 vMapUv; 2839#endif 2840#ifdef USE_ALPHAMAP
vendor: 8,035 bytes, lines 2841-3107
2841 varying vec2 vAlphaMapUv; 2842#endif 2843#ifdef USE_LIGHTMAP 2844 varying vec2 vLightMapUv; 2845#endif 2846#ifdef USE_AOMAP 2847 varying vec2 vAoMapUv; 2848#endif 2849#ifdef USE_BUMPMAP 2850 varying vec2 vBumpMapUv; 2851#endif 2852#ifdef USE_NORMALMAP 2853 varying vec2 vNormalMapUv; 2854#endif 2855#ifdef USE_EMISSIVEMAP 2856 varying vec2 vEmissiveMapUv; 2857#endif 2858#ifdef USE_METALNESSMAP 2859 varying vec2 vMetalnessMapUv; 2860#endif 2861#ifdef USE_ROUGHNESSMAP 2862 varying vec2 vRoughnessMapUv; 2863#endif 2864#ifdef USE_ANISOTROPYMAP 2865 varying vec2 vAnisotropyMapUv; 2866#endif 2867#ifdef USE_CLEARCOATMAP 2868 varying vec2 vClearcoatMapUv; 2869#endif 2870#ifdef USE_CLEARCOAT_NORMALMAP 2871 varying vec2 vClearcoatNormalMapUv; 2872#endif 2873#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2874 varying vec2 vClearcoatRoughnessMapUv; 2875#endif 2876#ifdef USE_IRIDESCENCEMAP 2877 varying vec2 vIridescenceMapUv; 2878#endif 2879#ifdef USE_IRIDESCENCE_THICKNESSMAP 2880 varying vec2 vIridescenceThicknessMapUv; 2881#endif 2882#ifdef USE_SHEEN_COLORMAP 2883 varying vec2 vSheenColorMapUv; 2884#endif 2885#ifdef USE_SHEEN_ROUGHNESSMAP 2886 varying vec2 vSheenRoughnessMapUv; 2887#endif 2888#ifdef USE_SPECULARMAP 2889 varying vec2 vSpecularMapUv; 2890#endif 2891#ifdef USE_SPECULAR_COLORMAP 2892 varying vec2 vSpecularColorMapUv; 2893#endif 2894#ifdef USE_SPECULAR_INTENSITYMAP 2895 varying vec2 vSpecularIntensityMapUv; 2896#endif 2897#ifdef USE_TRANSMISSIONMAP 2898 uniform mat3 transmissionMapTransform; 2899 varying vec2 vTransmissionMapUv; 2900#endif 2901#ifdef USE_THICKNESSMAP 2902 uniform mat3 thicknessMapTransform; 2903 varying vec2 vThicknessMapUv; 2904#endif`,uv_pars_vertex:`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2905 varying vec2 vUv; 2906#endif 2907#ifdef USE_MAP 2908 uniform mat3 mapTransform; 2909 varying vec2 vMapUv; 2910#endif 2911#ifdef USE_ALPHAMAP 2912 uniform mat3 alphaMapTransform; 2913 varying vec2 vAlphaMapUv; 2914#endif 2915#ifdef USE_LIGHTMAP 2916 uniform mat3 lightMapTransform; 2917 varying vec2 vLightMapUv; 2918#endif 2919#ifdef USE_AOMAP 2920 uniform mat3 aoMapTransform; 2921 varying vec2 vAoMapUv; 2922#endif 2923#ifdef USE_BUMPMAP 2924 uniform mat3 bumpMapTransform; 2925 varying vec2 vBumpMapUv; 2926#endif 2927#ifdef USE_NORMALMAP 2928 uniform mat3 normalMapTransform; 2929 varying vec2 vNormalMapUv; 2930#endif 2931#ifdef USE_DISPLACEMENTMAP 2932 uniform mat3 displacementMapTransform; 2933 varying vec2 vDisplacementMapUv; 2934#endif 2935#ifdef USE_EMISSIVEMAP 2936 uniform mat3 emissiveMapTransform; 2937 varying vec2 vEmissiveMapUv; 2938#endif 2939#ifdef USE_METALNESSMAP 2940 uniform mat3 metalnessMapTransform; 2941 varying vec2 vMetalnessMapUv; 2942#endif 2943#ifdef USE_ROUGHNESSMAP 2944 uniform mat3 roughnessMapTransform; 2945 varying vec2 vRoughnessMapUv; 2946#endif 2947#ifdef USE_ANISOTROPYMAP 2948 uniform mat3 anisotropyMapTransform; 2949 varying vec2 vAnisotropyMapUv; 2950#endif 2951#ifdef USE_CLEARCOATMAP 2952 uniform mat3 clearcoatMapTransform; 2953 varying vec2 vClearcoatMapUv; 2954#endif 2955#ifdef USE_CLEARCOAT_NORMALMAP 2956 uniform mat3 clearcoatNormalMapTransform; 2957 varying vec2 vClearcoatNormalMapUv; 2958#endif 2959#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2960 uniform mat3 clearcoatRoughnessMapTransform; 2961 varying vec2 vClearcoatRoughnessMapUv; 2962#endif 2963#ifdef USE_SHEEN_COLORMAP 2964 uniform mat3 sheenColorMapTransform; 2965 varying vec2 vSheenColorMapUv; 2966#endif 2967#ifdef USE_SHEEN_ROUGHNESSMAP 2968 uniform mat3 sheenRoughnessMapTransform; 2969 varying vec2 vSheenRoughnessMapUv; 2970#endif 2971#ifdef USE_IRIDESCENCEMAP 2972 uniform mat3 iridescenceMapTransform; 2973 varying vec2 vIridescenceMapUv; 2974#endif 2975#ifdef USE_IRIDESCENCE_THICKNESSMAP 2976 uniform mat3 iridescenceThicknessMapTransform; 2977 varying vec2 vIridescenceThicknessMapUv; 2978#endif 2979#ifdef USE_SPECULARMAP 2980 uniform mat3 specularMapTransform; 2981 varying vec2 vSpecularMapUv; 2982#endif 2983#ifdef USE_SPECULAR_COLORMAP 2984 uniform mat3 specularColorMapTransform; 2985 varying vec2 vSpecularColorMapUv; 2986#endif 2987#ifdef USE_SPECULAR_INTENSITYMAP 2988 uniform mat3 specularIntensityMapTransform; 2989 varying vec2 vSpecularIntensityMapUv; 2990#endif 2991#ifdef USE_TRANSMISSIONMAP 2992 uniform mat3 transmissionMapTransform; 2993 varying vec2 vTransmissionMapUv; 2994#endif 2995#ifdef USE_THICKNESSMAP 2996 uniform mat3 thicknessMapTransform; 2997 varying vec2 vThicknessMapUv; 2998#endif`,uv_vertex:`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2999 vUv = vec3( uv, 1 ).xy; 3000#endif 3001#ifdef USE_MAP 3002 vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; 3003#endif 3004#ifdef USE_ALPHAMAP 3005 vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; 3006#endif 3007#ifdef USE_LIGHTMAP 3008 vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; 3009#endif 3010#ifdef USE_AOMAP 3011 vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; 3012#endif 3013#ifdef USE_BUMPMAP 3014 vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; 3015#endif 3016#ifdef USE_NORMALMAP 3017 vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; 3018#endif 3019#ifdef USE_DISPLACEMENTMAP 3020 vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; 3021#endif 3022#ifdef USE_EMISSIVEMAP 3023 vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; 3024#endif 3025#ifdef USE_METALNESSMAP 3026 vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; 3027#endif 3028#ifdef USE_ROUGHNESSMAP 3029 vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; 3030#endif 3031#ifdef USE_ANISOTROPYMAP 3032 vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; 3033#endif 3034#ifdef USE_CLEARCOATMAP 3035 vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; 3036#endif 3037#ifdef USE_CLEARCOAT_NORMALMAP 3038 vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; 3039#endif 3040#ifdef USE_CLEARCOAT_ROUGHNESSMAP 3041 vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; 3042#endif 3043#ifdef USE_IRIDESCENCEMAP 3044 vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; 3045#endif 3046#ifdef USE_IRIDESCENCE_THICKNESSMAP 3047 vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; 3048#endif 3049#ifdef USE_SHEEN_COLORMAP 3050 vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; 3051#endif 3052#ifdef USE_SHEEN_ROUGHNESSMAP 3053 vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; 3054#endif 3055#ifdef USE_SPECULARMAP 3056 vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; 3057#endif 3058#ifdef USE_SPECULAR_COLORMAP 3059 vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; 3060#endif 3061#ifdef USE_SPECULAR_INTENSITYMAP 3062 vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; 3063#endif 3064#ifdef USE_TRANSMISSIONMAP 3065 vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; 3066#endif 3067#ifdef USE_THICKNESSMAP 3068 vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; 3069#endif`,worldpos_vertex:`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 3070 vec4 worldPosition = vec4( transformed, 1.0 ); 3071 #ifdef USE_BATCHING 3072 worldPosition = batchingMatrix * worldPosition; 3073 #endif 3074 #ifdef USE_INSTANCING 3075 worldPosition = instanceMatrix * worldPosition; 3076 #endif 3077 worldPosition = modelMatrix * worldPosition; 3078#endif`,background_vert:`varying vec2 vUv; 3079uniform mat3 uvTransform; 3080void main() { 3081 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 3082 gl_Position = vec4( position.xy, 1.0, 1.0 ); 3083}`,background_frag:`uniform sampler2D t2D; 3084uniform float backgroundIntensity; 3085varying vec2 vUv; 3086void main() { 3087 vec4 texColor = texture2D( t2D, vUv ); 3088 #ifdef DECODE_VIDEO_TEXTURE 3089 texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); 3090 #endif 3091 texColor.rgb *= backgroundIntensity; 3092 gl_FragColor = texColor; 3093 #include <tonemapping_fragment> 3094 #include <colorspace_fragment> 3095}`,backgroundCube_vert:`varying vec3 vWorldDirection; 3096#include <common> 3097void main() { 3098 vWorldDirection = transformDirection( position, modelMatrix ); 3099 #include <begin_vertex> 3100 #include <project_vertex> 3101 gl_Position.z = gl_Position.w; 3102}`,backgroundCube_frag:`#ifdef ENVMAP_TYPE_CUBE 3103 uniform samplerCube envMap; 3104#elif defined( ENVMAP_TYPE_CUBE_UV ) 3105 uniform sampler2D envMap; 3106#endif 3107uniform float
3107backgroundBlurriness; 3108uniform float backgroundIntensity; 3109uniform mat3 backgroundRotation; 3110varying vec3 vWorldDirection; 3111#include <cube_uv_reflection_fragment> 3112void main() { 3113 #ifdef ENVMAP_TYPE_CUBE 3114 vec4 texColor = textureCube( envMap, backgroundRotation * vWorldDirection ); 3115 #elif defined( ENVMAP_TYPE_CUBE_UV ) 3116 vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); 3117 #else 3118 vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 3119 #endif 3120 texColor.rgb *= backgroundIntensity; 3121 gl_FragColor = texColor; 3122 #include <tonemapping_fragment> 3123 #include <colorspace_fragment> 3124}`,cube_vert:`varying vec3 vWorldDirection; 3125#include <common> 3126void main() { 3127 vWorldDirection = transformDirection( position, modelMatrix ); 3128 #include <begin_vertex> 3129 #include <project_vertex> 3130 gl_Position.z = gl_Position.w; 3131}`,cube_frag:`uniform samplerCube tCube; 3132uniform float tFlip; 3133uniform float opacity; 3134varying vec3 vWorldDirection; 3135void main() { 3136 vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); 3137 gl_FragColor = texColor; 3138 gl_FragColor.a *= opacity; 3139 #include <tonemapping_fragment> 3140 #include <colorspace_fragment> 3141}`,depth_vert:`#include <common> 3142#include <batching_pars_vertex> 3143#include <uv_pars_vertex> 3144#include <displacementmap_pars_vertex> 3145#include <morphtarget_pars_vertex> 3146#include <skinning_pars_vertex> 3147#include <logdepthbuf_pars_vertex> 3148#include <clipping_planes_pars_vertex> 3149varying vec2 vHighPrecisionZW; 3150void main() { 3151 #include <uv_vertex> 3152 #include <batching_vertex> 3153 #include <skinbase_vertex> 3154 #include <morphinstance_vertex> 3155 #ifdef USE_DISPLACEMENTMAP 3156 #include <beginnormal_vertex> 3157 #include <morphnormal_vertex> 3158 #include <skinnormal_vertex> 3159 #endif 3160 #include <begin_vertex> 3161 #include <morphtarget_vertex> 3162 #include <skinning_vertex> 3163 #include <displacementmap_vertex> 3164 #include <project_vertex> 3165 #include <logdepthbuf_vertex> 3166 #include <clipping_planes_vertex> 3167 vHighPrecisionZW = gl_Position.zw; 3168}`,depth_frag:`#if DEPTH_PACKING == 3200 3169 uniform float opacity; 3170#endif 3171#include <common> 3172#include <packing> 3173#include <uv_pars_fragment> 3174#include <map_pars_fragment> 3175#include <alphamap_pars_fragment> 3176#include <alphatest_pars_fragment> 3177#include <alphahash_pars_fragment> 3178#include <logdepthbuf_pars_fragment> 3179#include <clipping_planes_pars_fragment> 3180varying vec2 vHighPrecisionZW; 3181void main() { 3182 vec4 diffuseColor = vec4( 1.0 ); 3183 #include <clipping_planes_fragment> 3184 #if DEPTH_PACKING == 3200 3185 diffuseColor.a = opacity; 3186 #endif 3187 #include <map_fragment> 3188 #include <alphamap_fragment> 3189 #include <alphatest_fragment> 3190 #include <alphahash_fragment> 3191 #include <logdepthbuf_fragment> 3192 #ifdef USE_REVERSED_DEPTH_BUFFER 3193 float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ]; 3194 #else 3195 float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5; 3196 #endif 3197 #if DEPTH_PACKING == 3200 3198 gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); 3199 #elif DEPTH_PACKING == 3201 3200 gl_FragColor = packDepthToRGBA( fragCoordZ ); 3201 #elif DEPTH_PACKING == 3202 3202 gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 ); 3203 #elif DEPTH_PACKING == 3203 3204 gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); 3205 #endif 3206}`,distance_vert:`#define DISTANCE 3207varying vec3 vWorldPosition; 3208#include <common> 3209#include <batching_pars_vertex> 3210#include <uv_pars_vertex> 3211#include <displacementmap_pars_vertex> 3212#include <morphtarget_pars_vertex> 3213#include <skinning_pars_vertex> 3214#include <clipping_planes_pars_vertex> 3215void main() { 3216 #include <uv_vertex> 3217 #include <batching_vertex> 3218 #include <skinbase_vertex> 3219 #include <morphinstance_vertex> 3220 #ifdef USE_DISPLACEMENTMAP 3221 #include <beginnormal_vertex> 3222 #include <morphnormal_vertex> 3223 #include <skinnormal_vertex> 3224 #endif 3225 #include <begin_vertex> 3226 #include <morphtarget_vertex> 3227 #include <skinning_vertex> 3228 #include <displacementmap_vertex> 3229 #include <project_vertex> 3230 #include <worldpos_vertex> 3231 #include <clipping_planes_vertex> 3232 vWorldPosition = worldPosition.xyz; 3233}`,distance_frag:`#define DISTANCE 3234uniform vec3 referencePosition; 3235uniform float nearDistance; 3236uniform float farDistance; 3237varying vec3 vWorldPosition; 3238#include <common> 3239#include <uv_pars_fragment> 3240#include <map_pars_fragment> 3241#include <alphamap_pars_fragment> 3242#include <alphatest_pars_fragment> 3243#include <alphahash_pars_fragment> 3244#include <clipping_planes_pars_fragment> 3245void main () { 3246 vec4 diffuseColor = vec4( 1.0 ); 3247 #include <clipping_planes_fragment> 3248 #include <map_fragment> 3249 #include <alphamap_fragment> 3250 #include <alphatest_fragment> 3251 #include <alphahash_fragment> 3252 float dist = length( vWorldPosition - referencePosition ); 3253 dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); 3254 dist = saturate( dist ); 3255 gl_FragColor = vec4( dist, 0.0, 0.0, 1.0 ); 3256}`,equirect_vert:`varying vec3 vWorldDirection; 3257#include <common> 3258void main() { 3259 vWorldDirection = transformDirection( position, modelMatrix ); 3260 #include <begin_vertex> 3261 #include <project_vertex> 3262}`,equirect_frag:`uniform sampler2D tEquirect; 3263varying vec3 vWorldDirection; 3264#include <common> 3265void main() { 3266 vec3 direction = normalize( vWorldDirection ); 3267 vec2 sampleUV = equirectUv( direction ); 3268 gl_FragColor = texture2D( tEquirect, sampleUV ); 3269 #include <tonemapping_fragment> 3270 #include <colorspace_fragment> 3271}`,linedashed_vert:`uniform float scale; 3272attribute float lineDistance; 3273varying float vLineDistance; 3274#include <common> 3275#include <uv_pars_vertex> 3276#include <color_pars_vertex> 3277#include <fog_pars_vertex> 3278#include <morphtarget_pars_vertex> 3279#include <logdepthbuf_pars_vertex> 3280#include <clipping_planes_pars_vertex> 3281void main() { 3282 vLineDistance = scale * lineDistance; 3283 #include <uv_vertex> 3284 #include <color_vertex> 3285 #include <morphinstance_vertex> 3286 #include <morphcolor_vertex> 3287 #include <begin_vertex> 3288 #include <morphtarget_vertex> 3289 #include <project_vertex> 3290 #include <logdepthbuf_vertex> 3291 #include <clipping_planes_vertex> 3292 #include <fog_vertex> 3293}`,linedashed_frag:`uniform vec3 diffuse; 3294uniform float opacity; 3295uniform float dashSize; 3296uniform float totalSize; 3297varying float vLineDistance; 3298#include <common> 3299#include <color_pars_fragment> 3300#include <uv_pars_fragment> 3301#include <map_pars_fragment> 3302#include <fog_pars_fragment> 3303#include <logdepthbuf_pars_fragment> 3304#include <clipping_planes_pars_fragment> 3305void main() { 3306 vec4 diffuseColor = vec4( diffuse, opacity ); 3307 #include <clipping_planes_fragment> 3308 if ( mod( vLineDistance, totalSize ) > dashSize ) { 3309 discard; 3310 } 3311 vec3 outgoingLight = vec3( 0.0 ); 3312 #include <logdepthbuf_fragment> 3313 #include <map_fragment> 3314 #include <color_fragment> 3315 outgoingLight = diffuseColor.rgb; 3316 #include <opaque_fragment> 3317 #include <tonemapping_fragment> 3318 #include <colorspace_fragment> 3319 #include <fog_fragment> 3320 #include <premultiplied_alpha_fragment> 3321}`,meshbasic_vert:`#include <common> 3322#include <batching_pars_vertex> 3323#include <uv_pars_vertex> 3324#include <envmap_pars_vertex> 3325#include <color_pars_vertex> 3326#include <fog_pars_vertex> 3327#include <morphtarget_pars_vertex> 3328#include <skinning_pars_vertex> 3329#include <logdepthbuf_pars_vertex> 3330#include <clipping_planes_pars_vertex> 3331void main() { 3332 #include <uv_vertex> 3333 #include <color_vertex> 3334 #include <morphinstance_vertex> 3335 #include <morphcolor_vertex> 3336 #include <batching_vertex> 3337 #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) 3338 #include <beginnormal_vertex> 3339 #include <morphnormal_vertex> 3340 #include <skinbase_vertex> 3341 #include <skinnormal_vertex> 3342 #include <defaultnormal_vertex> 3343 #endif 3344 #include <begin_vertex> 3345 #include <morphtarget_vertex> 3346 #include <skinning_vertex> 3347 #include <project_vertex> 3348 #include <logdepthbuf_vertex> 3349 #include <clipping_planes_vertex> 3350 #include <worldpos_vertex> 3351 #include <envmap_vertex> 3352 #include <fog_vertex> 3353}`,meshbasic_frag:`uniform vec3 diffuse; 3354uniform float opacity; 3355#ifndef FLAT_SHADED 3356 varying vec3 vNormal; 3357#endif 3358#include <common> 3359#include <dithering_pars_fragment> 3360#include <color_pars_fragment> 3361#include <uv_pars_fragment> 3362#include <map_pars_fragment> 3363#include <alphamap_pars_fragment> 3364#include <alphatest_pars_fragment> 3365#include <alphahash_pars_fragment> 3366#include <aomap_pars_fragment> 3367#include <lightmap_pars_fragment> 3368#include <envmap_common_pars_fragment> 3369#include <envmap_pars_fragment> 3370#include <fog_pars_fragment> 3371#include <specularmap_pars_fragment> 3372#include <logdepthbuf_pars_fragment> 3373#include <clipping_planes_pars_fragment> 3374void main() { 3375 vec4 diffuseColor = vec4( diffuse, opacity ); 3376 #include <clipping_planes_fragment> 3377 #include <logdepthbuf_fragment> 3378 #include <map_fragment> 3379 #include <color_fragment> 3380 #include <alphamap_fragment> 3381 #include <alphatest_fragment> 3382 #include <alphahash_fragment> 3383 #include <specularmap_fragment> 3384 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3385 #ifdef USE_LIGHTMAP 3386 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 3387 reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; 3388 #else 3389 reflectedLight.indirectDiffuse += vec3( 1.0 ); 3390 #endif 3391 #include <aomap_fragment> 3392 reflectedLight.indirectDiffuse *= diffuseColor.rgb; 3393 vec3 outgoingLight = reflectedLight.indirectDiffuse; 3394 #include <envmap_fragment> 3395 #include <opaque_fragment> 3396 #include <tonemapping_fragment> 3397 #include <colorspace_fragment> 3398 #include <fog_fragment> 3399 #include <premultiplied_alpha_fragment> 3400 #include <dithering_fragment> 3401}`,meshlambert_vert:`#define LAMBERT 3402varying vec3 vViewPosition; 3403#include <common> 3404#include <batching_pars_vertex> 3405#include <uv_pars_vertex> 3406#include <displacementmap_pars_vertex> 3407#include <envmap_pars_vertex> 3408#include <color_pars_vertex> 3409#include <fog_pars_vertex> 3410#include <normal_pars_vertex> 3411#include <morphtarget_pars_vertex> 3412#include <skinning_pars_vertex> 3413#include <shadowmap_pars_vertex> 3414#include <logdepthbuf_pars_vertex> 3415#include <clipping_planes_pars_vertex> 3416void main() { 3417 #include <uv_vertex> 3418 #include <color_vertex> 3419 #include <morphinstance_vertex> 3420 #include <morphcolor_vertex> 3421 #include <batching_vertex> 3422 #include <beginnormal_vertex> 3423 #include <morphnormal_vertex> 3424 #include <skinbase_vertex> 3425 #include <skinnormal_vertex> 3426 #include <defaultnormal_vertex> 3427 #include <normal_vertex> 3428 #include <begin_vertex> 3429 #include <morphtarget_vertex> 3430 #include <skinning_vertex> 3431 #include <displacementmap_vertex> 3432 #include <project_vertex> 3433 #include <logdepthbuf_vertex> 3434 #include <clipping_planes_vertex> 3435 vViewPosition = - mvPosition.xyz; 3436 #include <worldpos_vertex> 3437 #include <envmap_vertex> 3438 #include <shadowmap_vertex> 3439 #include <fog_vertex> 3440}`,meshlambert_frag:`#define LAMBERT 3441uniform vec3 diffuse; 3442uniform vec3 emissive; 3443uniform float opacity; 3444#include <common> 3445#include <dithering_pars_fragment> 3446#include <color_pars_fragment> 3447#include <uv_pars_fragment> 3448#include <map_pars_fragment> 3449#include <alphamap_pars_fragment> 3450#include <alphatest_pars_fragment> 3451#include <alphahash_pars_fragment> 3452#include <aomap_pars_fragment> 3453#include <lightmap_pars_fragment> 3454#include <emissivemap_pars_fragment> 3455#include <cube_uv_reflection_fragment> 3456#include <envmap_common_pars_fragment> 3457#include <envmap_pars_fragment> 3458#include <envmap_physical_pars_fragment> 3459#include <fog_pars_fragment> 3460#include <bsdfs> 3461#include <lights_pars_begin> 3462#include <normal_pars_fragment> 3463#include <lights_lambert_pars_fragment> 3464#include <shadowmap_pars_fragment> 3465#include <bumpmap_pars_fragment> 3466#include <normalmap_pars_fragment> 3467#include <specularmap_pars_fragment> 3468#include <logdepthbuf_pars_fragment> 3469#include <clipping_planes_pars_fragment> 3470void main() { 3471 vec4 diffuseColor = vec4( diffuse, opacity ); 3472 #include <clipping_planes_fragment> 3473 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3474 vec3 totalEmissiveRadiance = emissive; 3475 #include <logdepthbuf_fragment> 3476 #include <map_fragment> 3477 #include <color_fragment> 3478 #include <alphamap_fragment> 3479 #include <alphatest_fragment> 3480 #include <alphahash_fragment> 3481 #include <specularmap_fragment> 3482 #include <normal_fragment_begin> 3483 #include <normal_fragment_maps> 3484 #include <emissivemap_fragment> 3485 #include <lights_lambert_fragment> 3486 #include <lights_fragment_begin> 3487 #include <lights_fragment_maps> 3488 #include <lights_fragment_end> 3489 #include <aomap_fragment> 3490 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3491 #include <envmap_fragment> 3492 #include <opaque_fragment> 3493 #include <tonemapping_fragment> 3494 #include <colorspace_fragment> 3495 #include <fog_fragment> 3496 #include <premultiplied_alpha_fragment> 3497 #include <dithering_fragment> 3498}`,meshmatcap_vert:`#define MATCAP 3499varying vec3 vViewPosition; 3500#include <common> 3501#include <batching_pars_vertex> 3502#include <uv_pars_vertex> 3503#include <color_pars_vertex> 3504#include <displacementmap_pars_vertex> 3505#include <fog_pars_vertex> 3506#include <normal_pars_vertex> 3507#include <morphtarget_pars_vertex> 3508#include <skinning_pars_vertex> 3509#include <logdepthbuf_pars_vertex> 3510#include <clipping_planes_pars_vertex> 3511void main() { 3512 #include <uv_vertex> 3513 #include <color_vertex> 3514 #include <morphinstance_vertex> 3515 #include <morphcolor_vertex> 3516 #include <batching_vertex> 3517 #include <beginnormal_vertex> 3518 #include <morphnormal_vertex> 3519 #include <skinbase_vertex> 3520 #include <skinnormal_vertex> 3521 #include <defaultnormal_vertex> 3522 #include <normal_vertex> 3523 #include <begin_vertex> 3524 #include <morphtarget_vertex> 3525 #include <skinning_vertex> 3526 #include <displacementmap_vertex> 3527 #include <project_vertex> 3528 #include <logdepthbuf_vertex> 3529 #include <clipping_planes_vertex> 3530 #include <fog_vertex> 3531 vViewPosition = - mvPosition.xyz; 3532}`,meshmatcap_frag:`#define MATCAP 3533uniform vec3 diffuse; 3534uniform float opacity; 3535uniform sampler2D matcap; 3536varying vec3 vViewPosition; 3537#include <common> 3538#include <dithering_pars_fragment> 3539#include <color_pars_fragment> 3540#include <uv_pars_fragment> 3541#include <map_pars_fragment> 3542#include <alphamap_pars_fragment> 3543#include <alphatest_pars_fragment> 3544#include <alphahash_pars_fragment> 3545#include <fog_pars_fragment> 3546#include <normal_pars_fragment> 3547#include <bumpmap_pars_fragment> 3548#include <normalmap_pars_fragment> 3549#include <logdepthbuf_pars_fragment> 3550#include <clipping_planes_pars_fragment> 3551void main() { 3552 vec4 diffuseColor = vec4( diffuse, opacity ); 3553 #include <clipping_planes_fragment> 3554 #include <logdepthbuf_fragment> 3555 #include <map_fragment> 3556 #include <color_fragment> 3557 #include <alphamap_fragment> 3558 #include <alphatest_fragment> 3559 #include <alphahash_fragment> 3560 #include <normal_fragment_begin> 3561 #include <normal_fragment_maps> 3562 vec3 viewDir = normalize( vViewPosition ); 3563 vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); 3564 vec3 y = cross( viewDir, x ); 3565 vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; 3566 #ifdef USE_MATCAP
3567 vec4 matcapColor = texture2D( matcap, uv ); 3568 #else 3569 vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); 3570 #endif 3571 vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; 3572 #include <opaque_fragment> 3573 #include <tonemapping_fragment> 3574 #include <colorspace_fragment> 3575 #include <fog_fragment> 3576 #include <premultiplied_alpha_fragment> 3577 #include <dithering_fragment> 3578}`,meshnormal_vert:`#define NORMAL 3579#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3580 varying vec3 vViewPosition; 3581#endif 3582#include <common> 3583#include <batching_pars_vertex> 3584#include <uv_pars_vertex> 3585#include <displacementmap_pars_vertex> 3586#include <normal_pars_vertex> 3587#include <morphtarget_pars_vertex> 3588#include <skinning_pars_vertex> 3589#include <logdepthbuf_pars_vertex> 3590#include <clipping_planes_pars_vertex> 3591void main() { 3592 #include <uv_vertex> 3593 #include <batching_vertex> 3594 #include <beginnormal_vertex> 3595 #include <morphinstance_vertex> 3596 #include <morphnormal_vertex> 3597 #include <skinbase_vertex> 3598 #include <skinnormal_vertex> 3599 #include <defaultnormal_vertex> 3600 #include <normal_vertex> 3601 #include <begin_vertex> 3602 #include <morphtarget_vertex> 3603 #include <skinning_vertex> 3604 #include <displacementmap_vertex> 3605 #include <project_vertex> 3606 #include <logdepthbuf_vertex> 3607 #include <clipping_planes_vertex> 3608#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3609 vViewPosition = - mvPosition.xyz; 3610#endif 3611}`,meshnormal_frag:`#define NORMAL 3612uniform float opacity; 3613#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3614 varying vec3 vViewPosition; 3615#endif 3616#include <uv_pars_fragment> 3617#include <normal_pars_fragment> 3618#include <bumpmap_pars_fragment> 3619#include <normalmap_pars_fragment> 3620#include <logdepthbuf_pars_fragment> 3621#include <clipping_planes_pars_fragment> 3622void main() { 3623 vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); 3624 #include <clipping_planes_fragment> 3625 #include <logdepthbuf_fragment> 3626 #include <normal_fragment_begin> 3627 #include <normal_fragment_maps> 3628 gl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a ); 3629 #ifdef OPAQUE 3630 gl_FragColor.a = 1.0; 3631 #endif 3632}`,meshphong_vert:`#define PHONG 3633varying vec3 vViewPosition; 3634#include <common> 3635#include <batching_pars_vertex> 3636#include <uv_pars_vertex> 3637#include <displacementmap_pars_vertex> 3638#include <envmap_pars_vertex> 3639#include <color_pars_vertex> 3640#include <fog_pars_vertex> 3641#include <normal_pars_vertex> 3642#include <morphtarget_pars_vertex> 3643#include <skinning_pars_vertex> 3644#include <shadowmap_pars_vertex> 3645#include <logdepthbuf_pars_vertex> 3646#include <clipping_planes_pars_vertex> 3647void main() { 3648 #include <uv_vertex> 3649 #include <color_vertex> 3650 #include <morphcolor_vertex> 3651 #include <batching_vertex> 3652 #include <beginnormal_vertex> 3653 #include <morphinstance_vertex> 3654 #include <morphnormal_vertex> 3655 #include <skinbase_vertex> 3656 #include <skinnormal_vertex> 3657 #include <defaultnormal_vertex> 3658 #include <normal_vertex> 3659 #include <begin_vertex> 3660 #include <morphtarget_vertex> 3661 #include <skinning_vertex> 3662 #include <displacementmap_vertex> 3663 #include <project_vertex> 3664 #include <logdepthbuf_vertex> 3665 #include <clipping_planes_vertex> 3666 vViewPosition = - mvPosition.xyz; 3667 #include <worldpos_vertex> 3668 #include <envmap_vertex> 3669 #include <shadowmap_vertex> 3670 #include <fog_vertex> 3671}`,meshphong_frag:`#define PHONG 3672uniform vec3 diffuse; 3673uniform vec3 emissive; 3674uniform vec3 specular; 3675uniform float shininess; 3676uniform float opacity; 3677#include <common> 3678#include <dithering_pars_fragment> 3679#include <color_pars_fragment> 3680#include <uv_pars_fragment> 3681#include <map_pars_fragment> 3682#include <alphamap_pars_fragment> 3683#include <alphatest_pars_fragment> 3684#include <alphahash_pars_fragment> 3685#include <aomap_pars_fragment> 3686#include <lightmap_pars_fragment> 3687#include <emissivemap_pars_fragment> 3688#include <cube_uv_reflection_fragment> 3689#include <envmap_common_pars_fragment> 3690#include <envmap_pars_fragment> 3691#include <envmap_physical_pars_fragment> 3692#include <fog_pars_fragment> 3693#include <bsdfs> 3694#include <lights_pars_begin> 3695#include <normal_pars_fragment> 3696#include <lights_phong_pars_fragment> 3697#include <shadowmap_pars_fragment> 3698#include <bumpmap_pars_fragment> 3699#include <normalmap_pars_fragment> 3700#include <specularmap_pars_fragment> 3701#include <logdepthbuf_pars_fragment> 3702#include <clipping_planes_pars_fragment> 3703void main() { 3704 vec4 diffuseColor = vec4( diffuse, opacity ); 3705 #include <clipping_planes_fragment> 3706 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3707 vec3 totalEmissiveRadiance = emissive; 3708 #include <logdepthbuf_fragment> 3709 #include <map_fragment> 3710 #include <color_fragment> 3711 #include <alphamap_fragment> 3712 #include <alphatest_fragment> 3713 #include <alphahash_fragment> 3714 #include <specularmap_fragment> 3715 #include <normal_fragment_begin> 3716 #include <normal_fragment_maps> 3717 #include <emissivemap_fragment> 3718 #include <lights_phong_fragment> 3719 #include <lights_fragment_begin> 3720 #include <lights_fragment_maps> 3721 #include <lights_fragment_end> 3722 #include <aomap_fragment> 3723 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; 3724 #include <envmap_fragment> 3725 #include <opaque_fragment> 3726 #include <tonemapping_fragment> 3727 #include <colorspace_fragment> 3728 #include <fog_fragment> 3729 #include <premultiplied_alpha_fragment> 3730 #include <dithering_fragment> 3731}`,meshphysical_vert:`#define STANDARD 3732varying vec3 vViewPosition; 3733#ifdef USE_TRANSMISSION 3734 varying vec3 vWorldPosition; 3735#endif 3736#include <common> 3737#include <batching_pars_vertex> 3738#include <uv_pars_vertex> 3739#include <displacementmap_pars_vertex> 3740#include <color_pars_vertex> 3741#include <fog_pars_vertex> 3742#include <normal_pars_vertex> 3743#include <morphtarget_pars_vertex> 3744#include <skinning_pars_vertex> 3745#include <shadowmap_pars_vertex> 3746#include <logdepthbuf_pars_vertex> 3747#include <clipping_planes_pars_vertex> 3748void main() { 3749 #include <uv_vertex> 3750 #include <color_vertex> 3751 #include <morphinstance_vertex> 3752 #include <morphcolor_vertex> 3753 #include <batching_vertex> 3754 #include <beginnormal_vertex> 3755 #include <morphnormal_vertex> 3756 #include <skinbase_vertex> 3757 #include <skinnormal_vertex> 3758 #include <defaultnormal_vertex> 3759 #include <normal_vertex> 3760 #include <begin_vertex> 3761 #include <morphtarget_vertex> 3762 #include <skinning_vertex> 3763 #include <displacementmap_vertex> 3764 #include <project_vertex> 3765 #include <logdepthbuf_vertex> 3766 #include <clipping_planes_vertex> 3767 vViewPosition = - mvPosition.xyz; 3768 #include <worldpos_vertex> 3769 #include <shadowmap_vertex> 3770 #include <fog_vertex> 3771#ifdef USE_TRANSMISSION 3772 vWorldPosition = worldPosition.xyz; 3773#endif 3774}`,meshphysical_frag:`#define STANDARD 3775#ifdef PHYSICAL 3776 #define IOR 3777 #define USE_SPECULAR 3778#endif 3779uniform vec3 diffuse; 3780uniform vec3 emissive; 3781uniform float roughness; 3782uniform float metalness; 3783uniform float opacity; 3784#ifdef IOR 3785 uniform float ior; 3786#endif 3787#ifdef USE_SPECULAR 3788 uniform float specularIntensity; 3789 uniform vec3 specularColor; 3790 #ifdef USE_SPECULAR_COLORMAP 3791 uniform sampler2D specularColorMap; 3792 #endif 3793 #ifdef USE_SPECULAR_INTENSITYMAP 3794 uniform sampler2D specularIntensityMap; 3795 #endif 3796#endif 3797#ifdef USE_CLEARCOAT 3798 uniform float clearcoat; 3799 uniform float clearcoatRoughness; 3800#endif 3801#ifdef USE_DISPERSION 3802 uniform float dispersion; 3803#endif
3804#ifdef USE_IRIDESCENCE 3805 uniform float iridescence; 3806 uniform float iridescenceIOR; 3807 uniform float iridescenceThicknessMinimum; 3808 uniform float iridescenceThicknessMaximum; 3809#endif 3810#ifdef USE_SHEEN 3811 uniform vec3 sheenColor; 3812 uniform float sheenRoughness; 3813 #ifdef USE_SHEEN_COLORMAP 3814 uniform sampler2D sheenColorMap; 3815 #endif 3816 #ifdef USE_SHEEN_ROUGHNESSMAP 3817 uniform sampler2D sheenRoughnessMap; 3818 #endif 3819#endif 3820#ifdef USE_ANISOTROPY 3821 uniform vec2 anisotropyVector; 3822 #ifdef USE_ANISOTROPYMAP 3823 uniform sampler2D anisotropyMap; 3824 #endif 3825#endif 3826varying vec3 vViewPosition; 3827#include <common> 3828#include <dithering_pars_fragment> 3829#include <color_pars_fragment> 3830#include <uv_pars_fragment> 3831#include <map_pars_fragment> 3832#include <alphamap_pars_fragment> 3833#include <alphatest_pars_fragment> 3834#include <alphahash_pars_fragment> 3835#include <aomap_pars_fragment> 3836#include <lightmap_pars_fragment> 3837#include <emissivemap_pars_fragment> 3838#include <iridescence_fragment> 3839#include <cube_uv_reflection_fragment> 3840#include <envmap_common_pars_fragment> 3841#include <envmap_physical_pars_fragment> 3842#include <fog_pars_fragment> 3843#include <lights_pars_begin> 3844#include <normal_pars_fragment> 3845#include <lights_physical_pars_fragment> 3846#include <transmission_pars_fragment> 3847#include <shadowmap_pars_fragment> 3848#include <bumpmap_pars_fragment> 3849#include <normalmap_pars_fragment> 3850#include <clearcoat_pars_fragment> 3851#include <iridescence_pars_fragment> 3852#include <roughnessmap_pars_fragment> 3853#include <metalnessmap_pars_fragment> 3854#include <logdepthbuf_pars_fragment> 3855#include <clipping_planes_pars_fragment> 3856void main() { 3857 vec4 diffuseColor = vec4( diffuse, opacity ); 3858 #include <clipping_planes_fragment> 3859 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3860 vec3 totalEmissiveRadiance = emissive; 3861 #include <logdepthbuf_fragment> 3862 #include <map_fragment> 3863 #include <color_fragment> 3864 #include <alphamap_fragment> 3865 #include <alphatest_fragment> 3866 #include <alphahash_fragment> 3867 #include <roughnessmap_fragment> 3868 #include <metalnessmap_fragment> 3869 #include <normal_fragment_begin> 3870 #include <normal_fragment_maps> 3871 #include <clearcoat_normal_fragment_begin> 3872 #include <clearcoat_normal_fragment_maps> 3873 #include <emissivemap_fragment> 3874 #include <lights_physical_fragment> 3875 #include <lights_fragment_begin> 3876 #include <lights_fragment_maps> 3877 #include <lights_fragment_end> 3878 #include <aomap_fragment> 3879 vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; 3880 vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; 3881 #include <transmission_fragment> 3882 vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; 3883 #ifdef USE_SHEEN 3884 3885 outgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect; 3886 3887 #endif 3888 #ifdef USE_CLEARCOAT 3889 float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); 3890 vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); 3891 outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; 3892 #endif 3893 #include <opaque_fragment> 3894 #include <tonemapping_fragment> 3895 #include <colorspace_fragment> 3896 #include <fog_fragment> 3897 #include <premultiplied_alpha_fragment> 3898 #include <dithering_fragment> 3899}`,meshtoon_vert:`#define TOON 3900varying vec3 vViewPosition; 3901#include <common> 3902#include <batching_pars_vertex> 3903#include <uv_pars_vertex> 3904#include <displacementmap_pars_vertex> 3905#include <color_pars_vertex> 3906#include <fog_pars_vertex> 3907#include <normal_pars_vertex> 3908#include <morphtarget_pars_vertex> 3909#include <skinning_pars_vertex> 3910#include <shadowmap_pars_vertex> 3911#include <logdepthbuf_pars_vertex> 3912#include <clipping_planes_pars_vertex> 3913void main() { 3914 #include <uv_vertex> 3915 #include <color_vertex> 3916 #include <morphinstance_vertex> 3917 #include <morphcolor_vertex> 3918 #include <batching_vertex> 3919 #include <beginnormal_vertex> 3920 #include <morphnormal_vertex> 3921 #include <skinbase_vertex> 3922 #include <skinnormal_vertex> 3923 #include <defaultnormal_vertex> 3924 #include <normal_vertex> 3925 #include <begin_vertex> 3926 #include <morphtarget_vertex> 3927 #include <skinning_vertex> 3928 #include <displacementmap_vertex> 3929 #include <project_vertex> 3930 #include <logdepthbuf_vertex> 3931 #include <clipping_planes_vertex> 3932 vViewPosition = - mvPosition.xyz; 3933 #include <worldpos_vertex> 3934 #include <shadowmap_vertex> 3935 #include <fog_vertex> 3936}`,meshtoon_frag:`#define TOON 3937uniform vec3 diffuse; 3938uniform vec3 emissive; 3939uniform float opacity; 3940#include <common> 3941#include <dithering_pars_fragment> 3942#include <color_pars_fragment> 3943#include <uv_pars_fragment> 3944#include <map_pars_fragment> 3945#include <alphamap_pars_fragment> 3946#include <alphatest_pars_fragment> 3947#include <alphahash_pars_fragment> 3948#include <aomap_pars_fragment> 3949#include <lightmap_pars_fragment> 3950#include <emissivemap_pars_fragment> 3951#include <gradientmap_pars_fragment> 3952#include <fog_pars_fragment> 3953#include <bsdfs> 3954#include <lights_pars_begin> 3955#include <normal_pars_fragment> 3956#include <lights_toon_pars_fragment> 3957#include <shadowmap_pars_fragment> 3958#include <bumpmap_pars_fragment> 3959#include <normalmap_pars_fragment> 3960#include <logdepthbuf_pars_fragment> 3961#include <clipping_planes_pars_fragment> 3962void main() { 3963 vec4 diffuseColor = vec4( diffuse, opacity ); 3964 #include <clipping_planes_fragment> 3965 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3966 vec3 totalEmissiveRadiance = emissive; 3967 #include <logdepthbuf_fragment> 3968 #include <map_fragment> 3969 #include <color_fragment> 3970 #include <alphamap_fragment> 3971 #include <alphatest_fragment> 3972 #include <alphahash_fragment> 3973 #include <normal_fragment_begin> 3974 #include <normal_fragment_maps> 3975 #include <emissivemap_fragment> 3976 #include <lights_toon_fragment> 3977 #include <lights_fragment_begin> 3978 #include <lights_fragment_maps> 3979 #include <lights_fragment_end> 3980 #include <aomap_fragment> 3981 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3982 #include <opaque_fragment> 3983 #include <tonemapping_fragment> 3984 #include <colorspace_fragment> 3985 #include <fog_fragment> 3986 #include <premultiplied_alpha_fragment> 3987 #include <dithering_fragment> 3988}`,points_vert:`uniform float size; 3989uniform float scale; 3990#include <common> 3991#include <color_pars_vertex> 3992#include <fog_pars_vertex> 3993#include <morphtarget_pars_vertex> 3994#include <logdepthbuf_pars_vertex> 3995#include <clipping_planes_pars_vertex> 3996#ifdef USE_POINTS_UV 3997 varying vec2 vUv; 3998 uniform mat3 uvTransform; 3999#endif 4000void main() { 4001 #ifdef USE_POINTS_UV 4002 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 4003 #endif 4004 #include <color_vertex> 4005 #include <morphinstance_vertex> 4006 #include <morphcolor_vertex> 4007 #include <begin_vertex> 4008 #include <morphtarget_vertex> 4009 #include <project_vertex> 4010 gl_PointSize = size; 4011 #ifdef USE_SIZEATTENUATION 4012 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 4013 if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); 4014 #endif 4015 #include <logdepthbuf_vertex> 4016 #include <clipping_planes_vertex> 4017 #include <worldpos_vertex> 4018 #include <fog_vertex> 4019}`,points_frag:`uniform vec3 diffuse; 4020uniform float opacity; 4021#include <common> 4022#include <color_pars_fragment> 4023#include <map_particle_pars_fragment> 4024#include <alphatest_pars_fragment> 4025#include <alphahash_pars_fragment> 4026#include <fog_pars_fragment> 4027#include <logdepthbuf_pars_fragment> 4028#include <clipping_planes_pars_fragment> 4029void main() { 4030 vec4 diffuseColor = vec4( diffuse, opacity ); 4031 #include <clipping_planes_fragment> 4032 vec3 outgoingLight = vec3( 0.0 ); 4033 #include <logdepthbuf_fragment> 4034 #include <map_particle_fragment> 4035 #include <color_fragment> 4036 #include <alphatest_fragment> 4037 #include <alphahash_fragment> 4038 outgoingLight = diffuseColor.rgb; 4039 #include <opaque_fragment> 4040 #include <tonemapping_fragment> 4041 #include <colorspace_fragment> 4042 #include <fog_fragment> 4043 #include <premultiplied_alpha_fragment> 4044}`,shadow_vert:`#include <common> 4045#include <batching_pars_vertex> 4046#include <fog_pars_vertex> 4047#include <morphtarget_pars_vertex> 4048#include <skinning_pars_vertex> 4049#include <logdepthbuf_pars_vertex> 4050#include <shadowmap_pars_vertex> 4051void main() { 4052 #include <batching_vertex> 4053 #include <beginnormal_vertex> 4054 #include <morphinstance_vertex> 4055 #include <morphnormal_vertex> 4056 #include <skinbase_vertex> 4057 #include <skinnormal_vertex> 4058 #include <defaultnormal_vertex> 4059 #include <begin_vertex> 4060 #include <morphtarget_vertex> 4061 #include <skinning_vertex> 4062 #include <project_vertex> 4063 #include <logdepthbuf_vertex> 4064 #include <worldpos_vertex> 4065 #include <shadowmap_vertex> 4066 #include <fog_vertex> 4067}`,shadow_frag:`uniform vec3 color; 4068uniform float opacity; 4069#include <common> 4070#include <fog_pars_fragment> 4071#include <bsdfs> 4072#include <lights_pars_begin> 4073#include <logdepthbuf_pars_fragment> 4074#include <shadowmap_pars_fragment> 4075#include <shadowmask_pars_fragment> 4076void main() { 4077 #include <logdepthbuf_fragment> 4078 gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); 4079 #include <tonemapping_fragment> 4080 #include <colorspace_fragment> 4081 #include <fog_fragment> 4082 #include <premultiplied_alpha_fragment> 4083}`,sprite_vert:`uniform float rotation; 4084uniform vec2 center; 4085#include <common> 4086#include <uv_pars_vertex> 4087#include <fog_pars_vertex> 4088#include <logdepthbuf_pars_vertex> 4089#include <clipping_planes_pars_vertex> 4090void main() { 4091 #include <uv_vertex> 4092 vec4 mvPosition = modelViewMatrix[ 3 ]; 4093 vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) ); 4094 #ifndef USE_SIZEATTENUATION 4095 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 4096 if ( isPerspective ) scale *= - mvPosition.z; 4097 #endif 4098 vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; 4099 vec2 rotatedPosition; 4100 rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; 4101 rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; 4102 mvPosition.xy += rotatedPosition; 4103 gl_Position = projectionMatrix * mvPosition; 4104 #include <logdepthbuf_vertex> 4105 #include <clipping_planes_vertex> 4106 #include <fog_vertex> 4107}`,sprite_frag:`uniform vec3 diffuse; 4108uniform float opacity; 4109#include <common> 4110#include <uv_pars_fragment> 4111#include <map_pars_fragment> 4112#include <alphamap_pars_fragment> 4113#include <alphatest_pars_fragment> 4114#include <alphahash_pars_fragment> 4115#include <fog_pars_fragment> 4116#include <logdepthbuf_pars_fragment> 4117#include <clipping_planes_pars_fragment> 4118void main() { 4119 vec4 diffuseColor = vec4( diffuse, opacity ); 4120 #include <clipping_planes_fragment> 4121 vec3 outgoingLight = vec3( 0.0 ); 4122 #include <logdepthbuf_fragment> 4123 #include <map_fragment> 4124 #include <alphamap_fragment> 4125 #include <alphatest_fragment> 4126 #include <alphahash_fragment> 4127 outgoingLight = diffuseColor.rgb; 4128 #include <opaque_fragment> 4129 #include <tonemapping_fragment> 4130 #include <colorspace_fragment> 4131 #include <fog_fragment> 4132}`},Z={common:{diffuse:{value:new u4(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new M2},alphaMap:{value:null},alphaMapTransform:{value:new M2},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new M2}},envmap:{envMap:{value:null},envMapRotation:{value:new M2},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new M2}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new M2}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new M2},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new M2},normalScale:{value:new k2(1,1)}}
vendor: 14,311 bytes, line 4132
4132,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new M2},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new M2}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new M2}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new M2}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new u4(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null},probesSH:{value:null},probesMin:{value:new X},probesMax:{value:new X},probesResolution:{value:new X}},points:{diffuse:{value:new u4(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new M2},alphaTest:{value:0},uvTransform:{value:new M2}},sprite:{diffuse:{value:new u4(16777215)},opacity:{value:1},center:{value:new k2(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new M2},alphaMap:{value:null},alphaMapTransform:{value:new M2},alphaTest:{value:0}}},a6={basic:{uniforms:V3([Z.common,Z.specularmap,Z.envmap,Z.aomap,Z.lightmap,Z.fog]),vertexShader:i6.meshbasic_vert,fragmentShader:i6.meshbasic_frag},lambert:{uniforms:V3([Z.common,Z.specularmap,Z.envmap,Z.aomap,Z.lightmap,Z.emissivemap,Z.bumpmap,Z.normalmap,Z.displacementmap,Z.fog,Z.lights,{emissive:{value:new u4(0)},envMapIntensity:{value:1}}]),vertexShader:i6.meshlambert_vert,fragmentShader:i6.meshlambert_frag},phong:{uniforms:V3([Z.common,Z.specularmap,Z.envmap,Z.aomap,Z.lightmap,Z.emissivemap,Z.bumpmap,Z.normalmap,Z.displacementmap,Z.fog,Z.lights,{emissive:{value:new u4(0)},specular:{value:new u4(1118481)},shininess:{value:30},envMapIntensity:{value:1}}]),vertexShader:i6.meshphong_vert,fragmentShader:i6.meshphong_frag},standard:{uniforms:V3([Z.common,Z.envmap,Z.aomap,Z.lightmap,Z.emissivemap,Z.bumpmap,Z.normalmap,Z.displacementmap,Z.roughnessmap,Z.metalnessmap,Z.fog,Z.lights,{emissive:{value:new u4(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:i6.meshphysical_vert,fragmentShader:i6.meshphysical_frag},toon:{uniforms:V3([Z.common,Z.aomap,Z.lightmap,Z.emissivemap,Z.bumpmap,Z.normalmap,Z.displacementmap,Z.gradientmap,Z.fog,Z.lights,{emissive:{value:new u4(0)}}]),vertexShader:i6.meshtoon_vert,fragmentShader:i6.meshtoon_frag},matcap:{uniforms:V3([Z.common,Z.bumpmap,Z.normalmap,Z.displacementmap,Z.fog,{matcap:{value:null}}]),vertexShader:i6.meshmatcap_vert,fragmentShader:i6.meshmatcap_frag},points:{uniforms:V3([Z.points,Z.fog]),vertexShader:i6.points_vert,fragmentShader:i6.points_frag},dashed:{uniforms:V3([Z.common,Z.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:i6.linedashed_vert,fragmentShader:i6.linedashed_frag},depth:{uniforms:V3([Z.common,Z.displacementmap]),vertexShader:i6.depth_vert,fragmentShader:i6.depth_frag},normal:{uniforms:V3([Z.common,Z.bumpmap,Z.normalmap,Z.displacementmap,{opacity:{value:1}}]),vertexShader:i6.meshnormal_vert,fragmentShader:i6.meshnormal_frag},sprite:{uniforms:V3([Z.sprite,Z.fog]),vertexShader:i6.sprite_vert,fragmentShader:i6.sprite_frag},background:{uniforms:{uvTransform:{value:new M2},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:i6.background_vert,fragmentShader:i6.background_frag},backgroundCube:{uniforms:{envMap:{value:null},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new M2}},vertexShader:i6.backgroundCube_vert,fragmentShader:i6.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:i6.cube_vert,fragmentShader:i6.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:i6.equirect_vert,fragmentShader:i6.equirect_frag},distance:{uniforms:V3([Z.common,Z.displacementmap,{referencePosition:{value:new X},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:i6.distance_vert,fragmentShader:i6.distance_frag},shadow:{uniforms:V3([Z.lights,Z.fog,{color:{value:new u4(0)},opacity:{value:1}}]),vertexShader:i6.shadow_vert,fragmentShader:i6.shadow_frag}};a6.physical={uniforms:V3([a6.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new M2},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new M2},clearcoatNormalScale:{value:new k2(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new M2},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new M2},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new M2},sheen:{value:0},sheenColor:{value:new u4(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new M2},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new M2},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new M2},transmissionSamplerSize:{value:new k2},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new M2},attenuationDistance:{value:0},attenuationColor:{value:new u4(0)},specularColor:{value:new u4(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new M2},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new M2},anisotropyVector:{value:new k2},anisotropyMap:{value:null},anisotropyMapTransform:{value:new M2}}]),vertexShader:i6.meshphysical_vert,fragmentShader:i6.meshphysical_frag};var o6={r:0,b:0,g:0},F6e=new W2,I6e=new M2;I6e.set(-1,0,0,0,1,0,0,0,1);function L6e(e,t,n,r,i,a){let o=new u4(0),s=i===!0?0:1,c,l,u=null,d=0,f=null;function p(e){let n=e.isScene===!0?e.background:null;if(n&&n.isTexture){let r=e.backgroundBlurriness>0;n=t.get(n,r)}return n}function m(t){let r=!1,i=p(t);i===null?g(o,s):i&&i.isColor&&(g(i,1),r=!0);let c=e.xr.getEnvironmentBlendMode();c===`additive`?n.buffers.color.setClear(0,0,0,1,a):c===`alpha-blend`&&n.buffers.color.setClear(0,0,0,0,a),(e.autoClear||r)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil))}function h(t,n){let i=p(n);i&&(i.isCubeTexture||i.mapping===306)?(l===void 0&&(l=new k3(new z3(1,1,1),new H3({name:`BackgroundCubeMaterial`,uniforms:B3(a6.backgroundCube.uniforms),vertexShader:a6.backgroundCube.vertexShader,fragmentShader:a6.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),l.geometry.deleteAttribute(`normal`),l.geometry.deleteAttribute(`uv`),l.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(l)),l.material.uniforms.envMap.value=i,l.material.uniforms.backgroundBlurriness.value=n.backgroundBlurriness,l.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,l.material.uniforms.backgroundRotation.value.setFromMatrix4(F6e.makeRotationFromEuler(n.backgroundRotation)).transpose(),i.isCubeTexture&&i.isRenderTargetTexture===!1&&l.material.uniforms.backgroundRotation.value.premultiply(I6e),l.material.toneMapped=P2.getTransfer(i.colorSpace)!==o2,(u!==i||d!==i.version||f!==e.toneMapping)&&(l.material.needsUpdate=!0,u=i,d=i.version,f=e.toneMapping),l.layers.enableAll(),t.unshift(l,l.geometry,l.material,0,0,null)):i&&i.isTexture&&(c===void 0&&(c=new k3(new U3e(2,2),new H3({name:`BackgroundMaterial`,uniforms:B3(a6.background.uniforms),vertexShader:a6.background.vertexShader,fragmentShader:a6.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute(`normal`),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(c)),c.material.uniforms.t2D.value=i,c.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,c.material.toneMapped=P2.getTransfer(i.colorSpace)!==o2,i.matrixAutoUpdate===!0&&i.updateMatrix(),c.material.uniforms.uvTransform.value.copy(i.matrix),(u!==i||d!==i.version||f!==e.toneMapping)&&(c.material.needsUpdate=!0,u=i,d=i.version,f=e.toneMapping),c.layers.enableAll(),t.unshift(c,c.geometry,c.material,0,0,null))}function g(t,r){t.getRGB(o6,K3e(e)),n.buffers.color.setClear(o6.r,o6.g,o6.b,r,a)}function _(){l!==void 0&&(l.geometry.dispose(),l.material.dispose(),l=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return o},setClearColor:function(e,t=1){o.set(e),s=t,g(o,s)},getClearAlpha:function(){return s},setClearAlpha:function(e){s=e,g(o,s)},render:m,addToRenderList:h,dispose:_}}function R6e(e,t){let n=e.getParameter(e.MAX_VERTEX_ATTRIBS),r={},i=f(null),a=i,o=!1;function s(n,r,i,s,c){let u=!1,f=d(n,s,i,r);a!==f&&(a=f,l(a.object)),u=p(n,s,i,c),u&&m(n,s,i,c),c!==null&&t.update(c,e.ELEMENT_ARRAY_BUFFER),(u||o)&&(o=!1,b(n,r,i,s),c!==null&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.get(c).buffer))}function c(){return e.createVertexArray()}function l(t){return e.bindVertexArray(t)}function u(t){return e.deleteVertexArray(t)}function d(e,t,n,i){let a=i.wireframe===!0,o=r[t.id];o===void 0&&(o={},r[t.id]=o);let s=e.isInstancedMesh===!0?e.id:0,l=o[s];l===void 0&&(l={},o[s]=l);let u=l[n.id];u===void 0&&(u={},l[n.id]=u);let d=u[a];return d===void 0&&(d=f(c()),u[a]=d),d}function f(e){let t=[],r=[],i=[];for(let e=0;e<n;e++)t[e]=0,r[e]=0,i[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:r,attributeDivisors:i,object:e,attributes:{},index:null}}function p(e,t,n,r){let i=a.attributes,o=t.attributes,s=0,c=n.getAttributes();for(let t in c)if(c[t].location>=0){let n=i[t],r=o[t];if(r===void 0&&(t===`instanceMatrix`&&e.instanceMatrix&&(r=e.instanceMatrix),t===`instanceColor`&&e.instanceColor&&(r=e.instanceColor)),n===void 0||n.attribute!==r||r&&n.data!==r.data)return!0;s++}return a.attributesNum!==s||a.index!==r}function m(e,t,n,r){let i={},o=t.attributes,s=0,c=n.getAttributes();for(let t in c)if(c[t].location>=0){let n=o[t];n===void 0&&(t===`instanceMatrix`&&e.instanceMatrix&&(n=e.instanceMatrix),t===`instanceColor`&&e.instanceColor&&(n=e.instanceColor));let r={};r.attribute=n,n&&n.data&&(r.data=n.data),i[t]=r,s++}a.attributes=i,a.attributesNum=s,a.index=r}function h(){let e=a.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function g(e){_(e,0)}function _(t,n){let r=a.newAttributes,i=a.enabledAttributes,o=a.attributeDivisors;r[t]=1,i[t]===0&&(e.enableVertexAttribArray(t),i[t]=1),o[t]!==n&&(e.vertexAttribDivisor(t,n),o[t]=n)}function v(){let t=a.newAttributes,n=a.enabledAttributes;for(let r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function y(t,n,r,i,a,o,s){s===!0?e.vertexAttribIPointer(t,n,r,a,o):e.vertexAttribPointer(t,n,r,i,a,o)}function b(n,r,i,a){h();let o=a.attributes,s=i.getAttributes(),c=r.defaultAttributeValues;for(let r in s){let i=s[r];if(i.location>=0){let s=o[r];if(s===void 0&&(r===`instanceMatrix`&&n.instanceMatrix&&(s=n.instanceMatrix),r===`instanceColor`&&n.instanceColor&&(s=n.instanceColor)),s!==void 0){let r=s.normalized,o=s.itemSize,c=t.get(s);if(c===void 0)continue;let l=c.buffer,u=c.type,d=c.bytesPerElement,f=u===e.INT||u===e.UNSIGNED_INT||s.gpuType===1013;if(s.isInterleavedBufferAttribute){let t=s.data,c=t.stride,p=s.offset;if(t.isInstancedInterleavedBuffer){for(let e=0;e<i.locationSize;e++)_(i.location+e,t.meshPerAttribute);n.isInstancedMesh!==!0&&a._maxInstanceCount===void 0&&(a._maxInstanceCount=t.meshPerAttribute*t.count)}else for(let e=0;e<i.locationSize;e++)g(i.location+e);e.bindBuffer(e.ARRAY_BUFFER,l);for(let e=0;e<i.locationSize;e++)y(i.location+e,o/i.locationSize,u,r,c*d,(p+o/i.locationSize*e)*d,f)}else{if(s.isInstancedBufferAttribute){for(let e=0;e<i.locationSize;e++)_(i.location+e,s.meshPerAttribute);n.isInstancedMesh!==!0&&a._maxInstanceCount===void 0&&(a._maxInstanceCount=s.meshPerAttribute*s.count)}else for(let e=0;e<i.locationSize;e++)g(i.location+e);e.bindBuffer(e.ARRAY_BUFFER,l);for(let e=0;e<i.locationSize;e++)y(i.location+e,o/i.locationSize,u,r,o*d,o/i.locationSize*e*d,f)}}else if(c!==void 0){let t=c[r];if(t!==void 0)switch(t.length){case 2:e.vertexAttrib2fv(i.location,t);break;case 3:e.vertexAttrib3fv(i.location,t);break;case 4:e.vertexAttrib4fv(i.location,t);break;default:e.vertexAttrib1fv(i.location,t)}}}}v()}function x(){T();for(let e in r){let t=r[e];for(let e in t){let n=t[e];for(let e in n){let t=n[e];for(let e in t)u(t[e].object),delete t[e];delete n[e]}}delete r[e]}}function S(e){if(r[e.id]===void 0)return;let t=r[e.id];for(let e in t){let n=t[e];for(let e in n){let t=n[e];for(let e in t)u(t[e].object),delete t[e];delete n[e]}}delete r[e.id]}function C(e){for(let t in r){let n=r[t];for(let t in n){let r=n[t];if(r[e.id]===void 0)continue;let i=r[e.id];for(let e in i)u(i[e].object),delete i[e];delete r[e.id]}}}function w(e){for(let t in r){let n=r[t],i=e.isInstancedMesh===!0?e.id:0,a=n[i];if(a!==void 0){for(let e in a){let t=a[e];for(let e in t)u(t[e].object),delete t[e];delete a[e]}delete n[i],Object.keys(n).length===0&&delete r[t]}}}function T(){E(),o=!0,a!==i&&(a=i,l(a.object))}
vendor: 7,194 bytes, line 4132
4132function E(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:s,reset:T,resetDefaultState:E,dispose:x,releaseStatesOfGeometry:S,releaseStatesOfObject:w,releaseStatesOfProgram:C,initAttributes:h,enableAttribute:g,disableUnusedAttributes:v}}function z6e(e,t,n){let r;function i(e){r=e}function a(t,i){e.drawArrays(r,t,i),n.update(i,r,1)}function o(t,i,a){a!==0&&(e.drawArraysInstanced(r,t,i,a),n.update(i,r,a))}function s(e,i,a){if(a===0)return;t.get(`WEBGL_multi_draw`).multiDrawArraysWEBGL(r,e,0,i,0,a);let o=0;for(let e=0;e<a;e++)o+=i[e];n.update(o,r,1)}this.setMode=i,this.render=a,this.renderInstances=o,this.renderMultiDraw=s}function B6e(e,t,n,r){let i;function a(){if(i!==void 0)return i;if(t.has(`EXT_texture_filter_anisotropic`)===!0){let n=t.get(`EXT_texture_filter_anisotropic`);i=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function o(t){return!(t!==1023&&r.convert(t)!==e.getParameter(e.IMPLEMENTATION_COLOR_READ_FORMAT))}function s(n){let i=n===1016&&(t.has(`EXT_color_buffer_half_float`)||t.has(`EXT_color_buffer_float`));return!(n!==1009&&r.convert(n)!==e.getParameter(e.IMPLEMENTATION_COLOR_READ_TYPE)&&n!==1015&&!i)}function c(t){if(t===`highp`){if(e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return`highp`;t=`mediump`}return t===`mediump`&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?`mediump`:`lowp`}let l=n.precision===void 0?`highp`:n.precision,u=c(l);u!==l&&(h2(`WebGLRenderer:`,l,`not supported, using`,u,`instead.`),l=u);let d=n.logarithmicDepthBuffer===!0,f=n.reversedDepthBuffer===!0&&t.has(`EXT_clip_control`);n.reversedDepthBuffer===!0&&f===!1&&h2(`WebGLRenderer: Unable to use reversed depth buffer due to missing EXT_clip_control extension. Fallback to default depth buffer.`);let p=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),m=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),h=e.getParameter(e.MAX_TEXTURE_SIZE),g=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),_=e.getParameter(e.MAX_VERTEX_ATTRIBS),v=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),y=e.getParameter(e.MAX_VARYING_VECTORS),b=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),x=e.getParameter(e.MAX_SAMPLES),S=e.getParameter(e.SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:a,getMaxPrecision:c,textureFormatReadable:o,textureTypeReadable:s,precision:l,logarithmicDepthBuffer:d,reversedDepthBuffer:f,maxTextures:p,maxVertexTextures:m,maxTextureSize:h,maxCubemapSize:g,maxAttributes:_,maxVertexUniforms:v,maxVaryings:y,maxFragmentUniforms:b,maxSamples:x,samples:S}}function V6e(e){let t=this,n=null,r=0,i=!1,a=!1,o=new M3,s=new M2,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t){let n=e.length!==0||t||r!==0||i;return i=t,r=e.length,n},this.beginShadows=function(){a=!0,u(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(e,t){n=u(e,t,0)},this.setState=function(t,o,s){let d=t.clippingPlanes,f=t.clipIntersection,p=t.clipShadows,m=e.get(t);if(!i||d===null||d.length===0||a&&!p)a?u(null):l();else{let e=a?0:r,t=e*4,i=m.clippingState||null;c.value=i,i=u(d,o,t,s);for(let e=0;e!==t;++e)i[e]=n[e];m.clippingState=i,this.numIntersection=f?this.numPlanes:0,this.numPlanes+=e}};function l(){c.value!==n&&(c.value=n,c.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function u(e,n,r,i){let a=e===null?0:e.length,l=null;if(a!==0){if(l=c.value,i!==!0||l===null){let t=r+a*4,i=n.matrixWorldInverse;s.getNormalMatrix(i),(l===null||l.length<t)&&(l=new Float32Array(t));for(let t=0,n=r;t!==a;++t,n+=4)o.copy(e[t]).applyMatrix4(i,s),o.normal.toArray(l,n),l[n+3]=o.constant}c.value=l,c.needsUpdate=!0}return t.numPlanes=a,t.numIntersection=0,l}}var s6=4,H6e=[.125,.215,.35,.446,.526,.582],c6=20,U6e=256,l6=new p6e,W6e=new u4,u6=null,d6=0,f6=0,p6=!1,G6e=new X,K6e=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._backgroundBox=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._blurMaterial=null,this._ggxMaterial=null}fromScene(e,t=0,n=.1,r=100,i={}){let{size:a=256,position:o=G6e}=i;u6=this._renderer.getRenderTarget(),d6=this._renderer.getActiveCubeFace(),f6=this._renderer.getActiveMipmapLevel(),p6=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(a);let s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,n,r,s,o),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Q6e(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Z6e(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose(),this._backgroundBox!==null&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.dispose())}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=2**this._lodMax}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._ggxMaterial!==null&&this._ggxMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodMeshes.length;e++)this._lodMeshes[e].geometry.dispose()}_cleanup(e){this._renderer.setRenderTarget(u6,d6,f6),this._renderer.xr.enabled=p6,e.scissorTest=!1,m6(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===301||e.mapping===302?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),u6=this._renderer.getRenderTarget(),d6=this._renderer.getActiveCubeFace(),f6=this._renderer.getActiveMipmapLevel(),p6=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;let n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){let e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:N0,minFilter:N0,generateMipmaps:!1,type:z0,format:U0,colorSpace:i2,depthBuffer:!1},r=J6e(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=J6e(e,t,n);let{_lodMax:r}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=q6e(r)),this._blurMaterial=X6e(r,e,t),this._ggxMaterial=Y6e(r,e,t)}return r}_compileMaterial(e){let t=new k3(new $4,e);this._renderer.compile(t,l6)}_sceneToCubeUV(e,t,n,r,i){let a=new Q3(90,1,t,n),o=[1,-1,1,1,1,1],s=[1,1,1,-1,-1,-1],c=this._renderer,l=c.autoClear,u=c.toneMapping;c.getClearColor(W6e),c.toneMapping=0,c.autoClear=!1,c.state.buffers.depth.getReversed()&&(c.setRenderTarget(r),c.clearDepth(),c.setRenderTarget(null)),this._backgroundBox===null&&(this._backgroundBox=new k3(new z3,new T3e({name:`PMREM.Backgroun
4132d`,side:1,depthWrite:!1,depthTest:!1})));let d=this._backgroundBox,f=d.material,p=!1,m=e.background;m?m.isColor&&(f.color.copy(m),e.background=null,p=!0):(f.color.copy(W6e),p=!0);for(let t=0;t<6;t++){let n=t%3;n===0?(a.up.set(0,o[t],0),a.position.set(i.x,i.y,i.z),a.lookAt(i.x+s[t],i.y,i.z)):n===1?(a.up.set(0,0,o[t]),a.position.set(i.x,i.y,i.z),a.lookAt(i.x,i.y+s[t],i.z)):(a.up.set(0,o[t],0),a.position.set(i.x,i.y,i.z),a.lookAt(i.x,i.y,i.z+s[t]));let l=this._cubeSize;m6(r,n*l,t>2?l:0,l,l),c.setRenderTarget(r),p&&c.render(d,a),c.render(e,a)}c.toneMapping=u,c.autoClear=l,e.background=m}_textureToCubeUV(e,t){let n=this._renderer,r=e.mapping===301||e.mapping===302;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=Q6e()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Z6e());let i=r?this._cubemapMaterial:this._equirectMaterial,a=this._lodMeshes[0];a.material=i;let o=i.uniforms;o.envMap.value=e;let s=this._cubeSize;m6(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(a,l6)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;let r=this._lodMeshes.length;for(let t=1;t<r;t++)this._applyGGXFilter(e,t-1,t);t.autoClear=n}_applyGGXFilter(e,t,n){let r=this._renderer,i=this._pingPongRenderTarget,a=this._ggxMaterial,o=this._lodMeshes[n];o.material=a;let s=a.uniforms,c=n/(this._lodMeshes.length-1),l=t/(this._lodMeshes.length-1),u=Math.sqrt(c*c-l*l)*(0+c*1.25),{_lodMax:d}=this,f=this._sizeLods[n],p=3*f*(n>d-s6?n-d+s6:0),m=4*(this._cubeSize-f);s.envMap.value=e.texture,s.roughness.value=u,s.mipInt.value=d-t,m6(i,p,m,3*f,2*f),r.setRenderTarget(i),r.render(o,l6),s.envMap.value=i.texture,s.roughness.value=0,s.mipInt.value=d-n,m6(e,p,m,3*f,2*f),r.setRenderTarget(e),r.render(o,l6)}_blur(e,t,n,r,i){let a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,r,`latitudinal`,i),this._halfBlur(a,e,n,n,r,`longitudinal`,i)}_halfBlur(e,t,n,r,i,a,o){let s=this._renderer,c=this._blurMaterial;a!==`latitudinal`&&a!==`longitudinal`&&g2(`blur direction must be either latitudinal or longitudinal!`);let l=this._lodMeshes[r];l.material=c;let u=c.uniforms,d=this._sizeLods[n]-1,f=isFinite(i)?Math.PI/(2*d):2*Math.PI/(2*c6-1),p=i/f,m=isFinite(i)?1+Math.floor(3*p):c6;m>c6&&h2(`sigmaRadians, ${i}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${c6}`);let h=[],g=0;for(let e=0;e<c6;++e){let t=e/p,n=Math.exp(-t*t/2);h.push(n),e===0?g+=n:e<m&&(g+=2*n)}for(let e=0;e<h.length;e++)h[e]=h[e]/g;u.envMap.value=e.texture,u.samples.value=m,u.weights.value=h,u.latitudinal.value=a===`latitudinal`,o&&(u.poleAxis.value=o);let{_lodMax:_}=this;u.dTheta.value=f,u.mipInt.value=_-n;let v=this._sizeLods[r];m6(t,3*v*(r>_-s6?r-_+s6:0),4*(this._cubeSize-v),3*v,2*v),s.setRenderTarget(t),s.render(l,l6)}};function q6e(e){let t=[],n=[],r=[],i=e,a=e-s6+1+H6e.length;for(let o=0;o<a;o++){let a=2**i;t.push(a);let s=1/a;o>e-s6?s=H6e[o-e+s6-1]:o===0&&(s=0),n.push(s);let c=1/(a-2),l=-c,u=1+c,d=[l,l,u,l,u,u,l,l,u,u,l,u],f=new Float32Array(108),p=new Float32Array(72),m=new Float32Array(36);for(let e=0;e<6;e++){let t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];f.set(r,18*e),p.set(d,12*e);let i=[e,e,e,e,e,e];m.set(i,6*e)}let h=new $4;h.setAttribute(`position`,new H4(f,3)),h.setAttribute(`uv`,new H4(p,2)),h.setAttribute(`faceIndex`,new H4(m,1)),r.push(new k3(h,null)),i>s6&&i--}return{lodMeshes:r,sizeLods:t,sigmas:n}}function J6e(e,t,n){let r=new U2(e,t,n);return r.texture.mapping=306,r.texture.name=`PMREM.cubeUv`,r.scissorTest=!0,r}function m6(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function Y6e(e,t,n){return new H3({name:`PMREMGGXConvolution`,defines:{GGX_SAMPLES:U6e,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:h6(),fragmentShader:` 4133 4134 precision highp float; 4135 precision highp int; 4136 4137 varying vec3 vOutputDirection; 4138 4139 uniform sampler2D envMap; 4140 uniform float roughness; 4141 uniform float mipInt; 4142 4143 #define ENVMAP_TYPE_CUBE_UV 4144 #include <cube_uv_reflection_fragment> 4145 4146 #define PI 3.14159265359 4147 4148 // Van der Corput radical inverse 4149 float radicalInverse_VdC(uint bits) { 4150 bits = (bits << 16u) | (bits >> 16u); 4151 bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); 4152 bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); 4153 bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); 4154 bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); 4155 return float(bits) * 2.3283064365386963e-10; // / 0x100000000 4156 } 4157 4158 // Hammersley sequence 4159 vec2 hammersley(uint i, uint N) { 4160 return vec2(float(i) / float(N), radicalInverse_VdC(i)); 4161 } 4162 4163 // GGX VNDF importance sampling (Eric Heitz 2018) 4164 // "Sampling the GGX Distribution of Visible Normals" 4165 // https://jcgt.org/published/0007/04/01/ 4166 vec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) { 4167 float alpha = roughness * roughness; 4168 4169 // Section 4.1: Orthonormal basis 4170 vec3 T1 = vec3(1.0, 0.0, 0.0); 4171 vec3 T2 = cross(V, T1); 4172 4173 // Section 4.2: Parameterization of projected area 4174 float r = sqrt(Xi.x); 4175 float phi = 2.0 * PI * Xi.y; 4176 float t1 = r * cos(phi); 4177 float t2 = r * sin(phi); 4178 float s = 0.5 * (1.0 + V.z); 4179 t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2; 4180 4181 // Section 4.3: Reprojection onto hemisphere 4182 vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * V; 4183 4184 // Section 3.4: Transform back to ellipsoid configuration 4185 return normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z))); 4186 } 4187 4188 void main() { 4189 vec3 N = normalize(vOutputDirection); 4190 vec3 V = N; // Assume view direction equals normal for pre-filtering 4191 4192 vec3 prefilteredColor = vec3(0.0); 4193 float totalWeight = 0.0; 4194 4195 // For very low roughness, just sample the environment directly 4196 if (roughness < 0.001) { 4197 gl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0); 4198 return; 4199 } 4200 4201 // Tangent space basis for VNDF sampling 4202 vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); 4203 vec3 tangent = normalize(cross(up, N)); 4204 vec3 bitangent = cross(N, tangent); 4205
4206 for(uint i = 0u; i < uint(GGX_SAMPLES); i++) { 4207 vec2 Xi = hammersley(i, uint(GGX_SAMPLES)); 4208 4209 // For PMREM, V = N, so in tangent space V is always (0, 0, 1) 4210 vec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness); 4211 4212 // Transform H back to world space 4213 vec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z); 4214 vec3 L = normalize(2.0 * dot(V, H) * H - V); 4215 4216 float NdotL = max(dot(N, L), 0.0); 4217 4218 if(NdotL > 0.0) { 4219 // Sample environment at fixed mip level 4220 // VNDF importance sampling handles the distribution filtering 4221 vec3 sampleColor = bilinearCubeUV(envMap, L, mipInt); 4222 4223 // Weight by NdotL for the split-sum approximation 4224 // VNDF PDF naturally accounts for the visible microfacet distribution 4225 prefilteredColor += sampleColor * NdotL; 4226 totalWeight += NdotL; 4227 } 4228 } 4229 4230 if (totalWeight > 0.0) { 4231 prefilteredColor = prefilteredColor / totalWeight; 4232 } 4233 4234 gl_FragColor = vec4(prefilteredColor, 1.0); 4235 } 4236 `,blending:0,depthTest:!1,depthWrite:!1})}function X6e(e,t,n){let r=new Float32Array(c6),i=new X(0,1,0);return new H3({name:`SphericalGaussianBlur`,defines:{n:c6,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:h6(),fragmentShader:` 4237 4238 precision mediump float; 4239 precision mediump int; 4240 4241 varying vec3 vOutputDirection; 4242 4243 uniform sampler2D envMap; 4244 uniform int samples; 4245 uniform float weights[ n ]; 4246 uniform bool latitudinal; 4247 uniform float dTheta; 4248 uniform float mipInt; 4249 uniform vec3 poleAxis; 4250 4251 #define ENVMAP_TYPE_CUBE_UV 4252 #include <cube_uv_reflection_fragment> 4253 4254 vec3 getSample( float theta, vec3 axis ) { 4255 4256 float cosTheta = cos( theta ); 4257 // Rodrigues' axis-angle rotation 4258 vec3 sampleDirection = vOutputDirection * cosTheta 4259 + cross( axis, vOutputDirection ) * sin( theta ) 4260 + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); 4261 4262 return bilinearCubeUV( envMap, sampleDirection, mipInt ); 4263 4264 } 4265 4266 void main() { 4267 4268 vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); 4269 4270 if ( all( equal( axis, vec3( 0.0 ) ) ) ) { 4271 4272 axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); 4273 4274 } 4275 4276 axis = normalize( axis ); 4277 4278 gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 4279 gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); 4280 4281 for ( int i = 1; i < n; i++ ) { 4282 4283 if ( i >= samples ) { 4284 4285 break; 4286 4287 } 4288 4289 float theta = dTheta * float( i ); 4290 gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); 4291 gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); 4292 4293 } 4294 4295 } 4296 `,blending:0,depthTest:!1,depthWrite:!1})}function Z6e(){return new H3({name:`EquirectangularToCubeUV`,uniforms:{envMap:{value:null}},vertexShader:h6(),fragmentShader:` 4297 4298 precision mediump float; 4299 precision mediump int; 4300 4301 varying vec3 vOutputDirection; 4302 4303 uniform sampler2D envMap; 4304 4305 #include <common> 4306 4307 void main() { 4308 4309 vec3 outputDirection = normalize( vOutputDirection ); 4310 vec2 uv = equirectUv( outputDirection ); 4311 4312 gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); 4313 4314 } 4315 `,blending:0,depthTest:!1,depthWrite:!1})}function Q6e(){return new H3({name:`CubemapToCubeUV`,uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:h6(),fragmentShader:` 4316 4317 precision mediump float; 4318 precision mediump int; 4319 4320 uniform float flipEnvMap; 4321 4322 varying vec3 vOutputDirection; 4323 4324 uniform samplerCube envMap; 4325 4326 void main() { 4327 4328 gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); 4329 4330 } 4331 `,blending:0,depthTest:!1,depthWrite:!1})}function h6(){return` 4332 4333 precision mediump float; 4334 precision mediump int; 4335 4336 attribute float faceIndex; 4337 4338 varying vec3 vOutputDirection; 4339 4340 // RH coordinate system; PMREM face-indexing convention 4341 vec3 getDirection( vec2 uv, float face ) { 4342 4343 uv = 2.0 * uv - 1.0; 4344 4345 vec3 direction = vec3( uv, 1.0 ); 4346 4347 if ( face == 0.0 ) { 4348 4349 direction = direction.zyx; // ( 1, v, u ) pos x 4350 4351 } else if ( face == 1.0 ) { 4352 4353 direction = direction.xzy; 4354 direction.xz *= -1.0; // ( -u, 1, -v ) pos y 4355 4356 } else if ( face == 2.0 ) { 4357 4358 direction.x *= -1.0; // ( -u, v, 1 ) pos z 4359 4360 } else if ( face == 3.0 ) { 4361 4362 direction = direction.zyx; 4363 direction.xz *= -1.0; // ( -1, v, -u ) neg x 4364 4365 } else if ( face == 4.0 ) { 4366 4367 direction = direction.xzy; 4368 direction.xy *= -1.0; // ( -u, -1, v ) neg y 4369 4370 } else if ( face == 5.0 ) { 4371 4372 direction.z *= -1.0; // ( u, v, -1 ) neg z 4373 4374 } 4375 4376 return direction; 4377 4378 } 4379 4380 void main() { 4381 4382 vOutputDirection = getDirection( uv, faceIndex ); 4383 gl_Position = vec4( position, 1.0 ); 4384 4385 } 4386 `}var $6e=class extends U2{constructor(e=1,t={}
vendor: 25,538 bytes, lines 4386-4502
4386){super(e,e,t),this.isWebGLCubeRenderTarget=!0;let n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];this.texture=new z3e(r),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:` 4387 4388 varying vec3 vWorldDirection; 4389 4390 vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 4391 4392 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 4393 4394 } 4395 4396 void main() { 4397 4398 vWorldDirection = transformDirection( position, modelMatrix ); 4399 4400 #include <begin_vertex> 4401 #include <project_vertex> 4402 4403 } 4404 `,fragmentShader:` 4405 4406 uniform sampler2D tEquirect; 4407 4408 varying vec3 vWorldDirection; 4409 4410 #include <common> 4411 4412 void main() { 4413 4414 vec3 direction = normalize( vWorldDirection ); 4415 4416 vec2 sampleUV = equirectUv( direction ); 4417 4418 gl_FragColor = texture2D( tEquirect, sampleUV ); 4419 4420 } 4421 `},r=new z3(5,5,5),i=new H3({name:`CubemapFromEquirect`,uniforms:B3(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:1,blending:0});i.uniforms.tEquirect.value=t;let a=new k3(r,i),o=t.minFilter;return t.minFilter===1008&&(t.minFilter=N0),new m6e(1,10,this).update(e,a),t.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(e,t=!0,n=!0,r=!0){let i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}};function e8e(e){let t=new WeakMap,n=new WeakMap,r=null;function i(e,t=!1){return e==null?null:t?o(e):a(e)}function a(n){if(n&&n.isTexture){let r=n.mapping;if(r===303||r===304)if(t.has(n)){let e=t.get(n).texture;return s(e,n.mapping)}else{let r=n.image;if(r&&r.height>0){let i=new $6e(r.height);return i.fromEquirectangularTexture(e,n),t.set(n,i),n.addEventListener(`dispose`,l),s(i.texture,n.mapping)}else return null}}return n}function o(t){if(t&&t.isTexture){let i=t.mapping,a=i===303||i===304,o=i===301||i===302;if(a||o){let i=n.get(t),s=i===void 0?0:i.texture.pmremVersion;if(t.isRenderTargetTexture&&t.pmremVersion!==s)return r===null&&(r=new K6e(e)),i=a?r.fromEquirectangular(t,i):r.fromCubemap(t,i),i.texture.pmremVersion=t.pmremVersion,n.set(t,i),i.texture;if(i!==void 0)return i.texture;{let s=t.image;return a&&s&&s.height>0||o&&s&&c(s)?(r===null&&(r=new K6e(e)),i=a?r.fromEquirectangular(t):r.fromCubemap(t),i.texture.pmremVersion=t.pmremVersion,n.set(t,i),t.addEventListener(`dispose`,u),i.texture):null}}}return t}function s(e,t){return t===303?e.mapping=301:t===304&&(e.mapping=302),e}function c(e){let t=0;for(let n=0;n<6;n++)e[n]!==void 0&&t++;return t===6}function l(e){let n=e.target;n.removeEventListener(`dispose`,l);let r=t.get(n);r!==void 0&&(t.delete(n),r.dispose())}function u(e){let t=e.target;t.removeEventListener(`dispose`,u);let r=n.get(t);r!==void 0&&(n.delete(t),r.dispose())}function d(){t=new WeakMap,n=new WeakMap,r!==null&&(r.dispose(),r=null)}return{get:i,dispose:d}}function t8e(e){let t={};function n(n){if(t[n]!==void 0)return t[n];let r=e.getExtension(n);return t[n]=r,r}return{has:function(e){return n(e)!==null},init:function(){n(`EXT_color_buffer_float`),n(`WEBGL_clip_cull_distance`),n(`OES_texture_float_linear`),n(`EXT_color_buffer_half_float`),n(`WEBGL_multisampled_render_to_texture`),n(`WEBGL_render_shared_exponent`)},get:function(e){let t=n(e);return t===null&&_2(`WebGLRenderer: `+e+` extension not supported.`),t}}}function n8e(e,t,n,r){let i={},a=new WeakMap;function o(e){let s=e.target;s.index!==null&&t.remove(s.index);for(let e in s.attributes)t.remove(s.attributes[e]);s.removeEventListener(`dispose`,o),delete i[s.id];let c=a.get(s);c&&(t.remove(c),a.delete(s)),r.releaseStatesOfGeometry(s),s.isInstancedBufferGeometry===!0&&delete s._maxInstanceCount,n.memory.geometries--}function s(e,t){return i[t.id]===!0?t:(t.addEventListener(`dispose`,o),i[t.id]=!0,n.memory.geometries++,t)}function c(n){let r=n.attributes;for(let n in r)t.update(r[n],e.ARRAY_BUFFER)}function l(e){let n=[],r=e.index,i=e.attributes.position,o=0;if(i===void 0)return;if(r!==null){let e=r.array;o=r.version;for(let t=0,r=e.length;t<r;t+=3){let r=e[t+0],i=e[t+1],a=e[t+2];n.push(r,i,i,a,a,r)}}else{let e=i.array;o=i.version;for(let t=0,r=e.length/3-1;t<r;t+=3){let e=t+0,r=t+1,i=t+2;n.push(e,r,r,i,i,e)}}let s=new(i.count>=65535?m3e:p3e)(n,1);s.version=o;let c=a.get(e);c&&t.remove(c),a.set(e,s)}function u(e){let t=a.get(e);if(t){let n=e.index;n!==null&&t.version<n.version&&l(e)}else l(e);return a.get(e)}return{get:s,update:c,getWireframeAttribute:u}}function r8e(e,t,n){let r;function i(e){r=e}let a,o;function s(e){a=e.type,o=e.bytesPerElement}function c(t,i){e.drawElements(r,i,a,t*o),n.update(i,r,1)}function l(t,i,s){s!==0&&(e.drawElementsInstanced(r,i,a,t*o,s),n.update(i,r,s))}function u(e,i,o){if(o===0)return;t.get(`WEBGL_multi_draw`).multiDrawElementsWEBGL(r,i,0,a,e,0,o);let s=0;for(let e=0;e<o;e++)s+=i[e];n.update(s,r,1)}this.setMode=i,this.setIndex=s,this.render=c,this.renderInstances=l,this.renderMultiDraw=u}function i8e(e){let t={geometries:0,textures:0},n={frame:0,calls:0,triangles:0,points:0,lines:0};function r(t,r,i){switch(n.calls++,r){case e.TRIANGLES:n.triangles+=t/3*i;break;case e.LINES:n.lines+=t/2*i;break;case e.LINE_STRIP:n.lines+=i*(t-1);break;case e.LINE_LOOP:n.lines+=i*t;break;case e.POINTS:n.points+=i*t;break;default:g2(`WebGLInfo: Unknown draw mode:`,r);break}}function i(){n.calls=0,n.triangles=0,n.points=0,n.lines=0}return{memory:t,render:n,programs:null,autoReset:!0,reset:i,update:r}}function a8e(e,t,n){let r=new WeakMap,i=new H2;function a(a,o,s){let c=a.morphTargetInfluences,l=o.morphAttributes.position||o.morphAttributes.normal||o.morphAttributes.color,u=l===void 0?0:l.length,d=r.get(o);if(d===void 0||d.count!==u){d!==void 0&&d.texture.dispose();let e=o.morphAttributes.position!==void 0,n=o.morphAttributes.normal!==void 0,a=o.morphAttributes.color!==void 0,s=o.morphAttributes.position||[],c=o.morphAttributes.normal||[],l=o.morphAttributes.color||[],f=0;e===!0&&(f=1),n===!0&&(f=2),a===!0&&(f=3);let p=o.attributes.position.count*f,m=1;p>t.maxTextureSize&&(m=Math.ceil(p/t.maxTextureSize),p=t.maxTextureSize);let h=new Float32Array(p*m*4*u),g=new q4e(h,p,m,u);g.type=R0,g.needsUpdate=!0;let _=f*4;for(let t=0;t<u;t++){let r=s[t],o=c[t],u=l[t],d=p*m*4*t;for(let t=0;t<r.count;t++){let s=t*_;e===!0&&(i.fromBufferAttribute(r,t),h[d+s+0]=i.x,h[d+s+1]=i.y,h[d+s+2]=i.z,h[d+s+3]=0),n===!0&&(i.fromBufferAttribute(o,t),h[d+s+4]=i.x,h[d+s+5]=i.y,h[d+s+6]=i.z,h[d+s+7]=0),a===!0&&(i.fromBufferAttribute(u,t),h[d+s+8]=i.x,h[d+s+9]=i.y,h[d+s+10]=i.z,h[d+s+11]=u.itemSize===4?i.w:1)}}d={count:u,texture:g,size:new k2(p,m)},r.set(o,d);function v(){g.dispose(),r.delete(o),o.removeEventListener(`dispose`,v)}o.addEventListener(`dispose`,v)}if(a.isInstancedMesh===!0&&a.morphTexture!==null)s.getUniforms().setValue(e,`morphTexture`,a.morphTexture,n);else{let t=0;for(let e=0;e<c.length;e++)t+=c[e];let n=o.morphTargetsRelative?1:1-t;s.getUniforms().setValue(e,`morphTargetBaseInfluence`,n),s.getUniforms().setValue(e,`morphTargetInfluences`,c)}s.getUniforms().setValue(e,`morphTargetsTexture`,d.texture,n),s.getUniforms().setValue(e,`morphTargetsTextureSize`,d.size)}return{update:a}}function o8e(e,t,n,r,i){let a=new WeakMap;function o(r){let o=i.render.frame,s=r.geometry,l=t.get(r,s);if(a.get(l)!==o&&(t.update(l),a.set(l,o)),r.isInstancedMesh&&(r.hasEventListener(`dispose`,c)===!1&&r.addEventListener(`dispose`,c),a.get(r)!==o&&(n.update(r.instanceMatrix,e.ARRAY_BUFFER),r.instanceColor!==null&&n.update(r.instanceColor,e.ARRAY_BUFFER),a.set(r,o))),r.isSkinnedMesh){let e=r.skeleton;a.get(e)!==o&&(e.update(),a.set(e,o))}return l}function s(){a=new WeakMap}function c(e){let t=e.target;t.removeEventListener(`dispose`,c),r.releaseStatesOfObject(t),n.remove(t.instanceMatrix),t.instanceColor!==null&&n.remove(t.instanceColor)}return{update:o,dispose:s}}var s8e={1:`LINEAR_TONE_MAPPING`,2:`REINHARD_TONE_MAPPING`,3:`CINEON_TONE_MAPPING`,4:`ACES_FILMIC_TONE_MAPPING`,6:`AGX_TONE_MAPPING`,7:`NEUTRAL_TONE_MAPPING`,5:`CUSTOM_TONE_MAPPING`};function c8e(e,t,n,r,i){let a=new U2(t,n,{type:e,depthBuffer:r,stencilBuffer:i,depthTexture:r?new R3(t,n):void 0}),o=new U2(t,n,{type:z0,depthBuffer:!1,stencilBuffer:!1}),s=new $4;s.setAttribute(`position`,new U4([-1,3,0,-1,-1,0,3,-1,0],3)),s.setAttribute(`uv`,new U4([0,2,0,0,2,0],2));let c=new X3e({uniforms:{tDiffuse:{value:null}},vertexShader:` 4422 precision highp float; 4423 4424 uniform mat4 modelViewMatrix; 4425 uniform mat4 projectionMatrix; 4426 4427 attribute vec3 position; 4428 attribute vec2 uv; 4429 4430 varying vec2 vUv; 4431 4432 void main() { 4433 vUv = uv; 4434 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 4435 }`,fragmentShader:` 4436 precision highp float; 4437 4438 uniform sampler2D tDiffuse; 4439 4440 varying vec2 vUv; 4441 4442 #include <tonemapping_pars_fragment> 4443 #include <colorspace_pars_fragment> 4444 4445 void main() { 4446 gl_FragColor = texture2D( tDiffuse, vUv ); 4447 4448 #ifdef LINEAR_TONE_MAPPING 4449 gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb ); 4450 #elif defined( REINHARD_TONE_MAPPING ) 4451 gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb ); 4452 #elif defined( CINEON_TONE_MAPPING ) 4453 gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb ); 4454 #elif defined( ACES_FILMIC_TONE_MAPPING ) 4455 gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb ); 4456 #elif defined( AGX_TONE_MAPPING ) 4457 gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb ); 4458 #elif defined( NEUTRAL_TONE_MAPPING ) 4459 gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb ); 4460 #elif defined( CUSTOM_TONE_MAPPING ) 4461 gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb ); 4462 #endif 4463 4464 #ifdef SRGB_TRANSFER 4465 gl_FragColor = sRGBTransferOETF( gl_FragColor ); 4466 #endif 4467 }`,depthTest:!1,depthWrite:!1}),l=new k3(s,c),u=new p6e(-1,1,1,-1,0,1),d=null,f=null,p=!1,m,h=null,g=[],_=!1;this.setSize=function(e,t){a.setSize(e,t),o.setSize(e,t);for(let n=0;n<g.length;n++){let r=g[n];r.setSize&&r.setSize(e,t)}},this.setEffects=function(e){g=e,_=g.length>0&&g[0].isRenderPass===!0;let t=a.width,n=a.height;for(let e=0;e<g.length;e++){let r=g[e];r.setSize&&r.setSize(t,n)}},this.begin=function(e,t){if(p||e.toneMapping===0&&g.length===0)return!1;if(h=t,t!==null){let e=t.width,n=t.height;(a.width!==e||a.height!==n)&&this.setSize(e,n)}return _===!1&&e.setRenderTarget(a),m=e.toneMapping,e.toneMapping=0,!0},this.hasRenderPass=function(){return _},this.end=function(e,t){e.toneMapping=m,p=!0;let n=a,r=o;for(let i=0;i<g.length;i++){let a=g[i];if(a.enabled!==!1&&(a.render(e,r,n,t),a.needsSwap!==!1)){let e=n;n=r,r=e}}if(d!==e.outputColorSpace||f!==e.toneMapping){d=e.outputColorSpace,f=e.toneMapping,c.defines={},P2.getTransfer(d)===`srgb`&&(c.defines.SRGB_TRANSFER=``);let t=s8e[f];t&&(c.defines[t]=``),c.needsUpdate=!0}c.uniforms.tDiffuse.value=n.texture,e.setRenderTarget(h),e.render(l,u),h=null,p=!1},this.isCompositing=function(){return p},this.dispose=function(){a.depthTexture&&a.depthTexture.dispose(),a.dispose(),o.dispose(),s.dispose(),c.dispose()}}var l8e=new V2,g6=new R3(1,1),u8e=new q4e,d8e=new J4e,f8e=new z3e,p8e=[],m8e=[],h8e=new Float32Array(16),g8e=new Float32Array(9),_8e=new Float32Array(4);function _6(e,t,n){let r=e[0];if(r<=0||r>0)return e;let i=t*n,a=p8e[i];if(a===void 0&&(a=new Float32Array(i),p8e[i]=a),t!==0){r.toArray(a,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(a,i)}return a}function v6(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function y6(e,t){for(let n=0,r=t.length;n<r;n++)e[n]=t[n]}function b6(e,t){let n=m8e[t];n===void 0&&(n=new Int32Array(t),m8e[t]=n);for(let r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function v8e(e,t){let n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function y8e(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y)&&(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(v6(n,t))return;e.uniform2fv(this.addr,t),y6(n,t)}}function b8e(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z)&&(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(t.r!==void 0)(n[0]!==t.r||n[1]!==t.g||n[2]!==t.b)&&(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(v6(n,t))return;e.uniform3fv(this.addr,t),y6(n,t)}}function x8e(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z||n[3]!==t.w)&&(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(v6(n,t))return;e.uniform4fv(this.addr,t),y6(n,t)}}function S8e(e,t){let n=this.cache,r=t.elements;if(r===void 0){if(v6(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),y6(n,t)}else{if(v6(n,r))return;_8e.set(r),e.uniformMatrix2fv(this.addr,!1,_8e),y6(n,r)}}function C8e(e,t){let n=this.cache,r=t.elements;if(r===void 0){if(v6(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),y6(n,t)}else{if(v6(n,r))return;g8e.set(r),e.uniformMatrix3fv(this.addr,!1,g8e),y6(n,r)}}function w8e(e,t){let n=this.cache,r=t.elements;if(r===void 0){if(v6(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),y6(n,t)}else{if(v6(n,r))return;h8e.set(r),e.uniformMatrix4fv(this.addr,!1,h8e),y6(n,r)}}function T8e(e,t){let n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function E8e(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y)&&(e.uniform2i(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(v6(n,t))return;e.uniform2iv(this.addr,t),y6(n,t)}}function D8e(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z)&&(e.uniform3i(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(v6(n,t))return;e.uniform3iv(this.addr,t),y6(n,t)}}function O8e(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z||n[3]!==t.w)&&(e.uniform4i(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(v6(n,t))return;e.uniform4iv(this.addr,t),y6(n,t)}}function k8e(e,t){let n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function A8e(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y)&&(e.uniform2ui(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(v6(n,t))return;e.uniform2uiv(this.addr,t),y6(n,t)}}function j8e(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z)&&(e.uniform3ui(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(v6(n,t))return;e.uniform3uiv(this.addr,t),y6(n,t)}}function M8e(e,t){let n=this.cache;if(t.x!==void 0)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z||n[3]!==t.w)&&(e.uniform4ui(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(v6(n,t))return;e.uniform4uiv(this.addr,t),y6(n,t)}}function N8e(e,t,n){let r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i);let a;this.type===e.SAMPLER_2D_SHADOW?(g6.compareFunction=n.isReversedDepthBuffer()?518:515,a=g6):a=l8e,n.setTexture2D(t||a,i)}function P8e(e,t,n){let r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||d8e,i)}function F8e(e,t,n){let r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTextureCube(t||f8e,i)}function I8e(e,t,n){let r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||u8e,i)}function L8e(e){switch(e){case 5126:return v8e;case 35664:return y8e;case 35665:return b8e;case 35666:return x8e;case 35674:return S8e;case 35675:return C8e;case 35676:return w8e;case 5124:case 35670:return T8e;case 35667:case 35671:return E8e;case 35668:case 35672:return D8e;case 35669:case 35673:return O8e;case 5125:return k8e;case 36294:return A8e;case 36295:return j8e;case 36296:return M8e;case 35678:case 36198:case 36298:case 36306:case 35682:return N8e;case 35679:case 36299:case 36307:return P8e;case 35680:case 36300:case 36308:case 36293:return F8e;case 36289:case 36303:case 36311:case 36292:return I8e}}function R8e(e,t){e.uniform1fv(this.addr,t)}function z8e(e,t){let n=_6(t,this.size,2);e.uniform2fv(this.addr,n)}function B8e(e,t){let n=_6(t,this.size,3);e.uniform3fv(this.addr,n)}function V8e(e,t){let n=_6(t,this.size,4);e.uniform4fv(this.addr,n)}function H8e(e,t){let n=_6(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function U8e(e,t){let n=_6(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function W8e(e,t){let n=_6(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function G8e(e,t){e.uniform1iv(this.addr,t)}function K8e(e,t){e.uniform2iv(this.addr,t)}function q8e(e,t){e.uniform3iv(this.addr,t)}function J8e(e,t){e.uniform4iv(this.addr,t)}function Y8e(e,t){e.uniform1uiv(this.addr,t)}function X8e(e,t){e.uniform2uiv(this.addr,t)}function Z8e(e,t){e.uniform3uiv(this.addr,t)}function Q8e(e,t){e.uniform4uiv(this.addr,t)}function $8e(e,t,n){let r=this.cache,i=t.length,a=b6(n,i);v6(r,a)||(e.uniform1iv(this.addr,a),y6(r,a));let o;o=this.type===e.SAMPLER_2D_SHADOW?g6:l8e;for(let e=0;e!==i;++e)n.setTexture2D(t[e]||o,a[e])}function e5e(e,t,n){let r=this.cache,i=t.length,a=b6(n,i);v6(r,a)||(e.uniform1iv(this.addr,a),y6(r,a));for(let e=0;e!==i;++e)n.setTexture3D(t[e]||d8e,a[e])}function t5e(e,t,n){let r=this.cache,i=t.length,a=b6(n,i);v6(r,a)||(e.uniform1iv(this.addr,a),y6(r,a));for(let e=0;e!==i;++e)n.setTextureCube(t[e]||f8e,a[e])}function n5e(e,t,n){let r=this.cache,i=t.length,a=b6(n,i);v6(r,a)||(e.uniform1iv(this.addr,a),y6(r,a));for(let e=0;e!==i;++e)n.setTexture2DArray(t[e]||u8e,a[e])}function r5e(e){switch(e){case 5126:return R8e;case 35664:return z8e;case 35665:return B8e;case 35666:return V8e;case 35674:return H8e;case 35675:return U8e;case 35676:return W8e;case 5124:case 35670:return G8e;case 35667:case 35671:return K8e;case 35668:case 35672:return q8e;case 35669:case 35673:return J8e;case 5125:return Y8e;case 36294:return X8e;case 36295:return Z8e;case 36296:return Q8e;case 35678:case 36198:case 36298:case 36306:case 35682:return $8e;case 35679:case 36299:case 36307:return e5e;case 35680:case 36300:case 36308:case 36293:return t5e;case 36289:case 36303:case 36311:case 36292:return n5e}}var i5e=class{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=L8e(t.type)}},a5e=class{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=r5e(t.type)}},o5e=class{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){let r=this.seq;for(let i=0,a=r.length;i!==a;++i){let a=r[i];a.setValue(e,t[a.id],n)}}},x6=/(\w+)(\])?(\[|\.)?/g;function s5e(e,t){e.seq.push(t),e.map[t.id]=t}function c5e(e,t,n){let r=e.name,i=r.length;for(x6.lastIndex=0;;){let a=x6.exec(r),o=x6.lastIndex,s=a[1],c=a[2]===`]`,l=a[3];if(c&&(s|=0),l===void 0||l===`[`&&o+2===i){s5e(n,l===void 0?new i5e(s,e,t):new a5e(s,e,t));break}else{let e=n.map[s];e===void 0&&(e=new o5e(s),s5e(n,e)),n=e}}}var S6=class{constructor(e,t){this.seq=[],this.map={};let n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let r=0;r<n;++r){let n=e.getActiveUniform(t,r);c5e(n,e.getUniformLocation(t,n.name),this)}let r=[],i=[];for(let t of this.seq)t.type===e.SAMPLER_2D_SHADOW||t.type===e.SAMPLER_CUBE_SHADOW||t.type===e.SAMPLER_2D_ARRAY_SHADOW?r.push(t):i.push(t);r.length>0&&(this.seq=r.concat(i))}setValue(e,t,n,r){let i=this.map[t];i!==void 0&&i.setValue(e,n,r)}setOptional(e,t,n){let r=t[n];r!==void 0&&this.setValue(e,n,r)}static upload(e,t,n,r){for(let i=0,a=t.length;i!==a;++i){let a=t[i],o=n[a.id];o.needsUpdate!==!1&&a.setValue(e,o.value,r)}}static seqWithValue(e,t){let n=[];for(let r=0,i=e.length;r!==i;++r){let i=e[r];i.id in t&&n.push(i)}return n}};function l5e(e,t,n){let r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}var u5e=37297,d5e=0;function f5e(e,t){let n=e.split(` 4468`),r=[],i=Math.max(t-6,0),a=Math.min(t+6,n.length);for(let e=i;e<a;e++){let i=e+1;r.push(`${i===t?`>`:` `} ${i}: ${n[e]}`)}return r.join(` 4469`)}var p5e=new M2;function m5e(e){P2._getMatrix(p5e,P2.workingColorSpace,e);let t=`mat3( ${p5e.elements.map(e=>e.toFixed(4))} )`;switch(P2.getTransfer(e)){case a2:return[t,`LinearTransferOETF`];case o2:return[t,`sRGBTransferOETF`];default:return h2(`WebGLProgram: Unsupported color space: `,e),[t,`LinearTransferOETF`]}}function h5e(e,t,n){let r=e.getShaderParameter(t,e.COMPILE_STATUS),i=(e.getShaderInfoLog(t)||``).trim();if(r&&i===``)return``;let a=/ERROR: 0:(\d+)/.exec(i);if(a){let r=parseInt(a[1]);return n.toUpperCase()+` 4470 4471`+i+` 4472 4473`+f5e(e.getShaderSource(t),r)}else return i}function g5e(e,t){let n=m5e(t);return[`vec4 ${e}( vec4 value ) {`,` return ${n[1]}( vec4( value.rgb * ${n[0]}, value.a ) );`,`}`].join(` 4474`)}var _5e={1:`Linear`,2:`Reinhard`,3:`Cineon`,4:`ACESFilmic`,6:`AgX`,7:`Neutral`,5:`Custom`};function v5e(e,t){let n=_5e[t];return n===void 0?(h2(`WebGLProgram: Unsupported toneMapping:`,t),`vec3 `+e+`( vec3 color ) { return LinearToneMapping( color ); }`):`vec3 `+e+`( vec3 color ) { return `+n+`ToneMapping( color ); }`}var C6=new X;function y5e(){return P2.getLuminanceCoefficients(C6),[`float luminance( const in vec3 rgb ) {`,` const vec3 weights = vec3( ${C6.x.toFixed(4)}, ${C6.y.toFixed(4)}, ${C6.z.toFixed(4)} );`,` return dot( weights, rgb );`,`}`].join(` 4475`)}function b5e(e){return[e.extensionClipCullDistance?`#extension GL_ANGLE_clip_cull_distance : require`:``,e.extensionMultiDraw?`#extension GL_ANGLE_multi_draw : require`:``].filter(w6).join(` 4476`)}function x5e(e){let t=[];for(let n in e){let r=e[n];r!==!1&&t.push(`#define `+n+` `+r)}return t.join(` 4477`)}function S5e(e,t){let n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i<r;i++){let r=e.getActiveAttrib(t,i),a=r.name,o=1;r.type===e.FLOAT_MAT2&&(o=2),r.type===e.FLOAT_MAT3&&(o=3),r.type===e.FLOAT_MAT4&&(o=4),n[a]={type:r.type,location:e.getAttribLocation(t,a),locationSize:o}}return n}function w6(e){return e!==``}function C5e(e,t){let n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function w5e(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}var T5e=/^[ \t]*#include +<([\w\d./]+)>/gm;function T6(e){return e.replace(T5e,D5e)}var E5e=new Map;function D5e(e,t){let n=i6[t];if(n===void 0){let e=E5e.get(t);if(e!==void 0)n=i6[e],h2(`WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.`,t,e);else throw Error(`Can not resolve #include <`+t+`>`)}return T6(n)}var O5e=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function k5e(e){return e.replace(O5e,A5e)}function A5e(e,t,n,r){let i=``;for(let e=parseInt(t);e<parseInt(n);e++)i+=r.replace(/\[\s*i\s*\]/g,`[ `+e+` ]`).replace(/UNROLLED_LOOP_INDEX/g,e);return i}function j5e(e){let t=`precision ${e.precision} float; 4478 precision ${e.precision} int; 4479 precision ${e.precision} sampler2D; 4480 precision ${e.precision} samplerCube; 4481 precision ${e.precision} sampler3D; 4482 precision ${e.precision} sampler2DArray; 4483 precision ${e.precision} sampler2DShadow; 4484 precision ${e.precision} samplerCubeShadow; 4485 precision ${e.precision} sampler2DArrayShadow; 4486 precision ${e.precision} isampler2D; 4487 precision ${e.precision} isampler3D; 4488 precision ${e.precision} isamplerCube; 4489 precision ${e.precision} isampler2DArray; 4490 precision ${e.precision} usampler2D; 4491 precision ${e.precision} usampler3D; 4492 precision ${e.precision} usamplerCube; 4493 precision ${e.precision} usampler2DArray; 4494 `;return e.precision===`highp`?t+=` 4495#define HIGH_PRECISION`:e.precision===`mediump`?t+=` 4496#define MEDIUM_PRECISION`:e.precision===`lowp`&&(t+=` 4497#define LOW_PRECISION`),t}var M5e={1:`SHADOWMAP_TYPE_PCF`,3:`SHADOWMAP_TYPE_VSM`};function N5e(e){return M5e[e.shadowMapType]||`SHADOWMAP_TYPE_BASIC`}var P5e={301:`ENVMAP_TYPE_CUBE`,302:`ENVMAP_TYPE_CUBE`,306:`ENVMAP_TYPE_CUBE_UV`};function F5e(e){return e.envMap===!1?`ENVMAP_TYPE_CUBE`:P5e[e.envMapMode]||`ENVMAP_TYPE_CUBE`}var I5e={302:`ENVMAP_MODE_REFRACTION`};function L5e(e){return e.envMap===!1?`ENVMAP_MODE_REFLECTION`:I5e[e.envMapMode]||`ENVMAP_MODE_REFLECTION`}var R5e={0:`ENVMAP_BLENDING_MULTIPLY`,1:`ENVMAP_BLENDING_MIX`,2:`ENVMAP_BLENDING_ADD`};function z5e(e){return e.envMap===!1?`ENVMAP_BLENDING_NONE`:R5e[e.combine]||`ENVMAP_BLENDING_NONE`}function B5e(e){let t=e.envMapCubeUVHeight;if(t===null)return null;let n=Math.log2(t)-2,r=1/t;return{texelWidth:1/(3*Math.max(2**n,112)),texelHeight:r,maxMip:n}}function V5e(e,t,n,r){let i=e.getContext(),a=n.defines,o=n.vertexShader,s=n.fragmentShader,c=N5e(n),l=F5e(n),u=L5e(n),d=z5e(n),f=B5e(n),p=b5e(n),m=x5e(a),h=i.createProgram(),g,_,v=n.glslVersion?`#version `+n.glslVersion+` 4498`:``;n.isRawShaderMaterial?(g=[`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m].filter(w6).join(` 4499`),g.length>0&&(g+=` 4500`),_=[`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m].filter(w6).join(` 4501`),_.length>0&&(_+=` 4502`)):(g=[j5e(n),`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m,n.extensionCl
vendor: 5,562 bytes, lines 4502-4504
4502ipCullDistance?`#define USE_CLIP_DISTANCE`:``,n.batching?`#define USE_BATCHING`:``,n.batchingColor?`#define USE_BATCHING_COLOR`:``,n.instancing?`#define USE_INSTANCING`:``,n.instancingColor?`#define USE_INSTANCING_COLOR`:``,n.instancingMorph?`#define USE_INSTANCING_MORPH`:``,n.useFog&&n.fog?`#define USE_FOG`:``,n.useFog&&n.fogExp2?`#define FOG_EXP2`:``,n.map?`#define USE_MAP`:``,n.envMap?`#define USE_ENVMAP`:``,n.envMap?`#define `+u:``,n.lightMap?`#define USE_LIGHTMAP`:``,n.aoMap?`#define USE_AOMAP`:``,n.bumpMap?`#define USE_BUMPMAP`:``,n.normalMap?`#define USE_NORMALMAP`:``,n.normalMapObjectSpace?`#define USE_NORMALMAP_OBJECTSPACE`:``,n.normalMapTangentSpace?`#define USE_NORMALMAP_TANGENTSPACE`:``,n.displacementMap?`#define USE_DISPLACEMENTMAP`:``,n.emissiveMap?`#define USE_EMISSIVEMAP`:``,n.anisotropy?`#define USE_ANISOTROPY`:``,n.anisotropyMap?`#define USE_ANISOTROPYMAP`:``,n.clearcoatMap?`#define USE_CLEARCOATMAP`:``,n.clearcoatRoughnessMap?`#define USE_CLEARCOAT_ROUGHNESSMAP`:``,n.clearcoatNormalMap?`#define USE_CLEARCOAT_NORMALMAP`:``,n.iridescenceMap?`#define USE_IRIDESCENCEMAP`:``,n.iridescenceThicknessMap?`#define USE_IRIDESCENCE_THICKNESSMAP`:``,n.specularMap?`#define USE_SPECULARMAP`:``,n.specularColorMap?`#define USE_SPECULAR_COLORMAP`:``,n.specularIntensityMap?`#define USE_SPECULAR_INTENSITYMAP`:``,n.roughnessMap?`#define USE_ROUGHNESSMAP`:``,n.metalnessMap?`#define USE_METALNESSMAP`:``,n.alphaMap?`#define USE_ALPHAMAP`:``,n.alphaHash?`#define USE_ALPHAHASH`:``,n.transmission?`#define USE_TRANSMISSION`:``,n.transmissionMap?`#define USE_TRANSMISSIONMAP`:``,n.thicknessMap?`#define USE_THICKNESSMAP`:``,n.sheenColorMap?`#define USE_SHEEN_COLORMAP`:``,n.sheenRoughnessMap?`#define USE_SHEEN_ROUGHNESSMAP`:``,n.mapUv?`#define MAP_UV `+n.mapUv:``,n.alphaMapUv?`#define ALPHAMAP_UV `+n.alphaMapUv:``,n.lightMapUv?`#define LIGHTMAP_UV `+n.lightMapUv:``,n.aoMapUv?`#define AOMAP_UV `+n.aoMapUv:``,n.emissiveMapUv?`#define EMISSIVEMAP_UV `+n.emissiveMapUv:``,n.bumpMapUv?`#define BUMPMAP_UV `+n.bumpMapUv:``,n.normalMapUv?`#define NORMALMAP_UV `+n.normalMapUv:``,n.displacementMapUv?`#define DISPLACEMENTMAP_UV `+n.displacementMapUv:``,n.metalnessMapUv?`#define METALNESSMAP_UV `+n.metalnessMapUv:``,n.roughnessMapUv?`#define ROUGHNESSMAP_UV `+n.roughnessMapUv:``,n.anisotropyMapUv?`#define ANISOTROPYMAP_UV `+n.anisotropyMapUv:``,n.clearcoatMapUv?`#define CLEARCOATMAP_UV `+n.clearcoatMapUv:``,n.clearcoatNormalMapUv?`#define CLEARCOAT_NORMALMAP_UV `+n.clearcoatNormalMapUv:``,n.clearcoatRoughnessMapUv?`#define CLEARCOAT_ROUGHNESSMAP_UV `+n.clearcoatRoughnessMapUv:``,n.iridescenceMapUv?`#define IRIDESCENCEMAP_UV `+n.iridescenceMapUv:``,n.iridescenceThicknessMapUv?`#define IRIDESCENCE_THICKNESSMAP_UV `+n.iridescenceThicknessMapUv:``,n.sheenColorMapUv?`#define SHEEN_COLORMAP_UV `+n.sheenColorMapUv:``,n.sheenRoughnessMapUv?`#define SHEEN_ROUGHNESSMAP_UV `+n.sheenRoughnessMapUv:``,n.specularMapUv?`#define SPECULARMAP_UV `+n.specularMapUv:``,n.specularColorMapUv?`#define SPECULAR_COLORMAP_UV `+n.specularColorMapUv:``,n.specularIntensityMapUv?`#define SPECULAR_INTENSITYMAP_UV `+n.specularIntensityMapUv:``,n.transmissionMapUv?`#define TRANSMISSIONMAP_UV `+n.transmissionMapUv:``,n.thicknessMapUv?`#define THICKNESSMAP_UV `+n.thicknessMapUv:``,n.vertexTangents&&n.flatShading===!1?`#define USE_TANGENT`:``,n.vertexNormals?`#define HAS_NORMAL`:``,n.vertexColors?`#define USE_COLOR`:``,n.vertexAlphas?`#define USE_COLOR_ALPHA`:``,n.vertexUv1s?`#define USE_UV1`:``,n.vertexUv2s?`#define USE_UV2`:``,n.vertexUv3s?`#define USE_UV3`:``,n.pointsUvs?`#define USE_POINTS_UV`:``,n.flatShading?`#define FLAT_SHADED`:``,n.skinning?`#define USE_SKINNING`:``,n.morphTargets?`#define USE_MORPHTARGETS`:``,n.morphNormals&&n.flatShading===!1?`#define USE_MORPHNORMALS`:``,n.morphColors?`#define USE_MORPHCOLORS`:``,n.morphTargetsCount>0?`#define MORPHTARGETS_TEXTURE_STRIDE `+n.morphTextureStride:``,n.morphTargetsCount>0?`#define MORPHTARGETS_COUNT `+n.morphTargetsCount:``,n.doubleSided?`#define DOUBLE_SIDED`:``,n.flipSided?`#define FLIP_SIDED`:``,n.shadowMapEnabled?`#define USE_SHADOWMAP`:``,n.shadowMapEnabled?`#define `+c:``,n.sizeAttenuation?`#define USE_SIZEATTENUATION`:``,n.numLightProbes>0?`#define USE_LIGHT_PROBES`:``,n.logarithmicDepthBuffer?`#define USE_LOGARITHMIC_DEPTH_BUFFER`:``,n.reversedDepthBuffer?`#define USE_REVERSED_DEPTH_BUFFER`:``,`uniform mat4 modelMatrix;`,`uniform mat4 modelViewMatrix;`,`uniform mat4 projectionMatrix;`,`uniform mat4 viewMatrix;`,`uniform mat3 normalMatrix;`,`uniform vec3 cameraPosition;`,`uniform bool isOrthographic;`,`#ifdef USE_INSTANCING`,` attribute mat4 instanceMatrix;`,`#endif`,`#ifdef USE_INSTANCING_COLOR`,` attribute vec3 instanceColor;`,`#endif`,`#ifdef USE_INSTANCING_MORPH`,` uniform sampler2D morphTexture;`,`#endif`,`attribute vec3 position;`,`attribute vec3 normal;`,`attribute vec2 uv;`,`#ifdef USE_UV1`,` attribute vec2 uv1;`,`#endif`,`#ifdef USE_UV2`,` attribute vec2 uv2;`,`#endif`,`#ifdef USE_UV3`,` attribute vec2 uv3;`,`#endif`,`#ifdef USE_TANGENT`,` attribute vec4 tangent;`,`#endif`,`#if defined( USE_COLOR_ALPHA )`,` attribute vec4 color;`,`#elif defined( USE_COLOR )`,` attribute vec3 color;`,`#endif`,`#ifdef USE_SKINNING`,` attribute vec4 skinIndex;`,` attribute vec4 skinWeight;`,`#endif`,` 4503`].filter(w6).join(` 4504`),_=[j5e(n),`#define SHADER_TYPE `+n.shaderType,`#define SHADER_NAME `+n.shaderName,m,n.useFog&&n.fog?`#define USE_FOG`:``,n.useFog&&n.fogExp2?`#define FOG_EXP2`:``,n.alphaToCoverage?`#define ALPHA_TO_COVERAGE`:``,n.map?`#define USE_MAP`:``,n.matc
vendor: 21,607 bytes, lines 4504-4518
4504ap?`#define USE_MATCAP`:``,n.envMap?`#define USE_ENVMAP`:``,n.envMap?`#define `+l:``,n.envMap?`#define `+u:``,n.envMap?`#define `+d:``,f?`#define CUBEUV_TEXEL_WIDTH `+f.texelWidth:``,f?`#define CUBEUV_TEXEL_HEIGHT `+f.texelHeight:``,f?`#define CUBEUV_MAX_MIP `+f.maxMip+`.0`:``,n.lightMap?`#define USE_LIGHTMAP`:``,n.aoMap?`#define USE_AOMAP`:``,n.bumpMap?`#define USE_BUMPMAP`:``,n.normalMap?`#define USE_NORMALMAP`:``,n.normalMapObjectSpace?`#define USE_NORMALMAP_OBJECTSPACE`:``,n.normalMapTangentSpace?`#define USE_NORMALMAP_TANGENTSPACE`:``,n.packedNormalMap?`#define USE_PACKED_NORMALMAP`:``,n.emissiveMap?`#define USE_EMISSIVEMAP`:``,n.anisotropy?`#define USE_ANISOTROPY`:``,n.anisotropyMap?`#define USE_ANISOTROPYMAP`:``,n.clearcoat?`#define USE_CLEARCOAT`:``,n.clearcoatMap?`#define USE_CLEARCOATMAP`:``,n.clearcoatRoughnessMap?`#define USE_CLEARCOAT_ROUGHNESSMAP`:``,n.clearcoatNormalMap?`#define USE_CLEARCOAT_NORMALMAP`:``,n.dispersion?`#define USE_DISPERSION`:``,n.iridescence?`#define USE_IRIDESCENCE`:``,n.iridescenceMap?`#define USE_IRIDESCENCEMAP`:``,n.iridescenceThicknessMap?`#define USE_IRIDESCENCE_THICKNESSMAP`:``,n.specularMap?`#define USE_SPECULARMAP`:``,n.specularColorMap?`#define USE_SPECULAR_COLORMAP`:``,n.specularIntensityMap?`#define USE_SPECULAR_INTENSITYMAP`:``,n.roughnessMap?`#define USE_ROUGHNESSMAP`:``,n.metalnessMap?`#define USE_METALNESSMAP`:``,n.alphaMap?`#define USE_ALPHAMAP`:``,n.alphaTest?`#define USE_ALPHATEST`:``,n.alphaHash?`#define USE_ALPHAHASH`:``,n.sheen?`#define USE_SHEEN`:``,n.sheenColorMap?`#define USE_SHEEN_COLORMAP`:``,n.sheenRoughnessMap?`#define USE_SHEEN_ROUGHNESSMAP`:``,n.transmission?`#define USE_TRANSMISSION`:``,n.transmissionMap?`#define USE_TRANSMISSIONMAP`:``,n.thicknessMap?`#define USE_THICKNESSMAP`:``,n.vertexTangents&&n.flatShading===!1?`#define USE_TANGENT`:``,n.vertexColors||n.instancingColor?`#define USE_COLOR`:``,n.vertexAlphas||n.batchingColor?`#define USE_COLOR_ALPHA`:``,n.vertexUv1s?`#define USE_UV1`:``,n.vertexUv2s?`#define USE_UV2`:``,n.vertexUv3s?`#define USE_UV3`:``,n.pointsUvs?`#define USE_POINTS_UV`:``,n.gradientMap?`#define USE_GRADIENTMAP`:``,n.flatShading?`#define FLAT_SHADED`:``,n.doubleSided?`#define DOUBLE_SIDED`:``,n.flipSided?`#define FLIP_SIDED`:``,n.shadowMapEnabled?`#define USE_SHADOWMAP`:``,n.shadowMapEnabled?`#define `+c:``,n.premultipliedAlpha?`#define PREMULTIPLIED_ALPHA`:``,n.numLightProbes>0?`#define USE_LIGHT_PROBES`:``,n.numLightProbeGrids>0?`#define USE_LIGHT_PROBES_GRID`:``,n.decodeVideoTexture?`#define DECODE_VIDEO_TEXTURE`:``,n.decodeVideoTextureEmissive?`#define DECODE_VIDEO_TEXTURE_EMISSIVE`:``,n.logarithmicDepthBuffer?`#define USE_LOGARITHMIC_DEPTH_BUFFER`:``,n.reversedDepthBuffer?`#define USE_REVERSED_DEPTH_BUFFER`:``,`uniform mat4 viewMatrix;`,`uniform vec3 cameraPosition;`,`uniform bool isOrthographic;`,n.toneMapping===0?``:`#define TONE_MAPPING`,n.toneMapping===0?``:i6.tonemapping_pars_fragment,n.toneMapping===0?``:v5e(`toneMapping`,n.toneMapping),n.dithering?`#define DITHERING`:``,n.opaque?`#define OPAQUE`:``,i6.colorspace_pars_fragment,g5e(`linearToOutputTexel`,n.outputColorSpace),y5e(),n.useDepthPacking?`#define DEPTH_PACKING `+n.depthPacking:``,` 4505`].filter(w6).join(` 4506`)),o=T6(o),o=C5e(o,n),o=w5e(o,n),s=T6(s),s=C5e(s,n),s=w5e(s,n),o=k5e(o),s=k5e(s),n.isRawShaderMaterial!==!0&&(v=`#version 300 es 4507`,g=[p,`#define attribute in`,`#define varying out`,`#define texture2D texture`].join(` 4508`)+` 4509`+g,_=[`#define varying in`,n.glslVersion===`300 es`?``:`layout(location = 0) out highp vec4 pc_fragColor;`,n.glslVersion===`300 es`?``:`#define gl_FragColor pc_fragColor`,`#define gl_FragDepthEXT gl_FragDepth`,`#define texture2D texture`,`#define textureCube texture`,`#define texture2DProj textureProj`,`#define texture2DLodEXT textureLod`,`#define texture2DProjLodEXT textureProjLod`,`#define textureCubeLodEXT textureLod`,`#define texture2DGradEXT textureGrad`,`#define texture2DProjGradEXT textureProjGrad`,`#define textureCubeGradEXT textureGrad`].join(` 4510`)+` 4511`+_);let y=v+g+o,b=v+_+s,x=l5e(i,i.VERTEX_SHADER,y),S=l5e(i,i.FRAGMENT_SHADER,b);i.attachShader(h,x),i.attachShader(h,S),n.index0AttributeName===void 0?n.morphTargets===!0&&i.bindAttribLocation(h,0,`position`):i.bindAttribLocation(h,0,n.index0AttributeName),i.linkProgram(h);function C(t){if(e.debug.checkShaderErrors){let n=i.getProgramInfoLog(h)||``,r=i.getShaderInfoLog(x)||``,a=i.getShaderInfoLog(S)||``,o=n.trim(),s=r.trim(),c=a.trim(),l=!0,u=!0;if(i.getProgramParameter(h,i.LINK_STATUS)===!1)if(l=!1,typeof e.debug.onShaderError==`function`)e.debug.onShaderError(i,h,x,S);else{let e=h5e(i,x,`vertex`),n=h5e(i,S,`fragment`);g2(`THREE.WebGLProgram: Shader Error `+i.getError()+` - VALIDATE_STATUS `+i.getProgramParameter(h,i.VALIDATE_STATUS)+` 4512 4513Material Name: `+t.name+` 4514Material Type: `+t.type+` 4515 4516Program Info Log: `+o+` 4517`+e+` 4518`+n)}else o===``?(s===``||c===``)&&(u=!1):h2(`WebGLProgram: Program Info Log:`,o);u&&(t.diagnostics={runnable:l,programLog:o,vertexShader:{log:s,prefix:g},fragmentShader:{log:c,prefix:_}})}i.deleteShader(x),i.deleteShader(S),w=new S6(i,h),T=S5e(i,h)}let w;this.getUniforms=function(){return w===void 0&&C(this),w};let T;this.getAttributes=function(){return T===void 0&&C(this),T};let E=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return E===!1&&(E=i.getProgramParameter(h,u5e)),E},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(h),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=d5e++,this.cacheKey=t,this.usedTimes=1,this.program=h,this.vertexShader=x,this.fragmentShader=S,this}var H5e=0,U5e=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){let t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),i=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return a.has(r)===!1&&(a.add(r),r.usedTimes++),a.has(i)===!1&&(a.add(i),i.usedTimes++),this}remove(e){let t=this.materialCache.get(e);for(let e of t)e.usedTimes--,e.usedTimes===0&&this.shaderCache.delete(e.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){let t=this.materialCache,n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){let t=this.shaderCache,n=t.get(e);return n===void 0&&(n=new W5e(e),t.set(e,n)),n}},W5e=class{constructor(e){this.id=H5e++,this.code=e,this.usedTimes=0}};function G5e(e){return e===1030||e===37490||e===36285}function K5e(e,t,n,r,i,a){let o=new Z2,s=new U5e,c=new Set,l=[],u=new Map,d=r.logarithmicDepthBuffer,f=r.precision,p={MeshDepthMaterial:`depth`,MeshDistanceMaterial:`distance`,MeshNormalMaterial:`normal`,MeshBasicMaterial:`basic`,MeshLambertMaterial:`lambert`,MeshPhongMaterial:`phong`,MeshToonMaterial:`toon`,MeshStandardMaterial:`physical`,MeshPhysicalMaterial:`physical`,MeshMatcapMaterial:`matcap`,LineBasicMaterial:`basic`,LineDashedMaterial:`dashed`,PointsMaterial:`points`,ShadowMaterial:`shadow`,SpriteMaterial:`sprite`};function m(e){return c.add(e),e===0?`uv`:`uv${e}`}function h(i,o,l,u,h,g){let _=u.fog,v=h.geometry,y=i.isMeshStandardMaterial||i.isMeshLambertMaterial||i.isMeshPhongMaterial?u.environment:null,b=i.isMeshStandardMaterial||i.isMeshLambertMaterial&&!i.envMap||i.isMeshPhongMaterial&&!i.envMap,x=t.get(i.envMap||y,b),S=x&&x.mapping===306?x.image.height:null,C=p[i.type];i.precision!==null&&(f=r.getMaxPrecision(i.precision),f!==i.precision&&h2(`WebGLProgram.getParameters:`,i.precision,`not supported, using`,f,`instead.`));let w=v.morphAttributes.position||v.morphAttributes.normal||v.morphAttributes.color,T=w===void 0?0:w.length,E=0;v.morphAttributes.position!==void 0&&(E=1),v.morphAttributes.normal!==void 0&&(E=2),v.morphAttributes.color!==void 0&&(E=3);let D,O,k,A;if(C){let e=a6[C];D=e.vertexShader,O=e.fragmentShader}else D=i.vertexShader,O=i.fragmentShader,s.update(i),k=s.getVertexShaderID(i),A=s.getFragmentShaderID(i);let j=e.getRenderTarget(),M=e.state.buffers.depth.getReversed(),N=h.isInstancedMesh===!0,P=h.isBatchedMesh===!0,F=!!i.map,ee=!!i.matcap,te=!!x,ne=!!i.aoMap,I=!!i.lightMap,re=!!i.bumpMap,ie=!!i.normalMap,ae=!!i.displacementMap,oe=!!i.emissiveMap,se=!!i.metalnessMap,ce=!!i.roughnessMap,le=i.anisotropy>0,ue=i.clearcoat>0,de=i.dispersion>0,fe=i.iridescence>0,pe=i.sheen>0,me=i.transmission>0,he=le&&!!i.anisotropyMap,ge=ue&&!!i.clearcoatMap,_e=ue&&!!i.clearcoatNormalMap,L=ue&&!!i.clearcoatRoughnessMap,ve=fe&&!!i.iridescenceMap,ye=fe&&!!i.iridescenceThicknessMap,be=pe&&!!i.sheenColorMap,R=pe&&!!i.sheenRoughnessMap,xe=!!i.specularMap,Se=!!i.specularColorMap,Ce=!!i.specularIntensityMap,we=me&&!!i.transmissionMap,Te=me&&!!i.thicknessMap,Ee=!!i.gradientMap,De=!!i.alphaMap,Oe=i.alphaTest>0,ke=!!i.alphaHash,Ae=!!i.extensions,je=0;i.toneMapped&&(j===null||j.isXRRenderTarget===!0)&&(je=e.toneMapping);let Me={shaderID:C,shaderType:i.type,shaderName:i.name,vertexShader:D,fragmentShader:O,defines:i.defines,customVertexShaderID:k,customFragmentShaderID:A,isRawShaderMaterial:i.isRawShaderMaterial===!0,glslVersion:i.glslVersion,precision:f,batching:P,batchingColor:P&&h._colorsTexture!==null,instancing:N,instancingColor:N&&h.instanceColor!==null,instancingMorph:N&&h.morphTexture!==null,outputColorSpace:j===null?e.outputColorSpace:j.isXRRenderTarget===!0?j.texture.colorSpace:P2.workingColorSpace,alphaToCoverage:!!i.alphaToCoverage,map:F,matcap:ee,envMap:te,envMapMode:te&&x.mapping,envMapCubeUVHeight:S,aoMap:ne,lightMap:I,bumpMap:re,normalMap:ie,displacementMap:ae,emissiveMap:oe,normalMapObjectSpace:ie&&i.normalMapType===1,normalMapTangentSpace:ie&&i.normalMapType===0,packedNormalMap:ie&&i.normalMapType===0&&G5e(i.normalMap.format),metalnessMap:se,roughnessMap:ce,anisotropy:le,anisotropyMap:he,clearcoat:ue,clearcoatMap:ge,clearcoatNormalMap:_e,clearcoatRoughnessMap:L,dispersion:de,iridescence:fe,iridescenceMap:ve,iridescenceThicknessMap:ye,sheen:pe,sheenColorMap:be,sheenRoughnessMap:R,specularMap:xe,specularColorMap:Se,specularIntensityMap:Ce,transmission:me,transmissionMap:we,thicknessMap:Te,gradientMap:Ee,opaque:i.transparent===!1&&i.blending===1&&i.alphaToCoverage===!1,alphaMap:De,alphaTest:Oe,alphaHash:ke,combine:i.combine,mapUv:F&&m(i.map.channel),aoMapUv:ne&&m(i.aoMap.channel),lightMapUv:I&&m(i.lightMap.channel),bumpMapUv:re&&m(i.bumpMap.channel),normalMapUv:ie&&m(i.normalMap.channel),displacementMapUv:ae&&m(i.displacementMap.channel),emissiveMapUv:oe&&m(i.emissiveMap.channel),metalnessMapUv:se&&m(i.metalnessMap.channel),roughnessMapUv:ce&&m(i.roughnessMap.channel),anisotropyMapUv:he&&m(i.anisotropyMap.channel),clearcoatMapUv:ge&&m(i.clearcoatMap.channel),clearcoatNormalMapUv:_e&&m(i.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:L&&m(i.clearcoatRoughnessMap.channel),iridescenceMapUv:ve&&m(i.iridescenceMap.channel),iridescenceThicknessMapUv:ye&&m(i.iridescenceThicknessMap.channel),sheenColorMapUv:be&&m(i.sheenColorMap.channel),sheenRoughnessMapUv:R&&m(i.sheenRoughnessMap.channel),specularMapUv:xe&&m(i.specularMap.channel),specularColorMapUv:Se&&m(i.specularColorMap.channel),specularIntensityMapUv:Ce&&m(i.specularIntensityMap.channel),transmissionMapUv:we&&m(i.transmissionMap.channel),thicknessMapUv:Te&&m(i.thicknessMap.channel),alphaMapUv:De&&m(i.alphaMap.channel),vertexTangents:!!v.attributes.tangent&&(ie||le),vertexNormals:!!v.attributes.normal,vertexColors:i.vertexColors,vertexAlphas:i.vertexColors===!0&&!!v.attributes.color&&v.attributes.color.itemSize===4,pointsUvs:h.isPoints===!0&&!!v.attributes.uv&&(F||De),fog:!!_,useFog:i.fog===!0,fogExp2:!!_&&_.isFogExp2,flatShading:i.wireframe===!1&&(i.flatShading===!0||v.attributes.normal===void 0&&ie===!1&&(i.isMeshLambertMaterial||i.isMeshPhongMaterial||i.isMeshStandardMaterial||i.isMeshPhysicalMaterial)),sizeAttenuation:i.sizeAttenuation===!0,logarithmicDepthBuffer:d,reversedDepthBuffer:M,skinning:h.isSkinnedMesh===!0,morphTargets:v.morphAttributes.position!==void 0,morphNormals:v.morphAttributes.normal!==void 0,morphColors:v.morphAttributes.color!==void 0,morphTargetsCount:T,morphTextureStride:E,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numSpotLightMaps:o.spotLightMap.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numDirLightShadows:o.directionalShadowMap.length,numPointLightShadows:o.pointShadowMap.length,numSpotLightShadows:o.spotShadowMap.length,numSpotLightShadowsWithMaps:o.numSpotLightShadowsWithMaps,numLightProbes:o.numLightProbes,numLightProbeGrids:g.length,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:i.dithering,shadowMapEnabled:e.shadowMap.enabled&&l.length>0,shadowMapType:e.shadowMap.type,toneMapping:je,decodeVideoTexture:F&&i.map.isVideoTexture===!0&&P2.getTransfer(i.map.colorSpace)===`srgb`,decodeVideoTextureEmissive:oe&&i.emissiveMap.isVideoTexture===!0&&P2.getTransfer(i.emissiveMap.colorSpace)===`srgb`,premultipliedAlpha:i.premultipliedAlpha,doubleSided:i.side===2,flipSided:i.side===1,useDepthPacking:i.depthPacking>=0,depthPacking:i.depthPacking||0,index0AttributeName:i.index0AttributeName,extensionClipCullDistance:Ae&&i.extensions.clipCullDistance===!0&&n.has(`WEBGL_clip_cull_distance`),extensionMultiDraw:(Ae&&i.extensions.multiDraw===!0||P)&&n.has(`WEBGL_multi_draw`),rendererExtensionParallelShaderCompile:n.has(`KHR_parallel_shader_compile`),customProgramCacheKey:i.customProgramCacheKey()};return Me.vertexUv1s=c.has(1),Me.vertexUv2s=c.has(2),Me.vertexUv3s=c.has(3),c.clear(),Me}function g(t){let n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),t.defines!==void 0)for(let e in t.defines)n.push(e),n.push(t.defines[e]);return t.isRawShaderMaterial===!1&&(_(n,t),v(n,t),n.push(e.outputColorSpace)),n.push(t.customProgramCacheKey),n.join()}function _(e,t){e.push(t.precision),e.push(t.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.anisotropyMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.numLightProbes),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}function v(e,t){o.disableAll(),t.instancing&&o.enable(0),t.instancingColor&&o.enable(1),t.instancingMorph&&o.enable(2),t.matcap&&o.enable(3),t.envMap&&o.enable(4),t.normalMapObjectSpace&&o.enable(5),t.normalMapTangentSpace&&o.enable(6),t.clearcoat&&o.enable(7),t.iridescence&&o.enable(8),t.alphaTest&&o.enable(9),t.vertexColors&&o.enable(10),t.vertexAlphas&&o.enable(11),t.vertexUv1s&&o.enable(12),t.vertexUv2s&&o.enable(13),t.vertexUv3s&&o.enable(14),t.vertexTangents&&o.enable(15),t.anisotropy&&o.enable(16),t.alphaHash&&o.enable(17),t.batching&&o.enable(18),t.dispersion&&o.enable(19),t.batchingColor&&o.enable(20),t.gradientMap&&o.enable(21),t.packedNormalMap&&o.enable(22),t.vertexNormals&&o.enable(23),e.push(o.mask),o.disableAll(),t.fog&&o.enable(0),t.useFog&&o.enable(1),t.flatShading&&o.enable(2),t.logarithmicDepthBuffer&&o.enable(3),t.reversedDepthBuffer&&o.enable(4),t.skinning&&o.enable(5),t.morphTargets&&o.enable(6),t.morphNormals&&o.enable(7),t.morphColors&&o.enable(8),t.premultipliedAlpha&&o.enable(9),t.shadowMapEnabled&&o.enable(10),t.doubleSided&&o.enable(11),t.flipSided&&o.enable(12),t.useDepthPacking&&o.enable(13),t.dithering&&o.enable(14),t.transmission&&o.enable(15),t.sheen&&o.enable(16),t.opaque&&o.enable(17),t.pointsUvs&&o.enable(18),t.decodeVideoTexture&&o.enable(19),t.decodeVideoTextureEmissive&&o.enable(20),t.alphaToCoverage&&o.enable(21),t.numLightProbeGrids>0&&o.enable(22),e.push(o.mask)}function y(e){let t=p[e.type],n;if(t){let e=a6[t];n=q3e.clone(e.uniforms)}else n=e.uniforms;return n}function b(t,n){let r=u.get(n);return r===void 0?(r=new V5e(e,n,t,i),l.push(r),u.set(n,r)):++r.usedTimes,r}function x(e){if(--e.usedTimes===0){let t=l.indexOf(e);l[t]=l[l.length-1],l.pop(),u.delete(e.cacheKey),e.destroy()}}function S(e){s.remove(e)}function C(){s.dispose()}return{getParameters:h,getProgramCacheKey:g,getUniforms:y,acquireProgram:b,releaseProgram:x,releaseShaderCache:S,programs:l,dispose:C}}function q5e(){let e=new WeakMap;function t(t){return e.has(t)}function n(t){let n=e.get(t);return n===void 0&&(n={},e.set(t,n)),n}function r(t){e.delete(t)}function i(t,n,r){e.get(t)[n]=r}function a(){e=new WeakMap}return{has:t,get:n,remove:r,update:i,dispose:a}}function J5e(e,t){return e.groupOrder===t.groupOrder?e.renderOrder===t.renderOrder?e.material.id===t.material.id?e.materialVariant===t.materialVariant?e.z===t.z?e.id-t.id:e.z-t.z:e.materialVariant-t.materialVariant:e.material.id-t.material.id:e.renderOrder-t.renderOrder:e.groupOrder-t.groupOrder}function Y5e(e,t){return e.groupOrder===t.groupOrder?e.renderOrder===t.renderOrder?e.z===t.z?e.id-t.id:t.z-e.z:e.renderOrder-t.renderOrder:e.groupOrder-t.groupOrder}function X5e(){let e=[],t=0,n=[],r=[],i=[];function a(){t=0,n.length=0,r.length=0,i.length=0}function o(e){let t=0;return e.isInstancedMesh&&(t+=2),e.isSkinnedMesh&&(t+=1),t}function s(n,r,i,a,s,c){let l=e[t];return l===void 0?(l={id:n.id,object:n,geometry:r,material:i,materialVariant:o(n),groupOrder:a,renderOrder:n.renderOrder,z:s,group:c},e[t]=l):(l.id=n.id,l.object=n,l.geometry=r,l.material=i,l.materialVariant=o(n),l.groupOrder=a,l.renderOrder=n.renderOrder,l.z=s,l.group=c),t++,l}function c(e,t,a,o,c,l){let u=s(e,t,a,o,c,l);a.transmission>0?r.push(u):a.transparent===!0?i.push(u):n.push(u)}function l(e,t,a,o,c,l){let u=s(e,t,a,o,c,l);a.transmission>0?r.unshift(u):a.transparent===!0?i.unshift(u):n.unshift(u)}function u(e,t){n.length>1&&n.sort(e||J5e),r.length>1&&r.sort(t||Y5e),i.length>1&&i.sort(t||Y5e)}function d(){for(let n=t,r=e.length;n<r;n++){let t=e[n];if(t.id===null)break;t.id=null,t.object=null,t.geometry=null,t.material=null,t.group=null}}return{opaque:n,transmissive:r,transparent:i,init:a,push:c,unshift:l,finish:d,sort:u}}function Z5e(){let e=new WeakMap;function t(t,n){let r=e.get(t),i;return r===void 0?(i=new X5e,e.set(t,[i])):n>=r.length?(i=new X5e,r.push(i)):i=r[n],i}function n(){e=new WeakMap}return{get:t,dispose:n}}function Q5e(){let e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let n;switch(t.type){case`DirectionalLight`:n={direction:new X,color:new u4};break;case`SpotLight`:n={position:new X,direction:new X,color:new u4,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case`PointLight`:n={position:new X,color:new u4,distance:0,decay:0};break;case`HemisphereLight`:n={direction:new X,skyColor:new u4,groundColor:new u4};break;case`RectAreaLight`:n={color:new u4,position:new X,halfWidth:new X,halfHeight:new X};break}return e[t.id]=n,n}}}function $5e(){let e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let n;switch(t.type){case`DirectionalLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new k2};break;case`SpotLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new k2};break;case`PointLight`:n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new k2,shadowCameraNear:1,shadowCameraFar:1e3};break}return e[t.id]=n,n}}}var e7e=0;function t7e(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+ +!!t.map-!!e.map}function n7e(e){let t=new Q5e,n=$5e(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let e=0;e<9;e++)r.probe.push(new X);let i=new X,a=new W2,o=new W2;function s(i){let a=0,o=0,s=0;for(let e=0;e<9;e++)r.probe[e].set(0,0,0);let c=0,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0,_=0,v=0;i.sort(t7e);for(let e=0,y=i.length;e<y;e++){let y=i[e],b=y.color,x=y.intensity,S=y.distance,C=null;if(y.shadow&&y.shadow.map&&(C=y.shadow.map.texture.format===1030?y.shadow.map.texture:y.shadow.map.depthTexture||y.shadow.map.texture),y.isAmbientLight)a+=b.r*x,o+=b.g*x,s+=b.b*x;else if(y.isLightProbe){for(let e=0;e<9;e++)r.probe[e].addScaledVector(y.sh.coefficients[e],x);v++}else if(y.isDirectionalLight){let e=t.get(y);if(e.color.copy(y.color).multiplyScalar(y.intensity),y.castShadow){let e=y.shadow,t=n.get(y);t.shadowIntensity=e.intensity,t.shadowBias=e.bias,t.shadowNormalBias=e.n
vendor: 4,616 bytes, lines 4518-4523
4518ormalBias,t.shadowRadius=e.radius,t.shadowMapSize=e.mapSize,r.directionalShadow[c]=t,r.directionalShadowMap[c]=C,r.directionalShadowMatrix[c]=y.shadow.matrix,p++}r.directional[c]=e,c++}else if(y.isSpotLight){let e=t.get(y);e.position.setFromMatrixPosition(y.matrixWorld),e.color.copy(b).multiplyScalar(x),e.distance=S,e.coneCos=Math.cos(y.angle),e.penumbraCos=Math.cos(y.angle*(1-y.penumbra)),e.decay=y.decay,r.spot[u]=e;let i=y.shadow;if(y.map&&(r.spotLightMap[g]=y.map,g++,i.updateMatrices(y),y.castShadow&&_++),r.spotLightMatrix[u]=i.matrix,y.castShadow){let e=n.get(y);e.shadowIntensity=i.intensity,e.shadowBias=i.bias,e.shadowNormalBias=i.normalBias,e.shadowRadius=i.radius,e.shadowMapSize=i.mapSize,r.spotShadow[u]=e,r.spotShadowMap[u]=C,h++}u++}else if(y.isRectAreaLight){let e=t.get(y);e.color.copy(b).multiplyScalar(x),e.halfWidth.set(y.width*.5,0,0),e.halfHeight.set(0,y.height*.5,0),r.rectArea[d]=e,d++}else if(y.isPointLight){let e=t.get(y);if(e.color.copy(y.color).multiplyScalar(y.intensity),e.distance=y.distance,e.decay=y.decay,y.castShadow){let e=y.shadow,t=n.get(y);t.shadowIntensity=e.intensity,t.shadowBias=e.bias,t.shadowNormalBias=e.normalBias,t.shadowRadius=e.radius,t.shadowMapSize=e.mapSize,t.shadowCameraNear=e.camera.near,t.shadowCameraFar=e.camera.far,r.pointShadow[l]=t,r.pointShadowMap[l]=C,r.pointShadowMatrix[l]=y.shadow.matrix,m++}r.point[l]=e,l++}else if(y.isHemisphereLight){let e=t.get(y);e.skyColor.copy(y.color).multiplyScalar(x),e.groundColor.copy(y.groundColor).multiplyScalar(x),r.hemi[f]=e,f++}}d>0&&(e.has(`OES_texture_float_linear`)===!0?(r.rectAreaLTC1=Z.LTC_FLOAT_1,r.rectAreaLTC2=Z.LTC_FLOAT_2):(r.rectAreaLTC1=Z.LTC_HALF_1,r.rectAreaLTC2=Z.LTC_HALF_2)),r.ambient[0]=a,r.ambient[1]=o,r.ambient[2]=s;let y=r.hash;(y.directionalLength!==c||y.pointLength!==l||y.spotLength!==u||y.rectAreaLength!==d||y.hemiLength!==f||y.numDirectionalShadows!==p||y.numPointShadows!==m||y.numSpotShadows!==h||y.numSpotMaps!==g||y.numLightProbes!==v)&&(r.directional.length=c,r.spot.length=u,r.rectArea.length=d,r.point.length=l,r.hemi.length=f,r.directionalShadow.length=p,r.directionalShadowMap.length=p,r.pointShadow.length=m,r.pointShadowMap.length=m,r.spotShadow.length=h,r.spotShadowMap.length=h,r.directionalShadowMatrix.length=p,r.pointShadowMatrix.length=m,r.spotLightMatrix.length=h+g-_,r.spotLightMap.length=g,r.numSpotLightShadowsWithMaps=_,r.numLightProbes=v,y.directionalLength=c,y.pointLength=l,y.spotLength=u,y.rectAreaLength=d,y.hemiLength=f,y.numDirectionalShadows=p,y.numPointShadows=m,y.numSpotShadows=h,y.numSpotMaps=g,y.numLightProbes=v,r.version=e7e++)}function c(e,t){let n=0,s=0,c=0,l=0,u=0,d=t.matrixWorldInverse;for(let t=0,f=e.length;t<f;t++){let f=e[t];if(f.isDirectionalLight){let e=r.directional[n];e.direction.setFromMatrixPosition(f.matrixWorld),i.setFromMatrixPosition(f.target.matrixWorld),e.direction.sub(i),e.direction.transformDirection(d),n++}else if(f.isSpotLight){let e=r.spot[c];e.position.setFromMatrixPosition(f.matrixWorld),e.position.applyMatrix4(d),e.direction.setFromMatrixPosition(f.matrixWorld),i.setFromMatrixPosition(f.target.matrixWorld),e.direction.sub(i),e.direction.transformDirection(d),c++}else if(f.isRectAreaLight){let e=r.rectArea[l];e.position.setFromMatrixPosition(f.matrixWorld),e.position.applyMatrix4(d),o.identity(),a.copy(f.matrixWorld),a.premultiply(d),o.extractRotation(a),e.halfWidth.set(f.width*.5,0,0),e.halfHeight.set(0,f.height*.5,0),e.halfWidth.applyMatrix4(o),e.halfHeight.applyMatrix4(o),l++}else if(f.isPointLight){let e=r.point[s];e.position.setFromMatrixPosition(f.matrixWorld),e.position.applyMatrix4(d),s++}else if(f.isHemisphereLight){let e=r.hemi[u];e.direction.setFromMatrixPosition(f.matrixWorld),e.direction.transformDirection(d),u++}}}return{setup:s,setupView:c,state:r}}function r7e(e){let t=new n7e(e),n=[],r=[],i=[];function a(e){d.camera=e,n.length=0,r.length=0,i.length=0}function o(e){n.push(e)}function s(e){r.push(e)}function c(e){i.push(e)}function l(){t.setup(n)}function u(e){t.setupView(n,e)}let d={lightsArray:n,shadowsArray:r,lightProbeGridArray:i,camera:null,lights:t,transmissionRenderTarget:{},textureUnits:0};return{init:a,state:d,setupLights:l,setupLightsView:u,pushLight:o,pushShadow:s,pushLightProbeGrid:c}}function i7e(e){let t=new WeakMap;function n(n,r=0){let i=t.get(n),a;return i===void 0?(a=new r7e(e),t.set(n,[a])):r>=i.length?(a=new r7e(e),i.push(a)):a=i[r],a}function r(){t=new WeakMap}return{get:n,dispose:r}}var a7e=`void main() { 4519 gl_Position = vec4( position, 1.0 ); 4520}`,o7e=`uniform sampler2D shadow_pass; 4521uniform vec2 resolution; 4522uniform float radius; 4523void main() {
4524 const float samples = float( VSM_SAMPLES ); 4525 float mean = 0.0; 4526 float squared_mean = 0.0; 4527 float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); 4528 float uvStart = samples <= 1.0 ? 0.0 : - 1.0; 4529 for ( float i = 0.0; i < samples; i ++ ) { 4530 float uvOffset = uvStart + i * uvStride; 4531 #ifdef HORIZONTAL_PASS 4532 vec2 distribution = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg; 4533 mean += distribution.x; 4534 squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; 4535 #else 4536 float depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r; 4537 mean += depth; 4538 squared_mean += depth * depth; 4539 #endif 4540 } 4541 mean = mean / samples; 4542 squared_mean = squared_mean / samples; 4543 float std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) ); 4544 gl_FragColor = vec4( mean, std_dev, 0.0, 1.0 ); 4545}`,s7e=[new X(1,0,0),new X(-1,0,0),new X(0,1,0),new X(0,-1,0),new X(0,0,1),new X(0,0,-1)],c7e=[new X(0,-1,0),new X(0,-1,0),new X(0,0,1),new X(0,0,-1),new X(0,-1,0),new X(0,-1,0)],l7e=new W2,E6=new X,D6=new X;function u7e(e,t,n){let r=new P3e,i=new k2,a=new k2,o=new H2,s=new Z3e,c=new Q3e,l={},u=n.maxTextureSize,d={0:1,1:0,2:2},f=new H3({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new k2},radius:{value:4}},vertexShader:a7e,fragmentShader:o7e}),p=f.clone();p.defines.HORIZONTAL_PASS=1;let m=new $4;m.setAttribute(`position`,new H4(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let h=new k3(m,f),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1;let _=this.type;this.render=function(t,n,s){if(g.enabled===!1||g.autoUpdate===!1&&g.needsUpdate===!1||t.length===0)return;this.type===2&&(h2(`WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead.`),this.type=1);let c=e.getRenderTarget(),l=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),f=e.state;f.setBlending(0),f.buffers.depth.getReversed()===!0?f.buffers.color.setClear(0,0,0,0):f.buffers.color.setClear(1,1,1,1),f.buffers.depth.setTest(!0),f.setScissorTest(!1);let p=_!==this.type;p&&n.traverse(function(e){e.material&&(Array.isArray(e.material)?e.material.forEach(e=>e.needsUpdate=!0):e.material.needsUpdate=!0)});for(let c=0,l=t.length;c<l;c++){let l=t[c],d=l.shadow;if(d===void 0){h2(`WebGLShadowMap:`,l,`has no shadow.`);continue}if(d.autoUpdate===!1&&d.needsUpdate===!1)continue;i.copy(d.mapSize);let m=d.getFrameExtents();i.multiply(m),a.copy(d.mapSize),(i.x>u||i.y>u)&&(i.x>u&&(a.x=Math.floor(u/m.x),i.x=a.x*m.x,d.mapSize.x=a.x),i.y>u&&(a.y=Math.floor(u/m.y),i.y=a.y*m.y,d.mapSize.y=a.y));let h=e.state.buffers.depth.getReversed();if(d.camera._reversedDepth=h,d.map===null||p===!0){if(d.map!==null&&(d.map.depthTexture!==null&&(d.map.depthTexture.dispose(),d.map.depthTexture=null),d.map.dispose()),this.type===3){if(l.isPointLight){h2(`WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.`);continue}d.map=new U2(i.x,i.y,{format:q0,type:z0,minFilter:N0,magFilter:N0,generateMipmaps:!1}),d.map.texture.name=l.name+`.shadowMap`,d.map.depthTexture=new R3(i.x,i.y,R0),d.map.depthTexture.name=l.name+`.shadowMapDepth`,d.map.depthTexture.format=W0,d.map.depthTexture.compareFunction=null,d.map.depthTexture.minFilter=M0,d.map.depthTexture.magFilter=M0}else l.isPointLight?(d.map=new $6e(i.x),d.map.depthTexture=new V3e(i.x,L0)):(d.map=new U2(i.x,i.y),d.map.depthTexture=new R3(i.x,i.y,L0)),d.map.depthTexture.name=l.name+`.shadowMap`,d.map.depthTexture.format=W0,this.type===1?(d.map.depthTexture.compareFunction=h?518:515,d.map.depthTexture.minFilter=N0,d.map.depthTexture.magFilter=N0):(d.map.depthTexture.compareFunction=null,d.map.depthTexture.minFilter=M0,d.map.depthTexture.magFilter=M0);d.camera.updateProjectionMatrix()}let g=d.map.isWebGLCubeRenderTarget?6:1;for(let t=0;t<g;t++){if(d.map.isWebGLCubeRenderTarget)e.setRenderTarget(d.map,t),e.clear();else{t===0&&(e.setRenderTarget(d.map),e.clear());let n=d.getViewport(t);o.set(a.x*n.x,a.y*n.y,a.x*n.z,a.y*n.w),f.viewport(o)}if(l.isPointLight){let e=d.camera,n=d.matrix,r=l.distance||e.far;r!==e.far&&(e.far=r,e.updateProjectionMatrix()),E6.setFromMatrixPosition(l.matrixWorld),e.position.copy(E6),D6.copy(e.position),D6.add(s7e[t]),e.up.copy(c7e[t]),e.lookAt(D6),e.updateMatrixWorld(),n.makeTranslation(-E6.x,-E6.y,-E6.z),l7e.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),d._frustum.setFromProjectionMatrix(l7e,e.coordinateSystem,e.reversedDepth)}else d.updateMatrices(l);r=d.getFrustum(),b(n,s,d.camera,l,this.type)}d.isPointLightShadow!==!0&&this.type===3&&v(d,s),d.needsUpdate=!1}
vendor: 9,077 bytes, line 4545
4545_=this.type,g.needsUpdate=!1,e.setRenderTarget(c,l,d)};function v(n,r){let a=t.update(h);f.defines.VSM_SAMPLES!==n.blurSamples&&(f.defines.VSM_SAMPLES=n.blurSamples,p.defines.VSM_SAMPLES=n.blurSamples,f.needsUpdate=!0,p.needsUpdate=!0),n.mapPass===null&&(n.mapPass=new U2(i.x,i.y,{format:q0,type:z0})),f.uniforms.shadow_pass.value=n.map.depthTexture,f.uniforms.resolution.value=n.mapSize,f.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,a,f,h,null),p.uniforms.shadow_pass.value=n.mapPass.texture,p.uniforms.resolution.value=n.mapSize,p.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,a,p,h,null)}function y(t,n,r,i){let a=null,o=r.isPointLight===!0?t.customDistanceMaterial:t.customDepthMaterial;if(o!==void 0)a=o;else if(a=r.isPointLight===!0?c:s,e.localClippingEnabled&&n.clipShadows===!0&&Array.isArray(n.clippingPlanes)&&n.clippingPlanes.length!==0||n.displacementMap&&n.displacementScale!==0||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0||n.alphaToCoverage===!0){let e=a.uuid,t=n.uuid,r=l[e];r===void 0&&(r={},l[e]=r);let i=r[t];i===void 0&&(i=a.clone(),r[t]=i,n.addEventListener(`dispose`,x)),a=i}if(a.visible=n.visible,a.wireframe=n.wireframe,i===3?a.side=n.shadowSide===null?n.side:n.shadowSide:a.side=n.shadowSide===null?d[n.side]:n.shadowSide,a.alphaMap=n.alphaMap,a.alphaTest=n.alphaToCoverage===!0?.5:n.alphaTest,a.map=n.map,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.clipIntersection=n.clipIntersection,a.displacementMap=n.displacementMap,a.displacementScale=n.displacementScale,a.displacementBias=n.displacementBias,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,r.isPointLight===!0&&a.isMeshDistanceMaterial===!0){let t=e.properties.get(a);t.light=r}return a}function b(n,i,a,o,s){if(n.visible===!1)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&s===3)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);let r=t.update(n),c=n.material;if(Array.isArray(c)){let t=r.groups;for(let l=0,u=t.length;l<u;l++){let u=t[l],d=c[u.materialIndex];if(d&&d.visible){let t=y(n,d,o,s);n.onBeforeShadow(e,n,i,a,r,t,u),e.renderBufferDirect(a,null,r,t,n,u),n.onAfterShadow(e,n,i,a,r,t,u)}}}else if(c.visible){let t=y(n,c,o,s);n.onBeforeShadow(e,n,i,a,r,t,null),e.renderBufferDirect(a,null,r,t,n,null),n.onAfterShadow(e,n,i,a,r,t,null)}}let c=n.children;for(let e=0,t=c.length;e<t;e++)b(c[e],i,a,o,s)}function x(e){e.target.removeEventListener(`dispose`,x);for(let t in l){let n=l[t],r=e.target.uuid;r in n&&(n[r].dispose(),delete n[r])}}}function d7e(e,t){function n(){let t=!1,n=new H2,r=null,i=new H2(0,0,0,0);return{setMask:function(n){r!==n&&!t&&(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,a,o,s){s===!0&&(t*=o,r*=o,a*=o),n.set(t,r,a,o),i.equals(n)===!1&&(e.clearColor(t,r,a,o),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}}function r(){let n=!1,r=!1,i=null,a=null,o=null;return{setReversed:function(e){if(r!==e){let n=t.get(`EXT_clip_control`);e?n.clipControlEXT(n.LOWER_LEFT_EXT,n.ZERO_TO_ONE_EXT):n.clipControlEXT(n.LOWER_LEFT_EXT,n.NEGATIVE_ONE_TO_ONE_EXT),r=e;let i=o;o=null,this.setClear(i)}},getReversed:function(){return r},setTest:function(t){t?se(e.DEPTH_TEST):ce(e.DEPTH_TEST)},setMask:function(t){i!==t&&!n&&(e.depthMask(t),i=t)},setFunc:function(t){if(r&&(t=x4e[t]),a!==t){switch(t){case 0:e.depthFunc(e.NEVER);break;case 1:e.depthFunc(e.ALWAYS);break;case 2:e.depthFunc(e.LESS);break;case 3:e.depthFunc(e.LEQUAL);break;case 4:e.depthFunc(e.EQUAL);break;case 5:e.depthFunc(e.GEQUAL);break;case 6:e.depthFunc(e.GREATER);break;case 7:e.depthFunc(e.NOTEQUAL);break;default:e.depthFunc(e.LEQUAL)}a=t}},setLocked:function(e){n=e},setClear:function(t){o!==t&&(o=t,r&&(t=1-t),e.clearDepth(t))},reset:function(){n=!1,i=null,a=null,o=null,r=!1}}}function i(){let t=!1,n=null,r=null,i=null,a=null,o=null,s=null,c=null,l=null;return{setTest:function(n){t||(n?se(e.STENCIL_TEST):ce(e.STENCIL_TEST))},setMask:function(r){n!==r&&!t&&(e.stencilMask(r),n=r)},setFunc:function(t,n,o){(r!==t||i!==n||a!==o)&&(e.stencilFunc(t,n,o),r=t,i=n,a=o)},setOp:function(t,n,r){(o!==t||s!==n||c!==r)&&(e.stencilOp(t,n,r),o=t,s=n,c=r)},setLocked:function(e){t=e},setClear:function(t){l!==t&&(e.clearStencil(t),l=t)},reset:function(){t=!1,n=null,r=null,i=null,a=null,o=null,s=null,c=null,l=null}}}let a=new n,o=new r,s=new i,c=new WeakMap,l=new WeakMap,u={},d={},f={},p=new WeakMap,m=[],h=null,g=!1,_=null,v=null,y=null,b=null,x=null,S=null,C=null,w=new u4(0,0,0),T=0,E=!1,D=null,O=null,k=null,A=null,j=null,M=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),N=!1,P=0,F=e.getParameter(e.VERSION);F.indexOf(`WebGL`)===-1?F.indexOf(`OpenGL ES`)!==-1&&(P=parseFloat(/^OpenGL ES (\d)/.exec(F)[1]),N=P>=2):(P=parseFloat(/^WebGL (\d)/.exec(F)[1]),N=P>=1);let ee=null,te={},ne=e.getParameter(e.SCISSOR_BOX),I=e.getParameter(e.VIEWPORT),re=new H2().fromArray(ne),ie=new H2().fromArray(I);function ae(t,n,r,i){let a=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let o=0;o<r;o++)t===e.TEXTURE_3D||t===e.TEXTURE_2D_ARRAY?e.texImage3D(n,0,e.RGBA,1,1,i,0,e.RGBA,e.UNSIGNED_BYTE,a):e.texImage2D(n+o,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,a);return o}let oe={};oe[e.TEXTURE_2D]=ae(e.TEXTURE_2D,e.TEXTURE_2D,1),oe[e.TEXTURE_CUBE_MAP]=ae(e.TEXTURE_CUBE_MAP,e.TEXTURE_CUBE_MAP_POSITIVE_X,6),oe[e.TEXTURE_2D_ARRAY]=ae(e.TEXTURE_2D_ARRAY,e.TEXTURE_2D_ARRAY,1,1),oe[e.TEXTURE_3D]=ae(e.TEXTURE_3D,e.TEXTURE_3D,1,1),a.setClear(0,0,0,1),o.setClear(1),s.setClear(0),se(e.DEPTH_TEST),o.setFunc(3),ge(!1),_e(1),se(e.CULL_FACE),me(0);function se(t){u[t]!==!0&&(e.enable(t),u[t]=!0)}function ce(t){u[t]!==!1&&(e.disable(t),u[t]=!1)}function le(t,n){return f[t]===n?!1:(e.bindFramebuffer(t,n),f[t]=n,t===e.DRAW_FRAMEBUFFER&&(f[e.FRAMEBUFFER]=n),t===e.FRAMEBUFFER&&(f[e.DRAW_FRAMEBUFFER]=n),!0)}function ue(t,n){let r=m,i=!1;if(t){r=p.get(n),r===void 0&&(r=[],p.set(n,r));let a=t.textures;if(r.length!==a.length||r[0]!==e.COLOR_ATTACHMENT0){for(let t=0,n=a.length;t<n;t++)r[t]=e.COLOR_ATTACHMENT0+t;r.length=a.length,i=!0}}else r[0]!==e.BACK&&(r[0]=e.BACK,i=!0);i&&e.drawBuffers(r)}function de(t){return h===t?!1:(e.useProgram(t),h=t,!0)}let fe={100:e.FUNC_ADD,101:e.FUNC_SUBTRACT,102:e.FUNC_REVERSE_SUBTRACT};fe[103]=e.MIN,fe[104]=e.MAX;let pe={200:e.ZERO,201:e.ONE,202:e.SRC_COLOR,204:e.SRC_ALPHA,210:e.SRC_ALPHA_SATURATE,208:e.DST_COLOR,206:e.DST_ALPHA,203:e.ONE_MINUS_SRC_COLOR,205:e.ONE_MINUS_SRC_ALPHA,209:e.ONE_MINUS_DST_COLOR,207:e.ONE_MINUS_DST_ALPHA,211:e.CONSTANT_COLOR,212:e.ONE_MINUS_CONSTANT_COLOR,213:e.CONSTANT_ALPHA,214:e.ONE_MINUS_CONSTANT_ALPHA};function me(t,n,r,i,a,o,s,c,l,u){if(t===0){g===!0&&(ce(e.BLEND),g=!1);return}if(g===!1&&(se(e.BLEND),g=!0),t!==5){if(t!==_||u!==E){if((v!==100||x!==100)&&(e.blendEquation(e.FUNC_ADD),v=100,x=100),u)switch(t){case 1:e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFunc(e.ONE,e.ONE);break;case 3:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case 4:e.blendFuncSeparate(e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ZERO,e.ONE);break;default:g2(`WebGLState: Invalid blending: `,t);break}else switch(t){case 1:e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFuncSeparate(e.SRC_ALPHA,e.ONE,e.ONE,e.ONE);break;case 3:g2(`WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true`);break;case 4:g2(`WebGLState: MultiplyBlending requires material.premultipliedAlpha = true`);break;default:g2(`WebGLState: Invalid blending: `,t);break}y=null,b=null,S=null,C=null,w.set(0,0,0),T=0,_=t,E=u}return}a||=n,o||=r,s||=i,(n!==v||a!==x)&&(e.blendEquationSeparate(fe[n],fe[a]),v=n,x=a),(r!==y||i!==b||o!==S||s!==C)&&(e.blendFuncSeparate(pe[r],pe[i],pe[o],pe[s]),y=r,b=i,S=o,C=s),(c.equals(w)===!1||l!==T)&&(e.blendColor(c.r,c.g,c.b,l),w.copy(c),T=l),_=t,E=!1}function he(t,n){t.side===2?ce(e.CULL_FACE):se(e.CULL_FACE);let r=t.side===1;n&&(r=!r),ge(r),t.blending===1&&t.transparent===!1?me(0):me(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.blendColor,t.blendAlpha,t.premultipliedAlpha),o.setFunc(t.depthFunc),o.setTest(t.depthTest),o.setMask(t.depthWrite),a.setMask(t.colorWrite);let i=t.stencilWrite;s.setTest(i),i&&(s.setMask(t.stencilWriteMask),s.setFunc(t.stencilFunc,t.stencilRef,t.stencilFuncMask),s.setOp(t.stencilFail,t.stencilZFail,t.stencilZPass)),ve(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits),t.alphaToCoverage===!0?se(e.SAMPLE_ALPHA_TO_COVERAGE):ce(e.SAMPLE_ALPHA_TO_COVERAGE)}function ge(t){D!==t&&(t?e.frontFace(e.CW):e.frontFace(e.CCW),D=t)}function _e(t){t===0?ce(e.CULL_FACE):(se(e.CULL_FACE),t!==O&&(t===1?e.cullFace(e.BACK):t===2?e.cullFace(e.FRONT):e.cullFace(e.FRONT_AND_BACK))),O=t}function L(t){t!==k&&(N&&e.lineWidth(t),k=t)}
vendor: 5,430 bytes, line 4545
4545function ve(t,n,r){t?(se(e.POLYGON_OFFSET_FILL),(A!==n||j!==r)&&(A=n,j=r,o.getReversed()&&(n=-n),e.polygonOffset(n,r))):ce(e.POLYGON_OFFSET_FILL)}function ye(t){t?se(e.SCISSOR_TEST):ce(e.SCISSOR_TEST)}function be(t){t===void 0&&(t=e.TEXTURE0+M-1),ee!==t&&(e.activeTexture(t),ee=t)}function R(t,n,r){r===void 0&&(r=ee===null?e.TEXTURE0+M-1:ee);let i=te[r];i===void 0&&(i={type:void 0,texture:void 0},te[r]=i),(i.type!==t||i.texture!==n)&&(ee!==r&&(e.activeTexture(r),ee=r),e.bindTexture(t,n||oe[t]),i.type=t,i.texture=n)}function xe(){let t=te[ee];t!==void 0&&t.type!==void 0&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)}function Se(){try{e.compressedTexImage2D(...arguments)}catch(e){g2(`WebGLState:`,e)}}function Ce(){try{e.compressedTexImage3D(...arguments)}catch(e){g2(`WebGLState:`,e)}}function we(){try{e.texSubImage2D(...arguments)}catch(e){g2(`WebGLState:`,e)}}function Te(){try{e.texSubImage3D(...arguments)}catch(e){g2(`WebGLState:`,e)}}function Ee(){try{e.compressedTexSubImage2D(...arguments)}catch(e){g2(`WebGLState:`,e)}}function De(){try{e.compressedTexSubImage3D(...arguments)}catch(e){g2(`WebGLState:`,e)}}function Oe(){try{e.texStorage2D(...arguments)}catch(e){g2(`WebGLState:`,e)}}function ke(){try{e.texStorage3D(...arguments)}catch(e){g2(`WebGLState:`,e)}}function Ae(){try{e.texImage2D(...arguments)}catch(e){g2(`WebGLState:`,e)}}function je(){try{e.texImage3D(...arguments)}catch(e){g2(`WebGLState:`,e)}}function Me(t){return d[t]===void 0?e.getParameter(t):d[t]}function Ne(t,n){d[t]!==n&&(e.pixelStorei(t,n),d[t]=n)}function Pe(t){re.equals(t)===!1&&(e.scissor(t.x,t.y,t.z,t.w),re.copy(t))}function Fe(t){ie.equals(t)===!1&&(e.viewport(t.x,t.y,t.z,t.w),ie.copy(t))}function Ie(t,n){let r=l.get(n);r===void 0&&(r=new WeakMap,l.set(n,r));let i=r.get(t);i===void 0&&(i=e.getUniformBlockIndex(n,t.name),r.set(t,i))}function Le(t,n){let r=l.get(n).get(t);c.get(n)!==r&&(e.uniformBlockBinding(n,r,t.__bindingPointIndex),c.set(n,r))}function Re(){e.disable(e.BLEND),e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.POLYGON_OFFSET_FILL),e.disable(e.SCISSOR_TEST),e.disable(e.STENCIL_TEST),e.disable(e.SAMPLE_ALPHA_TO_COVERAGE),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ZERO),e.blendFuncSeparate(e.ONE,e.ZERO,e.ONE,e.ZERO),e.blendColor(0,0,0,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(e.LESS),o.setReversed(!1),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(e.ALWAYS,0,4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),e.clearStencil(0),e.cullFace(e.BACK),e.frontFace(e.CCW),e.polygonOffset(0,0),e.activeTexture(e.TEXTURE0),e.bindFramebuffer(e.FRAMEBUFFER,null),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),e.bindFramebuffer(e.READ_FRAMEBUFFER,null),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),e.pixelStorei(e.PACK_ALIGNMENT,4),e.pixelStorei(e.UNPACK_ALIGNMENT,4),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!1),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.BROWSER_DEFAULT_WEBGL),e.pixelStorei(e.PACK_ROW_LENGTH,0),e.pixelStorei(e.PACK_SKIP_PIXELS,0),e.pixelStorei(e.PACK_SKIP_ROWS,0),e.pixelStorei(e.UNPACK_ROW_LENGTH,0),e.pixelStorei(e.UNPACK_IMAGE_HEIGHT,0),e.pixelStorei(e.UNPACK_SKIP_PIXELS,0),e.pixelStorei(e.UNPACK_SKIP_ROWS,0),e.pixelStorei(e.UNPACK_SKIP_IMAGES,0),u={},d={},ee=null,te={},f={},p=new WeakMap,m=[],h=null,g=!1,_=null,v=null,y=null,b=null,x=null,S=null,C=null,w=new u4(0,0,0),T=0,E=!1,D=null,O=null,k=null,A=null,j=null,re.set(0,0,e.canvas.width,e.canvas.height),ie.set(0,0,e.canvas.width,e.canvas.height),a.reset(),o.reset(),s.reset()}return{buffers:{color:a,depth:o,stencil:s},enable:se,disable:ce,bindFramebuffer:le,drawBuffers:ue,useProgram:de,setBlending:me,setMaterial:he,setFlipSided:ge,setCullFace:_e,setLineWidth:L,setPolygonOffset:ve,setScissorTest:ye,activeTexture:be,bindTexture:R,unbindTexture:xe,compressedTexImage2D:Se,compressedTexImage3D:Ce,texImage2D:Ae,texImage3D:je,pixelStorei:Ne,getParameter:Me,updateUBOMapping:Ie,uniformBlockBinding:Le,texStorage2D:Oe,texStorage3D:ke,texSubImage2D:we,texSubImage3D:Te,compressedTexSubImage2D:Ee,compressedTexSubImage3D:De,scissor:Pe,viewport:Fe,reset:Re}}function f7e(e,t,n,r,i,a,o){let s=t.has(`WEBGL_multisampled_render_to_texture`)?t.get(`WEBGL_multisampled_render_to_texture`):null,c=typeof navigator>`u`?!1:/OculusBrowser/g.test(navigator.userAgent),l=new k2,u=new WeakMap,d=new Set,f,p=new WeakMap,m=!1;try{m=typeof OffscreenCanvas<`u`&&new OffscreenCanvas(1,1).getContext(`2d`)!==null}catch{}function h(e,t){return m?new OffscreenCanvas(e,t):u2(`canvas`)}function g(e,t,n){let r=1,i=Se(e);if((i.width>n||i.height>n)&&(r=n/Math.max(i.width,i.height)),r<1)if(typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement||typeof ImageBitmap<`u`&&e instanceof ImageBitmap||typeof VideoFrame<`u`&&e instanceof VideoFrame){let n=Math.floor(r*i.width),a=Math.floor(r*i.height);f===void 0&&(f=h(n,a));let o=t?h(n,a):f;return o.width=n,o.height=a,o.getContext(`2d`).drawImage(e,0,0,n,a),h2(`WebGLRenderer: Texture has been resized from (`+i.width+`x`+i.height+`) to (`+n+`x`+a+`).`),o}else return`data`in e&&h2(`WebGLRenderer: Image in DataTexture is too big (`+i.width+`x`+i.height+`).`),e;return e}function _(e){return e.generateMipmaps}function v(t){e.generateMipmap(t)}
4545function y(t){return t.isWebGLCubeRenderTarget?e.TEXTURE_CUBE_MAP:t.isWebGL3DRenderTarget?e.TEXTURE_3D:t.isWebGLArrayRenderTarget||t.isCompressedArrayTexture?e.TEXTURE_2D_ARRAY:e.TEXTURE_2D}function b(n,r,i,a,o,s=!1){if(n!==null){if(e[n]!==void 0)return e[n];h2(`WebGLRenderer: Attempt to use non-existing WebGL internal format '`+n+`'`)}let c;a&&(c=t.get(`EXT_texture_norm16`),c||h2(`WebGLRenderer: Unable to use normalized textures without EXT_texture_norm16 extension`));let l=r;if(r===e.RED&&(i===e.FLOAT&&(l=e.R32F),i===e.HALF_FLOAT&&(l=e.R16F),i===e.UNSIGNED_BYTE&&(l=e.R8),i===e.UNSIGNED_SHORT&&c&&(l=c.R16_EXT),i===e.SHORT&&c&&(l=c.R16_SNORM_EXT)),r===e.RED_INTEGER&&(i===e.UNSIGNED_BYTE&&(l=e.R8UI),i===e.UNSIGNED_SHORT&&(l=e.R16UI),i===e.UNSIGNED_INT&&(l=e.R32UI),i===e.BYTE&&(l=e.R8I),i===e.SHORT&&(l=e.R16I),i===e.INT&&(l=e.R32I)),r===e.RG&&(i===e.FLOAT&&(l=e.RG32F),i===e.HALF_FLOAT&&(l=e.RG16F),i===e.UNSIGNED_BYTE&&(l=e.RG8),i===e.UNSIGNED_SHORT&&c&&(l=c.RG16_EXT),i===e.SHORT&&c&&(l=c.RG16_SNORM_EXT)),r===e.RG_INTEGER&&(i===e.UNSIGNED_BYTE&&(l=e.RG8UI),i===e.UNSIGNED_SHORT&&(l=e.RG16UI),i===e.UNSIGNED_INT&&(l=e.RG32UI),i===e.BYTE&&(l=e.RG8I),i===e.SHORT&&(l=e.RG16I),i===e.INT&&(l=e.RG32I)),r===e.RGB_INTEGER&&(i===e.UNSIGNED_BYTE&&(l=e.RGB8UI),i===e.UNSIGNED_SHORT&&(l=e.RGB16UI),i===e.UNSIGNED_INT&&(l=e.RGB32UI),i===e.BYTE&&(l=e.RGB8I),i===e.SHORT&&(l=e.RGB16I),i===e.INT&&(l=e.RGB32I)),r===e.RGBA_INTEGER&&(i===e.UNSIGNED_BYTE&&(l=e.RGBA8UI),i===e.UNSIGNED_SHORT&&(l=e.RGBA16UI),i===e.UNSIGNED_INT&&(l=e.RGBA32UI),i===e.BYTE&&(l=e.RGBA8I),i===e.SHORT&&(l=e.RGBA16I),i===e.INT&&(l=e.RGBA32I)),r===e.RGB&&(i===e.UNSIGNED_SHORT&&c&&(l=c.RGB16_EXT),i===e.SHORT&&c&&(l=c.RGB16_SNORM_EXT),i===e.UNSIGNED_INT_5_9_9_9_REV&&(l=e.RGB9_E5),i===e.UNSIGNED_INT_10F_11F_11F_REV&&(l=e.R11F_G11F_B10F)),r===e.RGBA){let t=s?a2:P2.getTransfer(o);i===e.FLOAT&&(l=e.RGBA32F),i===e.HALF_FLOAT&&(l=e.RGBA16F),i===e.UNSIGNED_BYTE&&(l=t===`srgb`?e.SRGB8_ALPHA8:e.RGBA8),i===e.UNSIGNED_SHORT&&c&&(l=c.RGBA16_EXT),i===e.SHORT&&c&&(l=c.RGBA16_SNORM_EXT),i===e.UNSIGNED_SHORT_4_4_4_4&&(l=e.RGBA4),i===e.UNSIGNED_SHORT_5_5_5_1&&(l=e.RGB5_A1)}return(l===e.R16F||l===e.R32F||l===e.RG16F||l===e.RG32F||l===e.RGBA16F||l===e.RGBA32F)&&t.get(`EXT_color_buffer_float`),l}function x(t,n){let r;return t?n===null||n===1014||n===1020?r=e.DEPTH24_STENCIL8:n===1015?r=e.DEPTH32F_STENCIL8:n===1012&&(r=e.DEPTH24_STENCIL8,h2(`DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.`)):n===null||n===1014||n===1020?r=e.DEPTH_COMPONENT24:n===1015?r=e.DEPTH_COMPONENT32F:n===1012&&(r=e.DEPTH_COMPONENT16),r}function S(e,t){return _(e)===!0||e.isFramebufferTexture&&e.minFilter!==1003&&e.minFilter!==1006?Math.log2(Math.max(t.width,t.height))+1:e.mipmaps!==void 0&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function C(e){let t=e.target;t.removeEventListener(`dispose`,C),T(t),t.isVideoTexture&&u.delete(t),t.isHTMLTexture&&d.delete(t)}function w(e){let t=e.target;t.removeEventListener(`dispose`,w),D(t)}function T(e){let t=r.get(e);if(t.__webglInit===void 0)return;let n=e.source,i=p.get(n);if(i){let r=i[t.__cacheKey];r.usedTimes--,r.usedTimes===0&&E(e),Object.keys(i).length===0&&p.delete(n)}r.remove(e)}function E(t){let n=r.get(t);e.deleteTexture(n.__webglTexture);let i=t.source,a=p.get(i);delete a[n.__cacheKey],o.memory.textures--}function D(t){let n=r.get(t);if(t.depthTexture&&(t.depthTexture.dispose(),r.remove(t.depthTexture)),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(n.__webglFramebuffer[t]))for(let r=0;r<n.__webglFramebuffer[t].length;r++)e.deleteFramebuffer(n.__webglFramebuffer[t][r]);else e.deleteFramebuffer(n.__webglFramebuffer[t]);n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer[t])}else{if(Array.isArray(n.__webglFramebuffer))for(let t=0;t<n.__webglFramebuffer.length;t++)e.deleteFramebuffer(n.__webglFramebuffer[t]);else e.deleteFramebuffer(n.__webglFramebuffer);if(n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer),n.__webglMultisampledFramebuffer&&e.deleteFramebuffer(n.__webglMultisampledFramebuffer),n.__webglColorRen
vendor: 4,103 bytes, line 4545
4545derbuffer)for(let t=0;t<n.__webglColorRenderbuffer.length;t++)n.__webglColorRenderbuffer[t]&&e.deleteRenderbuffer(n.__webglColorRenderbuffer[t]);n.__webglDepthRenderbuffer&&e.deleteRenderbuffer(n.__webglDepthRenderbuffer)}let i=t.textures;for(let t=0,n=i.length;t<n;t++){let n=r.get(i[t]);n.__webglTexture&&(e.deleteTexture(n.__webglTexture),o.memory.textures--),r.remove(i[t])}r.remove(t)}let O=0;function k(){O=0}function A(){return O}function j(e){O=e}function M(){let e=O;return e>=i.maxTextures&&h2(`WebGLTextures: Trying to use `+e+` texture units while this GPU supports only `+i.maxTextures),O+=1,e}function N(e){let t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}function P(t,i){let a=r.get(t);if(t.isVideoTexture&&R(t),t.isRenderTargetTexture===!1&&t.isExternalTexture!==!0&&t.version>0&&a.__version!==t.version){let e=t.image;if(e===null)h2(`WebGLRenderer: Texture marked for update but no image data found.`);else if(e.complete===!1)h2(`WebGLRenderer: Texture marked for update but image is incomplete`);else{ce(a,t,i);return}}else t.isExternalTexture&&(a.__webglTexture=t.sourceTexture?t.sourceTexture:null);n.bindTexture(e.TEXTURE_2D,a.__webglTexture,e.TEXTURE0+i)}function F(t,i){let a=r.get(t);if(t.isRenderTargetTexture===!1&&t.version>0&&a.__version!==t.version){ce(a,t,i);return}else t.isExternalTexture&&(a.__webglTexture=t.sourceTexture?t.sourceTexture:null);n.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+i)}function ee(t,i){let a=r.get(t);if(t.isRenderTargetTexture===!1&&t.version>0&&a.__version!==t.version){ce(a,t,i);return}n.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+i)}function te(t,i){let a=r.get(t);if(t.isCubeDepthTexture!==!0&&t.version>0&&a.__version!==t.version){le(a,t,i);return}n.bindTexture(e.TEXTURE_CUBE_MAP,a.__webglTexture,e.TEXTURE0+i)}let ne={[k0]:e.REPEAT,[A0]:e.CLAMP_TO_EDGE,[j0]:e.MIRRORED_REPEAT},I={[M0]:e.NEAREST,[C2e]:e.NEAREST_MIPMAP_NEAREST,[w2e]:e.NEAREST_MIPMAP_LINEAR,[N0]:e.LINEAR,[T2e]:e.LINEAR_MIPMAP_NEAREST,[P0]:e.LINEAR_MIPMAP_LINEAR},re={512:e.NEVER,519:e.ALWAYS,513:e.LESS,515:e.LEQUAL,514:e.EQUAL,518:e.GEQUAL,516:e.GREATER,517:e.NOTEQUAL};function ie(n,a){if(a.type===1015&&t.has(`OES_texture_float_linear`)===!1&&(a.magFilter===1006||a.magFilter===1007||a.magFilter===1005||a.magFilter===1008||a.minFilter===1006||a.minFilter===1007||a.minFilter===1005||a.minFilter===1008)&&h2(`WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device.`),e.texParameteri(n,e.TEXTURE_WRAP_S,ne[a.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,ne[a.wrapT]),(n===e.TEXTURE_3D||n===e.TEXTURE_2D_ARRAY)&&e.texParameteri(n,e.TEXTURE_WRAP_R,ne[a.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,I[a.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,I[a.minFilter]),a.compareFunction&&(e.texParameteri(n,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(n,e.TEXTURE_COMPARE_FUNC,re[a.compareFunction])),t.has(`EXT_texture_filter_anisotropic`)===!0){if(a.magFilter===1003||a.minFilter!==1005&&a.minFilter!==1008||a.type===1015&&t.has(`OES_texture_float_linear`)===!1)return;if(a.anisotropy>1||r.get(a).__currentAnisotropy){let o=t.get(`EXT_texture_filter_anisotropic`);e.texParameterf(n,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy}}}function ae(t,n){let r=!1;t.__webglInit===void 0&&(t.__webglInit=!0,n.addEventListener(`dispose`,C));let i=n.source,a=p.get(i);a===void 0&&(a={},p.set(i,a));let s=N(n);if(s!==t.__cacheKey){a[s]===void 0&&(a[s]={texture:e.createTexture(),usedTimes:0},o.memory.textures++,r=!0),a[s].usedTimes++;let i=a[t.__cacheKey];i!==void 0&&(a[t.__cacheKey].usedTimes--,i.usedTimes===0&&E(n)),t.__cacheKey=s,t.__webglTexture=a[s].texture}return r}function oe(e,t,n){return Math.floor(Math.floor(e/n)/t)}
4545function se(t,r,i,a){let o=t.updateRanges;if(o.length===0)n.texSubImage2D(e.TEXTURE_2D,0,0,0,r.width,r.height,i,a,r.data);else{o.sort((e,t)=>e.start-t.start);let s=0;for(let e=1;e<o.length;e++){let t=o[s],n=o[e],i=t.start+t.count,a=oe(n.start,r.width,4),c=oe(t.start,r.width,4);n.start<=i+1&&a===c&&oe(n.start+n.count-1,r.width,4)===a?t.count=Math.max(t.count,n.start+n.count-t.start):(++s,o[s]=n)}o.length=s+1;let c=n.getParameter(e.UNPACK_ROW_LENGTH),l=n.getParameter(e.UNPACK_SKIP_PIXELS),u=n.getParameter(e.UNPACK_SKIP_ROWS);n.pixelStorei(e.UNPACK_ROW_LENGTH,r.width);for(let t=0,s=o.length;t<s;t++){let s=o[t],c=Math.floor(s.start/4),l=Math.ceil(s.count/4),u=c%r.width,d=Math.floor(c/r.width),f=l;n.pixelStorei(e.UNPACK_SKIP_PIXELS,u),n.pixelStorei(e.UNPACK_SKIP_ROWS,d),n.texSubImage2D(e.TEXTURE_2D,0,u,d,f,1,i,a,r.data)}t.clearUpdateRanges(),n.pixelStorei(e.UNPACK_ROW_LENGTH,c),n.pixelStorei(e.UNPACK_SKIP_PIXELS,l),n.pixelStorei(e.UNPACK_SKIP_ROWS,u)}}function ce(t,o,s){let c=e.TEXTURE_2D;(o.isDataArrayTexture||o.isCompressedArrayTexture)&&(c=e.TEXTURE_2D_ARRAY),o.isData3DTexture&&(c=e.TEXTURE_3D);let l=ae(t,o),u=o.source;n.bindTexture(c,t.__webglTexture,e.TEXTURE0+s);let f=r.get(u);if(u.version!==f.__version||l===!0){if(n.activeTexture(e.TEXTURE0+s),!(typeof ImageBitmap<`u`&&o.image instanceof ImageBitmap)){let t=P2.getPrimaries(P2.workingColorSpace),r=o.colorSpace
vendor: 4,896 bytes, line 4545
4545===``?null:P2.getPrimaries(o.colorSpace),i=o.colorSpace===``||t===r?e.NONE:e.BROWSER_DEFAULT_WEBGL;n.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,o.flipY),n.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,o.premultiplyAlpha),n.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,i)}n.pixelStorei(e.UNPACK_ALIGNMENT,o.unpackAlignment);let t=g(o.image,!1,i.maxTextureSize);t=xe(o,t);let r=a.convert(o.format,o.colorSpace),p=a.convert(o.type),m=b(o.internalFormat,r,p,o.normalized,o.colorSpace,o.isVideoTexture);ie(c,o);let h,y=o.mipmaps,C=o.isVideoTexture!==!0,w=f.__version===void 0||l===!0,T=u.dataReady,E=S(o,t);if(o.isDepthTexture)m=x(o.format===G0,o.type),w&&(C?n.texStorage2D(e.TEXTURE_2D,1,m,t.width,t.height):n.texImage2D(e.TEXTURE_2D,0,m,t.width,t.height,0,r,p,null));else if(o.isDataTexture)if(y.length>0){C&&w&&n.texStorage2D(e.TEXTURE_2D,E,m,y[0].width,y[0].height);for(let t=0,i=y.length;t<i;t++)h=y[t],C?T&&n.texSubImage2D(e.TEXTURE_2D,t,0,0,h.width,h.height,r,p,h.data):n.texImage2D(e.TEXTURE_2D,t,m,h.width,h.height,0,r,p,h.data);o.generateMipmaps=!1}else C?(w&&n.texStorage2D(e.TEXTURE_2D,E,m,t.width,t.height),T&&se(o,t,r,p)):n.texImage2D(e.TEXTURE_2D,0,m,t.width,t.height,0,r,p,t.data);else if(o.isCompressedTexture)if(o.isCompressedArrayTexture){C&&w&&n.texStorage3D(e.TEXTURE_2D_ARRAY,E,m,y[0].width,y[0].height,t.depth);for(let i=0,a=y.length;i<a;i++)if(h=y[i],o.format!==1023)if(r!==null)if(C){if(T)if(o.layerUpdates.size>0){let t=j6e(h.width,h.height,o.format,o.type);for(let a of o.layerUpdates){let o=h.data.subarray(a*t/h.data.BYTES_PER_ELEMENT,(a+1)*t/h.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,i,0,0,a,h.width,h.height,1,r,o)}o.clearLayerUpdates()}else n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,i,0,0,0,h.width,h.height,t.depth,r,h.data)}else n.compressedTexImage3D(e.TEXTURE_2D_ARRAY,i,m,h.width,h.height,t.depth,0,h.data,0,0);else h2(`WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()`);else C?T&&n.texSubImage3D(e.TEXTURE_2D_ARRAY,i,0,0,0,h.width,h.height,t.depth,r,p,h.data):n.texImage3D(e.TEXTURE_2D_ARRAY,i,m,h.width,h.height,t.depth,0,r,p,h.data)}else{C&&w&&n.texStorage2D(e.TEXTURE_2D,E,m,y[0].width,y[0].height);for(let t=0,i=y.length;t<i;t++)h=y[t],o.format===1023?C?T&&n.texSubImage2D(e.TEXTURE_2D,t,0,0,h.width,h.height,r,p,h.data):n.texImage2D(e.TEXTURE_2D,t,m,h.width,h.height,0,r,p,h.data):r===null?h2(`WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()`):C?T&&n.compressedTexSubImage2D(e.TEXTURE_2D,t,0,0,h.width,h.height,r,h.data):n.compressedTexImage2D(e.TEXTURE_2D,t,m,h.width,h.height,0,h.data)}else if(o.isDataArrayTexture)if(C){if(w&&n.texStorage3D(e.TEXTURE_2D_ARRAY,E,m,t.width,t.height,t.depth),T)if(o.layerUpdates.size>0){let i=j6e(t.width,t.height,o.format,o.type);for(let a of o.layerUpdates){let o=t.data.subarray(a*i/t.data.BYTES_PER_ELEMENT,(a+1)*i/t.data.BYTES_PER_ELEMENT);n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,a,t.width,t.height,1,r,p,o)}o.clearLayerUpdates()}else n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,t.width,t.height,t.depth,r,p,t.data)}else n.texImage3D(e.TEXTURE_2D_ARRAY,0,m,t.width,t.height,t.depth,0,r,p,t.data);else if(o.isData3DTexture)C?(w&&n.texStorage3D(e.TEXTURE_3D,E,m,t.width,t.height,t.depth),T&&n.texSubImage3D(e.TEXTURE_3D,0,0,0,0,t.width,t.height,t.depth,r,p,t.data)):n.texImage3D(e.TEXTURE_3D,0,m,t.width,t.height,t.depth,0,r,p,t.data);else if(o.isFramebufferTexture){if(w)if(C)n.texStorage2D(e.TEXTURE_2D,E,m,t.width,t.height);else{let i=t.width,a=t.height;for(let t=0;t<E;t++)n.texImage2D(e.TEXTURE_2D,t,m,i,a,0,r,p,null),i>>=1,a>>=1}}else if(o.isHTMLTexture){if(`texElementImage2D`in e){let n=e.canvas;if(n.hasAttribute(`layoutsubtree`)||n.setAttribute(`layoutsubtree`,`true`),t.parentNode!==n){n.appendChild(t),d.add(o),n.onpaint=e=>{let t=e.changedElements;for(let e of d)t.includes(e.image)&&(e.needsUpdate=!0)},n.requestPaint();return}let r=e.RGBA,i=e.RGBA,a=e.UNSIGNED_BYTE;e.texElementImage2D(e.TEXTURE_2D,0,r,i,a,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}}else if(y.length>0){if(C&&w){let t=Se(y[0]);n.texStorage2D(e.TEXTURE_2D,E,m,t.width,t.height)}for(let t=0,i=y.length;t<i;t++)h=y[t],C?T&&n.texSubImage2D(e.TEXTURE_2D,t,0,0,r,p,h):n.texImage2D(e.TEXTURE_2D,t,m,r,p,h);o.generateMipmaps=!1}else if(C){if(w){let r=Se(t);n.texStorage2D(e.TEXTURE_2D,E,m,r.width,r.height)}T&&n.texSubImage2D(e.TEXTURE_2D,0,0,0,r,p,t)}else n.texImage2D(e.TEXTURE_2D,0,m,r,p,t);_(o)&&v(c),f.__version=u.version,o.onUpdate&&o.onUpdate(o)}t.__version=o.version}function le(t,o,s){if(o.image.length!==6)return;let c=ae(t,o),l=o.source;n.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+s);let u=r.get(l);if(l.version!==u.__version||c===!0){n.activeTexture(e.TEXTURE0+s);
vendor: 5,541 bytes, line 4545
4545let t=P2.getPrimaries(P2.workingColorSpace),r=o.colorSpace===``?null:P2.getPrimaries(o.colorSpace),d=o.colorSpace===``||t===r?e.NONE:e.BROWSER_DEFAULT_WEBGL;n.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,o.flipY),n.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,o.premultiplyAlpha),n.pixelStorei(e.UNPACK_ALIGNMENT,o.unpackAlignment),n.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,d);let f=o.isCompressedTexture||o.image[0].isCompressedTexture,p=o.image[0]&&o.image[0].isDataTexture,m=[];for(let e=0;e<6;e++)!f&&!p?m[e]=g(o.image[e],!0,i.maxCubemapSize):m[e]=p?o.image[e].image:o.image[e],m[e]=xe(o,m[e]);let h=m[0],y=a.convert(o.format,o.colorSpace),x=a.convert(o.type),C=b(o.internalFormat,y,x,o.normalized,o.colorSpace),w=o.isVideoTexture!==!0,T=u.__version===void 0||c===!0,E=l.dataReady,D=S(o,h);ie(e.TEXTURE_CUBE_MAP,o);let O;if(f){w&&T&&n.texStorage2D(e.TEXTURE_CUBE_MAP,D,C,h.width,h.height);for(let t=0;t<6;t++){O=m[t].mipmaps;for(let r=0;r<O.length;r++){let i=O[r];o.format===1023?w?E&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,0,0,i.width,i.height,y,x,i.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,C,i.width,i.height,0,y,x,i.data):y===null?h2(`WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()`):w?E&&n.compressedTexSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,0,0,i.width,i.height,y,i.data):n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,C,i.width,i.height,0,i.data)}}}else{if(O=o.mipmaps,w&&T){O.length>0&&D++;let t=Se(m[0]);n.texStorage2D(e.TEXTURE_CUBE_MAP,D,C,t.width,t.height)}for(let t=0;t<6;t++)if(p){w?E&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,m[t].width,m[t].height,y,x,m[t].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,C,m[t].width,m[t].height,0,y,x,m[t].data);for(let r=0;r<O.length;r++){let i=O[r].image[t].image;w?E&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,0,0,i.width,i.height,y,x,i.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,C,i.width,i.height,0,y,x,i.data)}}else{w?E&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,y,x,m[t]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,C,y,x,m[t]);for(let r=0;r<O.length;r++){let i=O[r];w?E&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,0,0,y,x,i.image[t]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,C,y,x,i.image[t])}}}_(o)&&v(e.TEXTURE_CUBE_MAP),u.__version=l.version,o.onUpdate&&o.onUpdate(o)}t.__version=o.version}function ue(t,i,o,c,l,u){let d=a.convert(o.format,o.colorSpace),f=a.convert(o.type),p=b(o.internalFormat,d,f,o.normalized,o.colorSpace),m=r.get(i),h=r.get(o);if(h.__renderTarget=i,!m.__hasExternalTextures){let t=Math.max(1,i.width>>u),r=Math.max(1,i.height>>u);l===e.TEXTURE_3D||l===e.TEXTURE_2D_ARRAY?n.texImage3D(l,u,p,t,r,i.depth,0,d,f,null):n.texImage2D(l,u,p,t,r,0,d,f,null)}n.bindFramebuffer(e.FRAMEBUFFER,t),be(i)?s.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,c,l,h.__webglTexture,0,ye(i)):(l===e.TEXTURE_2D||l>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&l<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,c,l,h.__webglTexture,u),n.bindFramebuffer(e.FRAMEBUFFER,null)}function de(t,n,r){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer){let i=n.depthTexture,a=i&&i.isDepthTexture?i.type:null,o=x(n.stencilBuffer,a),c=n.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;be(n)?s.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,ye(n),o,n.width,n.height):r?e.renderbufferStorageMultisample(e.RENDERBUFFER,ye(n),o,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,o,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,c,e.RENDERBUFFER,t)}else{let t=n.textures;for(let i=0;i<t.length;i++){let o=t[i],c=a.convert(o.format,o.colorSpace),l=a.convert(o.type),u=b(o.internalFormat,c,l,o.normalized,o.colorSpace);be(n)?s.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,ye(n),u,n.width,n.height):r?e.renderbufferStorageMultisample(e.RENDERBUFFER,ye(n),u,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,u,n.width,n.height)}}e.bindRenderbuffer(e.RENDERBUFFER,null)}function fe(t,i,o){let c=i.isWebGLCubeRenderTarget===!0;if(n.bindFramebuffer(e.FRAMEBUFFER,t),!(i.depthTexture&&i.depthTexture.isDepthTexture))throw Error(`renderTarget.depthTexture must be an instance of THREE.DepthTexture`);let l=r.get(i.depthTexture);if(l.__renderTarget=i,(!l.__webglTexture||i.depthTexture.image.width!==i.width||i.depthTexture.image.height!==i.height)&&(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),c){if(l.__webglInit===void 0&&(l.__webglInit=!0,i.depthTexture.addEventListener(`dispose`,C)),l.__webglTexture===void 0){l.__webglTexture=e.createTexture(),n.bindTexture(e.TEXTURE_CUBE_MAP,l.__webglTexture),ie(e.TEXTURE_CUBE_MAP,i.depthTexture);let t=a.convert(i.depthTexture.format),r=a.convert(i.depthTexture.type),o;i.depthTexture.format===1026?o=e.DEPTH_COMPONENT24:i.depthTexture.format===1027&&(o=e.DEPTH24_STENCIL8);for(let n=0;n<6;n++)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,o,i.width,i.height,0,t,r,null)}}else P(i.depthTexture,0);let u=l.__webglTexture,d=ye(i),f=c?e.TEXTURE_CUBE_MAP_POSITIVE_X+o:e.TEXTURE_2D,p=i.depthTexture.format===1027?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;if(i.depthTexture.format===1026)be(i)?s.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,p,f,u,0,d):e.framebufferTexture2D(e.FRAMEBUFFER,p,f,u,0);else if(i.depthTexture.format===1027)be(i)?s.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,p,f,u,0,d):e.framebufferTexture2D(e.FRAMEBUFFER,p,f,u,0);else throw Error(`Unknown depthTexture format`)}
vendor: 5,629 bytes, line 4545
4545function pe(t){let i=r.get(t),a=t.isWebGLCubeRenderTarget===!0;if(i.__boundDepthTexture!==t.depthTexture){let e=t.depthTexture;if(i.__depthDisposeCallback&&i.__depthDisposeCallback(),e){let t=()=>{delete i.__boundDepthTexture,delete i.__depthDisposeCallback,e.removeEventListener(`dispose`,t)};e.addEventListener(`dispose`,t),i.__depthDisposeCallback=t}i.__boundDepthTexture=e}if(t.depthTexture&&!i.__autoAllocateDepthBuffer)if(a)for(let e=0;e<6;e++)fe(i.__webglFramebuffer[e],t,e);else{let e=t.texture.mipmaps;e&&e.length>0?fe(i.__webglFramebuffer[0],t,0):fe(i.__webglFramebuffer,t,0)}else if(a){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)if(n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]===void 0)i.__webglDepthbuffer[r]=e.createRenderbuffer(),de(i.__webglDepthbuffer[r],t,!1);else{let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,a=i.__webglDepthbuffer[r];e.bindRenderbuffer(e.RENDERBUFFER,a),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,a)}}else{let r=t.texture.mipmaps;if(r&&r.length>0?n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[0]):n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer),i.__webglDepthbuffer===void 0)i.__webglDepthbuffer=e.createRenderbuffer(),de(i.__webglDepthbuffer,t,!1);else{let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,r=i.__webglDepthbuffer;e.bindRenderbuffer(e.RENDERBUFFER,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,r)}}n.bindFramebuffer(e.FRAMEBUFFER,null)}function me(t,n,i){let a=r.get(t);n!==void 0&&ue(a.__webglFramebuffer,t,t.texture,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,0),i!==void 0&&pe(t)}function he(t){let i=t.texture,s=r.get(t),c=r.get(i);t.addEventListener(`dispose`,w);let l=t.textures,u=t.isWebGLCubeRenderTarget===!0,d=l.length>1;if(d||(c.__webglTexture===void 0&&(c.__webglTexture=e.createTexture()),c.__version=i.version,o.memory.textures++),u){s.__webglFramebuffer=[];for(let t=0;t<6;t++)if(i.mipmaps&&i.mipmaps.length>0){s.__webglFramebuffer[t]=[];for(let n=0;n<i.mipmaps.length;n++)s.__webglFramebuffer[t][n]=e.createFramebuffer()}else s.__webglFramebuffer[t]=e.createFramebuffer()}else{if(i.mipmaps&&i.mipmaps.length>0){s.__webglFramebuffer=[];for(let t=0;t<i.mipmaps.length;t++)s.__webglFramebuffer[t]=e.createFramebuffer()}else s.__webglFramebuffer=e.createFramebuffer();if(d)for(let t=0,n=l.length;t<n;t++){let n=r.get(l[t]);n.__webglTexture===void 0&&(n.__webglTexture=e.createTexture(),o.memory.textures++)}if(t.samples>0&&be(t)===!1){s.__webglMultisampledFramebuffer=e.createFramebuffer(),s.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,s.__webglMultisampledFramebuffer);for(let n=0;n<l.length;n++){let r=l[n];s.__webglColorRenderbuffer[n]=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,s.__webglColorRenderbuffer[n]);let i=a.convert(r.format,r.colorSpace),o=a.convert(r.type),c=b(r.internalFormat,i,o,r.normalized,r.colorSpace,t.isXRRenderTarget===!0),u=ye(t);e.renderbufferStorageMultisample(e.RENDERBUFFER,u,c,t.width,t.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+n,e.RENDERBUFFER,s.__webglColorRenderbuffer[n])}e.bindRenderbuffer(e.RENDERBUFFER,null),t.depthBuffer&&(s.__webglDepthRenderbuffer=e.createRenderbuffer(),de(s.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(e.FRAMEBUFFER,null)}}if(u){n.bindTexture(e.TEXTURE_CUBE_MAP,c.__webglTexture),ie(e.TEXTURE_CUBE_MAP,i);for(let n=0;n<6;n++)if(i.mipmaps&&i.mipmaps.length>0)for(let r=0;r<i.mipmaps.length;r++)ue(s.__webglFramebuffer[n][r],t,i,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+n,r);else ue(s.__webglFramebuffer[n],t,i,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0);_(i)&&v(e.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(d){for(let i=0,a=l.length;i<a;i++){let a=l[i],o=r.get(a),c=e.TEXTURE_2D;(t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(c=t.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY),n.bindTexture(c,o.__webglTexture),ie(c,a),ue(s.__webglFramebuffer,t,a,e.COLOR_ATTACHMENT0+i,c,0),_(a)&&v(c)}n.unbindTexture()}else{let r=e.TEXTURE_2D;if((t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(r=t.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY),n.bindTexture(r,c.__webglTexture),ie(r,i),i.mipmaps&&i.mipmaps.length>0)for(let n=0;n<i.mipmaps.length;n++)ue(s.__webglFramebuffer[n],t,i,e.COLOR_ATTACHMENT0,r,n);else ue(s.__webglFramebuffer,t,i,e.COLOR_ATTACHMENT0,r,0);_(i)&&v(r),n.unbindTexture()}t.depthBuffer&&pe(t)}function ge(e){let t=e.textures;for(let i=0,a=t.length;i<a;i++){let a=t[i];if(_(a)){let t=y(e),i=r.get(a).__webglTexture;n.bindTexture(t,i),v(t),n.unbindTexture()}}}let _e=[],L=[];function ve(t){if(t.samples>0){if(be(t)===!1){let i=t.textures,a=t.width,o=t.height,s=e.COLOR_BUFFER_BIT,l=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,u=r.get(t),d=i.length>1;if(d)for(let t=0;t<i.length;t++)n.bindFramebuffer(e.FRAMEBUFFER,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,null),n.bindFramebuffer(e.FRAMEBUFFER,u.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,null,0);n.bindFramebuffer(e.READ_FRAMEBUFFER,u.__webglMultisampledFramebuffer);let f=t.texture.mipmaps;f&&f.length>0?n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglFramebuffer[0]):n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglFramebuffer);for(let n=0;n<i.length;n++){if(t.resolveDepthBuffer&&(t.depthBuffer&&(s|=e.DEPTH_BUFFER_BIT),t.stencilBuffer&&t.resolveStencilBuffer&&(s|=e.STENCIL_BUFFER_BIT)),d){e.framebufferRenderbuffer(e.READ_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,u.__webglColorRen
vendor: 16,351 bytes, lines 4545-4569
4545derbuffer[n]);let t=r.get(i[n]).__webglTexture;e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0)}e.blitFramebuffer(0,0,a,o,0,0,a,o,s,e.NEAREST),c===!0&&(_e.length=0,L.length=0,_e.push(e.COLOR_ATTACHMENT0+n),t.depthBuffer&&t.resolveDepthBuffer===!1&&(_e.push(l),L.push(l),e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,L)),e.invalidateFramebuffer(e.READ_FRAMEBUFFER,_e))}if(n.bindFramebuffer(e.READ_FRAMEBUFFER,null),n.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),d)for(let t=0;t<i.length;t++){n.bindFramebuffer(e.FRAMEBUFFER,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,u.__webglColorRenderbuffer[t]);let a=r.get(i[t]).__webglTexture;n.bindFramebuffer(e.FRAMEBUFFER,u.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,a,0)}n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglMultisampledFramebuffer)}else if(t.depthBuffer&&t.resolveDepthBuffer===!1&&c){let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,[n])}}}function ye(e){return Math.min(i.maxSamples,e.samples)}function be(e){let n=r.get(e);return e.samples>0&&t.has(`WEBGL_multisampled_render_to_texture`)===!0&&n.__useRenderToTexture!==!1}function R(e){let t=o.render.frame;u.get(e)!==t&&(u.set(e,t),e.update())}function xe(e,t){let n=e.colorSpace,r=e.format,i=e.type;return e.isCompressedTexture===!0||e.isVideoTexture===!0||n!==`srgb-linear`&&n!==``&&(P2.getTransfer(n)===`srgb`?(r!==1023||i!==1009)&&h2(`WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.`):g2(`WebGLTextures: Unsupported texture color space:`,n)),t}function Se(e){return typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement?(l.width=e.naturalWidth||e.width,l.height=e.naturalHeight||e.height):typeof VideoFrame<`u`&&e instanceof VideoFrame?(l.width=e.displayWidth,l.height=e.displayHeight):(l.width=e.width,l.height=e.height),l}this.allocateTextureUnit=M,this.resetTextureUnits=k,this.getTextureUnits=A,this.setTextureUnits=j,this.setTexture2D=P,this.setTexture2DArray=F,this.setTexture3D=ee,this.setTextureCube=te,this.rebindTextures=me,this.setupRenderTarget=he,this.updateRenderTargetMipmap=ge,this.updateMultisampleRenderTarget=ve,this.setupDepthRenderbuffer=pe,this.setupFrameBufferTexture=ue,this.useMultisampledRTT=be,this.isReversedDepthBuffer=function(){return n.buffers.depth.getReversed()}}function p7e(e,t){function n(n,r=``){let i,a=P2.getTransfer(r);if(n===1009)return e.UNSIGNED_BYTE;if(n===1017)return e.UNSIGNED_SHORT_4_4_4_4;if(n===1018)return e.UNSIGNED_SHORT_5_5_5_1;if(n===35902)return e.UNSIGNED_INT_5_9_9_9_REV;if(n===35899)return e.UNSIGNED_INT_10F_11F_11F_REV;if(n===1010)return e.BYTE;if(n===1011)return e.SHORT;if(n===1012)return e.UNSIGNED_SHORT;if(n===1013)return e.INT;if(n===1014)return e.UNSIGNED_INT;if(n===1015)return e.FLOAT;if(n===1016)return e.HALF_FLOAT;if(n===1021)return e.ALPHA;if(n===1022)return e.RGB;if(n===1023)return e.RGBA;if(n===1026)return e.DEPTH_COMPONENT;if(n===1027)return e.DEPTH_STENCIL;if(n===1028)return e.RED;if(n===1029)return e.RED_INTEGER;if(n===1030)return e.RG;if(n===1031)return e.RG_INTEGER;if(n===1033)return e.RGBA_INTEGER;if(n===33776||n===33777||n===33778||n===33779)if(a===`srgb`)if(i=t.get(`WEBGL_compressed_texture_s3tc_srgb`),i!==null){if(n===33776)return i.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===33777)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===33778)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===33779)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(i=t.get(`WEBGL_compressed_texture_s3tc`),i!==null){if(n===33776)return i.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===33777)return i.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===33778)return i.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===33779)return i.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===35840||n===35841||n===35842||n===35843)if(i=t.get(`WEBGL_compressed_texture_pvrtc`),i!==null){if(n===35840)return i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===35841)return i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===35842)return i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===35843)return i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===36196||n===37492||n===37496||n===37488||n===37489||n===37490||n===37491)if(i=t.get(`WEBGL_compressed_texture_etc`),i!==null){if(n===36196||n===37492)return a===`srgb`?i.COMPRESSED_SRGB8_ETC2:i.COMPRESSED_RGB8_ETC2;if(n===37496)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:i.COMPRESSED_RGBA8_ETC2_EAC;if(n===37488)return i.COMPRESSED_R11_EAC;if(n===37489)return i.COMPRESSED_SIGNED_R11_EAC;if(n===37490)return i.COMPRESSED_RG11_EAC;if(n===37491)return i.COMPRESSED_SIGNED_RG11_EAC}else return null;if(n===37808||n===37809||n===37810||n===37811||n===37812||n===37813||n===37814||n===37815||n===37816||n===37817||n===37818||n===37819||n===37820||n===37821)if(i=t.get(`WEBGL_compressed_texture_astc`),i!==null){if(n===37808)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:i.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===37809)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:i.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===37810)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:i.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===37811)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:i.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===37812)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:i.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===37813)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:i.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===37814)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:i.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===37815)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:i.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===37816)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:i.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===37817)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:i.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===37818)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:i.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===37819)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:i.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===37820)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:i.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===37821)return a===`srgb`?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:i.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===36492||n===36494||n===36495)if(i=t.get(`EXT_texture_compression_bptc`),i!==null){if(n===36492)return a===`srgb`?i.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:i.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===36494)return i.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===36495)return i.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===36283||n===36284||n===36285||n===36286)if(i=t.get(`EXT_texture_compression_rgtc`),i!==null){if(n===36283)return i.COMPRESSED_RED_RGTC1_EXT;if(n===36284)return i.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===36285)return i.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===36286)return i.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===1020?e.UNSIGNED_INT_24_8:e[n]===void 0?null:e[n]}return{convert:n}}var m7e=` 4546void main() { 4547 4548 gl_Position = vec4( position, 1.0 ); 4549 4550}`,h7e=` 4551uniform sampler2DArray depthColor; 4552uniform float depthWidth; 4553uniform float depthHeight; 4554 4555void main() { 4556 4557 vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); 4558 4559 if ( coord.x >= 1.0 ) { 4560 4561 gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; 4562 4563 } else { 4564 4565 gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; 4566 4567 } 4568 4569}`,g7e=class{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(this.texture===null){let n=new H3e(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=n}}getMesh(e){if(this.texture!==null&&this.mesh===null){let t=e.cameras[0].viewport,n=new H3({vertexShader:m7e,fragmentShader:h7e,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new k3(new U3e(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}},_7e=class extends v2{constructor(e,t){super();let n=this,r=null,i=1,a=null,o=`local-floor`,s=1,c=null,l=null,u=null,d=null,f=null,p=null,m=typeof XRWebGLBinding<`u`,h=new g7e,g={},_=t.getContextAttributes(),v=null,y=null,b=[],x=[],S=new k2,C=null,w=new Q3;w.viewport=new H2;let T=new Q3;T.viewport=new H2;let E=[w,T],D=new h6e,O=null,k=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=b[e];return t===void 0&&(t=new o4,b[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=b[e];return t===void 0&&(t=new o4,b[e]=t),t.getGripSpace()},this.getHand=function(e){let t=b[e];return t===void 0&&(t=new o4,b[e]=t),t.getHandSpace()};function A(e){let t=x.indexOf(e.inputSource);if(t===-1)return;let n=b[t];n!==void 0&&(n.update(e.inputSource,e.frame,c||a),n.dispatchEvent({type:e.type,data:e.inputSource}))}function j(){r.removeEventListener(`select`,A),r.removeEventListener(`selectstart`,A),r.removeEventListener(`selectend`,A),r.removeEventListener(`squeeze`,A),r.removeEventListener(`squeezestart`,A),r.removeEventListener(`squeezeend`,A),r.removeEventListener(`end`,j),r.removeEventListener(`inputsourceschange`,M);for(let e=0;e<b.length;e++){let t=x[e];t!==null&&(x[e]=null,b[e].disconnect(t))}O=null,k=null,h.reset();for(let e in g)delete g[e];e.setRenderTarget(v),f=null,d=null,u=null,r=null,y=null,re.stop(),n.isPresenting=!1,e.setPixelRatio(C),e.setSize(S.width,S.height,!1),n.dispatchEvent({type:`sessionend`})}this.setFramebufferScaleFactor=function(e){i=e,n.isPresenting===!0&&h2(`WebXRManager: Cannot change framebuffer scale while presenting.`)},this.setReferenceSpaceType=function(e){o=e,n.isPresenting===!0&&h2(`WebXRManager: Cannot change reference space type while presenting.`)},this.getReferenceSpace=function(){return c||a},this.setReferenceSpace=function(e){c=e},this.getBaseLayer=function(){return d===null?f:d},this.getBinding=function(){return u===null&&m&&(u=new XRWebGLBinding(r,t)),u},this.getFrame=function(){return p},this.getSession=function(){return r},this.setSession=async function(l){if(r=l,r!==null){if(v=e.getRenderTarget(),r.addEventListener(`select`,A),r.addEventListener(`selectstart`,A),r.addEventListener(`selectend`,A),r.addEventListener(`squeeze`,A),r.addEventListener(`squeezestart`,A),r.addEventListener(`squeezeend`,A),r.addEventListener(`end`,j),r.addEventListener(`inputsourceschange`,M),_.xrCompatible!==!0&&await t.makeXRCompatible(),C=e.getPixelRatio(),e.getSize(S),m&&`createProjectionLayer`in XRWebGLBinding.prototype){let n=null,a=null,o=null;_.depth&&(o=_.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,n=_.stencil?G0:W0,a=_.stencil?H0:L0);let s={colorFormat:t.RGBA8,depthFormat:o,scaleFactor:i};u=this.getBinding(),d=u.createProjectionLayer(s),r.updateRenderState({layers:[d]}),e.setPixelRatio(1),e.setSize(d.textureWidth,d.textureHeight,!1),y=new U2(d.textureWidth,d.textureHeight,{format:U0,type:F0,depthTexture:new R3(d.textureWidth,d.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:_.stencil,colorSpace:e.outputColorSpace,samples:_.antialias?4:0,resolveDepthBuffer:d.ignoreDepthValues===!1,resolveStencilBuffer:d.ignoreDepthValues===!1})}else{let n={antialias:_.antialias,alpha:!0,depth:_.depth,stencil:_.stencil,framebufferScaleFactor:i};f=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:f}),e.setPixelRatio(1),e.setSize(f.framebufferWidth,f.framebufferHeight,!1),y=new U2(f.framebufferWidth,f.framebufferHeight,{format:U0,type:F0,colorSpace:e.outputColorSpace,stencilBuffer:_.stencil,resolveDepthBuffer:f.ignoreDepthValues===!1,resolveStencilBuffer:f.ignoreDepthValues===!1})}y.isXRRenderTarget=!0,this.setFoveation(s),c=null,a=await r.requestReferenceSpace(o),re.setContext(r),re.start(),n.isPresenting=!0,n.dispatchEvent({type:`sessionstart`})}},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode},this.getDepthTexture=function(){return h.getDepthTexture()};function M(e){for(let t=0;t<e.removed.length;t++){let n=e.removed[t],r=x.indexOf(n);r>=0&&(x[r]=null,b[r].disconnect(n))}for(let t=0;t<e.added.length;t++){let n=e.added[t],r=x.indexOf(n);if(r===-1){for(let e=0;e<b.length;e++)if(e>=x.length){x.push(n),r=e;break}else if(x[e]===null){x[e]=n,r=e;break}if(r===-1)break}let i=b[r];i&&i.connect(n)}}let N=new X,P=new X;function F(e,t,n){N.setFromMatrixPosition(t.matrixWorld),P.setFromMatrixPosition(n.matrixWorld);let r=N.distanceTo(P),i=t.projectionMatrix.elements,a=n.projectionMatrix.elements,o=i[14]/(i[10]-1),s=i[14]/(i[10]+1),c=(i[9]+1)/i[5],l=(i[9]-1)/i[5],u=(i[8]-1)/i[0],d=(a[8]+1)/a[0],f=o*u,p=o*d,m=r/(-u+d),h=m*-u;if(t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(h),e.translateZ(m),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert(),i[10]===-1)e.projectionMatrix.copy(t.projectionMatrix),e.projectionMatrixInverse.copy(t.projectionMatrixInverse);else{let t=o+m,n=s+m,i=f-h,a=p+(r-h),u=c*s/n*t,d=l*s/n*t;e.projectionMatrix.makePerspective(i,a,u,d,t,n),e.projectionMatrixInverse.copy(e.projectionMatrix).invert()}}function ee(e,t){t===null?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(r===null)return;let t=e.near,n=e.far;h.texture!==null&&(h.depthNear>0&&(t=h.depthNear),h.depthFar>0&&(n=h.depthFar)),D.near=T.near=w.near=t,D.far=T.far=w.far=n,(O!==D.near||k!==D.far)&&(r.updateRenderState({depthNear:D.near,depthFar:D.far}),O=D.near,k=D.far),D.layers.mask=e.layers.mask|6,w.layers.mask=D.layers.mask&-5,T.layers.mask=D.layers.mask&-3;let i=e.parent,a=D.cameras;ee(D,i);for(let e=0;e<a.length;e++)ee(a[e],i);a.length===2?F(D,w,T):D.projectionMatrix.copy(w.projectionMatrix),te(e,D,i)};function te(e,t,n){n===null?e.matrix.copy(t.matrixWorld):(e.matrix.copy(n.matrixWorld),e.matrix.invert(),e.matrix.multiply(t.matrixWorld)),e.matrix.decompose(e.position,e.quaternion,e.scale),e.updateMatrixWorld(!0),e.projectionMatrix.copy(t.projectionMatrix),e.projectionMatrixInverse.copy(t.projectionMatrixInverse),e.isPerspectiveCamera&&(e.fov=S2*2*Math.atan(1/e.projectionMatrix.elements[5]),e.zoom=1)}this.getCamera=function(){return D},this.getFoveation=function(){if(!(d===null&&f===null))return s},this.setFoveation=function(e){s=e,d!==null&&(d.fixedFoveation=e),f!==null&&f.fixedFoveation!==void 0&&(f.fixedFoveation=e)},this.hasDepthSensing=function(){return h.texture!==null},this.getDepthSensingMesh=function(){return h.getMesh(D)},this.getCameraTexture=function(e){return g[e]};let ne=null;function I(t,i){if(l=i.getViewerPose(c||a),p=i,l!==null){let t=l.views;f!==null&&(e.setRenderTargetFramebuffer(y,f.framebuffer),e.setRenderTarget(y));let i=!1;t.length!==D.cameras.length&&(D.cameras.length=0,i=!0);for(let n=0;n<t.length;n++){let r=t[n],a=null;if(f!==null)a=f.getViewport(r);else{let t=u.getViewSubImage(d,r);a=t.viewport,n===0&&(e.setRenderTargetTextures(y,t.colorTexture,t.depthStencilTexture),e.setRenderTarget(y))}let o=E[n];o===void 0&&(o=new Q3,o.layers.enable(n),o.viewport=new H2,E[n]=o),o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.quaternion,o.scale),o.projectionMatrix.fromArray(r.projectionMatrix),o.projectionMatrixInverse.copy(o.projectionMatrix).invert(),o.viewport.set(a.x,a.y,a.width,a.height),n===0&&(D.matrix.copy(o.matrix),D.matrix.decompose(D.position,D.quaternion,D.scale)),i===!0&&D.cameras.push(o)}let a=r.enabledFeatures;if(a&&a.includes(`depth-sensing`)&&r.depthUsage==`gpu-optimized`&&m){u=n.getBinding();let e=u.getDepthInformation(t[0]);e&&e.isValid&&e.texture&&h.init(e,r.renderState)}if(a&&a.includes(`camera-access`)&&m){e.state.unbindTexture(),u=n.getBinding();for(let e=0;e<t.length;e++){let n=t[e].camera;if(n){let e=g[n];e||(e=new H3e,g[n]=e);let t=u.getCameraImage(n);e.sourceTexture=t}}}}for(let e=0;e<b.length;e++){let t=x[e],n=b[e];t!==null&&n!==void 0&&n.update(t,i,c||a)}ne&&ne(t,i),i.detectedPlanes&&n.dispatchEvent({type:`planesdetected`,data:i}),p=null}let re=new N6e;re.setAnimationLoop(I),this.setAnimationLoop=function(e){ne=e},this.dispose=function(){}}}
vendor: 4,858 bytes, line 4569
4569,v7e=new W2,y7e=new M2;y7e.set(-1,0,0,0,1,0,0,0,1);function b7e(e,t){function n(e,t){e.matrixAutoUpdate===!0&&e.updateMatrix(),t.value.copy(e.matrix)}function r(t,n){n.color.getRGB(t.fogColor.value,K3e(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)}function i(e,t,n,r,i){t.isNodeMaterial?t.uniformsNeedUpdate=!1:t.isMeshBasicMaterial?a(e,t):t.isMeshLambertMaterial?(a(e,t),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)):t.isMeshToonMaterial?(a(e,t),d(e,t)):t.isMeshPhongMaterial?(a(e,t),u(e,t),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)):t.isMeshStandardMaterial?(a(e,t),f(e,t),t.isMeshPhysicalMaterial&&p(e,t,i)):t.isMeshMatcapMaterial?(a(e,t),m(e,t)):t.isMeshDepthMaterial?a(e,t):t.isMeshDistanceMaterial?(a(e,t),h(e,t)):t.isMeshNormalMaterial?a(e,t):t.isLineBasicMaterial?(o(e,t),t.isLineDashedMaterial&&s(e,t)):t.isPointsMaterial?c(e,t,n,r):t.isSpriteMaterial?l(e,t):t.isShadowMaterial?(e.color.value.copy(t.color),e.opacity.value=t.opacity):t.isShaderMaterial&&(t.uniformsNeedUpdate=!1)}function a(e,r){e.opacity.value=r.opacity,r.color&&e.diffuse.value.copy(r.color),r.emissive&&e.emissive.value.copy(r.emissive).multiplyScalar(r.emissiveIntensity),r.map&&(e.map.value=r.map,n(r.map,e.mapTransform)),r.alphaMap&&(e.alphaMap.value=r.alphaMap,n(r.alphaMap,e.alphaMapTransform)),r.bumpMap&&(e.bumpMap.value=r.bumpMap,n(r.bumpMap,e.bumpMapTransform),e.bumpScale.value=r.bumpScale,r.side===1&&(e.bumpScale.value*=-1)),r.normalMap&&(e.normalMap.value=r.normalMap,n(r.normalMap,e.normalMapTransform),e.normalScale.value.copy(r.normalScale),r.side===1&&e.normalScale.value.negate()),r.displacementMap&&(e.displacementMap.value=r.displacementMap,n(r.displacementMap,e.displacementMapTransform),e.displacementScale.value=r.displacementScale,e.displacementBias.value=r.displacementBias),r.emissiveMap&&(e.emissiveMap.value=r.emissiveMap,n(r.emissiveMap,e.emissiveMapTransform)),r.specularMap&&(e.specularMap.value=r.specularMap,n(r.specularMap,e.specularMapTransform)),r.alphaTest>0&&(e.alphaTest.value=r.alphaTest);let i=t.get(r),a=i.envMap,o=i.envMapRotation;a&&(e.envMap.value=a,e.envMapRotation.value.setFromMatrix4(v7e.makeRotationFromEuler(o)).transpose(),a.isCubeTexture&&a.isRenderTargetTexture===!1&&e.envMapRotation.value.premultiply(y7e),e.reflectivity.value=r.reflectivity,e.ior.value=r.ior,e.refractionRatio.value=r.refractionRatio),r.lightMap&&(e.lightMap.value=r.lightMap,e.lightMapIntensity.value=r.lightMapIntensity,n(r.lightMap,e.lightMapTransform)),r.aoMap&&(e.aoMap.value=r.aoMap,e.aoMapIntensity.value=r.aoMapIntensity,n(r.aoMap,e.aoMapTransform))}function o(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform))}function s(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}function c(e,t,r,i){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*r,e.scale.value=i*.5,t.map&&(e.map.value=t.map,n(t.map,e.uvTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}function l(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}function u(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}function d(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}function f(e,t){e.metalness.value=t.metalness,t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap,n(t.metalnessMap,e.metalnessMapTransform)),e.roughness.value=t.roughness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap,n(t.roughnessMap,e.roughnessMapTransform)),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}function p(e,t,r){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,n(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,n(t.sheenRoughnessMap,e.sheenRoughnessMapTransform))),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,n(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,n(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,n(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),t.side===1&&e.clearcoatNormalScale.value.negate())),t.dis
vendor: 4,216 bytes, line 4569
4569persion>0&&(e.dispersion.value=t.dispersion),t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,n(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,n(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform))),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,n(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,n(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),t.anisotropy>0&&(e.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(e.anisotropyMap.value=t.anisotropyMap,n(t.anisotropyMap,e.anisotropyMapTransform))),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,n(t.specularColorMap,e.specularColorMapTransform)),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,n(t.specularIntensityMap,e.specularIntensityMapTransform))}function m(e,t){t.matcap&&(e.matcap.value=t.matcap)}function h(e,n){let r=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function x7e(e,t,n,r){let i={},a={},o=[],s=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS);function c(e,t){let n=t.program;r.uniformBlockBinding(e,n)}function l(e,n){let o=i[e.id];o===void 0&&(m(e),o=u(e),i[e.id]=o,e.addEventListener(`dispose`,g));let s=n.program;r.updateUBOMapping(e,s);let c=t.render.frame;a[e.id]!==c&&(f(e),a[e.id]=c)}function u(t){let n=d();t.__bindingPointIndex=n;let r=e.createBuffer(),i=t.__size,a=t.usage;return e.bindBuffer(e.UNIFORM_BUFFER,r),e.bufferData(e.UNIFORM_BUFFER,i,a),e.bindBuffer(e.UNIFORM_BUFFER,null),e.bindBufferBase(e.UNIFORM_BUFFER,n,r),r}function d(){for(let e=0;e<s;e++)if(o.indexOf(e)===-1)return o.push(e),e;return g2(`WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached.`),0}function f(t){let n=i[t.id],r=t.uniforms,a=t.__cache;e.bindBuffer(e.UNIFORM_BUFFER,n);for(let t=0,n=r.length;t<n;t++){let n=Array.isArray(r[t])?r[t]:[r[t]];for(let r=0,i=n.length;r<i;r++){let i=n[r];if(p(i,t,r,a)===!0){let t=i.__offset,n=Array.isArray(i.value)?i.value:[i.value],r=0;for(let a=0;a<n.length;a++){let o=n[a],s=h(o);typeof o==`number`||typeof o==`boolean`?(i.__data[0]=o,e.bufferSubData(e.UNIFORM_BUFFER,t+r,i.__data)):o.isMatrix3?(i.__data[0]=o.elements[0],i.__data[1]=o.elements[1],i.__data[2]=o.elements[2],i.__data[3]=0,i.__data[4]=o.elements[3],i.__data[5]=o.elements[4],i.__data[6]=o.elements[5],i.__data[7]=0,i.__data[8]=o.elements[6],i.__data[9]=o.elements[7],i.__data[10]=o.elements[8],i.__data[11]=0):ArrayBuffer.isView(o)?i.__data.set(new o.constructor(o.buffer,o.byteOffset,i.__data.length)):(o.toArray(i.__data,r),r+=s.storage/Float32Array.BYTES_PER_ELEMENT)}e.bufferSubData(e.UNIFORM_BUFFER,t,i.__data)}}}e.bindBuffer(e.UNIFORM_BUFFER,null)}function p(e,t,n,r){let i=e.value,a=t+`_`+n;if(r[a]===void 0)return typeof i==`number`||typeof i==`boolean`?r[a]=i:ArrayBuffer.isView(i)?r[a]=i.slice():r[a]=i.clone(),!0;{let e=r[a];if(typeof i==`number`||typeof i==`boolean`){if(e!==i)return r[a]=i,!0}else if(ArrayBuffer.isView(i))return!0;else if(e.equals(i)===!1)return e.copy(i),!0}return!1}function m(e){let t=e.uniforms,n=0;for(let e=0,r=t.length;e<r;e++){let r=Array.isArray(t[e])?t[e]:[t[e]];for(let e=0,t=r.length;e<t;e++){let t=r[e],i=Array.isArray(t.value)?t.value:[t.value];for(let e=0,r=i.length;e<r;e++){let r=i[e],a=h(r),o=n%16,s=o%a.boundary,c=o+s;
4569n+=s,c!==0&&16-c<a.storage&&(n+=16-c),t.__data=new Float32Array(a.storage/Float32Array.BYTES_PER_ELEMENT),t.__offset=n,n+=a.storage}}}let r=n%16;return r>0&&(n+=16-r),e.__size=n,e.__cache={},this}function h(e){let t={boundary:0,storage:0};return typeof e==`number`||typeof e==`boolean`?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?h2(`WebGLRenderer: Texture samplers can not be part of an uniforms group.`):ArrayBuffer.isView(e)?(t.boundary=16,t.storage=e.byteLength):h2(`WebGLRenderer: Unsupported uniform value type.`,e),t}function g(t){let n=t.target;n.removeEventListener(`dispose`,g);let r=o.indexOf(n.__bindingPointIndex);o.splice(r,1),e.deleteBuffer(i[n.id]),delete i[n.id],delete a[n.id]}function _(){for(let t in i)e.deleteBuffer(i[t]);o=[],i={},a={}}return{bind:c,update:l,dispose:_}}var S7e=new Uint16Array([12469,15057,12620,14925,13266,14620,13807,14376,14323,13990,14545,13625,14713,13328,14840,12882,14931,12528,14996,12233,15039,11829,15066,11525,15080,11295,15085,10976,15082,10705,15073,10495,13880,14564,13898,14542,13977,14430,14158,14124,14393,13732,14556,13410,14702,12996,14814,12596,14891,12291,14937,11834,14957,11489,14958,11194,14943,10803,14921,10506,14893,10278,14858,9960,14484,14039,14487,14025,14499,13941,14524,13740,14574,13468,14654,13106,14743,12678,14818,12344,14867,11893,14889,11509,14893,11180,14881,10751,14852,10428,14812,10128,14765,9754,14712,9466,14764,13480,14764,13475,14766,13440,14766,13347,14769,13070,14786,12713,14816,12387,14844,11957,14860,11549,14868,11215,14855,10751,14825,10403,14782,10044,14729,9651,14666,9352,14599,9029,14967,12835,14966,12831,14963,12804,14954,12723,14936,12564,14917,12347,14900,11958,14886,11569,14878,11247,14859,10765,14828,10401,14784,10011,14727,9600,14660,9289,14586,8893,14508,8533,15111,12234,15110,12234,15104,12216,15092,12156,15067,12010,15028,11776,14981,11500,
vendor: 5,228 bytes, line 4569
456914942,11205,14902,10752,14861,10393,14812,9991,14752,9570,14682,9252,14603,8808,14519,8445,14431,8145,15209,11449,15208,11451,15202,11451,15190,11438,15163,11384,15117,11274,15055,10979,14994,10648,14932,10343,14871,9936,14803,9532,14729,9218,14645,8742,14556,8381,14461,8020,14365,7603,15273,10603,15272,10607,15267,10619,15256,10631,15231,10614,15182,10535,15118,10389,15042,10167,14963,9787,14883,9447,14800,9115,14710,8665,14615,8318,14514,7911,14411,7507,14279,7198,15314,9675,15313,9683,15309,9712,15298,9759,15277,9797,15229,9773,15166,9668,15084,9487,14995,9274,14898,8910,14800,8539,14697,8234,14590,7790,14479,7409,14367,7067,14178,6621,15337,8619,15337,8631,15333,8677,15325,8769,15305,8871,15264,8940,15202,8909,15119,8775,15022,8565,14916,8328,14804,8009,14688,7614,14569,7287,14448,6888,14321,6483,14088,6171,15350,7402,15350,7419,15347,7480,15340,7613,15322,7804,15287,7973,15229,8057,15148,8012,15046,7846,14933,7611,14810,7357,14682,7069,14552,6656,14421,6316,14251,5948,14007,5528,15356,5942,15356,5977,15353,6119,15348,6294,15332,6551,15302,6824,15249,7044,15171,7122,15070,7050,14949,6861,14818,6611,14679,6349,14538,6067,14398,5651,14189,5311,13935,4958,15359,4123,15359,4153,15356,4296,15353,4646,15338,5160,15311,5508,15263,5829,15188,6042,15088,6094,14966,6001,14826,5796,14678,5543,14527,5287,14377,4985,14133,4586,13869,4257,15360,1563,15360,1642,15358,2076,15354,2636,15341,3350,15317,4019,15273,4429,15203,4732,15105,4911,14981,4932,14836,4818,14679,4621,14517,4386,14359,4156,14083,3795,13808,3437,15360,122,15360,137,15358,285,15355,636,15344,1274,15322,2177,15281,2765,15215,3223,15120,3451,14995,3569,14846,3567,14681,3466,14511,3305,14344,3121,14037,2800,13753,2467,15360,0,15360,1,15359,21,15355,89,15346,253,15325,479,15287,796,15225,1148,15133,1492,15008,1749,14856,1882,14685,1886,14506,1783,14324,1608,13996,1398,13702,1183]),O6=null;function C7e(){return O6===null&&(O6=new A3e(S7e,16,16,q0,z0),O6.name=`DFG_LUT`,O6.minFilter=N0,O6.magFilter=N0,O6.wrapS=A0,O6.wrapT=A0,O6.generateMipmaps=!1,O6.needsUpdate=!0),O6}var w7e=class{constructor(e={}){let{canvas:t=y4e(),context:n=null,depth:r=!0,stencil:i=!1,alpha:a=!1,antialias:o=!1,premultipliedAlpha:s=!0,preserveDrawingBuffer:c=!1,powerPreference:l=`default`,failIfMajorPerformanceCaveat:u=!1,reversedDepthBuffer:d=!1,outputBufferType:f=F0}=e;this.isWebGLRenderer=!0;let p;if(n!==null){if(typeof WebGLRenderingContext<`u`&&n instanceof WebGLRenderingContext)throw Error(`THREE.WebGLRenderer: WebGL 1 is not supported since r163.`);p=n.getContextAttributes().alpha}else p=a;let m=f,h=new Set([Y0,J0,K0]),g=new Set([F0,L0,I0,H0,B0,V0]),_=new Uint32Array(4),v=new Int32Array(4),y=new X,b=null,x=null,S=[],C=[],w=null;this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=0,this.toneMappingExposure=1,this.transmissionResolutionScale=1;let T=this,E=!1,D=null;this._outputColorSpace=r2;let O=0,k=0,A=null,j=-1,M=null,N=new H2,P=new H2,F=null,ee=new u4(0),te=0,ne=t.width,I=t.height,re=1,ie=null,ae=null,oe=new H2(0,0,ne,I),se=new H2(0,0,ne,I),ce=!1,le=new P3e,ue=!1,de=!1,fe=new W2,pe=new X,me=new H2,he={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0},ge=!1;function _e(){return A===null?re:1}let L=n;function ve(e,n){return t.getContext(e,n)}try{let e={alpha:!0,depth:r,stencil:i,antialias:o,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:l,failIfMajorPerformanceCaveat:u};if(`setAttribute`in t&&t.setAttribute(`data-engine`,`three.js r184`),t.addEventListener(`webglcontextlost`,Ue,!1),t.addEventListener(`webglcontextrestored`,We,!1),t.addEventListener(`webglcontextcreationerror`,Ge,!1),L===null){let t=`webgl2`;if(L=ve(t,e),L===null)throw ve(t)?Error(`Error creating WebGL context with your selected attributes.`):Error(`Error creating WebGL context.`)}}catch(e){throw g2(`WebGLRenderer: `+e.message),e}let ye,be,R,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be;function Ve(){ye=new t8e(L),ye.init(),Re=new p7e(L,ye),be=new B6e(L,ye,e,Re),R=new d7e(L,ye),be.reversedDepthBuffer&&d&&R.buffers.depth.setReversed(!0),xe=new i8e(L),Se=new q5e,Ce=new f7e(L,ye,R,Se,be,Re,xe),we=new e8e(T),Te=new P6e(L),ze=new R6e(L,Te),Ee=new n8e(L,Te,xe,ze),De=new o8e(L,Ee,Te,ze,xe),Fe=new a8e(L,be,Ce),Me=new V6e(Se),Oe=new K5e(T,we,ye,be,ze,Me),ke=new b7e(T,Se),Ae=new Z5e,je=new i7e(ye),Pe=new L6e(T,we,R,De,p,s),Ne=new u7e(T,De,be),Be=new x7e(L,xe,be,R),Ie=new z6e(L,ye,xe),Le=new r8e(L,ye,xe),xe.programs=Oe.programs,T.capabilities=be,T.extensions=ye,T.properties=Se,T.renderLists=Ae,T.shadowMap=Ne,T.state=R,T.info=xe}Ve(),m!==1009&&(w=new c8e(m,t.width,t.height,r,i));let He=new _7e(T,L);this.xr=He,this.getContext=function(){return L},this.getContextAttributes=function(){return L.getContextAttributes()},this.forceContextLoss=function(){let e=ye.get(`WEBGL_lose_context`);e&&e.loseContext()},this.forceContextRestore=function(){let e=ye.get(`WEBGL_lose_context`);e&&e.restoreContext()},this.getPixelRatio=function(){return re},this.setPixelRatio=function(e){e!==void 0&&(re=e,this.setSize(ne,I,!1))}
vendor: 4,155 bytes, line 4569
4569,this.getSize=function(e){return e.set(ne,I)},this.setSize=function(e,n,r=!0){if(He.isPresenting){h2(`WebGLRenderer: Can't change size while VR device is presenting.`);return}ne=e,I=n,t.width=Math.floor(e*re),t.height=Math.floor(n*re),r===!0&&(t.style.width=e+`px`,t.style.height=n+`px`),w!==null&&w.setSize(t.width,t.height),this.setViewport(0,0,e,n)},this.getDrawingBufferSize=function(e){return e.set(ne*re,I*re).floor()},this.setDrawingBufferSize=function(e,n,r){ne=e,I=n,re=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.setEffects=function(e){if(m===1009){g2(`THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.`);return}if(e){for(let t=0;t<e.length;t++)if(e[t].isOutputPass===!0){h2(`THREE.WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.`);break}}w.setEffects(e||[])},this.getCurrentViewport=function(e){return e.copy(N)},this.getViewport=function(e){return e.copy(oe)},this.setViewport=function(e,t,n,r){e.isVector4?oe.set(e.x,e.y,e.z,e.w):oe.set(e,t,n,r),R.viewport(N.copy(oe).multiplyScalar(re).round())},this.getScissor=function(e){return e.copy(se)},this.setScissor=function(e,t,n,r){e.isVector4?se.set(e.x,e.y,e.z,e.w):se.set(e,t,n,r),R.scissor(P.copy(se).multiplyScalar(re).round())},this.getScissorTest=function(){return ce},this.setScissorTest=function(e){R.setScissorTest(ce=e)},this.setOpaqueSort=function(e){ie=e},this.setTransparentSort=function(e){ae=e},this.getClearColor=function(e){return e.copy(Pe.getClearColor())},this.setClearColor=function(){Pe.setClearColor(...arguments)},this.getClearAlpha=function(){return Pe.getClearAlpha()},this.setClearAlpha=function(){Pe.setClearAlpha(...arguments)},this.clear=function(e=!0,t=!0,n=!0){let r=0;if(e){let e=!1;if(A!==null){let t=A.texture.format;e=h.has(t)}if(e){let e=A.texture.type,t=g.has(e),n=Pe.getClearColor(),r=Pe.getClearAlpha(),i=n.r,a=n.g,o=n.b;t?(_[0]=i,_[1]=a,_[2]=o,_[3]=r,L.clearBufferuiv(L.COLOR,0,_)):(v[0]=i,v[1]=a,v[2]=o,v[3]=r,L.clearBufferiv(L.COLOR,0,v))}else r|=L.COLOR_BUFFER_BIT}t&&(r|=L.DEPTH_BUFFER_BIT,this.state.buffers.depth.setMask(!0)),n&&(r|=L.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),r!==0&&L.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.setNodesHandler=function(e){e.setRenderer(this),D=e},this.dispose=function(){t.removeEventListener(`webglcontextlost`,Ue,!1),t.removeEventListener(`webglcontextrestored`,We,!1),t.removeEventListener(`webglcontextcreationerror`,Ge,!1),Pe.dispose(),Ae.dispose(),je.dispose(),Se.dispose(),we.dispose(),De.dispose(),ze.dispose(),Be.dispose(),Oe.dispose(),He.dispose(),He.removeEventListener(`sessionstart`,Qe),He.removeEventListener(`sessionend`,$e),et.stop()};function Ue(e){e.preventDefault(),p2(`WebGLRenderer: Context Lost.`),E=!0}function We(){p2(`WebGLRenderer: Context Restored.`),E=!1;let e=xe.autoReset,t=Ne.enabled,n=Ne.autoUpdate,r=Ne.needsUpdate,i=Ne.type;Ve(),xe.autoReset=e,Ne.enabled=t,Ne.autoUpdate=n,Ne.needsUpdate=r,Ne.type=i}function Ge(e){g2(`WebGLRenderer: A WebGL context could not be created. Reason: `,e.statusMessage)}function Ke(e){let t=e.target;t.removeEventListener(`dispose`,Ke),qe(t)}function qe(e){Je(e),Se.remove(e)}function Je(e){let t=Se.get(e).programs;t!==void 0&&(t.forEach(function(e){Oe.releaseProgram(e)}),e.isShaderMaterial&&Oe.releaseShaderCache(e))}this.renderBufferDirect=function(e,t,n,r,i,a){t===null&&(t=he);let o=i.isMesh&&i.matrixWorld.determinant()<0,s=dt(e,t,n,r,i);R.setMaterial(r,o);let c=n.index,l=1;if(r.wireframe===!0){if(c=Ee.getWireframeAttribute(n),c===void 0)return;l=2}let u=n.drawRange,d=n.attributes.position,f=u.start*l,p=(u.start+u.count)*l;a!==null&&(f=Math.max(f,a.start*l),p=Math.min(p,(a.start+a.count)*l)),c===null?d!=null&&(f=Math.max(f,0),p=Math.min(p,d.count)):(f=Math.max(f,0),p=Math.min(p,c.count));let m=p-f;if(m<0||m===1/0)return;ze.setup(i,r,s,n,c);let h,g=Ie;if(c!==null&&(h=Te.get(c),g=Le,g.setIndex(h)),i.isMesh)r.wireframe===!0?(R.set
vendor: 4,683 bytes, line 4569
4569LineWidth(r.wireframeLinewidth*_e()),g.setMode(L.LINES)):g.setMode(L.TRIANGLES);else if(i.isLine){let e=r.linewidth;e===void 0&&(e=1),R.setLineWidth(e*_e()),i.isLineSegments?g.setMode(L.LINES):i.isLineLoop?g.setMode(L.LINE_LOOP):g.setMode(L.LINE_STRIP)}else i.isPoints?g.setMode(L.POINTS):i.isSprite&&g.setMode(L.TRIANGLES);if(i.isBatchedMesh)if(ye.get(`WEBGL_multi_draw`))g.renderMultiDraw(i._multiDrawStarts,i._multiDrawCounts,i._multiDrawCount);else{let e=i._multiDrawStarts,t=i._multiDrawCounts,n=i._multiDrawCount,a=c?Te.get(c).bytesPerElement:1,o=Se.get(r).currentProgram.getUniforms();for(let r=0;r<n;r++)o.setValue(L,`_gl_DrawID`,r),g.render(e[r]/a,t[r])}else if(i.isInstancedMesh)g.renderInstances(f,m,i.count);else if(n.isInstancedBufferGeometry){let e=n._maxInstanceCount===void 0?1/0:n._maxInstanceCount,t=Math.min(n.instanceCount,e);g.renderInstances(f,m,t)}else g.render(f,m)};function Ye(e,t,n){e.transparent===!0&&e.side===2&&e.forceSinglePass===!1?(e.side=1,e.needsUpdate=!0,st(e,t,n),e.side=0,e.needsUpdate=!0,st(e,t,n),e.side=2):st(e,t,n)}this.compile=function(e,t,n=null){n===null&&(n=e),x=je.get(n),x.init(t),C.push(x),n.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&(x.pushLight(e),e.castShadow&&x.pushShadow(e))}),e!==n&&e.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&(x.pushLight(e),e.castShadow&&x.pushShadow(e))}),x.setupLights();let r=new Set;return e.traverse(function(e){if(!(e.isMesh||e.isPoints||e.isLine||e.isSprite))return;let t=e.material;if(t)if(Array.isArray(t))for(let i=0;i<t.length;i++){let a=t[i];Ye(a,n,e),r.add(a)}else Ye(t,n,e),r.add(t)}),x=C.pop(),r},this.compileAsync=function(e,t,n=null){let r=this.compile(e,t,n);return new Promise(t=>{function n(){if(r.forEach(function(e){Se.get(e).currentProgram.isReady()&&r.delete(e)}),r.size===0){t(e);return}setTimeout(n,10)}ye.get(`KHR_parallel_shader_compile`)===null?setTimeout(n,10):n()})};let Xe=null;function Ze(e){Xe&&Xe(e)}function Qe(){et.stop()}function $e(){et.start()}let et=new N6e;et.setAnimationLoop(Ze),typeof self<`u`&&et.setContext(self),this.setAnimationLoop=function(e){Xe=e,He.setAnimationLoop(e),e===null?et.stop():et.start()},He.addEventListener(`sessionstart`,Qe),He.addEventListener(`sessionend`,$e),this.render=function(e,t){if(t!==void 0&&t.isCamera!==!0){g2(`WebGLRenderer.render: camera is not an instance of THREE.Camera.`);return}if(E===!0)return;D!==null&&D.renderStart(e,t);let n=He.enabled===!0&&He.isPresenting===!0,r=w!==null&&(A===null||n)&&w.begin(T,A);if(e.matrixWorldAutoUpdate===!0&&e.updateMatrixWorld(),t.parent===null&&t.matrixWorldAutoUpdate===!0&&t.updateMatrixWorld(),He.enabled===!0&&He.isPresenting===!0&&(w===null||w.isCompositing()===!1)&&(He.cameraAutoUpdate===!0&&He.updateCamera(t),t=He.getCamera()),e.isScene===!0&&e.onBeforeRender(T,e,t,A),x=je.get(e,C.length),x.init(t),x.state.textureUnits=Ce.getTextureUnits(),C.push(x),fe.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),le.setFromProjectionMatrix(fe,l2,t.reversedDepth),de=this.localClippingEnabled,ue=Me.init(this.clippingPlanes,de),b=Ae.get(e,S.length),b.init(),S.push(b),He.enabled===!0&&He.isPresenting===!0){let e=T.xr.getDepthSensingMesh();e!==null&&tt(e,t,-1/0,T.sortObjects)}tt(e,t,0,T.sortObjects),b.finish(),T.sortObjects===!0&&b.sort(ie,ae),ge=He.enabled===!1||He.isPresenting===!1||He.hasDepthSensing()===!1,ge&&Pe.addToRenderList(b,e),this.info.render.frame++,ue===!0&&Me.beginShadows();let i=x.state.shadowsArray;if(Ne.render(i,e,t),ue===!0&&Me.endShadows(),this.info.autoReset===!0&&this.info.reset(),(r&&w.hasRenderPass())===!1){let n=b.opaque,r=b.transmissive;if(x.setupLights(),t.isArrayCamera){let i=t.cameras;if(r.length>0)for(let t=0,a=i.length;t<a;t++){let a=i[t];rt(n,r,e,a)}ge&&Pe.render(e);for(let t=0,n=i.length;t<n;t++){let n=i[t];nt(b,e,n,n.viewport)}}else r.length>0&&rt(n,r,e,t),ge&&Pe.render(e),nt(b,e,t)}A!==null&&k===0&&(Ce.updateMultisampleRenderTarget(A),Ce.updateRenderTargetMipmap(A)),r&&w.end(T),e.isScene===!0&&e.onAfterRender(T,e,t),ze.resetDefaultState(),j=-1,M=null,C.pop(),C.length>0?(x=C[C.length-1],Ce.setTextureUnits(x.state.textureUnits),ue===!0&&Me.setGlobalState(T.clippingPlanes,x.state.camera)):x=null,S.pop(),b=S.length>0?S[S.length-1]:null,D!==null&&D.renderEnd()};function tt(e,t,n,r){if(e.visible===!1)return;if(e.layers.test(t.layers)){if(e.isGroup)n=e.renderOrder;else if(e.isLOD)e.autoUpdate===!0&&e.update(t);else if(e.isLightProbeGrid)x.pushLightProbeGrid(e);else if(e.isLight)x.pushLight(e),e.castShadow&&x.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||le.intersectsSprite(e)){r&&me.setFromMatrixPosition(e.matrixWorld).applyMatrix4(fe);let t=De.update(e),i=e.material;
vendor: 5,175 bytes, line 4569
4569i.visible&&b.push(e,t,i,n,me.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||le.intersectsObject(e))){let t=De.update(e),i=e.material;if(r&&(e.boundingSphere===void 0?(t.boundingSphere===null&&t.computeBoundingSphere(),me.copy(t.boundingSphere.center)):(e.boundingSphere===null&&e.computeBoundingSphere(),me.copy(e.boundingSphere.center)),me.applyMatrix4(e.matrixWorld).applyMatrix4(fe)),Array.isArray(i)){let r=t.groups;for(let a=0,o=r.length;a<o;a++){let o=r[a],s=i[o.materialIndex];s&&s.visible&&b.push(e,t,s,n,me.z,o)}}else i.visible&&b.push(e,t,i,n,me.z,null)}}let i=e.children;for(let e=0,a=i.length;e<a;e++)tt(i[e],t,n,r)}function nt(e,t,n,r){let{opaque:i,transmissive:a,transparent:o}=e;x.setupLightsView(n),ue===!0&&Me.setGlobalState(T.clippingPlanes,n),r&&R.viewport(N.copy(r)),i.length>0&&at(i,t,n),a.length>0&&at(a,t,n),o.length>0&&at(o,t,n),R.buffers.depth.setTest(!0),R.buffers.depth.setMask(!0),R.buffers.color.setMask(!0),R.setPolygonOffset(!1)}function rt(e,t,n,r){if((n.isScene===!0?n.overrideMaterial:null)!==null)return;if(x.state.transmissionRenderTarget[r.id]===void 0){let e=ye.has(`EXT_color_buffer_half_float`)||ye.has(`EXT_color_buffer_float`);x.state.transmissionRenderTarget[r.id]=new U2(1,1,{generateMipmaps:!0,type:e?z0:F0,minFilter:P0,samples:Math.max(4,be.samples),stencilBuffer:i,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:P2.workingColorSpace})}let a=x.state.transmissionRenderTarget[r.id],o=r.viewport||N;a.setSize(o.z*T.transmissionResolutionScale,o.w*T.transmissionResolutionScale);let s=T.getRenderTarget(),c=T.getActiveCubeFace(),l=T.getActiveMipmapLevel();T.setRenderTarget(a),T.getClearColor(ee),te=T.getClearAlpha(),te<1&&T.setClearColor(16777215,.5),T.clear(),ge&&Pe.render(n);let u=T.toneMapping;T.toneMapping=0;let d=r.viewport;if(r.viewport!==void 0&&(r.viewport=void 0),x.setupLightsView(r),ue===!0&&Me.setGlobalState(T.clippingPlanes,r),at(e,n,r),Ce.updateMultisampleRenderTarget(a),Ce.updateRenderTargetMipmap(a),ye.has(`WEBGL_multisampled_render_to_texture`)===!1){let e=!1;for(let i=0,a=t.length;i<a;i++){let{object:a,geometry:o,material:s,group:c}=t[i];if(s.side===2&&a.layers.test(r.layers)){let t=s.side;s.side=1,s.needsUpdate=!0,ot(a,n,r,o,s,c),s.side=t,s.needsUpdate=!0,e=!0}}e===!0&&(Ce.updateMultisampleRenderTarget(a),Ce.updateRenderTargetMipmap(a))}T.setRenderTarget(s,c,l),T.setClearColor(ee,te),d!==void 0&&(r.viewport=d),T.toneMapping=u}function at(e,t,n){let r=t.isScene===!0?t.overrideMaterial:null;for(let i=0,a=e.length;i<a;i++){let a=e[i],{object:o,geometry:s,group:c}=a,l=a.material;l.allowOverride===!0&&r!==null&&(l=r),o.layers.test(n.layers)&&ot(o,t,n,s,l,c)}}function ot(e,t,n,r,i,a){e.onBeforeRender(T,t,n,r,i,a),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),i.onBeforeRender(T,t,n,r,e,a),i.transparent===!0&&i.side===2&&i.forceSinglePass===!1?(i.side=1,i.needsUpdate=!0,T.renderBufferDirect(n,t,r,i,e,a),i.side=0,i.needsUpdate=!0,T.renderBufferDirect(n,t,r,i,e,a),i.side=2):T.renderBufferDirect(n,t,r,i,e,a),e.onAfterRender(T,t,n,r,i,a)}function st(e,t,n){t.isScene!==!0&&(t=he);let r=Se.get(e),i=x.state.lights,a=x.state.shadowsArray,o=i.state.version,s=Oe.getParameters(e,i.state,a,t,n,x.state.lightProbeGridArray),c=Oe.getProgramCacheKey(s),l=r.programs;r.environment=e.isMeshStandardMaterial||e.isMeshLambertMaterial||e.isMeshPhongMaterial?t.environment:null,r.fog=t.fog;let u=e.isMeshStandardMaterial||e.isMeshLambertMaterial&&!e.envMap||e.isMeshPhongMaterial&&!e.envMap;r.envMap=we.get(e.envMap||r.environment,u),r.envMapRotation=r.environment!==null&&e.envMap===null?t.environmentRotation:e.envMapRotation,l===void 0&&(e.addEventListener(`dispose`,Ke),l=new Map,r.programs=l);let d=l.get(c);if(d!==void 0){if(r.currentProgram===d&&r.lightsStateVersion===o)return lt(e,s),d}else s.uniforms=Oe.getUniforms(e),D!==null&&e.isNodeMaterial&&D.build(e,n,s),e.onBeforeCompile(s,T),d=Oe.acquireProgram(s,c),l.set(c,d),r.uniforms=s.uniforms;let f=r.uniforms;return(!e.isShaderMaterial&&!e.isRawShaderMaterial||e.clipping===!0)&&(f.clippingPlanes=Me.uniform),lt(e,s),r.needsLights=pt(e),r.lightsStateVersion=o,r.needsLights&&(f.ambientLightColor.value=i.state.ambient,f.lightProbe.value=i.state.probe,f.directionalLights.value=i.state.directional,f.directionalLightShadows.value=i.state.directionalShadow,f.spotLights.value=i.state.spot,f.spotLightShadows.value=i.state.spotShadow,f.rectAreaLights.value=i.state.rectArea,f.ltc_1.value=i.state.rectAreaLTC1,f.ltc_2.value=i.state.rectAreaLTC2,f.pointLights.value=i.state.point,f.pointLightShadows.value=i.state.pointShadow,f.hemisphereLights.value=i.state.hemi,f.directionalShadowMatrix.value=i.state.directionalShadowMatrix,f.spotLightMatrix.value=i.state.spotLightMatrix,f.spotLightMap.value=i.state.spotLightMap,f.pointShadowMatrix.value=i.state.pointShadowMatrix),r.lightProbeGrid=x.state.lightProbeGridArray.length>0,r.currentProgram=d,r.uniformsList=null,d}function ct(e){if(e.uniformsList===null){let t=e.currentProgram.getUniforms();e.uniformsList=S6.seqWithValue(t.seq,e.uniforms)}return e.uniformsList}function lt(e,t){let n=Se.get(e);
4569n.outputColorSpace=t.outputColorSpace,n.batching=t.batching,n.batchingColor=t.batchingColor,n.instancing=t.instancing,n.instancingColor=t.instancingColor,n.instancingMorph=t.instancingMorph,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphColors=t.morphColors,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}function ut(e,t){if(e.length===0)return null;if(e.length===1)return e[0].texture===null?null:e[0];y.setFromMatrixPosition(t.matrixWorld);for(let t=0,n=e.length;t<n;t++){let n=e[t];if(n.texture!==null&&n.boundingBox.containsPoint(y))return n}return null}function dt(e,t,n,r,i){t.isScene!==!0&&(t=he),Ce.resetTextureUnits();let a=t.fog,o=r.isMeshStandardMaterial||r.isMeshLambertMaterial||r.isMeshPhongMaterial?t.environment:null,s=A===null?T.outputColorSpace:A.isXRRenderTarget===!0?A.texture.colorSpace:P2.workingColorSpace,c=r.isMeshStandardMaterial||r.isMeshLambertMaterial&&!r.envMap||r.isMeshPhongMaterial&&!r.envMap,l=we.get(r.envMap||o,c),u=r.vertexColors===!0&&!!n.attributes.color&&n.attributes.color.itemSize===4,d=!!n.attributes.tangent&&(!!r.normalMap||r.anisotropy>0),f=!!n.morphAttributes.position,p=!!n.morphAttributes.normal,m=!!n.morphAttributes.color,h=0;r.toneMapped&&(A===null||A.isXRRenderTarget===!0)&&(h=T.toneMapping);let g=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,_=g===void 0?0:g.length,v=Se.get(r),y=x.state.lights;if(ue===!0&&(de===!0||e!==M)){let t=e===M&&r.id===j;Me.setState(r,e,t)}let b=!1;r.version===v.__version?v.needsLights&&v.lightsStateVersion!==y.state.version?b=!0:v.outputColorSpace===s?i.isBatchedMesh&&v.batching===!1||!i.isBatchedMesh&&v.batching===!0||i.isBatchedMesh&&v.batchingColor===!0&&i.colorTexture===null||i.isBatchedMesh&&v.batchingColor===!1&&i.colorTexture!==null||i.isInstancedMesh&&v.instancing===!1||!i.isInstancedMesh&&v.instancing===!0||i.isSkinnedMesh&&v.skinning===!1||!i.isSkinnedMesh&&v.skinning===!0||i.isInstancedMesh&&v.instancingColor===!0&&i.instanceColor===null||i.isInstancedMesh&&v.instancingColor===!1&&i.instanceColor!==null||i.isInstancedMesh&&v.instancingMorph===!0&&i.morphTexture===null||i.isInstancedMesh&&v.instancingMorph===!1&&i.morphTexture!==null?b=!0:v.envMap===l?r.fog===!0&&v.fog!==a||v.numClippingPlanes!==void 0&&(v.numClippingPlanes!==Me.numPlanes||v.numIntersection!==Me.numIntersection)?b=!0:v.vertexAlphas===u&&v.vertexTangents===d&&v.morphTargets===f&&v.morphNormals===p&&v.morphColors===m&&v.toneMapping===h&&v.morphTargetsCount===_?!!v.lightProbeGrid!=x.state.lightProbeGridArray.length>0&&(b=!0):b=!0:b=!0:b=!0:(b=!0,v.__version=r.version);let S=v.currentProgram;b===!0&&(S=st(r,t,i),D&&r.isNodeMaterial&&D.onUpdateProgram(r,S,v));let C=!1,w=!1,E=!1,O=S.getUniforms(),k=v.uniforms;if(R.useProgram(S.program)&&(C=!0,w=!0,E=!0),r.id!==j&&(j=r.id,w=!0),v.needsLights){let e=ut(x.state.lightProbeGridArray,i);v.lightProbeGrid!==e&&(v.lightProbeGrid=e,w=!0)}if(C||M!==e){R.buffers.depth.getReversed()&&e.reversedDepth!==!0&&(e._reversedDepth=!0,e.updateProjectionMatrix()),O.setValue(L,`projectionMatrix`,e.projectionMatrix),O.setValue(L,`viewMatrix`,e.matrixWorldInverse);let t=O.map.cameraPosition;t!==void 0&&t.setValue(L,pe.setFromMatrixPosition(e.matrixWorld)),be.logarithmicDepthBuffer&&O.setValue(L,`logDepthBufFC`,2/(Math.log(e.far+1)/Math.LN2)),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&O.setValue(L,`isOrthographic`,e.isOrthographicCamera===!0),M!==e&&(M=e,w=!0,E=!0)}if(v.needsLights&&(y.state.directionalShadowMap.length>0&&O.setValue(L,`directionalShadowMap`,y.state.directionalShadowMap,Ce),y.state.spotShadowMap.length>0&&O.setValue(L,`spotShadowMap`,y.state.spotShadowMap,Ce),y.state.pointShadowMap.length>0&&O.setValue(L,`pointShadowMap`,y.state.pointShadowMap,Ce)),i.isSkinnedMesh){O.setOptional(L,i,`bindMatrix`),O.setOptional(L,i,`bindMatrixInverse`);let e=i.skeleton;e&&(e.boneTexture===null&&e.computeBoneTexture(),O.setValue(L,`boneTexture`,e.boneTexture,Ce))}i.isBatchedMesh&&(O.setOptional(L,i,`batchingTexture`),O.setValue(L,`batchingTexture`,i._matricesTexture,Ce),O.setOptional(L,i,`batchingIdTexture`),O.setValue(L,`batchingIdTexture`,i._indirectTexture,Ce),O.setOptional(L,i,`batchingColorTexture`),i._colorsTexture!==null&&O.setValue(L,`batchingColorTexture`,i._colorsTexture,Ce));let N=n.morphAttributes;if((N.position!==void 0||N.normal!==void 0||N.color!==void 0)&&Fe.update(i,n,S),(w||v.receiveShadow!==i.receiveShadow)&&(v.receiveShadow=i.receiveShadow,O.setValue(L,`receiveShadow`,i.receiveShadow)),(r.isMeshStandardMaterial||r.isMeshLambertMaterial||r.isMeshPhongMaterial)&&r.envMap===null&&t.environment!==null&&(k.envMapIntensity.value=t.environmentIntensity),k.dfgLUT!==void 0&&(k.dfgLUT.value=C7e()),w){if(O.setValue(L,`toneMappingExposure`,T.toneMappingExposure),v.needsLights&&ft(k,E),a&&r.fog===!0&&ke.refreshFogUniforms(k,a),ke.refreshMaterialUniforms(k,r,re,I,x.state.transmissionRenderTarget[e.id]),v.needsLights&&v.lightProbeGrid){let e=v.lightProbeGrid;k.probesSH.value=e.texture,k.probesMin.value.copy(e.boundingBox.min),k.probesMax.value.copy(e.boundingBox.max),k.probesResolution.value.copy(e.resolution)}S6.upload(L,ct(v),k,Ce)}if(r.isShaderMaterial&&r.uniformsNeedUpdate===!0&&(S6.upload(L,ct(v),k,Ce),r.uniformsNeedUpdate=!1),r.isSpriteMaterial&&O.setValue(L,`center`,i.center),O.setValue(L,`modelViewMatrix`,i.modelViewMatrix),O.setValue(L,`normalMatrix`,i.normalMatrix),O.setValue(L,`modelMatrix`,i.matrixWorld),r.uniformsGroups!==void 0){let e=r.uniformsGroups;for(let t=0,n=e.length;t<n;t++){let n=e[t];Be.update(n,S),Be.bind(n,S)}}return S}function ft(e,t){e.ambientLightColor.needsUpdate=t,e.lightProbe.needsUpdate=t,e.directionalLights.needsUpdate=t,e.directionalLightShadows.needsUpdate=t,e.pointLights.needsUpdate=t,e.pointLightShadows.needsUpdate=t,e.spotLights.needsUpdate=t,e.spotLightShadows.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}function pt(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&e.lights===!0}this.getActiveCubeFace=function(){return O},this.getActiveMipmapLevel=function(){return k},this.getRenderTarget=function(){return A},this.setRenderTargetTextures=function(e,t,n){let r=Se.get(e);r.__autoAllocateDepthBuffer=e.resolveDepthBuffer===!1,r.__autoAllocateDepthBuffer===!1&&(r.__useRenderToTexture=!1),Se.get(e.texture).__webglTexture=t,Se.get(e.depthTexture).__webglTexture=r.__autoAllocateDepthBuffer?void 0:n,r.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(e,t){let n=Se.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=t===void 0};let mt=L.createFramebuffer();this.setRenderTarget=function(e,t=0,n=0){A=e,O=t,k=n;let r=null,i=!1,a=!1;if(e){let o=Se.get(e);if(o.__useDefaultFramebuffer!==void 0){R.bindFramebuffer(L.FRAMEBUFFER,o.__webglFramebuffer),N.copy(e.viewport),P.copy(e.scissor),F=e.scissorTest,R.viewport(N),R.scissor(P),R.setScissorTest(F),j=-1;return}else if(o.__webglFramebuffer===void 0)Ce.setupRenderTarget(e);else if(o.__hasExternalTextures)Ce.rebindTextures(e,Se.get(e.texture).__webglTexture,Se.get(e.depthTexture).__webglTexture);else if(e.depthBuffer){let t=e.depthTexture;if(o.__boundDepthTexture!==t){if(t!==null&&Se.has(t)&&(e.width!==t.image.width||e.height!==t.image.height))throw Error(`WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.`);Ce.setupDepthRenderbuffer(e)}}let s=e.texture;(s.isData3DTexture||s.isDataArrayTexture||s.isCompressedArrayTexture)&&(a=!0);let c=Se.get(e).__webglFramebuffer;
vendor: 4,474 bytes, line 4569
4569e.isWebGLCubeRenderTarget?(r=Array.isArray(c[t])?c[t][n]:c[t],i=!0):r=e.samples>0&&Ce.useMultisampledRTT(e)===!1?Se.get(e).__webglMultisampledFramebuffer:Array.isArray(c)?c[n]:c,N.copy(e.viewport),P.copy(e.scissor),F=e.scissorTest}else N.copy(oe).multiplyScalar(re).floor(),P.copy(se).multiplyScalar(re).floor(),F=ce;if(n!==0&&(r=mt),R.bindFramebuffer(L.FRAMEBUFFER,r)&&R.drawBuffers(e,r),R.viewport(N),R.scissor(P),R.setScissorTest(F),i){let r=Se.get(e.texture);L.framebufferTexture2D(L.FRAMEBUFFER,L.COLOR_ATTACHMENT0,L.TEXTURE_CUBE_MAP_POSITIVE_X+t,r.__webglTexture,n)}else if(a){let r=t;for(let t=0;t<e.textures.length;t++){let i=Se.get(e.textures[t]);L.framebufferTextureLayer(L.FRAMEBUFFER,L.COLOR_ATTACHMENT0+t,i.__webglTexture,n,r)}}else if(e!==null&&n!==0){let t=Se.get(e.texture);L.framebufferTexture2D(L.FRAMEBUFFER,L.COLOR_ATTACHMENT0,L.TEXTURE_2D,t.__webglTexture,n)}j=-1},this.readRenderTargetPixels=function(e,t,n,r,i,a,o,s=0){if(!(e&&e.isWebGLRenderTarget)){g2(`WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.`);return}let c=Se.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&o!==void 0&&(c=c[o]),c){R.bindFramebuffer(L.FRAMEBUFFER,c);try{let o=e.textures[s],c=o.format,l=o.type;if(e.textures.length>1&&L.readBuffer(L.COLOR_ATTACHMENT0+s),!be.textureFormatReadable(c)){g2(`WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.`);return}if(!be.textureTypeReadable(l)){g2(`WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.`);return}t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&L.readPixels(t,n,r,i,Re.convert(c),Re.convert(l),a)}finally{let e=A===null?null:Se.get(A).__webglFramebuffer;R.bindFramebuffer(L.FRAMEBUFFER,e)}}},this.readRenderTargetPixelsAsync=async function(e,t,n,r,i,a,o,s=0){if(!(e&&e.isWebGLRenderTarget))throw Error(`THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.`);let c=Se.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&o!==void 0&&(c=c[o]),c)if(t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i){R.bindFramebuffer(L.FRAMEBUFFER,c);let o=e.textures[s],l=o.format,u=o.type;if(e.textures.length>1&&L.readBuffer(L.COLOR_ATTACHMENT0+s),!be.textureFormatReadable(l))throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.`);if(!be.textureTypeReadable(u))throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.`);let d=L.createBuffer();L.bindBuffer(L.PIXEL_PACK_BUFFER,d),L.bufferData(L.PIXEL_PACK_BUFFER,a.byteLength,L.STREAM_READ),L.readPixels(t,n,r,i,Re.convert(l),Re.convert(u),0);let f=A===null?null:Se.get(A).__webglFramebuffer;R.bindFramebuffer(L.FRAMEBUFFER,f);let p=L.fenceSync(L.SYNC_GPU_COMMANDS_COMPLETE,0);return L.flush(),await b4e(L,p,4),L.bindBuffer(L.PIXEL_PACK_BUFFER,d),L.getBufferSubData(L.PIXEL_PACK_BUFFER,0,a),L.deleteBuffer(d),L.deleteSync(p),a}else throw Error(`THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.`)},this.copyFramebufferToTexture=function(e,t=null,n=0){let r=2**-n,i=Math.floor(e.image.width*r),a=Math.floor(e.image.height*r),o=t===null?0:t.x,s=t===null?0:t.y;Ce.setTexture2D(e,0),L.copyTexSubImage2D(L.TEXTURE_2D,n,0,0,o,s,i,a),R.unbindTexture()};let ht=L.createFramebuffer(),gt=L.createFramebuffer();this.copyTextureToTexture=function(e,t,n=null,r=null,i=0,a=0){let o,s,c,l,u,d,f,p,m,h=e.isCompressedTexture?e.mipmaps[a]:e.image;if(n!==null)o=n.max.x-n.min.x,s=n.max.y-n.min.y,c=n.isBox3?n.max.z-n.min.z:1,l=n.min.x,u=n.min.y,d=n.isBox3?n.min.z:0;else{let t=2**-i;o=Math.floor(h.width*t),s=Math.floor(h.height*t),c=e.isDataArrayTexture?h.depth:e.isData3DTexture?Math.floor(h.depth*t):1,l=0,u=0,d=0}r===null?(f=0,p=0,m=0):(f=r.x,p=r.y,m=r.z);let g=Re.convert(t.format),_=Re.convert(t.type),v;t.isData3DTexture?(Ce.setTexture3D(t,0),v=L.TEXTURE_3D):t.isDataArrayTexture||t.isCompressedArrayTexture?(Ce.setTexture2DArray(t,0),v=L.TEXTURE_2D_ARRAY):(Ce.setTexture2D(t,0),v=L.TEXTURE_2D),R.activeTexture(L.TEXTURE0),R.pixelStorei(L.UNPACK_FLIP_Y_WEBGL,t.flipY),R.pixelStorei(L.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),R.pixelStorei(L.UNPACK_ALIGNMENT,t.unpackAlignment);let y=R.getParameter(L.UNPACK_ROW_LENGTH),b=R.getParameter(L.UNPACK_IMAGE_HEIGHT),x=R.getParameter(L.UNPACK_SKIP_PIXELS),S=R.getParameter(L.UNPACK_SKIP_ROWS),
4569C=R.getParameter(L.UNPACK_SKIP_IMAGES);R.pixelStorei(L.UNPACK_ROW_LENGTH,h.width),R.pixelStorei(L.UNPACK_IMAGE_HEIGHT,h.height),R.pixelStorei(L.UNPACK_SKIP_PIXELS,l),R.pixelStorei(L.UNPACK_SKIP_ROWS,u),R.pixelStorei(L.UNPACK_SKIP_IMAGES,d);let w=e.isDataArrayTexture||e.isData3DTexture,T=t.isDataArrayTexture||t.isData3DTexture;if(e.isDepthTexture){let n=Se.get(e),r=Se.get(t),h=Se.get(n.__renderTarget),g=Se.get(r.__renderTarget);R.bindFramebuffer(L.READ_FRAMEBUFFER,h.__webglFramebuffer),R.bindFramebuffer(L.DRAW_FRAMEBUFFER,g.__webglFramebuffer);for(let n=0;n<c;n++)w&&(L.framebufferTextureLayer(L.READ_FRAMEBUFFER,L.COLOR_ATTACHMENT0,Se.get(e).__webglTexture,i,d+n),L.framebufferTextureLayer(L.DRAW_FRAMEBUFFER,L.COLOR_ATTACHMENT0,Se.get(t).__webglTexture,a,m+n)),L.blitFramebuffer(l,u,o,s,f,p,o,s,L.DEPTH_BUFFER_BIT,L.NEAREST);R.bindFramebuffer(L.READ_FRAMEBUFFER,null),R.bindFramebuffer(L.DRAW_FRAMEBUFFER,null)}else if(i!==0||e.isRenderTargetTexture||Se.has(e)){let n=Se.get(e),r=Se.get(t);R.bindFramebuffer(L.READ_FRAMEBUFFER,ht),R.bindFramebuffer(L.DRAW_FRAMEBUFFER,gt);for(let e=0;e<c;e++)w?L.framebufferTextureLayer(L.READ_FRAMEBUFFER,L.COLOR_ATTACHMENT0,n.__webglTexture,i,d+e):L.framebufferTexture2D(L.READ_FRAMEBUFFER,L.COLOR_ATTACHMENT0,L.TEXTURE_2D,n.__webglTexture,i),T?L.framebufferTextureLayer(L.DRAW_FRAMEBUFFER,L.COLOR_ATTACHMENT0,r.__webglTexture,a,m+e):L.framebufferTexture2D(L.DRAW_FRAMEBUFFER,L.COLOR_ATTACHMENT0,L.TEXTURE_2D,r.__webglTexture,a),i===0?T?L.copyTexSubImage3D(v,a,f,p,m+e,l,u,o,s):L.copyTexSubImage2D(v,a,f,p,l,u,o,s):L.blitFramebuffer(l,u,o,s,f,p,o,s,L.COLOR_BUFFER_BIT,L.NEAREST);R.bindFramebuffer(L.READ_FRAMEBUFFER,null),R.bindFramebuffer(L.DRAW_FRAMEBUFFER,null)}else T?e.isDataTexture||e.isData3DTexture?L.texSubImage3D(v,a,f,p,m,o,s,c,g,_,h.data):t.isCompressedArrayTexture?L.compressedTexSubImage3D(v,a,f,p,m,o,s,c,g,h.data):L.texSubImage3D(v,a,f,p,m,o,s,c,g,_,h):e.isDataTexture?L.texSubImage2D(L.TEXTURE_2D,a,f,p,o,s,g,_,h.data):e.isCompressedTexture?L.compressedTexSubImage2D(L.TEXTURE_2D,a,f,p,h.width,h.height,g,h.data):L.texSubImage2D(L.TEXTURE_2D,a,f,p,o,s,g,_,h);R.pixelStorei(L.UNPACK_ROW_LENGTH,y),R.pixelStorei(L.UNPACK_IMAGE_HEIGHT,b),R.pixelStorei(L.UNPACK_SKIP_PIXELS,x),R.pixelStorei(L.UNPACK_SKIP_ROWS,S),R.pixelStorei(L.UNPACK_SKIP_IMAGES,C),a===0&&t.generateMipmaps&&L.generateMipmap(v),R.unbindTexture()},this.initRenderTarget=function(e){Se.get(e).__webglFramebuffer===void 0&&Ce.setupRenderTarget(e)},this.initTexture=function(e){e.isCubeTexture?Ce.setTextureCube(e,0):e.isData3DTexture?Ce.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?Ce.setTexture2DArray(e,0):Ce.setTexture2D(e,0),R.unbindTexture()},this.resetState=function(){O=0,k=0,A=null,R.reset(),ze.reset()},typeof __THREE_DEVTOOLS__<`u`&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent(`observe`,{detail:this}))}get coordinateSystem(){return l2}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;let t=this.getContext();t.drawingBufferColorSpace=P2._getDrawingBufferColorSpace(e),t.unpackColorSpace=P2._getUnpackColorSpace()}},T7e={type:`change`},k6={type:`start`},E7e={type:`end`},A6=new b3,D7e=new M3,O7e=Math.cos(70*R4e.DEG2RAD),j6=new X,M6=2*Math.PI,N6={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},P6=1e-6,k7e=class extends A6e{constructor(e,t=null){super(e,t),this.state=N6.NONE,this.target=new X,this.cursor=new X,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:`ArrowLeft`,UP:`ArrowUp`,RIGHT:`ArrowRight`,BOTTOM:`ArrowDown`},this.mouseButtons={LEFT:D0.ROTATE,MIDDLE:D0.DOLLY,RIGHT:D0.PAN},this.touches={ONE:O0.ROTATE,TWO:O0.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._cursorStyle=`auto`,this._domElementKeyEvents=null,this._lastPosition=new X,this._lastQuaternion=new A2,this._lastTargetPosition=new X,this._quat=new A2().setFromUnitVectors(e.up,new X(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new k6e,this._sphericalDelta=new k6e,this._scale=1,this._panOffset=new X,this._rotateStart=new k2,this._rotateEnd=new k2,this._rotateDelta=new k2,this._panStart=new k2,this._panEnd=new k2,this._panDelta=new k2,this._dollyStart=new k2,this._dollyEnd=new k2,this._dollyDelta=new k2,this._dollyDirection=new X,this._mouse=new k2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=j7e.bind(this),this._onPointerDown=A7e.bind(this),this._onPointerUp=M7e.bind(this),this._onContextMenu=z7e.bind(this),this._onMouseWheel=F7e.bind(this),this._onKeyDown=I7e.bind(this),this._onTouchStart=L7e.bind(this),this._onTouchMove=R7e.bind(this),this._onMouseDown=N7e.bind(this),this._onMouseMove=P7e.bind(this),this._interceptControlDown=B7e.bind(this),this._interceptControlUp=V7e.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}set cursorStyle(e){this._cursorStyle=e,e===`grab`?this.domElement.style.cursor=`grab`:this.domElement.style.cursor=`auto`}get cursorStyle(){return this._cursorStyle}connect(e){super.connect(e),this.domElement.addEventListener(`pointerdown`,this._onPointerDown),this.domElement.addEventListener(`pointercancel`,this._onPointerUp),this.domElement.addEventListener(`contextmenu`,this._onContextMenu),this.domElement.addEventListener(`wheel`,this._onMouseWheel,{passive:!1}
vendor: 16,384 bytes, line 4569
4569),this.domElement.getRootNode().addEventListener(`keydown`,this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction=`none`}disconnect(){this.domElement.removeEventListener(`pointerdown`,this._onPointerDown),this.domElement.ownerDocument.removeEventListener(`pointermove`,this._onPointerMove),this.domElement.ownerDocument.removeEventListener(`pointerup`,this._onPointerUp),this.domElement.removeEventListener(`pointercancel`,this._onPointerUp),this.domElement.removeEventListener(`wheel`,this._onMouseWheel),this.domElement.removeEventListener(`contextmenu`,this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener(`keydown`,this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction=``}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener(`keydown`,this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener(`keydown`,this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(T7e),this.update(),this.state=N6.NONE}pan(e,t){this._pan(e,t),this.update()}dollyIn(e){this._dollyIn(e),this.update()}dollyOut(e){this._dollyOut(e),this.update()}rotateLeft(e){this._rotateLeft(e),this.update()}rotateUp(e){this._rotateUp(e),this.update()}update(e=null){let t=this.object.position;j6.copy(t).sub(this.target),j6.applyQuaternion(this._quat),this._spherical.setFromVector3(j6),this.autoRotate&&this.state===N6.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,r=this.maxAzimuthAngle;isFinite(n)&&isFinite(r)&&(n<-Math.PI?n+=M6:n>Math.PI&&(n-=M6),r<-Math.PI?r+=M6:r>Math.PI&&(r-=M6),n<=r?this._spherical.theta=Math.max(n,Math.min(r,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+r)/2?Math.max(n,this._spherical.theta):Math.min(r,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let i=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{let e=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),i=e!=this._spherical.radius}if(j6.setFromSpherical(this._spherical),j6.applyQuaternion(this._quatInverse),t.copy(this.target).add(j6),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let e=null;if(this.object.isPerspectiveCamera){let t=j6.length();e=this._clampDistance(t*this._scale);let n=t-e;this.object.position.addScaledVector(this._dollyDirection,n),this.object.updateMatrixWorld(),i=!!n}else if(this.object.isOrthographicCamera){let t=new X(this._mouse.x,this._mouse.y,0);t.unproject(this.object);let n=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),i=n!==this.object.zoom;let r=new X(this._mouse.x,this._mouse.y,0);r.unproject(this.object),this.object.position.sub(r).add(t),this.object.updateMatrixWorld(),e=j6.length()}else console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled.`),this.zoomToCursor=!1;e!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(e).add(this.object.position):(A6.origin.copy(this.object.position),A6.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(A6.direction))<O7e?this.object.lookAt(this.target):(D7e.setFromNormalAndCoplanarPoint(this.object.up,this.target),A6.intersectPlane(D7e,this.target))))}else if(this.object.isOrthographicCamera){let e=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),e!==this.object.zoom&&(this.object.updateProjectionMatrix(),i=!0)}return this._scale=1,this._performCursorZoom=!1,i||this._lastPosition.distanceToSquared(this.object.position)>P6||8*(1-this._lastQuaternion.dot(this.object.quaternion))>P6||this._lastTargetPosition.distanceToSquared(this.target)>P6?(this.dispatchEvent(T7e),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e===null?M6/60/60*this.autoRotateSpeed:M6/60*this.autoRotateSpeed*e}_getZoomScale(e){let t=Math.abs(e*.01);return .95**(this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){j6.setFromMatrixColumn(t,0),j6.multiplyScalar(-e),this._panOffset.add(j6)}_panUp(e,t){this.screenSpacePanning===!0?j6.setFromMatrixColumn(t,1):(j6.setFromMatrixColumn(t,0),j6.crossVectors(this.object.up,j6)),j6.multiplyScalar(e),this._panOffset.add(j6)}_pan(e,t){let n=this.domElement;if(this.object.isPerspectiveCamera){let r=this.object.position;j6.copy(r).sub(this.target);let i=j6.length();i*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*i/n.clientHeight,this.object.matrix),this._panUp(2*t*i/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.`),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.`),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.`),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;let n=this.domElement.getBoundingClientRect(),r=e-n.left,i=t-n.top,a=n.width,o=n.height;this._mouse.x=r/a*2-1,this._mouse.y=-(i/o)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft(M6*this._rotateDelta.x/t.clientHeight),this._rotateUp(M6*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(M6*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-M6*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(M6*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-M6*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._rotateStart.set(n,r)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panStart.set(n,r)}}_handleTouchStartDolly(e){let t=this._getSecondPointerPosition(e),n=e.pageX-t.x,r=e.pageY-t.y,i=Math.sqrt(n*n+r*r);this._dollyStart.set(0,i)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._rotateEnd.set(n,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft(M6*this._rotateDelta.x/t.clientHeight),this._rotateUp(M6*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panEnd.set(n,r)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){let t=this._getSecondPointerPosition(e),n=e.pageX-t.x,r=e.pageY-t.y,i=Math.sqrt(n*n+r*r);this._dollyEnd.set(0,i),this._dollyDelta.set(0,(this._dollyEnd.y/this._dollyStart.y)**+this.zoomSpeed),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);let a=(e.pageX+t.x)*.5,o=(e.pageY+t.y)*.5;this._updateZoomParameters(a,o)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId){this._pointers.splice(t,1);return}}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];t===void 0&&(t=new k2,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){let t=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[t]}_customWheelEvent(e){let t=e.deltaMode,n={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(t){case 1:n.deltaY*=16;break;case 2:n.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(n.deltaY*=10),n}};function A7e(e){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(e.pointerId),this.domElement.ownerDocument.addEventListener(`pointermove`,this._onPointerMove),this.domElement.ownerDocument.addEventListener(`pointerup`,this._onPointerUp)),!this._isTrackingPointer(e)&&(this._addPointer(e),e.pointerType===`touch`?this._onTouchStart(e):this._onMouseDown(e),this._cursorStyle===`grab`&&(this.domElement.style.cursor=`grabbing`)))}function j7e(e){this.enabled!==!1&&(e.pointerType===`touch`?this._onTouchMove(e):this._onMouseMove(e))}function M7e(e){switch(this._removePointer(e),this._pointers.length){case 0:this.domElement.releasePointerCapture(e.pointerId),this.domElement.ownerDocument.removeEventListener(`pointermove`,this._onPointerMove),this.domElement.ownerDocument.removeEventListener(`pointerup`,this._onPointerUp),this.dispatchEvent(E7e),this.state=N6.NONE,this._cursorStyle===`grab`&&(this.domElement.style.cursor=`grab`);break;case 1:let t=this._pointers[0],n=this._pointerPositions[t];this._onTouchStart({pointerId:t,pageX:n.x,pageY:n.y});break}}function N7e(e){let t;switch(e.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=-1}switch(t){case D0.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(e),this.state=N6.DOLLY;break;case D0.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(e),this.state=N6.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(e),this.state=N6.ROTATE}break;case D0.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(e),this.state=N6.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(e),this.state=N6.PAN}break;default:this.state=N6.NONE}this.state!==N6.NONE&&this.dispatchEvent(k6)}function P7e(e){switch(this.state){case N6.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(e);break;case N6.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(e);break;case N6.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(e);break}}function F7e(e){this.enabled===!1||this.enableZoom===!1||this.state!==N6.NONE||(e.preventDefault(),this.dispatchEvent(k6),this._handleMouseWheel(this._customWheelEvent(e)),this.dispatchEvent(E7e))}function I7e(e){this.enabled!==!1&&this._handleKeyDown(e)}function L7e(e){switch(this._trackPointer(e),this._pointers.length){case 1:switch(this.touches.ONE){case O0.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(e),this.state=N6.TOUCH_ROTATE;break;case O0.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(e),this.state=N6.TOUCH_PAN;break;default:this.state=N6.NONE}break;case 2:switch(this.touches.TWO){case O0.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(e),this.state=N6.TOUCH_DOLLY_PAN;break;case O0.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(e),this.state=N6.TOUCH_DOLLY_ROTATE;break;default:this.state=N6.NONE}break;default:this.state=N6.NONE}this.state!==N6.NONE&&this.dispatchEvent(k6)}function R7e(e){switch(this._trackPointer(e),this.state){case N6.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(e),this.update();break;case N6.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(e),this.update();break;case N6.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(e),this.update();break
4569;case N6.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(e),this.update();break;default:this.state=N6.NONE}}function z7e(e){this.enabled!==!1&&e.preventDefault()}function B7e(e){e.key===`Control`&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener(`keyup`,this._interceptControlUp,{passive:!0,capture:!0}))}function V7e(e){e.key===`Control`&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener(`keyup`,this._interceptControlUp,{passive:!0,capture:!0}))}function H7e({dwellTime:e=500,findStar:t}){let n=Y(w0),[r,i]=(0,_.useState)(null),a=(0,_.useRef)(null),o=(0,_.useRef)(null),s=(0,_.useRef)({name:`3d-view-hover`});return(0,_.useEffect)(()=>{if(!n)return;let e=()=>{let e=n.clauses??[];e.length>0&&e[0]?.value?i(t(String(e[0].value))||null):i(null)};return e(),n.addEventListener(`value`,e),()=>n.removeEventListener(`value`,e)},[n,t]),(0,_.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]),{selectedStar:r,onStarHover:(0,_.useCallback)(t=>{t.source_id!==o.current&&(a.current&&clearTimeout(a.current),o.current=t.source_id,a.current=setTimeout(()=>{n&&n.update({source:s.current,clients:new Set([]),value:t.source_id,predicate:KA(`source_id`,ak(t.source_id))})},e))},[n,e]),onStarLeave:(0,_.useCallback)(()=>{a.current&&=(clearTimeout(a.current),null),o.current=null},[])}}function U7e({sourceId:e}){let t=`https://simbad.cds.unistra.fr/simbad/sim-basic?Ident=${encodeURIComponent(`Gaia DR3 ${e}`)}`,n=`https://gaia.aip.de/gaia/viewer/${e}/`;return(0,B.jsx)(V,{position:`absolute`,bottom:2,left:2,zIndex:10,bg:`blackAlpha.700`,backdropFilter:`blur(4px)`,px:3,py:2,borderRadius:`md`,children:(0,B.jsxs)(Ch,{gap:3,fontSize:`xs`,children:[(0,B.jsxs)(U,{fontWeight:`semibold`,color:`accentSubtle`,children:[`Gaia DR3 `,e]}),(0,B.jsxs)(Eh,{href:t,target:`_blank`,rel:`noopener noreferrer`,color:`blue.300`,display:`flex`,alignItems:`center`,gap:1,_hover:{textDecoration:`underline`,color:`blue.200`},children:[`Simbad`,(0,B.jsx)(yle,{as:ig,boxSize:3})]}),(0,B.jsxs)(Eh,{href:n,target:`_blank`,rel:`noopener noreferrer`,color:`orange.300`,display:`flex`,alignItems:`center`,gap:1,_hover:{textDecoration:`underline`,color:`orange.200`},children:[`Gaia@AIP`,(0,B.jsx)(yle,{as:ig,boxSize:3})]})]})})}var F6=tk(`ux`),I6=tk(`uy`),L6=tk(`uz`),R6=tk(`r_pc`);function W7e(e){let t=Math.max(0,Math.min(1,(e+.5)/3.5));if(t<.33){let e=t/.33;return new u4(.5+.5*e,.7+.3*e,1)}else if(t<.66){let e=(t-.33)/.33;return new u4(1,1-.2*e,1-.6*e)}else{let e=(t-.66)/.34;
4569return new u4(1,.8-.5*e,.4-.3*e)}}function G7e(e){return 7+Math.max(0,Math.min(1,(15-e)/9))*20}function K7e(e){let t=document.createElement(`canvas`);t.width=128,t.height=128;let n=t.getContext(`2d`),r=n.createRadialGradient(128/2,128/2,0,128/2,128/2,128/2);r.addColorStop(0,`rgba(${e.r*255}, ${e.g*255}, ${e.b*255}, 1)`),r.addColorStop(.5,`rgba(${e.r*255}, ${e.g*255}, ${e.b*255}, 0.5)`),r.addColorStop(1,`rgba(${e.r*255}, ${e.g*255}, ${e.b*255}, 0)`),n.fillStyle=r,n.fillRect(0,0,128,128);let i=new B3e(t);return i.needsUpdate=!0,i}function q7e(e,t,n,r){let i=R4e.degToRad(e.fov),a=r/Math.tan(i/2);e.position.copy(n.clone().add(new X(0,0,a*1.35))),e.near=Math.max(.1,a*.01),e.far=a*20+r*5,e.updateProjectionMatrix(),t&&(t.target.copy(n),t.update())}function J7e(e){return Uk.from(`gaia_gal`).select({source_id:`source_id`,phot_g_mean_mag:`phot_g_mean_mag`,bp_rp:`bp_rp`,parallax:`parallax`,x_pc:ej` 4570 (avg(${R6}) OVER ()) * ( 4571 ${F6} * (CASE WHEN sqrt(pow(avg(${F6}) OVER (),2) + pow(avg(${I6}) OVER (),2)) < 1e-12 THEN 1.0 ELSE -(avg(${I6}) OVER ()) / sqrt(pow(avg(${F6}) OVER (),2) + pow(avg(${I6}) OVER (),2)) END) + 4572 ${I6} * (CASE WHEN sqrt(pow(avg(${F6}) OVER (),2) + pow(avg(${I6}) OVER (),2)) < 1e-12 THEN 0.0 ELSE (avg(${F6}) OVER ()) / sqrt(pow(avg(${F6}) OVER (),2) + pow(avg(${I6}) OVER (),2)) END) 4573 ) 4574 `,y_pc:ej` 4575 (avg(${R6}) OVER ()) * ( 4576 ${F6} * (-((avg(${L6}) OVER ()) / sqrt(pow(avg(${F6}) OVER (),2) + pow(avg(${I6}) OVER (),2) + pow(avg(${L6}) OVER (),2))) * (CASE WHEN sqrt(pow(avg(${F6}) OVER (),2) + pow(avg(${I6}) OVER (),2)) < 1e-12 THEN 0.0 ELSE (avg(${F6}) OVER ()) / sqrt(pow(avg(${F6}) OVER (),2) + pow(avg(${I6}) OVER (),2)) END)) + 4577 ${I6} * (((avg(${L6}) OVER ()) / sqrt(pow(avg(${F6}) OVER (),2) + pow(avg(${I6}) OVER (),2) + pow(avg(${L6}) OVER (),2))) * (CASE WHEN sqrt(pow(avg(${F6}) OVER (),2) + pow(avg(${I6}) OVER (),2)) < 1e-12 THEN 1.0 ELSE -(avg(${I6}) OVER ()) / sqrt(pow(avg(${F6}) OVER (),2) + pow(avg(${I6}) OVER (),2)) END)) + 4578 ${L6} * (((avg(${F6}) OVER ()) / sqrt(pow(avg(${F6}) OVER (),2) + pow(avg(${I6}) OVER (),2) + pow(avg(${L6}) OVER (),2))) * (CASE WHEN sqrt(pow(avg(${F6}) OVER (),2) + pow(avg(${I6}) OVER (),2)) < 1e-12 THEN 0.0 ELSE (avg(${F6}) OVER ()) / sqrt(pow(avg(${F6}) OVER (),2) + pow(avg(${I6}) OVER (),2)) END) - ((avg(${I6}) OVER ()) / sqrt(pow(avg(${F6}) OVER (),2) + pow(avg(${I6}) OVER (),2) + pow(avg(${L6}) OVER (),2))) * (CASE WHEN sqrt(pow(avg(${F6}) OVER (),2) + pow(avg(${I6}) OVER (),2)) < 1e-12 THEN 1.0 ELSE -(avg(${I6}) OVER ()) / sqrt(pow(avg(${F6}) OVER (),2) + pow(avg(${I6}) OVER (),2)) END)) 4579 ) 4580 `,z_pc:ej`(avg(${R6}) OVER ()) - ${R6}`}).where(e)}function Y7e(){let e=(0,_.useRef)(null),t=(0,_.useRef)(null),n=(0,_.useRef)(null),r=(0,_.useRef)(null),i=(0,_.useRef)(null),a=(0,_.useRef)(null),o=(0,_.useRef)(null),s=(0,_.useRef)(null),c=(0,_.useRef)(0),l=(0,_.useRef)(new D6e),u=(0,_.useRef)(new k2),d=(0,_.useRef)({stars:[],positions:[]}),f=(0,_.useRef)(null),p=Y(S0),m=Y(C0),[h,g]=(0,_.useState)([]),[v,y]=(0,_.useState)(!1),{selectedStar:b,onStarHover:x,onStarLeave:S}=H7e({dwellTime:700,findStar:(0,_.useCallback)(e=>d.current.stars.find(t=>t.source_id===e),[])});return(0,_.useEffect)(()=>{if(!e.current)return;let o=e.current,{clientWidth:s,clientHeight:f}=o,p=new u3e;t.current=p;let m=new Q3(60,s/f,.1,1e5);m.position.set(0,0,500),n.current=m;let h=new w7e({antialias:!0});h.setSize(s,f),h.setPixelRatio(window.devicePixelRatio),o.appendChild(h.domElement),i.current=h;let g=new k7e(m,h.domElement);g.enableDamping=!0,g.dampingFactor=.06,g.enableRotate=!1,g.mouseButtons={LEFT:D0.PAN,MIDDLE:D0.DOLLY,RIGHT:D0.PAN},r.current=g;let _=()=>{c.current=requestAnimationFrame(_),g.update(),h.render(p,m)};_();let v=()=>{let{clientWidth:e,clientHeight:t}=o;m.aspect=e/t,m.updateProjectionMatrix(),h.setSize(e,t)};window.addEventListener(`resize`,v);let y=e=>{let t=o.getBoundingClientRect();u.current.x=(e.clientX-t.left)/t.width*2-1,u.current.y=-((e.clientY-t.top)/t.height)*2+1,l.current.setFromCamera(u.current,m),l.current.params.Points={threshold:6};let n=a.current;if(!n)return;let r=l.current.intersectObject(n);if(r.length>0){let e=r[0].index;e!==void 0&&d.current.stars[e]&&x(d.current.stars[e])}else S()};return o.addEventListener(`mousemove`,y),()=>{window.removeEventListener(`resize`,v),o.removeEventListener(`mousemove`,y),cancelAnimationFrame(c.current),h.dispose(),o.contains(h.domElement)&&o.removeChild(h.domElement)}},[x,S]),(0,_.useEffect)(()=>
4580{if(!p||!m)return;let e=Zj({coordinator:p,selection:m,query:J7e,queryResult:e=>{let t=e,n=[];for(let e of t)n.push({source_id:String(e.source_id||``),parallax:e.parallax,phot_g_mean_mag:e.phot_g_mean_mag,bp_rp:e.bp_rp,x_pc:e.x_pc,y_pc:e.y_pc,z_pc:e.z_pc});g(n),y(!1)},queryPending:()=>y(!0),queryError:e=>{console.error(`[3D] Query error:`,e),y(!1)}});return()=>e.destroy()},[p,m]),(0,_.useEffect)(()=>{let e=t.current,i=n.current,c=r.current;if(!e||!i||(a.current&&=(e.remove(a.current),a.current.geometry.dispose(),a.current.material.dispose(),null),o.current&&=(e.remove(o.current),o.current.material.map?.dispose(),o.current.material.dispose(),null),s.current=null,f.current=null,d.current={stars:[],positions:[]},h.length===0))return;let l=[],u=[],p=[],m=[],g=1/0,_=1/0,v=1/0,y=-1/0,b=-1/0,x=-1/0;for(let e of h){let{x_pc:t,y_pc:n,z_pc:r}=e;g=Math.min(g,t),_=Math.min(_,n),v=Math.min(v,r),y=Math.max(y,t),b=Math.max(b,n),x=Math.max(x,r),m.push(new X(t,n,r)),l.push(t,n,r);let i=W7e(e.bp_rp);u.push(i.r,i.g,i.b),p.push(G7e(e.phot_g_mean_mag))}let S=new $4;S.setAttribute(`position`,new U4(l,3)),S.setAttribute(`color`,new U4(u,3)),S.setAttribute(`size`,new U4(p,1)),s.current=new Float32Array(p);let C=new L3e(S,new H3({uniforms:{pixelRatio:{value:window.devicePixelRatio},globalAlpha:{value:.7}},vertexShader:` 4581 attribute float size; 4582 varying vec3 vColor; 4583 uniform float pixelRatio; 4584 void main() { 4585 vColor = color; 4586 vec4 mv = modelViewMatrix * vec4(position, 1.0); 4587 float distScale = clamp(400.0 / -mv.z, 0.4, 6.0); 4588 gl_PointSize = size * pixelRatio * distScale; 4589 gl_Position = projectionMatrix * mv; 4590 } 4591 `,fragmentShader:` 4592 varying vec3 vColor; 4593 uniform float globalAlpha; 4594 void main() { 4595 vec2 p = gl_PointCoord - vec2(0.5); 4596 float r2 = dot(p, p); 4597 float core = exp(-r2 * 80.0); 4598 float halo = exp(-r2 * 18.0); 4599 float a = (0.85 * core + 0.25 * halo) * globalAlpha; 4600 if (a < 0.01) discard; 4601 gl_FragColor = vec4(vColor * (1.2 * core + 0.6 * halo), a); 4602 } 4603 `,vertexColors:!0,transparent:!0,depthWrite:!1,blending:2}));e.add(C),a.current=C,d.current={stars:h,positions:m};let w=new X((g+y)/2,(_+b)/2,(v+x)/2),T=w.distanceTo(new X(y,b,x));q7e(i,c,w,Math.max(T,1)/2)},[h]),(0,_.useEffect)(()=>{let e=t.current,n=a.current;if(!e||!n||!s.current)return;let r=n.geometry.getAttribute(`size`);if(f.current!==null&&(r.array[f.current]=s.current[f.current],f.current=null),o.current&&=(e.remove(o.current),o.current.material.map?.dispose(),o.current.material.dispose(),null),!b){r.needsUpdate=!0;return}let i=d.current.stars.findIndex(e=>e.source_id===b.source_id);if(i!==-1){r.array[i]=s.current[i]*2.5,r.needsUpdate=!0,f.current=i;let t=d.current.positions[i],n=new w3e(new b3e({map:K7e(new u4(1,.8,0)),transparent:!0,depthWrite:!1,blending:2}));n.scale.set(30,30,1),n.position.copy(t),e.add(n),o.current=n}},[b]),(0,B.jsxs)(V,{bg:`bg`,borderRadius:`lg`,p:2,overflow:`hidden`,position:`relative`,h:`100%`,display:`flex`,flexDirection:`column`,border:`1px solid`,borderColor:`gray.subtle`,children:[(0,B.jsxs)(U,{fontSize:`xs`,fontWeight:`semibold`,color:`accentSubtle`,mb:1,children:[`3D View`,(0,B.jsx)(U,{as:`span`,fontWeight:`normal`,color:`fg.muted`,ml:1,children:`⢠Drag to pan ⢠Scroll to zoom`})]}),(0,B.jsxs)(V,{ref:e,flex:`1`,h:`100%`,minH:`100px`,position:`relative`,bg:`#0a0a14`,borderRadius:`md`,overflow:`hidden`,children:[v&&(0,B.jsx)(V,{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,zIndex:10,children:(0,B.jsx)(fh,{size:`lg`,color:`blue.400`})}),b&&(0,B.jsx)(U7e,{sourceId:b.source_id})]})]})}function X7e(){Y(E0);let e=Y(x0);return e.status===`ready`?(0,B.jsxs)(V,{h:{base:`auto`,md:`100%`},overflow:`hidden`,display:`flex`,flexDirection:`column`,bg:`bg.muted`,pb:2,children:[(0,B.jsx)(vh,{maxW:`85ch`,px:4,py:4,children:(0,B.jsxs)(V,{mb:2,children:[(0,B.jsx)(Ll,{as:`h1`,size:`lg`,color:`accent`,mb:1,children:`Gaia Star Catalog Explorer`}),(0,B.jsxs)(U,{fontSize:`sm`,color:`fg.muted`,children:[`A small collection of 1 million stars with their positions, magnitudes, and other properties. This is a subset of the Gaia star catalog that contains 1 billion stars.`,` `,(0,B.jsx)(Eh,{fontSize:`sm`,color:`accent`,href:`https://gaia.aip.de/query/b9cbe033-a5bf-401e-ba85-65d6768f2444/`,target:`_blank`,children:`View the full catalog`})]})]})}),(0,B.jsxs)(V,{flex:1,px:4,overflow:{base:`auto`,md:`hidden`},display:`flex`,flexDirection:{base:`column`,md:`row`},gap:4,children:[(0,B.jsxs)(V,{flex:1,minW:0,display:`flex`,flexDirection:`column`,gap:4,children:[(0,B.jsx)(V,{aspectRatio:{md:`4/3`},children:(0,B.jsx)(x2e,{})}),(0,B.jsx)(V,{flex:{md:1},children:(0,B.jsx)(S2e,{})})]}),(0,B.jsx)(V,{flex:2,minW:0,h:{base:`85vh`,md:`auto`},borderRadius:`md`,overflow:`hidden`,children:(0,B.jsx)(Y7e,{})})]})]}):(0,B.jsx)(r0,{state:e,title:`Loading Star Catalog`})}function Z7e(){return(0,B.jsx)(gg,{children:(0,B.jsx)(nX,{children:(0,B.jsx)(X7e,{})})})}function z6({children:e,...t}){return(0,B.jsx)(V,{bg:`bg`,borderRadius:`lg`,p:2,border:`1px solid`,borderColor:`gray.subtle`,h:`100%`,dis
4603play:`flex`,flexDirection:`column`,...t,children:e})}var B6={attention:[{value:`entropy`,label:`Entropy`,description:`Attention distribution entropy`,interpretation:`High = diffuse attention across many tokens, Low = focused on few tokens`,formula:`-Σ p·log(p)`,colorScheme:`viridis`,useNormalized:!1},{value:`top1_mass`,label:`Top-1 Mass`,description:`Weight on most-attended position`,interpretation:`High = single token dominates attention, Low = attention spread out`,formula:`max(attention)`,colorScheme:`viridis`,useNormalized:!1},{value:`topk_mass`,label:`Top-K Mass`,description:`Weight on top-10 positions`,interpretation:`High = attention concentrated on few tokens`,formula:`Σ top-10 weights`,colorScheme:`viridis`,useNormalized:!1},{value:`diagonal_mass`,label:`Diagonal Mass`,description:`Self-attention weight`,interpretation:`High = token attends to itself`,formula:`attention[i,i]`,colorScheme:`viridis`,useNormalized:!1},{value:`band_mass`,label:`Band Mass`,description:`Local attention (±2 positions)`,interpretation:`High = local/positional attention pattern`,formula:`Σ attention[i-2:i+3]`,colorScheme:`viridis`,useNormalized:!1},{value:`score_sharpness`,label:`Score Sharpness`,description:`Pre-softmax score variance`,interpretation:`High = confident attention decisions`,formula:`var(scores)`,colorScheme:`viridis`,useNormalized:!1}],contribution:[{value:`contrib_l2`,label:`Contribution L2`,description:`L2 norm of head output`,interpretation:`Magnitude of head's contribution to residual stream`,formula:`||head_output||â`,colorScheme:`blues`,useNormalized:!1},{value:`contrib_to_argmax_logit`,label:`Contribution to Argmax`,description:`Dot product with argmax token`,interpretation:`Positive = pushes toward predicted token, Negative = pushes away`,formula:`head_output · W_U[argmax]`,colorScheme:`rdbu`,useNormalized:!1},{value:`contrib_to_argmax_logit_normed`,label:`Contribution (Normed)`,description:`Normalized contribution`,interpretation:`Direction-only contribution, normalized by magnitudes`,formula:`cosine(head_output, W_U[argmax])`,colorScheme:`rdbu`,useNormalized:!1}],hidden:[{value:`hidden_norm`,label:`Hidden Norm`,description:`L2 norm of hidden state`,interpretation:`Magnitude of representation - tends to grow through layers`,formula:`||hidden||â`,colorScheme:`greens`,useNormalized:!0},{value:`cosine_similarity_prev_layer`,label:`Cosine Similarity`,description:`Similarity to previous layer`,interpretation:`High = small change from prev layer, Low = significant transformation`,formula:`cos(h_l, h_{l-1})`,colorScheme:`oranges`,useNormalized:!1}],mlp:[{value:`l2_norm`,label:`L2 Norm`,description:`L2 norm of activation vector`,interpretation:`Overall activation magnitude at this stage`,formula:`||activations||â`,colorScheme:`inferno`,useNormalized:!0},{value:`sparsity`,label:`Sparsity`,description:`Fraction of activations > 0`,interpretation:`How many neurons are active (after SiLU gating)`,formula:`mean(x > 0)`,colorScheme:`purples`,useNormalized:!1},{value:`max_activation`,label:`Max Activation`,description:`Maximum activation value`,interpretation:`Peak neuron activity - may indicate feature detection`,formula:`max(activations)`,colorScheme:`reds`,useNormalized:!0},{value:`mean_activation`,label:`Mean Activation`,description:`Mean activation value`,interpretation:`Average neuron activity level`,formula:`mean(activations)`,colorScheme:`oranges`,useNormalized:!0},{value:`topk_energy`,label:`Top-K Energy`,description:`Energy concentration in top-10`,interpretation:`High = few neurons dominate, Low = distributed activity`,formula:`Σ top-10² / Σ all²`,colorScheme:`ylgnbu`,useNormalized:!1}],mlpNeurons:[{value:`mlp_topk`,label:`Top-K Neurons`,description:`50 most active MLP neurons per token`,interpretation:`Shows which neurons fire most strongly. X-axis ordered by activation magnitude.`,formula:`top-50 by |activation|`,colorScheme:`plasma`,useNormalized:!0}],hiddenTrajectory:[{value:`hidden_topk`,label:`Hidden Trajectory`,description:`50 most variable hidden dimensions across layers`,interpretation:`Shows how token representations change. X-axis ordered by cross-layer variance.`,formula:`top-50 by var(dim)`,colorScheme:`cividis`,useNormalized:!0}],layernorm:[{value:`norm_mean`,label:`Norm Mean`,description:`Pre-norm mean`,interpretation:`Mean of activations before normalization`,formula:`mean(x)`,colorScheme:`piyg`,useNormalized:!0},{value:`norm_variance`,label:`Norm Variance`,description:`Pre-norm variance`,interpretation:`Spread of activations before normalization`,formula:`var(x)`,colorScheme:`rdylbu`,useNormalized:!0}]},Q7e=[...B6.attention,...B6.contribution,...B6.hidden,...B6.mlp,...B6.mlpNeurons,...B6.hiddenTrajectory,...B6.layernorm];function V6(e){return Q7e.find(t=>t.value===e)}function H6(e){return B6.attention.some(t=>t.value===e)?`attention`:B6.contribution.some(t=>t.value===e)?`contribution`:B6.hidden.some(t=>t.value===e)?`hidden`:B6.mlp.some(t=>t.value===e)?`mlp`:B6.mlpNeurons.some(t=>t.value===e)?`mlpNeurons`:B6.hiddenTrajectory.some(t=>t.value===e)?`hiddenTrajectory`:B6.layernorm.some(t=>t.value===e)?`layernorm`:null}function U6(e){let t=H6(e);return t===`attention`||t===`contribution`}var $7e={tokens:null,layers:null,heads:null},W6={count:0,mean:0,max:0,min:0,std:0},G6={activationSnapshot:`activation_snapshot.parquet`,hiddenStates:`hidden_states.parquet`,attentionPatterns:`attention_patterns.parquet`,attentionScores:`attention_scores.parquet`,attnHeadMetrics:`attn_head_metrics.parquet`,mlpMetrics:`mlp_metrics.parquet`,hiddenMetrics:`hidden_metrics.parquet`,headContribMetrics:`head_contrib_metrics.parquet`,mlpTopk:`mlp_topk.parquet`,hiddenTopk:`hidden_topk.parquet`};function K6(e){if(!e||typeof e.numRows!=`number`)return[];let t=[];for(let n=0;n<e.numRows;n++){let r=e.get(n),i={};for(let t of e.schema.fields)i[t.name]=r[t.name];t.push(i)}return t}var q6=J({status:`idle`}),J6=J(null),Y6=J(36),e9e=J(16);J(4);
4603var t9e=J([]),X6=J(null),Z6=J([]),Q6=J(`entropy`);J(null),J(null);var n9e=J(null),r9e=J(null),$6=J($7e),i9e=J(null),a9e=J(null),o9e=J(null),e8=J(null),t8=J(null),n8=J(null),r8=J([]),i8=J(e=>e(q6).status===`ready`);J(e=>{let t=e($6);return!!(t.tokens||t.layers||t.heads)}),J(null,(e,t)=>{t($6,$7e),t(n8,null),t(r8,[]),e(i9e)?.update?.({source:null,clauses:[]})});var s9e=J(null,async(e,t)=>{if(!e(J6))try{t(q6,{status:`initializing`});let e=XL({duckdb:await i0()}),n=new Xj(e,{cache:!1,preagg:{enabled:!1}});Yj(n).databaseConnector(e),t(J6,n),t(i9e,rM.crossfilter()),t(a9e,rM.single()),t(o9e,rM.single());let r=`${window.location.origin}${window.location.pathname.replace(/\/$/,``)}/data/llm`;t(q6,{status:`loading-parquet`,message:`Transformer activation data`}),await n.exec(`INSTALL httpfs; LOAD httpfs;`),await n.exec(`SET threads = 1;`),await n.exec(`SET memory_limit = '4GB';`);let i=[{name:`attn_head_metrics`,file:G6.attnHeadMetrics},{name:`mlp_metrics`,file:G6.mlpMetrics},{name:`hidden_metrics`,file:G6.hiddenMetrics},{name:`head_contrib_metrics`,file:G6.headContribMetrics},{name:`activation_snapshot`,file:G6.activationSnapshot},{name:`hidden_states`,file:G6.hiddenStates},{name:`attention_patterns`,file:G6.attentionPatterns},{name:`mlp_topk`,file:G6.mlpTopk},{name:`hidden_topk`,file:G6.hiddenTopk}];for(let{name:e,file:a}of i){let i=`CREATE TABLE IF NOT EXISTS ${e} AS SELECT * FROM '${r}/${a}'`;t(q6,{status:`creating-tables`,table:e}),await n.exec(i)}try{let e=`CREATE TABLE IF NOT EXISTS attention_scores AS SELECT * FROM '${r}/${G6.attentionScores}'`;t(q6,{status:`creating-tables`,table:`attention_scores`}),await n.exec(e)}catch{console.warn(`attention_scores.parquet not found (optional)`),await n.exec(`CREATE TABLE IF NOT EXISTS attention_scores AS SELECT CAST(NULL AS INTEGER) as prompt_id WHERE FALSE`)}try{let e=`SELECT MAX(layer) as num_layers FROM (SELECT layer FROM hidden_metrics UNION SELECT layer FROM attn_head_metrics) WHERE layer IS NOT NULL`;t(q6,{status:`updating-tables`,message:`Deriving model configuration`,query:e});let r=K6(await n.query(e));if(r.length>0&&r[0].num_layers!==null){let e=Number(r[0].num_layers);e>0&&t(Y6,e)}}catch(e){console.warn(`Could not derive numLayers from data, using default (36):`,e)}let a=`SELECT DISTINCT prompt_id, prompt_text FROM activation_snapshot WHERE prompt_id IS NOT NULL AND prompt_text IS NOT NULL ORDER BY prompt_id`;t(q6,{status:`updating-tables`,message:`Extracting available prompts`,query:a});let o=K6(await n.query(a)).map(e=>({prompt_id:Number(e.prompt_id),prompt_text:String(e.prompt_text||``)}));t(t9e,o),o.length>0&&t(X6,o[0].prompt_id);let s=`CREATE VIEW IF NOT EXISTS tokens AS SELECT prompt_id, position, token_id, token_text, is_input, log_prob FROM activation_snapshot WHERE type = 'token'`;t(q6,{status:`updating-tables`,message:`Creating tokens view`,query:s}),await n.exec(s);let c=o.length>0?o[0].prompt_id:null;c!==null&&t(Z6,K6(await n.query(` 4604 SELECT * FROM activation_snapshot 4605 WHERE type = 'token' AND prompt_id = ${c} 4606 ORDER BY position 4607 `)).map(e=>({position:Number(e.position),token_id:Number(e.token_id),token_text:String(e.token_text||``),is_input:!!e.is_input,log_prob:e.log_prob===null?null:Number(e.log_prob)}))),t(q6,{status:`ready`})}catch(e){console.error(`Failed to initialize Transformer context:`,e),t(q6,{status:`error`,message:e instanceof Error?e.message:`Unknown error loading transformer data`})}});s9e.onMount=e=>{e()};var c9e=J(null,async(e,t)=>{let n=e(J6),r=e(X6);if(!(!n||r===null))try{t(Z6,K6(await n.query(` 4608 SELECT * FROM activation_snapshot 4609 WHERE type = 'token' AND prompt_id = ${r} 4610 ORDER BY position 4611 `)).map(e=>({position:Number(e.position),token_id:Number(e.token_id),token_text:String(e.token_text||``),is_input:!!e.is_input,log_prob:e.log_prob===null?null:Number(e.log_prob)})))}catch(e){console.error(`Failed to update prompt tokens:`,e)}}),l9e=J(null,async(e,t)=>{let n=e(J6),r=e(X6),i=e(Q6),a=e($6);if(!n||r===null){t(n8,null),t(r8,[]);return}if(!(a.tokens||a.layers||a.heads)){t(n8,null),t(r8,[]);return}let o=H6(i);if(!o){t(n8,null),t(r8,[]);return}try{let e=`WHERE prompt_id = ${r}`;a.tokens&&(e+=` AND position >= ${a.tokens[0]} AND position <= ${a.tokens[1]}`),a.layers&&(e+=` AND layer >= ${a.layers[0]} AND layer <= ${a.layers[1]}`),a.heads&&U6(i)&&(e+=` AND head >= ${a.heads[0]} AND head <= ${a.heads[1]}`);let s=``,c=i;if(o===`attention`?s=`attn_head_metrics`:o===`contribution`?s=`head_contrib_metrics`:o===`hidden`?s=`hidden_metrics`:o===`mlp`?s=`mlp_metrics`:o===`mlpNeurons`?(s=`mlp_topk`,c=`value`):o===`hiddenTrajectory`?(s=`hidden_topk`,c=`value`):o===`layernorm`&&(s=`activation_snapshot`,c=i===`norm_mean`?`mean`:`variance`,e+=` AND type = 'norm'`),!s){t(n8,null),t(r8,[]);return}let l=` 4612 SELECT 4613 COUNT(*) as count, 4614 AVG(${c}) as mean, 4615 MAX(${c}) as max, 4616 MIN(${c}) as min, 4617 STDDEV(${c}) as std 4618 FROM ${s} 4619 ${e} 4620 `,u=K6(await n.query(l)),d=u.length>0?{count:Number(u[0].count)||0,mean:Number(u[0].mean)||0,max:Number(u[0].max)||0,min:Number(u[0].min)||0,std:Number(u[0].std)||0}:W6,f=` 4621 SELECT 4622 m.layer, 4623 m.position, 4624 ${U6(i)?`head`:`NULL as head`}, 4625 t.token_text, 4626 m.${c} as value 4627 FROM ${s} m 4628 JOIN tokens t ON m.prompt_id = t.prompt_id AND m.position = t.position 4629 ${e.replace(`prompt_id`,`m.prompt_id`)} 4630 ORDER BY m.${c} DESC 4631 LIMIT 10 4632 `,p=K6(await n.query(f)).map(e=>({layer:Number(e.layer),position:Number(e.position),head:e.head===null?null:Number(e.head),tokenText:String(e.token_text||``),value:Number(e.value)}));t(n8,d),t(r8,p)}catch(e){console.error(`refreshSelectionStats error:`,e)}});function a8(e){let t=H6(e),n=``,r=e,i=``;if(t===`attention`)n=`attn_head_metrics`;else if(t===`contribution`)n=`head_contrib_metrics`;else if(t===`hidden`)n=`hidden_metrics`;else if(t===`mlp`)n=`mlp_metrics`;else if(t===`mlpNeurons`)n=`mlp_topk`,r=`value`;else if(t===`hiddenTrajectory`)n=`hidden_topk`,r=`value`;else if(t===`layernorm`)n=`activation_snapshot`,r=e===`norm_mean`?`mean`:`variance`,i=` AND type = 'norm'`;else return null;return{tableName:n,metricColumn:r,extraWhere:i}}var u9e=J(null,async(e,t)=>{let n=e(J6),r=e(X6),i=e(Q6);if(!n||r===null){t(t8,null);return}let a=a8(i);if(!a){t(t8,null);return}try{let e=` 4633 SELECT layer, position, AVG(${a.metricColumn}) as value 4634 FROM ${a.tableName} 4635 WHERE prompt_id = ${r}${a.extraWhere} 4636 GROUP BY layer, position 4637 ORDER BY layer, position 4638 `,i=K6(await n.query(e)),o=new Map;for(let e of i){let t=Number(e.layer);o.has(t)||o.set(t,[]),o.get(t).push(Number(e.value))}t(t8,o)}catch(e){console.error(`Failed to query layer metrics:`,e),t(t8,null)}}),d9e=J(null,async(e,t)=>{let n=e(J6),r=e(X6),i=e(Q6);if(!n||r===null){t(e8,null);return}let a=a8(i);if(!a){t(e8,null);return}try{let e=` 4639 SELECT position, layer, AVG(${a.metricColumn}) as value 4640 FROM ${a.tableName} 4641 WHERE prompt_id = ${r}${a.extraWhere} 4642 GROUP BY position, layer 4643 ORDER BY position, layer 4644 `,i=K6(await n.query(e)),o=new Map;for(let e of i){let t=Number(e.position);o.has(t)||o.set(t,[]),o.get(t).push(Number(e.value))}t(e8,o)}catch(e){console.error(`Failed to query token metrics:`,e),t(e8,null)}});async function f9e(e,t,n){let r=H6(n);if(!r)return console.warn(`Unknown metric: ${n}`),[];try{let i=``;return r===`attention`?i=` 4645 SELECT 4646 '(' || LPAD(CAST(a.position AS VARCHAR), 3, '0') || ') ' || t.token_text as token_label, 4647 a.position, a.layer, a.head, a.${n} as value 4648 FROM attn_head_metrics a 4649 JOIN tokens t ON a.prompt_id = t.prompt_id AND a.position = t.position 4650 WHERE a.prompt_id = ${t} 4651 ORDER BY position, layer, head 4652 `:r===`contribution`?i=` 4653 SELECT 4654 '(' || LPAD(CAST(h.position AS VARCHAR), 3, '0') || ') ' || t.token_text as token_label, 4655 h.position, h.layer, h.head, h.${n} as value 4656 FROM head_contrib_metrics h 4657 JOIN tokens t ON h.prompt_id = t.prompt_id AND h.position = t.position 4658 WHERE h.prompt_id = ${t} 4659 ORDER BY position, layer, head 4660 `:r===`hidden`?i=` 4661 SELECT 4662 '(' || LPAD(CAST(hm.position AS VARCHAR), 3, '0') || ') ' || t.token_text as token_label, 4663 hm.position, hm.layer, 0 as head, hm.${n} as value 4664 FROM hidden_metrics hm 4665 JOIN tokens t ON hm.prompt_id = t.prompt_id AND hm.position = t.position 4666 WHERE hm.prompt_id = ${t} 4667 ORDER BY position, layer 4668 `:r===`mlp`?i=` 4669 SELECT 4670 '(' || LPAD(CAST(m.position AS VARCHAR), 3, '0') || ') ' || t.token_text as token_label, 4671 m.position, m.layer, 0 as head, m.stage, m.${n} as value 4672 FROM mlp_metrics m 4673 JOIN tokens t ON m.prompt_id = t.prompt_id AND m.position = t.position 4674 WHERE m.prompt_id = ${t} 4675 ORDER BY position, layer, stage 4676 `:r===`layernorm`&&(i=` 4677 SELECT 4678 '(' || LPAD(CAST(a.position AS VARCHAR), 3, '0') || ') ' || t.token_text as token_label, 4679 a.position, a.layer, 0 as head, a.${n===`norm_mean`?`mean`:`variance`} as value 4680 FROM activation_snapshot a 4681 JOIN tokens t ON a.prompt_id = t.prompt_id AND a.position = t.position 4682 WHERE a.prompt_id = ${t} AND a.type = 'norm' 4683 ORDER BY position, layer 4684 `),K6(await e.query(i)).map(e=>({position:Number(e.position),layer:Number(e.layer),head:Number(e.head),value:Number(e.value),token_label:String(e.token_label)}))}catch(e){return console.error(`queryFacetedHeatmapData error:`,e),[]}}async function p9e(e,t,n,r){let i=H6(r);if(!i)return[];try{let a=``,o=r;return i===`attention`?a=`SELECT layer, AVG(${o}) as value FROM attn_head_metrics WHERE prompt_id = ${t} AND position = ${n} GROUP BY layer ORDER BY layer`:i===`contribution`?a=`SELECT layer, AVG(${o}) as value FROM head_contrib_metrics WHERE prompt_id = ${t} AND position = ${n} GROUP BY layer ORDER BY layer`:i===`hidden`?a=`SELECT layer, ${o} as value FROM hidden_metrics WHERE prompt_id = ${t} AND position = ${n} ORDER BY layer`:i===`mlp`?a=`SELECT layer, AVG(${o}) as value FROM mlp_metrics WHERE prompt_id = ${t} AND position = ${n} GROUP BY layer ORDER BY layer`:i===`mlpNeurons`?a=`SELECT layer, AVG(value) as value FROM mlp_topk WHERE prompt_id = ${t} AND position = ${n} GROUP BY layer ORDER BY layer`:i===`hiddenTrajectory`?a=`SELECT layer, AVG(value) as value FROM hidden_topk WHERE prompt_id = ${t} AND position = ${n} GROUP BY layer ORDER BY layer`:i===`layernorm`&&(o=r===`norm_mean`?`mean`:`variance`,a=`SELECT layer, AVG(${o}) as value FROM activation_snapshot WHERE prompt_id = ${t} AND position = ${n} AND type = 'norm' GROUP BY layer ORDER BY layer`),a?K6(await e.query(a)).map(e=>Number(e.value)||0):[]}catch(e){return console.error(`queryTokenAcrossLayers error:`,e),[]}}async function m9e(e,t,n,r){if(!H6(r))return{stats:W6,headBreakdown:[],topTokens:[]};try{let i=a8(r);if(!i)return{stats:W6,headBreakdown:[],topTokens:[]};let{tableName:a,metricColumn:o,extraWhere:s}=i,c=` 4685 SELECT COUNT(*) as count, AVG(${o}) as mean, MAX(${o}) as max, 4686 MIN(${o}) as min, STDDEV(${o}) as std 4687 FROM ${a} 4688 WHERE prompt_id = ${t} AND layer = ${n}${s} 4689 `,l=K6(await e.query(c)),u=l.length>0?{count:Number(l[0].count)||0,mean:Number(l[0].mean)||0,max:Number(l[0].max)||0,min:Number(l[0].min)||0,std:Number(l[0].std)||0}:W6,d=[];if(U6(r)){let r=` 4690 SELECT head, AVG(${o}) as value 4691 FROM ${a} 4692 WHERE prompt_id = ${t} AND layer = ${n} 4693 GROUP BY head ORDER BY head 4694 `;d=K6(await e.query(r)).map(e=>Number(e.value)||0)}let f=` 4695 SELECT t.token_text, AVG(m.${o}) as value 4696 FROM ${a} m 4697 JOIN tokens t ON m.prompt_id = t.prompt_id AND m.position = t.position 4698 WHERE m.prompt_id = ${t} AND m.layer = ${n}${s} 4699 GROUP BY t.token_text 4700 ORDER BY value DESC 4701 LIMIT 50 4702 `,p=K6(await e.query(f)).map(e=>({tokenText:String(e.token_text||``),value:Number(e.value)||0}));return{stats:u,headBreakdown:d,topTokens:p}}catch(e){return console.error(`queryLayerAcrossTokens error:`,e),{stats:W6,headBreakdown:[],topTokens:[]}}}var h9e=`'(' || lpad(CAST({alias}
4702.position AS VARCHAR), 2, '0') || ') ' || t.token_text`;function g9e(e,t,n){return`${e}_heatmap_${t}_${n.replace(/[^a-z0-9]/gi,`_`)}`}function _9e(e,t){if(t===`mlpNeurons`||t===`hiddenTrajectory`)return`value`;if(t===`layernorm`){if(e===`norm_mean`)return`mean`;if(e===`norm_variance`)return`variance`}return V6(e)?.useNormalized&&!e.endsWith(`_norm`)?`${e}_norm`:e}function v9e(e){return`JOIN tokens t ON ${e}.prompt_id = t.prompt_id AND ${e}.position = t.position`}function y9e(e){let{viewName:t,tableName:n,tableAlias:r,promptId:i,metricColumn:a,extraColumns:o=[],whereClause:s=``}=e,c=[`${h9e.replace(`{alias}`,r)} as token_label`,`${r}.position`,`${r}.layer`,...o,`${r}.${a} as value`,`t.token_text`],l=s?`WHERE ${r}.prompt_id = ${i} ${s}`:`WHERE ${r}.prompt_id = ${i}`;return` 4703 CREATE OR REPLACE TEMP VIEW ${t} AS 4704 SELECT 4705 ${c.join(`, 4706 `)} 4707 FROM ${n} ${r} 4708 ${v9e(r)} 4709 ${l} 4710 `}async function b9e(e,t){let n=g9e(t.tableName,t.promptId,t.metricColumn);try{let r=y9e({...t,viewName:n});return await e.exec(r),{viewName:n}}catch(e){return console.error(`Error creating ${t.tableName} heatmap view:`,e),null}}function x9e(e,t){switch(e){case`attention`:return{tableName:`attn_head_metrics`,metricColumn:t,extraWhere:``,needsAvg:!0};case`contribution`:return{tableName:`head_contrib_metrics`,metricColumn:t,extraWhere:``,needsAvg:!0};case`hidden`:return{tableName:`hidden_metrics`,metricColumn:t,extraWhere:``,needsAvg:!1};case`mlp`:return{tableName:`mlp_metrics`,metricColumn:t,extraWhere:``,needsAvg:!0};case`mlpNeurons`:return{tableName:`mlp_topk`,metricColumn:`value`,extraWhere:``,needsAvg:!0};case`hiddenTrajectory`:return{tableName:`hidden_topk`,metricColumn:`value`,extraWhere:``,needsAvg:!0};case`layernorm`:return{tableName:`activation_snapshot`,metricColumn:t===`norm_mean`?`mean`:`variance`,extraWhere:` AND type = 'norm'`,needsAvg:!0}}}function S9e(e,t,n,r){let i=H6(r);if(!i)return null;let{tableName:a,metricColumn:o,extraWhere:s,needsAvg:c}=x9e(i,r);return` 4711 CREATE OR REPLACE TEMP VIEW ${e} AS 4712 SELECT layer, ${c?`AVG(${o})`:o} as value 4713 FROM ${a} 4714 WHERE prompt_id = ${t} AND position = ${n}${s} 4715 ${c?`GROUP BY layer`:``} 4716 ORDER BY layer 4717 `}function C9e(e,t,n,r){let i=H6(r);if(i!==`attention`&&i!==`contribution`)return null;let{tableName:a,metricColumn:o}=x9e(i,r);return` 4718 CREATE OR REPLACE TEMP VIEW ${e} AS 4719 SELECT head, AVG(${o}) as value 4720 FROM ${a} 4721 WHERE prompt_id = ${t} AND layer = ${n} 4722 GROUP BY head 4723 ORDER BY head 4724 `}var w9e={attention:{tableName:`attn_head_metrics`,tableAlias:`a`,extraColumns:[`a.head`],xField:`head`,title:`Attention Patterns`,subtitleTemplate:`{metric} | Head x Token per Layer`,colorScheme:{light:`YlGnBu`,dark:`magma`},useFullSize:!0},contribution:{tableName:`head_contrib_metrics`,tableAlias:`h`,extraColumns:[`h.head`],xField:`head`,title:`Head Contributions`,subtitleTemplate:`{metric} | Head x Token per Layer`,colorScheme:{light:`blues`,dark:`magma`},useFullSize:!0},hidden:{tableName:`hidden_metrics`,tableAlias:`h`,extraColumns:[],xField:`layer`,title:`Hidden State Metrics`,subtitleTemplate:`{metric} | Layer x Token`,colorScheme:{light:`greens`,dark:`magma`},useFullSize:!0},mlp:{tableName:`mlp_metrics`,tableAlias:`m`,extraColumns:[`m.stage`],xField:`stage`,title:`MLP Metrics`,subtitleTemplate:`{metric} | Stage x Token per Layer`,colorScheme:{light:`oranges`,dark:`magma`},useFullSize:!0},mlpNeurons:{tableName:`mlp_topk`,tableAlias:`m`,extraColumns:[`m.neuron_rank`,`m.neuron_id`],xField:`neuron_rank`,title:`MLP Top-K Neurons`,subtitleTemplate:`{metric} | Neuron Rank x Token per Layer`,colorScheme:{light:`YlGnBu`,dark:`magma`},useFullSize:!0},hiddenTrajectory:{tableName:`hidden_topk`,tableAlias:`h`,extraColumns:[`h.dim_rank`,`h.dim_id`],xField:`dim_rank`,title:`Hidden Trajectory`,subtitleTemplate:`{metric} | Dimension Rank x Token per Layer`,colorScheme:{light:`YlGnBu`,dark:`magma`},useFullSize:!0},layernorm:{tableName:`activation_snapshot`,tableAlias:`a`,extraColumns:[`a.norm_type`],xField:`norm_type`,whereClause:`AND a.type = 'norm'`,title:`Layer Normalization`,subtitleTemplate:`{metric} | Norm Type x Token per Layer`,colorScheme:{light:`YlGnBu`,dark:`magma`},useFullSize:!0}},T9e={faceted:{marginLeft:150,marginRight:10,marginTop:5,marginBottom:40},compact:{marginLeft:150,marginRight:20,marginTop:5,marginBottom:25}},E9e={inset:.01};
4724function D9e(e){let{colorScheme:t,width:n,height:r,margins:i=T9e.faceted,xLabel:a=null,yLabel:o=null,fxLabel:s=null,hideXTicks:c=!0}=e,l=[vY(t),fY(a),_Y(o),IGe(s),iY(n),aY(r),oY(i.marginLeft),sY(i.marginRight),cY(i.marginTop),lY(i.marginBottom),FGe(.01)];return c&&l.push(dY(null)),l}function O9e(){let e=Y(i8),t=Y(J6),n=Y(X6),r=Y(Q6),i=Y(Z6),a=H6(r),o=w9e[a],s=V6(r),c=ug(o.colorScheme.light,o.colorScheme.dark),l=(0,_.useCallback)(async()=>{if(!t||n===null||!r||!a)return null;let e=_9e(r,a);return await b9e(t,{tableName:o.tableName,tableAlias:o.tableAlias,promptId:n,metricColumn:e,extraColumns:o.extraColumns,whereClause:o.whereClause})},[t,n,r,a,o]),u=(0,_.useCallback)((e,{width:t,height:n})=>{if(!e)return null;let{viewName:r}=e,i={token:`token_text`,pos:`position`,metric:`value`,layer:`layer`};o.xField!==`layer`&&(o.xField===`head`?i.head=`head`:o.xField===`stage`?i.stage=`stage`:o.xField===`neuron_rank`?i.neuron=`neuron_id`:o.xField===`dim_rank`?i.dim=`dim_id`:o.xField===`norm_type`&&(i.norm=`norm_type`));let s=window.innerWidth<768?1.6:1.2;return MY(HGe(bY(r),{fx:a===`hidden`?null:`layer`,x:a===`hidden`?`layer`:o.xField,y:`token_label`,fill:`value`,...E9e,channels:i,tip:{format:{token:!0,pos:!0,metric:!0,layer:!0,head:o.xField===`head`,stage:o.xField===`stage`,neuron:o.xField===`neuron_rank`,dim:o.xField===`dim_rank`,norm:o.xField===`norm_type`,x:!1,y:!1,fx:!1,fill:!1}}}),...D9e({colorScheme:c,width:s*t,height:s*n,margins:T9e.faceted,xLabel:a===`hidden`?`layer`:o.xField,yLabel:`Token`,fxLabel:a===`hidden`?null:`layer`}))},[c,o,a]),d=o.subtitleTemplate.replace(`{metric}`,s?.label||r);return!r||!a?null:(0,B.jsx)(p0,{title:o.title,subtitle:d,setup:l,build:u,dependencies:[r,n,i.length],isReady:e,containerCss:{overflowX:`auto`,overflowY:`hidden`}})}function k9e(){let e=Y(J6),t=Y(X6),n=sX(l9e);return{queryFacetedHeatmapData:(0,_.useCallback)(n=>e&&t!==null?f9e(e,t,n):Promise.resolve([]),[e,t]),queryTokenAcrossLayers:(0,_.useCallback)((n,r)=>e&&t!==null?p9e(e,t,n,r):Promise.resolve([]),[e,t]),queryLayerAcrossTokens:(0,_.useCallback)((n,r)=>e&&t!==null?m9e(e,t,n,r):Promise.resolve({stats:{count:0,mean:0,max:0,min:0,std:0},headBreakdown:[],topTokens:[]}),[e,t]),refreshSelectionStats:(0,_.useCallback)(()=>n(),[n])}}function o8(e){return e==null||isNaN(e)?`-`:Math.abs(e)>=1e3||Math.abs(e)<.001&&e!==0?e.toExponential(2):e.toFixed(3)}function A9e(e,t){return e===-1?`Embed`:t&&e===t?`Final`:`Layer ${e}`}function j9e({layer:e}){let t=Y(Q6),n=Y(J6),r=Y(e9e),i=Y(X6),{queryLayerAcrossTokens:a}=k9e(),[o,s]=(0,_.useState)(null),[c,l]=(0,_.useState)([]),u=(0,_.useRef)(null),d=V6(t),f=U6(t);return(0,_.useEffect)(()=>{if(a(e,t).then(e=>{s(e.stats),l(e.topTokens)}),!f||!n||i===null)return;let r=`layer_detail_${e}`,o=C9e(r,i,e,t);o&&n.exec(o).then(()=>{let e=MY(SY(bY(r),{y:`head`,x:`value`,fill:`steelblue`,tip:!0}),iY(500),aY(400),cY(5),oY(50),lY(50));u.current&&(u.current.innerHTML=``,u.current.appendChild(e))})},[e,t,a,n,f,i]),(0,B.jsxs)(z6,{h:`100%`,children:[(0,B.jsx)(U,{fontSize:`xs`,fontWeight:`semibold`,color:`accentSubtle`,mb:2,children:`Layer Details`}),(0,B.jsxs)(U,{fontSize:`xs`,color:`fg.muted`,mb:2,children:[A9e(e,36),(0,B.jsxs)(U,{as:`span`,fontWeight:`normal`,children:[` ⢠Metric: `,d?.label||t]})]}),(0,B.jsxs)(Gh,{align:`stretch`,gap:2,flex:1,children:[o&&(0,B.jsxs)(V,{children:[(0,B.jsx)(U,{fontSize:`xs`,color:`fg.muted`,mb:1,children:`Statistics`}),(0,B.jsxs)(Gh,{gap:.5,align:`stretch`,fontSize:`xs`,children:[(0,B.jsxs)(Ch,{justify:`space-between`,children:[(0,B.jsx)(U,{color:`fg.muted`,children:`Mean`}),(0,B.jsx)(U,{fontFamily:`mono`,children:o8(o.mean)})]}),(0,B.jsxs)(Ch,{justify:`space-between`,children:[(0,B.jsx)(U,{color:`fg.muted`,children:`Std`}),(0,B.jsx)(U,{fontFamily:`mono`,children:o8(o.std)})]}),(0,B.jsxs)(Ch,{justify:`space-between`,children:[(0,B.jsx)(U,{color:`fg.muted`,children:`Max`}),(0,B.jsx)(U,{fontFamily:`mono`,children:o8(o.max)})]})]})]}),f&&(0,B.jsxs)(V,{w:`100%`,children:[(0,B.jsxs)(U,{fontSize:`xs`,color:`fg.muted`,mb:1,children:[`By Head (all `,r,`)`]}),(0,B.jsx)(V,{ref:u,w:`100%`})]}),c.length>0&&(0,B.jsxs)(V,{children:[(0,B.jsx)(U,{fontSize:`xs`,color:`fg.muted`,mb:1,children:`Top Tokens`}),(0,B.jsx)(Gh,{gap:.5,align:`stretch`,fontSize:`xs`,children:c.slice(0,20).map((e,t)=>(0,B.jsxs)(Ch,{justify:`space-between`,children:[(0,B.jsx)(U,{truncate:!0,maxW:`140px`,children:e.tokenText}),(0,B.jsx)(U,{fontFamily:`mono`,children:o8(e.value)})]},t))})]})]})]})}var M9e=_.forwardRef(function(e,t){let{showArrow:n,children:r,disabled:i,portalled:a=!0,content:o,contentProps:s,portalRef:c,...l}=e;return i?r:(0,B.jsxs)(_ue,{...l,children:[(0,B.jsx)(vue,{asChild:!0,children:r}),(0,B.jsx)(mp,{disabled:!a,container:c,children:(0,B.jsx)(yue,{children:(0,B.jsxs)(bue,{ref:t,...s,children:[n&&(0,B.jsx)(Sue,{children:(0,B.jsx)(xue,{})}),o]})})})]})});function N9e(e){if(!e||e.length===0)return{mean:0,std:0,max:0,min:0};let t=e.reduce((e,t)=>
4724e+t,0)/e.length,n=e.reduce((e,n)=>e+(n-t)**2,0)/e.length;return{mean:t,std:Math.sqrt(n),max:Math.max(...e),min:Math.min(...e)}}function P9e({data:e,width:t=50,height:n=10,vertical:r=!1}){if(!e||e.length===0)return null;let i=Math.max(...e),a=Math.min(...e),o=i-a||1,s=(r?t:n)/e.length;return(0,B.jsx)(`svg`,{width:t,height:n,style:{display:`block`},children:e.map((e,i)=>{let c=(e-a)/o;if(r){let e=c*n;return(0,B.jsx)(`rect`,{x:i*s,y:n-e,width:Math.max(s-.5,1),height:e,fill:`currentColor`,opacity:`0.6`},i)}else{let e=c*t;return(0,B.jsx)(`rect`,{x:0,y:i*s,width:e,height:Math.max(s-.5,1),fill:`currentColor`,opacity:`0.6`},i)}})})}function F9e(){let e=Y(Y6),t=Y(o9e),n=Y(t8),r=sX(r9e),[i,a]=(0,_.useState)(null),o=(0,_.useMemo)(()=>Array.from({length:e},(e,t)=>({idx:t,label:`${t}`})),[e]);return(0,B.jsxs)(z6,{children:[(0,B.jsxs)(U,{fontSize:`xs`,fontWeight:`semibold`,color:`accentSubtle`,mb:2,children:[`Layers (`,e,`)`,(0,B.jsxs)(U,{as:`span`,fontWeight:`normal`,color:`fg.muted`,ml:1,children:[`⢠`,`Select a layer to see metrics breakdown`]})]}),(0,B.jsx)(Ch,{gap:0,overflowX:`auto`,children:o.map(({idx:e,label:o})=>{let s=i===e,c=n?.get(e),l=N9e(c);return(0,B.jsx)(M9e,{content:(0,B.jsxs)(Gh,{gap:0,align:`start`,fontSize:`xs`,children:[(0,B.jsx)(U,{fontWeight:`semibold`,children:o}),(0,B.jsxs)(U,{children:[`Mean: `,l.mean.toFixed(3)]}),(0,B.jsxs)(U,{children:[`Max: `,l.max.toFixed(3)]}),(0,B.jsxs)(U,{children:[`Min: `,l.min.toFixed(3)]})]}),positioning:{placement:`bottom`},children:(0,B.jsxs)(Gh,{gap:.5,px:1,py:.5,cursor:`pointer`,onClick:()=>{if(!t)return;let n=i===e?null:e;a(n),r(n),n===null?t.update({value:[]}):t.update({value:[{layer:n}]})},bg:s?`gray.subtle`:`transparent`,_hover:{bg:`gray.subtle`},borderRadius:`sm`,minW:`40px`,align:`center`,transition:`all 0.1s`,children:[(0,B.jsx)(U,{fontSize:`xs`,color:s?`accent`:`fg`,fontWeight:s?`semibold`:`normal`,children:o}),(0,B.jsx)(V,{color:s?`accent`:`fg.muted`,children:(0,B.jsx)(P9e,{data:c,width:32,height:10,vertical:!0})})]})},e)})})]})}function I9e({position:e}){let t=Y(Z6),n=Y(Q6),r=Y(J6),i=Y(X6),a=(0,_.useRef)(null),o=t.find(t=>t.position===e),s=V6(n);return(0,_.useEffect)(()=>{if(!a.current||!r||i===null)return;let t=`token_detail_${e}`,o=S9e(t,i,e,n);o&&r.exec(o).then(()=>{let e=MY(CY(bY(t),{x:`layer`,y:`value`,fill:`steelblue`,tip:!0}),iY(500),aY(200),oY(20),sY(10),lY(50),PGe(e=>e%5==0?String(e):``),NGe(0));a.current&&(a.current.innerHTML=``,a.current.appendChild(e))})},[e,n,r,i]),(0,B.jsxs)(z6,{children:[(0,B.jsx)(U,{fontSize:`xs`,fontWeight:`semibold`,color:`accentSubtle`,mb:2,children:`Token Details`}),(0,B.jsxs)(Gh,{align:`stretch`,gap:1,flex:1,overflow:`auto`,children:[(0,B.jsxs)(Ch,{justify:`space-between`,fontSize:`xs`,children:[(0,B.jsxs)(U,{color:`fg.muted`,children:[`Token `,e]}),(0,B.jsx)(U,{fontFamily:`mono`,children:o?.token_text})]}),o?.log_prob!==null&&o?.log_prob!==void 0&&(0,B.jsxs)(Ch,{justify:`space-between`,fontSize:`xs`,children:[(0,B.jsx)(U,{color:`fg.muted`,children:`Log Prob`}),(0,B.jsx)(U,{fontFamily:`mono`,children:o8(o.log_prob)})]}),(0,B.jsxs)(V,{w:`100%`,children:[(0,B.jsxs)(U,{fontSize:`xs`,color:`fg.muted`,mb:2,children:[s?.label||n,` Across Layers`]}),(0,B.jsx)(V,{ref:a,w:`100%`})]})]})]})}function L9e(){let e=Y(Z6),t=Y(a9e),n=Y(e8),r=sX(n9e),[i,a]=(0,_.useState)(null);return(0,B.jsxs)(V,{bg:`bg`,borderRadius:`lg`,p:2,border:`1px solid`,borderColor:`gray.subtle`,h:`100%`,display:`flex`,flexDirection:`column`,children:[(0,B.jsxs)(U,{fontSize:`xs`,fontWeight:`semibold`,color:`accentSubtle`,mb:2,children:[`Tokens`,(0,B.jsxs)(U,{as:`span`,ml:1,children:[`(`,e.length,`)`]}),(0,B.jsxs)(U,{as:`span`,fontWeight:`normal`,color:`fg.muted`,ml:1,children:[`⢠`,`Select a token`]})]}),(0,B.jsx)(V,{flex:1,overflowY:{base:`hidden`,md:`auto`},overflowX:{base:`auto`,md:`hidden`},children:(0,B.jsx)(V,{display:`flex`,flexDirection:{base:`row`,md:`column`},gap:0,alignItems:{base:`stretch`,md:`stretch`},children:e.map(e=>{let o=i===e.position,s=n?.get(e.position),c=N9e(s);return(0,B.jsx)(M9e,{content:(0,B.jsxs)(Gh,{gap:0,align:`start`,fontSize:`xs`,children:[(0,B.jsx)(U,{fontWeight:`semibold`,children:e.token_text}),(0,B.jsxs)(U,{children:[`Position: (`,e.position.toString().padStart(2,`0`),`)`]}),(0,B.jsxs)(U,{children:[`Type: `,e.is_input?`Input`:`Generated`]}),(0,B.jsxs)(U,{children:[`Mean: `,c.mean.toFixed(3)]}),(0,B.jsxs)(U,{children:[`Max: `,c.max.toFixed(3)]})]}),positioning:{placement:`bottom`},children:(0,B.jsxs)(V,{display:`flex`,flexDirection:{base:`column`,md:`row`},alignItems:`center`,justifyContent:`flex-end`,gap:2,px:1,py:{base:.5,md:1},cursor:`pointer`,onClick:()=>
4724{if(!t)return;let n=i===e.position?null:e.position;a(n),r(n),n===null?t.update({value:[]}):t.update({value:[{position:n}]})},bg:o?`gray.subtle`:`transparent`,_hover:{bg:`gray.subtle`},borderRadius:`sm`,transition:`all 0.1s`,children:[(0,B.jsxs)(U,{fontSize:`xs`,truncate:!0,color:o?`accent`:`fg`,fontWeight:o?`semibold`:`normal`,w:{base:`auto`,md:`140px`},children:[(0,B.jsxs)(U,{as:`span`,display:{base:`none`,md:`inline`},children:[`(`,e.position.toString().padStart(2,`0`),`)`,` `]}),e.token_text]}),(0,B.jsx)(V,{flex:{md:1},color:o?`accent`:`fg.muted`,children:(0,B.jsx)(P9e,{data:s,width:40,height:12,vertical:!0})})]})},e.position)})})})]})}function R9e(){let e=Y(X6),t=Y(i8),n=sX(c9e);return(0,_.useEffect)(()=>{!t||e===null||n()},[e,t,n]),null}function z9e(){let e=Y(X6),t=Y(Q6),n=Y(i8),r=sX(u9e),i=sX(d9e);return(0,_.useEffect)(()=>{n&&(r(),i())},[e,t,n,r,i]),null}function B9e(){let e=sX(l9e);return(0,_.useEffect)(()=>{e()},[Y(X6),Y(Q6),Y($6),e]),null}function V9e(){Y(s9e);let e=Y(q6),t=Y(Y6),n=Y(e9e),r=Y(t9e),[i,a]=cX(X6),[o,s]=cX(Q6),c=Y(Z6),l=Y(n9e),u=Y(r9e),d=l!==null,f=u!==null,p=V6(o),m=(0,_.useMemo)(()=>c.filter(e=>!e.is_input).map(e=>e.token_text).join(``),[c]);return e.status===`ready`?(0,B.jsxs)(V,{h:{base:`auto`,md:`100%`},overflow:{base:`scroll`,md:`hidden`},display:`flex`,flexDirection:`column`,bg:`bg.muted`,pb:2,children:[(0,B.jsxs)(vh,{maxW:`90ch`,px:4,py:4,children:[(0,B.jsxs)(xh,{mb:2,gap:1,align:`end`,flexWrap:`wrap`,children:[(0,B.jsx)(Ll,{as:`h1`,size:`lg`,color:`accent`,children:`Transformer Activations`}),(0,B.jsxs)(U,{fontSize:`sm`,color:`gray.fg`,children:[`⢠`,`SmolLM3-3B `,t,` layers, `,n,` heads`]})]}),(0,B.jsxs)(Gh,{gap:2,align:`stretch`,fontSize:`xs`,children:[r.length>0&&(0,B.jsxs)(Ch,{gap:2,align:`center`,children:[(0,B.jsx)(U,{color:`fg.muted`,flexShrink:0,w:`60px`,children:`Prompt:`}),(0,B.jsxs)(Ah,{size:`xs`,variant:`outline`,children:[(0,B.jsx)(jh,{value:i??``,onChange:e=>a(Number(e.target.value)),fontSize:`xs`,children:r.map(e=>(0,B.jsx)(`option`,{value:e.prompt_id,children:e.prompt_text},e.prompt_id))}),(0,B.jsx)(Mh,{})]})]}),m&&(0,B.jsxs)(Ch,{gap:2,align:`center`,display:{base:`none`,md:`flex`},children:[(0,B.jsx)(U,{color:`fg.muted`,flexShrink:0,w:`60px`,children:`Response:`}),(0,B.jsx)(U,{fontSize:`xs`,color:`fg`,truncate:!0,children:m})]}),(0,B.jsxs)(Ch,{gap:2,flexWrap:`wrap`,children:[(0,B.jsxs)(Ch,{gap:2,align:`center`,children:[(0,B.jsx)(U,{color:`fg.muted`,flexShrink:0,w:`60px`,children:`Metric:`}),(0,B.jsxs)(Ah,{size:`xs`,variant:`outline`,children:[(0,B.jsxs)(jh,{value:o,onChange:e=>s(e.target.value),children:[(0,B.jsx)(`optgroup`,{label:`Attention`,children:B6.attention.map(e=>(0,B.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,B.jsx)(`optgroup`,{label:`Contribution`,children:B6.contribution.map(e=>(0,B.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,B.jsx)(`optgroup`,{label:`Hidden State`,children:B6.hidden.map(e=>(0,B.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,B.jsx)(`optgroup`,{label:`MLP Metrics`,children:B6.mlp.map(e=>(0,B.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,B.jsx)(`optgroup`,{label:`MLP Neurons`,children:B6.mlpNeurons.map(e=>(0,B.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,B.jsx)(`optgroup`,{label:`Hidden Trajectory`,children:B6.hiddenTrajectory.map(e=>(0,B.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,B.jsx)(`optgroup`,{label:`Layer Norm`,children:B6.layernorm.map(e=>(0,B.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),(0,B.jsx)(Mh,{})]})]}),p&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(U,{color:`fg`,display:{base:`none`,md:`flex`},children:p.description}),(0,B.jsx)(U,{color:`fg.muted`,display:{base:`none`,md:`flex`},children:p.interpretation})]})]})]})]}),(0,B.jsxs)(V,{flex:1,px:4,pb:2,overflow:{base:`auto`,md:`hidden`},display:`flex`,flexDirection:{base:`column`,md:`row`},gap:2,minH:0,children:[(0,B.jsx)(V,{w:{base:`100%`,md:`200px`},flexShrink:0,minH:0,children:(0,B.jsx)(L9e,{})}),(0,B.jsxs)(V,{flex:1,minW:0,display:`flex`,flexDirection:`column`,h:{base:`60vh`,md:`auto`},minH:0,children:[(0,B.jsx)(V,{flexShrink:0,mb:2,children:(0,B.jsx)(F9e,{})}),(0,B.jsx)(V,{flex:1,minH:{base:`50vh`,md:0},children:(0,B.jsx)(O9e,{})})]}),(0,B.jsxs)(V,{w:{base:`100%`,md:`300px`},flexShrink:0,overflow:`auto`,minH:0,display:{base:d||f?`block`:`none`,md:`block`},children:[d&&(0,B.jsx)(V,{mb:2,children:(0,B.jsx)(I9e,{position:l})}),f&&(0,B.jsx)(V,{children:(0,B.jsx)(j9e,{layer:u})}),!d&&!f&&(0,B.jsx)(z6,{children:(0,B.jsx)(U,{fontSize:`xs`,color:`fg.muted`,textAlign:`center`,my:`auto`,children:`Select a token or layer to view details`})})]})]})]}):(0,B.jsx)(r0,{state:e,title:`Loading Transformer Activation Signals`})}function H9e(){return(0,B.jsx)(gg,{children:(0,B.jsxs)(nX,{children:[(0,B.jsx)(R9e,{}),(0,B.jsx)(z9e,{}),(0,B.jsx)(B9e,{}),(0,B.jsx)(V9e,{})]})})}function U9e(e,t){return J(e,function(e,n,r){n(this,t(e(this),r))})}var W9e=e=>typeof e?.then==`function`;function G9e(e=()=>{try{return window.localStorage}catch{return}},t){let n,r,i={getItem:(i,a)=>{let o=e=>{if(e||=``,n!==e){try{r=JSON.parse(e,t?.reviver)}catch{return a}n=e}return r},s=e()?.getItem(i)??null;return W9e(s)?s.then(o):o(s)},setItem:(n,r)=>e()?.setItem(n,JSON.stringify(r,t?.replacer)),removeItem:t=>e()?.removeItem(t)},a=e=>(t,n,r)=>e(t,e=>{let t;try{t=JSON.parse(e||``)}catch{t=r}n(t)}),o;try{o=e()?.subscribe}catch{}return!o&&typeof window<`u`&&typeof window.addEventListener==`function`&&window.Storage&&(o=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};let r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener(`storage`,r),()=>{window.removeEventListener(`storage`,r)}}),o&&(i.subscribe=a(o)),i}G9e();var s8=`https://latent-insights-service-production.up.railway.app/
4724api`,K9e=`https://github.com/karthikbadam/latent-insights-service`,q9e=.55,J9e=[`#8b9bb0`,`#a5b894`,`#b8a682`,`#a692b0`,`#b09285`,`#82a8b0`,`#b8a28a`,`#95a58b`,`#a8959e`,`#9faa85`,`#8ba5a8`,`#b097a8`,`#9da890`,`#b0957a`,`#8a95a5`,`#a895a8`],Y9e=[`#55687d`,`#6b8056`,`#846e4a`,`#6f5a75`,`#7a5e52`,`#4e7580`,`#826e54`,`#5c6e52`,`#755d63`,`#6f794e`,`#567073`,`#7a6478`,`#66755a`,`#7a6045`,`#5a6573`,`#735e72`],X9e={SCOPE:{fg:`#e0d2ff`,bg:`#3a3055`},FORAGE:{fg:`#bad5ff`,bg:`#2a4668`},FRAME:{fg:`#b9f0ff`,bg:`#234c5c`},INTERROGATE:{fg:`#ffe0a8`,bg:`#564018`},SYNTHESIZE:{fg:`#c5f49d`,bg:`#31582b`},ERROR:{fg:`#fcc1c8`,bg:`#693945`},HUMAN_INPUT:{fg:`#fbd5e3`,bg:`#5a2238`},WAITING_FOR_HUMAN:{fg:`#d0d0d0`,bg:`#3a3a3a`},START:{fg:`#b6de8a`,bg:`#1f3520`},DONE:{fg:`#b6de8a`,bg:`#1f3520`},STUCK:{fg:`#f6909c`,bg:`#3d1e26`},UNKNOWN:{fg:`#cccccc`,bg:`#555555`}},Z9e={SCOPE:{fg:`#3d1855`,bg:`#c8aee0`},FORAGE:{fg:`#0d2545`,bg:`#a8c4eb`},FRAME:{fg:`#093450`,bg:`#a5d2dc`},INTERROGATE:{fg:`#3a2306`,bg:`#e6c785`},SYNTHESIZE:{fg:`#163818`,bg:`#b3cb9b`},ERROR:{fg:`#561624`,bg:`#e3a3b4`},HUMAN_INPUT:{fg:`#5a1f33`,bg:`#ecb0c8`},WAITING_FOR_HUMAN:{fg:`#2d2d2d`,bg:`#cccccc`},START:{fg:`#254820`,bg:`#d8ecce`},DONE:{fg:`#254820`,bg:`#d8ecce`},STUCK:{fg:`#651b27`,bg:`#daa6b2`},UNKNOWN:{fg:`#2d2d2d`,bg:`#cfcfcf`}},Q9e=Z9e,$9e={fg:`#bbbbbb`,bg:`#3a3a3a`},eet={fg:`#555555`,bg:`#d8d8d8`},tet=[{value:`scout`,label:`Auto (scout)`},{value:`human`,label:`Manual`},{value:`both`,label:`Both`}],net=[{id:`planets`,dataset:`planets.csv`,description:`6 threads · 36 steps`},{id:`stars`,dataset:`stars.csv`,description:`10 threads · 84 steps`},{id:`cars`,dataset:`cars.csv`,description:`8 threads · 49 steps`}],ret={status:`idle`,mode:null,meta:null,feedEntries:[],selectedNode:null,error:null};function iet(e,t){switch(t.type){case`LOAD_START`:return{...e,status:`loading`,error:null};case`LOAD_DONE`:return{...e,status:`ready`,mode:t.mode,meta:t.meta,feedEntries:t.entries,error:null,selectedNode:null};case`LOAD_ERROR`:return{...e,status:`error`,error:t.error};case`APPEND_FEED_ENTRY`:{let n=e.feedEntries.findIndex(e=>e.id===t.entry.id);if(n>=0){let r=e.feedEntries.slice();return r[n]={...r[n],...t.entry},{...e,feedEntries:r}}return{...e,feedEntries:[...e.feedEntries,t.entry]}}case`SCOUT_QUESTIONS`:return{...e,meta:e.meta?{...e.meta,scout_questions:t.questions}:e.meta};case`SELECT_NODE`:return{...e,selectedNode:t.node};case`RESET`:return ret;default:return e}}var c8=U9e(ret,iet),aet=J(e=>e(c8).meta),oet=J(e=>e(c8).feedEntries),l8=J(null),set=J(e=>e(c8).feedEntries.map((e,t)=>({i:t,ts:e.timestamp,fi:e.feed_index})).sort((e,t)=>e.ts-t.ts||e.fi-t.fi).map(e=>e.i)),u8=J(e=>{let t=e(c8).feedEntries,n=e(l8);if(n===null)return t;let r=e(set),i=Math.min(n,t.length),a=new Set(r.slice(0,i));return t.filter((e,t)=>a.has(t))});J(e=>e(c8).selectedNode);var cet=J(e=>e(c8).feedEntries.find(e=>e.event_type===`schema_summary_ready`)?.schema_summary_markdown??null),d8=J(null),f8=J(null,(e,t)=>{let n=e(d8);n&&(n.es&&n.es.close(),n.reconnectTimer&&clearTimeout(n.reconnectTimer),t(d8,null))}),uet=[`schema_summary_ready`,`thread_start`,`thread_resumed`,`step_start`,`llm_call`,`tool_call`,`step_complete`,`human_message`,`thread_complete`,`thread_waiting`,`scout_done`,`feed_entry`,`message`],det=J(null,(e,t,n)=>{t(f8);let r={es:null,reconnectTimer:null},i=1e3,a=()=>{let e=new EventSource(`${s8}/sessions/${n}/events`);r.es=e;let o=e=>{try{let n=JSON.parse(e.data);if(n&&n.event_type===`scout_done`&&Array.isArray(n.questions)){t(c8,{type:`SCOUT_QUESTIONS`,questions:n.questions});return}n&&n.event_type&&n.id!==void 0&&(t(c8,{type:`APPEND_FEED_ENTRY`,entry:n}),i=1e3)}catch{}};for(let t of uet)e.addEventListener(t,o);e.onerror=()=>{e.close(),r.es=null,r.reconnectTimer=setTimeout(a,i),i=Math.min(i*2,3e4)}};a(),t(d8,r)});async function fet(e,t,n){let[r,i]=await Promise.all([fetch(t),fetch(n)]);if(!r.ok)throw Error(`Session not found (${r.status})`);if(!i.ok)throw Error(`Feed not found (${i.status})`);let a=await r.json(),o=await i.json();return{meta:{id:a.id??e,dataset_path:a.dataset_path??null,created_at:a.created_at??null,scout_questions:a.scout_questions??null},entries:o}}function pet(e,t){let n=t.find(e=>e.event_type===`schema_summary_ready`),r=t.find(e=>e.event_type===`scout_done`),i=0;for(let e of t)e.timestamp&&(i===0||e.timestamp<i)&&(i=e.timestamp);return{id:e,dataset_path:n?.dataset_path??null,created_at:i?new Date(i*1e3).toISOString():null,
4724scout_questions:r?.scout_questions??null}}var met=J(null,async(e,t,n)=>{t(f8),t(l8,null),t(c8,{type:`LOAD_START`});try{let e=await fetch(`/data/latent-insights/${n}.feed.json`);if(!e.ok)throw Error(`Feed not found (${e.status})`);let r=await e.json();t(c8,{type:`LOAD_DONE`,meta:pet(n,r),entries:r,mode:`saved`})}catch(e){t(c8,{type:`LOAD_ERROR`,error:e instanceof Error?e.message:`Unknown error`})}}),het=J(null,async(e,t,n)=>{t(f8),t(l8,null),t(c8,{type:`LOAD_START`});try{let{meta:e,entries:r}=await fet(n,`${s8}/sessions/${n}`,`${s8}/sessions/${n}/feed`);t(c8,{type:`LOAD_DONE`,meta:e,entries:r,mode:`live`}),t(det,n)}catch(e){t(c8,{type:`LOAD_ERROR`,error:e instanceof Error?e.message:`Unknown error`})}}),get=J(null,async(e,t,n)=>{t(f8);try{let e=new FormData;if(e.append(`file`,n.file),n.config){let t={question_source:n.config.question_source,seed_threads:n.config.seed_threads};n.config.scout_context&&(t.scout_context=n.config.scout_context),n.config.initial_questions&&n.config.initial_questions.length>0&&(t.initial_questions=n.config.initial_questions),e.append(`config`,JSON.stringify(t))}let r=await fetch(`${s8}/sessions`,{method:`POST`,body:e});if(!r.ok)throw Error(`Upload failed: ${r.status}`);let i=await r.json();return t(c8,{type:`RESET`}),i.id??i.session_id??null}catch(e){return t(c8,{type:`LOAD_ERROR`,error:e instanceof Error?e.message:`Unknown error`}),null}}),_et=J(null,async(e,t,n)=>{let r=await fetch(`${s8}/threads/${n.threadId}/messages`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({content:n.content})});if(!r.ok)throw Error(`Reply failed: ${r.status}`)}),vet=J(null,async(e,t,n)=>{let r=await fetch(`${s8}/sessions/${n.sessionId}/threads`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({question:n.question,motivation:n.motivation})});if(!r.ok)throw Error(`Create thread failed: ${r.status}`)}),yet=J(null,async(e,t,n)=>{let r=await fetch(`${s8}/sessions/${n.sessionId}/messages`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({content:n.content})});if(!r.ok)throw Error(`Broadcast failed: ${r.status}`)}),bet=J(null,async(e,t,n)=>{let r=await fetch(`${s8}/sessions/${n}/continue`,{method:`POST`});if(!r.ok)throw Error(`Continue failed: ${r.status}`)}),xet=J(null,(e,t,n)=>{t(c8,{type:`SELECT_NODE`,node:n})});J(null,(e,t)=>{t(f8),t(c8,{type:`RESET`})});function Cet(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var wet=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Tet=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Eet={};function Det(e,t){return((t||Eet).jsx?Tet:wet).test(e)}var Oet=/[ \t\n\f\r]/g;function ket(e){return typeof e==`object`?e.type===`text`?Aet(e.value):!1:Aet(e)}function Aet(e){return e.replace(Oet,``)===``}var p8=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};p8.prototype.normal={},p8.prototype.property={},p8.prototype.space=void 0;function jet(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new p8(n,r,t)}function m8(e){return e.toLowerCase()}var h8=class{constructor(e,t){this.attribute=t,this.property=e}};h8.prototype.attribute=``,h8.prototype.booleanish=!1,h8.prototype.boolean=!1,h8.prototype.commaOrSpaceSeparated=!1,h8.prototype.commaSeparated=!1,h8.prototype.defined=!1,h8.prototype.mustUseProperty=!1,h8.prototype.number=!1,h8.prototype.overloadedBoolean=!1,h8.prototype.property=``,h8.prototype.spaceSeparated=!1,h8.prototype.space=void 0;var g8=s({boolean:()=>_8,booleanish:()=>v8,commaOrSpaceSeparated:()=>S8,commaSeparated:()=>x8,number:()=>Q,overloadedBoolean:()=>y8,spaceSeparated:()=>b8}),Met=0,_8=C8(),v8=C8(),y8=C8(),Q=C8(),b8=C8(),x8=C8(),S8=C8();function C8(){return 2**++Met}var w8=Object.keys(g8),T8=class extends h8{constructor(e,t,n,r){let i=-1;if(super(e,t),Net(this,`space`,r),typeof n==`number`)for(;++i<w8.length;){let e=w8[i];Net(this,w8[i],(n&g8[e])===g8[e])}}};T8.prototype.defined=!0;function Net(e,t,n){n&&(e[t]=n)}function E8(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new T8(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[m8(r)]=r,n[m8(a.attribute)]=r}return new p8(t,n,e.space)}var Pet=E8({properties:{ariaActiveDescendant:null,ariaAtomic:v8,ariaAutoComplete:null,ariaBusy:v8,ariaChecked:v8,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControl
vendor: 4,112 bytes, line 4724
4724s:b8,ariaCurrent:null,ariaDescribedBy:b8,ariaDetails:null,ariaDisabled:v8,ariaDropEffect:b8,ariaErrorMessage:null,ariaExpanded:v8,ariaFlowTo:b8,ariaGrabbed:v8,ariaHasPopup:null,ariaHidden:v8,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:b8,ariaLevel:Q,ariaLive:null,ariaModal:v8,ariaMultiLine:v8,ariaMultiSelectable:v8,ariaOrientation:null,ariaOwns:b8,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:v8,ariaReadOnly:v8,ariaRelevant:null,ariaRequired:v8,ariaRoleDescription:b8,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:v8,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Fet(e,t){return t in e?e[t]:t}function Iet(e,t){return Fet(e,t.toLowerCase())}var Let=E8({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:x8,acceptCharset:b8,accessKey:b8,action:null,allow:null,allowFullScreen:_8,allowPaymentRequest:_8,allowUserMedia:_8,alpha:_8,alt:null,as:null,async:_8,autoCapitalize:null,autoComplete:b8,autoFocus:_8,autoPlay:_8,blocking:b8,capture:null,charSet:null,checked:_8,cite:null,className:b8,closedBy:null,colorSpace:null,cols:Q,colSpan:Q,command:null,commandFor:null,content:null,contentEditable:v8,controls:_8,controlsList:b8,coords:Q|x8,crossOrigin:null,data:null,dateTime:null,decoding:null,default:_8,defer:_8,dir:null,dirName:null,disabled:_8,download:y8,draggable:v8,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:_8,formTarget:null,headers:b8,height:Q,hidden:y8,high:Q,href:null,hrefLang:null,htmlFor:b8,httpEquiv:b8,id:null,imageSizes:null,imageSrcSet:null,inert:_8,inputMode:null,integrity:null,is:null,isMap:_8,itemId:null,itemProp:b8,itemRef:b8,itemScope:_8,itemType:b8,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:_8,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:_8,muted:_8,name:null,nonce:null,noModule:_8,noValidate:_8,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:_8,optimum:Q,pattern:null,ping:b8,placeholder:null,playsInline:_8,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:_8,referrerPolicy:null,rel:b8,required:_8,reversed:_8,rows:Q,rowSpan:Q,sandbox:b8,scope:null,scoped:_8,seamless:_8,selected:_8,shadowRootClonable:_8,shadowRootCustomElementRegistry:_8,shadowRootDelegatesFocus:_8,shadowRootMode:null,shadowRootSerializable:_8,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:v8,src:null,
4724srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:_8,useMap:null,value:v8,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:b8,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:_8,declare:_8,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:_8,noHref:_8,noShade:_8,noWrap:_8,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:v8,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:_8,disablePictureInPicture:_8,disableRemotePlayback:_8,exportParts:x8,part:b8,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:Iet}),Ret=E8({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode
4724-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:S8,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:b8,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:_8,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:x8,g2:x8,glyphName:x8,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:S8,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:b8,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:S8,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:S8,rev:S8,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:S8,requiredFeatures:S8,requiredFonts:S8,requiredFormats:S8,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,
vendor: 17,996 bytes, lines 4724-4725
4724scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:S8,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:S8,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:S8,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Fet}),zet=E8({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Bet=E8({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Iet}),Vet=E8({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Het={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Uet=/[A-Z]/g,Wet=/-[a-z]/g,Get=/^data[-\w.:]+$/i;function Ket(e,t){let n=m8(t),r=t,i=h8;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Get.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Wet,Jet);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Wet.test(e)){let n=e.replace(Uet,qet);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=T8}return new i(r,t)}function qet(e){return`-`+e.toLowerCase()}function Jet(e){return e.charAt(1).toUpperCase()}var Yet=jet([Pet,Let,zet,Bet,Vet],`html`),D8=jet([Pet,Ret,zet,Bet,Vet],`svg`);function Xet(e){return e.join(` `).trim()}var Zet=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=` 4725`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Qet=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(Zet());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),$et=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),ett=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Qet()),r=$et();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),ttt=ntt(`end`),O8=ntt(`start`);function ntt(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function rtt(e){let t=O8(e),n=ttt(e);if(t&&n)return{start:t,end:n}}function k8(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?itt(e.position):`start`in e||`end`in e?itt(e):`line`in e||`column`in e?A8(e):``}function A8(e){return att(e&&e.line)+`:`+att(e&&e.column)}function itt(e){return A8(e&&e.start)+`-`+A8(e&&e.end)}function att(e){return e&&typeof e==`number`?e:1}var j8=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=k8(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};j8.prototype.file=``,j8.prototype.name=``,j8.prototype.reason=``,j8.prototype.message=``,j8.prototype.stack=``,j8.prototype.column=void 0,j8.prototype.line=void 0,j8.prototype.ancestors=void 0,j8.prototype.cause=void 0,j8.prototype.fatal=void 0,j8.prototype.place=void 0,j8.prototype.ruleId=void 0,j8.prototype.source=void 0;var ott=l(ett(),1),M8={}.hasOwnProperty,stt=new Map,ctt=/[A-Z]/g,ltt=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),utt=new Set([`td`,`th`]);function dtt(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=xtt(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=btt(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?D8:Yet,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ftt(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ftt(e,t,n){if(t.type===`element`)return ptt(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return mtt(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return gtt(e,t,n);if(t.type===`mdxjsEsm`)return htt(e,t);if(t.type===`root`)return _tt(e,t,n);if(t.type===`text`)return vtt(e,t)}function ptt(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=D8,e.schema=i),e.ancestors.push(t);let a=Ett(e,t.tagName,!1),o=Stt(e,t),s=P8(e,t);return ltt.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!ket(e):!0})),ytt(e,o,a,t),N8(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function mtt(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}F8(e,t.position)}function htt(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);F8(e,t.position)}function gtt(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=D8,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Ett(e,t.name,!0),o=Ctt(e,t),s=P8(e,t);return ytt(e,o,a,t),N8(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function _tt(e,t,n){let r={};return N8(r,P8(e,t)),e.create(t,e.Fragment,r,n)}function vtt(e,t){return t.value}function ytt(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function N8(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function btt(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function xtt(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=O8(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Stt(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&M8.call(t.properties,i)){let a=wtt(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&utt.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Ctt(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else F8(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else F8(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function P8(e,t){let n=[],r=-1,i=e.passKeys?new Map:stt;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=ftt(e,a,o);s!==void 0&&n.push(s)}return n}function wtt(e,t,n){let r=Ket(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Cet(n):Xet(n)),r.property===`style`){let t=typeof n==`object`?n:Ttt(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Dtt(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Het[r.property]||r.property:r.attribute,n]}}function Ttt(e,t){try{return(0,ott.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new j8("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute`,r}}function Ett(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Det(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Det(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return M8.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);F8(e)}function F8(e,t){let n=new j8("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater`,n}function Dtt(e){let t={},n;for(n in e)M8.call(e,n)&&(t[Ott(n)]=e[n]);return t}function Ott(e){let t=e.replace(ctt,ktt);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function ktt(e){return`-`+e.toLowerCase()}var I8={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Att={};function L8(e,t){let n=t||Att;return jtt(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function jtt(e,t,n){if(Ntt(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Mtt(e.children,t,n)}return Array.isArray(e)?Mtt(e,t,n):``}function Mtt(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=jtt(e[i],t,n);return r.join(``)}function Ntt(e){return!!(e&&typeof e==`object`)}var Ptt=document.createElement(`i`);function R8(e){let t=`&`+e+`;`;Ptt.innerHTML=t;let n=Ptt.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function z8(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function B8(e,t){return e.length>0?(z8(e,e.length,0,t),e):t}var Ftt={}.hasOwnProperty;function Itt(e){let t={},n=-1;for(;++n<e.length;)Ltt(t,e[n]);return t}function Ltt(e,t){let n;for(n in t){let r=(Ftt.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Ftt.call(r,a)||(r[a]=[]);let e=i[a];Rtt(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Rtt(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);z8(e,0,0,r)}function ztt(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function V8(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var H8=Z8(/[A-Za-z]/),U8=Z8(/[\dA-Za-z]/),Btt=Z8(/[#-'*+\--9=?A-Z^-~]/);function W8(e){return e!==null&&(e<32||e===127)}var G8=Z8(/\d/),Vtt=Z8(/[\dA-Fa-f]/),Htt=Z8(/[!-/:-@[-`{-~]/);function K8(e){return e!==null&&e<-2}function q8(e){return e!==null&&(e<0||e===32)}function J8(e){return e===-2||e===-1||e===32}var Y8=Z8(/\p{P}|\p{S}/u),X8=Z8(/\s/);function Z8(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Q8(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&U8(e.charCodeAt(n+1))&&U8(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function $8(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return J8(r)?(e.enter(n),s(r)):t(r)}function s(r){return J8(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Utt={tokenize:Wtt};function Wtt(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$8(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return K8(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Gtt={tokenize:qtt},Ktt={tokenize:Jtt};function qtt(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return z8(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ktt,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m
vendor: 5,119 bytes, line 4725
4725(e)}function f(n){return t.containerState={},e.attempt(Ktt,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return K8(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;z8(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Jtt(e,t,n){return $8(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function e5(e){if(e===null||q8(e)||X8(e))return 1;if(Y8(e))return 2}function t5(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var n5={name:`attention`,resolveAll:Ytt,tokenize:Xtt};function Ytt(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Ztt(d,-c),Ztt(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=B8(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=B8(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=B8(l,t5(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=B8(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=B8(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,z8(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Xtt(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=e5(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=e5(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Ztt(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Qtt={name:`autolink`,tokenize:$tt};function $tt(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return H8(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||U8(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||U8(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||W8(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Btt(t)?(e.consume(t),l):n(t)}function u(e){return U8(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||U8(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var r5={partial:!0,tokenize:ent};function ent(e,t,n){return r;function r(t){return J8(t)?$8(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||K8(e)?t(e):n(e)}}var tnt={continuation:{tokenize:rnt},exit:int,name:`blockQuote`,tokenize:nnt};function nnt(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}
vendor: 20,820 bytes, line 4725
4725return n(t)}function a(n){return J8(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function rnt(e,t,n){let r=this;return i;function i(t){return J8(t)?$8(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(tnt,t,n)(r)}}function int(e){e.exit(`blockQuote`)}var ant={name:`characterEscape`,tokenize:ont};function ont(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Htt(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var snt={name:`characterReference`,tokenize:cnt};function cnt(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=U8,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Vtt,u):(e.enter(`characterReferenceValue`),a=7,o=G8,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===U8&&!R8(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var lnt={partial:!0,tokenize:fnt},unt={concrete:!0,name:`codeFenced`,tokenize:dnt};function dnt(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),J8(t)?$8(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||K8(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(lnt,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||K8(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):J8(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),$8(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||K8(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||K8(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&J8(t)?$8(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||K8(t)?e.check(lnt,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||K8(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),J8(t)?$8(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),J8(t)?$8(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||K8(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function fnt(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var i5={name:`codeIndented`,tokenize:mnt},pnt={partial:!0,tokenize:hnt};function mnt(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),$8(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):K8(t)?e.attempt(pnt,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||K8(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function hnt(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):K8(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):$8(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):K8(e)?i(e):n(e)}}var gnt={name:`codeText`,previous:vnt,resolve:_nt,tokenize:ynt};function _nt(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function vnt(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function ynt(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):K8(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||K8(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var bnt=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&a5(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),a5(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),a5(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);a5(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);a5(this.left,t.reverse())}}};function a5(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function xnt(e){let t={},n=-1,r,i,a,o,s,c,l,u=new bnt(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Snt(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return z8(e,0,1/0,u.slice(0)),!l}function Snt(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Cnt={resolve:Tnt,tokenize:Ent},wnt={partial:!0,tokenize:Dnt};function Tnt(e){return xnt(e),e}function Ent(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):K8(t)?e.check(wnt,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Dnt(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$8(e,a,`linePrefix`)}function a(i){if(i===null||K8(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Ont(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||W8(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||K8(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||q8(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||W8(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function knt(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):K8(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||K8(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!J8(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Ant(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):K8(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$8(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||K8(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function o5(e,t){let n;return r;function r(i){return K8(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):J8(i)?$8(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var jnt={name:`definition`,tokenize:Nnt},Mnt={partial:!0,tokenize:Pnt};function Nnt(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return knt.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=V8(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return q8(t)?o5(e,l)(t):l(t)}function l(t){return Ont(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Mnt,d,d)(t)}function d(t){return J8(t)?$8(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||K8(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Pnt(e,t,n){return r;function r(t){return q8(t)?o5(e,i)(t):n(t)}function i(t){return Ant(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return J8(t)?$8(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||K8(e)?t(e):n(e)}}var Fnt={name:`hardBreakEscape`,tokenize:Int};function Int(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return K8(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Lnt={name:`headingAtx`,resolve:Rnt,tokenize:znt};function Rnt(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},z8(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function znt(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||q8(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||K8(n)?(e.exit(`atxHeading`),t(n)):J8(n)?$8(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||q8(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Bnt=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Vnt=[`pre`,`script`,`style`,`textarea`],Hnt={concrete:!0,name:`htmlFlow`,resolveTo:Gnt,tokenize:Knt},Unt={partial:!0,tokenize:Jnt},Wnt={partial:!0,tokenize:qnt};function Gnt(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Knt(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ee):H8(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):H8(a)?(e.consume(a),i=4,r.interrupt?t:ee):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ee):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return H8(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||q8(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Vnt.includes(l)?(i=1,r.interrupt?t(s):O(s)):Bnt.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||U8(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return J8(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||H8(t)?(e.consume(t),b):J8(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||U8(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):J8(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):J8(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||K8(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||q8(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||J8(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||K8(t)?O(t):J8(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),te):t===63&&i===3?(e.consume(t),ee):t===93&&i===5?(e.consume(t),F):K8(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Unt,ne,k)(t)):t===null||K8(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Wnt,A,ne)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||K8(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),ee):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Vnt.includes(n)?(e.consume(t),te):O(t)}return H8(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),ee):O(t)}function ee(t){return t===62?(e.consume(t),te):t===45&&i===2?(e.consume(t),ee):O(t)}function te(t){return t===null||K8(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),te)}function ne(n){return e.exit(`htmlFlow`),t(n)}}function qnt(e,t,n){let r=this;return i;function i(t){return K8(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Jnt(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(r5,t,n)}}var Ynt={name:`htmlText`,tokenize:Xnt};function Xnt(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):H8(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):H8(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):K8(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):K8(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):K8(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):K8(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return H8(t)?(e.consume(t),S):n(t)}function S(t){return t===45||U8(t)?(e.consume(t),S):C(t)}function C(t){return K8(t)?(o=C,N(t)):J8(t)?(e.consume(t),C):M(t)}function w(t){return t===45||U8(t)?(e.consume(t),w):t===47||t===62||q8(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||H8(t)?(e.consume(t),E):K8(t)?(o=T,
vendor: 16,019 bytes, lines 4725-4727
4725N(t)):J8(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||U8(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):K8(t)?(o=D,N(t)):J8(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):K8(t)?(o=O,N(t)):J8(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):K8(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||q8(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||q8(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return J8(t)?$8(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var s5={name:`labelEnd`,resolveAll:ert,resolveTo:trt,tokenize:nrt},Znt={tokenize:rrt},Qnt={tokenize:irt},$nt={tokenize:art};function ert(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&z8(e,0,e.length,n),e}function trt(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=B8(s,e.slice(a+1,a+r+3)),s=B8(s,[[`enter`,u,t]]),s=B8(s,t5(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=B8(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=B8(s,e.slice(o+1)),s=B8(s,[[`exit`,c,t]]),z8(e,a,e.length,s),e}function nrt(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(V8(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Znt,u,o?u:d)(t):t===91?e.attempt(Qnt,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt($nt,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function rrt(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return q8(t)?o5(e,a)(t):a(t)}function a(t){return t===41?u(t):Ont(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return q8(t)?o5(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Ant(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return q8(t)?o5(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function irt(e,t,n){let r=this;return i;function i(t){return knt.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(V8(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function art(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var ort={name:`labelStartImage`,resolveAll:s5.resolveAll,tokenize:srt};function srt(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var crt={name:`labelStartLink`,resolveAll:s5.resolveAll,tokenize:lrt};function lrt(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var c5={name:`lineEnding`,tokenize:urt};function urt(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$8(e,t,`linePrefix`)}}var l5={name:`thematicBreak`,tokenize:drt};function drt(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||K8(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),J8(t)?$8(e,s,`whitespace`)(t):s(t))}}var u5={continuation:{tokenize:hrt},exit:_rt,name:`list`,tokenize:mrt},frt={partial:!0,tokenize:vrt},prt={partial:!0,tokenize:grt};function mrt(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:G8(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(l5,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return G8(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(r5,r.interrupt?n:u,e.attempt(frt,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return J8(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function hrt(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(r5,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$8(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!J8(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(prt,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,$8(e,e.attempt(u5,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function grt(e,t,n){let r=this;return $8(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function _rt(e){e.exit(this.containerState.type)}function vrt(e,t,n){let r=this;return $8(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!J8(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var yrt={name:`setextUnderline`,resolveTo:brt,tokenize:xrt};function brt(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function xrt(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),J8(t)?$8(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||K8(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Srt={tokenize:Crt};function Crt(e){let t=this,n=e.attempt(r5,r,e.attempt(this.parser.constructs.flowInitial,i,$8(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Cnt,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var wrt={resolveAll:Ort()},Trt=Drt(`string`),Ert=Drt(`text`);function Drt(e){return{resolveAll:Ort(e===`text`?krt:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Ort(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function krt(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Art=s({attentionMarkers:()=>Rrt,contentInitial:()=>Mrt,disable:()=>zrt,document:()=>jrt,flow:()=>Prt,flowInitial:()=>Nrt,insideSpan:()=>Lrt,string:()=>Frt,text:()=>Irt}),jrt={42:u5,43:u5,45:u5,48:u5,49:u5,50:u5,51:u5,52:u5,53:u5,54:u5,55:u5,56:u5,57:u5,62:tnt},Mrt={91:jnt},Nrt={[-2]:i5,[-1]:i5,32:i5},Prt={35:Lnt,42:l5,45:[yrt,l5],60:Hnt,61:yrt,95:l5,96:unt,126:unt},Frt={38:snt,92:ant},Irt={[-5]:c5,[-4]:c5,[-3]:c5,33:ort,38:snt,42:n5,60:[Qtt,Ynt],91:crt,92:[Fnt,ant],93:s5,95:n5,96:gnt},Lrt={null:[n5,wrt]},Rrt={null:[42,95]},zrt={null:[]};function Brt(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=B8(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=t5(a,l.events,l),l.events):[]}function f(e,t){return Hrt(p(e),t)}function p(e){return Vrt(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){K8(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&z8(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Vrt(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Hrt(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=` 4726`;break;case-3:o=`\r 4727`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Urt(e){let t={constructs:Itt([Art,...(e||{}).extensions||[]]),content:n(Utt),defined:[],document:n(Gtt),flow:n(Srt),lazy:{},string:n(Trt),text:n(Ert)};return t;function n(e){return n;function n(n){return Brt(t,e,n)}}}function Wrt(e){for(;!xnt(e););return e}var Grt=/[\0\t\n\r]/g;function Krt(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Grt.lastIndex=u,c=Grt.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var qrt=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Jrt(e){return e.replace(qrt,Yrt)}function Yrt(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;
vendor: 11,241 bytes, lines 4727-4729
4727return ztt(n.slice(t?2:1),t?16:10)}return R8(n)||e}var Xrt={}.hasOwnProperty;function Zrt(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Qrt(n)(Wrt(Urt(n).document().write(Krt()(e,t,!0))))}function Qrt(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(L),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(me),blockQuote:a(le),characterEscape:T,characterReference:T,codeFenced:a(ue),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ue,o),codeText:a(de,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(fe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(pe),hardBreakEscape:a(he),hardBreakTrailing:a(he),htmlFlow:a(ge,o),htmlFlowData:T,htmlText:a(ge,o),htmlTextData:T,image:a(_e),label:o,link:a(L),listItem:a(ye),listItemValue:f,listOrdered:a(ve,d),listUnordered:a(ve),paragraph:a(be),reference:I,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(me),strong:a(R),thematicBreak:a(Se)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ce,autolinkProtocol:se,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:ae,characterReference:oe,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:F,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:re,resourceDestinationString:ee,resourceTitleString:te,resource:ne,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};$rt(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Xrt.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||tit).call(a,void 0,e[0])}for(r.position={start:d5(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:d5(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:d5(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||tit).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+k8({start:e.start,end:e.end})+`): itâs not open`);n.position.end=d5(e.end)}function u(){return L8(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=V8(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=xe(),n.position={start:d5(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=d5(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=d5(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Jrt(t),n.identifier=V8(t).toLowerCase()}function F(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function I(){this.data.referenceType=`collapsed`}function re(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=V8(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ie(e){this.data.characterReferenceType=e.type}function ae(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=ztt(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=R8(t);let i=this.stack[this.stack.length-1];i.value+=r}function oe(e){let t=this.stack.pop();t.position.end=d5(e.end)}function se(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ce(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function le(){return{type:`blockquote`,children:[]}}function ue(){return{type:`code`,lang:null,meta:null,value:``}}function de(){return{type:`inlineCode`,value:``}}function fe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function pe(){return{type:`emphasis`,children:[]}}function me(){return{type:`heading`,depth:0,children:[]}}function he(){return{type:`break`}}function ge(){return{type:`html`,value:``}}function _e(){return{type:`image`,title:null,url:``,alt:null}}function L(){return{type:`link`,title:null,url:``,children:[]}}function ve(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ye(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function be(){return{type:`paragraph`,children:[]}}function R(){return{type:`strong`,children:[]}}function xe(){return{type:`text`,value:``}}function Se(){return{type:`thematicBreak`}}}function d5(e){return{line:e.line,column:e.column,offset:e.offset}}function $rt(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?$rt(e,r):eit(e,r)}}function eit(e,t){let n;for(n in t)if(Xrt.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function tit(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+k8({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+k8({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+k8({start:t.start,end:t.end})+`) is still open`)}function nit(e){let t=this;t.parser=n;function n(n){return Zrt(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function rit(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function iit(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:` 4728`}]}function ait(e,t){let n=t.value?t.value+` 4729`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function oit(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sit(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}
vendor: 4,675 bytes, lines 4729-4731
4729function cit(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Q8(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function lit(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uit(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function dit(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function fit(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return dit(e,t);let i={src:Q8(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function pit(e,t){let n={src:Q8(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function mit(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function hit(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return dit(e,t);let i={href:Q8(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function git(e,t){let n={href:Q8(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function _it(e,t,n){let r=e.all(t),i=n?vit(n):yit(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:` 4730`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:` 4731`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function vit(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=yit(n[r])}return t}function yit(e){return e.spread??e.children.length>1}function bit(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function xit(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sit(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Cit(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wit(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=O8(t.children[1]),o=ttt(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{}
vendor: 4,137 bytes, line 4731
4731,children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Tit(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Eit(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Dit=9,Oit=32;function kit(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Ait(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Ait(t.slice(i),i>0,!1)),a.join(``)}function Ait(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Dit||t===Oit;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Dit||t===Oit;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function jit(e,t){let n={type:`text`,value:kit(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Mit(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Nit={blockquote:rit,break:iit,code:ait,delete:oit,emphasis:sit,footnoteReference:cit,heading:lit,html:uit,imageReference:fit,image:pit,inlineCode:mit,linkReference:hit,link:git,listItem:_it,list:bit,paragraph:xit,root:Sit,strong:Cit,table:wit,tableCell:Eit,tableRow:Tit,text:jit,thematicBreak:Mit,toml:f5,yaml:f5,definition:f5,footnoteDefinition:f5};function f5(){}var Pit=typeof self==`object`?self:globalThis,Fit=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Pit[e](t)},Iit=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(Fit(e,t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(Fit(a,o),i)};return r},Lit=e=>Iit(new Map,e)(0),p5=``,{toString:Rit}={},{keys:zit}=Object,m5=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Rit.call(e).slice(8,-1);switch(n){case`Array`:return[1,p5];case`Object`:return[2,p5];case`Date`:return[3,p5];case`RegExp`:return[4,p5];case`Map`:return[5,p5];case`Set`:return[6,p5];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},h5=([e,t])=>e===0&&(t===`function`||t===`symbol`),Bit=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=m5(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of zit(r))(e||!h5(m5(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(h5(m5(n))||h5(m5(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);
vendor: 2,697 bytes, lines 4731-4733
4731for(let n of r)(e||!h5(m5(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Vit=(e,{json:t,lossy:n}={})=>{let r=[];return Bit(!(t||n),!!t,new Map,r)(e),r},g5=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Lit(Vit(e,t)):structuredClone(e):(e,t)=>Lit(Vit(e,t));function Hit(e,t){let n=[{type:`text`,value:`â©`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Uit(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Wit(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Hit,r=e.options.footnoteBackLabel||Uit,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Q8(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...g5(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:` 4732`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:` 4733`}]}}var _5=(function(e){if(e==null)return Jit;if(typeof e==`function`)return v5(e);if(typeof e==`object`)return Array.isArray(e)?Git(e):Kit(e);if(typeof e==`string`)return qit(e);throw Error(`Expected function, string, or object as test`)});function Git(e){let t=[],n=-1;for(;++n<e.length;)t[n]=_5(e[n]);return v5(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Kit(e){let t=e;return v5(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function qit(e){return v5(t);function t(t){return t&&t.type===e}}function v5(e){return t;
vendor: 14,809 bytes, lines 4733-4737
4733function t(t,n,r){return!!(Yit(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Jit(){return!0}function Yit(e){return typeof e==`object`&&!!e&&`type`in e}function Xit(e){return e}var Zit=[];function Qit(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=_5(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+Xit(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Zit,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=$it(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function $it(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Zit:[e]}function y5(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Qit(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var b5={}.hasOwnProperty,eat={};function tat(e,t){let n=t||eat,r=new Map,i=new Map,a={all:s,applyData:rat,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Nit,...n.handlers},one:o,options:n,patch:nat,wrap:aat};return y5(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(b5.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=g5(n);return r.children=a.all(e),r}return g5(e)}return(a.options.unknownHandler||iat)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=oat(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=oat(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function nat(e,t){e.position&&(t.position=rtt(e))}function rat(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,g5(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function iat(e,t){let n=t.data||{},r=`value`in t&&!(b5.call(n,`hProperties`)||b5.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function aat(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:` 4734`});++r<e.length;)r&&n.push({type:`text`,value:` 4735`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:` 4736`}),n}function oat(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function sat(e,t){let n=tat(e,t),r=n.one(e,void 0),i=Wit(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:` 4737`},i)),a}function cat(e,t){return e&&`run`in e?async function(n,r){let i=sat(n,{file:r,...t});await e.run(i,r)}:function(n,r){return sat(n,{file:r,...e||t})}}function lat(e){if(e)throw e}var uat=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function x5(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function dat(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?fat(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function fat(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var S5={basename:pat,dirname:mat,extname:hat,join:gat,sep:`/`};function pat(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);C5(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function mat(e){if(C5(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function hat(e){C5(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function gat(...e){let t=-1,n;for(;++t<e.length;)C5(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:_at(n)}function _at(e){C5(e);let t=e.codePointAt(0)===47,n=vat(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function vat(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function C5(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var yat={cwd:bat};function bat(){return`/`}function w5(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function xat(e){if(typeof e==`string`)e=new URL(e);else if(!w5(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Sat(e)}function Sat(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var T5=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Cat=class{constructor(e){let t;t=e?w5(e)?{path:e}:typeof e==`string`||Tat(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:yat.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<T5.length;){let e=T5[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)T5.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?S5.basename(this.path):void 0}set basename(e){D5(e,`basename`),E5(e,`basename`),this.path=S5.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?S5.dirname(this.path):void 0}set dirname(e){wat(this.basename,`dirname`),this.path=S5.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?S5.extname(this.path):void 0}set extname(e){if(E5(e,`extname`),wat(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=S5.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){w5(e)&&(e=xat(e)),D5(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?S5.basename(this.path,this.extname):void 0}set stem(e){D5(e,`stem`),E5(e,`stem`),this.path=S5.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new j8(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function E5(e,t){if(e&&e.includes(S5.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+S5.sep+"`")}function D5(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function wat(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Tat(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Eat=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),O5=l(uat(),1),Dat={}.hasOwnProperty,Oat=new class e extends Eat{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=dat()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,O5.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(j5(`data`,this.frozen),this.namespace[e]=t,this):Dat.call(this.namespace,e)&&this.namespace[e]||void 0:e?(j5(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=M5(e),n=this.parser||this.Parser;return k5(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),k5(`process`,this.parser||this.Parser),A5(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=M5(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Mat(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),k5(`processSync`,this.parser||this.Parser),A5(`processSync`,this.compiler||this.Compiler),this.process(e,r),Aat(`processSync`,`process`,t),n;function r(e,r){t=!0,lat(e),n=r}}run(e,t,n){kat(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=M5(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Aat(`runSync`,`run`,n),r;function i(e,t){lat(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=M5(t),r=this.compiler||this.Compiler;return A5(`stringify`,r),kat(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(j5(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,O5.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];x5(o)&&x5(r)&&(r=(0,O5.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function k5(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function A5(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function j5(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function kat(e){if(!x5(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Aat(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function M5(e){return jat(e)?e:new Cat(e)}function jat(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}
vendor: 8,415 bytes, lines 4737-4738
4737function Mat(e){return typeof e==`string`||Nat(e)}function Nat(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Pat=[],Fat={allowDangerousHtml:!0},Iat=/^(https?|ircs?|mailto|xmpp)$/i,Lat=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Rat(e){let t=zat(e),n=Bat(e);return Vat(t.runSync(t.parse(n),n),e)}function zat(e){let t=e.rehypePlugins||Pat,n=e.remarkPlugins||Pat,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Fat}:Fat;return Oat().use(nit).use(n).use(cat,r).use(t)}function Bat(e){let t=e.children||``,n=new Cat;return typeof t==`string`?n.value=t:``+t,n}function Vat(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Hat;for(let e of Lat)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return y5(e,l),dtt(e,{Fragment:B.Fragment,components:i,ignoreInvalidStyle:!0,jsx:B.jsx,jsxs:B.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in I8)if(Object.hasOwn(I8,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=I8[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Hat(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Iat.test(e.slice(0,t))?e:``}function Uat(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Wat(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Gat(e,t,n){let r=_5((n||{}).ignore||[]),i=Kat(t),a=-1;for(;++a<i.length;)Qit(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Kat(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([qat(e[0]),Jat(e[1])])}return t}function qat(e){return typeof e==`string`?new RegExp(Wat(e),`g`):e}function Jat(e){return typeof e==`function`?e:function(){return e}}var N5=`phrasing`,P5=[`autolink`,`link`,`image`,`label`];function Yat(){return{transforms:[not],enter:{literalAutolink:Zat,literalAutolinkEmail:F5,literalAutolinkHttp:F5,literalAutolinkWww:F5},exit:{literalAutolink:tot,literalAutolinkEmail:eot,literalAutolinkHttp:Qat,literalAutolinkWww:$at}}}function Xat(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:N5,notInConstruct:P5},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:N5,notInConstruct:P5},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:N5,notInConstruct:P5}]}}function Zat(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function F5(e){this.config.enter.autolinkProtocol.call(this,e)}function Qat(e){this.config.exit.autolinkProtocol.call(this,e)}function $at(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function eot(e){this.config.exit.autolinkEmail.call(this,e)}function tot(e){this.exit(e)}function not(e){Gat(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,rot],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,iot]],{ignore:[`link`,`linkReference`]})}function rot(e,t,n,r,i){let a=``;if(!sot(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!aot(n)))return!1;let o=oot(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function iot(e,t,n,r){return!sot(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function aot(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function oot(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Uat(e,`(`),a=Uat(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function sot(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||X8(n)||Y8(n))&&(!t||n!==47)}_ot.peek=got;function cot(){this.buffer()}function lot(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function uot(){this.buffer()}function dot(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function fot(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=V8(this.sliceSerialize(e)).toLowerCase(),n.label=t}function pot(e){this.exit(e)}function mot(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=V8(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hot(e){this.exit(e)}function got(){return`[`}function _ot(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function vot(){return{enter:{gfmFootnoteCallString:cot,gfmFootnoteCall:lot,gfmFootnoteDefinitionLabelString:uot,gfmFootnoteDefinition:dot},exit:{gfmFootnoteCallString:fot,gfmFootnoteCall:pot,gfmFootnoteDefinitionLabelString:mot,gfmFootnoteDefinition:hot}}}function yot(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:_ot},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?` 4738`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?xot:bot))),s(),o}}function bot(e,t,n){return t===0?e:xot(e,t,n)}function xot(e,t,n){return(n?``:` `)+e}var Sot=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Dot.peek=Oot;function Cot(){return{canContainEols:[`delete`],enter:{strikethrough:Tot},exit:{strikethrough:Eot}}}function wot(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Sot}
vendor: 8,951 bytes, lines 4738-4750
4738],handlers:{delete:Dot}}}function Tot(e){this.enter({type:`delete`,children:[]},e)}function Eot(e){this.exit(e)}function Dot(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Oot(){return`~`}function kot(e){return e.length}function Aot(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||kot,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=jot(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Mot(r[d]);else{let e=Mot(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(` 4739`)}function jot(e){return e==null?``:String(e)}function Mot(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Not(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Pot);return i(),o}function Pot(e,t,n){return`>`+(n?``:` `)+e}function Fot(e,t){return Iot(e,t.inConstruct,!0)&&!Iot(e,t.notInConstruct,!1)}function Iot(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Lot(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===` 4740`&&Fot(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\ 4741`}function Rot(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function zot(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Bot(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Vot(e,t,n,r){let i=Bot(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(zot(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Hot);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(Rot(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:` 4742`,encode:["`"],...s.current()})),t()}return u+=s.move(` 4743`),a&&(u+=s.move(a+` 4744`)),u+=s.move(c),l(),u}function Hot(e,t,n){return(n?``:` `)+e}function I5(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Uot(e,t,n,r){let i=I5(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:` 4745`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Wot(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function L5(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function R5(e,t,n){let r=e5(e),i=e5(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Got.peek=Kot;function Got(e,t,n,r){let i=Wot(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=R5(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=L5(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=R5(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+L5(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Kot(e,t,n){return n.options.emphasis||`*`}function qot(e,t){let n=!1;return y5(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&L8(e)&&(t.options.setext||n))}function Jot(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(qot(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:` 4746`,after:` 4747`});return r(),t(),o+` 4748`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(` 4749`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:` 4750`,...a.current()});return/^[\t ]/.test(l)&&(l=L5(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Yot.peek=Xot;function Yot(e){return e.value||``}function Xot(){return`<`}Zot.peek=Qot;function Zot(e,t,n,r){let i=I5(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Qot(){return`!`}$ot.peek=est;function $ot(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function est(){return`!`}tst.peek=nst;function tst(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function nst(){return"`"}function rst(e,t){let n=L8(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}ist.peek=ast;function ist(e,t,n,r){let i=I5(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(rst(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}
vendor: 12,751 bytes, lines 4750-4752
4750))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function ast(e,t,n){return rst(e,n)?`<`:`[`}ost.peek=sst;function ost(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function sst(){return`[`}function z5(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function cst(e){let t=z5(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function lst(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function ust(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function dst(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?lst(n):z5(n),s=e.ordered?o===`.`?`)`:`.`:cst(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),ust(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function fst(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function pst(e,t,n,r){let i=fst(n),a=n.bulletCurrent||z5(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function mst(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var hst=_5([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function gst(e,t,n,r){return(e.children.some(function(e){return hst(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function _st(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}vst.peek=yst;function vst(e,t,n,r){let i=_st(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=R5(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=L5(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=R5(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+L5(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function yst(e,t,n){return n.options.strong||`*`}function bst(e,t,n,r){return n.safe(e.value,r)}function xst(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Sst(e,t,n){let r=(ust(n)+(n.options.ruleSpaces?` `:``)).repeat(xst(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Cst={blockquote:Not,break:Lot,code:Vot,definition:Uot,emphasis:Got,hardBreak:Lot,heading:Jot,html:Yot,image:Zot,imageReference:$ot,inlineCode:tst,link:ist,linkReference:ost,list:dst,listItem:pst,paragraph:mst,root:gst,strong:vst,text:bst,thematicBreak:Sst};function wst(){return{enter:{table:Tst,tableData:Ost,tableHeader:Ost,tableRow:Dst},exit:{codeText:kst,table:Est,tableData:B5,tableHeader:B5,tableRow:B5}}}function Tst(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Est(e){this.exit(e),this.data.inTable=void 0}function Dst(e){this.enter({type:`tableRow`,children:[]},e)}function B5(e){this.exit(e)}function Ost(e){this.enter({type:`tableCell`,children:[]},e)}function kst(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ast));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ast(e,t){return t===`|`?t:e}function jst(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:` 4751`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(` 4752`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Aot(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Cst.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Mst(){return{exit:{taskListCheckValueChecked:Pst,taskListCheckValueUnchecked:Pst,paragraph:Fst}}}function Nst(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Ist}}}function Pst(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Fst(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Ist(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Cst.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Lst(){return[Yat(),vot(),Cot(),wst(),Mst()]}function Rst(e){return{extensions:[Xat(),yot(e),wot(),jst(e),Nst()]}}var zst={tokenize:Xst,partial:!0},Bst={tokenize:Zst,partial:!0},Vst={tokenize:Qst,partial:!0},Hst={tokenize:$st,partial:!0},Ust={tokenize:ect,partial:!0},Wst={name:`wwwAutolink`,tokenize:Jst,previous:tct},Gst={name:`protocolAutolink`,tokenize:Yst,previous:nct},V5={name:`emailAutolink`,tokenize:qst,previous:rct},H5={};function Kst(){return{text:H5}}for(var U5=48;U5<123;)H5[U5]=V5,U5++,U5===58?U5=65:U5===91&&(U5=97);H5[43]=V5,H5[45]=V5,H5[46]=V5,H5[95]=V5,H5[72]=[V5,Gst],H5[104]=[V5,Gst],H5[87]=[V5,Wst],H5[119]=[V5,Wst];function qst(e,t,n){let r=this,i,a;return o;function o(t){return!W5(t)||!rct.call(r,r.previous)||G5(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return W5(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Ust,u,l)(t):t===45||t===95||U8(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&H8(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Jst(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!tct.call(r,r.previous)||G5(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(zst,e.attempt(Bst,e.attempt(Vst,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Yst(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&nct.call(r,r.previous)&&!G5(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(H8(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||W8(t)||q8(t)||X8(t)||Y8(t)?n(t):e.attempt(Bst,e.attempt(Vst,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Xst(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Zst(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Hst,c,s)(t):t===null||q8(t)||X8(t)||t!==45&&Y8(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Qst(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Hst,t,a)(o):o===null||q8(o)||X8(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function $st(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||q8(o)||X8(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||q8(e)||X8(e)?t(e):r(e)}function a(e){return H8(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):H8(t)?(e.consume(t),o):n(t)}}function ect(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return U8(e)?n(e):t(e)}}function tct(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||q8(e)}function nct(e){return!H8(e)}function rct(e){return!(e===47||W5(e))}function W5(e){return e===43||e===45||e===46||e===95||U8(e)}function G5(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var ict={tokenize:fct,partial:!0};function act(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:lct,continuation:{tokenize:uct},exit:dct}},text:{91:{name:`gfmFootnoteCall`,tokenize:cct},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:oct,resolveTo:sct}}}}function oct(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=V8(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function sct(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;
vendor: 7,445 bytes, line 4752
4752let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function cct(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||q8(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(V8(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return q8(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function lct(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||q8(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=V8(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return q8(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),$8(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function uct(e,t,n){return e.check(r5,t,e.attempt(ict,t,n))}function dct(e){e.exit(`gfmFootnoteDefinition`)}function fct(e,t,n){let r=this;return $8(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function pct(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&z8(o,o.length,0,t5(s,e.slice(r+1,n),t)),z8(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),z8(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=e5(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=e5(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var mct=class{constructor(){this.map=[]}add(e,t,n){hct(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function hct(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function gct(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function _ct(){return{flow:{null:{name:`table`,tokenize:vct,resolveAll:yct}}}}function vct(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):K8(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):J8(t)?$8(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||q8(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,J8(t)?$8(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return J8(t)?$8(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||K8(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return J8(t)?$8(e,b,`whitespace`)(t):b(t)}
vendor: 5,097 bytes, line 4752
4752function b(n){return n===124?m(n):n===null||K8(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||K8(n)?(e.exit(`tableRow`),t(n)):J8(n)?$8(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||q8(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function yct(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new mct;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(bct(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=K5(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=K5(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=K5(f,t,o,i,n,d)):(o[0]=o[1],d=K5(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&bct(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=gct(t.events,n))}return e}function K5(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},q5(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=q5(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=q5(t.events,n[2]),a=q5(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},q5(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function bct(e,t,n,r,i){let a=[],o=q5(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function q5(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var xct={name:`tasklistCheck`,tokenize:Cct};function Sct(){return{text:{91:xct}}}function Cct(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return q8(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return K8(r)?t(r):J8(r)?e.check({tokenize:wct},t,n)(r):n(r)}}function wct(e,t,n){return $8(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Tct(e){return Itt([Kst(),act(),pct(e),_ct(),Sct()])}var Ect={};function Dct(e){let t=this,n=e||Ect,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Tct(n)),a.push(Lst()),o.push(Rst(n))}var Oct={h1:({children:e})=>(0,B.jsx)(U,{fontWeight:`bold`,fontSize:`sm`,mb:1,mt:2,children:e}),h2:({children:e})=>(0,B.jsx)(U,{fontWeight:`bold`,fontSize:`xs`,mb:1,mt:2,children:e}),h3:({children:e})=>(0,B.jsx)(U,{fontWeight:`semibold`,fontSize:`xs`,mb:1,mt:1,children:e}),p:({children:e})=>(0,B.jsx)(U,{fontSize:`xs`,lineHeight:`1.5`,mb:1,children:e}),ul:({children:e})=>(0,B.jsx)(V,{as:`ul`,fontSize:`xs`,ml:3,mb:1,css:{listStyleType:`disc`},children:e}),ol:({children:e})=>(0,B.jsx)(V,{as:`ol`,fontSize:`xs`,ml:3,mb:1,css:{listStyleType:`decimal`},children:e}),li:({children:e})=>(0,B.jsx)(V,{as:`li`,mb:.5,fontSize:`xs`,children:e}),code:({className:e,children:t})=>e?.includes(`language-`)?(0,B.jsx)(gh,{display:`block`,p:1,my:1,fontSize:`xs`,fontFamily:`mono`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,borderRadius:`sm`,children:t}):(0,B.jsx)(gh,{fontSize:`xs`,fontFamily:`mono`,px:.5,children:t}),pre:({children:e})=>(0,B.jsx)(V,{mb:1,overflow:`auto`,children:e}),table:({children:e})=>(0,B.jsx)(V,{overflowX:`auto`,mb:2,children:(0,B.jsx)(V,{as:`table`,fontSize:`2xs`,fontFamily:`mono`,w:`100%`,css:{borderCollapse:`collapse`,"& th, & td":{padding:`3px 8px`,textAlign:`left`,verticalAlign:`to
4752p`,borderBottom:`1px solid var(--chakra-colors-border-muted, #333)`},"& th":{fontWeight:`bold`,opacity:.75},"& tr:hover":{backgroundColor:`var(--chakra-colors-whiteAlpha-50)`}},children:e})}),strong:({children:e})=>(0,B.jsx)(U,{as:`span`,fontWeight:`bold`,children:e})},J5=({content:e})=>e?(0,B.jsx)(V,{children:(0,B.jsx)(Rat,{components:Oct,remarkPlugins:[Dct],children:e})}):null,kct=({sessionId:e,selectedThreadId:t})=>{let n=sX(vet),r=sX(yet),i=sX(_et),a=sX(bet),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(null),f=(0,_.useRef)(null),p=!!t,m=(0,_.useCallback)(async r=>{if(r?.preventDefault(),c)return;let a=o.trim();if(a){d(null),l(!0);try{p?await i({threadId:t,content:a}):await n({sessionId:e,question:a}),s(``)}catch(e){d(e instanceof Error?e.message:`Failed`)}finally{l(!1)}}},[o,c,e,t,p,n,i]),h=(0,_.useCallback)(async()=>{let t=o.trim();if(!(!t||c)){d(null),l(!0);try{await r({sessionId:e,content:t}),s(``)}catch(e){d(e instanceof Error?e.message:`Failed`)}finally{l(!1)}}},[o,c,e,r]),g=(0,_.useCallback)(async()=>{if(!c){d(null),l(!0);try{await a(e)}catch(e){d(e instanceof Error?e.message:`Failed`)}finally{l(!1)}}},[c,e,a]);return(0,B.jsxs)(V,{children:[(0,B.jsxs)(xh,{as:`form`,onSubmit:m,align:`center`,gap:0,borderRadius:`xl`,bg:`bg.subtle`,border:`1px solid`,borderColor:`border.muted`,overflow:`hidden`,transition:`border-color 0.15s`,_focusWithin:{borderColor:`fg.muted`},children:[(0,B.jsx)(Th,{ref:f,flex:1,variant:`flushed`,size:`sm`,fontFamily:`mono`,fontSize:`xs`,px:4,py:2,h:`36px`,border:`none`,borderBottom:`none`,outline:`none`,placeholder:p?`Reply to ${t.slice(0,6)}â¦`:`Ask a questionâ¦`,value:o,onChange:e=>s(e.target.value),disabled:c,_placeholder:{color:`fg.muted`},_focus:{boxShadow:`none`,borderColor:`transparent`},onKeyDown:e=>{e.key===`Escape`&&s(``)}}),(0,B.jsx)(V,{as:`button`,display:`flex`,alignItems:`center`,justifyContent:`center`,px:4,h:`36px`,color:`fg.muted`,cursor:c?`wait`:`pointer`,_hover:{color:`fg`},opacity:c?.4:o.trim()?.8:.3,flexShrink:0,transition:`opacity 0.15s, color 0.15s`,children:(0,B.jsx)(Uue,{size:14})})]}),(0,B.jsxs)(xh,{gap:1,mt:`6px`,px:2,align:`center`,children:[(0,B.jsx)(V,{as:`button`,fontSize:`2xs`,fontFamily:`mono`,color:`fg.muted`,cursor:`pointer`,_hover:{color:`fg`},opacity:o.trim()?.8:.35,transition:`opacity 0.15s`,onClick:h,children:`broadcast`}),(0,B.jsx)(U,{fontSize:`2xs`,color:`fg.muted`,opacity:.3,userSelect:`none`,children:`·`}),(0,B.jsx)(V,{as:`button`,fontSize:`2xs`,fontFamily:`mono`,color:`fg.muted`,cursor:`pointer`,_hover:{color:`fg`},opacity:.8,transition:`opacity 0.15s`,onClick:g,title:`Resume waiting threads and scout for new questions`,children:`continue + rescan`})]}),u&&(0,B.jsx)(U,{fontSize:`2xs`,color:`red.400`,mt:1,px:2,fontFamily:`mono`,children:u})]})},Act=({threadId:e,label:t,placeholder:n,onClose:r})=>{let i=sX(_et),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(null),d=(0,_.useRef)(null);(0,_.useEffect)(()=>{d.current?.focus()},[]);let f=(0,_.useCallback)(async t=>{if(t.preventDefault(),t.stopPropagation(),!(!a.trim()||s)){c(!0),u(null);try{await i({threadId:e,content:a.trim()}),o(``),r()}catch(e){u(e instanceof Error?e.message:`Failed to send`)}finally{c(!1)}}},[a,s,i,e,r]),p=(0,_.useCallback)(e=>{e.key===`Escape`&&r()},[r]);return(0,B.jsxs)(V,{as:`form`,onSubmit:f,p:2,borderTop:`1px solid`,borderColor:`gray.subtle`,children:[(0,B.jsx)(U,{fontSize:`xs`,color:`fg.muted`,mb:1,fontFamily:`mono`,children:t??`Reply to thread ${e.slice(0,6)}â¦`}),(0,B.jsx)(Th,{ref:d,size:`xs`,variant:`outline`,fontFamily:`mono`,fontSize:`xs`,placeholder:n??`Type a message and press Enterâ¦`,value:a,onClick:e=>{e.stopPropagation()},onChange:e=>{e.stopPropagation(),o(e.target.value)},onKeyDown:p,disabled:s}),l&&(0,B.jsx)(U,{fontSize:`xs`,color:`red.500`,mt:1,children:l})]})};function jct(e,t,n){let r=n?J9e:Y9e,i=t.indexOf(e);return r[Math.max(0,i)%r.length]}function Mct(e,t,n=`block`){let r=t?X9e:n===`badge`?Q9e:Z9e,i=t?$9e:eet;return e?r[e.toUpperCase()]??i:i}function Nct(e){return!!(e.full_message||e.sql||e.tool_result||e.response_text||e.response_tables||e.content||e.scout_questions||e.source_threads||e.asse
4752ssment||e.rationale||e.instruction||e.event_type===`thread_waiting`||e.event_type===`thread_start`||e.event_type===`thread_resumed`||e.event_type===`session_ready`)}function Pct(e){let t=e.id.split(`:`),n=t[0];if(n===`thread`){let e=t[1];return e?t[2]===`complete`?{type:`thread_end`,threadId:e,threadStatus:`complete`}:t[2]===`waiting`?{type:`thread_end`,threadId:e,threadStatus:`waiting`}:{type:`thread`,threadId:e}:null}if(n===`step`||n===`human`){let e=t[1],n=Number(t[2]);return!e||Number.isNaN(n)?null:{type:`step`,threadId:e,stepNumber:n}}return n===`ev`?{type:`event`,threadId:t[1],stepNumber:Number(t[2]),eventIndex:Number(t[3])}:null}function Fct(e){if(!e||!e.threadId)return null;switch(e.type){case`thread`:return`thread:${e.threadId}:start`;case`thread_end`:return e.threadStatus===`waiting`?`thread:${e.threadId}:waiting`:`thread:${e.threadId}:complete`;case`step`:return e.stepNumber===void 0?null:`step:${e.threadId}:${e.stepNumber}:start`;case`event`:return e.stepNumber!==void 0&&e.eventIndex!==void 0?`ev:${e.threadId}:${e.stepNumber}:${e.eventIndex}`:null;default:return null}}var Ict=()=>{let e=Y(c8),t=Y(u8),n=sX(xet),{selectedNode:r}=e,i=ug(!1,!0),a=(0,_.useRef)(null),o=(0,_.useRef)(!0),s=(0,_.useRef)(!1),[c,l]=(0,_.useState)(null),u=(0,_.useRef)(null);u.current=c;let d=(0,_.useRef)(null),f=(0,_.useMemo)(()=>{let e=new Set,n=[];for(let r of t)r.thread_id&&!e.has(r.thread_id)&&(e.add(r.thread_id),n.push(r.thread_id));return n},[t]);(0,_.useEffect)(()=>{if(!o.current)return;let e=requestAnimationFrame(()=>{let e=a.current;e&&(e.scrollTop=e.scrollHeight)});return()=>cancelAnimationFrame(e)},[t.length]),(0,_.useEffect)(()=>{if(s.current){s.current=!1;return}if(!r){d.current=null;return}let e=Fct(r);if(e){if(r.type===`step`&&r.threadId&&r.stepNumber!==void 0){let n=r.threadId,i=r.stepNumber,a=t.find(e=>e.thread_id===n&&e.step_number===i&&(e.event_type===`step_start`||e.event_type===`step_complete`||e.event_type===`human_message`||e.event_type===`thread_waiting`));a&&(e=a.id)}if(d.current===e){l(e);return}d.current=e,l(e),o.current=!1,requestAnimationFrame(()=>{setTimeout(()=>{let t=a.current,n=t?.querySelector(`[data-entry-id="${e}"]`);if(!t||!n)return;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),o=t.scrollTop+(i.top-r.top)-t.clientHeight/2+i.height/2;t.scrollTo({top:Math.max(0,o),behavior:`smooth`})},120)})}},[r,t]);let p=(0,_.useCallback)(()=>{let e=a.current;e&&(o.current=e.scrollHeight-e.scrollTop-e.clientHeight<40)},[]),m=(0,_.useCallback)((e,t)=>{s.current=!0,l(e),n(Pct(t))},[n]),h=(0,_.useCallback)(()=>{s.current=!0,l(null),n(null)},[n]);return(0,B.jsx)(xh,{direction:`column`,h:`100%`,minW:0,maxW:`100%`,overflow:`hidden`,children:(0,B.jsxs)(V,{ref:a,flex:1,minW:0,w:`100%`,maxW:`100%`,overflowY:`auto`,overflowX:`hidden`,onScroll:p,fontFamily:`mono`,px:2,fontSize:`xs`,lineHeight:`1.5`,children:[t.length===0&&(0,B.jsx)(U,{color:`fg.muted`,fontSize:`xs`,p:2,textAlign:`center`,children:e.mode===`live`?`Waiting for eventsâ¦`:`No events to display`}),t.map(e=>(0,B.jsx)(zct,{entry:e,threadIds:f,isDark:i,isExpanded:c===e.id,onExpand:m,onCollapse:h},e.id))]})})};function Lct(e){switch(e){case`schema_summary_ready`:return`schema`;case`session_ready`:return`ready`;case`scout_done`:return`scout`;case`thread_start`:return`start`;case`thread_resumed`:return`resumed`;case`thread_complete`:return`done`;case`thread_waiting`:return`waiting`;case`step_start`:return`plan`;case`llm_call`:return`llm`;case`tool_call`:return`sql`;case`step_complete`:return`step done`;case`human_message`:return`msg`;case`synthesis_start`:return`synthesis`;default:return``}}var Rct={coordinator_stuck:`Analysis paused â needs guidance`,repeated_moves:`Analysis got stuck in a loop`,retry_exhausted:`LLM provider unreachable â send any reply to retry`,unexpected_error:`Unexpected error`,human_review:`Step complete â review and continue`,context_exhausted:`Context window exhausted â send a narrower follow-up`},zct=_.memo(({entry:e,threadIds:t,isDark:n,isExpanded:r,onExpand:i,onCollapse:a})=>{let o=jct(e.thread_id,t,n),s=e.move||(e.event_type===`thread_start`?`START`:e.event_type===`thread_complete`?`DONE`:e.event_type===`thread_waiting`?`WAITING_FOR_HUMAN`:``),c=Mct(s||void 0,n,`badge`),l=Nct(e),u=n?`#888`:`#666`,d=n?`#5
475255`:`#aaa`,f=t.indexOf(e.thread_id),p=f>=0?`T${f+1}`:``,m=e.message&&/^\d/.test(e.message)?e.message:``,h=e.content??e.response_text??e.sql??e.full_message??``,g=h===``?m?``:e.message??``:h,_=Lct(e.event_type);return(0,B.jsxs)(V,{"data-entry-id":e.id,px:2,py:1,my:+!!r,minW:0,maxW:`100%`,w:`100%`,borderTop:r?`1px solid`:void 0,borderBottom:r?`1px solid`:void 0,borderTopColor:r?n?`whiteAlpha.200`:`blackAlpha.200`:void 0,borderBottomColor:r?n?`whiteAlpha.200`:`blackAlpha.200`:void 0,_hover:!r&&l?{bg:n?`whiteAlpha.50`:`blackAlpha.50`}:void 0,borderRadius:`sm`,children:[(0,B.jsxs)(xh,{gap:`6px`,align:`center`,minW:0,w:`100%`,cursor:l?`pointer`:`default`,onClick:()=>{l&&(r?a():i(e.id,e))},children:[(0,B.jsx)(V,{flexShrink:0,px:`5px`,py:`1px`,borderRadius:`3px`,border:`1px solid`,borderColor:n?`whiteAlpha.100`:`blackAlpha.100`,title:e.thread_id||`session`,children:(0,B.jsx)(U,{as:`span`,color:e.thread_id?o:d,fontWeight:`medium`,fontStyle:e.thread_id?`normal`:`italic`,children:e.thread_id?p:`session`})}),e.step_number!==void 0&&(0,B.jsxs)(U,{as:`span`,color:d,flexShrink:0,fontSize:`2xs`,children:[`STEP `,e.step_number]}),s&&(0,B.jsx)(V,{px:`5px`,py:`1px`,borderRadius:`3px`,bg:c.bg,flexShrink:0,children:(0,B.jsx)(U,{as:`span`,color:c.fg,fontWeight:`bold`,fontSize:`2xs`,letterSpacing:`0.03em`,children:s.replace(/_/g,` `).toUpperCase()})}),!s&&_&&(0,B.jsx)(U,{as:`span`,color:u,flexShrink:0,fontSize:`2xs`,children:_.toUpperCase()}),e.agent&&(0,B.jsx)(U,{as:`span`,color:d,flexShrink:0,fontSize:`2xs`,children:e.agent}),m&&(0,B.jsx)(U,{as:`span`,color:d,flexShrink:0,fontSize:`2xs`,fontVariantNumeric:`tabular-nums`,children:m}),!r&&g&&(0,B.jsx)(V,{flex:`1 1 0%`,minW:0,maxW:`100%`,overflow:`hidden`,title:h===``?e.message:h,children:(0,B.jsx)(U,{as:`div`,color:u,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,w:`100%`,children:g})}),r&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(V,{flex:`1 1 0%`}),(0,B.jsxs)(V,{as:`button`,flexShrink:0,display:`inline-flex`,alignItems:`center`,gap:`3px`,px:`6px`,py:`1px`,borderRadius:`3px`,color:u,fontSize:`2xs`,fontFamily:`mono`,_hover:{color:`fg`,bg:n?`whiteAlpha.200`:`blackAlpha.100`},"aria-label":`Collapse`,onClick:e=>{e.stopPropagation(),a()},children:[(0,B.jsx)(Wue,{size:11}),`collapse`]})]})]}),r&&(0,B.jsx)(V,{mt:2,pt:2,pl:2,children:(0,B.jsx)(Vct,{entry:e})})]})}),Bct=({data:e,label:t})=>{if(!e.length||typeof e[0]!=`object`||e[0]===null)return null;let n=Object.keys(e[0]);return(0,B.jsxs)(V,{my:1,overflowX:`auto`,children:[t&&(0,B.jsx)(U,{fontSize:`2xs`,fontFamily:`mono`,color:`fg.muted`,mb:.5,children:t}),(0,B.jsxs)(V,{as:`table`,fontSize:`2xs`,fontFamily:`mono`,w:`100%`,css:{borderCollapse:`collapse`,"& th, & td":{padding:`2px 6px`,textAlign:`left`,borderBottom:`1px solid var(--chakra-colors-border-muted, #333)`},"& th":{fontWeight:`bold`,opacity:.7}},children:[(0,B.jsx)(`thead`,{children:(0,B.jsx)(`tr`,{children:n.map(e=>(0,B.jsx)(`th`,{children:e},e))})}),(0,B.jsx)(`tbody`,{children:e.slice(0,50).map((e,t)=>(0,B.jsx)(`tr`,{children:n.map(t=>(0,B.jsx)(`td`,{children:String(e[t]??``)},t))},t))})]}),e.length>50&&(0,B.jsxs)(U,{fontSize:`2xs`,color:`fg.muted`,children:[`⦠`,e.length-50,` more rows`]})]})},Vct=({entry:e})=>{if(e.event_type===`thread_waiting`){let t=e.reason??void 0,n=t?Rct[t]:void 0;return(0,B.jsxs)(V,{children:[n&&(0,B.jsx)(U,{fontSize:`2xs`,fontFamily:`mono`,fontWeight:`semibold`,color:`fg`,mb:1,children:n}),e.full_message&&(0,B.jsx)(V,{mb:2,children:(0,B.jsx)(J5,{content:e.full_message})}),(0,B.jsx)(Act,{threadId:e.thread_id,label:t===`retry_exhausted`?`Send any reply to retry`:t===`human_review`?`Review and continue`:t===`context_exhausted`?`Send a narrower follow-up`:`Reply to waiting thread`,placeholder:t===`retry_exhausted`?`Press Enter to retry, or add new contextâ¦`:t===`human_review`?`Add direction, or press Enter to continueâ¦`:t===`context_exhausted`?`Narrow the question or add constraintsâ¦`:`Type a reply and press Enterâ¦`,onClose:()=>{}})]})}if(e.event_type===`human_message`)return(0,B.jsxs)(V,{children:[(0,B.jsx)(xh,{align:`center`,gap:2,mb:1,children:(0,B.jsx)(U,{fontSize:`2xs`,fontFamily:`mono`,color:`fg.muted`,children:e.target===`session`?`â all threads`:`â this thread`})}),(0,B.jsx)(V,{as:`blockquote`,fontSize:`xs`,fontFamily:`mono`,borderLeft:`2px solid`,borderColor:`gray.500`,pl:2,py:.5,whiteSpace:`pre-wrap`,children:e.content??``})]});if(e.event_type===`scout_done`&&e.scout_questions)return(0,B.jsxs)(V,{children:[(0,B.jsxs)(U,{fontSize:`2xs`,color:`fg.muted`,mb:1,children:[e.scout_questions.length,` seed question`,e.scout_questions.length===1?``:`s`]}),e.scout_questions.map((e,t)=>(0,B.jsxs)(V,{mb:2,pl:2,borderLeft:`2px solid`,borderColor:`border.muted`,children:[(0,B.jsx)(U,{fontSize:`xs`,fontWeight:`semibold`,mb:.5,children:e.question}),e.motivation&&(0,B.jsx)(U,{fontSize:`2xs`,color:`fg.muted`,mb:.5,children:e.motivation}),e.entry_point&&(0,B.jsxs)(U,{fontSize:`2xs`,color:`fg.subtle`,fontStyle:`italic`,children:[`entry: `,e.entry_point]})]},t))]});if(e.event_type===`synthesis_start`&&e.source_threads)return(0,B.jsxs)(V,{children:[(0,B.jsxs)(U,{fontSize:`2xs`,color:`fg.muted`,mb:1,children:[`Synthesizing `,e.source_threads.length,` thread finding`,e.source_threads.length===1?``:`s`]}),(0,B.jsx)(xh,{gap:1,flexWrap:`wrap`,children:e.source_threads.map(e=>(0,B.jsx)(U,{as:`span`,fontFamily:`mono`,fontSize:`2xs`,px:`5px`,py:`1px`,borderRadius:`3px`,border:`1px solid`,borderColor:`border.muted`,children:e.slice(0,6)},e))})]});if(e.event_type===`thread_resumed`)return(0,B.jsxs)(U,{fontSize:`2xs`,fontFamily:`mono`,color:`fg.muted`,children:[`Thread resumed`,e.from_step!==null&&e.from_step!==void 0?` at step ${e.from_step}`:``,`.`]});if(e.event_type===`session_ready`)return(0,B.jsx)(U,{fontSize:`2xs`,fontFamily:`mono`,color:`fg.muted`,children:`Profiling complete. Waiting for the first human question.`});if(e.event_type===`thread_start`){let t=e.seed_question??e.full_message??``;return(0,B.jsxs)(V,{children:[t&&(0,B.jsx)(V,{mb:2,children:(0,B.jsx)(J5,{content:t})}),e.motivation&&(0,B.jsxs)(V,{mb:2,children:[(0,B.jsx)(U,{fontSize:`2xs`,color:`fg.muted`,mb:.5,children:`motivation`}),(0,B.jsx)(J5,{content:e.motivation})]}),e.entry_point&&(0,B.jsxs)(V,{mb:2,children:[(0,B.jsx)(U,{fontSize:`2xs`,color:`fg.muted`,mb:.5,children:`entry point`}),(0,B.jsx)(J5,{content:e.entry_point})]}),e.thread_status===`running`&&(0,B.jsx)(Act,{threadId:e.thread_id,label:`Send direction to running thread`,placeholder:`Guide this threadâ¦`,onClose:()=>{}})]})}return e.event_type===`tool_call`?(0,B.jsxs)(V,{children:[e.sql&&(0,B.jsx)(gh,{display:`block`,p:1,my:1,fontSize:`xs`,fontFamily:`mono`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,borderRadius:`sm`,children:e.sql}),e.tool_result&&(0,B.jsx)(V,{as:`pre`,fontSize:`xs`,fontFamily:`mono`,whiteSpace:`pre`,overflowX:`auto`,p:1,my:1,borderRadius:`sm`,bg:`bg.subtle`,lineHeight:`1.3`,children:e.tool_result})]}):e.event_type===`llm_call`?(0,B.jsxs)(V,{children:[e.response_text&&(0,B.jsx)(J5,{content:e.response_text}),e.response_tables&&Object.entries(e.response_tables).map(([e,t])=>(0,B.jsx)(Bct,{data:t,label:e},e))]}):e.event_type===`step_start`?(0,B.jsxs)(V,{children:[e.assessment&&(0,B.jsxs)(V,{mb:2,children:[(0,B.jsx)(U,{fontSize:`2xs`,color:`fg.muted`,mb:.5,children:`asse
4752ssment`}),(0,B.jsx)(J5,{content:e.assessment})]}),e.rationale&&(0,B.jsxs)(V,{mb:2,children:[(0,B.jsx)(U,{fontSize:`2xs`,color:`fg.muted`,mb:.5,children:`rationale`}),(0,B.jsx)(J5,{content:e.rationale})]}),e.instruction&&(0,B.jsxs)(V,{mb:2,children:[(0,B.jsx)(U,{fontSize:`2xs`,color:`fg.muted`,mb:.5,children:`instruction`}),(0,B.jsx)(J5,{content:e.instruction})]})]}):e.full_message?(0,B.jsx)(J5,{content:e.full_message}):null},Hct={"claude-opus-4-7":{input:15,output:75},"claude-opus-4-6":{input:15,output:75},"claude-opus-4-5":{input:15,output:75},"claude-opus-4":{input:15,output:75},"claude-sonnet-4-6":{input:3,output:15},"claude-sonnet-4-5":{input:3,output:15},"claude-sonnet-4":{input:3,output:15},"claude-haiku-4-5":{input:1,output:5},"claude-3-7-sonnet":{input:3,output:15},"claude-3-5-sonnet":{input:3,output:15},"claude-3-5-haiku":{input:.8,output:4},"claude-3-opus":{input:15,output:75},"gpt-5":{input:1.25,output:10},"gpt-4.1":{input:2,output:8},"gpt-4o":{input:2.5,output:10},"gpt-4o-mini":{input:.15,output:.6},"gpt-oss-20b":{input:.05,output:.2},"gpt-oss-120b":{input:.15,output:.6}};function Uct(e){let t=e.split(`/`).pop()??e;return t=t.split(`:`)[0],t=t.replace(/-\d{8}$/,``),t=t.replace(/-latest$/,``),t.toLowerCase()}function Wct(e){let t=new Map,n=0,r=0,i=0,a=0;for(let o of e){if(o.event_type!==`llm_call`&&o.event_type!==`step_start`)continue;let e=o.input_tokens??0,s=o.output_tokens??0;if(e===0&&s===0)continue;n+=e,r+=s;let c=o.model?Uct(o.model):`unknown`,l=Hct[c]??null,u=l?(e*l.input+s*l.output)/1e6:null;u===null?a+=e+s:i+=u;let d=t.get(c)??{input:0,output:0,calls:0,cost:l?0:null};d.input+=e,d.output+=s,d.calls+=1,l&&d.cost!==null&&(d.cost+=u),t.set(c,d)}return{totalInput:n,totalOutput:r,totalCost:i,unpricedTokens:a,perModel:t}}function Y5(e){return e===0?`0`:e<1e3?String(e):e<1e6?`${(e/1e3).toFixed(+(e<1e4))}k`:`${(e/1e6).toFixed(e<1e7?2:1)}M`}function Gct(e){return e===0?`$0`:e<.01?`<$0.01`:e<1||e<100?`$${e.toFixed(2)}`:`$${e.toFixed(0)}`}var Kct=()=>{let e=Y(u8),t=(0,_.useMemo)(()=>Wct(e),[e]);if(t.totalInput===0&&t.totalOutput===0)return null;let n=Array.from(t.perModel.entries()).sort((e,t)=>(t[1].cost??0)-(e[1].cost??0)),r=t.unpricedTokens>0&&t.totalCost>0?`+`:``,i=n.length>1;return(0,B.jsxs)(V,{px:2,pb:2,fontFamily:`mono`,fontSize:`2xs`,children:[n.map(([e,t])=>(0,B.jsxs)(V,{color:`fg.muted`,py:`2px`,title:e,children:[(0,B.jsx)(U,{as:`span`,color:`fg.subtle`,children:`Model: `}),(0,B.jsx)(U,{as:`span`,color:`fg`,children:e}),(0,B.jsxs)(U,{as:`span`,children:[`, `,t.calls,` turns, `]}),(0,B.jsxs)(U,{as:`span`,children:[Y5(t.input+t.output),` tokens (`,Y5(t.input),` in / `,Y5(t.output),` out)`]}),(0,B.jsx)(U,{as:`span`,children:`, cost `}),(0,B.jsx)(U,{as:`span`,color:`fg`,children:t.cost===null?`â`:Gct(t.cost)})]},e)),i&&(0,B.jsxs)(xh,{align:`baseline`,justify:`flex-end`,gap:2,color:`fg`,pt:1,mt:1,borderTop:`1px solid`,borderColor:`border.muted`,children:[(0,B.jsx)(U,{as:`span`,children:`total`}),(0,B.jsx)(U,{as:`span`,minW:`44px`,textAlign:`right`,children:t.totalCost>0||t.unpricedTokens===0?Gct(t.totalCost)+r:`â`})]}),t.unpricedTokens>0&&(0,B.jsxs)(U,{color:`fg.subtle`,mt:1,children:[Y5(t.unpricedTokens),` tokens unpriced`]})]})},qct=()=>{let e=Y(oet),t=Y(aet),n=ug(!1,!0),r=e.length===0;return(0,B.jsxs)(V,{as:`button`,display:`inline-flex`,alignItems:`center`,gap:`4px`,px:`6px`,py:`2px`,fontSize:`2xs`,fontFamily:`mono`,color:`fg.muted`,borderRadius:`3px`,cursor:r?`not-allowed`:`pointer`,opacity:r?.4:1,_hover:r?void 0:{color:`fg`,bg:n?`whiteAlpha.100`:`blackAlpha.50`},"aria-label":`Download feed as JSON`,title:r?`No entries to download`:`Download feed as .feed.json`,onClick:()=>{if(r)return;let n=JSON.stringify(e,null,2),i=new Blob([n],{type:`application/json`}),a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=`${t?.id??`session`}.feed.json`,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},children:[(0,B.jsx)(Hue,{size:11}),`feed.json`]})},X5=4,Jct=72;function Yct(e){let t=new Map,n=new Map,r=e=>{if(!e)return null;let r=t.get(e);return r||(r={id:e,status:`running`,steps:[]},t.set(e,r),n.set(e,new Map)),r},i=(e,t,r)=>{let i=n.get(e.id),a=i.get(t);return a||(a={step_number:t,move:r,events:[]},e.steps.push(a),i.set(t,a)),a};for(let t of e){if(t.event_type===`thread_start`){let e=r(t.thread_id);e&&(t.thread_status&&(e.status=t.thread_status),e.seedQuestion=t.seed_question??t.full_message??``);continue}if(t.event_type===`thread_resumed`){let e=r(t.thread_id);e&&(e.status=`running`);continue}if(t.event_type===`thread_complete`){let e=r(t.thread_id);e&&(e.status=`complete`,e.endText=t.full_message??t.message??``);continue}if(t.event_type===`thread_waiting`){let e=r(t.thread_id);e&&(e.status=`waiting`,e.endText=t.full_message??t.message??``);continue}if(t.event_type===`step_start`&&t.step_number!==void 0){let e=r(t.thread_id);if(e){let n=i(e,t.step_number,t.move??``);n.instruction=t.instruction??``,n.assessment=t.assessment??``,n.rationale=t.rationale??``}continue}if(t.event_type===`human_message`&&t.step_number!==void 0){let e=r(t.thread_id);e&&i(e,t.step_number,t.move??`HUMAN_INPUT`);continue}if((t.event_type===`llm_call`||t.event_type===`tool_call`)&&t.step_number!==void 0){let e=r(t.thread_id);if(!e)continue;let i=n.get(e.id).get(t.step_number);if(!i)continue;let a=t.id.split(`:`),o=a[0]===`ev`?Number(a[3]):i.events.length,s=t.event_type===`tool_call`?t.sql??t.message??``:t.response_text??t.message??t.full_message??``;i.events.push({type:t.event_type,eventIndex:o,agent:t.agent??`worker`,text:s})}}return Array.from(t.values())}function Z5(e,t){return e===`complete`?t?{bg:`#1f3520`,fg:`#b6de8a`}:{bg:`#d8ecce`,fg:`#254820`}:e===`waiting`?t?{bg:`#3a3a3a`,fg:`#d0d0d0`}:{bg:`#e0e0e0`,fg:`#444444`}:e===`error`?t?{bg:`#3d1e26`,fg:`#f6909c`}:{bg:`#f5d2d8`,fg:`#74212f`}:null}var Xct=()=>{let e=Y(c8).selectedNode,t=Y(u8),n=sX(xet),r=(0,_.useMemo)(()=>Yct(t),[t]),i=(0,_.useRef)(null),a=ug(!1,!0),o=ug(`#000`,`#fff`),{tooltipData:s,tooltipLeft:c,tooltipTop:l,showTooltip:u,hideTooltip:d}=Wb(),{containerRef:f,containerBounds:p,TooltipInPortal:m}=ox({scroll:!0,detectBounds:!0}),h=(0,_.useMemo)(()=>
4752{if(!r.length)return null;let e=r,t=e.length,n=t*65+(t-1)*16,i=0;return{columns:e.map((e,t)=>{let n=t*81,r=8,a=r;r+=42;let o=e.steps.map(e=>{let t=e.move===`HUMAN_INPUT`||e.move===`WAITING_FOR_HUMAN`,i=r;r+=22;let a=65*q9e,o=n+(65-a)/2,s=e.events.map(e=>{let t=r;return r+=10,{x:o,y:t,w:a,h:8,type:e.type,eventIndex:e.eventIndex,agent:e.agent,text:e.text}});return r+=2,{x:n,y:i,w:65,h:20,stepNumber:e.step_number,move:e.move,instruction:e.instruction??``,assessment:e.assessment??``,rationale:e.rationale??``,isHumanTouchpoint:t,events:s}}),s=e.status!==`running`,c=r;return s&&(r+=22),r>i&&(i=r),{threadId:e.id,x:n,w:65,status:e.status,seedQuestion:e.seedQuestion??``,endText:e.endText??``,startY:a,endY:c,showEnd:s,steps:o}}),svgW:n,svgH:i+8,threadW:65}},[r]),g=(0,_.useCallback)((t,n,r,i)=>!e||e.type!==t?!1:t===`session`?!0:e.threadId===n?t===`thread`||t===`thread_end`?!0:e.stepNumber===r?t===`step`?!0:e.eventIndex===i:!1:!1,[e]);if(!h)return null;let{columns:v,svgW:y,svgH:b,threadW:x}=h,S=x>=Jct,C=v.map(e=>e.threadId);return(0,B.jsxs)(xh,{direction:`column`,w:`100%`,h:`100%`,minH:0,children:[(0,B.jsx)(`style`,{children:` 4753 @keyframes flow-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } } 4754 .flow-pulse { animation: flow-pulse 2s ease-in-out infinite; } 4755 `}),(0,B.jsxs)(V,{ref:e=>{i.current=e,f(e)},flex:1,overflow:`auto`,px:2,minH:0,position:`relative`,children:[(0,B.jsxs)(`svg`,{width:y,height:b,viewBox:`0 0 ${y} ${b}`,style:{display:`block`,userSelect:`none`,overflow:`visible`},children:[(0,B.jsx)(`defs`,{children:(0,B.jsxs)(`filter`,{id:`human-glow`,x:`-60%`,y:`-60%`,width:`220%`,height:`220%`,children:[(0,B.jsx)(`feGaussianBlur`,{stdDeviation:`3.5`,result:`blur`}),(0,B.jsx)(`feFlood`,{floodColor:a?`#f08bb0`:`#c94d7a`,floodOpacity:`0.75`}),(0,B.jsx)(`feComposite`,{in2:`blur`,operator:`in`,result:`glow`}),(0,B.jsxs)(`feMerge`,{children:[(0,B.jsx)(`feMergeNode`,{in:`glow`}),(0,B.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]})}),v.map((e,t)=>{let r=jct(e.threadId,C,a),i=Z5(e.status,a),s=i?i.bg:a?`#2a2a2a`:`#f0f0f0`,c=i?i.fg:r,l=g(`thread`,e.threadId),f=t+1;return(0,B.jsxs)(`g`,{children:[(0,B.jsx)(`rect`,{x:e.x,y:e.startY,width:e.w,height:40,fill:s,rx:X5,stroke:l?o:`none`,strokeWidth:l?1.5:0,style:{cursor:`pointer`},onClick:()=>n({type:`thread`,threadId:e.threadId}),onMouseMove:t=>{let n=[];e.seedQuestion&&n.push({label:`seed question`,text:e.seedQuestion}),u({tooltipData:{title:`Thread ${f} · Start`,sections:n},tooltipLeft:t.clientX-p.left,tooltipTop:t.clientY-p.top})},onMouseLeave:d}),e.w>24&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`text`,{x:e.x+e.w/2,y:e.startY+13,fill:c,fontFamily:`Poppins, sans-serif`,textAnchor:`middle`,dominantBaseline:`central`,style:{pointerEvents:`none`,fontSize:11,fontWeight:600},children:`START`}),(0,B.jsx)(`text`,{x:e.x+e.w/2,y:e.startY+27,fill:c,fontFamily:`Poppins, sans-serif`,textAnchor:`middle`,dominantBaseline:`central`,style:{pointerEvents:`none`,fontSize:11,fontWeight:600},children:`THREAD ${f}`})]}),e.steps.map(t=>{let r=g(`step`,e.threadId,t.stepNumber),i=e.status===`error`?Z5(`error`,a):Mct(t.move,a),s=(t.move??``).toUpperCase().replace(/_/g,` `),c=S?s===`HUMAN INPUT`?`HUMAN`:s===`WAITING FOR HUMAN`?`WAITING`:s:s===`HUMAN INPUT`?`HI`:s===`WAITING FOR HUMAN`?`WH`:s.replace(/ /g,``).slice(0,2),l=e.status===`running`&&t===e.steps[e.steps.length-1],f=t.isHumanTouchpoint&&e.status!==`waiting`,m=(t.move??``).toLowerCase().split(`_`).map(e=>e&&e[0].toUpperCase()+e.slice(1)).join(` `);return(0,B.jsxs)(`g`,{children:[(0,B.jsx)(`rect`,{x:t.x,y:t.y,width:t.w,height:t.h,fill:i.bg,rx:X5,stroke:r?o:`none`,strokeWidth:r?2.5:0,"data-flow-step":`${e.threadId}:${t.stepNumber}`,filter:f?`url(#human-glow)`:void 0,className:l?`flow-pulse`:void 0,style:{cursor:`pointer`},onClick:()=>n({type:`step`,threadId:e.threadId,stepNumber:t.stepNumber}),onMouseMove:e=>{let n=[];t.assessment&&n.push({label:`assessment`,text:t.assessment}),t.rationale&&n.push({label:`rationale`,text:t.rationale}),t.instruction&&n.push({label:`instruction`,text:t.instruction}),u({tooltipData:{title:`Step ${t.stepNumber} · ${m}
4755 · Coordinator`,sections:n},tooltipLeft:e.clientX-p.left,tooltipTop:e.clientY-p.top})},onMouseLeave:d}),t.w>22&&c?(0,B.jsx)(`text`,{x:t.x+t.w/2,y:t.y+t.h/2,fill:i.fg,fontFamily:`Poppins, sans-serif`,textAnchor:`middle`,dominantBaseline:`central`,style:{pointerEvents:`none`,fontSize:11,fontWeight:600},children:c}):null,t.events.map(r=>{let s=g(`event`,e.threadId,t.stepNumber,r.eventIndex),c=r.type===`human_message`,l=c?1:r.type===`tool_call`?.75:.55,f=c?a?`#e2a8c2`:`#a83d6a`:i.bg,h=a?`#f4cbdc`:`#5a1f33`,_=c?`Human`:r.agent?r.agent[0].toUpperCase()+r.agent.slice(1):`Worker`,v=r.type===`tool_call`?`SQL`:r.type===`human_message`?`Message`:`Response`;return(0,B.jsx)(`rect`,{x:r.x,y:r.y,width:r.w,height:r.h,fill:f,opacity:l,rx:2,stroke:s?o:c?h:`none`,strokeWidth:s?1:c?.75:0,style:{cursor:`pointer`},onClick:()=>n({type:`event`,threadId:e.threadId,stepNumber:t.stepNumber,eventIndex:r.eventIndex}),onMouseMove:e=>{let n=[];r.text&&n.push({label:v.toLowerCase(),text:r.text}),u({tooltipData:{title:`Step ${t.stepNumber} · ${m} · ${_} · ${v}`,sections:n},tooltipLeft:e.clientX-p.left,tooltipTop:e.clientY-p.top})},onMouseLeave:d},`e-${r.eventIndex}`)})]},`s-${t.stepNumber}`)}),e.showEnd&&(()=>{let t=Z5(e.status,a);if(!t)return null;let r=g(`thread_end`,e.threadId),i=e.status===`waiting`,s=S?e.status.toUpperCase():e.status===`complete`?`DONE`:e.status===`waiting`?`WT`:e.status===`error`?`ER`:e.status.slice(0,2).toUpperCase();return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`rect`,{x:e.x,y:e.endY,width:e.w,height:20,fill:t.bg,rx:X5,stroke:r?o:`none`,strokeWidth:r?1.5:0,filter:i?`url(#human-glow)`:void 0,style:{cursor:`pointer`},onClick:()=>n({type:`thread_end`,threadId:e.threadId,threadStatus:e.status}),onMouseMove:t=>{let n=e.status===`complete`?`Done`:e.status===`waiting`?`Waiting for human`:e.status===`error`?`Error`:e.status,r=[];e.endText&&r.push({label:e.status===`complete`?`summary`:e.status===`waiting`?`question`:`details`,text:e.endText}),u({tooltipData:{title:`Thread ${f} · ${n}`,sections:r},tooltipLeft:t.clientX-p.left,tooltipTop:t.clientY-p.top})},onMouseLeave:d}),e.w>22&&(0,B.jsx)(`text`,{x:e.x+e.w/2,y:e.endY+20/2,fill:t.fg,fontFamily:`Poppins, sans-serif`,textAnchor:`middle`,dominantBaseline:`central`,style:{pointerEvents:`none`,fontSize:11,fontWeight:600},children:s})]})})()]},e.threadId)})]}),s&&(0,B.jsxs)(m,{left:c,top:l,style:{position:`absolute`,background:a?`#1f1f1f`:`#ffffff`,color:a?`#e8e8e8`:`#222222`,border:`1px solid ${a?`#3a3a3a`:`#d0d0d0`}`,padding:`8px 10px`,borderRadius:`4px`,boxShadow:`0 4px 14px rgba(0,0,0,0.18)`,fontSize:`11px`,fontFamily:`monospace`,lineHeight:1.4,pointerEvents:`none`,maxWidth:`340px`,zIndex:10},children:[(0,B.jsx)(V,{fontWeight:`semibold`,mb:1,children:s.title}),(0,B.jsx)(V,{css:{display:`-webkit-box`,WebkitLineClamp:10,WebkitBoxOrient:`vertical`,overflow:`hidden`},children:s.sections.map((e,t)=>(0,B.jsxs)(V,{mb:+(t<s.sections.length-1),children:[(0,B.jsx)(V,{opacity:.6,fontSize:`10px`,children:e.label}),e.text]},t))}),(0,B.jsx)(V,{opacity:.5,fontSize:`10px`,mt:1,children:`click for full details`})]})]})]})},Zct=45e3,Qct=30,$ct=1200,elt=()=>{let e=Y(oet),[t,n]=cX(l8),r=Y(c8).mode,i=ug(!1,!0),a=(0,_.useRef)(null);if((0,_.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]),(0,_.useEffect)(()=>{a.current&&=(clearTimeout(a.current),null)},[e]),r!==`saved`||e.length===0)return null;let o=e.length,s=t!==null&&t<o,c=t!==null&&t>=o,l=s?()=>{a.current&&=(clearTimeout(a.current),null),n(null)}:()=>{a.current&&clearTimeout(a.current);let t=[...e].map((e,t)=>({i:t,ts:e.timestamp,fi:e.feed_index})).sort((e,t)=>e.ts-t.ts||e.fi-t.fi).map(t=>e[t.i].timestamp),r=t[0]??0,i=t[t.length-1]??r,s=Zct/Math.max(1,(i-r)*1e3);n(0);let c=0,l=()=>{if(c+=1,n(c),c>=o){a.current=null;return}let e=Math.max(0,(t[c]-t[c-1])*1e3),r=Math.max(Qct,Math.min($ct,e*s));a.current=setTimeout(l,r)};a.current=setTimeout(l,100)},u=s?Nue:c?Fue:ng,d=s?`stop (${t}/${o})`:c?`replay again`:`replay`;return(0,B.jsxs)(V,{as:`button`,display:`inline-flex`,alignItems:`center`,gap:`4px`,px:`6px`,py:`2px`,fontSize:`2xs`,fontFamily:`mono`,color:s?`fg`:`fg.muted`,borderRadius:`3px`,cursor:`pointer`,_hover:{color:`fg`,bg:i?`whiteAlpha.100`:`blackAlpha.50`},"aria-label":s?`Stop replay`:c?`Replay again`:`Replay session`,title:s?`Stop playback â restores the full feed`:`Replay this saved session as if it were streaming live`,onClick:l,children:[(0,B.jsx)(u,{size:11}),d]})};function tlt(e){return!e||Object.keys(e).length===0?`idle`:e.running?`running`:e.waiting?`waiting`:e.error?`error`:e.complete?`complete`:`idle`}function nlt(){let[e,t]=(0,_.useState)([]),[n,r]=(0,_.useState)(!1),[i,a]=(0,_.useState)(!1),o=(0,_.useCallback)(async()=>{r(!0);try{let e=await fetch(`${s8}/sessions`);if(!e.ok)return;let n=await e.json();t((Array.isArray(n)?n:n.sessions??[]).map(e=>({id:e.id,dataset_path:e.dataset_path,thread_count:e.thread_count??e.num_threads??(Array.isArray(e.threads)?e.threads.length:0),created_at:e.created_at,
4755status:tlt(e.status_counts)})))}catch{}finally{r(!1),a(!0)}},[]);return(0,_.useEffect)(()=>{o()},[o]),{sessions:e,loading:n,ready:i,refresh:o}}function rlt({options:e,value:t,onChange:n}){return(0,B.jsx)(xh,{gap:2,flexWrap:`wrap`,children:e.map(e=>(0,B.jsxs)(V,{as:`button`,px:2,py:1,fontSize:`xs`,fontFamily:`mono`,border:`1px solid`,borderColor:t===e.value?`fg.muted`:`gray.600`,borderRadius:`sm`,color:t===e.value?`fg`:`fg.muted`,cursor:`pointer`,_hover:{borderColor:`fg.muted`},transition:`border-color 0.15s`,onClick:()=>n(e.value),children:[e.label,(e.desc??e.description)&&(0,B.jsx)(U,{as:`span`,color:`fg.muted`,ml:1,fontSize:`2xs`,children:e.desc??e.description})]},e.value))})}function ilt(){let e=sX(met),t=sX(het),n=sX(get),r=Y(c8),i=ot(),{sessions:a,loading:o,ready:s,refresh:c}=nlt(),l=r.status===`loading`,u=!s,[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(`scout`),[h,g]=(0,_.useState)(``),[v,y]=(0,_.useState)(6),[b,x]=(0,_.useState)([]),[S,C]=(0,_.useState)(``),[w,T]=(0,_.useState)(!1),E=(0,_.useRef)(null),D=(0,_.useCallback)(e=>{l||(i(`/latent-insights/${e}`,{replace:!0}),t(e))},[l,i,t]),O=(0,_.useCallback)(t=>{l||(i(`/latent-insights/${t}`,{replace:!0}),e(t))},[l,i,e]),k=(0,_.useCallback)(e=>{let t=e.target.files?.[0];E.current&&(E.current.value=``),t&&f(t)},[]),A=(0,_.useCallback)(()=>{let e=S.trim();e&&(x(t=>[...t,e]),C(``))},[S]),j=(0,_.useCallback)(e=>{x(t=>t.filter((t,n)=>n!==e))},[]),M=(0,_.useCallback)(async()=>{if(!d||w)return;T(!0);let e={question_source:p,seed_threads:v};h.trim()&&p!==`human`&&(e.scout_context=h.trim()),p!==`scout`&&b.length>0&&(e.initial_questions=b);let r=await n({file:d,config:e});r&&(c(),f(null),i(`/latent-insights/${r}`,{replace:!0}),t(r)),T(!1)},[d,w,p,h,v,b,n,c,i,t]);return(0,B.jsx)(V,{h:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:d?`flex-start`:`center`,bg:`bg.muted`,p:4,overflowY:`auto`,children:(0,B.jsxs)(xh,{maxW:d?`820px`:`480px`,w:`100%`,gap:8,direction:{base:`column`,md:d?`row`:`column`},align:`flex-start`,transition:`max-width 0.2s`,children:[(0,B.jsxs)(Gh,{gap:6,flex:d?1:void 0,w:d?void 0:`100%`,minW:0,alignItems:`flex-start`,children:[(0,B.jsxs)(Gh,{gap:1,alignItems:`flex-start`,children:[(0,B.jsx)(Ll,{as:`h1`,size:`lg`,color:`accent`,fontFamily:`mono`,fontWeight:`600`,children:`Latent Insights`}),(0,B.jsx)(U,{fontSize:`xs`,color:`fg.muted`,fontFamily:`mono`,children:`Run parallel threads of agents to gather insights and answer specific questions from the dataset.`})]}),(0,B.jsxs)(xh,{align:`center`,gap:4,children:[(0,B.jsxs)(V,{as:`label`,display:`inline-flex`,alignItems:`center`,gap:1,px:4,py:1,border:`1px solid`,borderColor:d?`fg.muted`:`gray.600`,borderRadius:`md`,cursor:u?`wait`:`pointer`,fontSize:`xs`,fontFamily:`mono`,color:d?`fg`:`fg.muted`,_hover:u?void 0:{borderColor:`fg.muted`},transition:`border-color 0.15s`,opacity:u?.5:1,pointerEvents:u?`none`:void 0,"aria-disabled":u,children:[u?`Connectingâ¦`:d?d.name:`Select CSV`,(0,B.jsx)(`input`,{ref:E,type:`file`,accept:`.csv`,onChange:k,disabled:u,style:{display:`none`}})]}),(0,B.jsxs)(Eh,{href:K9e,target:`_blank`,rel:`noopener noreferrer`,display:`flex`,alignItems:`center`,gap:1,color:`fg.muted`,fontSize:`xs`,variant:`underline`,fontFamily:`mono`,_hover:{color:`fg`,textDecoration:`none`},children:[(0,B.jsx)(rg,{size:13}),`source`]})]}),(a.length>0||o)&&(0,B.jsxs)(Gh,{gap:2,w:`100%`,alignItems:`flex-start`,children:[(0,B.jsxs)(xh,{gap:2,align:`center`,children:[(0,B.jsx)(U,{fontSize:`xs`,color:`fg.muted`,fontFamily:`mono`,children:`Live sessions`}),o&&(0,B.jsx)(U,{fontSize:`2xs`,color:`fg.muted`,fontFamily:`mono`,children:`loadingâ¦`})]}),a.map(e=>(0,B.jsxs)(V,{as:`button`,w:`100%`,p:4,border:`1px solid`,borderColor:`gray.600`,borderRadius:`md`,textAlign:`left`,cursor:l?`wait`:`pointer`,_hover:{borderColor:`fg.muted`},transition:`border-color 0.15s`,onClick:()=>D(e.id),opacity:l?.5:1,children:[(0,B.jsx)(U,{fontSize:`xs`,fontFamily:`mono`,fontWeight:`bold`,children:e.dataset_path?.split(`/`).pop()??e.id.slice(0,12)}),(0,B.jsxs)(U,{fontSize:`xs`,fontFamily:`mono`,color:`fg.muted`,children:[e.id.slice(0,12),e.thread_count>0?` · ${e.thread_count} threads`:``,` `,`· `,e.status]})]},e.id))]}),(0,B.jsxs)(Gh,{gap:2,w:`100%`,alignItems:`flex-start`,children:[(0,B.jsx)(U,{fontSize:`xs`,color:`fg.muted`,fontFamily:`mono`,children:`Demos`}),net.map(e=>(0,B.jsxs)(V,{as:`button`,w:`100%`,p:4,border:`1px solid`,borderColor:`gray.600`,borderRadius:`md`,textAlign:`left`,cursor:l?`wait`:`pointer`,_hover:{borderColor:`fg.muted`},transition:`border-color 0.15s`,onClick:()=>O(e.id),opacity:l?.5:1,children:[(0,B.jsx)(U,{fontSize:`xs`,fontFamily:`mono`,fontWeight:`bold`,children:e.dataset}),(0,B.jsx)(U,{fontSize:`xs`,fontFamily:`mono`,color:`fg.muted`,children:e.description})]},e.id))]}),r.status===`error`&&(0,B.jsx)(U,{fontSize:`xs`,color:`red.500`,fontFamily:`mono`,children:r.error})]}),d&&(0,B.jsx)(V,{flex:1,minW:0,border:`1px solid`,borderColor:`gray.600`,borderRadius:`md`,p:4,position:{base:`static`,md:`sticky`},top:{md:4},children:(0,B.jsxs)(Gh,{gap:4,alignItems:`flex-start`,w:`100%`,children:[(0,B.jsxs)(xh,{justify:`space-between`,align:`center`,w:`100%`,children:[(0,B.jsx)(U,{fontSize:`xs`,fontFamily:`mono`,fontWeight:`bold`,color:`fg`,children:`Configure analysis`}),(0,B.jsx)(V,{as:`button`,onClick:()=>f(null),color:`fg.muted`,_hover:{color:`fg`},cursor:`pointer`,children:(0,B.jsx)(tg,{size:12})})]}),(0,B.jsx)(U,{fontSize:`2xs`,fontFamily:`mono`,color:`fg.muted`,children:d.name}),(0,B.jsxs)(V,{w:`100%`,children:[(0,B.jsx)(U,{fontSize:`2xs`,fontFamily:`mono`,color:`fg.muted`,mb:1,children:`Question source`}),(0,B.jsx)(rlt,{options:tet,value:p,onChange:m})]}),p!==`human`&&(0,B.jsxs)(V,{w:`100%`,children:[(0,B.jsx)(U,{fontSize:`2xs`,fontFamily:`mono`,color:`fg.muted`,mb:1,children:`Guide analysis direction (optional)`}),(0,B.jsx)(pue,{size:`xs`,variant:`outline`,fontFamily:`mono`,fontSize:`xs`,placeholder:`e.g., Focus on correlations between price and fuel efficiencyâ¦`,value:h,onChange:e=>g(e.target.value),rows:2,resize:`none`})]}),p!==`scout`&&(0,B.jsxs)(V,{w:`100%`,children:[(0,B.jsx)(U,{fontSize:`2xs`,fontFamily:`mono`,color:`fg.muted`,mb:1,children:`Custom questions`}),b.map((e,t)=>(0,B.jsxs)(xh,{gap:2,align:`center`,mb:1,children:[(0,B.jsx)(U,{fontSize:`xs`,fontFamily:`mono`,flex:1,children:e}),(0,B.jsx)(V,{as:`button`,onClick:()=>j(t),color:`fg.muted`,_hover:{color:`red.400`},cursor:`pointer`,flexShrink:0,children:(0,B.jsx)(tg,{size:10})})]},t)),(0,B.jsxs)(xh,{gap:2,children:[(0,B.jsx)(Th,{flex:1,size:`xs`,variant:`outline`,fontFamily:`mono`,fontSize:`xs`,placeholder:`Type a questionâ¦`,value:S,onChange:e=>C(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),A())}}),(0,B.jsxs)(V,{as:`button`,display:`flex`,alignItems:`center`,gap:1,px:2,py:1,fontSize:`xs`,fontFamily:`mono`,color:`fg.muted`,border:`1px solid`,borderColor:`gray.600`,borderRadius:`sm`,cursor:`pointer`,_hover:{borderColor:`fg.muted`},onClick:A,children:[(0,B.jsx)(Iue,{size:10}),` Add`]})]})]}),(0,B.jsxs)(V,{children:[(0,B.jsx)(U,{fontSize:`2xs`,fontFamily:`mono`,color:`fg.muted`,mb:1,children:`Seed threads`}),(0,B.jsx)(Th,{size:`xs`,variant:`outline`,fontFamily:`mono`,fontSize:`xs`,type:`number`,min:1,max:10,w:`60px`,value:v,onCh
4755ange:e=>{let t=Number(e.target.value);y(Number.isFinite(t)&&t>0?t:3)}})]}),(0,B.jsx)(V,{as:`button`,w:`100%`,px:4,py:2,fontSize:`xs`,fontFamily:`mono`,fontWeight:`bold`,border:`1px solid`,borderColor:`fg.muted`,borderRadius:`md`,color:`fg`,cursor:w?`wait`:`pointer`,_hover:{bg:`whiteAlpha.100`},opacity:w?.5:1,onClick:M,children:w?`Startingâ¦`:`Start Analysis`})]})})]})})}var alt=32,olt=240;function Q5({title:e,hint:t,onClick:n,action:r}){let i=!!n;return(0,B.jsxs)(xh,{align:`center`,justify:`space-between`,px:2,pt:2,mb:2,gap:2,role:i?`button`:void 0,cursor:i?`pointer`:`default`,onClick:n,children:[(0,B.jsxs)(U,{as:`div`,fontSize:`xs`,fontWeight:`semibold`,color:`accent`,textAlign:`left`,minW:0,children:[e,t&&(0,B.jsxs)(U,{as:`span`,fontWeight:`normal`,color:`fg.muted`,ml:1,children:[`⢠`,t]})]}),r&&(0,B.jsx)(V,{flexShrink:0,onClick:e=>e.stopPropagation(),children:r})]})}function slt({markdown:e}){let[t,n]=(0,_.useState)(!1);return(0,B.jsxs)(z6,{p:0,overflow:`hidden`,display:`flex`,flexDirection:`column`,children:[(0,B.jsx)(Q5,{title:`Dataset Summary`,hint:`click to ${t?`collapse`:`expand`}`,onClick:()=>n(e=>!e)}),t&&(0,B.jsx)(V,{px:2,pb:2,maxH:`260px`,overflowY:`auto`,children:(0,B.jsx)(J5,{content:e})})]})}function clt(){let e=Y(c8),t=Y(aet),n=Y(cet),r=Y(u8),i=sX(het),a=sX(met),{sessionId:o}=ct(),s=(0,_.useRef)(!1),c=(0,_.useMemo)(()=>{let e=new Set;for(let t of r)t.event_type===`thread_start`&&t.thread_id&&e.add(t.thread_id);return e.size},[r]),l=(0,_.useMemo)(()=>{let e=Math.max(c,1),t=e*65+(e-1)*16+alt;return Math.max(olt,t)},[c]);if((0,_.useEffect)(()=>{s.current||o&&!t&&e.status===`idle`&&(s.current=!0,net.some(e=>e.id===o)?a(o):i(o))},[o,t,e.status,i,a]),e.status===`loading`)return(0,B.jsx)(V,{h:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,bg:`bg.muted`,children:(0,B.jsx)(U,{fontSize:`xs`,color:`fg.muted`,fontFamily:`mono`,children:`Loading sessionâ¦`})});if(!t)return(0,B.jsx)(ilt,{});let u=t.dataset_path?.split(`/`).pop()?.trim()??`Dataset`,d=e.mode===`live`;return(0,B.jsxs)(V,{h:{base:`auto`,md:`100%`},overflow:{base:`auto`,md:`hidden`},display:`flex`,flexDirection:`column`,bg:`bg.muted`,pb:2,children:[(0,B.jsxs)(xh,{px:4,py:4,gap:4,maxW:`100ch`,mx:`auto`,align:`flex-start`,children:[(0,B.jsxs)(V,{as:`button`,onClick:()=>{window.location.hash=`#/latent-insights`,window.location.reload()},display:`flex`,alignItems:`center`,gap:1,color:`fg.muted`,fontSize:`xs`,fontFamily:`mono`,_hover:{color:`fg`},cursor:`pointer`,flexShrink:0,children:[(0,B.jsx)(Kue,{size:11}),`back`]}),(0,B.jsxs)(Gh,{gap:0,align:`flex-start`,flex:1,minW:0,children:[(0,B.jsxs)(xh,{align:`baseline`,gap:2,minW:0,maxW:`100%`,children:[(0,B.jsx)(Ll,{as:`h1`,size:`md`,color:`accent`,fontFamily:`mono`,fontWeight:`600`,lineHeight:`1.1`,flexShrink:0,children:`Latent Insights`}),(0,B.jsxs)(U,{as:`span`,fontSize:`sm`,fontFamily:`mono`,color:`fg.muted`,lineHeight:`1.1`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,minW:0,title:t.dataset_path??u,children:[`· `,u,` (`,c,` threads)`]})]}),(0,B.jsxs)(U,{fontSize:`xs`,color:`fg.muted`,fontFamily:`mono`,minW:0,mt:2,children:[`Parallel-agent data analysis with live thread orchestration, step-level traces, and inline observation feeds.`,` `,(0,B.jsxs)(Eh,{href:K9e,variant:`underline`,target:`_blank`,rel:`noopener noreferrer`,display:`inline-flex`,gap:1,color:`fg.muted`,fontSize:`xs`,fontFamily:`mono`,_hover:{color:`fg`,textDecoration:`none`},children:[(0,B.jsx)(rg,{size:12}),`source`]})]})]})]}),(0,B.jsxs)(V,{flex:1,px:4,pb:2,overflow:{base:`auto`,md:`hidden`},display:`flex`,flexDirection:{base:`column`,md:`row`},gap:4,minH:0,children:[(0,B.jsx)(xh,{flexShrink:0,w:{base:`100%`,md:`${l}px`},maxW:{base:`100%`,md:`calc(50vw - 24px)`},minW:0,minH:{base:`50vh`,md:`100%`},h:{md:`100%`},direction:`column`,gap:2,children:(0,B.jsxs)(z6,{p:0,overflow:`hidden`,display:`flex`,flexDirection:`column`,flex:1,children:[(0,B.jsx)(Q5,{title:`Agent Flow`,hint:`click a node to inspect`,action:(0,B.jsx)(elt,{})}),(0,B.jsx)(V,{flex:1,minH:0,overflow:`hidden`,children:(0,B.jsx)(Xct,{})}),(0,B.jsx)(Kct,{})]})}),(0,B.jsxs)(xh,{flex:1,minW:0,minH:{base:`50vh`,md:`100%`},h:{md:`100%`},direction:`column`,gap:2,"data-feed-panel":!0,children:[n&&(0,B.jsx)(V,{flexShrink:0,children:(0,B.jsx)(slt,{markdown:n})}),(0,B.jsxs)(z6,{p:0,overflow:`hidden`,display:`flex`,flexDirection:`column`,flex:1,minH:0,children:[(0,B.jsx)(Q5,{title:`Agent Actions`,hint:`click a row to expand`,action:(0,B.jsx)(qct,{})}),(0,B.jsx)(V,{flex:1,minW:0,maxW:`100%`,overflow:`hidden`,children:(0,B.jsx)(Ict,{})})]}),d&&(0,B.jsx)(kct,{sessionId:t.id,selectedThreadId:e.selectedNode?.threadId})]})]})]})}function llt(){let e=sX(f8);return(0,_.useEffect)(()=>()=>e(),[e]),null}function ult(){return(0,B.jsx)(gg,{children:(0,B.jsxs)(nX,{children:[(0,B.jsx)(llt,{}),(0,B.jsx)(clt,{})]})})}function $5(e){if(e==null)return[];if(Array.isArray(e))return e;if(typeof e.toArray==`function`)return e.toArray();if(typeof e.length==`number`&&typeof e.get==`function`){let t=[];for(let n=0;n<e.length;n++)t.push(e.get(n));return t}return[e]}function e7(e){return e?typeof e.toArray==`function`?e.toArray():Array.isArray(e)?e:[]:[]}function t7(e){let t=e7(e);return t.length?t[0]:null}function n7(e){return $5(e).map(e=>e==null?``:String(e))}function dlt(e,t){let[n,r]=e.size<t.size?[e,t]:[t,e],i=!1;
4755return n.forEach(e=>{!i&&r.has(e)&&(i=!0)}),i}var flt=8,r7={qwen:{key:`qwen`,label:`Qwen2.5 · math + hotpotqa`,parquetUrl:`/data/trajectory-atlas/qwen-hotpotqa-math.parquet`},deepswe:{key:`deepswe`,label:`DeepSWE · Kimi-K2`,parquetUrl:`/data/trajectory-atlas/deepswe-kimi.parquet`}},plt={id:`ta-ui-filter`};function mlt(e){return e.replace(/'/g,`''`)}function hlt(){return new URLSearchParams(window.location.hash.split(`?`)[1]||``).get(`source`)===`deepswe`?`deepswe`:`qwen`}var i7=J({status:`idle`}),a7=J(null),o7=J(null),s7=J(null),c7=J(hlt()),l7=J(``),u7=J(`all`),d7=J(3),f7=J(null),p7=J(null),m7=J(!1),h7=J(!1),g7=J(0),glt=J({n:0,pass:0,avgSteps:0,avgTokens:0}),_lt=J(e=>e(i7).status===`ready`),vlt=J(()=>r7),_7=J(flt);J(e=>r7[e(c7)]);var ylt=J(e=>{let t=[],n=e(u7),r=e(l7);if(n!==`all`&&t.push(`outcome = '${mlt(n)}'`),r.trim()){let e=mlt(r.trim().toLowerCase());t.push(`(lower(id) LIKE '%${e}%' OR lower(task) LIKE '%${e}%' OR lower(model) LIKE '%${e}%')`)}return t.length?`id IN (SELECT id FROM trajectories WHERE ${t.join(` AND `)})`:null}),blt=J(e=>e(l7).trim().length>0||e(u7)!==`all`||e(f7)!==null||e(m7)||e(h7));async function xlt(e,t){let n=`${window.location.origin}${r7[t].parquetUrl}`;await e.exec(` 4756 CREATE TABLE trajectories AS SELECT * FROM read_parquet('${n}') 4757 `),await e.exec(` 4758 CREATE TABLE steps AS 4759 SELECT t.id AS id, 4760 t.outcome AS outcome, 4761 s.idx AS step_idx, 4762 s.name AS name, 4763 s.tokens AS tokens, 4764 s.duration AS duration, 4765 s.ok AS ok 4766 FROM trajectories t, UNNEST(t.steps) AS u(s) 4767 `)}async function Slt(e){let t=Array.from({length:flt},(e,t)=>`step_${t+1}`),n=t.map((e,t)=>`COUNT(*) FILTER (WHERE ${e} IS NOT NULL AND ${e} <> '(none)') AS ge_${t+1}`),r=t7(await e.query(`SELECT ${n.join(`, `)} FROM trajectories`)),i=1;for(let e=0;e<t.length;e++)Number(r?.[`ge_${e+1}`]??0)>0&&(i=e+1);return Math.max(2,i)}var v7=J(null,async(e,t)=>{let n=e(a7);if(!n)return;let r=e(ylt),i=t7(await n.query(` 4768 SELECT 4769 COUNT(*) AS n, 4770 SUM(CASE WHEN outcome = 'success' THEN 1 ELSE 0 END) AS pass, 4771 AVG(step_count) AS avg_steps, 4772 AVG(tokens) AS avg_tokens 4773 FROM trajectories 4774 ${r?`WHERE ${r}`:``} 4775 `));t(glt,{n:Number(i?.n??0),pass:Number(i?.pass??0),avgSteps:Number(i?.avg_steps??0),avgTokens:Number(i?.avg_tokens??0)})}),Clt=J(null,e=>{let t=e(o7);if(!t)return;let n=e(ylt);t.update({source:plt,clients:new Set,value:n,predicate:n?ok(`(${n})`):null})}),wlt=J(null,async(e,t,n)=>{let r=e(a7);if(r&&e(s7)!==n)try{t(i7,{status:`loading-parquet`,message:r7[n].label}),await r.exec(`DROP TABLE IF EXISTS steps`),await r.exec(`DROP TABLE IF EXISTS trajectories`),await xlt(r,n),t(s7,n),t(l7,``),t(u7,`all`),t(p7,null),t(f7,null);let e=await Slt(r);t(_7,e),t(d7,t=>Math.min(t,e)),await t(v7),t(i7,{status:`ready`})}catch(e){console.error(`source switch failed:`,e),t(i7,{status:`error`,message:e instanceof Error?e.message:`Unknown error`})}}),Tlt=J(null,(e,t)=>{t(l7,``),t(u7,`all`),t(f7,null),t(p7,null),t(m7,!1),t(h7,!1),t(g7,e=>e+1)}),Elt=J(null,async(e,t)=>{if(!e(a7))try{t(i7,{status:`initializing`});let n=XL({duckdb:await i0()}),r=new Xj(n,{cache:!1,preagg:{enabled:!1}});Yj(r).databaseConnector(n),t(a7,r),t(o7,rM.crossfilter());let i=e(c7);t(i7,{status:`loading-parquet`,message:r7[i].label}),await xlt(r,i),t(s7,i),t(i7,{status:`creating-tables`,table:`steps`});let a=await Slt(r);t(_7,a),t(d7,e=>Math.min(e,a)),await t(v7),t(i7,{status:`ready`})}catch(e){console.error(`TrajectoryAtlas init failed:`,e),t(i7,{status:`error`,message:e instanceof Error?e.message:`Unknown error`})}});Elt.onMount=e=>{e()};function Dlt(e,t){let n=mg[e]??mg.gray;return t?n.dark:n.light}var Olt={plan:`Plan`,search:`Search`,read:`Read`,edit:`Edit`,exec:`Execute`,tool:`API`,verify:`Verify`,submit:`Submit`,error:`Error`,task:`Task`,observation:`Observation`,thought:`Thought`},klt={success:`green`,partial:`orange`,fail:`red`},Alt=[`blue`,`cyan`,`pink`,`purple`,`lightBlue`,`brown`,`teal`,`gray`],jlt=[`exec`,`read`,`edit`,`search`,`tool`,`plan`,`verify`,`submit`,`task`,`thought`,`observation`,`error`];function Mlt(e){let t=jlt.indexOf(e);return t<0?`gray`:Alt[t%Alt.length]}function Nlt(e){return e?`#4a5568`:`#a0aec0`}var y7=[`success`,`partial`,`fail`],Plt=[[/^(task|user_task)$/,`task`],[/^(observation|user_observation|tool_response)$/,`observation`],[/^(thought|think|thinking)$/,`thought`],[/^(final_answer|submit|finish|done)$/,`submit`],[/^(web_search|google_search|bing_search|duckduckgo_search)$/,`search`],[/^(grep_search|codebase_search|find_file|grep|search)$/,`search`],[/^(visit_webpage|read_file|open_url|view_image)$/,`read`],[/^file_editor\.view$/,`read`],[/^file_editor\.(str_replace|create|insert|write)$/,`edit`],[/^(write_file|str_replace|patch|edit|create_file|append_file|file_editor)$/,`edit`],[/^(execute_bash|bash|python|run_tests|pytest|run_code|shell)$/,`exec`],[/^(solve|simplify|symbols|Rational|Fraction|Eq|integrate|limit|factor|factorial|comb|sqrt|sin|cos|tan|log|exp|sympify|gcd|limit_denominator|create)$/,`exec`],[/^(api_call|sql_query|calculator|requests|httpx|fetch)$/,`tool`],[/^(assert|diff_check|lint|verify)$/,`verify`],[/^(Read|LS|Glob|NotebookRead|view_file|cat|head|tail)$/,`read`],[/^(Grep|ripgrep|rg|search_files)$/,`search`],[/^(Edit|Write|MultiEdit|NotebookEdit|apply_patch|update_file|str_replace_based_edit_tool)$/,`edit`],[/^(Bash|BashOutput|KillBash|KillShell|run_command|terminal)$/,`exec`],[/^(Task|Agent|dispatch_agent|subagent|spawn_agent)$/,`tool`],[/^(TodoWrite|update_plan|ExitPlanMode)$/,`plan`],[/^(WebFetch|visit_url)$/,`read`],[/^WebSearch$/,`search`],[/^browser_(snapshot|screenshot|read|extract)$/,`read`],[/^browser_(navigate|click|type|select|scroll|hover|press|fill)$/,`tool`]];function Flt(e,t=!1){let n=e===0?`1st`:e===1?`2nd`:e===2?`3rd`:`${e+1}th`;return t?n:e===0?`Entry tool`:`${n} tool`}function b7(e){for(let[t,n]of Plt)if(t.test(e))return n;return`tool`}function x7(e){return`chart.${Mlt(e)}`}function Ilt(e,t){return Dlt(Mlt(e),t)}function Llt(e){return`chart.${klt[e]??`gray`}`}function Rlt(e,t){return Dlt(klt[e]??`gray`,t)}function zlt(e,t){let n=Math.max(0,Math.min(1,e));return t?`oklch(${22+n*60}% 0.04 75)`:`oklch(${96-n*54}% ${.01+n*.11} 245)`}function Blt({outcome:e}){let t=Llt(e);return(0,B.jsx)(V,{as:`span`,display:`inline-flex`,alignItems:`center`,fontSize:`10px`,fontWeight:`medium`,textTransform:`uppercase`,letterSpacing:`0.05em`,px:2,py:`2px`,borderRadius:`full`,color:t,bg:`color-mix(in oklab, var(--chakra-colors-${t.replace(`.`,`-`)}) 18%, transparent)`,children:e})}function Vlt({traj:e,onClose:t}){return(0,B.jsx)(cle,{open:e!=null,onOpenChange:e=>{e.open||t()},placement:`end`,size:`sm`,children:(0,B.jsxs)(mp,{children:[(0,B.jsx)(mle,{}),(0,B.jsx)(ule,{children:(0,B.jsx)(dle,{children:e&&(0,B.jsx)(Hlt,{traj:e})})})]})})}function Hlt({traj:e}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(gle,{children:(0,B.jsxs)(xh,{justify:`space-between`,align:`flex-start`,gap:4,w:`100%`,children:[(0,B.jsxs)(V,{minW:0,children:[(0,B.jsx)(U,{fontSize:`xs`,color:`fg.subtle`,fontFamily:`mono`,mb:1,children:e.id}),(0,B.jsx)(fle,{fontSize:`sm`,fontWeight:`medium`,color:`fg`,children:e.task})]}),(0,B.jsx)(ple,{asChild:!0,children:(0,B.jsx)(hh,{size:`xs`})})]})}),(0,B.jsxs)(hle,{p:0,children:[(0,B.jsxs)(Fa,{templateColumns:`repeat(2, minmax(0, 1fr))`,rowGap:4,columnGap:4,px:4,py:4,borderBottom:`1px solid`,borderColor:`gray.subtle`,children:[(0,B.jsx)(S7,{label:`model`,value:e.model,mono:!0}),(0,B.jsx)(S7,{label:`dataset`,value:e.dataset}),(0,B.jsx)(S7,{label:`outcome`,value:(0,B.jsx)(Blt,{outcome:e.outcome})}),(0,B.jsx)(S7,{label:`steps`,value:e.step_count,mono:!0}
4775),(0,B.jsx)(S7,{label:`tokens`,value:e.tokens.toLocaleString(),mono:!0}),(0,B.jsx)(S7,{label:`reward`,value:e.reward.toFixed(2),mono:!0})]}),(0,B.jsx)(U,{fontSize:`11px`,fontWeight:`semibold`,color:`fg.muted`,textTransform:`uppercase`,letterSpacing:`0.05em`,px:4,pt:4,pb:2,children:`Trajectory steps`}),(0,B.jsx)(V,{px:4,pb:4,children:e.steps.map((e,t)=>(0,B.jsxs)(Fa,{templateColumns:`28px 4px minmax(0, 1.4fr) minmax(0, 1fr) auto`,gap:2,alignItems:`center`,py:1.5,borderBottom:`1px solid`,borderColor:`bg.subtle`,fontSize:`xs`,color:e.ok?`fg`:`red.500`,children:[(0,B.jsx)(U,{fontFamily:`mono`,fontSize:`10px`,color:`fg.subtle`,children:String(t+1).padStart(2,`0`)}),(0,B.jsx)(V,{w:`4px`,h:`16px`,borderRadius:`2px`,bg:x7(b7(e.name))}),(0,B.jsx)(U,{fontFamily:`mono`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,children:e.name||e.tool}),(0,B.jsx)(U,{fontSize:`11px`,color:`fg.muted`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,children:e.role}),(0,B.jsxs)(xh,{align:`center`,gap:1,fontFamily:`mono`,fontSize:`10px`,color:`fg.subtle`,children:[e.tokens,`t`,!e.ok&&(0,B.jsx)(jue,{size:11})]})]},t))})]})]})}function S7({label:e,value:t,mono:n}){return(0,B.jsxs)(V,{minW:0,children:[(0,B.jsx)(U,{color:`fg.subtle`,textTransform:`uppercase`,letterSpacing:`0.05em`,fontSize:`10px`,mb:1,children:e}),(0,B.jsx)(V,{color:`fg`,fontFamily:n?`mono`:void 0,fontSize:`sm`,wordBreak:`break-word`,children:t})]})}var Ult={fontSize:12,fontWeight:500},C7={fontSize:11,fontWeight:400,opacity:.65},Wlt={fontSize:11,fontWeight:600,letterSpacing:`0.06em`,textTransform:`uppercase`};function w7(e){return e?`#f7fafc`:`#1a202c`}function T7(e){return{stroke:e?`#1a202c`:`#ffffff`,strokeWidth:3,strokeLinejoin:`round`,paintOrder:`stroke`}}function Glt(e){return e?`#1a202c`:`#ffffff`}function E7(e){return e?`#a0aec0`:`#718096`}function D7(e,t=260){return{position:`absolute`,background:e?`#1a202c`:`#ffffff`,color:w7(e),border:`1px solid ${e?`#2d3748`:`#e2e8f0`}`,borderRadius:6,boxShadow:`0 4px 12px rgba(0,0,0,.18)`,padding:`8px 10px`,fontSize:`0.8rem`,pointerEvents:`none`,width:t,maxWidth:t,zIndex:5,lineHeight:1.5,whiteSpace:`normal`,wordBreak:`break-all`}}var O7={fontWeight:600,marginBottom:4};function k7(e){return{display:`flex`,justifyContent:`space-between`,color:e?`#cbd5e0`:`#4a5568`}}function Klt(e){return{marginTop:6,fontSize:11,color:E7(e),fontFamily:`ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`}}var qlt=`(none)`,Jlt=()=>`var(--ta-fg-subtle)`;function Ylt({coordinator:e,table:t,idCol:n,columns:r,selection:i,whereExpr:a,palette:o=Jlt,orderings:s,dark:c=!1,maxNodesPerColumn:l,align:u=`bottom`,dropoffLabels:d=!1,nodeOrder:f=`count`,highlightedTrajIds:p,onLinkClick:m,resetSignal:h,onSelectionStateChange:g}){let v=(0,_.useRef)(null),[y,b]=(0,_.useState)({w:0,h:0}),[x,S]=(0,_.useState)([]),[C,w]=(0,_.useState)([]),[T,E]=(0,_.useState)(null),[D,O]=(0,_.useState)(null),[k,A]=(0,_.useState)(null);(0,_.useEffect)(()=>A(null),[r]);let j=e=>A(t=>t===e?null:e),M=(0,_.useRef)({id:`sankey-mosaic-client`});(0,_.useLayoutEffect)(()=>{if(!v.current)return;let e=new ResizeObserver(e=>{let t=e[0];b({w:t.contentRect.width,h:t.contentRect.height})});return e.observe(v.current),()=>e.disconnect()},[]);let[N,P]=(0,_.useState)(0);(0,_.useEffect)(()=>{if(!i)return;let e=()=>P(e=>e+1);return i.addEventListener(`value`,e),()=>i.removeEventListener(`value`,e)},[i]),(0,_.useEffect)(()=>{h!==void 0&&(O(null),A(null),g?.(!1),i&&i.update(QL([n],void 0,{source:M.current,clients:new Set})))},[h]),(0,_.useEffect)(()=>{if(!e||r.length<2)return;let o=!1,s=Zlt(i,M.current),c=Xlt(a??null,s),u=` 4776 WITH traj_cols AS ( 4777 SELECT ${n} AS traj_id, 4778 ${r.map(e=>`${e.expr} AS ${A7(e.name)}`).join(`, 4779 `)} 4780 FROM ${t} 4781 ${c?`WHERE ${c}`:``} 4782 GROUP BY ${n} 4783 ) 4784 `,d=r.length-1,f=[];for(let e=0;e<d;e++)f.push({i:e,j:e+1}),e+1<d&&f.push({i:e,j:d});let p=`'${qlt.replace(/'/g,`''`)}'`,m=e=>`${A7(r[e].name)} IS NOT NULL AND ${A7(r[e].name)} <> ${p}`,h=e=>`${A7(r[e].name)} = ${p}`;return(async()=>{try{let t=r.map((e,t)=>`SELECT ${t} AS col_i, ${A7(e.name)} AS key, COUNT(*) AS n 4785 FROM traj_cols WHERE ${m(t)} GROUP BY 1, 2`).join(` 4786UNION ALL 4787`),[n,i]=await Promise.all([e.query(`${u}\n${t}\nORDER BY col_i, n DESC`).then(e=>e7(e)),Promise.all(f.map(({i:t,j:n})=>{let i=[];for(let e=t+1;e<n;e++)i.push(h(e));let a=[m(t),m(n),...i].join(` AND `);return e.query(` 4788 ${u} 4789 SELECT ${A7(r[t].name)} AS from_key, 4790 ${A7(r[n].name)} AS to_key, 4791 COUNT(*) AS n, ARRAY_AGG(traj_id) AS traj_ids 4792 FROM traj_cols 4793 WHERE ${a} 4794 GROUP BY 1, 2 ORDER BY 1, 2 4795 `).then(e=>({i:t,j:n,rows:e7(e)}))}))]);if(o)return;let a=[];for(let e of n)a.push({col:Number(e.col_i??0),key:String(e.key??``),count:Number(e.n??0),trajIds:new Set});let s=[];for(let{i:e,j:t,rows:n}
4795of i)for(let r of n)s.push({fromCol:e,toCol:t,from:String(r.from_key??``),to:String(r.to_key??``),count:Number(r.n??0),trajIds:new Set($5(r.traj_ids).map(String))});if(typeof l==`number`&&l>1){let e=cut(a,s,r,l);a=e.nodes,s=e.links}S(a),w(s)}catch(e){console.error(`[SankeyMosaicClient] query error:`,e)}})(),()=>{o=!0}},[N,e,t,n,r,a,i,l]);let F=(0,_.useMemo)(()=>iut(r,x,C,y.w,y.h,s,o,u,d,f,k),[r,x,C,y.w,y.h,s,o,u,d,f,k]),ee=(0,_.useMemo)(()=>{let e=new Map;for(let t of F.nodes)e.has(t.col)||e.set(t.col,{x:t.x,w:t.w});let t=Array.from(e.entries()).sort((e,t)=>e[1].x-t[1].x),n=new Map;return t.forEach(([e,{x:i,w:a}],o)=>{if(e===r.length-1){let r=t[o-1]?.[1];n.set(e,i-6-(r?r.x+r.w+6:0))}else{let r=t[o+1]?.[1].x??y.w;n.set(e,r-(i+a+6)-6)}}),n},[F.nodes,r.length,y.w]),te=(0,_.useMemo)(()=>{if(!d)return new Map;let e=r.length-1,t=new Map;for(let n of C)n.toCol===e&&n.fromCol<e-1&&t.set(n.fromCol,(t.get(n.fromCol)??0)+n.count);return t},[d,C,r.length]);function ne(e){return D!==null&&D.col===e.fromCol&&D.toCol===e.toCol&&D.from===e.from&&D.to===e.to}function I(e){let t=ne(e)?null:{col:e.fromCol,toCol:e.toCol,from:e.from,to:e.to};if(O(t),g?.(t!==null),i)if(t===null)i.update(QL([n],void 0,{source:M.current,clients:new Set}));else{let t=Array.from(e.trajIds).map(e=>[e]);i.update(QL([n],t,{source:M.current,clients:new Set}))}m?.(e.fromCol,e.from,e.to,Array.from(e.trajIds))}let re=Math.min(.2,Math.max(.08,.2-(r.length-4)*.006)),ie=Math.max(.03,re*.15),ae=r.length<=20,oe=r.length-1,se=e=>(F.cols[e+1]?.x??y.w)-(F.cols[e]?.x??0),ce=(0,_.useMemo)(()=>{let e=new Map;for(let t of F.nodes){let n=e.get(t.col);(n===void 0||t.y<n)&&e.set(t.col,t.y)}return e},[F.nodes]);return(0,B.jsxs)(`div`,{ref:v,style:{width:`100%`,height:`100%`,position:`relative`},children:[(0,B.jsx)(`svg`,{width:y.w,height:y.h,style:{display:`block`},children:(0,B.jsxs)(bg,{children:[F.cols.map((e,t)=>{if(!F.nodes.some(e=>e.col===t))return null;let n=t===0?0:(F.cols[t-1].x+F.cols[t-1].w+e.x)/2,r=t===oe?y.w:(e.x+e.w+F.cols[t+1].x)/2,i=k===t;return(0,B.jsx)(`rect`,{x:n,y:0,width:Math.max(0,r-n),height:y.h,fill:i?c?`rgba(255,255,255,0.04)`:`rgba(0,0,0,0.04)`:`transparent`,style:{cursor:`pointer`},onClick:()=>j(t)},`f-${t}`)}),F.links.map((e,t)=>{let n=ne(e),r=p&&dlt(e.trajIds,p),i=T?.kind===`link`&&T.lk===e,a=T?.kind===`node`&&(T.n.col===e.fromCol&&T.n.key===e.from||T.n.col===e.toCol&&T.n.key===e.to),o=ae&&T!=null&&!i&&!a||D!==null&&!n||p!=null&&!r,s=i||a||n||r;return(0,B.jsx)(`path`,{d:sut(e.x0,e.y0,e.t0,e.x1,e.y1,e.t1),fill:e.color,opacity:s?.85:o?ie:re,style:{cursor:`pointer`,transition:`opacity .15s`},onClick:()=>I(e),onMouseEnter:()=>E({kind:`link`,lk:e}),onMouseLeave:()=>E(null)},`l-${t}`)}),F.nodes.map((e,t)=>{let n=(se(e.col)>=40&&r.length<=20||k===e.col||e.col===oe)&&(e.h>=10||e.key===M7)?out(e.label,e.count.toLocaleString(),ee.get(e.col)??0):null,i=T?.kind===`node`&&T.n===e,a=ae&&T!=null&&!i&&!(T.kind===`link`&&(T.lk.fromCol===e.col&&T.lk.from===e.key||T.lk.toCol===e.col&&T.lk.to===e.key));return(0,B.jsxs)(bg,{children:[(0,B.jsx)(vb,{x:e.x,y:e.y,width:e.w,height:Math.max(1,e.h),fill:e.color,rx:2,opacity:a?.25:.95,style:{cursor:`pointer`,transition:`opacity .15s`},onMouseEnter:()=>E({kind:`node`,n:e}),onMouseLeave:()=>E(null),onClick:()=>j(e.col)}),n&&(0,B.jsxs)(`text`,{x:e.col===oe?e.x-6:e.x+e.w+6,y:e.y+e.h/2+4,fill:w7(c),textAnchor:e.col===oe?`end`:`start`,pointerEvents:`none`,style:{...Ult,...T7(c)},opacity:a?.4:1,children:[n.text,e.h>=12&&n.showCount&&(0,B.jsx)(`tspan`,{dx:`6`,style:C7,children:e.count.toLocaleString()})]})]},`n-${t}`)}),r.map((e,t)=>{let n=ce.get(t);if(n===void 0)return null;let i=t===oe,a=k===t,o=a||i||t===0,s=r.length>30?5:r.length>16?2:1;if(!o&&(t%s!==0||se(t)<28))return null;let l=F.cols[t];return(0,B.jsx)(`text`,{x:i?l.x+l.w:l.x,y:Math.max(12,n-16),fill:a?w7(c):E7(c),textAnchor:i?`end`:`start`,style:{...Wlt,...T7(c),fontWeight:a?700:void 0,cursor:`pointer`},onClick:()=>j(t),children:e.label??e.name},`h-${t}`)}),d&&r.length<=10&&r.map((e,t)=>{let n=te.get(t),r=ce.get(t);if(!n||r===void 0)return null;let i=n.toLocaleString(),a=`â³ ${i} end here`,o=`â³ ${i}`,s=se(t)-4,l=a.length*j7<=s?a:o.length*j7<=s?o:null;return l?(0,B.jsx)(`text`,{x:F.cols[t].x,y:Math.max(24,r-4),fill:E7(c),textAnchor:`start`,pointerEvents:`none`,style:{...C7,...T7(c)},children:l},`d-${t}`):null})]})}),T?.kind===`link`&&(0,B.jsxs)(`div`,{style:{...D7(c,220),left:Math.min((T.lk.x0+T.lk.x1)/2,Math.max(0,y.w-240)),top:Math.max(0,Math.min((T.lk.y0+T.lk.y1)/2-10,y.h-80))},children:[(0,B.jsxs)(`div`,{style:O7,children:[T.lk.from===M7?`other`:T.lk.from,` â `,T.lk.to===M7?`other`:T.lk.to]}),(0,B.jsxs)(`div`,{style:k7(c),children:[(0,B.jsx)(`span`,{children:`trajectories`}),(0,B.jsx)(`b`,{style:{color:`inherit`,fontWeight:500}
4795,children:T.lk.count.toLocaleString()})]})]}),T?.kind===`node`&&(0,B.jsxs)(`div`,{style:{...D7(c,220),left:Math.min(T.n.x+T.n.w+10,Math.max(0,y.w-240)),top:Math.max(0,Math.min(T.n.y+T.n.h/2-10,y.h-80))},children:[(0,B.jsxs)(`div`,{style:O7,children:[T.n.label,(0,B.jsxs)(`span`,{style:{color:E7(c),marginLeft:6,fontWeight:400},children:[`·`,` `,r[T.n.col]?.label??r[T.n.col]?.name??``]})]}),(0,B.jsxs)(`div`,{style:k7(c),children:[(0,B.jsx)(`span`,{children:`trajectories`}),(0,B.jsx)(`b`,{style:{color:`inherit`,fontWeight:500},children:T.n.count.toLocaleString()})]}),(0,B.jsxs)(`div`,{style:k7(c),children:[(0,B.jsx)(`span`,{children:`share of column`}),(0,B.jsx)(`b`,{style:{color:`inherit`,fontWeight:500},children:(()=>{let e=F.nodes.filter(e=>e.col===T.n.col).reduce((e,t)=>e+t.count,0);return e>0?`${(T.n.count/e*100).toFixed(1)}%`:`â`})()})]})]})]})}function A7(e){return`"${e.replace(/"/g,`""`)}"`}function Xlt(e,t){return e&&t?`(${e}) AND (${t})`:e??t??null}function Zlt(e,t){if(!e)return null;let n=e.clauses??[],r=[];for(let e of n){if(e?.source===t)continue;let n=e?.predicate?.toString?.();typeof n==`string`&&n.trim()&&r.push(`(${n})`)}return r.length?r.join(` AND `):null}var Qlt=14,$lt=4,eut=4,tut=32,nut=10;function rut(e,t,n,r){if(e<=0)return[];let i=Qlt;e*Qlt+Math.max(0,e-1)*eut>t&&(i=Math.max($lt,(t-Math.max(0,e-1)*eut)/e));let a=Array.from({length:e},(e,t)=>t===r?Math.max(i,tut):i),o=a.reduce((e,t)=>e+t,0),s=Math.max(0,t-o),c=Array.from({length:Math.max(0,e-1)},(e,t)=>r!=null&&(t===r-1||t===r)?nut:1),l=c.reduce((e,t)=>e+t,0)||1,u=c.map(e=>s*e/l),d=[],f=n;for(let t=0;t<e;t++)d.push({x:f,w:a[t]}),f+=a[t]+(t<e-1?u[t]:0);return d}function iut(e,t,n,r,i,a,o,s,c=!1,l=`count`,u=null){if(!t.length||!e.length)return{nodes:[],links:[],cols:[]};let d=c?28:20,f=Math.max(0,r-8-8),p=Math.max(0,i-d-8),m=e.length,h=rut(m,f,8,u!=null&&u>=0&&u<m?u:null),g={};for(let e of t)(g[e.col]??=[]).push(e);for(let t=0;t<m;t++){let n=e[t],r=g[t]??[],i=a?.[n.name];i&&i.length?r.sort((e,t)=>{let n=i.indexOf(e.key),r=i.indexOf(t.key);return(n<0?1e9:n)-(r<0?1e9:r)||t.count-e.count}):r.sort((e,t)=>t.count-e.count)}if(l===`barycenter`){let t=[],r=e=>{let n=new Map,r=g[e]??[],i=r.reduce((e,t)=>e+t.count,0)||1,a=0;for(let e of r)n.set(e.key,(a+e.count/2)/i),a+=e.count;t[e]=n};for(let e=0;e<m;e++)r(e);let i=i=>{if(a?.[e[i].name]?.length)return;let o=g[i]??[];if(o.length<2)return;let s=new Map;for(let e of o){let r=0,a=0;for(let o of n){let n=null;if(o.fromCol===i&&o.from===e.key?n={col:o.toCol,key:o.to}:o.toCol===i&&o.to===e.key&&(n={col:o.fromCol,key:o.from}),!n)continue;let s=t[n.col]?.get(n.key);s!==void 0&&(r+=s*o.count,a+=o.count)}
4795s.set(e.key,a>0?r/a:t[i].get(e.key)??.5)}o.sort((e,t)=>s.get(e.key)-s.get(t.key)||t.count-e.count),r(i)};for(let e=0;e<3;e++){for(let e=1;e<m;e++)i(e);for(let e=m-2;e>=0;e--)i(e)}}let _=1/0;for(let e=0;e<m;e++){let t=g[e]??[];if(!t.length)continue;let n=t.reduce((e,t)=>e+t.count,0);if(n<=0)continue;let r=Math.max(0,t.length-1),i=Math.max(1,p-r*8)/n;i<_&&(_=i)}(!Number.isFinite(_)||_<=0)&&(_=p);let v=[],y=new Map,b=d+p;for(let t=0;t<m;t++){let n=e[t],r=g[t]??[];if(!r.length)continue;let i=r.reduce((e,t)=>e+t.count,0),a=Math.max(0,r.length-1),c=i*_+a*8,l=s===`top`?d:b-c,u=h[t];for(let e of r){let r=Math.max(1,e.count*_),i={...e,x:u.x,y:l,w:u.w,h:r,label:e.key===M7?`other`:e.key,color:e.key===M7?`#9498A0`:o(n.name,e.key)};v.push(i),y.set(`${t}|${e.key}`,i),l+=r+8}}let x=n.filter(e=>y.has(`${e.fromCol}|${e.from}`)&&y.has(`${e.toCol}|${e.to}`)),S=e=>y.get(`${e.fromCol}|${e.from}`),C=e=>y.get(`${e.toCol}|${e.to}`),w=(e,t)=>{let n=new Map;for(let t of x){let r=e(t);(n.get(r)??n.set(r,[]).get(r)).push(t)}let r=new Map;for(let[e,i]of n){i.sort((e,n)=>t(e).y-t(n).y||t(e).x-t(n).x);let n=0;for(let t of i)r.set(t,n),n+=t.count/(e.count||1)*e.h}return r},T=w(S,C),E=w(C,S),D=x.map(e=>{let t=S(e),n=C(e);return{...e,x0:t.x+t.w,y0:t.y+(T.get(e)??0),x1:n.x,y1:n.y+(E.get(e)??0),t0:e.count/(t.count||1)*t.h,t1:e.count/(n.count||1)*n.h,color:n.color}});return D.sort((e,t)=>t.count-e.count),{nodes:v,links:D,cols:h}}var aut=6.5,j7=6.2;function out(e,t,n){let r=e.length*aut;if(r+6+t.length*j7<=n)return{text:e,showCount:!0};if(r<=n)return{text:e,showCount:!1};let i=Math.max(4,Math.floor(n/aut));return i>=e.length?{text:e,showCount:!1}:{text:`${e.slice(0,i-1)}â¦`,showCount:!1}}function sut(e,t,n,r,i,a){let o=(e+r)/2;return[`M${e},${t}`,`C${o},${t} ${o},${i} ${r},${i}`,`L${r},${i+a}`,`C${o},${i+a} ${o},${t+n} ${e},${t+n}`,`Z`].join(` `)}var M7=`__other__`;function cut(e,t,n,r){let i=n.map(()=>new Set),a={};for(let t of e)(a[t.col]??=[]).push(t);let o=[];for(let e=0;e<n.length;e++){let t=(a[e]??[]).slice().sort((e,t)=>t.count-e.count);if(t.length<=r){t.forEach(t=>i[e].add(t.key)),o.push(...t);continue}let n=t.slice(0,r-1),s=t.slice(r-1);n.forEach(t=>i[e].add(t.key));let c=new Set,l=0;for(let e of s)l+=e.count,e.trajIds.forEach(e=>c.add(e));o.push(...n,{col:e,key:M7,count:l,trajIds:c})}let s=new Map;for(let e of t){let t=i[e.fromCol].has(e.from)?e.from:M7,n=i[e.toCol]?.has(e.to)?e.to:M7,r=`${e.fromCol}|${t}|${e.toCol}|${n}`,a=s.get(r);a?(a.count+=e.count,e.trajIds.forEach(e=>a.trajIds.add(e))):s.set(r,{fromCol:e.fromCol,toCol:e.toCol,from:t,to:n,count:e.count,trajIds:new Set(e.trajIds)})}return{nodes:o,links:Array.from(s.values())}}var lut={outcome:y7};function uut(){let e=Y(a7),t=Y(o7),n=Y(f7),r=Y(d7),i=Y(g7),a=sX(h7),{colorMode:o}=lg(),s=o===`dark`,c=(0,_.useMemo)(()=>[...Array.from({length:r},(e,t)=>({name:`step_${t+1}`,label:Flt(t),expr:`any_value(step_${t+1})`})),{name:`outcome`,label:`Outcome`,expr:`any_value(outcome)`}],[r]),l=(0,_.useMemo)(()=>(e,t)=>e===`outcome`?Rlt(t,s):t===`(none)`?Nlt(s):Ilt(b7(t),s),[s]);return e?(0,B.jsx)(Ylt,{coordinator:e,table:`trajectories`,idCol:`id`,columns:c,selection:t,palette:l,orderings:lut,dark:s,maxNodesPerColumn:11,highlightedTrajIds:n?new Set([n]):null,resetSignal:i,onSelectionStateChange:a}):null}function dut(){let[e,t]=cX(d7),n=Y(_7);return(0,B.jsxs)(xh,{align:`center`,gap:2,flexShrink:0,children:[(0,B.jsx)(U,{fontSize:`xs`,color:`fg.muted`,textTransform:`uppercase`,letterSpacing:`0.04em`,children:`depth`}),(0,B.jsx)(qle,{value:[e],onValueChange:e=>t(e.value[0]),min:1,max:n,step:1,width:`120px`,size:`sm`,children:(0,B.jsxs)(Rh,{children:[(0,B.jsx)(Jle,{children:(0,B.jsx)(Yle,{})}),(0,B.jsx)(tue,{})]})}),(0,B.jsx)(U,{fontSize:`xs`,color:`fg.muted`,fontFamily:`mono`,minW:`2ch`,textAlign:`right`,children:e})]})}var fut=(e,t,n)=>{let r=Math.min(1,e/Math.max(1,t-1));return n?`oklch(${28+r*50}% 0.04 75)`:`oklch(${92-r*50}% ${.02+r*.1} 245)`};function put({coordinator:e,table:t,idCol:n,levelCol:r,categoryCol:i,selection:a,maxLevels:o,filterStepNames:s,whereExpr:c,maxNodesPerLevel:l,minRowHeight:u=0,colorRamp:d=fut,labelFor:f=e=>e,dark:p=!1,highlightedTrajIds:m,onCellClick:h,resetSignal:g,onSelectionStateChange:v}){let y=(0,_.useRef)(null),[b,x]=(0,_.useState)({w:0,h:0}
4795),[S,C]=(0,_.useState)([]),[w,T]=(0,_.useState)(null),[E,D]=(0,_.useState)(null),O=(0,_.useRef)(null);(0,_.useLayoutEffect)(()=>{if(!y.current)return;let e=new ResizeObserver(e=>{let t=e[0];x({w:t.contentRect.width,h:t.contentRect.height})});return e.observe(y.current),()=>e.disconnect()},[]);let k=(0,_.useMemo)(()=>function(e){let a=tk(n),l=tk(r),u=tk(i),d=Uk.from(t).select({id:a,step_idx:ej`ROW_NUMBER() OVER (PARTITION BY ${a} ORDER BY ${l}) - 1`,category:u});if(s&&s.length){let e=s.map(e=>`'${e.replace(/'/g,`''`)}'`).join(`,`);d.where(ej`${u} NOT IN (${ok(e)})`)}c&&d.where(ej`${ok(`(${c})`)}`);let f=Uk.with({filtered:d}).from(`filtered`).select({id:tk(`id`),step_idx:tk(`step_idx`),category:tk(`category`),path:ej`STRING_AGG(category, '>') OVER (PARTITION BY id ORDER BY step_idx ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)`});return typeof o==`number`&&f.where(ej`step_idx < ${o}`),e&&f.where(e),Uk.with({ranked:f}).from(`ranked`).select({step_idx:tk(`step_idx`),category:tk(`category`),path:tk(`path`),n:ej`COUNT(DISTINCT id)`,traj_ids:ej`ARRAY_AGG(DISTINCT id)`}
4795).groupby(`step_idx`,`category`,`path`).orderby(tk(`step_idx`),ej`COUNT(DISTINCT id) DESC`)},[t,n,r,i,o,s,c]);(0,_.useEffect)(()=>{if(!e)return;let t=Zj({coordinator:e,selection:a??void 0,query:k,queryResult:e=>{let t=typeof e?.toArray==`function`?e.toArray():e,n=[];for(let e of t??[])n.push({level:Number(e.step_idx??0),category:String(e.category??``),path:String(e.path??``),n:Number(e.n??0),trajIds:new Set($5(e.traj_ids).map(String))});C(n)},queryError:e=>{console.error(`[IcicleMosaicClient] query error:`,e)}});return O.current=t,()=>{t.destroy(),O.current=null}},[e,a,k]),(0,_.useEffect)(()=>{if(g!==void 0&&(D(null),v?.(!1),a&&O.current)){let e=O.current;a.update(QL([n],void 0,{source:e,clients:new Set([e])}))}},[g]);let{rects:A,totalN:j,maxLevelInData:M,svgHeight:N}=(0,_.useMemo)(()=>{let e=mut(S),t=e.children.reduce((e,t)=>e+t.n,0)||1;gut(e,t,5e-4),l&&l>1&&_ut(e,l);let n=S.reduce((e,t)=>Math.max(e,t.level),-1)+1,r=o??Math.max(1,n),i=b.h||1,a=i/Math.max(1,r),s=Math.max(i,Math.max(a,u)*r);return{rects:vut(e,b.w||1,s,r),totalN:t,maxLevelInData:r,svgHeight:s}},[S,b.w,b.h,o,l,u]);function P(e){return E!==null&&e.node.path===E}function F(e){if(E===null)return!0;let t=e.node.path,n=E;return!t||!n?!1:t===n?!0:t.length<n.length?n.startsWith(t+`>`):t.startsWith(n+`>`)}function ee(e){let t=P(e)?null:e.node.path;if(D(t),v?.(t!==null),a&&O.current){let r=O.current;if(t===null)a.update(QL([n],void 0,{source:r,clients:new Set([r])}));else{let t=Array.from(e.node.trajIds).map(e=>[e]);a.update(QL([n],t,{source:r,clients:new Set([r])}))}}h?.(e.node.level,e.node.category,e.node.trajIds)}return(0,B.jsxs)(`div`,{ref:y,style:{width:`100%`,height:`100%`,position:`relative`,overflowY:`auto`,overflowX:`hidden`},children:[(0,B.jsx)(`svg`,{width:b.w,height:N,style:{display:`block`},children:(0,B.jsx)(bg,{children:A.map((e,t)=>{let n=P(e),r=m&&dlt(e.node.trajIds,m),i=E!==null&&!F(e)||m!=null&&!r;return(0,B.jsxs)(bg,{children:[(0,B.jsx)(vb,{x:e.x+1,y:e.y+1,width:Math.max(0,e.w-2),height:Math.max(0,e.h-2),fill:d(e.node.level,M,p),stroke:n||r?`var(--chakra-colors-accent)`:`var(--chakra-colors-bg-panel)`,strokeWidth:n||r?2:1,opacity:i?.2:1,rx:2,style:{cursor:`pointer`,transition:`opacity .2s`},onClick:()=>ee(e),onMouseEnter:()=>T(e),onMouseLeave:()=>T(null)}),e.w>50&&e.h>16&&(0,B.jsxs)(`text`,{x:e.x+8,y:e.y+e.h/2+4,fill:e.node.level>M*.55?Glt(p):w7(p),pointerEvents:`none`,opacity:i?.4:.95,style:Ult,children:[e.node.isOther?`other (${e.node.otherCount})`:f(e.node.category),e.w>120&&!e.node.isOther?(0,B.jsxs)(`tspan`,{dx:`8`,style:C7,children:[(e.node.n/j*100).toFixed(1),`%`]}):null]})]},t)})})}),w&&(0,B.jsxs)(`div`,{style:{...D7(p,260),left:Math.min(w.x+8,Math.max(0,b.w-280)),top:Math.max(0,w.y-6)},children:[(0,B.jsxs)(`div`,{style:O7,children:[`Step `,w.node.level+1,` ·`,` `,w.node.isOther?`other (${w.node.otherCount})`:f(w.node.category)]}),(0,B.jsxs)(`div`,{style:k7(p),children:[(0,B.jsx)(`span`,{children:`trajectories`}),(0,B.jsx)(`b`,{style:{color:`inherit`,fontWeight:500},children:w.node.n.toLocaleString()})]}),(0,B.jsxs)(`div`,{style:k7(p),children:[(0,B.jsx)(`span`,{children:`share of total`}),(0,B.jsxs)(`b`,{style:{color:`inherit`,fontWeight:500},children:[(w.node.n/j*100).toFixed(1),`%`]})]}),!w.node.isOther&&w.node.path&&(0,B.jsx)(`div`,{style:Klt(p),children:w.node.path})]})]})}function mut(e){let t={level:-1,category:`_root`,path:``,n:0,trajIds:new Set,children:[]},n=new Map;n.set(``,t);let r=e.slice().sort((e,t)=>e.level-t.level);for(let e of r){let r={level:e.level,category:e.category,path:e.path,n:e.n,trajIds:e.trajIds,children:[]};n.set(e.path,r);let i=hut(e.path);(n.get(i)??t).children.push(r)}let i=e=>{e.children.sort((e,t)=>t.n-e.n||e.category.localeCompare(t.category)),e.children.forEach(i)};return i(t),t}function hut(e){let t=e.lastIndexOf(`>`);return t<0?``:e.slice(0,t)}function gut(e,t,n){let r=t*n;function i(e){e.children.length&&(e.children=e.children.filter(e=>e.n>=r),e.children.forEach(i))}i(e)}function _ut(e,t){if(e.children.length){if(e.children.length>t){let n=e.children.slice(0,t-1),r=e.children.slice(t-1),i=r.reduce((e,t)=>
4795e+t.n,0),a=new Set;for(let e of r)e.trajIds.forEach(e=>a.add(e));let o={level:r[0].level,category:`_other`,path:`${e.path?e.path+`>`:``}_other`,n:i,trajIds:a,children:[],isOther:!0,otherCount:r.length};e.children=[...n,o]}for(let n of e.children)n.isOther||_ut(n,t)}}function vut(e,t,n,r){let i=[],a=n/Math.max(1,r),o=e.children.reduce((e,t)=>e+t.n,0)||1;function s(e,t,n,o){let c=t;for(let t of e.children){let e=t.n/o*n;i.push({node:t,x:c,y:t.level*a,w:e,h:a}),t.level<r-1&&!t.isOther&&s(t,c,e,t.n),c+=e}}return s(e,0,t,o),i}function yut(){let e=Y(a7),t=Y(o7),n=Y(f7),r=Y(g7),i=sX(m7),{colorMode:a}=lg(),o=a===`dark`;return e?(0,B.jsx)(put,{coordinator:e,table:`steps`,idCol:`id`,levelCol:`step_idx`,categoryCol:`name`,selection:t,minRowHeight:28,colorRamp:(e,t)=>zlt(e/Math.max(1,t-1),o),dark:o,highlightedTrajIds:n?new Set([n]):null,resetSignal:r,onSelectionStateChange:i}):null}function N7({title:e,subtitle:t,right:n,children:r}){return(0,B.jsxs)(V,{bg:`bg`,borderRadius:`lg`,p:2,position:`relative`,h:`100%`,display:`flex`,flexDirection:`column`,border:`1px solid`,borderColor:`gray.subtle`,overflow:`hidden`,children:[(0,B.jsxs)(V,{display:`flex`,flexWrap:`wrap`,justifyContent:`space-between`,alignItems:`flex-start`,gap:2,mb:1,children:[(0,B.jsxs)(U,{fontSize:`xs`,fontWeight:`semibold`,color:`accentSubtle`,children:[e,t&&(0,B.jsxs)(U,{as:`span`,fontWeight:`normal`,color:`fg.muted`,ml:1,children:[`⢠`,t]})]}),n]}),(0,B.jsx)(V,{flex:`1`,minH:0,position:`relative`,borderRadius:`md`,overflow:`hidden`,children:r})]})}var but=[`all`,`success`,`partial`,`fail`];function xut(){let e=Y(vlt),[t,n]=cX(c7),[r,i]=cX(l7),[a,o]=cX(u7),s=Y(blt),c=sX(Tlt),l=Y(glt),u=l.n?`${(l.pass/l.n*100).toFixed(1)}%`:`â`,d=l.avgSteps?l.avgSteps.toFixed(1):`â`,f=l.avgTokens?Sut(l.avgTokens):`â`;return(0,B.jsxs)(V,{py:2,children:[(0,B.jsxs)(xh,{columnGap:10,rowGap:2,wrap:`wrap`,justify:`space-between`,children:[(0,B.jsx)(xh,{gap:4,wrap:`nowrap`,children:[{label:`Trajectories`,value:l.n.toLocaleString()},{label:`Pass rate`,value:u,accent:!0},{label:`Avg steps`,value:d},{label:`Avg tokens`,value:f}].map(e=>(0,B.jsxs)(Bh,{size:`sm`,px:0,minW:`5rem`,children:[(0,B.jsx)(Vh,{fontSize:`xs`,fontWeight:`medium`,color:`accentSubtle`,whiteSpace:`nowrap`,children:e.label}),(0,B.jsx)(Hh,{fontSize:`md`,fontWeight:`semibold`,color:e.accent?`accent`:void 0,whiteSpace:`nowrap`,children:e.value})]},e.label))}),(0,B.jsxs)(Ch,{columnGap:4,flexWrap:`wrap`,children:[(0,B.jsxs)(Ah,{size:`sm`,w:`auto`,minW:{base:`auto`,md:`200px`},bg:`bg.subtle`,flex:{base:1,md:`0 0 auto`},children:[(0,B.jsx)(jh,{value:t,onChange:e=>n(e.target.value),color:`fg`,fontSize:`sm`,children:Object.values(e).map(e=>(0,B.jsx)(`option`,{value:e.key,children:e.label},e.key))}),(0,B.jsx)(Mh,{})]}),(0,B.jsxs)(Ch,{gap:1,px:2,borderRadius:`md`,border:`1px solid`,borderColor:`gray.muted`,bg:`bg.subtle`,minW:`250px`,height:`auto`,display:{base:`none`,md:`flex`},children:[(0,B.jsx)(Pue,{size:13}),(0,B.jsx)(Th,{variant:`outline`,border:`none`,boxShadow:`none`,size:`sm`,placeholder:`Search id, task, modelâ¦`,value:r,onChange:e=>i(e.target.value),px:0,_focus:{outline:`none`,boxShadow:`none`}}),r&&(0,B.jsx)(ph,{size:`xs`,variant:`ghost`,"aria-label":`Clear search`,onClick:()=>i(``),children:(0,B.jsx)(tg,{size:12})})]}),(0,B.jsx)(Ch,{gap:0,borderRadius:`md`,border:`1px solid`,borderColor:`gray.muted`,bg:`bg.subtle`,children:but.map(e=>(0,B.jsx)(ph,{size:`xs`,variant:a===e?`solid`:`ghost`,colorPalette:a===e?e===`success`?`blue`:e===`partial`?`orange`:e===`fail`?`red`:`gray`:`undefined`,onClick:()=>o(e),textTransform:`capitalize`,children:e===`success`?`Pass`:e},e))}),s&&(0,B.jsxs)(ph,{size:`sm`,colorPalette:`orange`,variant:`solid`,onClick:()=>c(),children:[(0,B.jsx)(tg,{size:14}),`Clear filters`]})]})]}),l.n===0&&(0,B.jsx)(U,{mt:2,fontSize:`xs`,color:`fg.subtle`,children:`No trajectories match the current filters.`})]})}function Sut(e){return!Number.isFinite(e)||e<=0?`â`:e<1e3?Math.round(e).toString():e<1e6?`${(e/1e3).toFixed(1)}k`:`${(e/1e6).toFixed(2)}M`}function Cut(e){let t=e.toUpperCase();return/^(TINYINT|SMALLINT|INTEGER|INT|BIGINT|HUGEINT|UTINYINT|USMALLINT|UINTEGER|UBIGINT)$/.test(t)||/^(FLOAT|REAL|DOUBLE|DECIMAL|NUMERIC)/.test(t)?`numeric`:/^(DATE|TIME|TIMESTAMP|TIMESTAMPTZ|TIMESTAMP WITH TIME ZONE|TIMESTAMP_S|TIMESTAMP_MS|TIMESTAMP_NS|INTERVAL)/.test(t)?`temporal`:t===`BOOLEAN`||t===`BOOL`?`boolean`:t===`BLOB`||t===`BYTEA`?`binary`:t===`UUID`?`identifier`:t.startsWith(`ENUM`)?`enum`:/^(LIST|ARRAY)/.test(t)||/^(STRUCT|ROW)/.test(t)||/^(MAP)/.test(t)||/^(UNION)/.test(t)||t===`JSON`||t===`JSONB`?`complex`:/^(GEOMETRY|GEOGRAPHY|POINT|LINESTRING|POLYGON)/.test(t)?`geo`:/^(VARCHAR|TEXT|CHAR|STRING|NAME|BPCHAR)/.test(t)?`text`:`unknown`}function wut(e){switch(e.sqlType.toUpperCase()){case`BIGINT`:case`HUGEINT`:case`UBIGINT`:return{column:e.name,castTo:`TEXT`};
4795case`INTERVAL`:case`TIME`:return{column:e.name,castTo:`TEXT`};case`JSON`:case`JSONB`:return{column:e.name,castTo:`TEXT`};default:return e.typeCategory===`complex`?{column:e.name,castTo:`TEXT`}:{column:e.name,castTo:null}}}function Tut(e,t){if(e==null)return null;switch(t.typeCategory){case`numeric`:{let n=t.sqlType.toUpperCase();return n===`BIGINT`||n===`HUGEINT`||n===`UBIGINT`?{display:String(e),sortValue:BigInt(e)}:e}case`temporal`:{let n=t.sqlType.toUpperCase();return n===`DATE`||n.startsWith(`TIMESTAMP`)?new Date(e):e}case`complex`:if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e;default:return e}}function P7(e,t,n,r){return typeof e==`number`?e:e===`auto`?-1:e.endsWith(`px`)?parseFloat(e):e.endsWith(`%`)?parseFloat(e)/100*t:e.endsWith(`rem`)?parseFloat(e)*n:e.endsWith(`em`)?parseFloat(e)*r:parseFloat(e)}var Eut=`1.25rem`,Dut=3,Out=`0.5rem`;function kut(e,t){let n=e?.lineHeight??Eut,r=e?.numLines??Dut,i=e?.padding??Out,a=Aut(n,t),o=Aut(i,t);return r*a+o}function Aut(e,t){return e.endsWith(`rem`)?parseFloat(e)*t:e.endsWith(`px`)?parseFloat(e):e.endsWith(`em`)?parseFloat(e)*t:parseFloat(e)}var jut=class{rows=new Map;_totalRows=0;get totalRows(){return this._totalRows}setTotalRows(e){this._totalRows=e}getTotalRows(){return this._totalRows}mergeRows(e,t){for(let n=0;n<t.length;n++)this.rows.set(e+n,t[n])}getRow(e){return this.rows.get(e)??null}hasRow(e){return this.rows.has(e)}evict(e,t){for(let n of this.rows.keys())(n<e||n>t)&&this.rows.delete(n)}clear(){this.rows.clear()}get size(){return this.rows.size}},Mut=3.75;function Nut(e){let{columns:t,containerWidth:n,rootFontSize:r,tableFontSize:i,rowHeightConfig:a}=e,o=Mut*r,s=kut(a,r),c=t.map(e=>{let t=e.minWidth?P7(e.minWidth,n,r,i):o,a=e.maxWidth?P7(e.maxWidth,n,r,i):1/0,s=null;return e.width!=null&&(s=P7(e.width,n,r,i),s===-1&&(s=null)),{key:e.key,flex:e.flex??+(s==null),fixedPx:s,minPx:t,maxPx:a}}),l=c.filter(e=>e.fixedPx!=null&&e.flex===0),u=c.filter(e=>e.fixedPx==null||e.flex>0),d=0,f=new Map;for(let e of l){let t=Math.max(e.minPx,Math.min(e.maxPx,e.fixedPx));f.set(e.key,t),d+=t}let p=Math.max(0,n-d),m=[...u];for(let e=0;e<3&&m.length>0;e++){let t=m.reduce((e,t)=>e+t.flex,0);if(t===0)break;let n=[],r=[],i=0;for(let e of m){let a=e.flex/t*p,o=Math.max(e.minPx,Math.min(e.maxPx,a));o===a?r.push(e):(f.set(e.key,o),i+=o,n.push(e))}if(n.length===0){for(let e of m)f.set(e.key,e.flex/t*p);break}if(p-=i,m=r,e===2||r.length===0){let e=r.reduce((e,t)=>e+t.flex,0);for(let t of r){let n=e>0?t.flex/e*p:p/r.length;f.set(t.key,Math.max(t.minPx,n))}}}let h=0,g=t.map(e=>{let t=f.get(e.key)??o,n={key:e.key,width:Math.round(t),offset:Math.round(h),region:`center`};return h+=t,n}),_=Math.round(h);return{resolved:g,totalWidth:_,pinnedLeftWidth:0,pinnedRightWidth:0,scrollableWidth:_,rowHeight:Math.round(s)}}var Put=5,Fut=3,Iut=.3;function Lut(e){let{scrollTop:t,viewportHeight:n,rowHeight:r,totalRows:i}=e;if(r<=0||i<=0)return{start:0,end:0};let a=Math.max(0,Math.floor(t/r)),o=Math.max(n,r);return{start:a,end:Math.min(i,Math.max(a+1,Math.ceil((t+o)/r)))}}function Rut(e,t=Put){let n=Lut(e);return{start:Math.max(0,n.start-t),end:Math.min(e.totalRows,n.end+t)}}function zut(e,t,n=Put){let r=Rut(e,n),i=(Math.ceil(e.viewportHeight/e.rowHeight)||1)*Fut;if(!t)return{offset:Math.max(0,r.start-Math.floor(i/4)),limit:i};let a=t.offset+t.limit,o=Math.ceil(i*Iut),s=r.start-t.offset<o,c=a-r.end<o;if(!s&&!c)return null;let l=Math.floor((r.start+r.end)/2);return{offset:Math.max(0,l-Math.floor(i/2)),limit:i}}function F7(e,t){return e*t}async function But(e,t,n){return(await n(e,[{table:t,column:`*`}])).map(e=>({name:e.column,sqlType:e.sqlType,typeCategory:Cut(e.sqlType)}))}function Vut(e,t,n,r,i){let a=new e(i);return a.query=e=>t.from(r.tableName).select({count:n()}).where(e),a.queryResult=e=>{let t=e.toArray()[0],n=Number(t?.count??0);return r.onResult(n),a},a}function Hut(e){return e==null?null:Array.isArray(e)?e:[e]}function Uut(e,t,n,r){let{Query:i,column:a,cast:o,desc:s}=t,c=null,l=0,u=100,d=0,f=new e(r);return Object.defineProperty(f,"sort",{get:()=>c,set:e=>{c=e},enumerable:!0,configurable:!0}),f.query=e=>{d=l;let t={};for(let e of n.columns){let n=wut(e);n.castTo?t[e.name]=o(a(e.name),n.castTo):t[e.name]=a(e.name)}let r=i.from(n.tableName).select(t).where(e),f=Hut(c);return f&&f.length>0&&(r=r.orderby(...f.map(e=>e.desc?s(a(e.column)):a(e.column)))),r.limit(u).offset(l)},f.queryResult=e=>{let t=e.toArray(),r=[];for(let e of t){let t={},i=e;for(let e of n.columns)t[e.name]=Tut(i[e.name],e);r.push(t)}return n.onResult(r,d),f},f.fetchWindow=(e,t)=>{l=e,u=t},f}var Wut;function $(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}
vendor: 4,322 bytes, line 4795
4795let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var I7=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Gut=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Wut=globalThis).__zod_globalConfig??(Wut.__zod_globalConfig={});var L7=globalThis.__zod_globalConfig;function R7(e){return e&&Object.assign(L7,e),L7}function Kut(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function z7(e,t){return typeof t==`bigint`?t.toString():t}function B7(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function V7(e){return e==null}function H7(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function qut(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var Jut=Symbol(`evaluating`);function U7(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Jut)return r===void 0&&(r=Jut,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function W7(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function G7(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function Yut(e){return JSON.stringify(e)}function Xut(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Zut=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function K7(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Qut=B7(()=>{if(L7.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function q7(e){if(K7(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(K7(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function $ut(e){return q7(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var edt=new Set([`string`,`number`,`symbol`]);function J7(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Y7(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function X7(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function tdt(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var ndt={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function rdt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Y7(e,G7(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return W7(this,`shape`,e),e},checks:[]}))}function idt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Y7(e,G7(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return W7(this,`shape`,r),r},checks:[]}))}function adt(e,t){if(!q7(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot over
4795write keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Y7(e,G7(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return W7(this,`shape`,n),n}}))}function odt(e,t){if(!q7(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Y7(e,G7(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return W7(this,`shape`,n),n}}))}function sdt(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return Y7(e,G7(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return W7(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function cdt(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return Y7(t,G7(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return W7(this,`shape`,i),i},checks:[]}))}function ldt(e,t,n){return Y7(t,G7(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return W7(this,`shape`,i),i}}))}function Z7(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function udt(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Q7(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function $7(e){return typeof e==`string`?e:e?.message}function e9(e,t,n){let r=e.message?e.message:$7(e.inst?._zod.def?.error?.(e))??$7(t?.error?.(e))??$7(n.customError?.(e))??$7(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function t9(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function n9(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var ddt=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,z7,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},fdt=$(`$ZodError`,ddt),pdt=$(`$ZodError`,ddt,{Parent:Error});function mdt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function hdt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var r9=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new I7;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>e9(e,a,R7())));throw Zut(t,i?.callee),t}return o.value},i9=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>e9(e,a,R7())));throw Zut(t,i?.callee),t}return o.value},a9=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new I7;return a.issues.length?{success:!1,error:new(e??fdt)(a.issues.map(e=>e9(e,i,R7())))}:{success:!0,data:a.value}},gdt=a9(pdt),o9=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>e9(e,i,R7())))}:{success:!0,data:a.value}},_dt=o9(pdt),vdt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return r9(e)(t,n,i)},ydt=e=>(t,n,r)=>r9(e)(t,n,r),bdt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return i9(e)(t,n,i)},xdt=e=>async(t,n,r)=>i9(e)(t,n,r),Sdt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return a9(e)(t,n,i)},Cdt=e=>(t,n,r)=>a9(e)(t,n,r),wdt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return o9(e)(t,n,i)},Tdt=e=>async(t,n,r)=>o9(e)(t,n,r),Edt=/^[cC][0-9a-z]{6,}
vendor: 19,789 bytes, lines 4795-4840
4795$/,Ddt=/^[0-9a-z]+$/,Odt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,kdt=/^[0-9a-vA-V]{20}$/,Adt=/^[A-Za-z0-9]{27}$/,jdt=/^[a-zA-Z0-9_-]{21}$/,Mdt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ndt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Pdt=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Fdt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Idt=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Ldt(){return new RegExp(Idt,`u`)}var Rdt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,zdt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Bdt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Vdt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Hdt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Udt=/^[A-Za-z0-9_-]*$/,Wdt=/^https?$/,Gdt=/^\+[1-9]\d{6,14}$/,Kdt=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,qdt=RegExp(`^${Kdt}$`);function Jdt(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ydt(e){return RegExp(`^${Jdt(e)}$`)}function Xdt(e){let t=Jdt({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Kdt}T(?:${r})$`)}var Zdt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Qdt=/^-?\d+$/,$dt=/^-?\d+(?:\.\d+)?$/,eft=/^(?:true|false)$/i,tft=/^[^A-Z]*$/,nft=/^[^a-z]*$/,s9=$(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),rft={number:`number`,bigint:`bigint`,object:`date`},ift=$(`$ZodCheckLessThan`,(e,t)=>{s9.init(e,t);let n=rft[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),aft=$(`$ZodCheckGreaterThan`,(e,t)=>{s9.init(e,t);let n=rft[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),oft=$(`$ZodCheckMultipleOf`,(e,t)=>{s9.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):qut(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),sft=$(`$ZodCheckNumberFormat`,(e,t)=>{s9.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ndt[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Qdt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),cft=$(`$ZodCheckMaxLength`,(e,t)=>{var n;s9.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!V7(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=t9(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),lft=$(`$ZodCheckMinLength`,(e,t)=>{var n;s9.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!V7(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=t9(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),uft=$(`$ZodCheckLengthEquals`,(e,t)=>{var n;s9.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!V7(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=t9(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),c9=$(`$ZodCheckStringFormat`,(e,t)=>{var n,r;s9.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),dft=$(`$ZodCheckRegex`,(e,t)=>{c9.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),fft=$(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=tft,c9.init(e,t)}),pft=$(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=nft,c9.init(e,t)}),mft=$(`$ZodCheckIncludes`,(e,t)=>{s9.init(e,t);let n=J7(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),hft=$(`$ZodCheckStartsWith`,(e,t)=>{s9.init(e,t);let n=RegExp(`^${J7(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),gft=$(`$ZodCheckEndsWith`,(e,t)=>{s9.init(e,t);let n=RegExp(`.*${J7(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),_ft=$(`$ZodCheckOverwrite`,(e,t)=>{s9.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),vft=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` 4796`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(` 4797`))}},yft={major:4,minor:4,patch:3},l9=$(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=yft;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=Z7(e),i;for(let a of t){if(a._zod.def.when){if(udt(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new I7;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=Z7(e,t))});else{if(e.issues.length===t)continue;r||=Z7(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(Z7(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new I7;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new I7;return o.then(e=>t(e,r,a))}return t(o,r,a)}}U7(e,`~standard`,()=>({validate:t=>{try{let n=gdt(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return _dt(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),u9=$(`$ZodString`,(e,t)=>{l9.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Zdt(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),d9=$(`$ZodStringFormat`,(e,t)=>{c9.init(e,t),u9.init(e,t)}),bft=$(`$ZodGUID`,(e,t)=>{t.pattern??=Ndt,d9.init(e,t)}),xft=$(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Pdt(e)}else t.pattern??=Pdt();d9.init(e,t)}),Sft=$(`$ZodEmail`,(e,t)=>{t.pattern??=Fdt,d9.init(e,t)}),Cft=$(`$ZodURL`,(e,t)=>{d9.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===Wdt.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),wft=$(`$ZodEmoji`,(e,t)=>{t.pattern??=Ldt(),d9.init(e,t)}),Tft=$(`$ZodNanoID`,(e,t)=>{t.pattern??=jdt,d9.init(e,t)}),Eft=$(`$ZodCUID`,(e,t)=>{t.pattern??=Edt,d9.init(e,t)}),Dft=$(`$ZodCUID2`,(e,t)=>{t.pattern??=Ddt,d9.init(e,t)}),Oft=$(`$ZodULID`,(e,t)=>{t.pattern??=Odt,d9.init(e,t)}),kft=$(`$ZodXID`,(e,t)=>{t.pattern??=kdt,d9.init(e,t)}),Aft=$(`$ZodKSUID`,(e,t)=>{t.pattern??=Adt,d9.init(e,t)}),jft=$(`$ZodISODateTime`,(e,t)=>{t.pattern??=Xdt(t),d9.init(e,t)}),Mft=$(`$ZodISODate`,(e,t)=>{t.pattern??=qdt,d9.init(e,t)}),Nft=$(`$ZodISOTime`,(e,t)=>{t.pattern??=Ydt(t),d9.init(e,t)}),Pft=$(`$ZodISODuration`,(e,t)=>{t.pattern??=Mdt,d9.init(e,t)}),Fft=$(`$ZodIPv4`,(e,t)=>{t.pattern??=Rdt,d9.init(e,t),e._zod.bag.format=`ipv4`}),Ift=$(`$ZodIPv6`,(e,t)=>{t.pattern??=zdt,d9.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Lft=$(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Bdt,d9.init(e,t)}),Rft=$(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Vdt,d9.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function zft(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Bft=$(`$ZodBase64`,(e,t)=>{t.pattern??=Hdt,d9.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{zft(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Vft(e){if(!Udt.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return zft(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Hft=$(`$ZodBase64URL`,(e,t)=>{t.pattern??=Udt,d9.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Vft(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Uft=$(`$ZodE164`,(e,t)=>{t.pattern??=Gdt,d9.init(e,t)});function Wft(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Gft=$(`$ZodJWT`,(e,t)=>{d9.init(e,t),e._zod.check=n=>{Wft(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Kft=$(`$ZodNumber`,(e,t)=>{l9.init(e,t),e._zod.pattern=e._zod.bag.pattern??$dt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),qft=$(`$ZodNumberFormat`,(e,t)=>{sft.init(e,t),Kft.init(e,t)}),Jft=$(`$ZodBoolean`,(e,t)=>{l9.init(e,t),e._zod.pattern=eft,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Yft=$(`$ZodUnknown`,(e,t)=>{l9.init(e,t),e._zod.parse=e=>e}),Xft=$(`$ZodNever`,(e,t)=>{l9.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Zft(e,t,n){e.issues.length&&t.issues.push(...Q7(n,e.issues)),t.value[n]=e.value}var Qft=$(`$ZodArray`,(e,t)=>{l9.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Zft(t,n,e))):Zft(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function f9(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...Q7(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function $ft(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=tdt(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function ept(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>f9(e,n,i,t,u,d))):f9(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var tpt=$(`$ZodObject`,(e,t)=>{if(l9.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=B7(()=>$ft(t));U7(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=K7,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>f9(n,t,e,s,r,i))):f9(a,t,e,s,r,i)}return i?ept(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),npt=$(`$ZodObjectJIT`,(e,t)=>{tpt.init(e,t);let n=e._zod.parse,r=B7(()=>$ft(t)),i=e=>{let t=new vft([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Yut(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=Yut(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(` 4798 if (${n}.issues.length) { 4799 if (${o} in input) { 4800 payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ 4801 ...iss, 4802 path: iss.path ? [${o}, ...iss.path] : [${o}] 4803 }))); 4804 } 4805 } 4806 4807 if (${n}.value === undefined) { 4808 if (${o} in input) { 4809 newResult[${o}] = undefined; 4810 } 4811 } else { 4812 newResult[${o}] = ${n}.value; 4813 } 4814 4815 `):c?t.write(` 4816 if (${n}.issues.length) { 4817 payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ 4818 ...iss, 4819 path: iss.path ? [${o}, ...iss.path] : [${o}] 4820 }))); 4821 } 4822 4823 if (${n}.value === undefined) { 4824 if (${o} in input) { 4825 newResult[${o}] = undefined; 4826 } 4827 } else { 4828 newResult[${o}] = ${n}.value; 4829 } 4830 4831 `):t.write(` 4832 const ${n}_present = ${o} in input; 4833 if (${n}.issues.length) { 4834 payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ 4835 ...iss, 4836 path: iss.path ? [${o}, ...iss.path] : [${o}] 4837 }))); 4838 } 4839 if (!${n}_present && !${n}.issues.length) { 4840 payload.issues.push({
4841 code: "invalid_type", 4842 expected: "nonoptional", 4843 input: undefined, 4844 path: [${o}] 4845 }); 4846 } 4847 4848 if (${n}_present) { 4849 if (${n}.value === undefined) { 4850 newResult[${o}] = undefined; 4851 } else { 4852 newResult[${o}] = ${n}.value; 4853 } 4854 } 4855 4856 `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=K7,s=!L7.jitless,c=s&&Qut.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?ept([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function rpt(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Z7(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>e9(e,r,R7())))}),t)}var ipt=$(`$ZodUnion`,(e,t)=>{l9.init(e,t),U7(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),U7(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),U7(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),U7(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>H7(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>rpt(t,r,e,i)):rpt(o,r,e,i)}}),apt=$(`$ZodIntersection`,(e,t)=>{l9.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>opt(e,t,n)):opt(e,i,a)}});function p9(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(q7(e)&&q7(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=p9(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=p9(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function opt(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),Z7(e))return e;let o=p9(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var spt=$(`$ZodRecord`,(e,t)=>{l9.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!q7(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>e9(e,r,R7())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...Q7(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...Q7(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&$dt.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>
vendor: 31,837 bytes, lines 4856-4858
4856e9(e,r,R7())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...Q7(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...Q7(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),cpt=$(`$ZodEnum`,(e,t)=>{l9.init(e,t);let n=Kut(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>edt.has(typeof e)).map(e=>typeof e==`string`?J7(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),lpt=$(`$ZodTransform`,(e,t)=>{l9.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Gut(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new I7;return n.value=i,n.fallback=!0,n}});function upt(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var dpt=$(`$ZodOptional`,(e,t)=>{l9.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,U7(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),U7(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${H7(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>upt(e,r)):upt(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),fpt=$(`$ZodExactOptional`,(e,t)=>{dpt.init(e,t),U7(e._zod,`values`,()=>t.innerType._zod.values),U7(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),ppt=$(`$ZodNullable`,(e,t)=>{l9.init(e,t),U7(e._zod,`optin`,()=>t.innerType._zod.optin),U7(e._zod,`optout`,()=>t.innerType._zod.optout),U7(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${H7(e.source)}|null)$`):void 0}),U7(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),mpt=$(`$ZodDefault`,(e,t)=>{l9.init(e,t),e._zod.optin=`optional`,U7(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>hpt(e,t)):hpt(r,t)}});function hpt(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var gpt=$(`$ZodPrefault`,(e,t)=>{l9.init(e,t),e._zod.optin=`optional`,U7(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),_pt=$(`$ZodNonOptional`,(e,t)=>{l9.init(e,t),U7(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>vpt(t,e)):vpt(i,e)}});function vpt(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var ypt=$(`$ZodCatch`,(e,t)=>{l9.init(e,t),e._zod.optin=`optional`,U7(e._zod,`optout`,()=>t.innerType._zod.optout),U7(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>e9(e,n,R7()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>e9(e,n,R7()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),bpt=$(`$ZodPipe`,(e,t)=>{l9.init(e,t),U7(e._zod,`values`,()=>t.in._zod.values),U7(e._zod,`optin`,()=>t.in._zod.optin),U7(e._zod,`optout`,()=>t.out._zod.optout),U7(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>m9(e,t.in,n)):m9(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>m9(e,t.out,n)):m9(r,t.out,n)}});function m9(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var xpt=$(`$ZodReadonly`,(e,t)=>{l9.init(e,t),U7(e._zod,`propValues`,()=>t.innerType._zod.propValues),U7(e._zod,`values`,()=>t.innerType._zod.values),U7(e._zod,`optin`,()=>t.innerType?._zod?.optin),U7(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Spt):Spt(r)}});function Spt(e){return e.value=Object.freeze(e.value),e}var Cpt=$(`$ZodCustom`,(e,t)=>{s9.init(e,t),l9.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>wpt(t,n,r,e));wpt(i,n,r,e)}});function wpt(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(n9(e))}}var Tpt,Ept=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Dpt(){return new Ept}(Tpt=globalThis).__zod_globalRegistry??(Tpt.__zod_globalRegistry=Dpt());var h9=globalThis.__zod_globalRegistry;function Opt(e,t){return new e({type:`string`,...X7(t)})}function kpt(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...X7(t)})}function Apt(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...X7(t)})}function jpt(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...X7(t)})}function Mpt(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...X7(t)})}function Npt(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...X7(t)})}function Ppt(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...X7(t)})}function Fpt(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...X7(t)})}function Ipt(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...X7(t)})}function Lpt(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...X7(t)})}function Rpt(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...X7(t)})}function zpt(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...X7(t)})}function Bpt(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...X7(t)})}function Vpt(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...X7(t)})}function Hpt(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...X7(t)})}function Upt(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...X7(t)})}function Wpt(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...X7(t)})}function Gpt(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...X7(t)})}function Kpt(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...X7(t)})}function qpt(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...X7(t)})}function Jpt(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...X7(t)})}function Ypt(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...X7(t)})}function Xpt(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...X7(t)})}function Zpt(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...X7(t)})}function Qpt(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...X7(t)})}function $pt(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...X7(t)})}function emt(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...X7(t)})}function tmt(e,t){return new e({type:`number`,checks:[],...X7(t)})}function nmt(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...X7(t)})}function rmt(e,t){return new e({type:`boolean`,...X7(t)})}function imt(e){return new e({type:`unknown`})}function amt(e,t){return new e({type:`never`,...X7(t)})}function omt(e,t){return new ift({check:`less_than`,...X7(t),value:e,inclusive:!1})}function g9(e,t){return new ift({check:`less_than`,...X7(t),value:e,inclusive:!0})}function smt(e,t){return new aft({check:`greater_than`,...X7(t),value:e,inclusive:!1})}function _9(e,t){return new aft({check:`greater_than`,...X7(t),value:e,inclusive:!0})}function cmt(e,t){return new oft({check:`multiple_of`,...X7(t),value:e})}function lmt(e,t){return new cft({check:`max_length`,...X7(t),maximum:e})}function v9(e,t){return new lft({check:`min_length`,...X7(t),minimum:e})}function umt(e,t){return new uft({check:`length_equals`,...X7(t),length:e})}function dmt(e,t){return new dft({check:`string_format`,format:`regex`,...X7(t),pattern:e})}function fmt(e){return new fft({check:`string_format`,format:`lowercase`,...X7(e)})}function pmt(e){return new pft({check:`string_format`,format:`uppercase`,...X7(e)})}function mmt(e,t){return new mft({check:`string_format`,format:`includes`,...X7(t),includes:e})}function hmt(e,t){return new hft({check:`string_format`,format:`starts_with`,...X7(t),prefix:e})}function gmt(e,t){return new gft({check:`string_format`,format:`ends_with`,...X7(t),suffix:e})}function y9(e){return new _ft({check:`overwrite`,tx:e})}function _mt(e){return y9(t=>t.normalize(e))}function vmt(){return y9(e=>e.trim())}function ymt(){return y9(e=>e.toLowerCase())}function bmt(){return y9(e=>e.toUpperCase())}function xmt(){return y9(e=>Xut(e))}function Smt(e,t,n){return new e({type:`array`,element:t,...X7(n)})}function Cmt(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...X7(n)})}function wmt(e,t){let n=Tmt(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(n9(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(n9(r))}},e(t.value,t)),t);return n}function Tmt(e,t){let n=new s9({check:`custom`,...X7(t)});return n._zod.check=e,n}function Emt(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??h9,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function b9(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,b9(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&x9(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Dmt(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root> 4857 4858Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function Omt(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:S9(t,`input`,e.processors),output:S9(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function x9(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return x9(r.element,n);if(r.type===`set`)return x9(r.valueType,n);if(r.type===`lazy`)return x9(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return x9(r.innerType,n);if(r.type===`intersection`)return x9(r.left,n)||x9(r.right,n);if(r.type===`record`||r.type===`map`)return x9(r.keyType,n)||x9(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:x9(r.in,n)||x9(r.out,n);if(r.type===`object`){for(let e in r.shape)if(x9(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(x9(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(x9(e,n))return!0;return!!(r.rest&&x9(r.rest,n))}return!1}var kmt=(e,t={})=>n=>{let r=Emt({...n,processors:t});return b9(e,r),Dmt(r,e),Omt(r,e)},S9=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Emt({...i??{},target:a,io:t,processors:n});return b9(e,o),Dmt(o,e),Omt(o,e)},Amt={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},jmt=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Amt[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Mmt=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},Nmt=(e,t,n,r)=>{n.type=`boolean`},Pmt=(e,t,n,r)=>{n.not={}},Fmt=(e,t,n,r)=>{let i=e._zod.def,a=Kut(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Imt=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Lmt=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Rmt=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=b9(a.element,t,{...r,path:[...r.path,`items`]})},zmt=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=b9(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=b9(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Bmt=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>b9(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Vmt=(e,t,n,r)=>{let i=e._zod.def,a=b9(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=b9(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Hmt=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=b9(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=b9(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=b9(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Umt=(e,t,n,r)=>{let i=e._zod.def,a=b9(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Wmt=(e,t,n,r)=>{let i=e._zod.def;b9(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Gmt=(e,t,n,r)=>{let i=e._zod.def;b9(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Kmt=(e,t,n,r)=>{let i=e._zod.def;b9(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},qmt=(e,t,n,r)=>{let i=e._zod.def;b9(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Jmt=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;b9(o,t,r);let s=t.seen.get(e);s.ref=o},Ymt=(e,t,n,r)=>{let i=e._zod.def;b9(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Xmt=(e,t,n,r)=>{let i=e._zod.def;b9(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Zmt=$(`ZodISODateTime`,(e,t)=>{jft.init(e,t),D9.init(e,t)});function Qmt(e){return Zpt(Zmt,e)}var $mt=$(`ZodISODate`,(e,t)=>{Mft.init(e,t),D9.init(e,t)});function eht(e){return Qpt($mt,e)}var tht=$(`ZodISOTime`,(e,t)=>{Nft.init(e,t),D9.init(e,t)});function nht(e){return $pt(tht,e)}var rht=$(`ZodISODuration`,(e,t)=>{Pft.init(e,t),D9.init(e,t)});function iht(e){return emt(rht,e)}var C9=$(`ZodError`,(e,t)=>{fdt.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>hdt(e,t)},flatten:{value:t=>mdt(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,z7,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,z7,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),aht=r9(C9),oht=i9(C9),sht=a9(C9),cht=o9(C9),lht=vdt(C9),uht=ydt(C9),dht=bdt(C9),fht=xdt(C9),pht=Sdt(C9),mht=Cdt(C9),hht=wdt(C9),ght=Tdt(C9),_ht=new WeakMap;function w9(e,t,n){let r=Object.getPrototypeOf(e),i=_ht.get(r);if(i||(i=new Set,_ht.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var T9=$(`ZodType`,(e,t)=>(l9.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:S9(e,`input`),output:S9(e,`output`)}}),e.toJSONSchema=kmt(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>aht(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>sht(e,t,n),e.parseAsync=async(t,n)=>oht(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>cht(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>lht(e,t,n),e.decode=(t,n)=>uht(e,t,n),e.encodeAsync=async(t,n)=>dht(e,t,n),e.decodeAsync=async(t,n)=>fht(e,t,n),e.safeEncode=(t,n)=>pht(e,t,n),e.safeDecode=(t,n)=>mht(e,t,n),e.safeEncodeAsync=async(t,n)=>hht(e,t,n),e.safeDecodeAsync=async(t,n)=>ght(e,t,n),w9(e,`ZodType`,{check(...e){let t=this.def;return this.clone(G7(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Y7(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(ygt(e,t))},superRefine(e,t){return this.check(bgt(e,t))},overwrite(e){return this.check(y9(e))},optional(){return tgt(this)},exactOptional(){return rgt(this)},nullable(){return agt(this)},nullish(){return tgt(agt(this))},nonoptional(e){return dgt(this,e)},array(){return M9(this)},or(e){return P9([this,e])},and(e){return Yht(this,e)},transform(e){return hgt(this,$ht(e))},default(e){return sgt(this,e)},prefault(e){return lgt(this,e)},catch(e){return pgt(this,e)},pipe(e){return hgt(this,e)},readonly(){return _gt(this)},describe(e){let t=this.clone();return h9.add(t,{description:e}),t},meta(...e){if(e.length===0)return h9.get(this);let t=this.clone();return h9.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return h9.get(e)?.description},configurable:!0}),e)),vht=$(`_ZodString`,(e,t)=>{u9.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jmt(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,w9(e,`_ZodString`,{regex(...e){return this.check(dmt(...e))},includes(...e){return this.check(mmt(...e))},startsWith(...e){return this.check(hmt(...e))},endsWith(...e){return this.check(gmt(...e))},min(...e){return this.check(v9(...e))},max(...e){return this.check(lmt(...e))},length(...e){return this.check(umt(...e))},nonempty(...e){return this.check(v9(1,...e))},lowercase(e){return this.check(fmt(e))},uppercase(e){return this.check(pmt(e))},trim(){return this.check(vmt())},normalize(...e){return this.check(_mt(...e))},toLowerCase(){return this.check(ymt())},toUpperCase(){return this.check(bmt())},slugify(){return this.check(xmt())}})}),yht=$(`ZodString`,(e,t)=>{u9.init(e,t),vht.init(e,t),e.email=t=>e.check(kpt(bht,t)),e.url=t=>e.check(Fpt(Sht,t)),e.jwt=t=>e.check(Xpt(Lht,t)),e.emoji=t=>e.check(Ipt(Cht,t)),e.guid=t=>e.check(Apt(xht,t)),e.uuid=t=>e.check(jpt(O9,t)),e.uuidv4=t=>e.check(Mpt(O9,t)),e.uuidv6=t=>e.check(Npt(O9,t)),e.uuidv7=t=>e.check(Ppt(O9,t)),e.nanoid=t=>e.check(Lpt(wht,t)),e.guid=t=>e.check(Apt(xht,t)),e.cuid=t=>e.check(Rpt(Tht,t)),e.cuid2=t=>e.check(zpt(Eht,t)),e.ulid=t=>e.check(Bpt(Dht,t)),e.base64=t=>e.check(qpt(Pht,t)),e.base64url=t=>e.check(Jpt(Fht,t)),e.xid=t=>e.check(Vpt(Oht,t)),e.ksuid=t=>e.check(Hpt(kht,t)),e.ipv4=t=>e.check(Upt(Aht,t)),e.ipv6=t=>e.check(Wpt(jht,t)),e.cidrv4=t=>e.check(Gpt(Mht,t)),e.cidrv6=t=>e.check(Kpt(Nht,t)),e.e164=t=>e.check(Ypt(Iht,t)),e.datetime=t=>e.check(Qmt(t)),e.date=t=>e.check(eht(t)),e.time=t=>e.check(nht(t)),e.duration=t=>e.check(iht(t))});function E9(e){return Opt(yht,e)}var D9=$(`ZodStringFormat`,(e,t)=>{d9.init(e,t),vht.init(e,t)}),bht=$(`ZodEmail`,(e,t)=>{Sft.init(e,t),D9.init(e,t)}),xht=$(`ZodGUID`,(e,t)=>{bft.init(e,t),D9.init(e,t)}),O9=$(`ZodUUID`,(e,t)=>{xft.init(e,t),D9.init(e,t)}),Sht=$(`ZodURL`,(e,t)=>{Cft.init(e,t),D9.init(e,t)}),Cht=$(`ZodEmoji`,(e,t)=>{wft.init(e,t),D9.init(e,t)}),wht=$(`ZodNanoID`,(e,t)=>{Tft.init(e,t),D9.init(e,t)}),Tht=$(`ZodCUID`,(e,t)=>{Eft.init(e,t),D9.init(e,t)}),Eht=$(`ZodCUID2`,(e,t)=>{Dft.init(e,t),D9.init(e,t)}),Dht=$(`ZodULID`,(e,t)=>{Oft.init(e,t),D9.init(e,t)}),Oht=$(`ZodXID`,(e,t)=>{kft.init(e,t),D9.init(e,t)}),kht=$(`ZodKSUID`,(e,t)=>{Aft.init(e,t),D9.init(e,t)}),Aht=$(`ZodIPv4`,(e,t)=>{Fft.init(e,t),D9.init(e,t)}),jht=$(`ZodIPv6`,(e,t)=>{Ift.init(e,t),D9.init(e,t)}),Mht=$(`ZodCIDRv4`,(e,t)=>{Lft.init(e,t),D9.init(e,t)}),Nht=$(`ZodCIDRv6`,(e,t)=>{Rft.init(e,t),D9.init(e,t)}),Pht=$(`ZodBase64`,(e,t)=>{Bft.init(e,t),D9.init(e,t)}),Fht=$(`ZodBase64URL`,(e,t)=>{Hft.init(e,t),D9.init(e,t)}),Iht=$(`ZodE164`,(e,t)=>{Uft.init(e,t),D9.init(e,t)}),Lht=$(`ZodJWT`,(e,t)=>{Gft.init(e,t),D9.init(e,t)}),Rht=$(`ZodNumber`,(e,t)=>{Kft.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mmt(e,t,n,r),w9(e,`ZodNumber`,{gt(e,t){return this.check(smt(e,t))},gte(e,t){return this.check(_9(e,t))},min(e,t){return this.check(_9(e,t))},lt(e,t){return this.check(omt(e,t))},lte(e,t){return this.check(g9(e,t))},max(e,t){return this.check(g9(e,t))},int(e){return this.check(Bht(e))},safe(e){return this.check(Bht(e))},positive(e){return this.check(smt(0,e))},nonnegative(e){return this.check(_9(0,e))},negative(e){return this.check(omt(0,e))},nonpositive(e){return this.check(g9(0,e))},multipleOf(e,t){return this.check(cmt(e,t))},step(e,t){return this.check(cmt(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function k9(e){return tmt(Rht,e)}var zht=$(`ZodNumberFormat`,(e,t)=>{qft.init(e,t),Rht.init(e,t)});function Bht(e){return nmt(zht,e)}var Vht=$(`ZodBoolean`,(e,t)=>{Jft.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nmt(e,t,n,r)});function A9(e){return rmt(Vht,e)}var Hht=$(`ZodUnknown`,(e,t)=>{Yft.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function j9(){return imt(Hht)}var Uht=$(`ZodNever`,(e,t)=>{Xft.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pmt(e,t,n,r)});function Wht(e){return amt(Uht,e)}var Ght=$(`ZodArray`,(e,t)=>{Qft.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rmt(e,t,n,r),e.element=t.element,w9(e,`ZodArray`,{min(e,t){return this.check(v9(e,t))},nonempty(e){return this.check(v9(1,e))},max(e,t){return this.check(lmt(e,t))},length(e,t){return this.check(umt(e,t))},unwrap(){return this.element}})});function M9(e,t){return Smt(Ght,e,t)}var Kht=$(`ZodObject`,(e,t)=>{npt.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zmt(e,t,n,r),U7(e,`shape`,()=>t.shape),w9(e,`ZodObject`,{keyof(){return I9(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:j9()})},loose(){return this.clone({...this._zod.def,catchall:j9()})},strict(){return this.clone({...this._zod.def,catchall:Wht()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return adt(this,e)},safeExtend(e){return odt(this,e)},merge(e){return sdt(this,e)},pick(e){return rdt(this,e)},omit(e){return idt(this,e)},partial(...e){return cdt(egt,this,e[0])},required(...e){return ldt(ugt,this,e[0])}})});function N9(e,t){return new Kht({type:`object`,shape:e??{},...X7(t)})}var qht=$(`ZodUnion`,(e,t)=>{ipt.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bmt(e,t,n,r),e.options=t.options});function P9(e,t){return new qht({type:`union`,options:e,...X7(t)})}var Jht=$(`ZodIntersection`,(e,t)=>{apt.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vmt(e,t,n,r)});function Yht(e,t){return new Jht({type:`intersection`,left:e,right:t})}var Xht=$(`ZodRecord`,(e,t)=>{spt.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hmt(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Zht(e,t,n){return!t||!t._zod?new Xht({type:`record`,keyType:E9(),valueType:e,...X7(t)}):new Xht({type:`record`,keyType:e,valueType:t,...X7(n)})}var F9=$(`ZodEnum`,(e,t)=>{cpt.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fmt(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new F9({...t,checks:[],...X7(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new F9({...t,checks:[],...X7(r),entries:i})}});function I9(e,t){return new F9({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...X7(t)})}var Qht=$(`ZodTransform`,(e,t)=>{lpt.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lmt(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Gut(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(n9(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(n9(t))}};
4858let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function $ht(e){return new Qht({type:`transform`,transform:e})}var egt=$(`ZodOptional`,(e,t)=>{dpt.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xmt(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function tgt(e){return new egt({type:`optional`,innerType:e})}var ngt=$(`ZodExactOptional`,(e,t)=>{fpt.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xmt(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rgt(e){return new ngt({type:`optional`,innerType:e})}var igt=$(`ZodNullable`,(e,t)=>{ppt.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Umt(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function agt(e){return new igt({type:`nullable`,innerType:e})}var ogt=$(`ZodDefault`,(e,t)=>{mpt.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gmt(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sgt(e,t){return new ogt({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():$ut(t)}})}var cgt=$(`ZodPrefault`,(e,t)=>{gpt.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kmt(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function lgt(e,t){return new cgt({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():$ut(t)}})}var ugt=$(`ZodNonOptional`,(e,t)=>{_pt.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wmt(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function dgt(e,t){return new ugt({type:`nonoptional`,innerType:e,...X7(t)})}var fgt=$(`ZodCatch`,(e,t)=>{ypt.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qmt(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function pgt(e,t){return new fgt({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var mgt=$(`ZodPipe`,(e,t)=>{bpt.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jmt(e,t,n,r),e.in=t.in,e.out=t.out});function hgt(e,t){return new mgt({type:`pipe`,in:e,out:t})}var ggt=$(`ZodReadonly`,(e,t)=>{xpt.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ymt(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function _gt(e){return new ggt({type:`readonly`,innerType:e})}var vgt=$(`ZodCustom`,(e,t)=>{Cpt.init(e,t),T9.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Imt(e,t,n,r)});function ygt(e,t={}){return Cmt(vgt,e,t)}function bgt(e,t){return wmt(e,t)}var L9=P9([k9(),E9().regex(/^(\d+(\.\d+)?(px|%|rem|em))|auto$/,`width must be a number (px) or a string like "6rem", "50%", "10px", "auto"`)]),xgt=N9({name:E9().min(1),options:Zht(E9(),j9()).optional()}).strict(),Sgt=P9([E9().min(1),xgt]),Cgt=N9({key:E9().min(1),label:E9().optional(),width:L9.optional(),flex:k9().positive().optional(),minWidth:L9.optional(),maxWidth:L9.optional(),cell:Sgt.optional(),sortable:A9().optional(),align:I9([`left`,`right`,`center`]).optional()}).strict(),wgt=Zht(E9(),j9()),Tgt=P9([N9({table:E9().min(1)}).strict(),N9({rows:M9(wgt)}
4858).strict()]),Egt=P9([A9(),N9({expandedRowHeight:k9().positive().optional()}).strict()]),Dgt=P9([A9(),N9({mode:I9([`single`,`multi`]).optional()}).strict()]),Ogt=N9({column:E9().min(1),desc:A9().optional()}).strict(),kgt=N9({lineHeight:E9().optional(),numLines:k9().int().positive().optional(),padding:E9().optional()}).strict();N9({$schema:E9().url().or(E9().startsWith(`.`)).optional(),data:Tgt,rowKey:E9().min(1),columns:M9(Cgt).min(1),expansion:Egt.optional(),selection:Dgt.optional(),sort:P9([Ogt,M9(Ogt)]).optional(),rowHeight:kgt.optional(),height:P9([k9(),E9()]).optional(),width:P9([k9(),E9()]).optional(),theme:I9([`light`,`dark`,`auto`]).optional()}).strict().describe(`AnyTable declarative spec â the JSON shape an LLM can emit to render a complete table.`),[{name:`text`,description:`Default renderer: 3-line clamp, click to expand.`,acceptsOptions:!1},{name:`number`,description:`Right-aligned, tabular-nums Intl formatter.`,acceptsOptions:!1},{name:`date`,description:`Localized date (Intl.DateTimeFormat).`,acceptsOptions:!1},{name:`boolean`,description:`Readonly checkbox.`,acceptsOptions:!1},{name:`json`,description:`JSON preview; recursive tree when expanded.`,acceptsOptions:!1}
4858,{name:`list`,description:`Preview and expansion for array-valued cells.`,acceptsOptions:!1},{name:`struct`,description:`Preview and expansion for plain-object cells.`,acceptsOptions:!1},{name:`enumBadge`,description:`Colored badge. options.map: { value -> color-token }, options.neutral?: string.`,acceptsOptions:!0}].map(e=>e.name);var Agt=(0,_.createContext)({coordinator:null});function jgt(){return(0,_.useContext)(Agt).coordinator}function Mgt({coordinator:e,children:t}){let n=e??null;return(0,B.jsx)(Agt.Provider,{value:{coordinator:n},children:t})}var Ngt=(0,_.createContext)(null);function Pgt(){let e=(0,_.useContext)(Ngt);if(!e)throw Error(`useDataContext must be used within Table.Root`);return e}var Fgt=(0,_.createContext)(null);function R9(){let e=(0,_.useContext)(Fgt);if(!e)throw Error(`useLayoutContext must be used within Table.Root`);return e}var Igt=(0,_.createContext)(null);function Lgt(){return(0,_.useContext)(Igt)}var Rgt=(0,_.createContext)(null);function zgt(){return(0,_.useContext)(Rgt)}var Bgt=(0,_.createContext)(null);function Vgt(){return(0,_.useContext)(Bgt)}var Hgt=(0,_.createContext)(null);function Ugt(){return(0,_.useContext)(Hgt)}function Wgt(e){let[t,n]=(0,_.useState)({width:0,height:0,rootFontSize:16,tableFontSize:16});return(0,_.useEffect)(()=>{let t=e.current;if(!t)return;let r=()=>{let e=t.clientWidth,r=t.clientHeight,i=parseFloat(getComputedStyle(document.documentElement).fontSize),a=parseFloat(getComputedStyle(t).fontSize);n(t=>t.width===e&&t.height===r&&t.rootFontSize===i&&t.tableFontSize===a?t:{width:e,height:r,rootFontSize:i,tableFontSize:a})};r();let i=new ResizeObserver(r);return i.observe(t),()=>i.disconnect()},[e]),t}function Ggt(e){let{table:t,rows:n,filter:r}=e,i=jgt(),a=(0,_.useMemo)(()=>e.columns,[e.columns.join(`,`)]),[o,s]=(0,_.useState)(0),[c,l]=(0,_.useState)([]),[u,d]=(0,_.useState)(!0),[f,p]=(0,_.useState)(null),m=(0,_.useRef)(new jut),h=(0,_.useRef)(null),g=(0,_.useRef)(null),v=(0,_.useRef)(!1),y=n!=null;(0,_.useEffect)(()=>{if(!y)return;l(a.map(e=>({name:e,sqlType:`VARCHAR`,typeCategory:`text`})));let e=m.current;e.clear(),e.setTotalRows(n.length),e.mergeRows(0,n),d(!1),s(e=>e+1)},[y,n,a]),(0,_.useEffect)(()=>{if(y||!t||!i)return;let e=!1;v.current=!1,d(!0);async function n(){try{let[n,o]=await Promise.all([C(()=>Promise.resolve().then(()=>jIe),void 0),C(()=>Promise.resolve().then(()=>lje),void 0)]);if(e)return;let{MosaicClient:c,queryFieldInfo:u}=n,{Query:f,column:p,cast:_,desc:y,count:b}=o,x=await But(i,t,u);if(e)return;let S=a.length>0?x.filter(e=>a.includes(e.name)):x;l(S);let w=m.current;w.clear();let T=Vut(c,f,b,{tableName:t,onResult:e=>{w.setTotalRows(e),s(e=>e+1)}},r);g.current=T;let E=Uut(c,{Query:f,column:p,cast:_,desc:y},{tableName:t,columns:S,onResult:(e,t)=>{w.mergeRows(t,e),d(!1),s(e=>e+1)}},r);h.current=E,await i.connect(T),await i.connect(E),e||(v.current=!0)}catch(t){e||(console.error(`[any_table] Failed to initialize data:`,t),d(!1))}}return n(),()=>{e=!0,v.current=!1,h.current&&i&&i.disconnect(h.current),g.current&&i&&i.disconnect(g.current)}},[y,t,i,r,a]);let b=(0,_.useCallback)(e=>{if(p(e),y){if(!n)return;let t=m.current;t.clear();let r=[...n];if(e){let t=Array.isArray(e)?e:[e];r.sort((e,n)=>{for(let r of t){let t=e[r.column],i=n[r.column];if(t!=null&&i!=null&&t<i)return r.desc?1:-1;if(t!=null&&i!=null&&t>i)return r.desc?-1:1}return 0})}t.setTotalRows(r.length),t.mergeRows(0,r),s(e=>e+1)}else{let t=h.current;t&&v.current&&(t.sort=e,t.fetchWindow(0,15),d(!0),m.current.clear(),s(e=>e+1),t.requestUpdate())}},[y,n]),x=(0,_.useCallback)((e,t)=>{let n=h.current;n&&v.current&&(n.fetchWindow(e,t),n.requestUpdate())},[]),S=m.current,w=(0,_.useCallback)(e=>S.getRow(e),[S]),T=(0,_.useCallback)(e=>S.hasRow(e),[S]);return(0,_.useMemo)(()=>({getRow:w,hasRow:T,totalRows:S.totalRows,schema:c,isLoading:u,setWindow:x,sort:f,setSort:b}),[w,T,o,c,u,x,f,b])}function Kgt(e){let{columns:t,containerRef:n,rowHeightConfig:r}=e,{width:i,height:a,rootFontSize:o,tableFontSize:s}=Wgt(n);return(0,_.useMemo)(()=>{if(i===0)return{resolved:[],totalWidth:0,viewportHeight:0,pinnedLeftWidth:0,pinnedRightWidth:0,scrollableWidth:0,rowHeight:0,getWidth:()=>0,getOffset:()=>0};let e=Nut({columns:t,containerWidth:i,rootFontSize:o,tableFontSize:s,rowHeightConfig:r}),n=new Map,c=new Map;for(let t of e.resolved)n.set(t.key,t.width),c.set(t.key,t.offset);
4858return{...e,viewportHeight:a,getWidth:e=>n.get(e)??0,getOffset:e=>c.get(e)??0}},[t,i,a,o,s,r])}function qgt(e){let{data:t,layout:n,overscan:r=10,containerRef:i}=e,{totalRows:a,setWindow:o}=t,{rowHeight:s}=n,c=(0,_.useRef)(null),l=(0,_.useRef)(null),u=(0,_.useRef)(()=>{}),[d,f]=(0,_.useState)({start:0,end:0}),[p,m]=(0,_.useState)(0),h=F7(a,s),g=(0,_.useCallback)(()=>Math.max(1,i.current?.clientHeight??0),[i]),v=(0,_.useCallback)(()=>{c.current=null;let e=i.current;if(!e||s<=0)return;let t=Math.max(0,e.scrollTop),n={scrollTop:t,scrollLeft:0,viewportHeight:g(),viewportWidth:0,rowHeight:s,totalRows:a},u=Lut(n);f(e=>e.start===u.start&&e.end===u.end?e:u),m(t);let d=zut(n,l.current,r);d&&(l.current=d,o(d.offset,d.limit))},[i,s,a,r,o,g]),y=(0,_.useCallback)(()=>{c.current??=requestAnimationFrame(v)},[v]);return u.current=y,(0,_.useEffect)(()=>{let e=i.current;if(!e)return;let t=e.style.overflow;e.style.overflow=`auto`;let n=()=>u.current();e.addEventListener(`scroll`,n,{passive:!0}),n();let r=requestAnimationFrame(n);return()=>{cancelAnimationFrame(r),e.removeEventListener(`scroll`,n),e.style.overflow=t}},[i]),(0,_.useEffect)(()=>{if(s>0){y();let e=requestAnimationFrame(y);return()=>cancelAnimationFrame(e)}},[s,a,y]),(0,_.useEffect)(()=>{let e=i.current;if(!e)return;let t=Math.max(0,h-e.clientHeight);e.scrollTop>t&&(e.scrollTop=t),y()},[i,h,y]),(0,_.useEffect)(()=>()=>{c.current!=null&&(cancelAnimationFrame(c.current),c.current=null)},[]),{scrollTop:p,visibleRowRange:d,scrollToRow:(0,_.useCallback)(e=>{let t=i.current;if(!t)return;let n=Math.max(0,h-t.clientHeight),r=e*s;t.scrollTop=Math.max(0,Math.min(n,r)),y()},[i,s,h,y]),scrollToTop:(0,_.useCallback)(()=>{let e=i.current;e&&(e.scrollTop=0,y())},[i,y])}}function Jgt(e={}){let{expandedRowHeight:t=200}=e,[n,r]=(0,_.useState)(()=>new Set),i=(e,t)=>`${e}::${t}`,a=(0,_.useCallback)((e,t)=>n.has(i(e,t)),[n]),o=(0,_.useCallback)((e,t)=>{r(n=>{let r=new Set(n),a=i(e,t);return r.has(a)?r.delete(a):r.add(a),r})},[]),s=(0,_.useCallback)(e=>{let t=new Set;for(let r of n){let n=r.indexOf(`::`);n!==-1&&r.slice(0,n)===e&&t.add(r.slice(n+2))}return t},[n]);return(0,_.useMemo)(()=>({isExpanded:a,toggle:o,expandedRowHeight:t,getExpandedColumnsForRow:s}),[a,o,t,s])}function Ygt(e={}){let{mode:t=`multi`,defaultSelected:n,selected:r,onSelectionChange:i,crossFilter:a}=e,[o,s]=(0,_.useState)(()=>n??new Set),c=r??o,l=(0,_.useCallback)(e=>{r||s(e),i?.(e)},[r,i]);(0,_.useEffect)(()=>{if(!a)return;let{selection:e,column:t}=a;if(c.size===0)e.update({source:`table-selection`,predicate:null});else{let n=Array.from(c).map(e=>`'${e.replace(/'/g,`''`)}'`).join(`, `);e.update({source:`table-selection`,predicate:`"${t}" IN (${n})`})}},[c,a]);let u=(0,_.useCallback)(e=>c.has(e),[c]),d=(0,_.useCallback)(e=>{let n=new Set(c);t===`single`?n.has(e)?n.clear():(n.clear(),n.add(e)):n.has(e)?n.delete(e):n.add(e),l(n)},[c,t,l]),f=(0,_.useCallback)(()=>{},[]),p=(0,_.useCallback)(()=>{l(new Set)},[l]);return(0,_.useMemo)(()=>({selected:c,isSelected:u,toggle:d,selectAll:f,deselectAll:p,mode:t,totalRowKeys:[]}),[c,u,d,f,p,t])}function Xgt(e){let{table:t,rows:n,columns:r,rowKey:i,filter:a,containerRef:o,scroll:s,rowHeightConfig:c,onSortChange:l,expansion:u,selection:d}=e,f=Ggt({table:t,rows:n,columns:(0,_.useMemo)(()=>r.map(e=>e.key),[r]),rowKey:i,filter:a}),p=f.setSort;l&&(f.setSort=e=>{p(e),l(e)});let m=Kgt({columns:r,containerRef:o,rowHeightConfig:c}),h=qgt({data:f,layout:m,overscan:typeof s==`object`&&s?s.overscan:void 0,containerRef:o}),g=Jgt(typeof u==`object`?u:{}),v=u?g:null,y=Ygt(typeof d==`object`?d:{}),b=d?y:null;return{rootProps:{data:f,layout:m,scroll:h,pagination:null,selection:b,pinning:null,expansion:v,grouping:null,columns:r},data:f,layout:m,scroll:h,pagination:null,selection:b,pinning:null,columnOrder:null,resize:null,expansion:v,grouping:null}}function Zgt({data:e,layout:t,scroll:n,columns:r,expansion:i,selection:a,children:o,className:s,style:c}){let l={sort:e.sort,setSort:e.setSort},u=(0,B.jsx)(Ngt.Provider,{value:e,children:(0,B.jsx)(Fgt.Provider,{value:t,children:(0,B.jsx)(Igt.Provider,{value:n??null,children:(0,B.jsx)(Rgt.Provider,{value:l,children:(0,B.jsx)(`div`,{role:`grid`,"aria-rowcount":e.totalRows,"aria-colcount":r.length,className:s,style:{position:`relative`,display:`flex`,flexDirection:`column`,...c},children:o})})})})});return i&&(u=(0,B.jsx)(Bgt.Provider,{value:i,children:u})),a&&(u=(0,B.jsx)(Hgt.Provider,{value:a,children:u})),u}function Qgt({children:e,className:t,style:n}){let r=R9();return(0,B.jsx)(`div`,{role:`rowgroup`,className:t,style:{position:`sticky`,top:0,zIndex:2,flex:`0 0 auto`,height:`2rem`,overflow:`hidden`,width:r.totalWidth,...n},children:(0,B.jsx)(`div`,{role:`row`,style:{display:`flex`,position:`relative`,width:r.totalWidth,height:`100%`},children:e({columns:r.resolved})})})}function $gt(e,t){if(!e)return`none`;let n=(Array.isArray(e)?e:[e]).find(e=>e.column===t);return n?n.desc?`descending`:`ascending`:`none`}function e_t({column:e,children:t,className:n,style:r}){let i=R9(),a=i.getWidth(e),o=i.getOffset(e),s=zgt();return(0,B.jsx)(`div`,{role:`columnheader`,"aria-sort":s?$gt(s.sort,e):`none`,className:n,style:{position:`absolute`,left:o,width:a,height:`100%`,dis
4858play:`flex`,alignItems:`center`,boxSizing:`border-box`,...r},children:t})}function t_t({children:e,className:t,style:n}){let r=Pgt(),i=R9(),a=Lgt(),o=Vgt(),{rowHeight:s}=i,{totalRows:c}=r,l=e=>{if(!o)return e*s;let t=0;for(let n=0;n<e;n++){let e=String(n),r=o.getExpandedColumnsForRow(e);t+=s+(r.size>0?o.expandedRowHeight:0)}return t},u=(()=>{if(!o)return F7(c,s);if(c<=1e3){let e=0;for(let t=0;t<c;t++){let n=String(t),r=o.getExpandedColumnsForRow(n);e+=s+(r.size>0?o.expandedRowHeight:0)}return e}return F7(c,s)})(),d=[];if(a&&s>0){let{start:e,end:t}=a.visibleRowRange,n=Math.max(0,e-5),i=Math.min(c,t+5);for(let e=n;e<i;e++)d.push({key:e,index:e,data:r.getRow(e),top:l(e)})}else if(!a){let e=Math.min(c,100);for(let t=0;t<e;t++)d.push({key:t,index:t,data:r.getRow(t),top:l(t)})}return(0,B.jsx)(`div`,{role:`rowgroup`,className:t,style:{position:`relative`,...a?{height:u,width:i.totalWidth>0?i.totalWidth:`100%`,flex:`0 0 auto`}:{flex:1,overflow:`hidden`},...n},children:e({rows:d})})}function n_t({row:e,children:t,className:n,style:r}){let i=R9(),a=Vgt(),o=Ugt(),s=String(e.key),c=a?a.getExpandedColumnsForRow(s).size>0:!1,l=c?i.rowHeight+(a?.expandedRowHeight??0):i.rowHeight,u=o?o.isSelected(s):!1,d=i.resolved.map(t=>{let n=a?()=>a.toggle(s,t.key):void 0;return{column:t.key,value:e.data?.[t.key]??null,width:t.width,offset:t.offset,isExpanded:c,onToggleExpand:n}});return(0,B.jsx)(`div`,{role:`row`,"aria-rowindex":e.index+1,"aria-selected":o?u:void 0,className:n,style:{position:`absolute`,top:0,left:0,width:i.totalWidth,height:l,display:`flex`,overflow:`hidden`,transform:`translate3d(0, ${e.top}px, 0)`,...r},children:t({cells:d})})}function r_t({column:e,width:t,offset:n,children:r,className:i,style:a,onClick:o}){return(0,B.jsx)(`div`,{role:`gridcell`,className:i,onClick:o,style:{position:`absolute`,left:n,width:t,height:`100%`,boxSizing:`border-box`,overflow:`hidden`,whiteSpace:`normal`,wordBreak:`break-word`,...a},children:r})}function i_t(e,t){if(!e)return null;let n=(Array.isArray(e)?e:[e]).find(e=>e.column===t);return n?n.desc?`desc`:`asc`:null}function a_t({column:e,children:t,className:n,style:r}){let i=zgt(),a=i?i_t(i.sort,e):null,o=(0,_.useCallback)(()=>{i&&(a===null?i.setSort({column:e,desc:!1}):a===`asc`?i.setSort({column:e,desc:!0}):i.setSort(null))},[i,e,a]),s=a===`asc`?` â²`:a===`desc`?` â¼`:``;return(0,B.jsxs)(`button`,{type:`button`,onClick:o,className:n,"aria-label":`Sort by ${e}`,style:{background:`none`,border:`none`,cursor:`pointer`,padding:`0 4px`,fontSize:`inherit`,fontFamily:`inherit`,display:`inline-flex`,alignItems:`center`,...r},children:[t,s]})}function o_t({header:e,row:t,className:n,style:r}){let i=Ugt();if(!i)return null;if(e){let e=i.selected.size,t=i.totalRowKeys.length>0&&e===i.totalRowKeys.length,a=e>0&&!t;return(0,B.jsx)(`input`,{type:`checkbox`,className:n,style:r,checked:t,ref:e=>{e&&(e.indeterminate=a)},onChange:e=>{e.stopPropagation(),t?i.deselectAll():i.selectAll()},onClick:e=>e.stopPropagation()})}return t==null?null:(0,B.jsx)(`input`,{type:`checkbox`,className:n,style:r,checked:i.isSelected(t),onChange:e=>{e.stopPropagation(),i.toggle(t)},onClick:e=>e.stopPropagation()})}var z9={Root:Zgt,Header:Qgt,HeaderCell:e_t,Viewport:t_t,Row:n_t,Cell:r_t,SortTrigger:a_t,SelectionCheckbox:o_t};function s_t({value:e,isExpanded:t,onToggleExpand:n,className:r,style:i}){let a=e==null?``:String(e),o=n?e=>{e.stopPropagation(),n()}:void 0;return t?(0,B.jsx)(`div`,{className:r,style:{textAlign:`left`,overflow:`auto`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,width:`100%`,cursor:n?`pointer`:void 0,...i},onClick:o,children:a}):(0,B.jsx)(`span`,{className:r,style:{textAlign:`left`,overflow:`hidden`,display:`-webkit-box`,WebkitLineClamp:3,WebkitBoxOrient:`vertical`,textOverflow:`ellipsis`,width:`100%`,cursor:n?`pointer`:void 0,...i},onClick:o,children:a})}var c_t=new Intl.NumberFormat;function l_t({value:e,className:t,style:n}){let r;return r=e==null?``:typeof e==`object`&&e&&`display`in e?String(e.display):c_t.format(Number(e)),(0,B.jsx)(`span`,{className:t,style:{textAlign:`right`,width:`100%`,fontVariantNumeric:`tabular-nums`,...n},children:r})}var u_t=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`short`,day:`numeric`});function d_t({value:e,className:t,style:n}){let r=``;return e instanceof Date&&!isNaN(e.getTime())?r=u_t.format(e):e!=null&&(r=String(e)),(0,B.jsx)(`span`,{className:t,style:{textAlign:`left`,width:`100%`,...n},children:r})}function f_t({value:e,className:t,style:n}){return(0,B.jsx)(`span`,{className:t,style:{textAlign:`center`,width:`100%`,dis
4858play:`flex`,justifyContent:`center`,alignItems:`center`,...n},children:(0,B.jsx)(`input`,{type:`checkbox`,checked:!!e,readOnly:!0,tabIndex:-1})})}function p_t(e){if(e==null)return null;if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e}function B9(e,t=0){if(e==null)return`null`;if(typeof e==`boolean`||typeof e==`number`)return String(e);if(typeof e==`string`)return`"${e.length>20?e.slice(0,20)+`â¦`:e}"`;if(Array.isArray(e)){if(t>0||e.length===0)return`[${e.length}]`;let n=e.slice(0,3).map(e=>B9(e,t+1)),r=e.length>3?`, â¦`:``;return`[${n.join(`, `)}${r}]`}if(typeof e==`object`){let n=Object.keys(e);if(t>0||n.length===0)return`{${n.length}}`;let r=n.slice(0,3).map(n=>`${n}: ${B9(e[n],t+1)}`),i=n.length>3?`, â¦`:``;return`{${r.join(`, `)}${i}}`}return String(e)}function V9({data:e,indent:t=0}){let n=t*16;if(e==null)return(0,B.jsx)(`span`,{className:`json-null`,style:{paddingLeft:n},children:`null`});if(typeof e==`boolean`)return(0,B.jsx)(`span`,{className:`json-boolean`,style:{paddingLeft:n},children:String(e)});if(typeof e==`number`)return(0,B.jsx)(`span`,{className:`json-number`,style:{paddingLeft:n},children:e});if(typeof e==`string`)return(0,B.jsxs)(`span`,{className:`json-string`,style:{paddingLeft:n},children:[`"`,e,`"`]});if(Array.isArray(e))return e.length===0?(0,B.jsx)(`span`,{className:`json-punctuation`,style:{paddingLeft:n},children:`[]`}):(0,B.jsxs)(`div`,{style:{paddingLeft:n},children:[(0,B.jsx)(`span`,{className:`json-punctuation`,children:`[`}),e.map((t,n)=>(0,B.jsxs)(`div`,{style:{paddingLeft:16},children:[(0,B.jsx)(V9,{data:t}),n<e.length-1&&(0,B.jsx)(`span`,{className:`json-punctuation`,children:`,`})]},n)),(0,B.jsx)(`span`,{className:`json-punctuation`,children:`]`})]});if(typeof e==`object`){let t=Object.entries(e);return t.length===0?(0,B.jsx)(`span`,{className:`json-punctuation`,style:{paddingLeft:n},children:`{}`}):(0,B.jsxs)(`div`,{style:{paddingLeft:n},children:[(0,B.jsx)(`span`,{className:`json-punctuation`,children:`{`}),t.map(([e,n],r)=>(0,B.jsxs)(`div`,{style:{paddingLeft:16},children:[(0,B.jsxs)(`span`,{className:`json-key`,children:[`"`,e,`"`]}),(0,B.jsx)(`span`,{className:`json-punctuation`,children:`: `}),(0,B.jsx)(V9,{data:n}),r<t.length-1&&(0,B.jsx)(`span`,{className:`json-punctuation`,children:`,`})]},e)),(0,B.jsx)(`span`,{className:`json-punctuation`,children:`}`})]})}return(0,B.jsx)(`span`,{children:String(e)})}function m_t({value:e,isExpanded:t,onToggleExpand:n,className:r,style:i}){let a=p_t(e),o=n?e=>{e.stopPropagation(),n()}:void 0;return t?(0,B.jsx)(`div`,{className:r,style:{textAlign:`left`,overflow:`auto`,fontFamily:`SF Mono, Menlo, Consolas, monospace`,width:`100%`,cursor:n?`pointer`:void 0,whiteSpace:`pre`,...i},onClick:o,children:(0,B.jsx)(V9,{data:a})}):(0,B.jsx)(`span`,{className:r,style:{textAlign:`left`,overflow:`hidden`,display:`-webkit-box`,WebkitLineClamp:3,WebkitBoxOrient:`vertical`,textOverflow:`ellipsis`,fontFamily:`SF Mono, Menlo, Consolas, monospace`,width:`100%`,cursor:n?`pointer`:void 0,...i},onClick:o,children:a==null?``:B9(a)})}function h_t(e){if(Array.isArray(e))return e;if(typeof e==`string`)try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[]}function g_t(e){if(e==null)return`null`;if(typeof e==`object`)return Array.isArray(e)?`[${e.length}]`:`{â¦}`;let t=String(e);return t.length>30?t.slice(0,30)+`â¦`:t}function __t({value:e,isExpanded:t,onToggleExpand:n,className:r,style:i}){let a=h_t(e);if(t)return(0,B.jsx)(`div`,{className:r,style:{textAlign:`left`,overflow:`auto`,width:`100%`,cursor:n?`pointer`:void 0,...i},onClick:n,children:a.length===0?(0,B.jsx)(`span`,{style:{color:`var(--muted-fg)`},children:`[]`}):a.map((e,t)=>(0,B.jsx)(`div`,{style:{padding:`2px 0`,borderBottom:t<a.length-1?`1px solid var(--border)`:void 0},children:g_t(e)},t))});let o=a.length===0?`[]`:`[${a.slice(0,4).map(g_t).join(`, `)}${a.length>4?`, â¦`:``}]`;return(0,B.jsx)(`span`,{className:r,style:{textAlign:`left`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,width:`100%`,cursor:n?`pointer`:void 0,...i},onClick:n,children:o})}function v_t(e){if(e==null)return null;if(typeof e==`object`&&!Array.isArray(e))return e;if(typeof e==`string`)try{let t=JSON.parse(e);if(typeof t==`object`&&t&&!Array.isArray(t))return t}catch{}return null}function y_t(e){if(e==null)return`null`;if(typeof e==`object`)return Array.isArray(e)?`[${e.length}]`:`{â¦}`;let t=String(e);return t.length>30?t.slice(0,30)+`â¦`:t}function b_t({value:e,isExpanded:t,onToggleExpand:n,className:r,style:i}){let a=v_t(e);if(a==null)return(0,B.jsx)(`span`,{className:r,style:{textAlign:`left`,color:`var(--muted-fg)`,width:`100%`,...i},children:e==null?``:String(e)});let o=Object.entries(a);if(t)return(0,B.jsx)(`div`,{className:r,style:{textAlign:`left`,overflow:`auto`,width:`100%`,cursor:n?`pointer`:void 0,...i},onClick:n,children:o.length===0?(0,B.jsx)(`span`,{style:{color:`var(--muted-fg)`},children:`{}`}):o.map(([e,t])=>(0,B.jsxs)(`div`,{style:{padding:`2px 0`},children:[(0,B.jsx)(`span`,{style:{fontWeight:600,color:`var(--accent)`},children:e}),(0,B.jsx)(`span`,{style:{color:`var(--muted-fg)`},children:`: `}),(0,B.jsx)(`span`,{children:y_t(t)})]},e))});let s=o.length===0?`{}`:`{${o.slice(0,3).map(([e,t])=>`${e}: ${y_t(t)}`).join(`, `)}${o.length>3?`, â¦`:``}}`;return(0,B.jsx)(`span`,{className:r,style:{textAlign:`left`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,width:`100%`,cursor:n?`pointer`:void 0,...i},onClick:n,children:s})}var x_t=new Map;function H9(e,t){x_t.set(e,t)}H9(`text`,({value:e,isExpanded:t,onToggleExpand:n})=>(0,B.jsx)(s_t,{value:e,isExpanded:t,onToggleExpand:n})),H9(`number`,({value:e})=>(0,B.jsx)(l_t,{value:e})),H9(`date`,({value:e})=>(0,B.jsx)(d_t,{value:e})),H9(`boolean`,({value:e})=>(0,B.jsx)(f_t,{value:e})),H9(`json`,({value:e,isExpanded:t,onToggleExpand:n})=>(0,B.jsx)(m_t,{value:e,isExpanded:t,onToggleExpand:n})),H9(`list`,({value:e,isExpanded:t,onToggleExpand:n})=>(0,B.jsx)(__t,{value:e,isExpanded:t,onToggleExpand:n})),H9(`struct`,({value:e,isExpanded:t,onToggleExpand:n})=>(0,B.jsx)(b_t,{value:e,isExpanded:t,onToggleExpand:n})),H9(`enumBadge`,({value:e,options:t})=>{if(e==null)return``;let n=String(e),r=t?.map??{},i=t?.neutral??`var(--muted-fg)`,a=r[n];return(0,B.jsx)(`span`,{style:{fontWeight:600,color:a?a.startsWith(`var(`)||a.startsWith(`#`)||a.startsWith(`rgb`)?a:`var(--${a}-fg, var(--${a}))`:i},children:n})});function U9({value:e,max:t=24}){let n=String(e??``).trim();if(!n)return null;let r=n.split(`,`),i=r.slice(0,t),a=r.length-i.length;return(0,B.jsxs)(xh,{align:`center`,gap:`2px`,overflow:`hidden`,flexWrap:`nowrap`,children:[i.map((e,t)=>(0,B.jsx)(V,{w:`10px`,h:`10px`,borderRadius:`2px`,flexShrink:0,bg:x7(b7(e)),title:`${t+1}. ${e}`},t)),a>0&&(0,B.jsxs)(U,{as:`span`,fontFamily:`mono`,fontSize:`11px`,color:`fg.subtle`,ml:1,children:[`+`,a]})]})}var W9=`__detail__`,S_t=[{key:`id`,width:`8.5rem`},{key:`task`,flex:1,minWidth:`12rem`},{key:`model`,width:`11rem`},{key:`step_count`,width:`4.5rem`},{key:`step_tools_str`,width:`16rem`},{key:`outcome`,width:`6rem`},{key:`tokens`,width:`5rem`},{key:`reward`,width:`5rem`},{key:W9,width:`2.5rem`}],C_t={id:{key:`id`,label:`ID`},task:{key:`task`,label:`Task`},model:{key:`model`,label:`Model`},step_count:{key:`step_count`,label:`Steps`,align:`right`},step_tools_str:{key:`step_tools_str`,label:`Path`},outcome:{key:`outcome`,label:`Outcome`},tokens:{key:`tokens`,label:`Tokens`,align:`right`},reward:{key:`reward`,label:`Reward`,align:`right`},[W9]:{key:W9,label:``}};function w_t(e){let t=e.data;return t?String(t.id??``):``}function T_t(){let e=Y(a7);return e?(0,B.jsx)(Mgt,{coordinator:e,children:(0,B.jsx)(E_t,{})}):null}function E_t(){let e=Y(a7),t=Y(o7),[n,r]=cX(f7),i=sX(p7),a=(0,_.useRef)(null),o=(0,_.useMemo)(()=>t??void 0,[t]),s=(0,_.useCallback)(e=>{let t=e.values().next().value;r(t??null)},[r]),c=Xgt({table:`trajectories`,columns:S_t,rowKey:`id`,filter:o,containerRef:a,selection:{mode:`single`,selected:(0,_.useMemo)(()=>n?new Set([n]):new Set,[n]),onSelectionChange:s},rowHeightConfig:{numLines:2,padding:`8px`}}),l=(0,_.useCallback)(e=>{e&&r(n===e?null:e)},[n,r]),u=(0,_.useCallback)(t=>{if(!t||!e)return;let n=t.replace(/'/g,`''`);
4858e.query(`SELECT * FROM trajectories WHERE id = '${n}' LIMIT 1`).then(e=>{let t=e?.toArray?.()??[];t.length&&i(O_t(t[0]))}).catch(e=>console.error(`[TrajectoryTable] detail query failed:`,e))},[e,i]);return(0,B.jsx)(V,{ref:a,position:`relative`,w:`100%`,h:`100%`,overflow:`hidden`,bg:`bg`,borderRadius:`md`,fontSize:`sm`,color:`fg`,children:(0,B.jsxs)(z9.Root,{...c.rootProps,children:[(0,B.jsx)(z9.Header,{style:{height:18,fontSize:`0.8rem`,background:`var(--chakra-colors-bg)`,borderBottom:`1px solid var(--chakra-colors-gray-subtle)`,flex:`0 0 auto`},children:({columns:e})=>e.map(e=>{let t=C_t[e.key];return(0,B.jsx)(z9.HeaderCell,{column:e.key,style:{padding:`0 8px`,display:`flex`,alignItems:`center`,justifyContent:t?.align===`right`?`flex-end`:`flex-start`,cursor:`pointer`},children:(0,B.jsx)(z9.SortTrigger,{column:e.key,children:(0,B.jsx)(`span`,{children:t?.label??e.key})})},e.key)})}),(0,B.jsx)(z9.Viewport,{children:({rows:e})=>e.map(e=>(0,B.jsx)(z9.Row,{row:e,style:{borderBottom:`1px solid var(--chakra-colors-bg-subtle)`,fontSize:13,cursor:`pointer`},children:({cells:t})=>t.map(t=>{if(t.column===W9)return(0,B.jsx)(z9.Cell,{column:t.column,width:t.width,offset:t.offset,onClick:e=>e.stopPropagation(),style:{padding:`0 4px`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,B.jsx)(mh,{size:`2xs`,variant:`ghost`,"aria-label":`Open detail`,onClick:t=>{t.stopPropagation(),u(w_t(e))},children:(0,B.jsx)(Gue,{})})},t.column);let n=C_t[t.column],r=t.column===`task`;return(0,B.jsx)(z9.Cell,{column:t.column,width:t.width,offset:t.offset,onClick:()=>l(w_t(e)),style:{padding:`0px 12px`,display:`flex`,alignItems:`center`,justifyContent:n?.align===`right`?`flex-end`:`flex-start`,whiteSpace:r?`normal`:`nowrap`,overflow:`hidden`,textOverflow:r?void 0:`ellipsis`},children:D_t(t.column,t.value)},t.column)})},e.key))})]})})}function D_t(e,t){if(t==null)return``;switch(e){case`task`:return(0,B.jsx)(U,{lineClamp:2,children:String(t)});case`step_tools_str`:return(0,B.jsx)(U9,{value:String(t??``)});case`step_tools`:return(0,B.jsx)(U9,{value:n7(t).join(`,`)});case`steps`:return(0,B.jsx)(U9,{value:k_t(t).map(e=>e.name||e.tool).join(`,`)});case`outcome`:return(0,B.jsx)(Blt,{outcome:String(t??`fail`)});case`tokens`:{let e=Number(t??0);return e<1e3?String(e):e<1e6?`${(e/1e3).toFixed(1)}k`:`${(e/1e6).toFixed(2)}M`}case`reward`:return Number(t).toFixed(2);case`step_count`:return String(t);default:return String(t)}}function O_t(e){let t=e;return{id:String(t.id??``),dataset:String(t.dataset??``),model:String(t.model??``),task:String(t.task??``),outcome:String(t.outcome??`fail`),step_count:Number(t.step_count??0),tokens:Number(t.tokens??0),duration:Number(t.duration??0),reward:Number(t.reward??0),cost:Number(t.cost??0),tools_used:n7(t.tools_used),step_tools:n7(t.step_tools),steps:k_t(t.steps)}}function k_t(e){return $5(e).map(e=>{if(e==null)return null;let t=e,n=typeof t.toJSON==`function`?t.toJSON():t,r=String(n.name??n.tool??``);return{idx:Number(n.idx??0),name:r,category:String(n.category??`tool`),tool:r,role:String(n.role??``),tokens:Number(n.tokens??0),duration:Number(n.duration??0),ok:n.ok==null?!0:!!n.ok}}).filter(e=>e!==null)}function A_t(){Y(Elt);let e=Y(i7),[t,n]=cX(p7);return e.status===`ready`?(0,B.jsxs)(xh,{direction:`column`,h:{base:`auto`,md:`100%`},bg:`bg.muted`,overflow:{base:`visible`,md:`hidden`},children:[(0,B.jsxs)(V,{px:4,pt:4,pb:2,maxW:`80em`,mx:`auto`,w:`100%`,children:[(0,B.jsxs)(V,{mb:2,children:[(0,B.jsx)(Ll,{as:`h1`,size:`lg`,color:`accent`,mb:1,children:`Trajectory Atlas`}),(0,B.jsx)(U,{fontSize:`sm`,color:`fg.muted`,children:`Understand agent trajectories by steps taken. Each step in the graphs is one action: a tool call, user/assistant observation, or thought.`})]}),(0,B.jsx)(xut,{})]}),(0,B.jsxs)(xh,{direction:{base:`column`,md:`row`},flex:{base:`0 0 auto`,md:2},minH:0,gap:2,px:4,overflow:{base:`visible`,md:`hidden`},children:[(0,B.jsx)(V,{flex:{base:`0 0 auto`,md:1},minW:0,minH:0,h:{base:`350px`,md:`auto`},children:(0,B.jsx)(N7,{title:`Step Icicle`,subtitle:`step depth (rows) · width = share of trajectories · Click a node to filter the path`,children:(0,B.jsx)(yut,{})})}),(0,B.jsx)(V,{flex:{base:`0 0 auto`,md:1},minW:0,minH:0,h:{base:`350px`,md:`auto`}
4858,children:(0,B.jsx)(N7,{title:`Outcome Sankey`,subtitle:`i-th tool call â outcome · click a ribbon`,right:(0,B.jsx)(dut,{}),children:(0,B.jsx)(uut,{})})})]}),(0,B.jsx)(V,{flex:{base:`0 0 auto`,md:1.4},minH:0,h:{base:`450px`,md:`auto`},px:4,pb:2,pt:2,overflow:{base:`visible`,md:`hidden`},children:(0,B.jsx)(N7,{title:`Trajectories`,subtitle:`sort any column, click to inspect`,children:(0,B.jsx)(T_t,{})})}),(0,B.jsx)(Vlt,{traj:t,onClose:()=>n(null)})]}):(0,B.jsx)(r0,{state:e,title:`Loading agent trajectories`})}function j_t(){let e=Y(l7),t=Y(u7),n=Y(_lt),r=sX(Clt),i=sX(v7);return(0,_.useEffect)(()=>{n&&(r(),i())},[e,t,n,r,i]),null}function M_t(){let e=Y(c7),t=Y(_lt),n=sX(wlt);return(0,_.useEffect)(()=>{t&&n(e)},[e,t,n]),null}function N_t(){return(0,B.jsx)(gg,{children:(0,B.jsxs)(nX,{children:[(0,B.jsx)(j_t,{}),(0,B.jsx)(M_t,{}),(0,B.jsx)(A_t,{})]})})}var G9={deepswe:{label:`DeepSWE · Kimi-K2`,runs:`2.8k runs`,blurb:`Fixing GitHub issues with bash + editor`,url:`/data/trajectory-atlas/deepswe-kimi-flat.csv`},hermes:{label:`Hermes · agent traces`,runs:`2.5k runs`,blurb:`Multi-tool: terminal, files, browser`,url:`/data/trajectory-atlas/hermes-flat.csv`},"deepseek-pi":{label:`DeepSeek-v4 · pi`,runs:`2.5k runs`,blurb:`Coding sessions in the pi harness`,url:`/data/trajectory-atlas/deepseek-pi-flat.csv`}},K9=Array.from({length:80},(e,t)=>`step_${t+1}`),q9=J({status:`idle`}),J9=J(null),Y9=J(8),P_t=J(!1),F_t=J(!1),X9=J(0),Z9=J(null),Q9=J(null),$9=J([]),I_t=J(e=>{let t=e(Q9);if(!t||t.total<=0)return 80;let n=1;for(let e=0;e<t.ge.length;e++)t.ge[e]>0&&(n=e+1);return Math.min(80,Math.max(2,n))});async function L_t(e){let t=K9.map((e,t)=>`COUNT(*) FILTER (WHERE ${e} IS NOT NULL AND ${e} <> '(none)') AS ge_${t+1}`),n=t7(await e.query(` 4859 SELECT COUNT(*) AS total, ${t.join(`, `)} 4860 FROM trajectories 4861 `));return{total:Number(n?.total??0),ge:K9.map((e,t)=>Number(n?.[`ge_${t+1}`]??0))}}async function R_t(e){let t=await e.query(` 4862 SELECT DISTINCT unnest([${K9.join(`, `)}]) AS tool 4863 FROM trajectories 4864 `),n=new Set;for(let e of e7(t)){let t=e.tool;typeof t!=`string`||!t||t===`(none)`||n.add(b7(t))}return Array.from(n)}async function z_t(e,t){let n=`${window.location.origin}${G9[t].url}`;await e.exec(`DROP TABLE IF EXISTS trajectories`),await e.exec(` 4865 CREATE TABLE trajectories AS 4866 SELECT * FROM read_csv('${n}', header = true, all_varchar = true) 4867 `)}var B_t=J(null,async(e,t,n)=>{let r=e(J9);if(!(!r||e(Z9)===n))try{t(P_t,!1),await z_t(r,n);let i=await V_t(r);t(Q9,i.survival),t($9,i.categories),t(Y9,t=>Math.min(t,e(I_t))),t(X9,e=>e+1),t(Z9,n)}catch(e){console.error(`Sankeyn source switch failed:`,e)}});async function V_t(e){let[t,n]=await Promise.all([L_t(e),R_t(e)]);return{survival:t,categories:n}}var H_t=J(null,async(e,t)=>{if(e(J9))return;let n=`deepswe`;try{t(q9,{status:`initializing`});let e=new Xj(XL({duckdb:await i0()}),{cache:!1,preagg:{enabled:!1}});t(J9,e),t(q9,{status:`loading-parquet`,message:G9[n].label}),await z_t(e,n),t(q9,{status:`creating-tables`,table:`stats`});let r=await V_t(e);t(Q9,r.survival),t($9,r.categories),t(Z9,n),t(q9,{status:`ready`})}catch(e){console.error(`Sankeyn init failed:`,e),t(q9,{status:`error`,message:e instanceof Error?e.message:`Unknown error`})}});H_t.onMount=e=>{e()};function U_t(e,t=800){let[n,r]=cX(P_t),i=Y(Y9),a=sX(Y9);return(0,_.useEffect)(()=>{if(!n)return;let i=setInterval(()=>{a(t=>t>=e?(r(!1),t):t+1)},t);return()=>clearInterval(i)},[n,t,e,a,r]),{playing:n,toggle:()=>{!n&&i>=e&&a(1),r(e=>!e)},stop:()=>r(!1)}}function W_t(){let[e,t]=cX(Y9),n=Y(I_t),r=Y(F_t),i=sX(X9),{playing:a,toggle:o,stop:s}=U_t(n);return(0,B.jsxs)(xh,{align:`center`,gap:3,w:`100%`,wrap:`wrap`,children:[(0,B.jsxs)(U,{fontSize:`sm`,fontWeight:`semibold`,flexShrink:0,children:[`Tool calls (n =`,` `,(0,B.jsx)(U,{as:`span`,fontFamily:`mono`,color:`accent`,children:e}),`)`]}
4867),(0,B.jsxs)(xh,{align:`center`,gap:3,flex:`1`,minW:`200px`,children:[(0,B.jsx)(U,{fontFamily:`mono`,fontSize:`xs`,color:`fg.muted`,flexShrink:0,children:`1`}),(0,B.jsx)(qle,{value:[e],onValueChange:e=>{s(),t(e.value[0])},min:1,max:n,step:1,flex:`1`,size:`sm`,children:(0,B.jsxs)(Rh,{children:[(0,B.jsx)(Jle,{children:(0,B.jsx)(Yle,{})}),(0,B.jsx)(tue,{})]})}),(0,B.jsx)(U,{fontFamily:`mono`,fontSize:`xs`,color:`fg.muted`,flexShrink:0,children:n})]}),r&&(0,B.jsx)(U,{as:`button`,fontSize:`xs`,color:`accent`,textDecoration:`underline`,flexShrink:0,onClick:()=>i(e=>e+1),children:`clear`}),(0,B.jsxs)(ph,{size:`sm`,variant:`outline`,color:`accent`,borderColor:`accent`,onClick:o,flexShrink:0,minW:`7em`,children:[a?(0,B.jsx)(Lue,{}):(0,B.jsx)(ng,{}),a?`Freeze`:`Animate`]})]})}var G_t={outcome:[...y7]};function K_t(){let e=Y(J9),t=Y(Y9),n=Y(X9),r=sX(F_t),{colorMode:i}=lg(),a=i===`dark`,[o,s]=(0,_.useState)(t);(0,_.useEffect)(()=>{let e=setTimeout(()=>s(t),150);return()=>clearTimeout(e)},[t]);let c=(0,_.useMemo)(()=>[...Array.from({length:o},(e,t)=>({name:`step_${t+1}`,label:Flt(t,o>5),expr:`any_value(step_${t+1})`})),{name:`outcome`,label:`Outcome`,expr:`any_value(outcome)`}],[o]),l=(0,_.useMemo)(()=>(e,t)=>e===`outcome`?Rlt(t,a):t===`(none)`?Nlt(a):Ilt(b7(t),a),[a]);return e?(0,B.jsx)(Ylt,{coordinator:e,table:`trajectories`,idCol:`id`,columns:c,selection:null,palette:l,orderings:G_t,dark:a,maxNodesPerColumn:15,align:`bottom`,dropoffLabels:!0,nodeOrder:`barycenter`,resetSignal:n,onSelectionStateChange:r}):null}var q_t=Object.keys(G9);function J_t(){let e=Y(Z9),t=sX(B_t);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(Ah,{display:{base:`block`,md:`none`},w:`100%`,size:`sm`,children:[(0,B.jsx)(jh,{value:e??void 0,onChange:e=>t(e.currentTarget.value),bg:`bg`,children:q_t.map(e=>(0,B.jsxs)(`option`,{value:e,children:[G9[e].label,` · `,G9[e].blurb]},e))}),(0,B.jsx)(Mh,{})]}),(0,B.jsx)(xh,{display:{base:`none`,md:`flex`},gap:2,wrap:`wrap`,align:`stretch`,children:q_t.map(n=>{let r=n===e;return(0,B.jsxs)(V,{as:`button`,onClick:()=>t(n),textAlign:`left`,px:3,py:2,borderRadius:`md`,borderWidth:`1px`,borderColor:r?`accent`:`gray.subtle`,bg:r?`accentBackground`:`bg`,cursor:`pointer`,transition:`border-color .15s, background .15s`,_hover:{borderColor:`accent`},children:[(0,B.jsx)(U,{fontSize:`sm`,fontWeight:`semibold`,color:r?`accent`:`fg`,whiteSpace:`nowrap`,children:G9[n].label}),(0,B.jsx)(U,{fontSize:`xs`,color:`fg.muted`,mt:1,whiteSpace:`nowrap`,children:G9[n].blurb})]},n)})})]})}function Y_t({token:e,label:t}){return(0,B.jsxs)(Ch,{gap:1,children:[(0,B.jsx)(V,{w:`8px`,h:`8px`,borderRadius:`sm`,bg:e}),(0,B.jsx)(U,{children:t})]})}function X_t(){return(0,B.jsxs)(Ch,{flexWrap:`wrap`,gap:3,fontSize:`xs`,color:`fg.muted`,children:[Y($9).map(e=>(0,B.jsx)(Y_t,{token:x7(e),label:Olt[e]},e)),(0,B.jsx)(V,{w:`1px`,h:`12px`,bg:`gray.subtle`}),y7.map(e=>(0,B.jsx)(Y_t,{token:Llt(e),label:e},e))]})}function Z_t(){Y(H_t);let e=Y(q9),t=Y(Z9);return e.status===`ready`?(0,B.jsxs)(xh,{direction:`column`,bg:`bg.muted`,h:{base:`auto`,md:`100%`},overflow:{base:`visible`,md:`hidden`},p:4,gap:4,children:[(0,B.jsxs)(V,{w:`100%`,maxW:`75em`,mx:`auto`,children:[(0,B.jsxs)(Ll,{as:`h1`,size:`lg`,lineHeight:`1.2`,children:[(0,B.jsxs)(U,{as:`span`,color:`accent`,children:[`San(key)`,(0,B.jsx)(Ca.sup,{fontSize:`0.5em`,top:`-0.7em`,ml:`1px`,children:`n`})]}),t&&(0,B.jsxs)(U,{as:`span`,color:`fg.muted`,fontWeight:`normal`,fontSize:`md`,ml:2,children:[`· `,G9[t].label,` (`,G9[t].runs,`)`]})]}),(0,B.jsx)(U,{fontSize:`sm`,color:`fg.muted`,mt:1,children:`A custom visualization for recursive flows: the sankey unfolds the first n tool calls of every agent run, and clicking a layer expands it in place.`})]}),(0,B.jsxs)(xh,{maxW:`75em`,mx:`auto`,w:`100%`,gap:3,align:`stretch`,wrap:`wrap`,children:[(0,B.jsx)(J_t,{}),(0,B.jsx)(xh,{align:`center`,flex:`1`,minW:{base:`auto`,md:`480px`},bg:`bg`,borderWidth:`1px`,borderColor:`gray.subtle`,borderRadius:`lg`,px:4,py:2,children:(0,B.jsx)(W_t,{})})]}),(0,B.jsx)(V,{flex:{base:`none`,md:`1`},minH:0,h:{base:`460px`,md:`auto`},children:(0,B.jsx)(N7,{title:`Recursive flow of tool-calls`,subt
4867itle:`click a layer to expand`,right:(0,B.jsx)(X_t,{}),children:(0,B.jsx)(K_t,{},t??`init`)})})]}):(0,B.jsx)(r0,{state:e,title:`Loading San(key)â¿`})}function Q_t(){return(0,B.jsx)(gg,{children:(0,B.jsx)(nX,{children:(0,B.jsx)(Z_t,{})})})}function $_t(){let e=nt();return(0,_.useEffect)(()=>{typeof window.gtag==`function`&&window.gtag(`event`,`page_view`,{page_path:e.pathname+e.search,page_location:window.location.href})},[e]),null}function evt(){return(0,B.jsx)(oKe,{children:(0,B.jsxs)(Sn,{children:[(0,B.jsx)($_t,{}),(0,B.jsxs)(Ft,{children:[(0,B.jsx)(Nt,{path:`/`,element:(0,B.jsx)(cKe,{})}),(0,B.jsx)(Nt,{path:`/publications`,element:(0,B.jsx)(mKe,{})}),(0,B.jsx)(Nt,{path:`/explorations`,element:(0,B.jsx)(pKe,{})}),(0,B.jsx)(Nt,{path:`/posts`,element:(0,B.jsx)(Mt,{to:`/explorations`,replace:!0})}),(0,B.jsx)(Nt,{path:`/about`,element:(0,B.jsx)(uKe,{})}),(0,B.jsx)(Nt,{path:`/packed-radial-tree`,element:(0,B.jsx)(r2e,{})}),(0,B.jsx)(Nt,{path:`/swe-bench`,element:(0,B.jsx)(p2e,{})}),(0,B.jsx)(Nt,{path:`/gravitational-lensing`,element:(0,B.jsx)(y2e,{})}),(0,B.jsx)(Nt,{path:`/star-catalog`,element:(0,B.jsx)(Z7e,{})}),(0,B.jsx)(Nt,{path:`/transformer`,element:(0,B.jsx)(H9e,{})}),(0,B.jsx)(Nt,{path:`/latent-insights`,element:(0,B.jsx)(ult,{})}),(0,B.jsx)(Nt,{path:`/latent-insights/:sessionId`,element:(0,B.jsx)(ult,{})}),(0,B.jsx)(Nt,{path:`/trajectory-atlas`,element:(0,B.jsx)(N_t,{})}),(0,B.jsx)(Nt,{path:`/sankeyn`,element:(0,B.jsx)(Q_t,{})}),(0,B.jsx)(Nt,{path:`/blog/:slug`,element:(0,B.jsx)(rKe,{})})]})]})})}(0,y.createRoot)(document.getElementById(`root`)).render((0,B.jsx)(_.StrictMode,{children:(0,B.jsx)(evt,{})}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.